From 89df58a11239609c9ca91b7fdf93069ec88b3adf Mon Sep 17 00:00:00 2001 From: gateio Date: Thu, 8 May 2025 09:14:05 +0000 Subject: [PATCH 01/20] update to v6.97.0 --- .gitignore | 66 - .gitlab-ci.yml | 33 - .travis.yml | 17 - README.md | 661 -- docs/AccountApi.md | 625 -- docs/AccountBalance.md | 14 - docs/AccountDetail.md | 16 - docs/AccountDetailKey.md | 11 - docs/AccountRateLimit.md | 13 - docs/AgencyCommission.md | 15 - docs/AgencyCommissionHistory.md | 12 - docs/AgencyTransaction.md | 18 - docs/AgencyTransactionHistory.md | 12 - docs/AutoRepaySetting.md | 10 - docs/BatchAmendItem.md | 17 - docs/BatchAmendOrderReq.md | 15 - docs/BatchFuturesOrder.md | 38 - docs/BatchOrder.md | 47 - docs/BorrowCurrencyInfo.md | 14 - docs/BrokerCommission.md | 11 - docs/BrokerCommission1.md | 18 - docs/BrokerTransaction.md | 11 - docs/BrokerTransaction1.md | 17 - docs/CancelBatchOrder.md | 14 - docs/CancelOrderResult.md | 17 - docs/CollateralAdjust.md | 12 - docs/CollateralAdjustRes.md | 12 - docs/CollateralAlign.md | 13 - docs/CollateralCurrency.md | 11 - docs/CollateralCurrencyInfo.md | 13 - docs/CollateralCurrencyRes.md | 14 - docs/CollateralCurrentRate.md | 12 - docs/CollateralFixRate.md | 14 - docs/CollateralLoanApi.md | 704 -- docs/CollateralLoanCurrency.md | 12 - docs/CollateralLtv.md | 13 - docs/CollateralOrder.md | 26 - docs/CollateralRecord.md | 20 - docs/Contract.md | 46 - docs/ContractStat.md | 22 - docs/ConvertSmallBalance.md | 12 - docs/CountdownCancelAllFuturesTask.md | 12 - docs/CountdownCancelAllOptionsTask.md | 13 - docs/CountdownCancelAllSpotTask.md | 12 - docs/CreateCollateralOrder.md | 13 - docs/CreateMultiCollateralOrder.md | 18 - docs/CreateUniLend.md | 14 - docs/CreateUniLoan.md | 15 - docs/CrossMarginAccount.md | 26 - docs/CrossMarginAccountBook.md | 15 - docs/CrossMarginBalance.md | 18 - docs/CrossMarginBalance1.md | 13 - docs/CrossMarginCurrency.md | 19 - docs/CrossMarginLoan.md | 19 - docs/CrossMarginRepayRequest.md | 11 - docs/CrossMarginRepayment.md | 16 - docs/CrossMarginTransferable.md | 11 - docs/Currency.md | 19 - docs/CurrencyChain.md | 17 - docs/CurrencyPair.md | 26 - docs/CurrencyQuota.md | 15 - docs/DebitFee.md | 10 - docs/DeliveryApi.md | 2050 ------ docs/DeliveryCandlestick.md | 16 - docs/DeliveryContract.md | 48 - docs/DeliverySettlement.md | 18 - docs/DepositAddress.md | 12 - docs/DualGetOrders.md | 26 - docs/DualGetPlans.md | 22 - docs/EarnApi.md | 547 -- docs/EarnUniApi.md | 689 -- docs/Eth2RateList.md | 12 - docs/Eth2Swap.md | 12 - docs/FlashSwapApi.md | 357 - docs/FlashSwapCurrencyPair.md | 17 - docs/FlashSwapOrder.md | 19 - docs/FlashSwapOrderPreview.md | 16 - docs/FlashSwapOrderRequest.md | 15 - docs/FlashSwapPreviewRequest.md | 14 - docs/FundingAccount.md | 14 - docs/FundingRateRecord.md | 11 - docs/FutureCancelOrderResult.md | 14 - docs/FuturesAccount.md | 34 - docs/FuturesAccountBook.md | 17 - docs/FuturesAccountHistory.md | 20 - docs/FuturesApi.md | 3377 --------- docs/FuturesAutoDeleverage.md | 19 - docs/FuturesBatchAmendOrderRequest.md | 15 - docs/FuturesCandlestick.md | 17 - docs/FuturesFee.md | 12 - docs/FuturesIndexConstituents.md | 11 - docs/FuturesInitialOrder.md | 19 - docs/FuturesLimitRiskTiers.md | 16 - docs/FuturesLiqOrder.md | 16 - docs/FuturesLiquidate.md | 21 - docs/FuturesOrder.md | 37 - docs/FuturesOrderAmendment.md | 14 - docs/FuturesOrderBook.md | 14 - docs/FuturesOrderBookItem.md | 11 - docs/FuturesPremiumIndex.md | 15 - docs/FuturesPriceTrigger.md | 14 - docs/FuturesPriceTriggeredOrder.md | 22 - docs/FuturesTicker.md | 32 - docs/FuturesTrade.md | 16 - docs/IndexConstituent.md | 11 - docs/InsuranceRecord.md | 11 - docs/LedgerRecord.md | 19 - docs/LiquidateOrder.md | 15 - docs/MarginAccount.md | 18 - docs/MarginAccountBook.md | 17 - docs/MarginAccountCurrency.md | 15 - docs/MarginApi.md | 1596 ----- docs/MarginLeverageTier.md | 13 - docs/MarginMarketLeverage.md | 12 - docs/MarginTiers.md | 14 - docs/MarginTransferable.md | 12 - docs/MarginUniApi.md | 557 -- docs/MaxUniBorrowable.md | 12 - docs/MockFuturesOrder.md | 13 - docs/MockFuturesPosition.md | 12 - docs/MockMarginResult.md | 17 - docs/MockOptionsOrder.md | 13 - docs/MockOptionsPosition.md | 12 - docs/MockRiskUnit.md | 19 - docs/MockSpotBalance.md | 12 - docs/MockSpotOrder.md | 15 - docs/MultiChainAddressItem.md | 14 - docs/MultiCollateralCurrency.md | 12 - docs/MultiCollateralItem.md | 12 - docs/MultiCollateralLoanApi.md | 808 --- docs/MultiCollateralOrder.md | 24 - docs/MultiCollateralRecord.md | 17 - docs/MultiCollateralRecordCurrency.md | 15 - docs/MultiLoanItem.md | 11 - docs/MultiLoanRepayItem.md | 12 - docs/MultiRepayRecord.md | 22 - docs/MultiRepayResp.md | 12 - docs/MyFuturesTrade.md | 20 - docs/MyFuturesTradeTimeRange.md | 20 - docs/OpenOrders.md | 12 - docs/OptionsAccount.md | 28 - docs/OptionsAccountBook.md | 14 - docs/OptionsApi.md | 1892 ----- docs/OptionsCandlestick.md | 16 - docs/OptionsContract.md | 35 - docs/OptionsMMP.md | 17 - docs/OptionsMMPReset.md | 17 - docs/OptionsMySettlements.md | 18 - docs/OptionsMyTrade.md | 17 - docs/OptionsOrder.md | 35 - docs/OptionsPosition.md | 26 - docs/OptionsPositionClose.md | 15 - docs/OptionsPositionCloseOrder.md | 13 - docs/OptionsSettlement.md | 15 - docs/OptionsTicker.md | 28 - docs/OptionsUnderlying.md | 11 - docs/OptionsUnderlyingTicker.md | 13 - docs/Order.md | 46 - docs/OrderBook.md | 14 - docs/OrderCancel.md | 49 - docs/OrderPatch.md | 16 - docs/OrderResp.md | 10 - docs/PartnerCommissionHistory.md | 11 - docs/PartnerSub.md | 12 - docs/PartnerSubList.md | 11 - docs/PartnerTransactionHistory.md | 11 - docs/PatchUniLend.md | 11 - docs/PlaceDualInvestmentOrder.md | 15 - docs/Position.md | 41 - docs/PositionClose.md | 22 - docs/PositionCloseOrder.md | 13 - docs/ProfitLossRange.md | 13 - docs/RebateApi.md | 692 -- docs/RebateUserInfo.md | 11 - docs/RepayCurrencyRes.md | 15 - docs/RepayLoan.md | 13 - docs/RepayMultiLoan.md | 12 - docs/RepayRecord.md | 23 - docs/RepayRecordCurrency.md | 15 - docs/RepayRecordLeftInterest.md | 15 - docs/RepayRecordRepaidCurrency.md | 15 - docs/RepayRecordTotalInterest.md | 13 - docs/RepayResp.md | 12 - docs/RiskUnits.md | 17 - docs/SavedAddress.md | 15 - docs/SmallBalance.md | 14 - docs/SmallBalanceHistory.md | 15 - docs/SpotAccount.md | 13 - docs/SpotAccountBook.md | 17 - docs/SpotApi.md | 2248 ------ docs/SpotCurrencyChain.md | 14 - docs/SpotFee.md | 19 - docs/SpotInsuranceHistory.md | 12 - docs/SpotPricePutOrder.md | 18 - docs/SpotPriceTrigger.md | 12 - docs/SpotPriceTriggeredOrder.md | 20 - docs/StpGroup.md | 13 - docs/StpGroupUser.md | 12 - docs/StructuredBuy.md | 12 - docs/StructuredGetProjectList.md | 22 - docs/StructuredOrderList.md | 17 - docs/SubAccount.md | 17 - docs/SubAccountApi.md | 760 -- docs/SubAccountBalance.md | 11 - docs/SubAccountCrossMarginBalance.md | 11 - docs/SubAccountFuturesBalance.md | 11 - docs/SubAccountKey.md | 19 - docs/SubAccountKeyPerms.md | 11 - docs/SubAccountMarginBalance.md | 11 - docs/SubAccountToSubAccount.md | 16 - docs/SubAccountTransfer.md | 18 - docs/SubCrossMarginAccount.md | 25 - docs/SubUserMode.md | 12 - docs/SystemTime.md | 10 - docs/Ticker.md | 26 - docs/TotalBalance.md | 12 - docs/Trade.md | 25 - docs/TradeFee.md | 22 - docs/TransactionID.md | 10 - docs/Transfer.md | 16 - docs/TransferOrderStatus.md | 11 - docs/TransferablesResult.md | 12 - docs/TriggerOrderResponse.md | 10 - docs/TriggerTime.md | 10 - docs/UidPushOrder.md | 18 - docs/UidPushWithdrawal.md | 12 - docs/UidPushWithdrawalResp.md | 10 - docs/UniCurrency.md | 15 - docs/UniCurrencyInterest.md | 11 - docs/UniCurrencyPair.md | 14 - docs/UniInterestMode.md | 12 - docs/UniInterestRecord.md | 16 - docs/UniLend.md | 20 - docs/UniLendInterest.md | 11 - docs/UniLendRecord.md | 17 - docs/UniLoan.md | 16 - docs/UniLoanInterestRecord.md | 17 - docs/UniLoanRecord.md | 15 - docs/UnifiedAccount.md | 28 - docs/UnifiedApi.md | 1360 ---- docs/UnifiedBalance.md | 28 - docs/UnifiedBorrowable.md | 11 - docs/UnifiedCurrency.md | 15 - docs/UnifiedDiscount.md | 12 - docs/UnifiedDiscountTiers.md | 14 - docs/UnifiedHistoryLoanRate.md | 13 - docs/UnifiedHistoryLoanRateRates.md | 11 - docs/UnifiedLeverageConfig.md | 16 - docs/UnifiedLeverageSetting.md | 12 - docs/UnifiedLoan.md | 15 - docs/UnifiedLoanRecord.md | 18 - docs/UnifiedLoanResult.md | 11 - docs/UnifiedMarginTiers.md | 12 - docs/UnifiedModeSet.md | 11 - docs/UnifiedPortfolioInput.md | 17 - docs/UnifiedPortfolioOutput.md | 14 - docs/UnifiedRiskUnits.md | 12 - docs/UnifiedSettings.md | 13 - docs/UnifiedTransferable.md | 11 - docs/UserLtvInfo.md | 17 - docs/UserSub.md | 13 - docs/UserSubRelation.md | 10 - docs/UserTotalAmount.md | 12 - docs/WalletApi.md | 1488 ---- docs/WithdrawStatus.md | 21 - docs/WithdrawalApi.md | 216 - docs/WithdrawalRecord.md | 21 - gate_api/__init__.py | 293 - gate_api/api/__init__.py | 22 - gate_api/api/account_api.py | 1054 --- gate_api/api/collateral_loan_api.py | 1241 ---- gate_api/api/delivery_api.py | 3765 ---------- gate_api/api/earn_api.py | 977 --- gate_api/api/earn_uni_api.py | 1213 ---- gate_api/api/flash_swap_api.py | 648 -- gate_api/api/futures_api.py | 6260 ----------------- gate_api/api/margin_api.py | 2739 -------- gate_api/api/margin_uni_api.py | 1008 --- gate_api/api/multi_collateral_loan_api.py | 1461 ---- gate_api/api/options_api.py | 3441 --------- gate_api/api/rebate_api.py | 1216 ---- gate_api/api/spot_api.py | 4023 ----------- gate_api/api/sub_account_api.py | 1299 ---- gate_api/api/unified_api.py | 2347 ------ gate_api/api/wallet_api.py | 2511 ------- gate_api/api/withdrawal_api.py | 385 - gate_api/api_client.py | 707 -- gate_api/configuration.py | 369 - gate_api/exceptions.py | 137 - gate_api/models/__init__.py | 262 - gate_api/models/account_balance.py | 213 - gate_api/models/account_detail.py | 261 - gate_api/models/account_detail_key.py | 123 - gate_api/models/account_rate_limit.py | 207 - gate_api/models/agency_commission.py | 263 - gate_api/models/agency_commission_history.py | 179 - gate_api/models/agency_transaction.py | 347 - gate_api/models/agency_transaction_history.py | 179 - gate_api/models/auto_repay_setting.py | 129 - gate_api/models/batch_amend_item.py | 296 - gate_api/models/batch_amend_order_req.py | 235 - gate_api/models/batch_futures_order.py | 909 --- gate_api/models/batch_order.py | 1173 --- gate_api/models/borrow_currency_info.py | 235 - gate_api/models/broker_commission.py | 151 - gate_api/models/broker_commission1.py | 347 - gate_api/models/broker_transaction.py | 151 - gate_api/models/broker_transaction1.py | 319 - gate_api/models/cancel_batch_order.py | 209 - gate_api/models/cancel_order_result.py | 291 - gate_api/models/collateral_adjust.py | 181 - gate_api/models/collateral_adjust_res.py | 151 - gate_api/models/collateral_align.py | 211 - gate_api/models/collateral_currency.py | 151 - gate_api/models/collateral_currency_info.py | 207 - gate_api/models/collateral_currency_res.py | 235 - gate_api/models/collateral_current_rate.py | 151 - gate_api/models/collateral_fix_rate.py | 207 - gate_api/models/collateral_loan_currency.py | 151 - gate_api/models/collateral_ltv.py | 179 - gate_api/models/collateral_order.py | 543 -- gate_api/models/collateral_record.py | 375 - gate_api/models/contract.py | 1115 --- gate_api/models/contract_stat.py | 459 -- gate_api/models/convert_small_balance.py | 151 - .../countdown_cancel_all_futures_task.py | 152 - .../countdown_cancel_all_options_task.py | 180 - .../models/countdown_cancel_all_spot_task.py | 152 - gate_api/models/create_collateral_order.py | 211 - .../models/create_multi_collateral_order.py | 349 - gate_api/models/create_uni_lend.py | 216 - gate_api/models/create_uni_loan.py | 245 - gate_api/models/cross_margin_account.py | 569 -- gate_api/models/cross_margin_account_book.py | 263 - gate_api/models/cross_margin_balance.py | 347 - gate_api/models/cross_margin_balance1.py | 207 - gate_api/models/cross_margin_currency.py | 375 - gate_api/models/cross_margin_loan.py | 383 - gate_api/models/cross_margin_repay_request.py | 153 - gate_api/models/cross_margin_repayment.py | 291 - gate_api/models/cross_margin_transferable.py | 151 - gate_api/models/currency.py | 375 - gate_api/models/currency_chain.py | 319 - gate_api/models/currency_pair.py | 549 -- gate_api/models/currency_quota.py | 235 - gate_api/models/debit_fee.py | 124 - gate_api/models/delivery_candlestick.py | 263 - gate_api/models/delivery_contract.py | 1177 ---- gate_api/models/delivery_settlement.py | 347 - gate_api/models/deposit_address.py | 179 - gate_api/models/dual_get_orders.py | 571 -- gate_api/models/dual_get_plans.py | 459 -- gate_api/models/eth2_rate_list.py | 179 - gate_api/models/eth2_swap.py | 153 - gate_api/models/flash_swap_currency_pair.py | 291 - gate_api/models/flash_swap_order.py | 347 - gate_api/models/flash_swap_order_preview.py | 263 - gate_api/models/flash_swap_order_request.py | 240 - gate_api/models/flash_swap_preview_request.py | 209 - gate_api/models/funding_account.py | 235 - gate_api/models/funding_rate_record.py | 151 - gate_api/models/future_cancel_order_result.py | 207 - gate_api/models/futures_account.py | 793 --- gate_api/models/futures_account_book.py | 325 - gate_api/models/futures_account_history.py | 375 - gate_api/models/futures_auto_deleverage.py | 375 - .../futures_batch_amend_order_request.py | 235 - gate_api/models/futures_candlestick.py | 291 - gate_api/models/futures_fee.py | 151 - gate_api/models/futures_index_constituents.py | 151 - gate_api/models/futures_initial_order.py | 383 - gate_api/models/futures_limit_risk_tiers.py | 263 - gate_api/models/futures_liq_order.py | 291 - gate_api/models/futures_liquidate.py | 431 -- gate_api/models/futures_order.py | 883 --- gate_api/models/futures_order_amendment.py | 235 - gate_api/models/futures_order_book.py | 237 - gate_api/models/futures_order_book_item.py | 151 - gate_api/models/futures_premium_index.py | 235 - gate_api/models/futures_price_trigger.py | 253 - .../models/futures_price_triggered_order.py | 441 -- gate_api/models/futures_ticker.py | 739 -- gate_api/models/futures_trade.py | 291 - gate_api/models/index_constituent.py | 151 - gate_api/models/insurance_record.py | 151 - gate_api/models/ledger_record.py | 378 - gate_api/models/liquidate_order.py | 238 - gate_api/models/margin_account.py | 315 - gate_api/models/margin_account_book.py | 319 - gate_api/models/margin_account_currency.py | 235 - gate_api/models/margin_leverage_tier.py | 179 - gate_api/models/margin_market_leverage.py | 152 - gate_api/models/margin_tiers.py | 235 - gate_api/models/margin_transferable.py | 179 - gate_api/models/max_uni_borrowable.py | 181 - gate_api/models/mock_futures_order.py | 182 - gate_api/models/mock_futures_position.py | 153 - gate_api/models/mock_margin_result.py | 291 - gate_api/models/mock_options_order.py | 182 - gate_api/models/mock_options_position.py | 153 - gate_api/models/mock_risk_unit.py | 347 - gate_api/models/mock_spot_balance.py | 153 - gate_api/models/mock_spot_order.py | 239 - gate_api/models/multi_chain_address_item.py | 235 - gate_api/models/multi_collateral_currency.py | 151 - gate_api/models/multi_collateral_item.py | 179 - gate_api/models/multi_collateral_order.py | 487 -- gate_api/models/multi_collateral_record.py | 291 - .../multi_collateral_record_currency.py | 263 - gate_api/models/multi_loan_item.py | 151 - gate_api/models/multi_loan_repay_item.py | 179 - gate_api/models/multi_repay_record.py | 431 -- gate_api/models/multi_repay_resp.py | 151 - gate_api/models/my_futures_trade.py | 409 -- .../models/my_futures_trade_time_range.py | 409 -- gate_api/models/open_orders.py | 177 - gate_api/models/options_account.py | 633 -- gate_api/models/options_account_book.py | 235 - gate_api/models/options_candlestick.py | 263 - gate_api/models/options_contract.py | 795 --- gate_api/models/options_mmp.py | 296 - gate_api/models/options_mmp_reset.py | 292 - gate_api/models/options_my_settlements.py | 347 - gate_api/models/options_my_trade.py | 325 - gate_api/models/options_order.py | 815 --- gate_api/models/options_position.py | 540 -- gate_api/models/options_position_close.py | 269 - .../models/options_position_close_order.py | 179 - gate_api/models/options_settlement.py | 263 - gate_api/models/options_ticker.py | 599 -- gate_api/models/options_underlying.py | 151 - gate_api/models/options_underlying_ticker.py | 179 - gate_api/models/order.py | 1142 --- gate_api/models/order_book.py | 237 - gate_api/models/order_cancel.py | 1226 ---- gate_api/models/order_patch.py | 266 - gate_api/models/order_resp.py | 123 - gate_api/models/partner_commission_history.py | 151 - gate_api/models/partner_sub.py | 179 - gate_api/models/partner_sub_list.py | 151 - .../models/partner_transaction_history.py | 151 - gate_api/models/patch_uni_lend.py | 151 - .../models/place_dual_investment_order.py | 237 - gate_api/models/position.py | 966 --- gate_api/models/position_close.py | 465 -- gate_api/models/position_close_order.py | 179 - gate_api/models/profit_loss_range.py | 179 - gate_api/models/rebate_user_info.py | 123 - gate_api/models/repay_currency_res.py | 263 - gate_api/models/repay_loan.py | 182 - gate_api/models/repay_multi_loan.py | 153 - gate_api/models/repay_record.py | 459 -- gate_api/models/repay_record_currency.py | 263 - gate_api/models/repay_record_left_interest.py | 263 - .../models/repay_record_repaid_currency.py | 263 - .../models/repay_record_total_interest.py | 207 - gate_api/models/repay_resp.py | 151 - gate_api/models/risk_units.py | 319 - gate_api/models/saved_address.py | 263 - gate_api/models/small_balance.py | 207 - gate_api/models/small_balance_history.py | 235 - gate_api/models/spot_account.py | 207 - gate_api/models/spot_account_book.py | 319 - gate_api/models/spot_currency_chain.py | 235 - gate_api/models/spot_fee.py | 375 - gate_api/models/spot_insurance_history.py | 179 - gate_api/models/spot_price_put_order.py | 375 - gate_api/models/spot_price_trigger.py | 188 - gate_api/models/spot_price_triggered_order.py | 374 - gate_api/models/stp_group.py | 208 - gate_api/models/stp_group_user.py | 179 - gate_api/models/structured_buy.py | 151 - .../models/structured_get_project_list.py | 431 -- gate_api/models/structured_order_list.py | 291 - gate_api/models/sub_account.py | 320 - gate_api/models/sub_account_balance.py | 151 - .../sub_account_cross_margin_balance.py | 151 - .../models/sub_account_futures_balance.py | 151 - gate_api/models/sub_account_key.py | 373 - gate_api/models/sub_account_key_perms.py | 151 - gate_api/models/sub_account_margin_balance.py | 151 - gate_api/models/sub_account_to_sub_account.py | 297 - gate_api/models/sub_account_transfer.py | 351 - gate_api/models/sub_cross_margin_account.py | 541 -- gate_api/models/sub_user_mode.py | 179 - gate_api/models/system_time.py | 123 - gate_api/models/ticker.py | 568 -- gate_api/models/total_balance.py | 149 - gate_api/models/trade.py | 555 -- gate_api/models/trade_fee.py | 459 -- gate_api/models/transaction_id.py | 123 - gate_api/models/transfer.py | 279 - gate_api/models/transfer_order_status.py | 151 - gate_api/models/transferables_result.py | 151 - gate_api/models/trigger_order_response.py | 123 - gate_api/models/trigger_time.py | 123 - gate_api/models/uid_push_order.py | 347 - gate_api/models/uid_push_withdrawal.py | 182 - gate_api/models/uid_push_withdrawal_resp.py | 123 - gate_api/models/uni_currency.py | 235 - gate_api/models/uni_currency_interest.py | 151 - gate_api/models/uni_currency_pair.py | 207 - gate_api/models/uni_interest_mode.py | 153 - gate_api/models/uni_interest_record.py | 263 - gate_api/models/uni_lend.py | 375 - gate_api/models/uni_lend_interest.py | 151 - gate_api/models/uni_lend_record.py | 291 - gate_api/models/uni_loan.py | 263 - gate_api/models/uni_loan_interest_record.py | 291 - gate_api/models/uni_loan_record.py | 235 - gate_api/models/unified_account.py | 625 -- gate_api/models/unified_balance.py | 627 -- gate_api/models/unified_borrowable.py | 151 - gate_api/models/unified_currency.py | 263 - gate_api/models/unified_discount.py | 151 - gate_api/models/unified_discount_tiers.py | 235 - gate_api/models/unified_history_loan_rate.py | 207 - .../models/unified_history_loan_rate_rates.py | 151 - gate_api/models/unified_leverage_config.py | 291 - gate_api/models/unified_leverage_setting.py | 153 - gate_api/models/unified_loan.py | 244 - gate_api/models/unified_loan_record.py | 319 - gate_api/models/unified_loan_result.py | 123 - gate_api/models/unified_margin_tiers.py | 151 - gate_api/models/unified_mode_set.py | 150 - gate_api/models/unified_portfolio_input.py | 291 - gate_api/models/unified_portfolio_output.py | 207 - gate_api/models/unified_risk_units.py | 179 - gate_api/models/unified_settings.py | 207 - gate_api/models/unified_transferable.py | 151 - gate_api/models/user_ltv_info.py | 291 - gate_api/models/user_sub.py | 207 - gate_api/models/user_sub_relation.py | 123 - gate_api/models/user_total_amount.py | 151 - gate_api/models/withdraw_status.py | 431 -- gate_api/models/withdrawal_record.py | 434 -- gate_api/rest.py | 291 - git_push.sh | 58 - requirements.txt | 6 - setup.cfg | 13 - setup.py | 38 - test-requirements.txt | 3 - tox.ini | 9 - 543 files changed, 134066 deletions(-) delete mode 100644 .gitignore delete mode 100644 .gitlab-ci.yml delete mode 100644 .travis.yml delete mode 100644 README.md delete mode 100644 docs/AccountApi.md delete mode 100644 docs/AccountBalance.md delete mode 100644 docs/AccountDetail.md delete mode 100644 docs/AccountDetailKey.md delete mode 100644 docs/AccountRateLimit.md delete mode 100644 docs/AgencyCommission.md delete mode 100644 docs/AgencyCommissionHistory.md delete mode 100644 docs/AgencyTransaction.md delete mode 100644 docs/AgencyTransactionHistory.md delete mode 100644 docs/AutoRepaySetting.md delete mode 100644 docs/BatchAmendItem.md delete mode 100644 docs/BatchAmendOrderReq.md delete mode 100644 docs/BatchFuturesOrder.md delete mode 100644 docs/BatchOrder.md delete mode 100644 docs/BorrowCurrencyInfo.md delete mode 100644 docs/BrokerCommission.md delete mode 100644 docs/BrokerCommission1.md delete mode 100644 docs/BrokerTransaction.md delete mode 100644 docs/BrokerTransaction1.md delete mode 100644 docs/CancelBatchOrder.md delete mode 100644 docs/CancelOrderResult.md delete mode 100644 docs/CollateralAdjust.md delete mode 100644 docs/CollateralAdjustRes.md delete mode 100644 docs/CollateralAlign.md delete mode 100644 docs/CollateralCurrency.md delete mode 100644 docs/CollateralCurrencyInfo.md delete mode 100644 docs/CollateralCurrencyRes.md delete mode 100644 docs/CollateralCurrentRate.md delete mode 100644 docs/CollateralFixRate.md delete mode 100644 docs/CollateralLoanApi.md delete mode 100644 docs/CollateralLoanCurrency.md delete mode 100644 docs/CollateralLtv.md delete mode 100644 docs/CollateralOrder.md delete mode 100644 docs/CollateralRecord.md delete mode 100644 docs/Contract.md delete mode 100644 docs/ContractStat.md delete mode 100644 docs/ConvertSmallBalance.md delete mode 100644 docs/CountdownCancelAllFuturesTask.md delete mode 100644 docs/CountdownCancelAllOptionsTask.md delete mode 100644 docs/CountdownCancelAllSpotTask.md delete mode 100644 docs/CreateCollateralOrder.md delete mode 100644 docs/CreateMultiCollateralOrder.md delete mode 100644 docs/CreateUniLend.md delete mode 100644 docs/CreateUniLoan.md delete mode 100644 docs/CrossMarginAccount.md delete mode 100644 docs/CrossMarginAccountBook.md delete mode 100644 docs/CrossMarginBalance.md delete mode 100644 docs/CrossMarginBalance1.md delete mode 100644 docs/CrossMarginCurrency.md delete mode 100644 docs/CrossMarginLoan.md delete mode 100644 docs/CrossMarginRepayRequest.md delete mode 100644 docs/CrossMarginRepayment.md delete mode 100644 docs/CrossMarginTransferable.md delete mode 100644 docs/Currency.md delete mode 100644 docs/CurrencyChain.md delete mode 100644 docs/CurrencyPair.md delete mode 100644 docs/CurrencyQuota.md delete mode 100644 docs/DebitFee.md delete mode 100644 docs/DeliveryApi.md delete mode 100644 docs/DeliveryCandlestick.md delete mode 100644 docs/DeliveryContract.md delete mode 100644 docs/DeliverySettlement.md delete mode 100644 docs/DepositAddress.md delete mode 100644 docs/DualGetOrders.md delete mode 100644 docs/DualGetPlans.md delete mode 100644 docs/EarnApi.md delete mode 100644 docs/EarnUniApi.md delete mode 100644 docs/Eth2RateList.md delete mode 100644 docs/Eth2Swap.md delete mode 100644 docs/FlashSwapApi.md delete mode 100644 docs/FlashSwapCurrencyPair.md delete mode 100644 docs/FlashSwapOrder.md delete mode 100644 docs/FlashSwapOrderPreview.md delete mode 100644 docs/FlashSwapOrderRequest.md delete mode 100644 docs/FlashSwapPreviewRequest.md delete mode 100644 docs/FundingAccount.md delete mode 100644 docs/FundingRateRecord.md delete mode 100644 docs/FutureCancelOrderResult.md delete mode 100644 docs/FuturesAccount.md delete mode 100644 docs/FuturesAccountBook.md delete mode 100644 docs/FuturesAccountHistory.md delete mode 100644 docs/FuturesApi.md delete mode 100644 docs/FuturesAutoDeleverage.md delete mode 100644 docs/FuturesBatchAmendOrderRequest.md delete mode 100644 docs/FuturesCandlestick.md delete mode 100644 docs/FuturesFee.md delete mode 100644 docs/FuturesIndexConstituents.md delete mode 100644 docs/FuturesInitialOrder.md delete mode 100644 docs/FuturesLimitRiskTiers.md delete mode 100644 docs/FuturesLiqOrder.md delete mode 100644 docs/FuturesLiquidate.md delete mode 100644 docs/FuturesOrder.md delete mode 100644 docs/FuturesOrderAmendment.md delete mode 100644 docs/FuturesOrderBook.md delete mode 100644 docs/FuturesOrderBookItem.md delete mode 100644 docs/FuturesPremiumIndex.md delete mode 100644 docs/FuturesPriceTrigger.md delete mode 100644 docs/FuturesPriceTriggeredOrder.md delete mode 100644 docs/FuturesTicker.md delete mode 100644 docs/FuturesTrade.md delete mode 100644 docs/IndexConstituent.md delete mode 100644 docs/InsuranceRecord.md delete mode 100644 docs/LedgerRecord.md delete mode 100644 docs/LiquidateOrder.md delete mode 100644 docs/MarginAccount.md delete mode 100644 docs/MarginAccountBook.md delete mode 100644 docs/MarginAccountCurrency.md delete mode 100644 docs/MarginApi.md delete mode 100644 docs/MarginLeverageTier.md delete mode 100644 docs/MarginMarketLeverage.md delete mode 100644 docs/MarginTiers.md delete mode 100644 docs/MarginTransferable.md delete mode 100644 docs/MarginUniApi.md delete mode 100644 docs/MaxUniBorrowable.md delete mode 100644 docs/MockFuturesOrder.md delete mode 100644 docs/MockFuturesPosition.md delete mode 100644 docs/MockMarginResult.md delete mode 100644 docs/MockOptionsOrder.md delete mode 100644 docs/MockOptionsPosition.md delete mode 100644 docs/MockRiskUnit.md delete mode 100644 docs/MockSpotBalance.md delete mode 100644 docs/MockSpotOrder.md delete mode 100644 docs/MultiChainAddressItem.md delete mode 100644 docs/MultiCollateralCurrency.md delete mode 100644 docs/MultiCollateralItem.md delete mode 100644 docs/MultiCollateralLoanApi.md delete mode 100644 docs/MultiCollateralOrder.md delete mode 100644 docs/MultiCollateralRecord.md delete mode 100644 docs/MultiCollateralRecordCurrency.md delete mode 100644 docs/MultiLoanItem.md delete mode 100644 docs/MultiLoanRepayItem.md delete mode 100644 docs/MultiRepayRecord.md delete mode 100644 docs/MultiRepayResp.md delete mode 100644 docs/MyFuturesTrade.md delete mode 100644 docs/MyFuturesTradeTimeRange.md delete mode 100644 docs/OpenOrders.md delete mode 100644 docs/OptionsAccount.md delete mode 100644 docs/OptionsAccountBook.md delete mode 100644 docs/OptionsApi.md delete mode 100644 docs/OptionsCandlestick.md delete mode 100644 docs/OptionsContract.md delete mode 100644 docs/OptionsMMP.md delete mode 100644 docs/OptionsMMPReset.md delete mode 100644 docs/OptionsMySettlements.md delete mode 100644 docs/OptionsMyTrade.md delete mode 100644 docs/OptionsOrder.md delete mode 100644 docs/OptionsPosition.md delete mode 100644 docs/OptionsPositionClose.md delete mode 100644 docs/OptionsPositionCloseOrder.md delete mode 100644 docs/OptionsSettlement.md delete mode 100644 docs/OptionsTicker.md delete mode 100644 docs/OptionsUnderlying.md delete mode 100644 docs/OptionsUnderlyingTicker.md delete mode 100644 docs/Order.md delete mode 100644 docs/OrderBook.md delete mode 100644 docs/OrderCancel.md delete mode 100644 docs/OrderPatch.md delete mode 100644 docs/OrderResp.md delete mode 100644 docs/PartnerCommissionHistory.md delete mode 100644 docs/PartnerSub.md delete mode 100644 docs/PartnerSubList.md delete mode 100644 docs/PartnerTransactionHistory.md delete mode 100644 docs/PatchUniLend.md delete mode 100644 docs/PlaceDualInvestmentOrder.md delete mode 100644 docs/Position.md delete mode 100644 docs/PositionClose.md delete mode 100644 docs/PositionCloseOrder.md delete mode 100644 docs/ProfitLossRange.md delete mode 100644 docs/RebateApi.md delete mode 100644 docs/RebateUserInfo.md delete mode 100644 docs/RepayCurrencyRes.md delete mode 100644 docs/RepayLoan.md delete mode 100644 docs/RepayMultiLoan.md delete mode 100644 docs/RepayRecord.md delete mode 100644 docs/RepayRecordCurrency.md delete mode 100644 docs/RepayRecordLeftInterest.md delete mode 100644 docs/RepayRecordRepaidCurrency.md delete mode 100644 docs/RepayRecordTotalInterest.md delete mode 100644 docs/RepayResp.md delete mode 100644 docs/RiskUnits.md delete mode 100644 docs/SavedAddress.md delete mode 100644 docs/SmallBalance.md delete mode 100644 docs/SmallBalanceHistory.md delete mode 100644 docs/SpotAccount.md delete mode 100644 docs/SpotAccountBook.md delete mode 100644 docs/SpotApi.md delete mode 100644 docs/SpotCurrencyChain.md delete mode 100644 docs/SpotFee.md delete mode 100644 docs/SpotInsuranceHistory.md delete mode 100644 docs/SpotPricePutOrder.md delete mode 100644 docs/SpotPriceTrigger.md delete mode 100644 docs/SpotPriceTriggeredOrder.md delete mode 100644 docs/StpGroup.md delete mode 100644 docs/StpGroupUser.md delete mode 100644 docs/StructuredBuy.md delete mode 100644 docs/StructuredGetProjectList.md delete mode 100644 docs/StructuredOrderList.md delete mode 100644 docs/SubAccount.md delete mode 100644 docs/SubAccountApi.md delete mode 100644 docs/SubAccountBalance.md delete mode 100644 docs/SubAccountCrossMarginBalance.md delete mode 100644 docs/SubAccountFuturesBalance.md delete mode 100644 docs/SubAccountKey.md delete mode 100644 docs/SubAccountKeyPerms.md delete mode 100644 docs/SubAccountMarginBalance.md delete mode 100644 docs/SubAccountToSubAccount.md delete mode 100644 docs/SubAccountTransfer.md delete mode 100644 docs/SubCrossMarginAccount.md delete mode 100644 docs/SubUserMode.md delete mode 100644 docs/SystemTime.md delete mode 100644 docs/Ticker.md delete mode 100644 docs/TotalBalance.md delete mode 100644 docs/Trade.md delete mode 100644 docs/TradeFee.md delete mode 100644 docs/TransactionID.md delete mode 100644 docs/Transfer.md delete mode 100644 docs/TransferOrderStatus.md delete mode 100644 docs/TransferablesResult.md delete mode 100644 docs/TriggerOrderResponse.md delete mode 100644 docs/TriggerTime.md delete mode 100644 docs/UidPushOrder.md delete mode 100644 docs/UidPushWithdrawal.md delete mode 100644 docs/UidPushWithdrawalResp.md delete mode 100644 docs/UniCurrency.md delete mode 100644 docs/UniCurrencyInterest.md delete mode 100644 docs/UniCurrencyPair.md delete mode 100644 docs/UniInterestMode.md delete mode 100644 docs/UniInterestRecord.md delete mode 100644 docs/UniLend.md delete mode 100644 docs/UniLendInterest.md delete mode 100644 docs/UniLendRecord.md delete mode 100644 docs/UniLoan.md delete mode 100644 docs/UniLoanInterestRecord.md delete mode 100644 docs/UniLoanRecord.md delete mode 100644 docs/UnifiedAccount.md delete mode 100644 docs/UnifiedApi.md delete mode 100644 docs/UnifiedBalance.md delete mode 100644 docs/UnifiedBorrowable.md delete mode 100644 docs/UnifiedCurrency.md delete mode 100644 docs/UnifiedDiscount.md delete mode 100644 docs/UnifiedDiscountTiers.md delete mode 100644 docs/UnifiedHistoryLoanRate.md delete mode 100644 docs/UnifiedHistoryLoanRateRates.md delete mode 100644 docs/UnifiedLeverageConfig.md delete mode 100644 docs/UnifiedLeverageSetting.md delete mode 100644 docs/UnifiedLoan.md delete mode 100644 docs/UnifiedLoanRecord.md delete mode 100644 docs/UnifiedLoanResult.md delete mode 100644 docs/UnifiedMarginTiers.md delete mode 100644 docs/UnifiedModeSet.md delete mode 100644 docs/UnifiedPortfolioInput.md delete mode 100644 docs/UnifiedPortfolioOutput.md delete mode 100644 docs/UnifiedRiskUnits.md delete mode 100644 docs/UnifiedSettings.md delete mode 100644 docs/UnifiedTransferable.md delete mode 100644 docs/UserLtvInfo.md delete mode 100644 docs/UserSub.md delete mode 100644 docs/UserSubRelation.md delete mode 100644 docs/UserTotalAmount.md delete mode 100644 docs/WalletApi.md delete mode 100644 docs/WithdrawStatus.md delete mode 100644 docs/WithdrawalApi.md delete mode 100644 docs/WithdrawalRecord.md delete mode 100644 gate_api/__init__.py delete mode 100644 gate_api/api/__init__.py delete mode 100644 gate_api/api/account_api.py delete mode 100644 gate_api/api/collateral_loan_api.py delete mode 100644 gate_api/api/delivery_api.py delete mode 100644 gate_api/api/earn_api.py delete mode 100644 gate_api/api/earn_uni_api.py delete mode 100644 gate_api/api/flash_swap_api.py delete mode 100644 gate_api/api/futures_api.py delete mode 100644 gate_api/api/margin_api.py delete mode 100644 gate_api/api/margin_uni_api.py delete mode 100644 gate_api/api/multi_collateral_loan_api.py delete mode 100644 gate_api/api/options_api.py delete mode 100644 gate_api/api/rebate_api.py delete mode 100644 gate_api/api/spot_api.py delete mode 100644 gate_api/api/sub_account_api.py delete mode 100644 gate_api/api/unified_api.py delete mode 100644 gate_api/api/wallet_api.py delete mode 100644 gate_api/api/withdrawal_api.py delete mode 100644 gate_api/api_client.py delete mode 100644 gate_api/configuration.py delete mode 100644 gate_api/exceptions.py delete mode 100644 gate_api/models/__init__.py delete mode 100644 gate_api/models/account_balance.py delete mode 100644 gate_api/models/account_detail.py delete mode 100644 gate_api/models/account_detail_key.py delete mode 100644 gate_api/models/account_rate_limit.py delete mode 100644 gate_api/models/agency_commission.py delete mode 100644 gate_api/models/agency_commission_history.py delete mode 100644 gate_api/models/agency_transaction.py delete mode 100644 gate_api/models/agency_transaction_history.py delete mode 100644 gate_api/models/auto_repay_setting.py delete mode 100644 gate_api/models/batch_amend_item.py delete mode 100644 gate_api/models/batch_amend_order_req.py delete mode 100644 gate_api/models/batch_futures_order.py delete mode 100644 gate_api/models/batch_order.py delete mode 100644 gate_api/models/borrow_currency_info.py delete mode 100644 gate_api/models/broker_commission.py delete mode 100644 gate_api/models/broker_commission1.py delete mode 100644 gate_api/models/broker_transaction.py delete mode 100644 gate_api/models/broker_transaction1.py delete mode 100644 gate_api/models/cancel_batch_order.py delete mode 100644 gate_api/models/cancel_order_result.py delete mode 100644 gate_api/models/collateral_adjust.py delete mode 100644 gate_api/models/collateral_adjust_res.py delete mode 100644 gate_api/models/collateral_align.py delete mode 100644 gate_api/models/collateral_currency.py delete mode 100644 gate_api/models/collateral_currency_info.py delete mode 100644 gate_api/models/collateral_currency_res.py delete mode 100644 gate_api/models/collateral_current_rate.py delete mode 100644 gate_api/models/collateral_fix_rate.py delete mode 100644 gate_api/models/collateral_loan_currency.py delete mode 100644 gate_api/models/collateral_ltv.py delete mode 100644 gate_api/models/collateral_order.py delete mode 100644 gate_api/models/collateral_record.py delete mode 100644 gate_api/models/contract.py delete mode 100644 gate_api/models/contract_stat.py delete mode 100644 gate_api/models/convert_small_balance.py delete mode 100644 gate_api/models/countdown_cancel_all_futures_task.py delete mode 100644 gate_api/models/countdown_cancel_all_options_task.py delete mode 100644 gate_api/models/countdown_cancel_all_spot_task.py delete mode 100644 gate_api/models/create_collateral_order.py delete mode 100644 gate_api/models/create_multi_collateral_order.py delete mode 100644 gate_api/models/create_uni_lend.py delete mode 100644 gate_api/models/create_uni_loan.py delete mode 100644 gate_api/models/cross_margin_account.py delete mode 100644 gate_api/models/cross_margin_account_book.py delete mode 100644 gate_api/models/cross_margin_balance.py delete mode 100644 gate_api/models/cross_margin_balance1.py delete mode 100644 gate_api/models/cross_margin_currency.py delete mode 100644 gate_api/models/cross_margin_loan.py delete mode 100644 gate_api/models/cross_margin_repay_request.py delete mode 100644 gate_api/models/cross_margin_repayment.py delete mode 100644 gate_api/models/cross_margin_transferable.py delete mode 100644 gate_api/models/currency.py delete mode 100644 gate_api/models/currency_chain.py delete mode 100644 gate_api/models/currency_pair.py delete mode 100644 gate_api/models/currency_quota.py delete mode 100644 gate_api/models/debit_fee.py delete mode 100644 gate_api/models/delivery_candlestick.py delete mode 100644 gate_api/models/delivery_contract.py delete mode 100644 gate_api/models/delivery_settlement.py delete mode 100644 gate_api/models/deposit_address.py delete mode 100644 gate_api/models/dual_get_orders.py delete mode 100644 gate_api/models/dual_get_plans.py delete mode 100644 gate_api/models/eth2_rate_list.py delete mode 100644 gate_api/models/eth2_swap.py delete mode 100644 gate_api/models/flash_swap_currency_pair.py delete mode 100644 gate_api/models/flash_swap_order.py delete mode 100644 gate_api/models/flash_swap_order_preview.py delete mode 100644 gate_api/models/flash_swap_order_request.py delete mode 100644 gate_api/models/flash_swap_preview_request.py delete mode 100644 gate_api/models/funding_account.py delete mode 100644 gate_api/models/funding_rate_record.py delete mode 100644 gate_api/models/future_cancel_order_result.py delete mode 100644 gate_api/models/futures_account.py delete mode 100644 gate_api/models/futures_account_book.py delete mode 100644 gate_api/models/futures_account_history.py delete mode 100644 gate_api/models/futures_auto_deleverage.py delete mode 100644 gate_api/models/futures_batch_amend_order_request.py delete mode 100644 gate_api/models/futures_candlestick.py delete mode 100644 gate_api/models/futures_fee.py delete mode 100644 gate_api/models/futures_index_constituents.py delete mode 100644 gate_api/models/futures_initial_order.py delete mode 100644 gate_api/models/futures_limit_risk_tiers.py delete mode 100644 gate_api/models/futures_liq_order.py delete mode 100644 gate_api/models/futures_liquidate.py delete mode 100644 gate_api/models/futures_order.py delete mode 100644 gate_api/models/futures_order_amendment.py delete mode 100644 gate_api/models/futures_order_book.py delete mode 100644 gate_api/models/futures_order_book_item.py delete mode 100644 gate_api/models/futures_premium_index.py delete mode 100644 gate_api/models/futures_price_trigger.py delete mode 100644 gate_api/models/futures_price_triggered_order.py delete mode 100644 gate_api/models/futures_ticker.py delete mode 100644 gate_api/models/futures_trade.py delete mode 100644 gate_api/models/index_constituent.py delete mode 100644 gate_api/models/insurance_record.py delete mode 100644 gate_api/models/ledger_record.py delete mode 100644 gate_api/models/liquidate_order.py delete mode 100644 gate_api/models/margin_account.py delete mode 100644 gate_api/models/margin_account_book.py delete mode 100644 gate_api/models/margin_account_currency.py delete mode 100644 gate_api/models/margin_leverage_tier.py delete mode 100644 gate_api/models/margin_market_leverage.py delete mode 100644 gate_api/models/margin_tiers.py delete mode 100644 gate_api/models/margin_transferable.py delete mode 100644 gate_api/models/max_uni_borrowable.py delete mode 100644 gate_api/models/mock_futures_order.py delete mode 100644 gate_api/models/mock_futures_position.py delete mode 100644 gate_api/models/mock_margin_result.py delete mode 100644 gate_api/models/mock_options_order.py delete mode 100644 gate_api/models/mock_options_position.py delete mode 100644 gate_api/models/mock_risk_unit.py delete mode 100644 gate_api/models/mock_spot_balance.py delete mode 100644 gate_api/models/mock_spot_order.py delete mode 100644 gate_api/models/multi_chain_address_item.py delete mode 100644 gate_api/models/multi_collateral_currency.py delete mode 100644 gate_api/models/multi_collateral_item.py delete mode 100644 gate_api/models/multi_collateral_order.py delete mode 100644 gate_api/models/multi_collateral_record.py delete mode 100644 gate_api/models/multi_collateral_record_currency.py delete mode 100644 gate_api/models/multi_loan_item.py delete mode 100644 gate_api/models/multi_loan_repay_item.py delete mode 100644 gate_api/models/multi_repay_record.py delete mode 100644 gate_api/models/multi_repay_resp.py delete mode 100644 gate_api/models/my_futures_trade.py delete mode 100644 gate_api/models/my_futures_trade_time_range.py delete mode 100644 gate_api/models/open_orders.py delete mode 100644 gate_api/models/options_account.py delete mode 100644 gate_api/models/options_account_book.py delete mode 100644 gate_api/models/options_candlestick.py delete mode 100644 gate_api/models/options_contract.py delete mode 100644 gate_api/models/options_mmp.py delete mode 100644 gate_api/models/options_mmp_reset.py delete mode 100644 gate_api/models/options_my_settlements.py delete mode 100644 gate_api/models/options_my_trade.py delete mode 100644 gate_api/models/options_order.py delete mode 100644 gate_api/models/options_position.py delete mode 100644 gate_api/models/options_position_close.py delete mode 100644 gate_api/models/options_position_close_order.py delete mode 100644 gate_api/models/options_settlement.py delete mode 100644 gate_api/models/options_ticker.py delete mode 100644 gate_api/models/options_underlying.py delete mode 100644 gate_api/models/options_underlying_ticker.py delete mode 100644 gate_api/models/order.py delete mode 100644 gate_api/models/order_book.py delete mode 100644 gate_api/models/order_cancel.py delete mode 100644 gate_api/models/order_patch.py delete mode 100644 gate_api/models/order_resp.py delete mode 100644 gate_api/models/partner_commission_history.py delete mode 100644 gate_api/models/partner_sub.py delete mode 100644 gate_api/models/partner_sub_list.py delete mode 100644 gate_api/models/partner_transaction_history.py delete mode 100644 gate_api/models/patch_uni_lend.py delete mode 100644 gate_api/models/place_dual_investment_order.py delete mode 100644 gate_api/models/position.py delete mode 100644 gate_api/models/position_close.py delete mode 100644 gate_api/models/position_close_order.py delete mode 100644 gate_api/models/profit_loss_range.py delete mode 100644 gate_api/models/rebate_user_info.py delete mode 100644 gate_api/models/repay_currency_res.py delete mode 100644 gate_api/models/repay_loan.py delete mode 100644 gate_api/models/repay_multi_loan.py delete mode 100644 gate_api/models/repay_record.py delete mode 100644 gate_api/models/repay_record_currency.py delete mode 100644 gate_api/models/repay_record_left_interest.py delete mode 100644 gate_api/models/repay_record_repaid_currency.py delete mode 100644 gate_api/models/repay_record_total_interest.py delete mode 100644 gate_api/models/repay_resp.py delete mode 100644 gate_api/models/risk_units.py delete mode 100644 gate_api/models/saved_address.py delete mode 100644 gate_api/models/small_balance.py delete mode 100644 gate_api/models/small_balance_history.py delete mode 100644 gate_api/models/spot_account.py delete mode 100644 gate_api/models/spot_account_book.py delete mode 100644 gate_api/models/spot_currency_chain.py delete mode 100644 gate_api/models/spot_fee.py delete mode 100644 gate_api/models/spot_insurance_history.py delete mode 100644 gate_api/models/spot_price_put_order.py delete mode 100644 gate_api/models/spot_price_trigger.py delete mode 100644 gate_api/models/spot_price_triggered_order.py delete mode 100644 gate_api/models/stp_group.py delete mode 100644 gate_api/models/stp_group_user.py delete mode 100644 gate_api/models/structured_buy.py delete mode 100644 gate_api/models/structured_get_project_list.py delete mode 100644 gate_api/models/structured_order_list.py delete mode 100644 gate_api/models/sub_account.py delete mode 100644 gate_api/models/sub_account_balance.py delete mode 100644 gate_api/models/sub_account_cross_margin_balance.py delete mode 100644 gate_api/models/sub_account_futures_balance.py delete mode 100644 gate_api/models/sub_account_key.py delete mode 100644 gate_api/models/sub_account_key_perms.py delete mode 100644 gate_api/models/sub_account_margin_balance.py delete mode 100644 gate_api/models/sub_account_to_sub_account.py delete mode 100644 gate_api/models/sub_account_transfer.py delete mode 100644 gate_api/models/sub_cross_margin_account.py delete mode 100644 gate_api/models/sub_user_mode.py delete mode 100644 gate_api/models/system_time.py delete mode 100644 gate_api/models/ticker.py delete mode 100644 gate_api/models/total_balance.py delete mode 100644 gate_api/models/trade.py delete mode 100644 gate_api/models/trade_fee.py delete mode 100644 gate_api/models/transaction_id.py delete mode 100644 gate_api/models/transfer.py delete mode 100644 gate_api/models/transfer_order_status.py delete mode 100644 gate_api/models/transferables_result.py delete mode 100644 gate_api/models/trigger_order_response.py delete mode 100644 gate_api/models/trigger_time.py delete mode 100644 gate_api/models/uid_push_order.py delete mode 100644 gate_api/models/uid_push_withdrawal.py delete mode 100644 gate_api/models/uid_push_withdrawal_resp.py delete mode 100644 gate_api/models/uni_currency.py delete mode 100644 gate_api/models/uni_currency_interest.py delete mode 100644 gate_api/models/uni_currency_pair.py delete mode 100644 gate_api/models/uni_interest_mode.py delete mode 100644 gate_api/models/uni_interest_record.py delete mode 100644 gate_api/models/uni_lend.py delete mode 100644 gate_api/models/uni_lend_interest.py delete mode 100644 gate_api/models/uni_lend_record.py delete mode 100644 gate_api/models/uni_loan.py delete mode 100644 gate_api/models/uni_loan_interest_record.py delete mode 100644 gate_api/models/uni_loan_record.py delete mode 100644 gate_api/models/unified_account.py delete mode 100644 gate_api/models/unified_balance.py delete mode 100644 gate_api/models/unified_borrowable.py delete mode 100644 gate_api/models/unified_currency.py delete mode 100644 gate_api/models/unified_discount.py delete mode 100644 gate_api/models/unified_discount_tiers.py delete mode 100644 gate_api/models/unified_history_loan_rate.py delete mode 100644 gate_api/models/unified_history_loan_rate_rates.py delete mode 100644 gate_api/models/unified_leverage_config.py delete mode 100644 gate_api/models/unified_leverage_setting.py delete mode 100644 gate_api/models/unified_loan.py delete mode 100644 gate_api/models/unified_loan_record.py delete mode 100644 gate_api/models/unified_loan_result.py delete mode 100644 gate_api/models/unified_margin_tiers.py delete mode 100644 gate_api/models/unified_mode_set.py delete mode 100644 gate_api/models/unified_portfolio_input.py delete mode 100644 gate_api/models/unified_portfolio_output.py delete mode 100644 gate_api/models/unified_risk_units.py delete mode 100644 gate_api/models/unified_settings.py delete mode 100644 gate_api/models/unified_transferable.py delete mode 100644 gate_api/models/user_ltv_info.py delete mode 100644 gate_api/models/user_sub.py delete mode 100644 gate_api/models/user_sub_relation.py delete mode 100644 gate_api/models/user_total_amount.py delete mode 100644 gate_api/models/withdraw_status.py delete mode 100644 gate_api/models/withdrawal_record.py delete mode 100644 gate_api/rest.py delete mode 100644 git_push.sh delete mode 100644 requirements.txt delete mode 100644 setup.cfg delete mode 100644 setup.py delete mode 100644 test-requirements.txt delete mode 100644 tox.ini diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 43995bd..0000000 --- a/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index a086da0..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,33 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.nosetest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=gate_api - -nosetest-2.7: - extends: .nosetest - image: python:2.7-alpine -nosetest-3.3: - extends: .nosetest - image: python:3.3-alpine -nosetest-3.4: - extends: .nosetest - image: python:3.4-alpine -nosetest-3.5: - extends: .nosetest - image: python:3.5-alpine -nosetest-3.6: - extends: .nosetest - image: python:3.6-alpine -nosetest-3.7: - extends: .nosetest - image: python:3.7-alpine -nosetest-3.8: - extends: .nosetest - image: python:3.8-alpine diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4e32d1c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "2.7" - - "3.2" - - "3.3" - - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "3.8" -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=gate_api diff --git a/README.md b/README.md deleted file mode 100644 index 76bc890..0000000 --- a/README.md +++ /dev/null @@ -1,661 +0,0 @@ -# gate-api -Welcome to Gate.io API - -APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 4.96.0 -- Package version: 6.96.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen -For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) - -## Versioning - -Trying our best to follow the [semantic versioning](https://semver.org/), while enjoying recent features -provided by programming language and libraries, from 4.15.2, one major versioning difference will be -introduced: - -If extra code rewrite is required when you upgrade the SDK, such as: - -- some outdated programming language version support is dropped -- API method signature has breaking changes. - -**the MAJOR version will be incremented, but the MINOR and PATCH version are still following REST API's -instead of resetting to 0**, so that you can recognize it has some breaking changes, but still getting -the idea of from which REST API version the change is introduced. - -For example, the previous REST API and SDK version are both 4.14.0. But if we decide to introduce -some breaking changes in SDK along with REST API 4.15.2 upgrade, then the version of next SDK release -will be 5.15.2(the MAJOR version is incremented to denote breaking changes, but the MINOR and PATCH -version are identical to REST API's instead of resetting them to 0) - -If MAJOR version is incremented, make sure you read the release note on -[Releases](https://github.com/gateio/gateapi-python/releases) -page - -## Requirements. - -Python 2.7 and 3.4+ - -## Installation & Usage -### pip install - -You can install directly using: - -```sh -pip install --user gate-api -``` - -Then import the package: -```python -import gate_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import gate_api -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```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.EarnUniApi(api_client) - -try: - # List currencies for lending - api_response = api_instance.list_uni_currencies() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->list_uni_currencies: %s\n" % e) - -``` - -For a more complete API usage example, refer to the demo application in [example](example) directory - -## Documentation for API Endpoints - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending -*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending -*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders -*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem -*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order -*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending -*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency -*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records -*EarnUniApi* | [**switch_interest_reinvest**](docs/EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle -*EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status -*MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market -*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate -*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans -*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay -*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records -*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records -*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable -*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts -*SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account -*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account -*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account -*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account -*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account -*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account -*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account -*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account -*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account -*SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode -*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information -*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account -*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account -*UnifiedApi* | [**get_unified_transferables**](docs/UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. -*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans -*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay -*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records -*UnifiedApi* | [**list_unified_loan_interest_records**](docs/UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records -*UnifiedApi* | [**get_unified_risk_units**](docs/UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details -*UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account -*UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account -*UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate -*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers -*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers -*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator -*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency -*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage -*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account -*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates -*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail -*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information -*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups -*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group -*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group -*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group -*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group -*AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. -*AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. -*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders -*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order -*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order -*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment -*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history -*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records -*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral -*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user -*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio -*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies -*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts -*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract -*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book -*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history -*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks -*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers -*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history -*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account -*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book -*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user -*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position -*DeliveryApi* | [**update_delivery_position_margin**](docs/DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin -*DeliveryApi* | [**update_delivery_position_leverage**](docs/DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage -*DeliveryApi* | [**update_delivery_position_risk_limit**](docs/DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit -*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders -*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order -*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched -*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order -*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order -*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history -*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history -*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history -*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history -*DeliveryApi* | [**list_delivery_risk_limit_tiers**](docs/DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers -*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders -*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order -*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders -*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order -*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order -*EarnApi* | [**swap_eth2**](docs/EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap -*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query -*EarnApi* | [**list_dual_investment_plans**](docs/EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list -*EarnApi* | [**list_dual_orders**](docs/EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list -*EarnApi* | [**place_dual_order**](docs/EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order -*EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List -*EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List -*EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order -*FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap -*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders -*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order -*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail -*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview -*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts -*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract -*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book -*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history -*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks -*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line -*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers -*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history -*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history -*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats -*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents -*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history -*FuturesApi* | [**list_futures_risk_limit_tiers**](docs/FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers -*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account -*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book -*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user -*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position -*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin -*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage -*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit -*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode -*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode -*FuturesApi* | [**update_dual_mode_position_margin**](docs/FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode -*FuturesApi* | [**update_dual_mode_position_leverage**](docs/FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode -*FuturesApi* | [**update_dual_mode_position_risk_limit**](docs/FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode -*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders -*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order -*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched -*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range -*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders -*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order -*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order -*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order -*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history -*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range -*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history -*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history -*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History -*FuturesApi* | [**countdown_cancel_all_futures**](docs/FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders -*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates -*FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list -*FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs -*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders -*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order -*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders -*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order -*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order -*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list -*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history -*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list -*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting -*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting -*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -*MarginApi* | [**list_cross_margin_currencies**](docs/MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) -*MarginApi* | [**get_cross_margin_currency**](docs/MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) -*MarginApi* | [**get_cross_margin_account**](docs/MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) -*MarginApi* | [**list_cross_margin_account_book**](docs/MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) -*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) -*MarginApi* | [**create_cross_margin_loan**](docs/MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) -*MarginApi* | [**get_cross_margin_loan**](docs/MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) -*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) -*MarginApi* | [**repay_cross_margin_loan**](docs/MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) -*MarginApi* | [**get_cross_margin_interest_records**](docs/MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) -*MarginApi* | [**get_cross_margin_transferable**](docs/MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) -*MarginApi* | [**get_cross_margin_estimate_rate**](docs/MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) -*MarginApi* | [**get_cross_margin_borrowable**](docs/MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) -*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list -*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders -*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order -*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail -*MultiCollateralLoanApi* | [**list_multi_repay_records**](docs/MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records -*MultiCollateralLoanApi* | [**repay_multi_collateral_loan**](docs/MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan -*MultiCollateralLoanApi* | [**list_multi_collateral_records**](docs/MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records -*MultiCollateralLoanApi* | [**operate_multi_collateral**](docs/MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral -*MultiCollateralLoanApi* | [**list_user_currency_quota**](docs/MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota -*MultiCollateralLoanApi* | [**list_multi_collateral_currencies**](docs/MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral -*MultiCollateralLoanApi* | [**get_multi_collateral_ltv**](docs/MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio -*MultiCollateralLoanApi* | [**get_multi_collateral_fix_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days -*MultiCollateralLoanApi* | [**get_multi_collateral_current_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency -*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings -*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times -*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time -*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail -*OptionsApi* | [**list_options_settlements**](docs/OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history -*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement -*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements -*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book -*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts -*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker -*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks -*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying -*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history -*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account -*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history -*OptionsApi* | [**list_options_positions**](docs/OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying -*OptionsApi* | [**get_options_position**](docs/OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position -*OptionsApi* | [**list_options_position_close**](docs/OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying -*OptionsApi* | [**list_options_orders**](docs/OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders -*OptionsApi* | [**create_options_order**](docs/OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order -*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched -*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order -*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order -*OptionsApi* | [**countdown_cancel_all_options**](docs/OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders -*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history -*OptionsApi* | [**get_options_mmp**](docs/OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query -*OptionsApi* | [**set_options_mmp**](docs/OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings -*OptionsApi* | [**reset_options_mmp**](docs/OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset -*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user -*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user -*RebateApi* | [**partner_transaction_history**](docs/RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users -*RebateApi* | [**partner_commissions_history**](docs/RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users -*RebateApi* | [**partner_sub_list**](docs/RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list -*RebateApi* | [**rebate_broker_commission_history**](docs/RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records -*RebateApi* | [**rebate_broker_transaction_history**](docs/RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history -*RebateApi* | [**rebate_user_info**](docs/RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information -*RebateApi* | [**user_sub_relation**](docs/RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship -*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details -*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency -*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported -*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair -*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information -*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book -*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades -*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks -*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates -*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates -*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts -*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book -*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders -*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* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair -*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list -*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order -*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order -*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order -*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history -*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time -*SpotApi* | [**countdown_cancel_all_spot**](docs/SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders -*SpotApi* | [**amend_batch_orders**](docs/SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders -*SpotApi* | [**get_spot_insurance_history**](docs/SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data -*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list -*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order -*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders -*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order -*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order -*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency -*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address -*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records -*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records -*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts -*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts -*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts -*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account -*WalletApi* | [**get_transfer_order_status**](docs/WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query -*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status -*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances -*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances -*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances -*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info -*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address -*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee -*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances -*WalletApi* | [**list_small_balance**](docs/WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance -*WalletApi* | [**convert_small_balance**](docs/WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance -*WalletApi* | [**list_small_balance_history**](docs/WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history -*WalletApi* | [**list_push_orders**](docs/WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history -*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw -*WithdrawalApi* | [**withdraw_push_order**](docs/WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer -*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID - - -## Documentation For Models - - - [AccountBalance](docs/AccountBalance.md) - - [AccountDetail](docs/AccountDetail.md) - - [AccountDetailKey](docs/AccountDetailKey.md) - - [AccountRateLimit](docs/AccountRateLimit.md) - - [AgencyCommission](docs/AgencyCommission.md) - - [AgencyCommissionHistory](docs/AgencyCommissionHistory.md) - - [AgencyTransaction](docs/AgencyTransaction.md) - - [AgencyTransactionHistory](docs/AgencyTransactionHistory.md) - - [AutoRepaySetting](docs/AutoRepaySetting.md) - - [BatchAmendItem](docs/BatchAmendItem.md) - - [BatchAmendOrderReq](docs/BatchAmendOrderReq.md) - - [BatchFuturesOrder](docs/BatchFuturesOrder.md) - - [BatchOrder](docs/BatchOrder.md) - - [BorrowCurrencyInfo](docs/BorrowCurrencyInfo.md) - - [BrokerCommission](docs/BrokerCommission.md) - - [BrokerCommission1](docs/BrokerCommission1.md) - - [BrokerTransaction](docs/BrokerTransaction.md) - - [BrokerTransaction1](docs/BrokerTransaction1.md) - - [CancelBatchOrder](docs/CancelBatchOrder.md) - - [CancelOrderResult](docs/CancelOrderResult.md) - - [CollateralAdjust](docs/CollateralAdjust.md) - - [CollateralAdjustRes](docs/CollateralAdjustRes.md) - - [CollateralAlign](docs/CollateralAlign.md) - - [CollateralCurrency](docs/CollateralCurrency.md) - - [CollateralCurrencyInfo](docs/CollateralCurrencyInfo.md) - - [CollateralCurrencyRes](docs/CollateralCurrencyRes.md) - - [CollateralCurrentRate](docs/CollateralCurrentRate.md) - - [CollateralFixRate](docs/CollateralFixRate.md) - - [CollateralLoanCurrency](docs/CollateralLoanCurrency.md) - - [CollateralLtv](docs/CollateralLtv.md) - - [CollateralOrder](docs/CollateralOrder.md) - - [CollateralRecord](docs/CollateralRecord.md) - - [Contract](docs/Contract.md) - - [ContractStat](docs/ContractStat.md) - - [ConvertSmallBalance](docs/ConvertSmallBalance.md) - - [CountdownCancelAllFuturesTask](docs/CountdownCancelAllFuturesTask.md) - - [CountdownCancelAllOptionsTask](docs/CountdownCancelAllOptionsTask.md) - - [CountdownCancelAllSpotTask](docs/CountdownCancelAllSpotTask.md) - - [CreateCollateralOrder](docs/CreateCollateralOrder.md) - - [CreateMultiCollateralOrder](docs/CreateMultiCollateralOrder.md) - - [CreateUniLend](docs/CreateUniLend.md) - - [CreateUniLoan](docs/CreateUniLoan.md) - - [CrossMarginAccount](docs/CrossMarginAccount.md) - - [CrossMarginAccountBook](docs/CrossMarginAccountBook.md) - - [CrossMarginBalance](docs/CrossMarginBalance.md) - - [CrossMarginBalance1](docs/CrossMarginBalance1.md) - - [CrossMarginCurrency](docs/CrossMarginCurrency.md) - - [CrossMarginLoan](docs/CrossMarginLoan.md) - - [CrossMarginRepayRequest](docs/CrossMarginRepayRequest.md) - - [CrossMarginRepayment](docs/CrossMarginRepayment.md) - - [CrossMarginTransferable](docs/CrossMarginTransferable.md) - - [Currency](docs/Currency.md) - - [CurrencyChain](docs/CurrencyChain.md) - - [CurrencyPair](docs/CurrencyPair.md) - - [CurrencyQuota](docs/CurrencyQuota.md) - - [DebitFee](docs/DebitFee.md) - - [DeliveryCandlestick](docs/DeliveryCandlestick.md) - - [DeliveryContract](docs/DeliveryContract.md) - - [DeliverySettlement](docs/DeliverySettlement.md) - - [DepositAddress](docs/DepositAddress.md) - - [DualGetOrders](docs/DualGetOrders.md) - - [DualGetPlans](docs/DualGetPlans.md) - - [Eth2RateList](docs/Eth2RateList.md) - - [Eth2Swap](docs/Eth2Swap.md) - - [FlashSwapCurrencyPair](docs/FlashSwapCurrencyPair.md) - - [FlashSwapOrder](docs/FlashSwapOrder.md) - - [FlashSwapOrderPreview](docs/FlashSwapOrderPreview.md) - - [FlashSwapOrderRequest](docs/FlashSwapOrderRequest.md) - - [FlashSwapPreviewRequest](docs/FlashSwapPreviewRequest.md) - - [FundingAccount](docs/FundingAccount.md) - - [FundingRateRecord](docs/FundingRateRecord.md) - - [FutureCancelOrderResult](docs/FutureCancelOrderResult.md) - - [FuturesAccount](docs/FuturesAccount.md) - - [FuturesAccountBook](docs/FuturesAccountBook.md) - - [FuturesAccountHistory](docs/FuturesAccountHistory.md) - - [FuturesAutoDeleverage](docs/FuturesAutoDeleverage.md) - - [FuturesBatchAmendOrderRequest](docs/FuturesBatchAmendOrderRequest.md) - - [FuturesCandlestick](docs/FuturesCandlestick.md) - - [FuturesFee](docs/FuturesFee.md) - - [FuturesIndexConstituents](docs/FuturesIndexConstituents.md) - - [FuturesInitialOrder](docs/FuturesInitialOrder.md) - - [FuturesLimitRiskTiers](docs/FuturesLimitRiskTiers.md) - - [FuturesLiqOrder](docs/FuturesLiqOrder.md) - - [FuturesLiquidate](docs/FuturesLiquidate.md) - - [FuturesOrder](docs/FuturesOrder.md) - - [FuturesOrderAmendment](docs/FuturesOrderAmendment.md) - - [FuturesOrderBook](docs/FuturesOrderBook.md) - - [FuturesOrderBookItem](docs/FuturesOrderBookItem.md) - - [FuturesPremiumIndex](docs/FuturesPremiumIndex.md) - - [FuturesPriceTrigger](docs/FuturesPriceTrigger.md) - - [FuturesPriceTriggeredOrder](docs/FuturesPriceTriggeredOrder.md) - - [FuturesTicker](docs/FuturesTicker.md) - - [FuturesTrade](docs/FuturesTrade.md) - - [IndexConstituent](docs/IndexConstituent.md) - - [InsuranceRecord](docs/InsuranceRecord.md) - - [LedgerRecord](docs/LedgerRecord.md) - - [LiquidateOrder](docs/LiquidateOrder.md) - - [MarginAccount](docs/MarginAccount.md) - - [MarginAccountBook](docs/MarginAccountBook.md) - - [MarginAccountCurrency](docs/MarginAccountCurrency.md) - - [MarginLeverageTier](docs/MarginLeverageTier.md) - - [MarginMarketLeverage](docs/MarginMarketLeverage.md) - - [MarginTiers](docs/MarginTiers.md) - - [MarginTransferable](docs/MarginTransferable.md) - - [MaxUniBorrowable](docs/MaxUniBorrowable.md) - - [MockFuturesOrder](docs/MockFuturesOrder.md) - - [MockFuturesPosition](docs/MockFuturesPosition.md) - - [MockMarginResult](docs/MockMarginResult.md) - - [MockOptionsOrder](docs/MockOptionsOrder.md) - - [MockOptionsPosition](docs/MockOptionsPosition.md) - - [MockRiskUnit](docs/MockRiskUnit.md) - - [MockSpotBalance](docs/MockSpotBalance.md) - - [MockSpotOrder](docs/MockSpotOrder.md) - - [MultiChainAddressItem](docs/MultiChainAddressItem.md) - - [MultiCollateralCurrency](docs/MultiCollateralCurrency.md) - - [MultiCollateralItem](docs/MultiCollateralItem.md) - - [MultiCollateralOrder](docs/MultiCollateralOrder.md) - - [MultiCollateralRecord](docs/MultiCollateralRecord.md) - - [MultiCollateralRecordCurrency](docs/MultiCollateralRecordCurrency.md) - - [MultiLoanItem](docs/MultiLoanItem.md) - - [MultiLoanRepayItem](docs/MultiLoanRepayItem.md) - - [MultiRepayRecord](docs/MultiRepayRecord.md) - - [MultiRepayResp](docs/MultiRepayResp.md) - - [MyFuturesTrade](docs/MyFuturesTrade.md) - - [MyFuturesTradeTimeRange](docs/MyFuturesTradeTimeRange.md) - - [OpenOrders](docs/OpenOrders.md) - - [OptionsAccount](docs/OptionsAccount.md) - - [OptionsAccountBook](docs/OptionsAccountBook.md) - - [OptionsCandlestick](docs/OptionsCandlestick.md) - - [OptionsContract](docs/OptionsContract.md) - - [OptionsMMP](docs/OptionsMMP.md) - - [OptionsMMPReset](docs/OptionsMMPReset.md) - - [OptionsMySettlements](docs/OptionsMySettlements.md) - - [OptionsMyTrade](docs/OptionsMyTrade.md) - - [OptionsOrder](docs/OptionsOrder.md) - - [OptionsPosition](docs/OptionsPosition.md) - - [OptionsPositionClose](docs/OptionsPositionClose.md) - - [OptionsPositionCloseOrder](docs/OptionsPositionCloseOrder.md) - - [OptionsSettlement](docs/OptionsSettlement.md) - - [OptionsTicker](docs/OptionsTicker.md) - - [OptionsUnderlying](docs/OptionsUnderlying.md) - - [OptionsUnderlyingTicker](docs/OptionsUnderlyingTicker.md) - - [Order](docs/Order.md) - - [OrderBook](docs/OrderBook.md) - - [OrderCancel](docs/OrderCancel.md) - - [OrderPatch](docs/OrderPatch.md) - - [OrderResp](docs/OrderResp.md) - - [PartnerCommissionHistory](docs/PartnerCommissionHistory.md) - - [PartnerSub](docs/PartnerSub.md) - - [PartnerSubList](docs/PartnerSubList.md) - - [PartnerTransactionHistory](docs/PartnerTransactionHistory.md) - - [PatchUniLend](docs/PatchUniLend.md) - - [PlaceDualInvestmentOrder](docs/PlaceDualInvestmentOrder.md) - - [Position](docs/Position.md) - - [PositionClose](docs/PositionClose.md) - - [PositionCloseOrder](docs/PositionCloseOrder.md) - - [ProfitLossRange](docs/ProfitLossRange.md) - - [RebateUserInfo](docs/RebateUserInfo.md) - - [RepayCurrencyRes](docs/RepayCurrencyRes.md) - - [RepayLoan](docs/RepayLoan.md) - - [RepayMultiLoan](docs/RepayMultiLoan.md) - - [RepayRecord](docs/RepayRecord.md) - - [RepayRecordCurrency](docs/RepayRecordCurrency.md) - - [RepayRecordLeftInterest](docs/RepayRecordLeftInterest.md) - - [RepayRecordRepaidCurrency](docs/RepayRecordRepaidCurrency.md) - - [RepayRecordTotalInterest](docs/RepayRecordTotalInterest.md) - - [RepayResp](docs/RepayResp.md) - - [RiskUnits](docs/RiskUnits.md) - - [SavedAddress](docs/SavedAddress.md) - - [SmallBalance](docs/SmallBalance.md) - - [SmallBalanceHistory](docs/SmallBalanceHistory.md) - - [SpotAccount](docs/SpotAccount.md) - - [SpotAccountBook](docs/SpotAccountBook.md) - - [SpotCurrencyChain](docs/SpotCurrencyChain.md) - - [SpotFee](docs/SpotFee.md) - - [SpotInsuranceHistory](docs/SpotInsuranceHistory.md) - - [SpotPricePutOrder](docs/SpotPricePutOrder.md) - - [SpotPriceTrigger](docs/SpotPriceTrigger.md) - - [SpotPriceTriggeredOrder](docs/SpotPriceTriggeredOrder.md) - - [StpGroup](docs/StpGroup.md) - - [StpGroupUser](docs/StpGroupUser.md) - - [StructuredBuy](docs/StructuredBuy.md) - - [StructuredGetProjectList](docs/StructuredGetProjectList.md) - - [StructuredOrderList](docs/StructuredOrderList.md) - - [SubAccount](docs/SubAccount.md) - - [SubAccountBalance](docs/SubAccountBalance.md) - - [SubAccountCrossMarginBalance](docs/SubAccountCrossMarginBalance.md) - - [SubAccountFuturesBalance](docs/SubAccountFuturesBalance.md) - - [SubAccountKey](docs/SubAccountKey.md) - - [SubAccountKeyPerms](docs/SubAccountKeyPerms.md) - - [SubAccountMarginBalance](docs/SubAccountMarginBalance.md) - - [SubAccountToSubAccount](docs/SubAccountToSubAccount.md) - - [SubAccountTransfer](docs/SubAccountTransfer.md) - - [SubCrossMarginAccount](docs/SubCrossMarginAccount.md) - - [SubUserMode](docs/SubUserMode.md) - - [SystemTime](docs/SystemTime.md) - - [Ticker](docs/Ticker.md) - - [TotalBalance](docs/TotalBalance.md) - - [Trade](docs/Trade.md) - - [TradeFee](docs/TradeFee.md) - - [TransactionID](docs/TransactionID.md) - - [Transfer](docs/Transfer.md) - - [TransferOrderStatus](docs/TransferOrderStatus.md) - - [TransferablesResult](docs/TransferablesResult.md) - - [TriggerOrderResponse](docs/TriggerOrderResponse.md) - - [TriggerTime](docs/TriggerTime.md) - - [UidPushOrder](docs/UidPushOrder.md) - - [UidPushWithdrawal](docs/UidPushWithdrawal.md) - - [UidPushWithdrawalResp](docs/UidPushWithdrawalResp.md) - - [UniCurrency](docs/UniCurrency.md) - - [UniCurrencyInterest](docs/UniCurrencyInterest.md) - - [UniCurrencyPair](docs/UniCurrencyPair.md) - - [UniInterestMode](docs/UniInterestMode.md) - - [UniInterestRecord](docs/UniInterestRecord.md) - - [UniLend](docs/UniLend.md) - - [UniLendInterest](docs/UniLendInterest.md) - - [UniLendRecord](docs/UniLendRecord.md) - - [UniLoan](docs/UniLoan.md) - - [UniLoanInterestRecord](docs/UniLoanInterestRecord.md) - - [UniLoanRecord](docs/UniLoanRecord.md) - - [UnifiedAccount](docs/UnifiedAccount.md) - - [UnifiedBalance](docs/UnifiedBalance.md) - - [UnifiedBorrowable](docs/UnifiedBorrowable.md) - - [UnifiedCurrency](docs/UnifiedCurrency.md) - - [UnifiedDiscount](docs/UnifiedDiscount.md) - - [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md) - - [UnifiedHistoryLoanRate](docs/UnifiedHistoryLoanRate.md) - - [UnifiedHistoryLoanRateRates](docs/UnifiedHistoryLoanRateRates.md) - - [UnifiedLeverageConfig](docs/UnifiedLeverageConfig.md) - - [UnifiedLeverageSetting](docs/UnifiedLeverageSetting.md) - - [UnifiedLoan](docs/UnifiedLoan.md) - - [UnifiedLoanRecord](docs/UnifiedLoanRecord.md) - - [UnifiedLoanResult](docs/UnifiedLoanResult.md) - - [UnifiedMarginTiers](docs/UnifiedMarginTiers.md) - - [UnifiedModeSet](docs/UnifiedModeSet.md) - - [UnifiedPortfolioInput](docs/UnifiedPortfolioInput.md) - - [UnifiedPortfolioOutput](docs/UnifiedPortfolioOutput.md) - - [UnifiedRiskUnits](docs/UnifiedRiskUnits.md) - - [UnifiedSettings](docs/UnifiedSettings.md) - - [UnifiedTransferable](docs/UnifiedTransferable.md) - - [UserLtvInfo](docs/UserLtvInfo.md) - - [UserSub](docs/UserSub.md) - - [UserSubRelation](docs/UserSubRelation.md) - - [UserTotalAmount](docs/UserTotalAmount.md) - - [WithdrawStatus](docs/WithdrawStatus.md) - - [WithdrawalRecord](docs/WithdrawalRecord.md) - - -## Documentation For Authorization - - -## apiv4 - -Authentication with APIv4 key and secret - -For details, refer to: -[APIv4 signed request requirements](https://www.gate.io/docs/apiv4/en/index.html#apiv4-signed-request-requirements) - - -## Author - -support@mail.gate.io - - diff --git a/docs/AccountApi.md b/docs/AccountApi.md deleted file mode 100644 index 2c13efa..0000000 --- a/docs/AccountApi.md +++ /dev/null @@ -1,625 +0,0 @@ -# gate_api.AccountApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail -[**get_account_rate_limit**](AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information -[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups -[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group -[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group -[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group -[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group -[**get_debit_fee**](AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. -[**set_debit_fee**](AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. - - -# **get_account_detail** -> AccountDetail get_account_detail() - -Get account 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.AccountApi(api_client) - -try: - # Get account detail - api_response = api_instance.get_account_detail() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->get_account_detail: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**AccountDetail**](AccountDetail.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_account_rate_limit** -> list[AccountRateLimit] get_account_rate_limit() - -Get user transaction rate limit information - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) - -try: - # Get user transaction rate limit information - api_response = api_instance.get_account_rate_limit() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->get_account_rate_limit: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[AccountRateLimit]**](AccountRateLimit.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_stp_groups** -> list[StpGroup] list_stp_groups(name=name) - -List STP Groups - -Retrieve the list of STP groups created by the main account user only - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) -name = 'group' # str | Perform a fuzzy search based on the name (optional) - -try: - # List STP Groups - api_response = api_instance.list_stp_groups(name=name) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->list_stp_groups: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Perform a fuzzy search based on the name | [optional] - -### Return type - -[**list[StpGroup]**](StpGroup.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_stp_group** -> StpGroup create_stp_group(stp_group) - -Create STP Group - -Only the main account is allowed to create a new STP user group - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) -stp_group = gate_api.StpGroup() # StpGroup | - -try: - # Create STP Group - api_response = api_instance.create_stp_group(stp_group) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->create_stp_group: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stp_group** | [**StpGroup**](StpGroup.md)| | - -### Return type - -[**StpGroup**](StpGroup.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** | User added successfully. Returning the current users within the STP group. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_stp_groups_users** -> list[StpGroupUser] list_stp_groups_users(stp_id) - -List users of the STP group - -Only the main account that created this STP group is allowed to list the user ID of the STP group - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID - -try: - # List users of the STP group - api_response = api_instance.list_stp_groups_users(stp_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 AccountApi->list_stp_groups_users: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID | - -### Return type - -[**list[StpGroupUser]**](StpGroupUser.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **add_stp_group_users** -> list[StpGroupUser] add_stp_group_users(stp_id, request_body) - -Add users to the STP group - -- Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID -request_body = [[1,2,3]] # list[int] | User ID - -try: - # Add users to the STP group - api_response = api_instance.add_stp_group_users(stp_id, request_body) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->add_stp_group_users: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID | - **request_body** | [**list[int]**](int.md)| User ID | - -### Return type - -[**list[StpGroupUser]**](StpGroupUser.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** | User added successfully. Returning the current users within the STP group. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_stp_group_users** -> list[StpGroupUser] delete_stp_group_users(stp_id, user_id) - -Delete the user in the STP group - -- Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID -user_id = 1 # int | STP user ID, multiple can be separated by commas - -try: - # Delete the user in the STP group - api_response = api_instance.delete_stp_group_users(stp_id, user_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->delete_stp_group_users: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID | - **user_id** | **int**| STP user ID, multiple can be separated by commas | - -### Return type - -[**list[StpGroupUser]**](StpGroupUser.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_debit_fee** -> DebitFee get_debit_fee() - -Query GT deduction configuration. - -Query the current GT deduction configuration for the account. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) - -try: - # Query GT deduction configuration. - api_response = api_instance.get_debit_fee() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->get_debit_fee: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**DebitFee**](DebitFee.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_debit_fee** -> set_debit_fee(debit_fee) - -Set GT deduction. - -Enable or disable GT deduction for the current account. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.AccountApi(api_client) -debit_fee = gate_api.DebitFee() # DebitFee | - -try: - # Set GT deduction. - api_instance.set_debit_fee(debit_fee) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AccountApi->set_debit_fee: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **debit_fee** | [**DebitFee**](DebitFee.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/AccountBalance.md b/docs/AccountBalance.md deleted file mode 100644 index 6e31613..0000000 --- a/docs/AccountBalance.md +++ /dev/null @@ -1,14 +0,0 @@ -# AccountBalance - -Total balances calculated with specified currency unit -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | **str** | Account total balance amount | [optional] -**currency** | **str** | Currency | [optional] -**unrealised_pnl** | **str** | Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts | [optional] -**borrowed** | **str** | Borrowed,this field will only appear in margin and cross_margin accounts | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md deleted file mode 100644 index c88e63d..0000000 --- a/docs/AccountDetail.md +++ /dev/null @@ -1,16 +0,0 @@ -# AccountDetail - -Account detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_whitelist** | **list[str]** | IP whitelist | [optional] -**currency_pairs** | **list[str]** | CurrencyPair whitelisting | [optional] -**user_id** | **int** | User ID | [optional] -**tier** | **int** | User VIP level | [optional] -**key** | [**AccountDetailKey**](AccountDetailKey.md) | | [optional] -**copy_trading_role** | **int** | User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AccountDetailKey.md b/docs/AccountDetailKey.md deleted file mode 100644 index e86955d..0000000 --- a/docs/AccountDetailKey.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountDetailKey - -API Key detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | **int** | mode: 1 - classic account 2 - portfolio margin account | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AccountRateLimit.md b/docs/AccountRateLimit.md deleted file mode 100644 index 2d86be1..0000000 --- a/docs/AccountRateLimit.md +++ /dev/null @@ -1,13 +0,0 @@ -# AccountRateLimit - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tier** | **str** | Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) | [optional] -**ratio** | **str** | Transaction rate | [optional] -**main_ratio** | **str** | Total transaction ratio of main account | [optional] -**updated_at** | **str** | Update time | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AgencyCommission.md b/docs/AgencyCommission.md deleted file mode 100644 index 85d5907..0000000 --- a/docs/AgencyCommission.md +++ /dev/null @@ -1,15 +0,0 @@ -# AgencyCommission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commission_time** | **int** | Commission Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**commission_amount** | **str** | Commission Amount | [optional] -**commission_asset** | **str** | Commission Asset | [optional] -**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AgencyCommissionHistory.md b/docs/AgencyCommissionHistory.md deleted file mode 100644 index e3558c1..0000000 --- a/docs/AgencyCommissionHistory.md +++ /dev/null @@ -1,12 +0,0 @@ -# AgencyCommissionHistory - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**total** | **int** | Total | [optional] -**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AgencyTransaction.md b/docs/AgencyTransaction.md deleted file mode 100644 index e54646f..0000000 --- a/docs/AgencyTransaction.md +++ /dev/null @@ -1,18 +0,0 @@ -# AgencyTransaction - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**fee** | **str** | Fee | [optional] -**fee_asset** | **str** | Fee currency | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**amount** | **str** | Commission Amount | [optional] -**amount_asset** | **str** | Commission Asset | [optional] -**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AgencyTransactionHistory.md b/docs/AgencyTransactionHistory.md deleted file mode 100644 index a79d13c..0000000 --- a/docs/AgencyTransactionHistory.md +++ /dev/null @@ -1,12 +0,0 @@ -# AgencyTransactionHistory - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**total** | **int** | Total | [optional] -**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AutoRepaySetting.md b/docs/AutoRepaySetting.md deleted file mode 100644 index 14d2c7e..0000000 --- a/docs/AutoRepaySetting.md +++ /dev/null @@ -1,10 +0,0 @@ -# AutoRepaySetting - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | Auto repayment status. `on` - enabled, `off` - disabled | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BatchAmendItem.md b/docs/BatchAmendItem.md deleted file mode 100644 index 2193da6..0000000 --- a/docs/BatchAmendItem.md +++ /dev/null @@ -1,17 +0,0 @@ -# BatchAmendItem - -Order information that needs to be modified -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **str** | The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). | -**currency_pair** | **str** | Currency pair | -**account** | **str** | Default spot, unified account and warehouse-by-store leverage account. | [optional] -**amount** | **str** | trade amount, only one of amount and price can be specified | [optional] -**price** | **str** | trade price, only one of amount and price can be specified | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] -**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BatchAmendOrderReq.md b/docs/BatchAmendOrderReq.md deleted file mode 100644 index 121b66c..0000000 --- a/docs/BatchAmendOrderReq.md +++ /dev/null @@ -1,15 +0,0 @@ -# BatchAmendOrderReq - -Modify contract order parameters -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] -**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] -**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] -**price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending 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/BatchFuturesOrder.md b/docs/BatchFuturesOrder.md deleted file mode 100644 index 538f820..0000000 --- a/docs/BatchFuturesOrder.md +++ /dev/null @@ -1,38 +0,0 @@ -# BatchFuturesOrder - -Futures order details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] -**label** | **str** | Error label, only exists if execution fails | [optional] -**detail** | **str** | Error detail, only present if execution failed and details need to be given | [optional] -**id** | **int** | Futures order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time of order | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] -**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] -**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] -**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | [optional] -**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] -**is_close** | **bool** | Is the order to close position | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] -**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded | [optional] [readonly] -**fill_price** | **str** | Fill price of the order | [optional] [readonly] -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] -**tkfr** | **str** | Taker fee | [optional] [readonly] -**mkfr** | **str** | Maker fee | [optional] [readonly] -**refu** | **int** | Reference user ID | [optional] [readonly] -**auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BatchOrder.md b/docs/BatchOrder.md deleted file mode 100644 index f1b326d..0000000 --- a/docs/BatchOrder.md +++ /dev/null @@ -1,47 +0,0 @@ -# BatchOrder - -Batch order details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] -**label** | **str** | Error label, if any, otherwise an empty string | [optional] -**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] -**id** | **str** | Order ID | [optional] [readonly] -**create_time** | **str** | Creation time of order | [optional] [readonly] -**update_time** | **str** | Last modification time of order | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] -**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] -**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] -**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Order side | [optional] -**amount** | **str** | Trade amount | [optional] -**price** | **str** | Order price | [optional] -**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] -**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] -**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price | [optional] [readonly] -**fee** | **str** | Fee deducted | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] -**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BorrowCurrencyInfo.md b/docs/BorrowCurrencyInfo.md deleted file mode 100644 index c627a30..0000000 --- a/docs/BorrowCurrencyInfo.md +++ /dev/null @@ -1,14 +0,0 @@ -# BorrowCurrencyInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**left_repay_principal** | **str** | outstanding principal | [optional] -**left_repay_interest** | **str** | outstanding interest | [optional] -**left_repay_usdt** | **str** | Value of left total repayments amount in USDT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BrokerCommission.md b/docs/BrokerCommission.md deleted file mode 100644 index 4c722fa..0000000 --- a/docs/BrokerCommission.md +++ /dev/null @@ -1,11 +0,0 @@ -# BrokerCommission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of comission history | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BrokerCommission1.md b/docs/BrokerCommission1.md deleted file mode 100644 index c515dea..0000000 --- a/docs/BrokerCommission1.md +++ /dev/null @@ -1,18 +0,0 @@ -# BrokerCommission1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**commission_time** | **int** | Commission Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**amount** | **str** | The amount of commission rebates | [optional] -**fee** | **str** | Fee | [optional] -**fee_asset** | **str** | Fee currency | [optional] -**rebate_fee** | **str** | The income from rebates, converted to USDT | [optional] -**source** | **str** | Rebate Type: Spot、Futures、Options | [optional] -**currency_pair** | **str** | Currency pair | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BrokerTransaction.md b/docs/BrokerTransaction.md deleted file mode 100644 index c450894..0000000 --- a/docs/BrokerTransaction.md +++ /dev/null @@ -1,11 +0,0 @@ -# BrokerTransaction - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BrokerTransaction1.md b/docs/BrokerTransaction1.md deleted file mode 100644 index 299b892..0000000 --- a/docs/BrokerTransaction1.md +++ /dev/null @@ -1,17 +0,0 @@ -# BrokerTransaction1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**fee** | **str** | fee (usdt) | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**amount** | **str** | Commission Amount | [optional] -**fee_asset** | **str** | Fee currency | [optional] -**source** | **str** | Rebate Type: Spot、Futures、Options | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CancelBatchOrder.md b/docs/CancelBatchOrder.md deleted file mode 100644 index 4d2953b..0000000 --- a/docs/CancelBatchOrder.md +++ /dev/null @@ -1,14 +0,0 @@ -# CancelBatchOrder - -Info of order to be cancelled -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Order currency pair | -**id** | **str** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation | -**account** | **str** | If the canceled order is a unified account apikey, this field must be specified and set to `unified` | [optional] -**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CancelOrderResult.md b/docs/CancelOrderResult.md deleted file mode 100644 index af56f5e..0000000 --- a/docs/CancelOrderResult.md +++ /dev/null @@ -1,17 +0,0 @@ -# CancelOrderResult - -Order cancellation result -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Order currency pair | [optional] -**id** | **str** | Order ID | [optional] -**text** | **str** | Custom order information | [optional] -**succeeded** | **bool** | Whether cancellation succeeded | [optional] -**label** | **str** | Error label when failed to cancel the order; emtpy if succeeded | [optional] -**message** | **str** | Error message when failed to cancel the order; empty if succeeded | [optional] -**account** | **str** | Default is empty (deprecated) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralAdjust.md b/docs/CollateralAdjust.md deleted file mode 100644 index 8392662..0000000 --- a/docs/CollateralAdjust.md +++ /dev/null @@ -1,12 +0,0 @@ -# CollateralAdjust - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | -**type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | -**collaterals** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral Currency List | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralAdjustRes.md b/docs/CollateralAdjustRes.md deleted file mode 100644 index 05bd46a..0000000 --- a/docs/CollateralAdjustRes.md +++ /dev/null @@ -1,12 +0,0 @@ -# CollateralAdjustRes - -Result of multi-collateral adjustment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**collateral_currencies** | [**list[CollateralCurrencyRes]**](CollateralCurrencyRes.md) | Collateral Currency Information | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralAlign.md b/docs/CollateralAlign.md deleted file mode 100644 index 52cc64f..0000000 --- a/docs/CollateralAlign.md +++ /dev/null @@ -1,13 +0,0 @@ -# CollateralAlign - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | -**collateral_currency** | **str** | Collateral | -**collateral_amount** | **str** | Collateral amount | -**type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralCurrency.md b/docs/CollateralCurrency.md deleted file mode 100644 index 016d704..0000000 --- a/docs/CollateralCurrency.md +++ /dev/null @@ -1,11 +0,0 @@ -# CollateralCurrency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**amount** | **str** | Size | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralCurrencyInfo.md b/docs/CollateralCurrencyInfo.md deleted file mode 100644 index 222b2fc..0000000 --- a/docs/CollateralCurrencyInfo.md +++ /dev/null @@ -1,13 +0,0 @@ -# CollateralCurrencyInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**left_collateral** | **str** | Left Collateral Amount | [optional] -**left_collateral_usdt** | **str** | Value of left collateral amount in USDT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralCurrencyRes.md b/docs/CollateralCurrencyRes.md deleted file mode 100644 index 9dcfeb8..0000000 --- a/docs/CollateralCurrencyRes.md +++ /dev/null @@ -1,14 +0,0 @@ -# CollateralCurrencyRes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**succeeded** | **bool** | Update success status | [optional] -**label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] -**message** | **str** | Error description in case of operation failure; empty when successful. | [optional] -**currency** | **str** | Currency | [optional] -**amount** | **str** | Quantity of successful collateral operation; 0 if the operation fails. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralCurrentRate.md b/docs/CollateralCurrentRate.md deleted file mode 100644 index 73ba5c8..0000000 --- a/docs/CollateralCurrentRate.md +++ /dev/null @@ -1,12 +0,0 @@ -# CollateralCurrentRate - -Multi-currency pledge current interest rate -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**current_rate** | **str** | Currency current interest rate | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralFixRate.md b/docs/CollateralFixRate.md deleted file mode 100644 index f6e37f8..0000000 --- a/docs/CollateralFixRate.md +++ /dev/null @@ -1,14 +0,0 @@ -# CollateralFixRate - -Multi-collateral fixed interest rate -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**rate_7d** | **str** | Fixed interest rate for a lending period of 7 days | [optional] -**rate_30d** | **str** | Fixed interest rate for a lending period of 30 days | [optional] -**update_time** | **int** | Update time, timestamp, unit in seconds | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralLoanApi.md b/docs/CollateralLoanApi.md deleted file mode 100644 index 5b55826..0000000 --- a/docs/CollateralLoanApi.md +++ /dev/null @@ -1,704 +0,0 @@ -# gate_api.CollateralLoanApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders -[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order -[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order -[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment -[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history -[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records -[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral -[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user -[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio -[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies - - -# **list_collateral_loan_orders** -> list[CollateralOrder] list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) - -List 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.CollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -collateral_currency = 'BTC' # str | Collateral (optional) -borrow_currency = 'USDT' # str | Borrowed currency (optional) - -try: - # List Orders - api_response = api_instance.list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->list_collateral_loan_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **collateral_currency** | **str**| Collateral | [optional] - **borrow_currency** | **str**| Borrowed currency | [optional] - -### Return type - -[**list[CollateralOrder]**](CollateralOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_collateral_loan** -> OrderResp create_collateral_loan(create_collateral_order) - -Place 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.CollateralLoanApi(api_client) -create_collateral_order = gate_api.CreateCollateralOrder() # CreateCollateralOrder | - -try: - # Place order - api_response = api_instance.create_collateral_loan(create_collateral_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->create_collateral_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_collateral_order** | [**CreateCollateralOrder**](CreateCollateralOrder.md)| | - -### Return type - -[**OrderResp**](OrderResp.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 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_collateral_loan_order_detail** -> CollateralOrder get_collateral_loan_order_detail(order_id) - -Get a single 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.CollateralLoanApi(api_client) -order_id = 100001 # int | Order ID returned on successful order creation - -try: - # Get a single order - api_response = api_instance.get_collateral_loan_order_detail(order_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->get_collateral_loan_order_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation | - -### Return type - -[**CollateralOrder**](CollateralOrder.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) - -# **repay_collateral_loan** -> RepayResp repay_collateral_loan(repay_loan) - -Repayment - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.CollateralLoanApi(api_client) -repay_loan = gate_api.RepayLoan() # RepayLoan | - -try: - # Repayment - api_response = api_instance.repay_collateral_loan(repay_loan) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->repay_collateral_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **repay_loan** | [**RepayLoan**](RepayLoan.md)| | - -### Return type - -[**RepayResp**](RepayResp.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** | Operated 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_repay_records** -> list[RepayRecord] list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) - -Repayment history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.CollateralLoanApi(api_client) -source = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation -borrow_currency = 'USDT' # str | Borrowed currency (optional) -collateral_currency = 'BTC' # str | Collateral (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) - -try: - # Repayment history - api_response = api_instance.list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->list_repay_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **source** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | - **borrow_currency** | **str**| Borrowed currency | [optional] - **collateral_currency** | **str**| Collateral | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - -### Return type - -[**list[RepayRecord]**](RepayRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_collateral_records** -> list[CollateralRecord] list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) - -Query collateral adjustment records - -### Example - -* 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.CollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) -borrow_currency = 'USDT' # str | Borrowed currency (optional) -collateral_currency = 'BTC' # str | Collateral (optional) - -try: - # Query collateral adjustment records - api_response = api_instance.list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->list_collateral_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **borrow_currency** | **str**| Borrowed currency | [optional] - **collateral_currency** | **str**| Collateral | [optional] - -### Return type - -[**list[CollateralRecord]**](CollateralRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **operate_collateral** -> operate_collateral(collateral_align) - -Increase or redeem collateral - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.CollateralLoanApi(api_client) -collateral_align = gate_api.CollateralAlign() # CollateralAlign | - -try: - # Increase or redeem collateral - api_instance.operate_collateral(collateral_align) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->operate_collateral: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collateral_align** | [**CollateralAlign**](CollateralAlign.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Operated 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_total_amount** -> UserTotalAmount get_user_total_amount() - -Query the total borrowing and collateral amount for the user - -### 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.CollateralLoanApi(api_client) - -try: - # Query the total borrowing and collateral amount for the user - api_response = api_instance.get_user_total_amount() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->get_user_total_amount: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UserTotalAmount**](UserTotalAmount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_user_ltv_info** -> UserLtvInfo get_user_ltv_info(collateral_currency, borrow_currency) - -Query user's collateralization ratio - -### 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.CollateralLoanApi(api_client) -collateral_currency = 'BTC' # str | Collateral -borrow_currency = 'USDT' # str | Borrowed currency - -try: - # Query user's collateralization ratio - api_response = api_instance.get_user_ltv_info(collateral_currency, borrow_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 CollateralLoanApi->get_user_ltv_info: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collateral_currency** | **str**| Collateral | - **borrow_currency** | **str**| Borrowed currency | - -### Return type - -[**UserLtvInfo**](UserLtvInfo.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_collateral_currencies** -> list[CollateralLoanCurrency] list_collateral_currencies(loan_currency=loan_currency) - -Query supported borrowing and collateral currencies - -### 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.CollateralLoanApi(api_client) -loan_currency = 'BTC' # str | The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. (optional) - -try: - # Query supported borrowing and collateral currencies - api_response = api_instance.list_collateral_currencies(loan_currency=loan_currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling CollateralLoanApi->list_collateral_currencies: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loan_currency** | **str**| The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. | [optional] - -### Return type - -[**list[CollateralLoanCurrency]**](CollateralLoanCurrency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/CollateralLoanCurrency.md b/docs/CollateralLoanCurrency.md deleted file mode 100644 index fc4151a..0000000 --- a/docs/CollateralLoanCurrency.md +++ /dev/null @@ -1,12 +0,0 @@ -# CollateralLoanCurrency - -Supported borrowing and collateral currencies -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**loan_currency** | **str** | Borrowed currency | [optional] -**collateral_currency** | **list[str]** | List of supported collateral currencies | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralLtv.md b/docs/CollateralLtv.md deleted file mode 100644 index 3e79d8b..0000000 --- a/docs/CollateralLtv.md +++ /dev/null @@ -1,13 +0,0 @@ -# CollateralLtv - -Collateral Ratio -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**init_ltv** | **str** | The initial collateralization rate | [optional] -**alert_ltv** | **str** | Warning collateralization ratio | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralOrder.md b/docs/CollateralOrder.md deleted file mode 100644 index 32216b9..0000000 --- a/docs/CollateralOrder.md +++ /dev/null @@ -1,26 +0,0 @@ -# CollateralOrder - -Collateral Order -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**collateral_currency** | **str** | Collateral | [optional] -**collateral_amount** | **str** | Collateral amount | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**borrow_amount** | **str** | Borrowing amount | [optional] -**repaid_amount** | **str** | Repaid amount | [optional] -**repaid_principal** | **str** | Repaid principal | [optional] -**repaid_interest** | **str** | Repaid interest | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**current_ltv** | **str** | The current collateralization rate | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] -**status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] -**left_repay_total** | **str** | Outstanding principal and interest (outstanding principal + outstanding interest) | [optional] -**left_repay_principal** | **str** | outstanding principal | [optional] -**left_repay_interest** | **str** | outstanding interest | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollateralRecord.md b/docs/CollateralRecord.md deleted file mode 100644 index 5a290c8..0000000 --- a/docs/CollateralRecord.md +++ /dev/null @@ -1,20 +0,0 @@ -# CollateralRecord - -Collateral record -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Collateral record ID | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**borrow_amount** | **str** | Borrowing amount | [optional] -**collateral_currency** | **str** | Collateral | [optional] -**before_collateral** | **str** | The collateral amount before adjustment | [optional] -**after_collateral** | **str** | The collateral amount after adjustment | [optional] -**before_ltv** | **str** | The collateral ratio before adjustment | [optional] -**after_ltv** | **str** | The collateral ratio after adjustment | [optional] -**operate_time** | **int** | Timestamp of the operation, in seconds | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Contract.md b/docs/Contract.md deleted file mode 100644 index d4bce26..0000000 --- a/docs/Contract.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contract - -Futures contract details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Futures contract | [optional] -**type** | **str** | Futures contract type | [optional] -**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] -**leverage_min** | **str** | Minimum leverage | [optional] -**leverage_max** | **str** | Maximum leverage | [optional] -**maintenance_rate** | **str** | Maintenance rate of margin | [optional] -**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional] -**mark_price** | **str** | Current mark price | [optional] -**index_price** | **str** | Current index price | [optional] -**last_price** | **str** | Last trading price | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] -**taker_fee_rate** | **str** | Taker fee rate | [optional] -**order_price_round** | **str** | Minimum order price increment | [optional] -**mark_price_round** | **str** | Minimum mark price increment | [optional] -**funding_rate** | **str** | Current funding rate | [optional] -**funding_interval** | **int** | Funding application interval, unit in seconds | [optional] -**funding_next_apply** | **float** | Next funding time | [optional] -**risk_limit_base** | **str** | Risk limit base,deprecated | [optional] -**risk_limit_step** | **str** | Step of adjusting risk limit,deprecated | [optional] -**risk_limit_max** | **str** | Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed | [optional] -**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate | [optional] -**orderbook_id** | **int** | Current orderbook ID | [optional] -**trade_id** | **int** | Current trade ID | [optional] -**trade_size** | **int** | Historical accumulated trade size | [optional] -**position_size** | **int** | Current total long position size | [optional] -**config_change_time** | **float** | Last changed time of configuration | [optional] -**in_delisting** | **bool** | `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline | [optional] -**orders_limit** | **int** | Maximum number of open orders | [optional] -**enable_bonus** | **bool** | Whether bouns is enabled | [optional] -**enable_credit** | **bool** | Whether portfolio margin account is enabled | [optional] -**create_time** | **float** | Created time of the contract | [optional] -**funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional] - -[[Back to Model list]](../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 deleted file mode 100644 index c66586e..0000000 --- a/docs/ContractStat.md +++ /dev/null @@ -1,22 +0,0 @@ -# ContractStat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **int** | Stat timestamp | [optional] -**lsr_taker** | **float** | Long/short account number ratio | [optional] -**lsr_account** | **float** | Long/short taker size ratio | [optional] -**long_liq_size** | **int** | Long liquidation size | [optional] -**long_liq_amount** | **float** | Long liquidation amount(base currency) | [optional] -**long_liq_usd** | **float** | Long liquidation volume(quote currency) | [optional] -**short_liq_size** | **int** | Short liquidation size | [optional] -**short_liq_amount** | **float** | Short liquidation amount(base currency) | [optional] -**short_liq_usd** | **float** | Short liquidation volume(quote currency) | [optional] -**open_interest** | **int** | Open interest size | [optional] -**open_interest_usd** | **float** | Open interest volume(quote currency) | [optional] -**top_lsr_account** | **float** | Top trader long/short account ratio | [optional] -**top_lsr_size** | **float** | Top trader long/short position ratio | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConvertSmallBalance.md b/docs/ConvertSmallBalance.md deleted file mode 100644 index 3265b4c..0000000 --- a/docs/ConvertSmallBalance.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConvertSmallBalance - -Convert Small Balance -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **list[str]** | Currency | [optional] -**is_all** | **bool** | Whether to exchange all | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CountdownCancelAllFuturesTask.md b/docs/CountdownCancelAllFuturesTask.md deleted file mode 100644 index 9e05e8e..0000000 --- a/docs/CountdownCancelAllFuturesTask.md +++ /dev/null @@ -1,12 +0,0 @@ -# CountdownCancelAllFuturesTask - -Countdown cancel task detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | -**contract** | **str** | Futures contract | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CountdownCancelAllOptionsTask.md b/docs/CountdownCancelAllOptionsTask.md deleted file mode 100644 index b768516..0000000 --- a/docs/CountdownCancelAllOptionsTask.md +++ /dev/null @@ -1,13 +0,0 @@ -# CountdownCancelAllOptionsTask - -Countdown cancel task detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | -**contract** | **str** | Options contract name | [optional] -**underlying** | **str** | Underlying | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CountdownCancelAllSpotTask.md b/docs/CountdownCancelAllSpotTask.md deleted file mode 100644 index aaab8f8..0000000 --- a/docs/CountdownCancelAllSpotTask.md +++ /dev/null @@ -1,12 +0,0 @@ -# CountdownCancelAllSpotTask - -Countdown cancel task detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | -**currency_pair** | **str** | Currency pair | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateCollateralOrder.md b/docs/CreateCollateralOrder.md deleted file mode 100644 index d160b3a..0000000 --- a/docs/CreateCollateralOrder.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateCollateralOrder - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**collateral_amount** | **str** | Collateral amount | -**collateral_currency** | **str** | Collateral | -**borrow_amount** | **str** | Borrowing amount | -**borrow_currency** | **str** | Borrowed currency | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateMultiCollateralOrder.md b/docs/CreateMultiCollateralOrder.md deleted file mode 100644 index c98e244..0000000 --- a/docs/CreateMultiCollateralOrder.md +++ /dev/null @@ -1,18 +0,0 @@ -# CreateMultiCollateralOrder - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**order_type** | **str** | current - current, fixed - fixed, if not specified, default to current | [optional] -**fixed_type** | **str** | Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed | [optional] -**fixed_rate** | **str** | Fixed interest rate, must be specified for fixed | [optional] -**auto_renew** | **bool** | Fixed interest rate, automatic renewal | [optional] -**auto_repay** | **bool** | Fixed interest rate, automatic repayment | [optional] -**borrow_currency** | **str** | Borrowed currency | -**borrow_amount** | **str** | Borrowing amount | -**collateral_currencies** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency and amount | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateUniLend.md b/docs/CreateUniLend.md deleted file mode 100644 index c17fc8e..0000000 --- a/docs/CreateUniLend.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateUniLend - -Lend or redeem -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | -**amount** | **str** | The amount of currency could be lent | -**type** | **str** | type: lend - lend, redeem - redeem | -**min_rate** | **str** | The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateUniLoan.md b/docs/CreateUniLoan.md deleted file mode 100644 index a8f30e1..0000000 --- a/docs/CreateUniLoan.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateUniLoan - -Borrow or repay -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | -**type** | **str** | type: borrow - borrow, repay - repay | -**amount** | **str** | The amount of lending or repaying | -**repaid_all** | **bool** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. | [optional] -**currency_pair** | **str** | Currency pair | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginAccount.md b/docs/CrossMarginAccount.md deleted file mode 100644 index 64dc282..0000000 --- a/docs/CrossMarginAccount.md +++ /dev/null @@ -1,26 +0,0 @@ -# CrossMarginAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**refresh_time** | **int** | Time of the most recent refresh | [optional] -**locked** | **bool** | Whether account is locked | [optional] -**balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional] -**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] -**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] -**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] -**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] -**total_initial_margin** | **str** | Total initial margin | [optional] -**total_margin_balance** | **str** | Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) | [optional] -**total_maintenance_margin** | **str** | Total maintenance margin | [optional] -**total_initial_margin_rate** | **str** | Total initial margin rate | [optional] -**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional] -**total_available_margin** | **str** | Total available margin | [optional] -**portfolio_margin_total** | **str** | Total amount of the portfolio margin account | [optional] -**portfolio_margin_total_liab** | **str** | Total liabilities of the portfolio margin account | [optional] -**portfolio_margin_total_equity** | **str** | Total equity of the portfolio margin account | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginAccountBook.md b/docs/CrossMarginAccountBook.md deleted file mode 100644 index d02b52f..0000000 --- a/docs/CrossMarginAccountBook.md +++ /dev/null @@ -1,15 +0,0 @@ -# CrossMarginAccountBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID | [optional] -**time** | **int** | The timestamp of the change (in milliseconds) | [optional] -**currency** | **str** | Currency changed | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginBalance.md b/docs/CrossMarginBalance.md deleted file mode 100644 index 275fa85..0000000 --- a/docs/CrossMarginBalance.md +++ /dev/null @@ -1,18 +0,0 @@ -# CrossMarginBalance - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**available** | **str** | Available amount | [optional] -**freeze** | **str** | Locked amount | [optional] -**borrowed** | **str** | Borrowed amount | [optional] -**interest** | **str** | Unpaid interests | [optional] -**negative_liab** | **str** | Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] | [optional] -**futures_pos_liab** | **str** | Borrowing to Open Positions in Futures | [optional] -**equity** | **str** | Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl | [optional] -**total_freeze** | **str** | Total freeze. Formula: freeze + position_initial_margin + order_margin | [optional] -**total_liab** | **str** | Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginBalance1.md b/docs/CrossMarginBalance1.md deleted file mode 100644 index 2db2a14..0000000 --- a/docs/CrossMarginBalance1.md +++ /dev/null @@ -1,13 +0,0 @@ -# CrossMarginBalance1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**available** | **str** | Available amount | [optional] -**freeze** | **str** | Locked amount | [optional] -**borrowed** | **str** | Borrowed amount | [optional] -**interest** | **str** | Unpaid interests | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginCurrency.md b/docs/CrossMarginCurrency.md deleted file mode 100644 index 0e3038a..0000000 --- a/docs/CrossMarginCurrency.md +++ /dev/null @@ -1,19 +0,0 @@ -# CrossMarginCurrency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Currency name | [optional] -**rate** | **str** | Minimum lending rate (hourly rate) | [optional] -**prec** | **str** | Currency precision | [optional] -**discount** | **str** | Currency value discount, which is used in total value calculation | [optional] -**min_borrow_amount** | **str** | Minimum currency borrow amount. Unit is currency itself | [optional] -**user_max_borrow_amount** | **str** | Maximum borrow value allowed per user, in USDT | [optional] -**total_max_borrow_amount** | **str** | Maximum borrow value allowed for this currency, in USDT | [optional] -**price** | **str** | Price change between this currency and USDT | [optional] -**loanable** | **bool** | Whether currency is borrowed | [optional] -**status** | **int** | status - `0` : disable - `1` : enable | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginLoan.md b/docs/CrossMarginLoan.md deleted file mode 100644 index f3f8012..0000000 --- a/docs/CrossMarginLoan.md +++ /dev/null @@ -1,19 +0,0 @@ -# CrossMarginLoan - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Loan record ID | [optional] [readonly] -**create_time** | **int** | Creation timestamp, in milliseconds | [optional] [readonly] -**update_time** | **int** | Update timestamp, in milliseconds | [optional] [readonly] -**currency** | **str** | Currency name | -**amount** | **str** | Borrowed amount | -**text** | **str** | User defined custom ID | [optional] -**status** | **int** | Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete | [optional] [readonly] -**repaid** | **str** | Repaid amount | [optional] [readonly] -**repaid_interest** | **str** | Repaid interest | [optional] [readonly] -**unpaid_interest** | **str** | Outstanding interest yet to be paid | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginRepayRequest.md b/docs/CrossMarginRepayRequest.md deleted file mode 100644 index 9c1ca05..0000000 --- a/docs/CrossMarginRepayRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CrossMarginRepayRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency | -**amount** | **str** | Repayment 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/CrossMarginRepayment.md b/docs/CrossMarginRepayment.md deleted file mode 100644 index 147ccbc..0000000 --- a/docs/CrossMarginRepayment.md +++ /dev/null @@ -1,16 +0,0 @@ -# CrossMarginRepayment - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Loan record ID | [optional] -**create_time** | **int** | Repayment time | [optional] -**loan_id** | **str** | Loan record ID | [optional] -**currency** | **str** | Currency name | [optional] -**principal** | **str** | Repaid principal | [optional] -**interest** | **str** | Repaid interest | [optional] -**repayment_type** | **str** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginTransferable.md b/docs/CrossMarginTransferable.md deleted file mode 100644 index 4e2b0d6..0000000 --- a/docs/CrossMarginTransferable.md +++ /dev/null @@ -1,11 +0,0 @@ -# CrossMarginTransferable - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | Max transferable amount | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Currency.md b/docs/Currency.md deleted file mode 100644 index 27e0400..0000000 --- a/docs/Currency.md +++ /dev/null @@ -1,19 +0,0 @@ -# Currency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency symbol | [optional] -**name** | **str** | Currency name | [optional] -**delisted** | **bool** | Whether currency is de-listed | [optional] -**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled (deprecated) | [optional] -**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed (deprecated) | [optional] -**deposit_disabled** | **bool** | Whether currency's deposit is disabled (deprecated) | [optional] -**trade_disabled** | **bool** | Whether currency's trading is disabled | [optional] -**fixed_rate** | **str** | Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies | [optional] -**chain** | **str** | The main chain corresponding to the coin | [optional] -**chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CurrencyChain.md b/docs/CurrencyChain.md deleted file mode 100644 index e45d973..0000000 --- a/docs/CurrencyChain.md +++ /dev/null @@ -1,17 +0,0 @@ -# CurrencyChain - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chain** | **str** | Chain name | [optional] -**name_cn** | **str** | Chain name in Chinese | [optional] -**name_en** | **str** | Chain name in English | [optional] -**contract_address** | **str** | Smart contract address for the currency; if no address is available, it will be an empty string | [optional] -**is_disabled** | **int** | If it is disabled. 0 means NOT being disabled | [optional] -**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not | [optional] -**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not | [optional] -**decimal** | **str** | Withdrawal precision | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md deleted file mode 100644 index 10cea9c..0000000 --- a/docs/CurrencyPair.md +++ /dev/null @@ -1,26 +0,0 @@ -# CurrencyPair - -Spot currency pair -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Currency pair | [optional] -**base** | **str** | Base currency | [optional] -**base_name** | **str** | Transaction currency name | [optional] -**quote** | **str** | Quote currency | [optional] -**quote_name** | **str** | Name of the denominated currency | [optional] -**fee** | **str** | Trading fee | [optional] -**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit | [optional] -**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit | [optional] -**max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit | [optional] -**max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit | [optional] -**amount_precision** | **int** | Amount scale | [optional] -**precision** | **int** | Price scale | [optional] -**trade_status** | **str** | How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold | [optional] -**sell_start** | **int** | Sell start unix timestamp in seconds | [optional] -**buy_start** | **int** | Buy start unix timestamp in seconds | [optional] -**type** | **str** | Trading pair type, normal: normal, premarket: pre-market | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CurrencyQuota.md b/docs/CurrencyQuota.md deleted file mode 100644 index f563b08..0000000 --- a/docs/CurrencyQuota.md +++ /dev/null @@ -1,15 +0,0 @@ -# CurrencyQuota - -Currency Quota -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**min_quota** | **str** | Minimum borrowing/collateral quota for the currency | [optional] -**left_quota** | **str** | Remaining borrowing/collateral limit for the currency | [optional] -**left_quote_usdt** | **str** | Remaining currency limit converted to USDT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DebitFee.md b/docs/DebitFee.md deleted file mode 100644 index dde6e6a..0000000 --- a/docs/DebitFee.md +++ /dev/null @@ -1,10 +0,0 @@ -# DebitFee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | Whether GT fee discount is used | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md deleted file mode 100644 index 53808de..0000000 --- a/docs/DeliveryApi.md +++ /dev/null @@ -1,2050 +0,0 @@ -# gate_api.DeliveryApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts -[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract -[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book -[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history -[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks -[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers -[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history -[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account -[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book -[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user -[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position -[**update_delivery_position_margin**](DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin -[**update_delivery_position_leverage**](DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage -[**update_delivery_position_risk_limit**](DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit -[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders -[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order -[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched -[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order -[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order -[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history -[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history -[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history -[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history -[**list_delivery_risk_limit_tiers**](DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers -[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders -[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order -[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders -[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order -[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order - - -# **list_delivery_contracts** -> list[DeliveryContract] list_delivery_contracts(settle) - -List all futures contracts - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency - -try: - # List all futures contracts - api_response = api_instance.list_delivery_contracts(settle) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_contracts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - -### Return type - -[**list[DeliveryContract]**](DeliveryContract.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_delivery_contract** -> DeliveryContract get_delivery_contract(settle, contract) - -Get a single contract - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract - -try: - # Get a single contract - api_response = api_instance.get_delivery_contract(settle, contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->get_delivery_contract: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - -### Return type - -[**DeliveryContract**](DeliveryContract.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Contract information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_order_book** -> FuturesOrderBook list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) - -Futures order book - -Bids will be sorted by price from high to low, while asks sorted reversely - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) - -try: - # Futures order book - api_response = api_instance.list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_order_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] - -### Return type - -[**FuturesOrderBook**](FuturesOrderBook.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order book retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_trades** -> list[FuturesTrade] list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) - -Futures trading history - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional) -_from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) -to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional) - -try: - # Futures trading history - api_response = api_instance.list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional] - **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] - **to** | **int**| Specify end time in Unix seconds, default to current time | [optional] - -### Return type - -[**list[FuturesTrade]**](FuturesTrade.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_candlesticks** -> list[DeliveryCandlestick] list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) - -Get futures candlesticks - -Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 (optional) (default to '5m') - -try: - # Get futures candlesticks - api_response = api_instance.list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_candlesticks: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 | [optional] [default to '5m'] - -### Return type - -[**list[DeliveryCandlestick]**](DeliveryCandlestick.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_tickers** -> list[FuturesTicker] list_delivery_tickers(settle, contract=contract) - -List futures tickers - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) - -try: - # List futures tickers - api_response = api_instance.list_delivery_tickers(settle, contract=contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_tickers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - -### Return type - -[**list[FuturesTicker]**](FuturesTicker.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_insurance_ledger** -> list[InsuranceRecord] list_delivery_insurance_ledger(settle, limit=limit) - -Futures insurance balance history - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) - -try: - # Futures insurance balance history - api_response = api_instance.list_delivery_insurance_ledger(settle, 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 DeliveryApi->list_delivery_insurance_ledger: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[InsuranceRecord]**](InsuranceRecord.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_accounts** -> FuturesAccount list_delivery_accounts(settle) - -Query futures account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency - -try: - # Query futures account - api_response = api_instance.list_delivery_accounts(settle) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - -### Return type - -[**FuturesAccount**](FuturesAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_account_book** -> list[FuturesAccountBook] list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) - -Query account book - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional) - -try: - # Query account book - api_response = api_instance.list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_account_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] - -### Return type - -[**list[FuturesAccountBook]**](FuturesAccountBook.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_positions** -> list[Position] list_delivery_positions(settle) - -List all positions of a user - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency - -try: - # List all positions of a user - api_response = api_instance.list_delivery_positions(settle) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_positions: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - -### Return type - -[**list[Position]**](Position.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_delivery_position** -> Position get_delivery_position(settle, contract) - -Get single position - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract - -try: - # Get single position - api_response = api_instance.get_delivery_position(settle, contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->get_delivery_position: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_delivery_position_margin** -> Position update_delivery_position_margin(settle, contract, change) - -Update position 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. - -try: - # Update position margin - api_response = api_instance.update_delivery_position_margin(settle, contract, change) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->update_delivery_position_margin: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_delivery_position_leverage** -> Position update_delivery_position_leverage(settle, contract, leverage) - -Update position leverage - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -leverage = '10' # str | New position leverage - -try: - # Update position leverage - api_response = api_instance.update_delivery_position_leverage(settle, contract, leverage) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->update_delivery_position_leverage: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **leverage** | **str**| New position leverage | - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_delivery_position_risk_limit** -> Position update_delivery_position_risk_limit(settle, contract, risk_limit) - -Update position risk limit - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -risk_limit = '10' # str | New position risk limit - -try: - # Update position risk limit - api_response = api_instance.update_delivery_position_risk_limit(settle, contract, risk_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 DeliveryApi->update_delivery_position_risk_limit: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **risk_limit** | **str**| New position risk limit | - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_orders** -> list[FuturesOrder] list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) - -List futures orders - -Zero-filled order cannot be retrieved 10 minutes after order cancellation - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -status = 'open' # str | Only list the orders with this status -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) -count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) - -try: - # List futures orders - api_response = api_instance.list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] - **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] - -### Return type - -[**list[FuturesOrder]**](FuturesOrder.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
| - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_delivery_order** -> FuturesOrder create_delivery_order(settle, futures_order) - -Create a futures order - -Zero-filled order cannot be retrieved 10 minutes after order cancellation - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -futures_order = gate_api.FuturesOrder() # FuturesOrder | - -try: - # Create a futures order - api_response = api_instance.create_delivery_order(settle, futures_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->create_delivery_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | - -### Return type - -[**FuturesOrder**](FuturesOrder.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 details | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_delivery_orders** -> list[FuturesOrder] cancel_delivery_orders(settle, contract, side=side) - -Cancel all `open` orders matched - -Zero-filled order cannot be retrieved 10 minutes after order cancellation - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -side = 'ask' # str | All bids or asks. Both included if not specified (optional) - -try: - # Cancel all `open` orders matched - api_response = api_instance.cancel_delivery_orders(settle, contract, 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 DeliveryApi->cancel_delivery_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **side** | **str**| All bids or asks. Both included if not specified | [optional] - -### Return type - -[**list[FuturesOrder]**](FuturesOrder.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** | All orders matched 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) - -# **get_delivery_order** -> FuturesOrder get_delivery_order(settle, order_id) - -Get a single order - -Zero-filled order cannot be retrieved 10 minutes after order cancellation - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = '12345' # str | Retrieve the data of the order with the specified ID - -try: - # Get a single order - api_response = api_instance.get_delivery_order(settle, 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 DeliveryApi->get_delivery_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**FuturesOrder**](FuturesOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order details | - | - -[[Back to top]](#) [[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_delivery_order** -> FuturesOrder cancel_delivery_order(settle, order_id) - -Cancel a single 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = '12345' # str | Retrieve the data of the order with the specified ID - -try: - # Cancel a single order - api_response = api_instance.cancel_delivery_order(settle, 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 DeliveryApi->cancel_delivery_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**FuturesOrder**](FuturesOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order details | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_my_delivery_trades** -> list[MyFuturesTrade] get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) - -List personal trading history - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -order = 12345 # int | Futures order ID, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) -count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) - -try: - # List personal trading history - api_response = api_instance.get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->get_my_delivery_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **order** | **int**| Futures order ID, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] - **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] - -### Return type - -[**list[MyFuturesTrade]**](MyFuturesTrade.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
| - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_position_close** -> list[PositionClose] list_delivery_position_close(settle, contract=contract, limit=limit) - -List position close history - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) - -try: - # List position close history - api_response = api_instance.list_delivery_position_close(settle, contract=contract, 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 DeliveryApi->list_delivery_position_close: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[PositionClose]**](PositionClose.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_liquidates** -> list[FuturesLiquidate] list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) - -List liquidation history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify a liquidation timestamp (optional) (default to 0) - -try: - # List liquidation history - api_response = api_instance.list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_liquidates: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0] - -### Return type - -[**list[FuturesLiquidate]**](FuturesLiquidate.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_settlements** -> list[DeliverySettlement] list_delivery_settlements(settle, contract=contract, limit=limit, at=at) - -List settlement history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify a settlement timestamp (optional) (default to 0) - -try: - # List settlement history - api_response = api_instance.list_delivery_settlements(settle, contract=contract, limit=limit, at=at) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_settlements: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify a settlement timestamp | [optional] [default to 0] - -### Return type - -[**list[DeliverySettlement]**](DeliverySettlement.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_delivery_risk_limit_tiers** -> list[FuturesLimitRiskTiers] list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) - -List risk limit tiers - -When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # List risk limit tiers - api_response = api_instance.list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_delivery_risk_limit_tiers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[FuturesLimitRiskTiers]**](FuturesLimitRiskTiers.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_price_triggered_delivery_orders** -> list[FuturesPriceTriggeredOrder] list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) - -List All Price-triggered 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -status = 'status_example' # str | Only list the orders with this status -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # List All Price-triggered Orders - api_response = api_instance.list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->list_price_triggered_delivery_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_price_triggered_delivery_order** -> TriggerOrderResponse create_price_triggered_delivery_order(settle, futures_price_triggered_order) - -Create a price-triggered 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | - -try: - # Create a price-triggered order - api_response = api_instance.create_price_triggered_delivery_order(settle, futures_price_triggered_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->create_price_triggered_delivery_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | - -### Return type - -[**TriggerOrderResponse**](TriggerOrderResponse.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 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_price_triggered_delivery_order_list** -> list[FuturesPriceTriggeredOrder] cancel_price_triggered_delivery_order_list(settle, contract) - -Cancel All Price-triggered 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract - -try: - # Cancel All Price-triggered Orders - api_response = api_instance.cancel_price_triggered_delivery_order_list(settle, contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling DeliveryApi->cancel_price_triggered_delivery_order_list: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - -### Return type - -[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.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 cancellation request accepted. Query order status by listing orders | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_price_triggered_delivery_order** -> FuturesPriceTriggeredOrder get_price_triggered_delivery_order(settle, order_id) - -Get a price-triggered order - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID - -try: - # Get a price-triggered order - api_response = api_instance.get_price_triggered_delivery_order(settle, 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 DeliveryApi->get_price_triggered_delivery_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_price_triggered_delivery_order** -> FuturesPriceTriggeredOrder cancel_price_triggered_delivery_order(settle, order_id) - -cancel a price-triggered order - -### 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.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID - -try: - # cancel a price-triggered order - api_response = api_instance.cancel_price_triggered_delivery_order(settle, 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 DeliveryApi->cancel_price_triggered_delivery_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | - -[[Back to top]](#) [[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/DeliveryCandlestick.md b/docs/DeliveryCandlestick.md deleted file mode 100644 index 16cbd49..0000000 --- a/docs/DeliveryCandlestick.md +++ /dev/null @@ -1,16 +0,0 @@ -# DeliveryCandlestick - -data point in every timestamp -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] -**c** | **str** | Close price (quote currency) | [optional] -**h** | **str** | Highest price (quote currency) | [optional] -**l** | **str** | Lowest price (quote currency) | [optional] -**o** | **str** | Open price (quote currency) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeliveryContract.md b/docs/DeliveryContract.md deleted file mode 100644 index 069eb7b..0000000 --- a/docs/DeliveryContract.md +++ /dev/null @@ -1,48 +0,0 @@ -# DeliveryContract - -Futures contract details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Futures contract | [optional] -**underlying** | **str** | Underlying | [optional] -**cycle** | **str** | Cycle type, e.g. WEEKLY, QUARTERLY | [optional] -**type** | **str** | Futures contract type | [optional] -**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] -**leverage_min** | **str** | Minimum leverage | [optional] -**leverage_max** | **str** | Maximum leverage | [optional] -**maintenance_rate** | **str** | Maintenance rate of margin | [optional] -**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional] -**mark_price** | **str** | Current mark price | [optional] -**index_price** | **str** | Current index price | [optional] -**last_price** | **str** | Last trading price | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] -**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] -**basis_rate** | **str** | Fair basis rate | [optional] -**basis_value** | **str** | Fair basis value | [optional] -**basis_impact_value** | **str** | Funding used for calculating impact bid, ask price | [optional] -**settle_price** | **str** | Settle price | [optional] -**settle_price_interval** | **int** | Settle price update interval | [optional] -**settle_price_duration** | **int** | Settle price update duration in seconds | [optional] -**expire_time** | **int** | Contract expiry timestamp | [optional] -**risk_limit_base** | **str** | Risk limit base | [optional] -**risk_limit_step** | **str** | Step of adjusting risk limit | [optional] -**risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed | [optional] -**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate | [optional] -**orderbook_id** | **int** | Current orderbook ID | [optional] -**trade_id** | **int** | Current trade ID | [optional] -**trade_size** | **int** | Historical accumulated trade size | [optional] -**position_size** | **int** | Current total long position size | [optional] -**config_change_time** | **float** | Last changed time of configuration | [optional] -**in_delisting** | **bool** | Contract is delisting | [optional] -**orders_limit** | **int** | Maximum number of open orders | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeliverySettlement.md b/docs/DeliverySettlement.md deleted file mode 100644 index 06a479a..0000000 --- a/docs/DeliverySettlement.md +++ /dev/null @@ -1,18 +0,0 @@ -# DeliverySettlement - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**leverage** | **str** | Position leverage | [optional] [readonly] -**size** | **int** | Position size | [optional] [readonly] -**margin** | **str** | Position margin | [optional] [readonly] -**entry_price** | **str** | Average entry price | [optional] [readonly] -**settle_price** | **str** | Settled price | [optional] [readonly] -**profit** | **str** | Profit | [optional] [readonly] -**fee** | **str** | Fee deducted | [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/DepositAddress.md b/docs/DepositAddress.md deleted file mode 100644 index b28d7ec..0000000 --- a/docs/DepositAddress.md +++ /dev/null @@ -1,12 +0,0 @@ -# DepositAddress - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | -**address** | **str** | Deposit address | -**multichain_addresses** | [**list[MultiChainAddressItem]**](MultiChainAddressItem.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/DualGetOrders.md b/docs/DualGetOrders.md deleted file mode 100644 index 881c960..0000000 --- a/docs/DualGetOrders.md +++ /dev/null @@ -1,26 +0,0 @@ -# DualGetOrders - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**plan_id** | **int** | Plan ID | [optional] -**copies** | **str** | Copies | [optional] -**invest_amount** | **str** | Investment Amount | [optional] -**settlement_amount** | **str** | Settlement Amount | [optional] -**create_time** | **int** | Creation time | [optional] -**complete_time** | **int** | Completion Time | [optional] -**status** | **str** | Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed | [optional] -**invest_currency** | **str** | Investment Currency | [optional] -**exercise_currency** | **str** | Strike Currency | [optional] -**exercise_price** | **str** | Strike price | [optional] -**settlement_price** | **str** | settlement price | [optional] -**settlement_currency** | **str** | Settle currency | [optional] -**apy_display** | **str** | APY | [optional] -**apy_settlement** | **str** | Settlement APY | [optional] -**delivery_time** | **int** | Settlement time | [optional] -**text** | **str** | Custom order information | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DualGetPlans.md b/docs/DualGetPlans.md deleted file mode 100644 index 4bd3850..0000000 --- a/docs/DualGetPlans.md +++ /dev/null @@ -1,22 +0,0 @@ -# DualGetPlans - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Plan ID | [optional] -**instrument_name** | **str** | Instrument Name | [optional] -**invest_currency** | **str** | Investment Currency | [optional] -**exercise_currency** | **str** | Strike Currency | [optional] -**exercise_price** | **float** | Strike price | [optional] -**delivery_time** | **int** | Settlement time | [optional] -**min_copies** | **int** | Minimum Copies | [optional] -**max_copies** | **int** | Maximum Copies | [optional] -**per_value** | **str** | Per Unit Value | [optional] -**apy_display** | **str** | APY | [optional] -**start_time** | **int** | start time | [optional] -**end_time** | **int** | Finished time | [optional] -**status** | **str** | Status: `NOTSTARTED`-not started `ONGOING`-ongoing `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/EarnApi.md b/docs/EarnApi.md deleted file mode 100644 index ccd605f..0000000 --- a/docs/EarnApi.md +++ /dev/null @@ -1,547 +0,0 @@ -# gate_api.EarnApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap -[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query -[**list_dual_investment_plans**](EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list -[**list_dual_orders**](EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list -[**place_dual_order**](EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order -[**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List -[**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List -[**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order - - -# **swap_eth2** -> swap_eth2(eth2_swap) - -ETH2 swap - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnApi(api_client) -eth2_swap = gate_api.Eth2Swap() # Eth2Swap | - -try: - # ETH2 swap - api_instance.swap_eth2(eth2_swap) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->swap_eth2: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eth2_swap** | [**Eth2Swap**](Eth2Swap.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | swap 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) - -# **rate_list_eth2** -> list[Eth2RateList] rate_list_eth2() - -ETH2 historical rate of return query - -Check the ETH earnings rate record for the last 31 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnApi(api_client) - -try: - # ETH2 historical rate of return query - api_response = api_instance.rate_list_eth2() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->rate_list_eth2: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Eth2RateList]**](Eth2RateList.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_dual_investment_plans** -> list[DualGetPlans] list_dual_investment_plans(plan_id=plan_id) - -Dual Investment product list - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnApi(api_client) -plan_id = 1 # int | Financial project id (optional) - -try: - # Dual Investment product list - api_response = api_instance.list_dual_investment_plans(plan_id=plan_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->list_dual_investment_plans: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **plan_id** | **int**| Financial project id | [optional] - -### Return type - -[**list[DualGetPlans]**](DualGetPlans.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 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_dual_orders** -> list[DualGetOrders] list_dual_orders(_from=_from, to=to, page=page, limit=limit) - -Dual Investment order list - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnApi(api_client) -_from = 1740727000 # int | Start checkout time (optional) -to = 1740729000 # int | End settlement time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) - -try: - # Dual Investment order list - api_response = api_instance.list_dual_orders(_from=_from, to=to, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->list_dual_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start checkout time | [optional] - **to** | **int**| End settlement time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[DualGetOrders]**](DualGetOrders.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **place_dual_order** -> place_dual_order(place_dual_investment_order) - -Place Dual Investment 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.EarnApi(api_client) -place_dual_investment_order = gate_api.PlaceDualInvestmentOrder() # PlaceDualInvestmentOrder | - -try: - # Place Dual Investment order - api_instance.place_dual_order(place_dual_investment_order) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->place_dual_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **place_dual_investment_order** | [**PlaceDualInvestmentOrder**](PlaceDualInvestmentOrder.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_structured_products** -> list[StructuredGetProjectList] list_structured_products(status, type=type, page=page, limit=limit) - -Structured Product List - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnApi(api_client) -status = 'in_process' # str | Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish -type = 'BullishSharkFin' # str | Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) - -try: - # Structured Product List - api_response = api_instance.list_structured_products(status, type=type, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->list_structured_products: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **str**| Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish | - **type** | **str**| Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[StructuredGetProjectList]**](StructuredGetProjectList.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 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_structured_orders** -> list[StructuredOrderList] list_structured_orders(_from=_from, to=to, page=page, limit=limit) - -Structured Product Order List - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnApi(api_client) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) - -try: - # Structured Product Order List - api_response = api_instance.list_structured_orders(_from=_from, to=to, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->list_structured_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[StructuredOrderList]**](StructuredOrderList.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **place_structured_order** -> place_structured_order(structured_buy) - -Place Structured Product 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.EarnApi(api_client) -structured_buy = gate_api.StructuredBuy() # StructuredBuy | - -try: - # Place Structured Product Order - api_instance.place_structured_order(structured_buy) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnApi->place_structured_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **structured_buy** | [**StructuredBuy**](StructuredBuy.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md deleted file mode 100644 index 7c8f77d..0000000 --- a/docs/EarnUniApi.md +++ /dev/null @@ -1,689 +0,0 @@ -# gate_api.EarnUniApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending -[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending -[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders -[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem -[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order -[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending -[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency -[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records -[**switch_interest_reinvest**](EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle -[**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status - - -# **list_uni_currencies** -> list[UniCurrency] list_uni_currencies() - -List currencies for lending - -### 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.EarnUniApi(api_client) - -try: - # List currencies for lending - api_response = api_instance.list_uni_currencies() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->list_uni_currencies: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[UniCurrency]**](UniCurrency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_uni_currency** -> UniCurrency get_uni_currency(currency) - -Get currency detail for lending - -### 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.EarnUniApi(api_client) -currency = 'btc' # str | Currency - -try: - # Get currency detail for lending - api_response = api_instance.get_uni_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 EarnUniApi->get_uni_currency: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - -### Return type - -[**UniCurrency**](UniCurrency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_user_uni_lends** -> list[UniLend] list_user_uni_lends(currency=currency, page=page, limit=limit) - -List user's lending 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.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) - -try: - # List user's lending orders - api_response = api_instance.list_user_uni_lends(currency=currency, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->list_user_uni_lends: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -[**list[UniLend]**](UniLend.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_uni_lend** -> create_uni_lend(create_uni_lend) - -Lend or redeem - -`Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -create_uni_lend = gate_api.CreateUniLend() # CreateUniLend | - -try: - # Lend or redeem - api_instance.create_uni_lend(create_uni_lend) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->create_uni_lend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_uni_lend** | [**CreateUniLend**](CreateUniLend.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Operated 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) - -# **change_uni_lend** -> change_uni_lend(patch_uni_lend) - -Amend lending order - -Currently only supports amending the minimum interest rate (hour) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -patch_uni_lend = gate_api.PatchUniLend() # PatchUniLend | - -try: - # Amend lending order - api_instance.change_uni_lend(patch_uni_lend) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->change_uni_lend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **patch_uni_lend** | [**PatchUniLend**](PatchUniLend.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Updated | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_uni_lend_records** -> list[UniLendRecord] list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) - -List records of lending - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -type = 'lend' # str | type: lend - lend, redeem - redeem (optional) - -try: - # List records of lending - api_response = api_instance.list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->list_uni_lend_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **type** | **str**| type: lend - lend, redeem - redeem | [optional] - -### Return type - -[**list[UniLendRecord]**](UniLendRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_uni_interest** -> UniLendInterest get_uni_interest(currency) - -Get the user's total interest income of specified currency - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency - -try: - # Get the user's total interest income of specified currency - api_response = api_instance.get_uni_interest(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->get_uni_interest: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - -### Return type - -[**UniLendInterest**](UniLendInterest.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_uni_interest_records** -> list[UniInterestRecord] list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) - -List interest records - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # List interest records - api_response = api_instance.list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->list_uni_interest_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[UniInterestRecord]**](UniInterestRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **switch_interest_reinvest** -> switch_interest_reinvest(uni_interest_mode) - -Set interest reinvestment toggle - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -uni_interest_mode = gate_api.UniInterestMode() # UniInterestMode | - -try: - # Set interest reinvestment toggle - api_instance.switch_interest_reinvest(uni_interest_mode) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->switch_interest_reinvest: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uni_interest_mode** | [**UniInterestMode**](UniInterestMode.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | 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_uni_interest_status** -> UniCurrencyInterest get_uni_interest_status(currency) - -query currency interest compounding status - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency - -try: - # query currency interest compounding status - api_response = api_instance.get_uni_interest_status(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->get_uni_interest_status: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - -### Return type - -[**UniCurrencyInterest**](UniCurrencyInterest.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Eth2RateList.md b/docs/Eth2RateList.md deleted file mode 100644 index 707cf68..0000000 --- a/docs/Eth2RateList.md +++ /dev/null @@ -1,12 +0,0 @@ -# Eth2RateList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**date_time** | **int** | Date and Time Stamp | [optional] -**date** | **str** | Date | [optional] -**rate** | **str** | percentage | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Eth2Swap.md b/docs/Eth2Swap.md deleted file mode 100644 index a5ede25..0000000 --- a/docs/Eth2Swap.md +++ /dev/null @@ -1,12 +0,0 @@ -# Eth2Swap - -ETH2 Staking -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**side** | **str** | 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) | -**amount** | **str** | amount | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlashSwapApi.md b/docs/FlashSwapApi.md deleted file mode 100644 index b31ff16..0000000 --- a/docs/FlashSwapApi.md +++ /dev/null @@ -1,357 +0,0 @@ -# gate_api.FlashSwapApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_flash_swap_currency_pair**](FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap -[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders -[**create_flash_swap_order**](FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order -[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail -[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview - - -# **list_flash_swap_currency_pair** -> list[FlashSwapCurrencyPair] list_flash_swap_currency_pair(currency=currency, page=page, limit=limit) - -List All Supported Currency Pairs In Flash Swap - -`BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FlashSwapApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 1000 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 1000 (optional) (default to 1000) - -try: - # List All Supported Currency Pairs In Flash Swap - api_response = api_instance.list_flash_swap_currency_pair(currency=currency, 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 FlashSwapApi->list_flash_swap_currency_pair: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 1000 | [optional] [default to 1000] - -### Return type - -[**list[FlashSwapCurrencyPair]**](FlashSwapCurrencyPair.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_flash_swap_orders** -> list[FlashSwapOrder] list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) - -List all flash swap orders - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FlashSwapApi(api_client) -status = 1 # int | Flash swap order status `1` - success `2` - failure (optional) -sell_currency = 'BTC' # str | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) -buy_currency = 'BTC' # str | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) -reverse = true # bool | If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -page = 1 # int | Page number (optional) (default to 1) - -try: - # List all flash swap orders - api_response = api_instance.list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FlashSwapApi->list_flash_swap_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **int**| Flash swap order status `1` - success `2` - failure | [optional] - **sell_currency** | **str**| Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] - **buy_currency** | **str**| Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] - **reverse** | **bool**| If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **page** | **int**| Page number | [optional] [default to 1] - -### Return type - -[**list[FlashSwapOrder]**](FlashSwapOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_flash_swap_order** -> FlashSwapOrder create_flash_swap_order(flash_swap_order_request) - -Create a flash swap order - -Initiate a flash swap preview in advance because order creation requires a preview result - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FlashSwapApi(api_client) -flash_swap_order_request = gate_api.FlashSwapOrderRequest() # FlashSwapOrderRequest | - -try: - # Create a flash swap order - api_response = api_instance.create_flash_swap_order(flash_swap_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 FlashSwapApi->create_flash_swap_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **flash_swap_order_request** | [**FlashSwapOrderRequest**](FlashSwapOrderRequest.md)| | - -### Return type - -[**FlashSwapOrder**](FlashSwapOrder.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** | The flash swap order is created successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_flash_swap_order** -> FlashSwapOrder get_flash_swap_order(order_id) - -Get a single flash swap order's detail - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FlashSwapApi(api_client) -order_id = 1 # int | Flash swap order ID - -try: - # Get a single flash swap order's detail - api_response = api_instance.get_flash_swap_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 FlashSwapApi->get_flash_swap_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Flash swap order ID | - -### Return type - -[**FlashSwapOrder**](FlashSwapOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **preview_flash_swap_order** -> FlashSwapOrderPreview preview_flash_swap_order(flash_swap_preview_request) - -Initiate a flash swap order preview - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FlashSwapApi(api_client) -flash_swap_preview_request = gate_api.FlashSwapPreviewRequest() # FlashSwapPreviewRequest | - -try: - # Initiate a flash swap order preview - api_response = api_instance.preview_flash_swap_order(flash_swap_preview_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 FlashSwapApi->preview_flash_swap_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **flash_swap_preview_request** | [**FlashSwapPreviewRequest**](FlashSwapPreviewRequest.md)| | - -### Return type - -[**FlashSwapOrderPreview**](FlashSwapOrderPreview.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The flash swap order successfully previewed | - | - -[[Back to top]](#) [[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/FlashSwapCurrencyPair.md b/docs/FlashSwapCurrencyPair.md deleted file mode 100644 index 586c0a3..0000000 --- a/docs/FlashSwapCurrencyPair.md +++ /dev/null @@ -1,17 +0,0 @@ -# FlashSwapCurrencyPair - -List all supported currencies in flash swap -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). | [optional] [readonly] -**sell_currency** | **str** | The currency to be sold | [optional] [readonly] -**buy_currency** | **str** | The currency to be bought | [optional] [readonly] -**sell_min_amount** | **str** | The minimum quantity required for selling | [optional] [readonly] -**sell_max_amount** | **str** | The maximum quantity allowed for selling | [optional] [readonly] -**buy_min_amount** | **str** | The minimum quantity required for buying | [optional] [readonly] -**buy_max_amount** | **str** | The maximum quantity allowed for buying | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlashSwapOrder.md b/docs/FlashSwapOrder.md deleted file mode 100644 index bde41a4..0000000 --- a/docs/FlashSwapOrder.md +++ /dev/null @@ -1,19 +0,0 @@ -# FlashSwapOrder - -Flash swap order -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Flash swap order ID | [optional] [readonly] -**create_time** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**user_id** | **int** | User ID | [optional] [readonly] -**sell_currency** | **str** | Currency to sell | [optional] [readonly] -**sell_amount** | **str** | Amount to sell | [optional] [readonly] -**buy_currency** | **str** | Currency to buy | [optional] [readonly] -**buy_amount** | **str** | Amount to buy | [optional] [readonly] -**price** | **str** | Price | [optional] [readonly] -**status** | **int** | Flash swap order status `1` - success `2` - failure | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlashSwapOrderPreview.md b/docs/FlashSwapOrderPreview.md deleted file mode 100644 index 578ba75..0000000 --- a/docs/FlashSwapOrderPreview.md +++ /dev/null @@ -1,16 +0,0 @@ -# FlashSwapOrderPreview - -Initiate a flash swap order preview -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**preview_id** | **str** | Preview result ID | [optional] -**sell_currency** | **str** | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] -**sell_amount** | **str** | Amount to sell | [optional] -**buy_currency** | **str** | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] -**buy_amount** | **str** | Amount to buy | [optional] -**price** | **str** | 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/FlashSwapOrderRequest.md b/docs/FlashSwapOrderRequest.md deleted file mode 100644 index a3e6f8f..0000000 --- a/docs/FlashSwapOrderRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# FlashSwapOrderRequest - -Parameters of flash swap order creation -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**preview_id** | **str** | Preview result ID | -**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. | -**sell_amount** | **str** | Amount to sell (based on the preview result) | -**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. | -**buy_amount** | **str** | Amount to buy (based on the preview result) | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlashSwapPreviewRequest.md b/docs/FlashSwapPreviewRequest.md deleted file mode 100644 index ea14e67..0000000 --- a/docs/FlashSwapPreviewRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# FlashSwapPreviewRequest - -Parameters of flash swap order creation -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. | -**sell_amount** | **str** | Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] -**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. | -**buy_amount** | **str** | Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FundingAccount.md b/docs/FundingAccount.md deleted file mode 100644 index f84f8fe..0000000 --- a/docs/FundingAccount.md +++ /dev/null @@ -1,14 +0,0 @@ -# FundingAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**available** | **str** | Available assets to lend, which is identical to spot account `available` | [optional] -**locked** | **str** | Locked amount. i.e. amount in `open` loans | [optional] -**lent** | **str** | Outstanding loan amount yet to be repaid | [optional] -**total_lent** | **str** | Amount used for lending. total_lent = lent + locked | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FundingRateRecord.md b/docs/FundingRateRecord.md deleted file mode 100644 index add60cd..0000000 --- a/docs/FundingRateRecord.md +++ /dev/null @@ -1,11 +0,0 @@ -# FundingRateRecord - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**t** | **int** | Unix timestamp in seconds | [optional] -**r** | **str** | Funding 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/FutureCancelOrderResult.md b/docs/FutureCancelOrderResult.md deleted file mode 100644 index a27e9e6..0000000 --- a/docs/FutureCancelOrderResult.md +++ /dev/null @@ -1,14 +0,0 @@ -# FutureCancelOrderResult - -Order cancellation result -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] -**user_id** | **int** | User ID | [optional] -**succeeded** | **bool** | Whether cancellation succeeded | [optional] -**message** | **str** | Error message when failed to cancel the order; empty if succeeded | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md deleted file mode 100644 index 9641bf8..0000000 --- a/docs/FuturesAccount.md +++ /dev/null @@ -1,34 +0,0 @@ -# FuturesAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **str** | total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) | [optional] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] -**position_margin** | **str** | Position margin | [optional] -**order_margin** | **str** | Order margin of unfinished orders | [optional] -**available** | **str** | The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) | [optional] -**point** | **str** | POINT amount | [optional] -**currency** | **str** | Settle currency | [optional] -**in_dual_mode** | **bool** | Whether dual mode is enabled | [optional] -**enable_credit** | **bool** | Whether portfolio margin account mode is enabled | [optional] -**position_initial_margin** | **str** | Initial margin position, applicable to the portfolio margin account model | [optional] -**maintenance_margin** | **str** | The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model | [optional] -**bonus** | **str** | Perpetual Contract Bonus | [optional] -**enable_evolved_classic** | **bool** | Classic account margin mode, true-new mode, false-old mode | [optional] -**cross_order_margin** | **str** | Full -warehouse hanging order deposit, suitable for the new classic account margin model | [optional] -**cross_initial_margin** | **str** | The initial security deposit of the full warehouse is suitable for the new classic account margin model | [optional] -**cross_maintenance_margin** | **str** | Maintain deposit in full warehouse, suitable for new classic account margin models | [optional] -**cross_unrealised_pnl** | **str** | The full warehouse does not achieve profit and loss, suitable for the new classic account margin model | [optional] -**cross_available** | **str** | Full warehouse available amount, suitable for the new classic account margin model | [optional] -**cross_margin_balance** | **str** | Full margin balance, suitable for the new classic account margin model | [optional] -**cross_mmr** | **str** | Maintain margin ratio for the full position, suitable for the new classic account margin model | [optional] -**cross_imr** | **str** | The initial margin rate of the full position is suitable for the new classic account margin model | [optional] -**isolated_position_margin** | **str** | Ware -position margin, suitable for the new classic account margin model | [optional] -**enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode | [optional] -**margin_mode** | **int** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional] -**history** | [**FuturesAccountHistory**](FuturesAccountHistory.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesAccountBook.md b/docs/FuturesAccountBook.md deleted file mode 100644 index eebf328..0000000 --- a/docs/FuturesAccountBook.md +++ /dev/null @@ -1,17 +0,0 @@ -# FuturesAccountBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **float** | Change time | [optional] -**change** | **str** | Change amount | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] -**text** | **str** | Comment | [optional] -**contract** | **str** | Futures contract, the field is only available for data after 2023-10-30. | [optional] -**trade_id** | **str** | trade id | [optional] -**id** | **str** | 账户变更记录 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/FuturesAccountHistory.md b/docs/FuturesAccountHistory.md deleted file mode 100644 index 202fdc6..0000000 --- a/docs/FuturesAccountHistory.md +++ /dev/null @@ -1,20 +0,0 @@ -# FuturesAccountHistory - -Statistical data -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dnw** | **str** | total amount of deposit and withdraw | [optional] -**pnl** | **str** | total amount of trading profit and loss | [optional] -**fee** | **str** | total amount of fee | [optional] -**refr** | **str** | total amount of referrer rebates | [optional] -**fund** | **str** | total amount of funding costs | [optional] -**point_dnw** | **str** | total amount of point deposit and withdraw | [optional] -**point_fee** | **str** | total amount of point fee | [optional] -**point_refr** | **str** | total amount of referrer rebates of point fee | [optional] -**bonus_dnw** | **str** | total amount of perpetual contract bonus transfer | [optional] -**bonus_offset** | **str** | total amount of perpetual contract bonus deduction | [optional] - -[[Back to Model list]](../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 deleted file mode 100644 index fcef966..0000000 --- a/docs/FuturesApi.md +++ /dev/null @@ -1,3377 +0,0 @@ -# gate_api.FuturesApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts -[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract -[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book -[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history -[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks -[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line -[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers -[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history -[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history -[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats -[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents -[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history -[**list_futures_risk_limit_tiers**](FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers -[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account -[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book -[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user -[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position -[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin -[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage -[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit -[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode -[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode -[**update_dual_mode_position_margin**](FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode -[**update_dual_mode_position_leverage**](FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode -[**update_dual_mode_position_risk_limit**](FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode -[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders -[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order -[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched -[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range -[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders -[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order -[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order -[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order -[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history -[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range -[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history -[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history -[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History -[**countdown_cancel_all_futures**](FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders -[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates -[**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list -[**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs -[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders -[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order -[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders -[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order -[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order - - -# **list_futures_contracts** -> list[Contract] list_futures_contracts(settle, limit=limit, offset=offset) - -List all futures contracts - -### 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 to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # List all futures contracts - api_response = api_instance.list_futures_contracts(settle, 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: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **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 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_futures_contract** -> Contract get_futures_contract(settle, contract) - -Get a single contract - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract - -try: - # Get a single contract - api_response = api_instance.get_futures_contract(settle, contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->get_futures_contract: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - -### Return type - -[**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** | Contract information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_order_book** -> FuturesOrderBook list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) - -Futures order book - -Bids will be sorted by price from high to low, while asks sorted reversely - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) - -try: - # Futures order book - api_response = api_instance.list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_futures_order_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] - -### Return type - -[**FuturesOrderBook**](FuturesOrderBook.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order book retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_trades** -> list[FuturesTrade] list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) - -Futures trading history - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional) -_from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) -to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional) - -try: - # Futures trading history - api_response = api_instance.list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_futures_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional] - **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] - **to** | **int**| Specify end time in Unix seconds, default to current time | [optional] - -### Return type - -[**list[FuturesTrade]**](FuturesTrade.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_candlesticks** -> list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) - -Get futures candlesticks - -Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days (optional) (default to '5m') - -try: - # Get futures candlesticks - api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) - 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_candlesticks: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days | [optional] [default to '5m'] - -### Return type - -[**list[FuturesCandlestick]**](FuturesCandlestick.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_premium_index** -> list[FuturesPremiumIndex] list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) - -Premium Index K-Line - -Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points (optional) (default to '5m') - -try: - # Premium Index K-Line - api_response = api_instance.list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_futures_premium_index: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points | [optional] [default to '5m'] - -### Return type - -[**list[FuturesPremiumIndex]**](FuturesPremiumIndex.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_tickers** -> list[FuturesTicker] list_futures_tickers(settle, contract=contract) - -List futures tickers - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) - -try: - # List futures tickers - api_response = api_instance.list_futures_tickers(settle, contract=contract) - 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_tickers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - -### Return type - -[**list[FuturesTicker]**](FuturesTicker.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_funding_rate_history** -> list[FundingRateRecord] list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) - -Funding rate history - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # Funding rate history - api_response = api_instance.list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_futures_funding_rate_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[FundingRateRecord]**](FundingRateRecord.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | History retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_insurance_ledger** -> list[InsuranceRecord] list_futures_insurance_ledger(settle, limit=limit) - -Futures insurance balance history - -### 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 to be returned in a single list (optional) (default to 100) - -try: - # Futures insurance balance history - api_response = api_instance.list_futures_insurance_ledger(settle, 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 FuturesApi->list_futures_insurance_ledger: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[InsuranceRecord]**](InsuranceRecord.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_contract_stats** -> list[ContractStat] list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit) - -Futures stats - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -_from = 1604561000 # int | Start timestamp (optional) -interval = '5m' # str | (optional) (default to '5m') -limit = 30 # int | (optional) (default to 30) - -try: - # Futures stats - api_response = api_instance.list_contract_stats(settle, contract, _from=_from, interval=interval, 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 FuturesApi->list_contract_stats: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **_from** | **int**| Start timestamp | [optional] - **interval** | **str**| | [optional] [default to '5m'] - **limit** | **int**| | [optional] [default to 30] - -### Return type - -[**list[ContractStat]**](ContractStat.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_index_constituents** -> FuturesIndexConstituents get_index_constituents(settle, index) - -Get index constituents - -### 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 -index = 'BTC_USDT' # str | Index name - -try: - # Get index constituents - api_response = api_instance.get_index_constituents(settle, index) - 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_index_constituents: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **index** | **str**| Index name | - -### Return type - -[**FuturesIndexConstituents**](FuturesIndexConstituents.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_liquidated_orders** -> list[FuturesLiqOrder] list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit) - -Retrieve liquidation history - -Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) - -try: - # Retrieve liquidation history - api_response = api_instance.list_liquidated_orders(settle, contract=contract, _from=_from, to=to, 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 FuturesApi->list_liquidated_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[FuturesLiqOrder]**](FuturesLiqOrder.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_risk_limit_tiers** -> list[FuturesLimitRiskTiers] list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) - -List risk limit tiers - -When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # List risk limit tiers - api_response = api_instance.list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_futures_risk_limit_tiers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[FuturesLimitRiskTiers]**](FuturesLimitRiskTiers.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_accounts** -> FuturesAccount list_futures_accounts(settle) - -Query futures account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency - -try: - # Query futures account - api_response = api_instance.list_futures_accounts(settle) - 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_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - -### Return type - -[**FuturesAccount**](FuturesAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_account_book** -> list[FuturesAccountBook] list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) - -Query account book - -If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. - -### 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 -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction (optional) - -try: - # Query account book - api_response = api_instance.list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_futures_account_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] - -### Return type - -[**list[FuturesAccountBook]**](FuturesAccountBook.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_positions** -> list[Position] list_positions(settle, holding=holding, limit=limit, offset=offset) - -List all positions of a user - -### 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 -holding = true # bool | Return only real positions - true, return all - false. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # List all positions of a user - api_response = api_instance.list_positions(settle, holding=holding, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_positions: %s\n" % e) -``` - -### Parameters - -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 to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[Position]**](Position.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_position** -> Position get_position(settle, contract) - -Get single position - -### 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 -contract = 'BTC_USDT' # str | Futures contract - -try: - # Get single position - api_response = api_instance.get_position(settle, contract) - 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_position: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_position_margin** -> Position update_position_margin(settle, contract, change) - -Update position 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.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. - -try: - # Update position margin - api_response = api_instance.update_position_margin(settle, contract, change) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->update_position_margin: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_position_leverage** -> Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) - -Update position leverage - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -leverage = '10' # str | New position leverage -cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional) - -try: - # Update position leverage - api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_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 FuturesApi->update_position_leverage: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **leverage** | **str**| New position leverage | - **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional] - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_position_risk_limit** -> Position update_position_risk_limit(settle, contract, risk_limit) - -Update position risk limit - -### 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 -contract = 'BTC_USDT' # str | Futures contract -risk_limit = '1000000' # str | New Risk Limit Value - -try: - # Update position risk limit - api_response = api_instance.update_position_risk_limit(settle, contract, risk_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 FuturesApi->update_position_risk_limit: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **risk_limit** | **str**| New Risk Limit Value | - -### Return type - -[**Position**](Position.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** | Position information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_dual_mode** -> FuturesAccount set_dual_mode(settle, dual_mode) - -Enable or disable dual mode - -Before setting dual mode, make sure all positions are closed and no orders are open - -### 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 -dual_mode = true # bool | Whether to enable dual mode - -try: - # Enable or disable dual mode - api_response = api_instance.set_dual_mode(settle, dual_mode) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->set_dual_mode: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **dual_mode** | **bool**| Whether to enable dual mode | - -### Return type - -[**FuturesAccount**](FuturesAccount.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** | Updated | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_dual_mode_position** -> list[Position] get_dual_mode_position(settle, contract) - -Retrieve position detail in dual mode - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract - -try: - # Retrieve position detail in dual mode - api_response = api_instance.get_dual_mode_position(settle, contract) - 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_dual_mode_position: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - -### Return type - -[**list[Position]**](Position.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_dual_mode_position_margin** -> list[Position] update_dual_mode_position_margin(settle, contract, change, dual_side) - -Update position margin in dual mode - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. -dual_side = 'dual_long' # str | Long or short position - -try: - # Update position margin in dual mode - api_response = api_instance.update_dual_mode_position_margin(settle, contract, change, dual_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->update_dual_mode_position_margin: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | - **dual_side** | **str**| Long or short position | - -### Return type - -[**list[Position]**](Position.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_dual_mode_position_leverage** -> list[Position] update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) - -Update position leverage in dual mode - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -leverage = '10' # str | New position leverage -cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional) - -try: - # Update position leverage in dual mode - api_response = api_instance.update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_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 FuturesApi->update_dual_mode_position_leverage: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **leverage** | **str**| New position leverage | - **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional] - -### Return type - -[**list[Position]**](Position.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_dual_mode_position_risk_limit** -> list[Position] update_dual_mode_position_risk_limit(settle, contract, risk_limit) - -Update position risk limit in dual mode - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -risk_limit = '1000000' # str | New Risk Limit Value - -try: - # Update position risk limit in dual mode - api_response = api_instance.update_dual_mode_position_risk_limit(settle, contract, risk_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 FuturesApi->update_dual_mode_position_risk_limit: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **risk_limit** | **str**| New Risk Limit Value | - -### Return type - -[**list[Position]**](Position.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_futures_orders** -> list[FuturesOrder] list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) - -List futures orders - -- Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. - -### Example - -* 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 -status = 'open' # str | Only list the orders with this status -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) - -try: - # List futures orders - api_response = api_instance.list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_futures_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] - -### Return type - -[**list[FuturesOrder]**](FuturesOrder.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_futures_order** -> FuturesOrder create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) - -Create a futures order - -- When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -futures_order = gate_api.FuturesOrder() # FuturesOrder | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Create a futures order - api_response = api_instance.create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->create_futures_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**FuturesOrder**](FuturesOrder.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 details | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_futures_orders** -> list[FuturesOrder] cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side) - -Cancel all `open` orders matched - -Zero-filled order cannot be retrieved 10 minutes after order cancellation - -### 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 -contract = 'BTC_USDT' # str | Futures contract -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) -side = 'ask' # str | Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask (optional) - -try: - # Cancel all `open` orders matched - api_response = api_instance.cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, 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->cancel_futures_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - **side** | **str**| Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask | [optional] - -### Return type - -[**list[FuturesOrder]**](FuturesOrder.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** | All orders matched 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) - -# **get_orders_with_time_range** -> list[FuturesOrder] get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) - -List Futures Orders By Time Range - -### 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 -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # List Futures Orders By Time Range - api_response = api_instance.get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->get_orders_with_time_range: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[FuturesOrder]**](FuturesOrder.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_batch_futures_order** -> list[BatchFuturesOrder] create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) - -Create a batch of futures orders - -- Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -futures_order = [gate_api.FuturesOrder()] # list[FuturesOrder] | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Create a batch of futures orders - api_response = api_instance.create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->create_batch_futures_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **futures_order** | [**list[FuturesOrder]**](FuturesOrder.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**list[BatchFuturesOrder]**](BatchFuturesOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Request is completed | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_futures_order** -> FuturesOrder get_futures_order(settle, order_id) - -Get a single order - -- Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. - -### Example - -* 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 -order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. - -try: - # Get a single order - api_response = api_instance.get_futures_order(settle, 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 FuturesApi->get_futures_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | - -### Return type - -[**FuturesOrder**](FuturesOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order details | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **amend_futures_order** -> FuturesOrder amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) - -Amend an 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 -order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. -futures_order_amendment = gate_api.FuturesOrderAmendment() # FuturesOrderAmendment | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Amend an order - api_response = api_instance.amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->amend_futures_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | - **futures_order_amendment** | [**FuturesOrderAmendment**](FuturesOrderAmendment.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**FuturesOrder**](FuturesOrder.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 details | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_futures_order** -> FuturesOrder cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) - -Cancel a single 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 -order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Cancel a single order - api_response = api_instance.cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->cancel_futures_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**FuturesOrder**](FuturesOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order details | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_my_trades** -> list[MyFuturesTrade] get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) - -List personal trading history - -By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. - -### Example - -* 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 -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -order = 12345 # int | Futures order ID, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. (optional) - -try: - # List personal trading history - api_response = api_instance.get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->get_my_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **order** | **int**| Futures order ID, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. | [optional] - -### Return type - -[**list[MyFuturesTrade]**](MyFuturesTrade.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_my_trades_with_time_range** -> list[MyFuturesTradeTimeRange] get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) - -List personal trading history by time range - -### 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 -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -role = 'maker' # str | Query role, maker or taker. (optional) - -try: - # List personal trading history by time range - api_response = api_instance.get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->get_my_trades_with_time_range: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **role** | **str**| Query role, maker or taker. | [optional] - -### Return type - -[**list[MyFuturesTradeTimeRange]**](MyFuturesTradeTimeRange.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_position_close** -> list[PositionClose] list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) - -List position close history - -### 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 -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -side = 'short' # str | Query side. long or shot (optional) -pnl = 'profit' # str | Query profit or loss (optional) - -try: - # List position close history - api_response = api_instance.list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_position_close: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **side** | **str**| Query side. long or shot | [optional] - **pnl** | **str**| Query profit or loss | [optional] - -### Return type - -[**list[PositionClose]**](PositionClose.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_liquidates** -> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, at=at) - -List liquidation history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify a liquidation timestamp (optional) (default to 0) - -try: - # List liquidation history - api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, at=at) - 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_liquidates: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0] - -### Return type - -[**list[FuturesLiquidate]**](FuturesLiquidate.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_auto_deleverages** -> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, at=at) - -List Auto-Deleveraging History - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify an auto-deleveraging timestamp (optional) (default to 0) - -try: - # List Auto-Deleveraging History - api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, at=at) - 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_auto_deleverages: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify an auto-deleveraging timestamp | [optional] [default to 0] - -### Return type - -[**list[FuturesAutoDeleverage]**](FuturesAutoDeleverage.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **countdown_cancel_all_futures** -> TriggerTime countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) - -Countdown cancel orders - -When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. - -### 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 -countdown_cancel_all_futures_task = gate_api.CountdownCancelAllFuturesTask() # CountdownCancelAllFuturesTask | - -try: - # Countdown cancel orders - api_response = api_instance.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->countdown_cancel_all_futures: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **countdown_cancel_all_futures_task** | [**CountdownCancelAllFuturesTask**](CountdownCancelAllFuturesTask.md)| | - -### Return type - -[**TriggerTime**](TriggerTime.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Set countdown successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_futures_fee** -> dict(str, FuturesFee) get_futures_fee(settle, contract=contract) - -Query user trading fee rates - -### 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 -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) - -try: - # Query user trading fee rates - api_response = api_instance.get_futures_fee(settle, contract=contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->get_futures_fee: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - -### Return type - -[**dict(str, FuturesFee)**](FuturesFee.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_batch_future_orders** -> list[FutureCancelOrderResult] cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) - -Cancel a batch of orders with an ID list - -Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -request_body = ['request_body_example'] # list[str] | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Cancel a batch of orders with an ID list - api_response = api_instance.cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->cancel_batch_future_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **request_body** | [**list[str]**](str.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**list[FutureCancelOrderResult]**](FutureCancelOrderResult.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order cancellation operation completed | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **amend_batch_future_orders** -> list[BatchFuturesOrder] amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) - -Batch modify orders with specified IDs - -You can specify multiple different order IDs. You can only modify up to 10 orders in one request. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -batch_amend_order_req = [gate_api.BatchAmendOrderReq()] # list[BatchAmendOrderReq] | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Batch modify orders with specified IDs - api_response = api_instance.amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->amend_batch_future_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **batch_amend_order_req** | [**list[BatchAmendOrderReq]**](BatchAmendOrderReq.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**list[BatchFuturesOrder]**](BatchFuturesOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Request is completed | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_price_triggered_orders** -> list[FuturesPriceTriggeredOrder] list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) - -List All Price-triggered 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 -status = 'status_example' # str | Only list the orders with this status -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # List All Price-triggered Orders - api_response = api_instance.list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->list_price_triggered_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_price_triggered_order** -> TriggerOrderResponse create_price_triggered_order(settle, futures_price_triggered_order) - -Create a price-triggered 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 -futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | - -try: - # Create a price-triggered order - api_response = api_instance.create_price_triggered_order(settle, futures_price_triggered_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->create_price_triggered_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | - -### Return type - -[**TriggerOrderResponse**](TriggerOrderResponse.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 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_price_triggered_order_list** -> list[FuturesPriceTriggeredOrder] cancel_price_triggered_order_list(settle, contract=contract) - -Cancel All Price-triggered 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 -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) - -try: - # Cancel All Price-triggered Orders - api_response = api_instance.cancel_price_triggered_order_list(settle, contract=contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling FuturesApi->cancel_price_triggered_order_list: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - -### Return type - -[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.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 cancellation request accepted. Query order status by listing orders | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_price_triggered_order** -> FuturesPriceTriggeredOrder get_price_triggered_order(settle, order_id) - -Get a price-triggered order - -### 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 -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID - -try: - # Get a price-triggered order - api_response = api_instance.get_price_triggered_order(settle, 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 FuturesApi->get_price_triggered_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_price_triggered_order** -> FuturesPriceTriggeredOrder cancel_price_triggered_order(settle, order_id) - -cancel a price-triggered order - -### 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 -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID - -try: - # cancel a price-triggered order - api_response = api_instance.cancel_price_triggered_order(settle, 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 FuturesApi->cancel_price_triggered_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/FuturesAutoDeleverage.md b/docs/FuturesAutoDeleverage.md deleted file mode 100644 index ae4759c..0000000 --- a/docs/FuturesAutoDeleverage.md +++ /dev/null @@ -1,19 +0,0 @@ -# FuturesAutoDeleverage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **int** | Automatic deleveraging time | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**order_id** | **int** | Order ID. Order IDs before 2023-02-20 are null | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**leverage** | **str** | Position leverage | [optional] [readonly] -**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional] [readonly] -**entry_price** | **str** | Average entry price | [optional] [readonly] -**fill_price** | **str** | Average fill price | [optional] [readonly] -**trade_size** | **int** | Trading size | [optional] [readonly] -**position_size** | **int** | Positions after auto-deleveraging | [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/FuturesBatchAmendOrderRequest.md b/docs/FuturesBatchAmendOrderRequest.md deleted file mode 100644 index 69bc53f..0000000 --- a/docs/FuturesBatchAmendOrderRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# FuturesBatchAmendOrderRequest - -Modify contract order parameters -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] -**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] -**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] -**price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending 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/FuturesCandlestick.md b/docs/FuturesCandlestick.md deleted file mode 100644 index 202685d..0000000 --- a/docs/FuturesCandlestick.md +++ /dev/null @@ -1,17 +0,0 @@ -# FuturesCandlestick - -data point in every timestamp -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] -**c** | **str** | Close price (quote currency) | [optional] -**h** | **str** | Highest price (quote currency) | [optional] -**l** | **str** | Lowest price (quote currency) | [optional] -**o** | **str** | Open price (quote currency) | [optional] -**sum** | **str** | Trading volume (unit: Quote currency) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesFee.md b/docs/FuturesFee.md deleted file mode 100644 index 383ec9e..0000000 --- a/docs/FuturesFee.md +++ /dev/null @@ -1,12 +0,0 @@ -# FuturesFee - -The returned result is a map type, where the key represents the market and the value represents the taker and maker fee rates. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**taker_fee** | **str** | Taker fee | [optional] [readonly] -**maker_fee** | **str** | maker fee | [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/FuturesIndexConstituents.md b/docs/FuturesIndexConstituents.md deleted file mode 100644 index 7564bbe..0000000 --- a/docs/FuturesIndexConstituents.md +++ /dev/null @@ -1,11 +0,0 @@ -# FuturesIndexConstituents - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**index** | **str** | Index name | [optional] [readonly] -**constituents** | [**list[IndexConstituent]**](IndexConstituent.md) | Constituents | [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/FuturesInitialOrder.md b/docs/FuturesInitialOrder.md deleted file mode 100644 index ff000b1..0000000 --- a/docs/FuturesInitialOrder.md +++ /dev/null @@ -1,19 +0,0 @@ -# FuturesInitialOrder - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract | -**size** | **int** | Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 | [optional] -**price** | **str** | Order price. Set to 0 to use market price | -**close** | **bool** | When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false | [optional] [default to False] -**tif** | **str** | Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc'] -**text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] -**reduce_only** | **bool** | When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions | [optional] [default to False] -**auto_size** | **str** | Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size | [optional] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_close** | **bool** | Is the order to close position | [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/FuturesLimitRiskTiers.md b/docs/FuturesLimitRiskTiers.md deleted file mode 100644 index fec6e52..0000000 --- a/docs/FuturesLimitRiskTiers.md +++ /dev/null @@ -1,16 +0,0 @@ -# FuturesLimitRiskTiers - -Retrieve risk limit configurations for different tiers under a specified contract. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tier** | **int** | Tier | [optional] -**risk_limit** | **str** | Position risk limit | [optional] -**initial_rate** | **str** | Initial margin rate | [optional] -**maintenance_rate** | **str** | Maintenance margin rate | [optional] -**leverage_max** | **str** | Maximum leverage | [optional] -**contract** | **str** | Markets, visible only during market pagination requests | [optional] - -[[Back to Model list]](../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 deleted file mode 100644 index daf3c5e..0000000 --- a/docs/FuturesLiqOrder.md +++ /dev/null @@ -1,16 +0,0 @@ -# FuturesLiqOrder - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**size** | **int** | User position size | [optional] [readonly] -**order_size** | **int** | Number of forced liquidation orders | [optional] [readonly] -**order_price** | **str** | Liquidation order price | [optional] [readonly] -**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] -**left** | **int** | System liquidation order maker size | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesLiquidate.md b/docs/FuturesLiquidate.md deleted file mode 100644 index c8575b9..0000000 --- a/docs/FuturesLiquidate.md +++ /dev/null @@ -1,21 +0,0 @@ -# FuturesLiquidate - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**leverage** | **str** | Position leverage. Not returned in public endpoints. | [optional] [readonly] -**size** | **int** | Position size | [optional] [readonly] -**margin** | **str** | Position margin. Not returned in public endpoints. | [optional] [readonly] -**entry_price** | **str** | Average entry price. Not returned in public endpoints. | [optional] [readonly] -**liq_price** | **str** | Liquidation price. Not returned in public endpoints. | [optional] [readonly] -**mark_price** | **str** | Mark price. Not returned in public endpoints. | [optional] [readonly] -**order_id** | **int** | Liquidation order ID. Not returned in public endpoints. | [optional] [readonly] -**order_price** | **str** | Liquidation order price | [optional] [readonly] -**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] -**left** | **int** | Liquidation order maker size | [optional] [readonly] - -[[Back to Model list]](../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 deleted file mode 100644 index 66b4eeb..0000000 --- a/docs/FuturesOrder.md +++ /dev/null @@ -1,37 +0,0 @@ -# FuturesOrder - -Futures order details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Futures order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time of order | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] -**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] -**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Futures contract | -**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | -**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] -**is_close** | **bool** | Is the order to close position | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] -**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded | [optional] [readonly] -**fill_price** | **str** | Fill price of the order | [optional] [readonly] -**text** | **str** | Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance | [optional] -**tkfr** | **str** | Taker fee | [optional] [readonly] -**mkfr** | **str** | Maker fee | [optional] [readonly] -**refu** | **int** | Reference user ID | [optional] [readonly] -**auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] -**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] -**biz_info** | **str** | Additional information | [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/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md deleted file mode 100644 index 72ff6ca..0000000 --- a/docs/FuturesOrderAmendment.md +++ /dev/null @@ -1,14 +0,0 @@ -# FuturesOrderAmendment - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**size** | **int** | New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. | [optional] -**price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] -**biz_info** | **str** | Users can annotate this modification with information. | [optional] -**bbo** | **str** | Users are able to modify the offer price manually. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesOrderBook.md b/docs/FuturesOrderBook.md deleted file mode 100644 index f8ed364..0000000 --- a/docs/FuturesOrderBook.md +++ /dev/null @@ -1,14 +0,0 @@ -# FuturesOrderBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response | [optional] -**current** | **float** | Response data generation timestamp | [optional] -**update** | **float** | Order book changed timestamp | [optional] -**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Asks order depth | -**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bids order depth | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesOrderBookItem.md b/docs/FuturesOrderBookItem.md deleted file mode 100644 index 9f3356e..0000000 --- a/docs/FuturesOrderBookItem.md +++ /dev/null @@ -1,11 +0,0 @@ -# FuturesOrderBookItem - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**p** | **str** | Price (quote currency) | [optional] -**s** | **int** | Size | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesPremiumIndex.md b/docs/FuturesPremiumIndex.md deleted file mode 100644 index 73effc0..0000000 --- a/docs/FuturesPremiumIndex.md +++ /dev/null @@ -1,15 +0,0 @@ -# FuturesPremiumIndex - -data point in every timestamp -## Properties -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] -**o** | **str** | Open price | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesPriceTrigger.md b/docs/FuturesPriceTrigger.md deleted file mode 100644 index c970e01..0000000 --- a/docs/FuturesPriceTrigger.md +++ /dev/null @@ -1,14 +0,0 @@ -# FuturesPriceTrigger - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**strategy_type** | **int** | Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price | [optional] -**price_type** | **int** | Price type. 0 - latest deal price, 1 - mark price, 2 - index price | [optional] -**price** | **str** | Value of price on price triggered, or price gap on price gap triggered | [optional] -**rule** | **int** | Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price | [optional] -**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the 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/FuturesPriceTriggeredOrder.md b/docs/FuturesPriceTriggeredOrder.md deleted file mode 100644 index e0e2727..0000000 --- a/docs/FuturesPriceTriggeredOrder.md +++ /dev/null @@ -1,22 +0,0 @@ -# FuturesPriceTriggeredOrder - -Futures order details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**initial** | [**FuturesInitialOrder**](FuturesInitialOrder.md) | | -**trigger** | [**FuturesPriceTrigger**](FuturesPriceTrigger.md) | | -**id** | **int** | Auto order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time | [optional] [readonly] -**finish_time** | **float** | Finished time | [optional] [readonly] -**trade_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly] -**status** | **str** | Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order | [optional] [readonly] -**finish_as** | **str** | How order is finished | [optional] [readonly] -**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly] -**order_type** | **str** | Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests | [optional] -**me_order_id** | **int** | Corresponding order ID of order take-profit/stop-loss. | [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/FuturesTicker.md b/docs/FuturesTicker.md deleted file mode 100644 index d6683a1..0000000 --- a/docs/FuturesTicker.md +++ /dev/null @@ -1,32 +0,0 @@ -# FuturesTicker - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract | [optional] -**last** | **str** | Last trading price | [optional] -**change_percentage** | **str** | Change percentage. | [optional] -**total_size** | **str** | Contract total size | [optional] -**low_24h** | **str** | Lowest trading price in recent 24h | [optional] -**high_24h** | **str** | Highest trading price in recent 24h | [optional] -**volume_24h** | **str** | Trade size in recent 24h | [optional] -**volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency | [optional] -**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency | [optional] -**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency | [optional] -**mark_price** | **str** | Recent mark price | [optional] -**funding_rate** | **str** | Funding rate | [optional] -**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] -**index_price** | **str** | Index price | [optional] -**quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] -**basis_rate** | **str** | Basis rate | [optional] -**basis_value** | **str** | Basis value | [optional] -**lowest_ask** | **str** | Recent lowest ask | [optional] -**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] -**highest_bid** | **str** | Recent highest bid | [optional] -**highest_size** | **str** | The latest buyer's highest price order volume | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FuturesTrade.md b/docs/FuturesTrade.md deleted file mode 100644 index 57e99c6..0000000 --- a/docs/FuturesTrade.md +++ /dev/null @@ -1,16 +0,0 @@ -# FuturesTrade - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] -**create_time_ms** | **float** | Trading time, with milliseconds set to 3 decimal places. | [optional] -**contract** | **str** | Futures contract | [optional] -**size** | **int** | Trading size | [optional] -**price** | **str** | Trading price (quote currency) | [optional] -**is_internal** | **bool** | Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IndexConstituent.md b/docs/IndexConstituent.md deleted file mode 100644 index a80703f..0000000 --- a/docs/IndexConstituent.md +++ /dev/null @@ -1,11 +0,0 @@ -# IndexConstituent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**exchange** | **str** | Exchange | [optional] -**symbols** | **list[str]** | 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/InsuranceRecord.md b/docs/InsuranceRecord.md deleted file mode 100644 index cc34afc..0000000 --- a/docs/InsuranceRecord.md +++ /dev/null @@ -1,11 +0,0 @@ -# InsuranceRecord - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**t** | **int** | Unix timestamp in seconds | [optional] -**b** | **str** | Insurance 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/LedgerRecord.md b/docs/LedgerRecord.md deleted file mode 100644 index a9b5194..0000000 --- a/docs/LedgerRecord.md +++ /dev/null @@ -1,19 +0,0 @@ -# LedgerRecord - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Record ID | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] -**withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**timestamp** | **str** | Operation time | [optional] [readonly] -**amount** | **str** | Currency amount | -**currency** | **str** | Currency name | -**address** | **str** | Withdrawal address. Required for withdrawals | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] -**status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LiquidateOrder.md b/docs/LiquidateOrder.md deleted file mode 100644 index cc2d78e..0000000 --- a/docs/LiquidateOrder.md +++ /dev/null @@ -1,15 +0,0 @@ -# LiquidateOrder - -Liquidate Order detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**currency_pair** | **str** | Currency pair | -**amount** | **str** | Trade amount | -**price** | **str** | Order price | -**action_mode** | **str** | Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MarginAccount.md b/docs/MarginAccount.md deleted file mode 100644 index b54725d..0000000 --- a/docs/MarginAccount.md +++ /dev/null @@ -1,18 +0,0 @@ -# MarginAccount - -Margin account detail. `base` refers to base currency, while `quotes to quote currency -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**account_type** | **str** | Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated | [optional] -**leverage** | **str** | User current market leverage multiple | [optional] -**locked** | **bool** | Whether account is locked | [optional] -**risk** | **str** | Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) | [optional] -**mmr** | **str** | Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) | [optional] -**base** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional] -**quote** | [**MarginAccountCurrency**](MarginAccountCurrency.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/MarginAccountBook.md b/docs/MarginAccountBook.md deleted file mode 100644 index 9c62f12..0000000 --- a/docs/MarginAccountBook.md +++ /dev/null @@ -1,17 +0,0 @@ -# MarginAccountBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID | [optional] -**time** | **str** | Balance changed timestamp | [optional] -**time_ms** | **int** | The timestamp of the change (in milliseconds) | [optional] -**currency** | **str** | Currency changed | [optional] -**currency_pair** | **str** | Account currency pair | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MarginAccountCurrency.md b/docs/MarginAccountCurrency.md deleted file mode 100644 index 01f80ab..0000000 --- a/docs/MarginAccountCurrency.md +++ /dev/null @@ -1,15 +0,0 @@ -# MarginAccountCurrency - -Account currency details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**available** | **str** | Amount suitable for margin trading. | [optional] -**locked** | **str** | Locked amount, used in margin trading | [optional] -**borrowed** | **str** | Borrowed amount | [optional] -**interest** | **str** | Unpaid interests | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MarginApi.md b/docs/MarginApi.md deleted file mode 100644 index 8dc54de..0000000 --- a/docs/MarginApi.md +++ /dev/null @@ -1,1596 +0,0 @@ -# gate_api.MarginApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list -[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history -[**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list -[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting -[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting -[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -[**list_cross_margin_currencies**](MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) -[**get_cross_margin_currency**](MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) -[**get_cross_margin_account**](MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) -[**list_cross_margin_account_book**](MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) -[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) -[**create_cross_margin_loan**](MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) -[**get_cross_margin_loan**](MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) -[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) -[**repay_cross_margin_loan**](MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) -[**get_cross_margin_interest_records**](MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) -[**get_cross_margin_transferable**](MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) -[**get_cross_margin_estimate_rate**](MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) -[**get_cross_margin_borrowable**](MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) -[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list - - -# **list_margin_accounts** -> list[MarginAccount] list_margin_accounts(currency_pair=currency_pair) - -Margin account list - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) - -try: - # Margin account list - api_response = api_instance.list_margin_accounts(currency_pair=currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_margin_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - -### Return type - -[**list[MarginAccount]**](MarginAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_margin_account_book** -> list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) - -List margin account balance change history - -Only transferals from and to margin account are provided for now. Time range allows 30 days at most - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) -currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) -type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) - -try: - # List margin account balance change history - api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_margin_account_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] - **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - -### Return type - -[**list[MarginAccountBook]**](MarginAccountBook.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_funding_accounts** -> list[FundingAccount] list_funding_accounts(currency=currency) - -Funding account list - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) - -try: - # Funding account list - api_response = api_instance.list_funding_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 MarginApi->list_funding_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - -### Return type - -[**list[FundingAccount]**](FundingAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_auto_repay_status** -> AutoRepaySetting get_auto_repay_status() - -Retrieve user auto repayment 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.MarginApi(api_client) - -try: - # Retrieve user auto repayment setting - api_response = api_instance.get_auto_repay_status() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_auto_repay_status: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**AutoRepaySetting**](AutoRepaySetting.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** | Current auto repayment setting | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_auto_repay** -> AutoRepaySetting set_auto_repay(status) - -Update user's auto repayment setting - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled - -try: - # Update user's auto repayment setting - api_response = api_instance.set_auto_repay(status) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->set_auto_repay: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled | - -### Return type - -[**AutoRepaySetting**](AutoRepaySetting.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** | Current auto repayment setting | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_margin_transferable** -> MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) - -Get the max transferable amount for a specific margin currency - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency -currency_pair = 'BTC_USDT' # str | Currency pair (optional) - -try: - # Get the max transferable amount for a specific margin currency - api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_margin_transferable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - **currency_pair** | **str**| Currency pair | [optional] - -### Return type - -[**MarginTransferable**](MarginTransferable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_cross_margin_currencies** -> list[CrossMarginCurrency] list_cross_margin_currencies() - -Currencies supported by cross margin.(deprecated) - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) - -try: - # Currencies supported by cross margin.(deprecated) - api_response = api_instance.list_cross_margin_currencies() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_cross_margin_currencies: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[CrossMarginCurrency]**](CrossMarginCurrency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_currency** -> CrossMarginCurrency get_cross_margin_currency(currency) - -Retrieve detail of one single currency supported by cross margin. (deprecated) - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Currency name - -try: - # Retrieve detail of one single currency supported by cross margin. (deprecated) - api_response = api_instance.get_cross_margin_currency(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_currency: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | - -### Return type - -[**CrossMarginCurrency**](CrossMarginCurrency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_account** -> CrossMarginAccount get_cross_margin_account() - -Retrieve cross margin account. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) - -try: - # Retrieve cross margin account. (deprecated) - api_response = api_instance.get_cross_margin_account() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_account: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**CrossMarginAccount**](CrossMarginAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_cross_margin_account_book** -> list[CrossMarginAccountBook] list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type) - -Retrieve cross margin account change history. (deprecated) - -The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'currency_example' # str | Filter by currency (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -type = 'borrow' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) - -try: - # Retrieve cross margin account change history. (deprecated) - api_response = api_instance.list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_cross_margin_account_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - -### Return type - -[**list[CrossMarginAccountBook]**](CrossMarginAccountBook.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_cross_margin_loans** -> list[CrossMarginLoan] list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) - -List cross margin borrow history. (deprecated) - -Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.) -currency = 'currency_example' # str | Filter by currency (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) - -try: - # List cross margin borrow history. (deprecated) - api_response = api_instance.list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_cross_margin_loans: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.) | - **currency** | **str**| Filter by currency | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] - -### Return type - -[**list[CrossMarginLoan]**](CrossMarginLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_cross_margin_loan** -> CrossMarginLoan create_cross_margin_loan(cross_margin_loan) - -Create a cross margin borrow loan. (deprecated) - -Borrow amount cannot be less than currency minimum borrow amount - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -cross_margin_loan = gate_api.CrossMarginLoan() # CrossMarginLoan | - -try: - # Create a cross margin borrow loan. (deprecated) - api_response = api_instance.create_cross_margin_loan(cross_margin_loan) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->create_cross_margin_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cross_margin_loan** | [**CrossMarginLoan**](CrossMarginLoan.md)| | - -### Return type - -[**CrossMarginLoan**](CrossMarginLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully borrowed | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_loan** -> CrossMarginLoan get_cross_margin_loan(loan_id) - -Retrieve single borrow loan detail. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -loan_id = '12345' # str | Borrow loan ID - -try: - # Retrieve single borrow loan detail. (deprecated) - api_response = api_instance.get_cross_margin_loan(loan_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loan_id** | **str**| Borrow loan ID | - -### Return type - -[**CrossMarginLoan**](CrossMarginLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_cross_margin_repayments** -> list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) - -Retrieve cross margin repayments. (deprecated) - -Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | (optional) -loan_id = '12345' # str | (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) - -try: - # Retrieve cross margin repayments. (deprecated) - api_response = api_instance.list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_cross_margin_repayments: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| | [optional] - **loan_id** | **str**| | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] - -### Return type - -[**list[CrossMarginRepayment]**](CrossMarginRepayment.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **repay_cross_margin_loan** -> list[CrossMarginLoan] repay_cross_margin_loan(cross_margin_repay_request) - -Cross margin repayments. (deprecated) - -When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -cross_margin_repay_request = gate_api.CrossMarginRepayRequest() # CrossMarginRepayRequest | - -try: - # Cross margin repayments. (deprecated) - api_response = api_instance.repay_cross_margin_loan(cross_margin_repay_request) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->repay_cross_margin_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cross_margin_repay_request** | [**CrossMarginRepayRequest**](CrossMarginRepayRequest.md)| | - -### Return type - -[**list[CrossMarginLoan]**](CrossMarginLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Loan repaid | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_interest_records** -> list[UniLoanInterestRecord] get_cross_margin_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) - -Interest records for the cross margin account. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # Interest records for the cross margin account. (deprecated) - api_response = api_instance.get_cross_margin_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_interest_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_transferable** -> CrossMarginTransferable get_cross_margin_transferable(currency) - -Get the max transferable amount for a specific cross margin currency. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency - -try: - # Get the max transferable amount for a specific cross margin currency. (deprecated) - api_response = api_instance.get_cross_margin_transferable(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_transferable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - -### Return type - -[**CrossMarginTransferable**](CrossMarginTransferable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_estimate_rate** -> dict(str, str) get_cross_margin_estimate_rate(currencies) - -Estimated interest rates. (deprecated) - -Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name - -try: - # Estimated interest rates. (deprecated) - api_response = api_instance.get_cross_margin_estimate_rate(currencies) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_estimate_rate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | - -### Return type - -**dict(str, str)** - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_borrowable** -> UnifiedBorrowable get_cross_margin_borrowable(currency) - -Get the max borrowable amount for a specific cross margin currency. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency - -try: - # Get the max borrowable amount for a specific cross margin currency. (deprecated) - api_response = api_instance.get_cross_margin_borrowable(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_borrowable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - -### Return type - -[**UnifiedBorrowable**](UnifiedBorrowable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_user_margin_tier** -> list[MarginLeverageTier] get_user_margin_tier(currency_pair) - -Check the user's own leverage lending gradient in the current market - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair - -try: - # Check the user's own leverage lending gradient in the current market - api_response = api_instance.get_user_margin_tier(currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - -### Return type - -[**list[MarginLeverageTier]**](MarginLeverageTier.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_market_margin_tier** -> list[MarginLeverageTier] get_market_margin_tier(currency_pair) - -Query the current market leverage lending gradient - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair - -try: - # Query the current market leverage lending gradient - api_response = api_instance.get_market_margin_tier(currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_market_margin_tier: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - -### Return type - -[**list[MarginLeverageTier]**](MarginLeverageTier.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_user_market_leverage** -> set_user_market_leverage(margin_market_leverage) - -Set the user market leverage multiple - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | - -try: - # Set the user market leverage multiple - api_instance.set_user_market_leverage(margin_market_leverage) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | 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_margin_user_account** -> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) - -Query the user's leverage account list - -Support querying risk rate per position account and margin rate per position account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) - -try: - # Query the user's leverage account list - api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - -### Return type - -[**list[MarginAccount]**](MarginAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/MarginLeverageTier.md b/docs/MarginLeverageTier.md deleted file mode 100644 index 0a36030..0000000 --- a/docs/MarginLeverageTier.md +++ /dev/null @@ -1,13 +0,0 @@ -# MarginLeverageTier - -Market gradient information -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**upper_limit** | **str** | Maximum loan limit | [optional] -**mmr** | **str** | Maintenance margin rate | [optional] -**leverage** | **str** | Maximum leverage multiple | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MarginMarketLeverage.md b/docs/MarginMarketLeverage.md deleted file mode 100644 index a136ef8..0000000 --- a/docs/MarginMarketLeverage.md +++ /dev/null @@ -1,12 +0,0 @@ -# MarginMarketLeverage - -Market leverage settings -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**leverage** | **str** | Position leverage | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MarginTiers.md b/docs/MarginTiers.md deleted file mode 100644 index 455092c..0000000 --- a/docs/MarginTiers.md +++ /dev/null @@ -1,14 +0,0 @@ -# MarginTiers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tier** | **str** | Tier | [optional] -**margin_rate** | **str** | Discount | [optional] -**lower_limit** | **str** | Lower limit | [optional] -**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier) | [optional] -**leverage** | **str** | Position leverage | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MarginTransferable.md b/docs/MarginTransferable.md deleted file mode 100644 index af64207..0000000 --- a/docs/MarginTransferable.md +++ /dev/null @@ -1,12 +0,0 @@ -# MarginTransferable - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**amount** | **str** | Max transferable amount | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md deleted file mode 100644 index 355a750..0000000 --- a/docs/MarginUniApi.md +++ /dev/null @@ -1,557 +0,0 @@ -# gate_api.MarginUniApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market -[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate -[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans -[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay -[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records -[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records -[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable - - -# **list_uni_currency_pairs** -> list[UniCurrencyPair] list_uni_currency_pairs() - -List lending markets - -### 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.MarginUniApi(api_client) - -try: - # List lending markets - api_response = api_instance.list_uni_currency_pairs() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginUniApi->list_uni_currency_pairs: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[UniCurrencyPair]**](UniCurrencyPair.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_uni_currency_pair** -> UniCurrencyPair get_uni_currency_pair(currency_pair) - -Get detail of lending market - -### 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.MarginUniApi(api_client) -currency_pair = 'AE_USDT' # str | Currency pair - -try: - # Get detail of lending market - api_response = api_instance.get_uni_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 MarginUniApi->get_uni_currency_pair: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - -### Return type - -[**UniCurrencyPair**](UniCurrencyPair.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_margin_uni_estimate_rate** -> dict(str, str) get_margin_uni_estimate_rate(currencies) - -Estimate interest Rate - -Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. - -### 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.MarginUniApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name - -try: - # Estimate interest Rate - api_response = api_instance.get_margin_uni_estimate_rate(currencies) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginUniApi->get_margin_uni_estimate_rate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | - -### Return type - -**dict(str, str)** - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_uni_loans** -> list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) - -List loans - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) - -try: - # List loans - api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginUniApi->list_uni_loans: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -[**list[UniLoan]**](UniLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_uni_loan** -> create_uni_loan(create_uni_loan) - -Borrow or repay - -### 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.MarginUniApi(api_client) -create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | - -try: - # Borrow or repay - api_instance.create_uni_loan(create_uni_loan) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginUniApi->create_uni_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_uni_loan** | [**CreateUniLoan**](CreateUniLoan.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Operated successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_uni_loan_records** -> list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) - -Get load records - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginUniApi(api_client) -type = 'type_example' # str | type: borrow - borrow, repay - repay (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) - -try: - # Get load records - api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginUniApi->list_uni_loan_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **str**| type: borrow - borrow, repay - repay | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **currency_pair** | **str**| Currency pair | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -[**list[UniLoanRecord]**](UniLoanRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_uni_loan_interest_records** -> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) - -List interest records - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # List interest records - api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginUniApi->list_uni_loan_interest_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_uni_borrowable** -> MaxUniBorrowable get_uni_borrowable(currency, currency_pair) - -Get maximum borrowable - -### 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.MarginUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency -currency_pair = 'BTC_USDT' # str | Currency pair - -try: - # Get maximum borrowable - api_response = api_instance.get_uni_borrowable(currency, 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 MarginUniApi->get_uni_borrowable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - **currency_pair** | **str**| Currency pair | - -### Return type - -[**MaxUniBorrowable**](MaxUniBorrowable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/MaxUniBorrowable.md b/docs/MaxUniBorrowable.md deleted file mode 100644 index 107dbab..0000000 --- a/docs/MaxUniBorrowable.md +++ /dev/null @@ -1,12 +0,0 @@ -# MaxUniBorrowable - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**borrowable** | **str** | Maximum borrowable | [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/MockFuturesOrder.md b/docs/MockFuturesOrder.md deleted file mode 100644 index 74f0821..0000000 --- a/docs/MockFuturesOrder.md +++ /dev/null @@ -1,13 +0,0 @@ -# MockFuturesOrder - -Futures order -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contract** | **str** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | -**size** | **str** | Futures quantity, representing the initial order quantity, not involved in actual settlement. | -**left** | **str** | Unfilled contract quantity, involved in actual calculation | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MockFuturesPosition.md b/docs/MockFuturesPosition.md deleted file mode 100644 index 67f559d..0000000 --- a/docs/MockFuturesPosition.md +++ /dev/null @@ -1,12 +0,0 @@ -# MockFuturesPosition - -Futures positions -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contract** | **str** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | -**size** | **str** | Position size, measured in contract units. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MockMarginResult.md b/docs/MockMarginResult.md deleted file mode 100644 index 087826b..0000000 --- a/docs/MockMarginResult.md +++ /dev/null @@ -1,17 +0,0 @@ -# MockMarginResult - -Margin result -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position | [optional] -**profit_loss_ranges** | [**list[ProfitLossRange]**](ProfitLossRange.md) | The results of 33 pressure scenarios for MR1 | [optional] -**max_loss** | [**ProfitLossRange**](.md) | 最大损失 | [optional] -**mr1** | **str** | Stress testing | [optional] -**mr2** | **str** | Basis spread risk | [optional] -**mr3** | **str** | Volatility spread risk | [optional] -**mr4** | **str** | Option short risk | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MockOptionsOrder.md b/docs/MockOptionsOrder.md deleted file mode 100644 index 4748585..0000000 --- a/docs/MockOptionsOrder.md +++ /dev/null @@ -1,13 +0,0 @@ -# MockOptionsOrder - -Option orders -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**options_name** | **str** | Option name, currently only supports options for BTC and ETH with USDT. | -**size** | **str** | Initial order quantity, not involved in actual calculation | -**left** | **str** | Unfilled contract quantity, involved in actual calculation | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MockOptionsPosition.md b/docs/MockOptionsPosition.md deleted file mode 100644 index ebecb3c..0000000 --- a/docs/MockOptionsPosition.md +++ /dev/null @@ -1,12 +0,0 @@ -# MockOptionsPosition - -Options positions -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**options_name** | **str** | Option name, currently only supports options for BTC and ETH with USDT. | -**size** | **str** | Position size, measured in contract units. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MockRiskUnit.md b/docs/MockRiskUnit.md deleted file mode 100644 index d2e5c3c..0000000 --- a/docs/MockRiskUnit.md +++ /dev/null @@ -1,19 +0,0 @@ -# MockRiskUnit - -Risk unit -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**symbol** | **str** | Risk unit name | [optional] -**spot_in_use** | **str** | Spot usage | [optional] -**maintain_margin** | **str** | Maintenance margin | [optional] -**initial_margin** | **str** | Initial margin | [optional] -**margin_result** | [**list[MockMarginResult]**](MockMarginResult.md) | Margin result | [optional] -**delta** | **str** | Total Delta of risk unit | [optional] -**gamma** | **str** | Total Gamma of risk unit | [optional] -**theta** | **str** | Total Theta of risk unit | [optional] -**vega** | **str** | Total Vega of risk unit | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MockSpotBalance.md b/docs/MockSpotBalance.md deleted file mode 100644 index c9181a0..0000000 --- a/docs/MockSpotBalance.md +++ /dev/null @@ -1,12 +0,0 @@ -# MockSpotBalance - -Spot -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | -**equity** | **str** | Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MockSpotOrder.md b/docs/MockSpotOrder.md deleted file mode 100644 index 4327a99..0000000 --- a/docs/MockSpotOrder.md +++ /dev/null @@ -1,15 +0,0 @@ -# MockSpotOrder - -Spot orders -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pairs** | **str** | Currency pair | -**order_price** | **str** | Price | -**count** | **str** | Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. | [optional] -**left** | **str** | Unfilled quantity, involved in actual calculation. | -**type** | **str** | Order type, sell - sell order, buy - buy order. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiChainAddressItem.md b/docs/MultiChainAddressItem.md deleted file mode 100644 index 5309ff3..0000000 --- a/docs/MultiChainAddressItem.md +++ /dev/null @@ -1,14 +0,0 @@ -# MultiChainAddressItem - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**chain** | **str** | Name of the chain | [optional] -**address** | **str** | Deposit address | [optional] -**payment_id** | **str** | Notes that some currencies required(e.g., Tag, Memo) when depositing | [optional] -**payment_name** | **str** | Note type, `Tag` or `Memo` | [optional] -**obtain_failed** | **int** | The obtain failed status- 0: address successfully obtained- 1: failed to obtain address | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiCollateralCurrency.md b/docs/MultiCollateralCurrency.md deleted file mode 100644 index 872dc36..0000000 --- a/docs/MultiCollateralCurrency.md +++ /dev/null @@ -1,12 +0,0 @@ -# MultiCollateralCurrency - -Borrowing and collateral currencies supported for Multi-Collateral. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**loan_currencies** | [**list[MultiLoanItem]**](MultiLoanItem.md) | List of supported borrowing currencies | [optional] -**collateral_currencies** | [**list[MultiCollateralItem]**](MultiCollateralItem.md) | List of supported collateral currencies | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiCollateralItem.md b/docs/MultiCollateralItem.md deleted file mode 100644 index 3e9ba07..0000000 --- a/docs/MultiCollateralItem.md +++ /dev/null @@ -1,12 +0,0 @@ -# MultiCollateralItem - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**discount** | **str** | Discount | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md deleted file mode 100644 index 28b5587..0000000 --- a/docs/MultiCollateralLoanApi.md +++ /dev/null @@ -1,808 +0,0 @@ -# gate_api.MultiCollateralLoanApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_multi_collateral_orders**](MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders -[**create_multi_collateral**](MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order -[**get_multi_collateral_order_detail**](MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail -[**list_multi_repay_records**](MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records -[**repay_multi_collateral_loan**](MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan -[**list_multi_collateral_records**](MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records -[**operate_multi_collateral**](MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral -[**list_user_currency_quota**](MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota -[**list_multi_collateral_currencies**](MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral -[**get_multi_collateral_ltv**](MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio -[**get_multi_collateral_fix_rate**](MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days -[**get_multi_collateral_current_rate**](MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency - - -# **list_multi_collateral_orders** -> list[MultiCollateralOrder] list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) - -List Multi-Collateral 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.MultiCollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) -sort = 'ltv_asc' # str | Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. (optional) -order_type = 'current' # str | Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders (optional) - -try: - # List Multi-Collateral Orders - api_response = api_instance.list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] - **sort** | **str**| Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. | [optional] - **order_type** | **str**| Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders | [optional] - -### Return type - -[**list[MultiCollateralOrder]**](MultiCollateralOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_multi_collateral** -> OrderResp create_multi_collateral(create_multi_collateral_order) - -Create Multi-Collateral Order - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) -create_multi_collateral_order = gate_api.CreateMultiCollateralOrder() # CreateMultiCollateralOrder | - -try: - # Create Multi-Collateral Order - api_response = api_instance.create_multi_collateral(create_multi_collateral_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->create_multi_collateral: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_multi_collateral_order** | [**CreateMultiCollateralOrder**](CreateMultiCollateralOrder.md)| | - -### Return type - -[**OrderResp**](OrderResp.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 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_multi_collateral_order_detail** -> MultiCollateralOrder get_multi_collateral_order_detail(order_id) - -Get Multi-Collateral 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.MultiCollateralLoanApi(api_client) -order_id = '12345' # str | Order ID returned on successful order creation - -try: - # Get Multi-Collateral Order Detail - api_response = api_instance.get_multi_collateral_order_detail(order_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_order_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Order ID returned on successful order creation | - -### Return type - -[**MultiCollateralOrder**](MultiCollateralOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 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_multi_repay_records** -> list[MultiRepayRecord] list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) - -List Multi-Collateral Repay Records - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) -type = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation -borrow_currency = 'USDT' # str | Borrowed currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) - -try: - # List Multi-Collateral Repay Records - api_response = api_instance.list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->list_multi_repay_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | - **borrow_currency** | **str**| Borrowed currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - -### Return type - -[**list[MultiRepayRecord]**](MultiRepayRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **repay_multi_collateral_loan** -> MultiRepayResp repay_multi_collateral_loan(repay_multi_loan) - -Repay Multi-Collateral Loan - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) -repay_multi_loan = gate_api.RepayMultiLoan() # RepayMultiLoan | - -try: - # Repay Multi-Collateral Loan - api_response = api_instance.repay_multi_collateral_loan(repay_multi_loan) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->repay_multi_collateral_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **repay_multi_loan** | [**RepayMultiLoan**](RepayMultiLoan.md)| | - -### Return type - -[**MultiRepayResp**](MultiRepayResp.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Operated successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_multi_collateral_records** -> list[MultiCollateralRecord] list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) - -Query collateral adjustment records - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) -collateral_currency = 'BTC' # str | Collateral (optional) - -try: - # Query collateral adjustment records - api_response = api_instance.list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **collateral_currency** | **str**| Collateral | [optional] - -### Return type - -[**list[MultiCollateralRecord]**](MultiCollateralRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **operate_multi_collateral** -> CollateralAdjustRes operate_multi_collateral(collateral_adjust) - -Operate Multi-Collateral - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) -collateral_adjust = gate_api.CollateralAdjust() # CollateralAdjust | - -try: - # Operate Multi-Collateral - api_response = api_instance.operate_multi_collateral(collateral_adjust) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->operate_multi_collateral: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collateral_adjust** | [**CollateralAdjust**](CollateralAdjust.md)| | - -### Return type - -[**CollateralAdjustRes**](CollateralAdjustRes.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Operated 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_user_currency_quota** -> list[CurrencyQuota] list_user_currency_quota(type, currency) - -List User Currency Quota - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) -type = 'collateral' # str | Currency types: collateral - collateral currency, borrow - borrowing currency. -currency = 'BTC' # str | When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. - -try: - # List User Currency Quota - api_response = api_instance.list_user_currency_quota(type, currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->list_user_currency_quota: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **str**| Currency types: collateral - collateral currency, borrow - borrowing currency. | - **currency** | **str**| When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. | - -### Return type - -[**list[CurrencyQuota]**](CurrencyQuota.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_multi_collateral_currencies** -> MultiCollateralCurrency list_multi_collateral_currencies() - -Query supported borrowing and collateral currencies in Multi-Collateral - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) - -try: - # Query supported borrowing and collateral currencies in Multi-Collateral - api_response = api_instance.list_multi_collateral_currencies() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_currencies: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**MultiCollateralCurrency**](MultiCollateralCurrency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_multi_collateral_ltv** -> CollateralLtv get_multi_collateral_ltv() - -Get Multi-Collateral ratio - -The Multi-Collateral ratio is fixed, irrespective of the currency. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) - -try: - # Get Multi-Collateral ratio - api_response = api_instance.get_multi_collateral_ltv() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_ltv: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**CollateralLtv**](CollateralLtv.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_multi_collateral_fix_rate** -> list[CollateralFixRate] get_multi_collateral_fix_rate() - -Query fixed interest rates for the currency for 7 days and 30 days - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) - -try: - # Query fixed interest rates for the currency for 7 days and 30 days - api_response = api_instance.get_multi_collateral_fix_rate() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_fix_rate: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[CollateralFixRate]**](CollateralFixRate.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_multi_collateral_current_rate** -> list[CollateralCurrentRate] get_multi_collateral_current_rate(currencies, vip_level=vip_level) - -Query the current interest rate of the currency - -Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MultiCollateralLoanApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. -vip_level = '0' # str | VIP level, defaults to 0 if not transferred (optional) (default to '0') - -try: - # Query the current interest rate of the currency - api_response = api_instance.get_multi_collateral_current_rate(currencies, vip_level=vip_level) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_current_rate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. | - **vip_level** | **str**| VIP level, defaults to 0 if not transferred | [optional] [default to '0'] - -### Return type - -[**list[CollateralCurrentRate]**](CollateralCurrentRate.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/MultiCollateralOrder.md b/docs/MultiCollateralOrder.md deleted file mode 100644 index 0c5ebee..0000000 --- a/docs/MultiCollateralOrder.md +++ /dev/null @@ -1,24 +0,0 @@ -# MultiCollateralOrder - -Multi-Collateral Order -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**order_type** | **str** | current - current, fixed - fixed | [optional] -**fixed_type** | **str** | Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. | [optional] -**fixed_rate** | **str** | Fixed interest rate | [optional] -**expire_time** | **int** | Expiration time, timestamp, unit in seconds. | [optional] -**auto_renew** | **bool** | Fixed interest rate, automatic renewal | [optional] -**auto_repay** | **bool** | Fixed interest rate, automatic repayment | [optional] -**current_ltv** | **str** | The current collateralization rate | [optional] -**status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] -**total_left_repay_usdt** | **str** | Value of Left repay amount converted in USDT | [optional] -**total_left_collateral_usdt** | **str** | Value of Collateral amount in USDT | [optional] -**borrow_currencies** | [**list[BorrowCurrencyInfo]**](BorrowCurrencyInfo.md) | Borrowing Currency List | [optional] -**collateral_currencies** | [**list[CollateralCurrencyInfo]**](CollateralCurrencyInfo.md) | Collateral Currency List | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiCollateralRecord.md b/docs/MultiCollateralRecord.md deleted file mode 100644 index 4f79e11..0000000 --- a/docs/MultiCollateralRecord.md +++ /dev/null @@ -1,17 +0,0 @@ -# MultiCollateralRecord - -Multi-Collateral adjustment record. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Collateral record ID | [optional] -**before_ltv** | **str** | The collateral ratio before adjustment | [optional] -**after_ltv** | **str** | The collateral ratio before adjustment | [optional] -**operate_time** | **int** | Operation time, timestamp in seconds. | [optional] -**borrow_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Borrowing Currency List | [optional] -**collateral_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Collateral Currency List | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiCollateralRecordCurrency.md b/docs/MultiCollateralRecordCurrency.md deleted file mode 100644 index 7c622f8..0000000 --- a/docs/MultiCollateralRecordCurrency.md +++ /dev/null @@ -1,15 +0,0 @@ -# MultiCollateralRecordCurrency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**before_amount** | **str** | Amount before the operation | [optional] -**before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] -**after_amount** | **str** | Amount after the operation. | [optional] -**after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiLoanItem.md b/docs/MultiLoanItem.md deleted file mode 100644 index 3c45fc2..0000000 --- a/docs/MultiLoanItem.md +++ /dev/null @@ -1,11 +0,0 @@ -# MultiLoanItem - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**price** | **str** | Latest price of the currency | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiLoanRepayItem.md b/docs/MultiLoanRepayItem.md deleted file mode 100644 index df0f95b..0000000 --- a/docs/MultiLoanRepayItem.md +++ /dev/null @@ -1,12 +0,0 @@ -# MultiLoanRepayItem - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency | [optional] -**amount** | **str** | Size | [optional] -**repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial 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/MultiRepayRecord.md b/docs/MultiRepayRecord.md deleted file mode 100644 index 715ee36..0000000 --- a/docs/MultiRepayRecord.md +++ /dev/null @@ -1,22 +0,0 @@ -# MultiRepayRecord - -Mult Repay Record -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Repayment record ID | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**before_ltv** | **str** | Ltv before the operation | [optional] -**after_ltv** | **str** | Ltv after the operation | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] -**repay_time** | **int** | Repayment time, timestamp in seconds. | [optional] -**borrow_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of borrowing information | [optional] -**collateral_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of collateral information | [optional] -**repaid_currencies** | [**list[RepayRecordRepaidCurrency]**](RepayRecordRepaidCurrency.md) | Repay Currency List | [optional] -**total_interest_list** | [**list[RepayRecordTotalInterest]**](RepayRecordTotalInterest.md) | Total Interest List | [optional] -**left_repay_interest_list** | [**list[RepayRecordLeftInterest]**](RepayRecordLeftInterest.md) | List of left repay interest | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MultiRepayResp.md b/docs/MultiRepayResp.md deleted file mode 100644 index 6315962..0000000 --- a/docs/MultiRepayResp.md +++ /dev/null @@ -1,12 +0,0 @@ -# MultiRepayResp - -Repay Multi-Collateral Loan -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**repaid_currencies** | [**list[RepayCurrencyRes]**](RepayCurrencyRes.md) | Repay Currency List | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MyFuturesTrade.md b/docs/MyFuturesTrade.md deleted file mode 100644 index 431447d..0000000 --- a/docs/MyFuturesTrade.md +++ /dev/null @@ -1,20 +0,0 @@ -# MyFuturesTrade - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] -**contract** | **str** | Futures contract | [optional] -**order_id** | **str** | Order ID related | [optional] -**size** | **int** | Trading size | [optional] -**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] -**price** | **str** | Trading price | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] -**text** | **str** | User defined information | [optional] -**fee** | **str** | Fee deducted | [optional] -**point_fee** | **str** | Points used to deduct fee | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MyFuturesTradeTimeRange.md b/docs/MyFuturesTradeTimeRange.md deleted file mode 100644 index 14c8d62..0000000 --- a/docs/MyFuturesTradeTimeRange.md +++ /dev/null @@ -1,20 +0,0 @@ -# MyFuturesTradeTimeRange - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**trade_id** | **str** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] -**contract** | **str** | Futures contract | [optional] -**order_id** | **str** | Order ID related | [optional] -**size** | **int** | Trading size | [optional] -**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] -**price** | **str** | Trading price | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] -**text** | **str** | User defined information | [optional] -**fee** | **str** | Fee deducted | [optional] -**point_fee** | **str** | Points used to deduct fee | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OpenOrders.md b/docs/OpenOrders.md deleted file mode 100644 index 8c14eb2..0000000 --- a/docs/OpenOrders.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenOrders - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**total** | **int** | The total number of pending orders for this trading pair on the current page | [optional] -**orders** | [**list[Order]**](Order.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsAccount.md b/docs/OptionsAccount.md deleted file mode 100644 index b5e08dc..0000000 --- a/docs/OptionsAccount.md +++ /dev/null @@ -1,28 +0,0 @@ -# OptionsAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **int** | User ID | [optional] -**total** | **str** | Account balance | [optional] -**position_value** | **str** | Position value, long position value is positive, short position value is negative | [optional] -**equity** | **str** | Account equity, the sum of account balance and position value | [optional] -**short_enabled** | **bool** | If the account is allowed to short | [optional] -**mmp_enabled** | **bool** | Whether to enable MMP | [optional] -**liq_triggered** | **bool** | Whether to trigger position liquidation | [optional] -**margin_mode** | **int** | | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 | [optional] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] -**init_margin** | **str** | Initial position margin | [optional] -**maint_margin** | **str** | Position maintenance margin | [optional] -**order_margin** | **str** | Order margin of unfinished orders | [optional] -**ask_order_margin** | **str** | Margin for outstanding sell orders | [optional] -**bid_order_margin** | **str** | Margin for outstanding buy orders | [optional] -**available** | **str** | Available balance to transfer out or trade | [optional] -**point** | **str** | POINT amount | [optional] -**currency** | **str** | Settle currency | [optional] -**orders_limit** | **int** | Maximum number of outstanding orders | [optional] -**position_notional_limit** | **int** | Notional value upper limit, including the nominal value of positions and outstanding orders | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsAccountBook.md b/docs/OptionsAccountBook.md deleted file mode 100644 index 2b4a4a5..0000000 --- a/docs/OptionsAccountBook.md +++ /dev/null @@ -1,14 +0,0 @@ -# OptionsAccountBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **float** | Change time | [optional] -**change** | **str** | Amount changed (USDT) | [optional] -**balance** | **str** | Account total balance after change (USDT) | [optional] -**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] -**text** | **str** | custom text | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md deleted file mode 100644 index c72a395..0000000 --- a/docs/OptionsApi.md +++ /dev/null @@ -1,1892 +0,0 @@ -# gate_api.OptionsApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings -[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times -[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time -[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail -[**list_options_settlements**](OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history -[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement -[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements -[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book -[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts -[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker -[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks -[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying -[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history -[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account -[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history -[**list_options_positions**](OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying -[**get_options_position**](OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position -[**list_options_position_close**](OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying -[**list_options_orders**](OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders -[**create_options_order**](OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order -[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched -[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order -[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order -[**countdown_cancel_all_options**](OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders -[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history -[**get_options_mmp**](OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query -[**set_options_mmp**](OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings -[**reset_options_mmp**](OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset - - -# **list_options_underlyings** -> list[OptionsUnderlying] list_options_underlyings() - -List all underlyings - -### 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.OptionsApi(api_client) - -try: - # List all underlyings - api_response = api_instance.list_options_underlyings() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_underlyings: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[OptionsUnderlying]**](OptionsUnderlying.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_expirations** -> list[int] list_options_expirations(underlying) - -List all expiration times - -### 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.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) - -try: - # List all expiration times - api_response = api_instance.list_options_expirations(underlying) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_expirations: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - -### Return type - -**list[int]** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List expiration times of specified underlying | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_contracts** -> list[OptionsContract] list_options_contracts(underlying, expiration=expiration) - -List all the contracts with specified underlying and expiration time - -### 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.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -expiration = 1636588800 # int | Unix timestamp of the expiration time (optional) - -try: - # List all the contracts with specified underlying and expiration time - api_response = api_instance.list_options_contracts(underlying, expiration=expiration) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_contracts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **expiration** | **int**| Unix timestamp of the expiration time | [optional] - -### Return type - -[**list[OptionsContract]**](OptionsContract.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_options_contract** -> OptionsContract get_options_contract(contract) - -Query specified contract detail - -### 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.OptionsApi(api_client) -contract = 'BTC_USDT-20211130-65000-C' # str | - -try: - # Query specified contract detail - api_response = api_instance.get_options_contract(contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->get_options_contract: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contract** | **str**| | - -### Return type - -[**OptionsContract**](OptionsContract.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_settlements** -> list[OptionsSettlement] list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) - -List settlement history - -### 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.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # List settlement history - api_response = api_instance.list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_settlements: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[OptionsSettlement]**](OptionsSettlement.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_options_settlement** -> OptionsSettlement get_options_settlement(contract, underlying, at) - -Get specified contract's settlement - -### 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.OptionsApi(api_client) -contract = 'BTC_USDT-20211130-65000-C' # str | -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -at = 56 # int | - -try: - # Get specified contract's settlement - api_response = api_instance.get_options_settlement(contract, underlying, at) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->get_options_settlement: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contract** | **str**| | - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **at** | **int**| | - -### Return type - -[**OptionsSettlement**](OptionsSettlement.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_my_options_settlements** -> list[OptionsMySettlements] list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) - -List my options settlements - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # List my options settlements - api_response = api_instance.list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_my_options_settlements: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **contract** | **str**| Options contract name | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[OptionsMySettlements]**](OptionsMySettlements.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_order_book** -> FuturesOrderBook list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) - -Options order book - -Bids will be sorted by price from high to low, while asks sorted reversely - -### 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.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) - -try: - # Options order book - api_response = api_instance.list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_order_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] - -### Return type - -[**FuturesOrderBook**](FuturesOrderBook.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order book retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_tickers** -> list[OptionsTicker] list_options_tickers(underlying) - -List tickers of options contracts - -### 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.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) - -try: - # List tickers of options contracts - api_response = api_instance.list_options_tickers(underlying) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_tickers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - -### Return type - -[**list[OptionsTicker]**](OptionsTicker.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_underlying_tickers** -> OptionsUnderlyingTicker list_options_underlying_tickers(underlying) - -Get underlying ticker - -### 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.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying - -try: - # Get underlying ticker - api_response = api_instance.list_options_underlying_tickers(underlying) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_underlying_tickers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying | - -### Return type - -[**OptionsUnderlyingTicker**](OptionsUnderlyingTicker.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_candlesticks** -> list[OptionsCandlestick] list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) - -Get options candlesticks - -### 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.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -interval = '5m' # str | Interval time between data points (optional) (default to '5m') - -try: - # Get options candlesticks - api_response = api_instance.list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_candlesticks: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **interval** | **str**| Interval time between data points | [optional] [default to '5m'] - -### Return type - -[**list[OptionsCandlestick]**](OptionsCandlestick.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_underlying_candlesticks** -> list[FuturesCandlestick] list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) - -Mark price candlesticks of an underlying - -### 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.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -interval = '5m' # str | Interval time between data points (optional) (default to '5m') - -try: - # Mark price candlesticks of an underlying - api_response = api_instance.list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_underlying_candlesticks: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **interval** | **str**| Interval time between data points | [optional] [default to '5m'] - -### Return type - -[**list[FuturesCandlestick]**](FuturesCandlestick.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_trades** -> list[FuturesTrade] list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) - -Options trade history - -### 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.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -type = '1546935600' # str | `C` is call, while `P` is put (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # Options trade history - api_response = api_instance.list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | [optional] - **type** | **str**| `C` is call, while `P` is put | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[FuturesTrade]**](FuturesTrade.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_account** -> OptionsAccount list_options_account() - -List options account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) - -try: - # List options account - api_response = api_instance.list_options_account() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_account: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**OptionsAccount**](OptionsAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_account_book** -> list[OptionsAccountBook] list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) - -List account changing history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL (optional) - -try: - # List account changing history - api_response = api_instance.list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_account_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL | [optional] - -### Return type - -[**list[OptionsAccountBook]**](OptionsAccountBook.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_positions** -> list[OptionsPosition] list_options_positions(underlying=underlying) - -List user's positions of specified underlying - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (optional) - -try: - # List user's positions of specified underlying - api_response = api_instance.list_options_positions(underlying=underlying) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_positions: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying | [optional] - -### Return type - -[**list[OptionsPosition]**](OptionsPosition.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_options_position** -> OptionsPosition get_options_position(contract) - -Get specified contract position - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20211130-65000-C' # str | - -try: - # Get specified contract position - api_response = api_instance.get_options_position(contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->get_options_position: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contract** | **str**| | - -### Return type - -[**OptionsPosition**](OptionsPosition.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_position_close** -> list[OptionsPositionClose] list_options_position_close(underlying, contract=contract) - -List user's liquidation history of specified underlying - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) - -try: - # List user's liquidation history of specified underlying - api_response = api_instance.list_options_position_close(underlying, contract=contract) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_position_close: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **contract** | **str**| Options contract name | [optional] - -### Return type - -[**list[OptionsPositionClose]**](OptionsPositionClose.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_options_orders** -> list[OptionsOrder] list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) - -List options 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.OptionsApi(api_client) -status = 'open' # str | Only list the orders with this status -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -underlying = 'BTC_USDT' # str | Underlying (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # List options orders - api_response = api_instance.list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_options_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Options contract name | [optional] - **underlying** | **str**| Underlying | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[OptionsOrder]**](OptionsOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_options_order** -> OptionsOrder create_options_order(options_order) - -Create an options 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.OptionsApi(api_client) -options_order = gate_api.OptionsOrder() # OptionsOrder | - -try: - # Create an options order - api_response = api_instance.create_options_order(options_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->create_options_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **options_order** | [**OptionsOrder**](OptionsOrder.md)| | - -### Return type - -[**OptionsOrder**](OptionsOrder.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 detail | - | - -[[Back to top]](#) [[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_options_orders** -> list[OptionsOrder] cancel_options_orders(contract=contract, underlying=underlying, side=side) - -Cancel all `open` orders matched - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -underlying = 'BTC_USDT' # str | Underlying (optional) -side = 'ask' # str | All bids or asks. Both included if not specified (optional) - -try: - # Cancel all `open` orders matched - api_response = api_instance.cancel_options_orders(contract=contract, underlying=underlying, 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 OptionsApi->cancel_options_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | [optional] - **underlying** | **str**| Underlying | [optional] - **side** | **str**| All bids or asks. Both included if not specified | [optional] - -### Return type - -[**list[OptionsOrder]**](OptionsOrder.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** | All orders matched 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) - -# **get_options_order** -> OptionsOrder get_options_order(order_id) - -Get a single 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.OptionsApi(api_client) -order_id = 12345 # int | Order ID returned on successful order creation - -try: - # Get a single order - api_response = api_instance.get_options_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 OptionsApi->get_options_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation | - -### Return type - -[**OptionsOrder**](OptionsOrder.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 detail | - | - -[[Back to top]](#) [[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_options_order** -> OptionsOrder cancel_options_order(order_id) - -Cancel a single 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.OptionsApi(api_client) -order_id = 12345 # int | Order ID returned on successful order creation - -try: - # Cancel a single order - api_response = api_instance.cancel_options_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 OptionsApi->cancel_options_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation | - -### Return type - -[**OptionsOrder**](OptionsOrder.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 detail | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **countdown_cancel_all_options** -> TriggerTime countdown_cancel_all_options(countdown_cancel_all_options_task) - -Countdown cancel orders - -Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -countdown_cancel_all_options_task = gate_api.CountdownCancelAllOptionsTask() # CountdownCancelAllOptionsTask | - -try: - # Countdown cancel orders - api_response = api_instance.countdown_cancel_all_options(countdown_cancel_all_options_task) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->countdown_cancel_all_options: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **countdown_cancel_all_options_task** | [**CountdownCancelAllOptionsTask**](CountdownCancelAllOptionsTask.md)| | - -### Return type - -[**TriggerTime**](TriggerTime.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Set countdown successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_my_options_trades** -> list[OptionsMyTrade] list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) - -List personal trading history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # List personal trading history - api_response = api_instance.list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->list_my_options_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **contract** | **str**| Options contract name | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[OptionsMyTrade]**](OptionsMyTrade.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_options_mmp** -> list[OptionsMMP] get_options_mmp(underlying=underlying) - -MMP Query - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (optional) - -try: - # MMP Query - api_response = api_instance.get_options_mmp(underlying=underlying) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->get_options_mmp: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying | [optional] - -### Return type - -[**list[OptionsMMP]**](OptionsMMP.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_options_mmp** -> OptionsMMP set_options_mmp(options_mmp) - -MMP Settings - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -options_mmp = gate_api.OptionsMMP() # OptionsMMP | - -try: - # MMP Settings - api_response = api_instance.set_options_mmp(options_mmp) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->set_options_mmp: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **options_mmp** | [**OptionsMMP**](OptionsMMP.md)| | - -### Return type - -[**OptionsMMP**](OptionsMMP.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | MMP Information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **reset_options_mmp** -> OptionsMMP reset_options_mmp(options_mmp_reset) - -MMP Reset - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.OptionsApi(api_client) -options_mmp_reset = gate_api.OptionsMMPReset() # OptionsMMPReset | - -try: - # MMP Reset - api_response = api_instance.reset_options_mmp(options_mmp_reset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling OptionsApi->reset_options_mmp: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **options_mmp_reset** | [**OptionsMMPReset**](OptionsMMPReset.md)| | - -### Return type - -[**OptionsMMP**](OptionsMMP.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | MMP Information | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/OptionsCandlestick.md b/docs/OptionsCandlestick.md deleted file mode 100644 index 963ccda..0000000 --- a/docs/OptionsCandlestick.md +++ /dev/null @@ -1,16 +0,0 @@ -# OptionsCandlestick - -data point in every timestamp -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] -**c** | **str** | Close price (quote currency, unit: underlying corresponding option price) | [optional] -**h** | **str** | Highest price (quote currency, unit: underlying corresponding option price) | [optional] -**l** | **str** | Lowest price (quote currency, unit: underlying corresponding option price) | [optional] -**o** | **str** | Open price (quote currency, unit: underlying corresponding option 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/OptionsContract.md b/docs/OptionsContract.md deleted file mode 100644 index ee11273..0000000 --- a/docs/OptionsContract.md +++ /dev/null @@ -1,35 +0,0 @@ -# OptionsContract - -Options contract detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Options contract name | [optional] -**tag** | **str** | tag | [optional] -**create_time** | **float** | Creation time | [optional] -**expiration_time** | **float** | Expiration time | [optional] -**is_call** | **bool** | `true` means call options, while `false` is put options | [optional] -**multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] -**underlying** | **str** | Underlying | [optional] -**underlying_price** | **str** | Underlying price (quote currency) | [optional] -**last_price** | **str** | Last trading price | [optional] -**mark_price** | **str** | Current mark price (quote currency) | [optional] -**index_price** | **str** | Current index price (quote currency) | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] -**taker_fee_rate** | **str** | Taker fee rate | [optional] -**order_price_round** | **str** | Minimum order price increment | [optional] -**mark_price_round** | **str** | Minimum mark price increment | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed | [optional] -**order_price_deviate** | **str** | The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate | [optional] -**orderbook_id** | **int** | Current orderbook ID | [optional] -**trade_id** | **int** | Current trade ID | [optional] -**trade_size** | **int** | Historical accumulated trade size | [optional] -**position_size** | **int** | Current total long position size | [optional] -**orders_limit** | **int** | Maximum number of open orders | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsMMP.md b/docs/OptionsMMP.md deleted file mode 100644 index 9b9cf63..0000000 --- a/docs/OptionsMMP.md +++ /dev/null @@ -1,17 +0,0 @@ -# OptionsMMP - -MMP Settings -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**underlying** | **str** | Underlying | -**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | -**frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | -**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | -**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | -**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] -**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsMMPReset.md b/docs/OptionsMMPReset.md deleted file mode 100644 index 28f91f9..0000000 --- a/docs/OptionsMMPReset.md +++ /dev/null @@ -1,17 +0,0 @@ -# OptionsMMPReset - -MMP Reset -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**underlying** | **str** | Underlying | -**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | [optional] [readonly] -**frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | [optional] [readonly] -**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | [optional] [readonly] -**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | [optional] [readonly] -**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] -**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsMySettlements.md b/docs/OptionsMySettlements.md deleted file mode 100644 index fc2ef9d..0000000 --- a/docs/OptionsMySettlements.md +++ /dev/null @@ -1,18 +0,0 @@ -# OptionsMySettlements - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **float** | Settlement time | [optional] -**underlying** | **str** | Underlying | [optional] -**contract** | **str** | Options contract name | [optional] -**strike_price** | **str** | Strike price (quote currency) | [optional] -**settle_price** | **str** | Settlement price (quote currency) | [optional] -**size** | **int** | Size | [optional] -**settle_profit** | **str** | Settlement profit (quote currency) | [optional] -**fee** | **str** | Fee (quote currency) | [optional] -**realised_pnl** | **str** | The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsMyTrade.md b/docs/OptionsMyTrade.md deleted file mode 100644 index 44eb069..0000000 --- a/docs/OptionsMyTrade.md +++ /dev/null @@ -1,17 +0,0 @@ -# OptionsMyTrade - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] -**contract** | **str** | Options contract name | [optional] -**order_id** | **int** | Order ID related | [optional] -**size** | **int** | Trading size | [optional] -**price** | **str** | Trading price (quote currency) | [optional] -**underlying_price** | **str** | Underlying price (quote currency) | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsOrder.md b/docs/OptionsOrder.md deleted file mode 100644 index 7c2bdef..0000000 --- a/docs/OptionsOrder.md +++ /dev/null @@ -1,35 +0,0 @@ -# OptionsOrder - -Options order detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Options order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time of order | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] -**finish_as** | **str** | Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled | [optional] [readonly] -**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Contract name | -**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | -**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` (USDT) | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] -**is_close** | **bool** | Is the order to close position | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] -**mmp** | **bool** | When set to true, delegate to MMP | [optional] [default to False] -**is_mmp** | **bool** | Whether it is MMP delegation. Corresponds to `mmp` in the request. | [optional] [readonly] -**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded | [optional] [readonly] -**fill_price** | **str** | Fill price of the order | [optional] [readonly] -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] -**tkfr** | **str** | Taker fee | [optional] [readonly] -**mkfr** | **str** | Maker fee | [optional] [readonly] -**refu** | **int** | Reference user ID | [optional] [readonly] -**refr** | **str** | Referrer rebate | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsPosition.md b/docs/OptionsPosition.md deleted file mode 100644 index 282039d..0000000 --- a/docs/OptionsPosition.md +++ /dev/null @@ -1,26 +0,0 @@ -# OptionsPosition - -Options position information -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **int** | User ID | [optional] [readonly] -**underlying** | **str** | Underlying | [optional] [readonly] -**underlying_price** | **str** | Underlying price (quote currency) | [optional] [readonly] -**contract** | **str** | Options contract name | [optional] [readonly] -**size** | **int** | Position size (contract size) | [optional] [readonly] -**entry_price** | **str** | Entry size (quote currency) | [optional] [readonly] -**mark_price** | **str** | Current mark price (quote currency) | [optional] [readonly] -**mark_iv** | **str** | Implied volatility | [optional] [readonly] -**realised_pnl** | **str** | Realized PNL | [optional] [readonly] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] -**pending_orders** | **int** | Current open orders | [optional] [readonly] -**close_order** | [**OptionsPositionCloseOrder**](OptionsPositionCloseOrder.md) | | [optional] -**delta** | **str** | Delta | [optional] [readonly] -**gamma** | **str** | Gamma | [optional] [readonly] -**vega** | **str** | Vega | [optional] [readonly] -**theta** | **str** | Theta | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsPositionClose.md b/docs/OptionsPositionClose.md deleted file mode 100644 index bf5479d..0000000 --- a/docs/OptionsPositionClose.md +++ /dev/null @@ -1,15 +0,0 @@ -# OptionsPositionClose - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **float** | Position close time | [optional] [readonly] -**contract** | **str** | Options contract name | [optional] [readonly] -**side** | **str** | Position side, long or short | [optional] [readonly] -**pnl** | **str** | PNL | [optional] [readonly] -**text** | **str** | Text of close order | [optional] [readonly] -**settle_size** | **str** | settlement size | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsPositionCloseOrder.md b/docs/OptionsPositionCloseOrder.md deleted file mode 100644 index 53044b1..0000000 --- a/docs/OptionsPositionCloseOrder.md +++ /dev/null @@ -1,13 +0,0 @@ -# OptionsPositionCloseOrder - -Current close order if any, or `null` -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Close order ID | [optional] -**price** | **str** | Close order price (quote currency) | [optional] -**is_liq** | **bool** | Is the close order from liquidation | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsSettlement.md b/docs/OptionsSettlement.md deleted file mode 100644 index 6e5b8b6..0000000 --- a/docs/OptionsSettlement.md +++ /dev/null @@ -1,15 +0,0 @@ -# OptionsSettlement - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **float** | Last changed time of configuration | [optional] -**contract** | **str** | Options contract name | [optional] -**profit** | **str** | Settlement profit per size (quote currency) | [optional] -**fee** | **str** | Settlement fee per size (quote currency) | [optional] -**strike_price** | **str** | Strike price (quote currency) | [optional] -**settle_price** | **str** | Settlement price (quote currency) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsTicker.md b/docs/OptionsTicker.md deleted file mode 100644 index 43b4b46..0000000 --- a/docs/OptionsTicker.md +++ /dev/null @@ -1,28 +0,0 @@ -# OptionsTicker - -Options contract detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Options contract name | [optional] -**last_price** | **str** | Last trading price (quote currency) | [optional] -**mark_price** | **str** | Current mark price (quote currency) | [optional] -**index_price** | **str** | Current index price (quote currency) | [optional] -**ask1_size** | **int** | Best ask size | [optional] -**ask1_price** | **str** | Best ask price | [optional] -**bid1_size** | **int** | Best bid size | [optional] -**bid1_price** | **str** | Best bid price | [optional] -**position_size** | **int** | Current total long position size | [optional] -**mark_iv** | **str** | Implied volatility | [optional] -**bid_iv** | **str** | Bid side implied volatility | [optional] -**ask_iv** | **str** | Ask side implied volatility | [optional] -**leverage** | **str** | Current leverage. Formula: underlying_price / mark_price * delta | [optional] -**delta** | **str** | Delta | [optional] -**gamma** | **str** | Gamma | [optional] -**vega** | **str** | Vega | [optional] -**theta** | **str** | Theta | [optional] -**rho** | **str** | Rho | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsUnderlying.md b/docs/OptionsUnderlying.md deleted file mode 100644 index 30897a6..0000000 --- a/docs/OptionsUnderlying.md +++ /dev/null @@ -1,11 +0,0 @@ -# OptionsUnderlying - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Underlying name | [optional] -**index_price** | **str** | Spot index price (quote currency) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OptionsUnderlyingTicker.md b/docs/OptionsUnderlyingTicker.md deleted file mode 100644 index 07be739..0000000 --- a/docs/OptionsUnderlyingTicker.md +++ /dev/null @@ -1,13 +0,0 @@ -# OptionsUnderlyingTicker - -Options underlying detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**trade_put** | **int** | Total put options trades amount in last 24h | [optional] -**trade_call** | **int** | Total call options trades amount in last 24h | [optional] -**index_price** | **str** | Index price (quote currency) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Order.md b/docs/Order.md deleted file mode 100644 index 868bf2f..0000000 --- a/docs/Order.md +++ /dev/null @@ -1,46 +0,0 @@ -# Order - -Spot order details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] [readonly] -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] -**create_time** | **str** | Creation time of order | [optional] [readonly] -**update_time** | **str** | Last modification time of order | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] -**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair | -**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] -**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Order side | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**price** | **str** | Price can't be empty when `type`= `limit` | [optional] -**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] -**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] -**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price | [optional] [readonly] -**fee** | **str** | Fee deducted | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] -**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly] -**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] -**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**finish_as** | **str** | Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown | [optional] [readonly] -**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderBook.md b/docs/OrderBook.md deleted file mode 100644 index 1cd4f55..0000000 --- a/docs/OrderBook.md +++ /dev/null @@ -1,14 +0,0 @@ -# OrderBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` | [optional] -**current** | **int** | The timestamp of the response data being generated (in milliseconds) | [optional] -**update** | **int** | The timestamp of when the orderbook last changed (in milliseconds) | [optional] -**asks** | **list[list[str]]** | Asks order depth | -**bids** | **list[list[str]]** | Bids order depth | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderCancel.md b/docs/OrderCancel.md deleted file mode 100644 index 8cb355a..0000000 --- a/docs/OrderCancel.md +++ /dev/null @@ -1,49 +0,0 @@ -# OrderCancel - -Spot order details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] [readonly] -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] -**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] -**label** | **str** | Error label, if any, otherwise an empty string | [optional] -**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] -**create_time** | **str** | Creation time of order | [optional] [readonly] -**update_time** | **str** | Last modification time of order | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] -**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair | -**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] -**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Order side | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**price** | **str** | Price can't be empty when `type`= `limit` | [optional] -**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] -**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] -**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price | [optional] [readonly] -**fee** | **str** | Fee deducted | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] -**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly] -**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] -**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] -**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md deleted file mode 100644 index 81969b0..0000000 --- a/docs/OrderPatch.md +++ /dev/null @@ -1,16 +0,0 @@ -# OrderPatch - -Spot order details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**account** | **str** | Specify query account. | [optional] -**amount** | **str** | New order amount. `amount` and `price` must specify one of them | [optional] -**price** | **str** | New order price. `amount` and `Price` must specify one of them\" | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] -**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderResp.md b/docs/OrderResp.md deleted file mode 100644 index c89354c..0000000 --- a/docs/OrderResp.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrderResp - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PartnerCommissionHistory.md b/docs/PartnerCommissionHistory.md deleted file mode 100644 index 06a4443..0000000 --- a/docs/PartnerCommissionHistory.md +++ /dev/null @@ -1,11 +0,0 @@ -# PartnerCommissionHistory - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PartnerSub.md b/docs/PartnerSub.md deleted file mode 100644 index bc191d9..0000000 --- a/docs/PartnerSub.md +++ /dev/null @@ -1,12 +0,0 @@ -# PartnerSub - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**user_join_time** | **int** | The time when the user joined the system, in seconds Unix timestamp | [optional] -**type** | **int** | Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PartnerSubList.md b/docs/PartnerSubList.md deleted file mode 100644 index c77bc6f..0000000 --- a/docs/PartnerSubList.md +++ /dev/null @@ -1,11 +0,0 @@ -# PartnerSubList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[PartnerSub]**](PartnerSub.md) | Subordinate list | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PartnerTransactionHistory.md b/docs/PartnerTransactionHistory.md deleted file mode 100644 index 707f40b..0000000 --- a/docs/PartnerTransactionHistory.md +++ /dev/null @@ -1,11 +0,0 @@ -# PartnerTransactionHistory - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PatchUniLend.md b/docs/PatchUniLend.md deleted file mode 100644 index b622196..0000000 --- a/docs/PatchUniLend.md +++ /dev/null @@ -1,11 +0,0 @@ -# PatchUniLend - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**min_rate** | **str** | Minimum interest rate | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlaceDualInvestmentOrder.md b/docs/PlaceDualInvestmentOrder.md deleted file mode 100644 index 55944b5..0000000 --- a/docs/PlaceDualInvestmentOrder.md +++ /dev/null @@ -1,15 +0,0 @@ -# PlaceDualInvestmentOrder - -Dual Investment order -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plan_id** | **str** | Plan ID | -**copies** | **str** | The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. | [optional] -**is_max** | **int** | Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. | [optional] -**amount** | **str** | Subscription amount, mutually exclusive with the copies field | -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] - -[[Back to Model list]](../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 deleted file mode 100644 index 8606015..0000000 --- a/docs/Position.md +++ /dev/null @@ -1,41 +0,0 @@ -# Position - -Futures position details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **int** | User ID | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**size** | **int** | Position size | [optional] [readonly] -**leverage** | **str** | Position leverage. 0 means cross margin; positive number means isolated margin | [optional] -**risk_limit** | **str** | Position risk limit | [optional] -**leverage_max** | **str** | Maximum leverage under current risk limit | [optional] [readonly] -**maintenance_rate** | **str** | Maintenance rate under current risk limit | [optional] [readonly] -**value** | **str** | Position value calculated in settlement currency | [optional] [readonly] -**margin** | **str** | Position margin | [optional] -**entry_price** | **str** | Entry price | [optional] [readonly] -**liq_price** | **str** | Liquidation price | [optional] [readonly] -**mark_price** | **str** | Current mark price | [optional] [readonly] -**initial_margin** | **str** | The initial margin occupied by the position, applicable to the portfolio margin account | [optional] [readonly] -**maintenance_margin** | **str** | Maintenance margin required for the position, applicable to portfolio margin account | [optional] [readonly] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] -**realised_pnl** | **str** | Realized PNL | [optional] [readonly] -**pnl_pnl** | **str** | Realized PNL - Position P/L | [optional] [readonly] -**pnl_fund** | **str** | Realized PNL - Funding Fees | [optional] [readonly] -**pnl_fee** | **str** | Realized PNL - Transaction Fees | [optional] [readonly] -**history_pnl** | **str** | History realized PNL | [optional] [readonly] -**last_close_pnl** | **str** | PNL of last position close | [optional] [readonly] -**realised_point** | **str** | Realized POINT PNL | [optional] [readonly] -**history_point** | **str** | History realized POINT PNL | [optional] [readonly] -**adl_ranking** | **int** | Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation | [optional] [readonly] -**pending_orders** | **int** | Current open orders | [optional] [readonly] -**close_order** | [**PositionCloseOrder**](PositionCloseOrder.md) | | [optional] -**mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional] -**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional] -**update_time** | **int** | Last update time | [optional] [readonly] -**update_id** | **int** | Update id. Each time the position is updated, the value will be +1. | [optional] [readonly] -**open_time** | **int** | First Open 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/PositionClose.md b/docs/PositionClose.md deleted file mode 100644 index 196b7b8..0000000 --- a/docs/PositionClose.md +++ /dev/null @@ -1,22 +0,0 @@ -# PositionClose - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **float** | Position close time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**side** | **str** | Position side, long or short | [optional] [readonly] -**pnl** | **str** | PNL | [optional] [readonly] -**pnl_pnl** | **str** | PNL - Position P/L | [optional] [readonly] -**pnl_fund** | **str** | PNL - Funding Fees | [optional] [readonly] -**pnl_fee** | **str** | PNL - Transaction Fees | [optional] [readonly] -**text** | **str** | Text of close order | [optional] [readonly] -**max_size** | **str** | Max Trade Size | [optional] [readonly] -**accum_size** | **str** | Cumulative closed position volume | [optional] [readonly] -**first_open_time** | **int** | First Open Time | [optional] [readonly] -**long_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. | [optional] [readonly] -**short_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PositionCloseOrder.md b/docs/PositionCloseOrder.md deleted file mode 100644 index 6f5540d..0000000 --- a/docs/PositionCloseOrder.md +++ /dev/null @@ -1,13 +0,0 @@ -# PositionCloseOrder - -Current close order if any, or `null` -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Close order ID | [optional] -**price** | **str** | Close order price | [optional] -**is_liq** | **bool** | Is the close order from liquidation | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProfitLossRange.md b/docs/ProfitLossRange.md deleted file mode 100644 index e48908d..0000000 --- a/docs/ProfitLossRange.md +++ /dev/null @@ -1,13 +0,0 @@ -# ProfitLossRange - -Profit and loss range -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**price_percentage** | **str** | Percentage change in price | [optional] -**implied_volatility_percentage** | **str** | Percentage change in implied volatility | [optional] -**profit_loss** | **str** | PNL | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RebateApi.md b/docs/RebateApi.md deleted file mode 100644 index e75796c..0000000 --- a/docs/RebateApi.md +++ /dev/null @@ -1,692 +0,0 @@ -# gate_api.RebateApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user -[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user -[**partner_transaction_history**](RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users -[**partner_commissions_history**](RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users -[**partner_sub_list**](RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list -[**rebate_broker_commission_history**](RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records -[**rebate_broker_transaction_history**](RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history -[**rebate_user_info**](RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information -[**user_sub_relation**](RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship - - -# **agency_transaction_history** -> list[AgencyTransactionHistory] agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - -The agency obtains the transaction history of the recommended user - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # The agency obtains the transaction history of the recommended user - api_response = api_instance.agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->agency_transaction_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[AgencyTransactionHistory]**](AgencyTransactionHistory.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **agency_commissions_history** -> list[AgencyCommissionHistory] agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - -The agency obtains the commission history of the recommended user - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # The agency obtains the commission history of the recommended user - api_response = api_instance.agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->agency_commissions_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[AgencyCommissionHistory]**](AgencyCommissionHistory.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **partner_transaction_history** -> PartnerTransactionHistory partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - -Partner obtains transaction records of recommended users - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # Partner obtains transaction records of recommended users - api_response = api_instance.partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->partner_transaction_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**PartnerTransactionHistory**](PartnerTransactionHistory.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **partner_commissions_history** -> PartnerCommissionHistory partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - -Partner obtains commission records of recommended users - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # Partner obtains commission records of recommended users - api_response = api_instance.partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->partner_commissions_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**PartnerCommissionHistory**](PartnerCommissionHistory.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **partner_sub_list** -> PartnerSubList partner_sub_list(user_id=user_id, limit=limit, offset=offset) - -Partner subordinate list - -Including sub-agents, direct customers, indirect customers - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # Partner subordinate list - api_response = api_instance.partner_sub_list(user_id=user_id, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->partner_sub_list: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**PartnerSubList**](PartnerSubList.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rebate_broker_commission_history** -> list[BrokerCommission] rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) - -The broker obtains the user's commission rebate records - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) -to = 1714521600 # int | Time range ending, default to current time (optional) - -try: - # The broker obtains the user's commission rebate records - api_response = api_instance.rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->rebate_broker_commission_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - -### Return type - -[**list[BrokerCommission]**](BrokerCommission.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rebate_broker_transaction_history** -> list[BrokerTransaction] rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) - -The broker obtains the user's trading history - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) -to = 1714521600 # int | Time range ending, default to current time (optional) - -try: - # The broker obtains the user's trading history - api_response = api_instance.rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->rebate_broker_transaction_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - -### Return type - -[**list[BrokerTransaction]**](BrokerTransaction.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **rebate_user_info** -> list[RebateUserInfo] rebate_user_info() - -User retrieves rebate information - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) - -try: - # User retrieves rebate information - api_response = api_instance.rebate_user_info() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->rebate_user_info: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[RebateUserInfo]**](RebateUserInfo.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **user_sub_relation** -> UserSubRelation user_sub_relation(user_id_list) - -User-subordinate relationship - -Query whether the specified user is in the system - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.RebateApi(api_client) -user_id_list = '1, 2, 3' # str | Query the user's ID list, split by,, if there are more than 100, take 100 - -try: - # User-subordinate relationship - api_response = api_instance.user_sub_relation(user_id_list) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling RebateApi->user_sub_relation: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id_list** | **str**| Query the user's ID list, split by,, if there are more than 100, take 100 | - -### Return type - -[**UserSubRelation**](UserSubRelation.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/RebateUserInfo.md b/docs/RebateUserInfo.md deleted file mode 100644 index 0f97b11..0000000 --- a/docs/RebateUserInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# RebateUserInfo - -Retrieve user rebate information -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invite_uid** | **int** | My inviter's UID | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayCurrencyRes.md b/docs/RepayCurrencyRes.md deleted file mode 100644 index dd4ab05..0000000 --- a/docs/RepayCurrencyRes.md +++ /dev/null @@ -1,15 +0,0 @@ -# RepayCurrencyRes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**succeeded** | **bool** | Has the repayment been successful | [optional] -**label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] -**message** | **str** | Error description in case of operation failure; empty when successful. | [optional] -**currency** | **str** | Repayment currency | [optional] -**repaid_principal** | **str** | Principal | [optional] -**repaid_interest** | **str** | Principal | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayLoan.md b/docs/RepayLoan.md deleted file mode 100644 index 910e2be..0000000 --- a/docs/RepayLoan.md +++ /dev/null @@ -1,13 +0,0 @@ -# RepayLoan - -Repay -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | -**repay_amount** | **str** | Repayment amount, it is mandatory when making partial repayments | -**repaid_all** | **bool** | Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayMultiLoan.md b/docs/RepayMultiLoan.md deleted file mode 100644 index e9be0f0..0000000 --- a/docs/RepayMultiLoan.md +++ /dev/null @@ -1,12 +0,0 @@ -# RepayMultiLoan - -Repay Multi-Collateral Loan -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | -**repay_items** | [**list[MultiLoanRepayItem]**](MultiLoanRepayItem.md) | Repay Currency Item | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayRecord.md b/docs/RepayRecord.md deleted file mode 100644 index 5137865..0000000 --- a/docs/RepayRecord.md +++ /dev/null @@ -1,23 +0,0 @@ -# RepayRecord - -Repayment record -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Repayment record ID | [optional] -**repaid_amount** | **str** | Repayment amount | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**collateral_currency** | **str** | Collateral | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**borrow_time** | **int** | Borrowing time, timestamp | [optional] -**repay_time** | **int** | Repayment time, timestamp | [optional] -**total_interest** | **str** | Total interest | [optional] -**before_left_principal** | **str** | Principal to be repaid before repayment | [optional] -**after_left_principal** | **str** | Principal to be repaid after repayment | [optional] -**before_left_collateral** | **str** | Collateral quantity before repayment | [optional] -**after_left_collateral** | **str** | Collateral quantity after repayment | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayRecordCurrency.md b/docs/RepayRecordCurrency.md deleted file mode 100644 index 0cfa03c..0000000 --- a/docs/RepayRecordCurrency.md +++ /dev/null @@ -1,15 +0,0 @@ -# RepayRecordCurrency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**before_amount** | **str** | Amount before the operation | [optional] -**before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] -**after_amount** | **str** | Amount after the operation. | [optional] -**after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayRecordLeftInterest.md b/docs/RepayRecordLeftInterest.md deleted file mode 100644 index 79ca1d9..0000000 --- a/docs/RepayRecordLeftInterest.md +++ /dev/null @@ -1,15 +0,0 @@ -# RepayRecordLeftInterest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**before_amount** | **str** | Interest amount before repayment | [optional] -**before_amount_usdt** | **str** | Converted value of interest before repayment in USDT | [optional] -**after_amount** | **str** | Interest amount after repayment | [optional] -**after_amount_usdt** | **str** | Converted value of interest after repayment in USDT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayRecordRepaidCurrency.md b/docs/RepayRecordRepaidCurrency.md deleted file mode 100644 index 7f111e8..0000000 --- a/docs/RepayRecordRepaidCurrency.md +++ /dev/null @@ -1,15 +0,0 @@ -# RepayRecordRepaidCurrency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**repaid_amount** | **str** | Repayment amount | [optional] -**repaid_principal** | **str** | Principal | [optional] -**repaid_interest** | **str** | Interest | [optional] -**repaid_amount_usdt** | **str** | Value of the repayment amount in USDT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayRecordTotalInterest.md b/docs/RepayRecordTotalInterest.md deleted file mode 100644 index 8c7a2cc..0000000 --- a/docs/RepayRecordTotalInterest.md +++ /dev/null @@ -1,13 +0,0 @@ -# RepayRecordTotalInterest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**amount** | **str** | Interest Amount | [optional] -**amount_usdt** | **str** | Interest amount converted to USDT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RepayResp.md b/docs/RepayResp.md deleted file mode 100644 index f7124e3..0000000 --- a/docs/RepayResp.md +++ /dev/null @@ -1,12 +0,0 @@ -# RepayResp - -Repay -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**repaid_principal** | **str** | Principal | [optional] -**repaid_interest** | **str** | Interest | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RiskUnits.md b/docs/RiskUnits.md deleted file mode 100644 index 7ca433f..0000000 --- a/docs/RiskUnits.md +++ /dev/null @@ -1,17 +0,0 @@ -# RiskUnits - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**symbol** | **str** | Risk unit flag | [optional] -**spot_in_use** | **str** | Spot hedging utilization | [optional] -**maintain_margin** | **str** | Maintenance margin for risk unit | [optional] -**initial_margin** | **str** | Initial margin for risk unit | [optional] -**delta** | **str** | Total Delta of risk unit | [optional] -**gamma** | **str** | Total Gamma of risk unit | [optional] -**theta** | **str** | Total Theta of risk unit | [optional] -**vega** | **str** | Total Vega of risk unit | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SavedAddress.md b/docs/SavedAddress.md deleted file mode 100644 index 117d52d..0000000 --- a/docs/SavedAddress.md +++ /dev/null @@ -1,15 +0,0 @@ -# SavedAddress - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**chain** | **str** | Chain name | [optional] -**address** | **str** | Address | [optional] -**name** | **str** | Name | [optional] -**tag** | **str** | Tag | [optional] -**verified** | **str** | Whether to pass the verification 0-unverified, 1-verified | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SmallBalance.md b/docs/SmallBalance.md deleted file mode 100644 index 80e11fa..0000000 --- a/docs/SmallBalance.md +++ /dev/null @@ -1,14 +0,0 @@ -# SmallBalance - -Convert Small Balance -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**available_balance** | **str** | Available balance | [optional] -**estimated_as_btc** | **str** | Estimated as BTC | [optional] -**convertible_to_gt** | **str** | Estimated conversion to GT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SmallBalanceHistory.md b/docs/SmallBalanceHistory.md deleted file mode 100644 index ffe1d05..0000000 --- a/docs/SmallBalanceHistory.md +++ /dev/null @@ -1,15 +0,0 @@ -# SmallBalanceHistory - -Convert Small Balance -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**amount** | **str** | amount | [optional] [readonly] -**gt_amount** | **str** | GT amount | [optional] [readonly] -**create_time** | **int** | Exchange time (in seconds) | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md deleted file mode 100644 index 6bb761e..0000000 --- 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/SpotAccountBook.md b/docs/SpotAccountBook.md deleted file mode 100644 index f4a1b2f..0000000 --- a/docs/SpotAccountBook.md +++ /dev/null @@ -1,17 +0,0 @@ -# SpotAccountBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID | [optional] -**time** | **int** | The timestamp of the change (in milliseconds) | [optional] -**currency** | **str** | Currency changed | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] -**code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code) | [optional] -**text** | **str** | Additional information | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotApi.md b/docs/SpotApi.md deleted file mode 100644 index 31944e8..0000000 --- a/docs/SpotApi.md +++ /dev/null @@ -1,2248 +0,0 @@ -# gate_api.SpotApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details -[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency -[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported -[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair -[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information -[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book -[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades -[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks -[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates -[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates -[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts -[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book -[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders -[**list_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 -[**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair -[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list -[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order -[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order -[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order -[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history -[**get_system_time**](SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time -[**countdown_cancel_all_spot**](SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders -[**amend_batch_orders**](SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders -[**get_spot_insurance_history**](SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data -[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list -[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order -[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders -[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order -[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order - - -# **list_currencies** -> list[Currency] list_currencies() - -List all currencies' details - -When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) - -try: - # List all currencies' details - api_response = api_instance.list_currencies() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->list_currencies: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Currency]**](Currency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_currency** -> Currency get_currency(currency) - -Get details of a specific currency - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency = 'GT' # str | Currency name - -try: - # Get details of a specific currency - api_response = api_instance.get_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->get_currency: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | - -### Return type - -[**Currency**](Currency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_currency_pairs** -> list[CurrencyPair] list_currency_pairs() - -List all currency pairs supported - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) - -try: - # List all currency pairs supported - api_response = api_instance.list_currency_pairs() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->list_currency_pairs: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[CurrencyPair]**](CurrencyPair.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | All currency pairs retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_currency_pair** -> CurrencyPair get_currency_pair(currency_pair) - -Get details of a specifc currency pair - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency_pair = 'ETH_BTC' # str | Currency pair - -try: - # Get details of a specifc currency pair - api_response = api_instance.get_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->get_currency_pair: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - -### Return type - -[**CurrencyPair**](CurrencyPair.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_tickers** -> list[Ticker] list_tickers(currency_pair=currency_pair, timezone=timezone) - -Retrieve ticker information - -Return only related data if `currency_pair` is specified; otherwise return all of them - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -timezone = 'utc0' # str | Timezone (optional) - -try: - # Retrieve ticker information - api_response = api_instance.list_tickers(currency_pair=currency_pair, timezone=timezone) - 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_tickers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **timezone** | **str**| Timezone | [optional] - -### Return type - -[**list[Ticker]**](Ticker.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_order_book** -> OrderBook list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id) - -Retrieve order book - -Order book will be sorted by price from high to low on bids; low to high on asks - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Return order book ID (optional) (default to False) - -try: - # Retrieve order book - api_response = api_instance.list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_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->list_order_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Return order book ID | [optional] [default to False] - -### Return type - -[**OrderBook**](OrderBook.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_trades** -> list[Trade] list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) - -Retrieve market trades - -Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair -limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) -reverse = False # bool | Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. (optional) (default to False) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) - -try: - # Retrieve market trades - api_response = api_instance.list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->list_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] - **reverse** | **bool**| Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. | [optional] [default to False] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - -### Return type - -[**list[Trade]**](Trade.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_candlesticks** -> list[list[str]] list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) - -Market candlesticks - -Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) -interval = '30m' # str | Interval time between data points. Note that `30d` means 1 natual month, not 30 days (optional) (default to '30m') - -try: - # Market candlesticks - api_response = api_instance.list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) - 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_candlesticks: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] - **interval** | **str**| Interval time between data points. Note that `30d` means 1 natual month, not 30 days | [optional] [default to '30m'] - -### Return type - -**list[list[str]]** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_fee** -> SpotFee get_fee(currency_pair=currency_pair) - -Query user trading fee rates - -This API is deprecated in favour of new fee retrieving API `/wallet/fee`. - -### 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 | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional) - -try: - # Query user trading fee rates - api_response = api_instance.get_fee(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->get_fee: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional] - -### Return type - -[**SpotFee**](SpotFee.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_batch_spot_fee** -> dict(str, SpotFee) get_batch_spot_fee(currency_pairs) - -Query a batch of user trading fee rates - -### 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_pairs = 'BTC_USDT,ETH_USDT' # str | A request can only query up to 50 currency pairs - -try: - # Query a batch of user trading fee rates - api_response = api_instance.get_batch_spot_fee(currency_pairs) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->get_batch_spot_fee: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pairs** | **str**| A request can only query up to 50 currency pairs | - -### Return type - -[**dict(str, SpotFee)**](SpotFee.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_spot_accounts** -> list[SpotAccount] list_spot_accounts(currency=currency) - -List spot 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 | Retrieve data of the specified currency (optional) - -try: - # List spot 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**| Retrieve data of the specified currency | [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 | - | - -[[Back to top]](#) [[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) - -Query account book - -Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. - -### 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 | Retrieve data of the specified currency (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) -code = 'code_example' # str | Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` (optional) - -try: - # Query account book - api_response = api_instance.list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=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 SpotApi->list_spot_account_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - **code** | **str**| Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` | [optional] - -### Return type - -[**list[SpotAccountBook]**](SpotAccountBook.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_batch_orders** -> list[BatchOrder] create_batch_orders(order, x_gate_exptime=x_gate_exptime) - -Create a batch of orders - -Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders - -### 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 = [gate_api.Order()] # list[Order] | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Create a batch of orders - api_response = api_instance.create_batch_orders(order, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->create_batch_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**list[Order]**](Order.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**list[BatchOrder]**](BatchOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Request is completed | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_all_open_orders** -> list[OpenOrders] list_all_open_orders(page=page, limit=limit, account=account) - -List all open orders - -Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. - -### 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) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records returned in one page in each currency pair (optional) (default to 100) -account = 'spot' # str | Specify query account. (optional) - -try: - # List all open orders - api_response = api_instance.list_all_open_orders(page=page, limit=limit, account=account) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->list_all_open_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records returned in one page in each currency pair | [optional] [default to 100] - **account** | **str**| Specify query account. | [optional] - -### Return type - -[**list[OpenOrders]**](OpenOrders.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_cross_liquidate_order** -> Order create_cross_liquidate_order(liquidate_order) - -close position when cross-currency is disabled - -Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 - -### 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) -liquidate_order = gate_api.LiquidateOrder() # LiquidateOrder | - -try: - # close position when cross-currency is disabled - api_response = api_instance.create_cross_liquidate_order(liquidate_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->create_cross_liquidate_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **liquidate_order** | [**LiquidateOrder**](LiquidateOrder.md)| | - -### Return type - -[**Order**](Order.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 | - | - -[[Back to top]](#) [[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_orders** -> list[Order] list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, side=side) - -List orders - -Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. - -### 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 | Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. -status = 'open' # str | List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 (optional) (default to 100) -account = 'spot' # str | Specify query account. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -side = 'sell' # str | All bids or asks. Both included if not specified (optional) - -try: - # List orders - api_response = api_instance.list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, 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 SpotApi->list_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. | - **status** | **str**| List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled | - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 | [optional] [default to 100] - **account** | **str**| Specify query account. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **side** | **str**| All bids or asks. Both included if not specified | [optional] - -### Return type - -[**list[Order]**](Order.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_order** -> Order create_order(order, x_gate_exptime=x_gate_exptime) - -Create an order - -Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions - -### 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 = gate_api.Order() # Order | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Create an order - api_response = api_instance.create_order(order, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->create_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**Order**](Order.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. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_orders** -> list[OrderCancel] cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) - -Cancel all `open` orders in specified currency pair - -When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -side = 'sell' # str | All bids or asks. Both included if not specified (optional) -account = 'spot' # str | Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` (optional) -action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Cancel all `open` orders in specified currency pair - api_response = api_instance.cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->cancel_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **side** | **str**| All bids or asks. Both included if not specified | [optional] - **account** | **str**| Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` | [optional] - **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**list[OrderCancel]**](OrderCancel.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 cancellation request accepted. Query order status by listing orders | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_batch_orders** -> list[CancelOrderResult] cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) - -Cancel a batch of orders with an ID list - -Multiple currency pairs can be specified, but maximum 20 orders are allowed per request - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -cancel_batch_order = [gate_api.CancelBatchOrder()] # list[CancelBatchOrder] | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Cancel a batch of orders with an ID list - api_response = api_instance.cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->cancel_batch_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cancel_batch_order** | [**list[CancelBatchOrder]**](CancelBatchOrder.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**list[CancelOrderResult]**](CancelOrderResult.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 cancellation completed | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_order** -> Order get_order(order_id, currency_pair, account=account) - -Get a single order - -By default, orders for spot, unified account and warehouse-by-site leverage account are checked. - -### 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) -currency_pair = 'BTC_USDT' # str | Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. -account = 'spot' # str | Specify query account. (optional) - -try: - # Get a single order - api_response = api_instance.get_order(order_id, currency_pair, account=account) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->get_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | - **currency_pair** | **str**| Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. | - **account** | **str**| Specify query account. | [optional] - -### Return type - -[**Order**](Order.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_order** -> Order cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) - -Cancel a single order - -By default, orders for spot, unified accounts and leveraged accounts are revoked. - -### 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) -currency_pair = 'BTC_USDT' # str | Currency pair -account = 'spot' # str | Specify query account. (optional) -action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Cancel a single order - api_response = api_instance.cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->cancel_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | - **currency_pair** | **str**| Currency pair | - **account** | **str**| Specify query account. | [optional] - **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**Order**](Order.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) - -# **amend_order** -> Order amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) - -Amend an order - -By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation - -### 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) -order_patch = gate_api.OrderPatch() # OrderPatch | -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -account = 'spot' # str | Specify query account. (optional) -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Amend an order - api_response = api_instance.amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->amend_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | - **order_patch** | [**OrderPatch**](OrderPatch.md)| | - **currency_pair** | **str**| Currency pair | [optional] - **account** | **str**| Specify query account. | [optional] - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**Order**](Order.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Updated | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_my_trades** -> list[Trade] list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) - -List personal trading history - -By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. - -### Example - -* 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 | Retrieve results with specified currency pair (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) -page = 1 # int | Page number (optional) (default to 1) -order_id = '12345' # str | Filter trades with specified order ID. `currency_pair` is also required if this field is present (optional) -account = 'spot' # str | Specify query account. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) - -try: - # List personal trading history - api_response = api_instance.list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->list_my_trades: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Retrieve results with specified currency pair | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] - **page** | **int**| Page number | [optional] [default to 1] - **order_id** | **str**| Filter trades with specified order ID. `currency_pair` is also required if this field is present | [optional] - **account** | **str**| Specify query account. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - -### Return type - -[**list[Trade]**](Trade.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_system_time** -> SystemTime get_system_time() - -Get server current time - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) - -try: - # Get server current time - api_response = api_instance.get_system_time() - 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_system_time: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SystemTime**](SystemTime.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **countdown_cancel_all_spot** -> TriggerTime countdown_cancel_all_spot(countdown_cancel_all_spot_task) - -Countdown cancel orders - -When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. - -### 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) -countdown_cancel_all_spot_task = gate_api.CountdownCancelAllSpotTask() # CountdownCancelAllSpotTask | - -try: - # Countdown cancel orders - api_response = api_instance.countdown_cancel_all_spot(countdown_cancel_all_spot_task) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->countdown_cancel_all_spot: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **countdown_cancel_all_spot_task** | [**CountdownCancelAllSpotTask**](CountdownCancelAllSpotTask.md)| | - -### Return type - -[**TriggerTime**](TriggerTime.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Set countdown successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **amend_batch_orders** -> list[BatchOrder] amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) - -Batch modification of orders - -By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the order list - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -batch_amend_item = [gate_api.BatchAmendItem()] # list[BatchAmendItem] | -x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) - -try: - # Batch modification of orders - api_response = api_instance.amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->amend_batch_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **batch_amend_item** | [**list[BatchAmendItem]**](BatchAmendItem.md)| | - **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - -### Return type - -[**list[BatchOrder]**](BatchOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Order modification executed successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_spot_insurance_history** -> list[SpotInsuranceHistory] get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) - -Query spot insurance fund historical data - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SpotApi(api_client) -business = 'margin' # str | Leverage business, margin - position by position; unified - unified account -currency = 'BTC' # str | Currency -_from = 1547706332 # int | Start timestamp, seconds -to = 1547706332 # int | End timestamp, in seconds -page = 1 # int | Page number (optional) (default to 1) -limit = 30 # int | The maximum number of items returned in the list, the default value is 30 (optional) (default to 30) - -try: - # Query spot insurance fund historical data - api_response = api_instance.get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->get_spot_insurance_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **business** | **str**| Leverage business, margin - position by position; unified - unified account | - **currency** | **str**| Currency | - **_from** | **int**| Start timestamp, seconds | - **to** | **int**| End timestamp, in seconds | - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| The maximum number of items returned in the list, the default value is 30 | [optional] [default to 30] - -### Return type - -[**list[SpotInsuranceHistory]**](SpotInsuranceHistory.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_spot_price_triggered_orders** -> list[SpotPriceTriggeredOrder] list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) - -Retrieve running auto order list - -### 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 = 'status_example' # str | Only list the orders with this status -market = 'BTC_USDT' # str | Currency pair (optional) -account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified` (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # Retrieve running auto order list - api_response = api_instance.list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->list_spot_price_triggered_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **str**| Only list the orders with this status | - **market** | **str**| Currency pair | [optional] - **account** | **str**| Trading account type. Portfolio margin account must set to `unified` | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[SpotPriceTriggeredOrder]**](SpotPriceTriggeredOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_spot_price_triggered_order** -> TriggerOrderResponse create_spot_price_triggered_order(spot_price_triggered_order) - -Create a price-triggered 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_price_triggered_order = gate_api.SpotPriceTriggeredOrder() # SpotPriceTriggeredOrder | - -try: - # Create a price-triggered order - api_response = api_instance.create_spot_price_triggered_order(spot_price_triggered_order) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->create_spot_price_triggered_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **spot_price_triggered_order** | [**SpotPriceTriggeredOrder**](SpotPriceTriggeredOrder.md)| | - -### Return type - -[**TriggerOrderResponse**](TriggerOrderResponse.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 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_spot_price_triggered_order_list** -> list[SpotPriceTriggeredOrder] cancel_spot_price_triggered_order_list(market=market, account=account) - -Cancel All Price-triggered 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) -market = 'BTC_USDT' # str | Currency pair (optional) -account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified` (optional) - -try: - # Cancel All Price-triggered Orders - api_response = api_instance.cancel_spot_price_triggered_order_list(market=market, account=account) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SpotApi->cancel_spot_price_triggered_order_list: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **market** | **str**| Currency pair | [optional] - **account** | **str**| Trading account type. Portfolio margin account must set to `unified` | [optional] - -### Return type - -[**list[SpotPriceTriggeredOrder]**](SpotPriceTriggeredOrder.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 cancellation request accepted. Query order status by listing orders | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_spot_price_triggered_order** -> SpotPriceTriggeredOrder get_spot_price_triggered_order(order_id) - -Get a price-triggered order - -### 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 = 'order_id_example' # str | Retrieve the data of the order with the specified ID - -try: - # Get a price-triggered order - api_response = api_instance.get_spot_price_triggered_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_price_triggered_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**SpotPriceTriggeredOrder**](SpotPriceTriggeredOrder.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** | Auto order detail | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_spot_price_triggered_order** -> SpotPriceTriggeredOrder cancel_spot_price_triggered_order(order_id) - -cancel a price-triggered order - -### 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 = 'order_id_example' # str | Retrieve the data of the order with the specified ID - -try: - # cancel a price-triggered order - api_response = api_instance.cancel_spot_price_triggered_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_price_triggered_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Retrieve the data of the order with the specified ID | - -### Return type - -[**SpotPriceTriggeredOrder**](SpotPriceTriggeredOrder.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** | Auto order detail | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/SpotCurrencyChain.md b/docs/SpotCurrencyChain.md deleted file mode 100644 index d9696fd..0000000 --- a/docs/SpotCurrencyChain.md +++ /dev/null @@ -1,14 +0,0 @@ -# SpotCurrencyChain - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Chain name | [optional] -**addr** | **str** | token address | [optional] -**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled | [optional] -**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed | [optional] -**deposit_disabled** | **bool** | Whether currency's deposit is disabled | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotFee.md b/docs/SpotFee.md deleted file mode 100644 index 78ff43c..0000000 --- a/docs/SpotFee.md +++ /dev/null @@ -1,19 +0,0 @@ -# SpotFee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**taker_fee** | **str** | taker fee rate | [optional] -**maker_fee** | **str** | maker fee rate | [optional] -**gt_discount** | **bool** | If GT deduction is enabled | [optional] -**gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**loan_fee** | **str** | Loan fee rate of margin lending | [optional] -**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotInsuranceHistory.md b/docs/SpotInsuranceHistory.md deleted file mode 100644 index 0731b7f..0000000 --- a/docs/SpotInsuranceHistory.md +++ /dev/null @@ -1,12 +0,0 @@ -# SpotInsuranceHistory - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**balance** | **str** | balance | [optional] -**time** | **int** | Creation time, timestamp, milliseconds | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotPricePutOrder.md b/docs/SpotPricePutOrder.md deleted file mode 100644 index 73b5f85..0000000 --- a/docs/SpotPricePutOrder.md +++ /dev/null @@ -1,18 +0,0 @@ -# SpotPricePutOrder - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | Order type,default to `limit` - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] -**side** | **str** | Order side - buy: buy side - sell: sell side | -**price** | **str** | Order price | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**account** | **str** | Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading | [default to 'normal'] -**time_in_force** | **str** | time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only | [optional] [default to 'gtc'] -**auto_borrow** | **bool** | Whether to borrow coins automatically | [optional] [default to False] -**auto_repay** | **bool** | Whether to repay the loan automatically | [optional] [default to False] -**text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotPriceTrigger.md b/docs/SpotPriceTrigger.md deleted file mode 100644 index 7ee5505..0000000 --- a/docs/SpotPriceTrigger.md +++ /dev/null @@ -1,12 +0,0 @@ -# SpotPriceTrigger - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**price** | **str** | Trigger price | -**rule** | **str** | Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field | -**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpotPriceTriggeredOrder.md b/docs/SpotPriceTriggeredOrder.md deleted file mode 100644 index 4291cb2..0000000 --- a/docs/SpotPriceTriggeredOrder.md +++ /dev/null @@ -1,20 +0,0 @@ -# SpotPriceTriggeredOrder - -Spot order detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**trigger** | [**SpotPriceTrigger**](SpotPriceTrigger.md) | | -**put** | [**SpotPricePutOrder**](SpotPricePutOrder.md) | | -**id** | **int** | Auto order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**market** | **str** | Currency pair | -**ctime** | **int** | Creation time | [optional] [readonly] -**ftime** | **int** | Finished time | [optional] [readonly] -**fired_order_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly] -**status** | **str** | Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired | [optional] [readonly] -**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StpGroup.md b/docs/StpGroup.md deleted file mode 100644 index 3ae5da0..0000000 --- a/docs/StpGroup.md +++ /dev/null @@ -1,13 +0,0 @@ -# StpGroup - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | STP Group ID | [optional] -**name** | **str** | STP Group name | -**creator_id** | **int** | Creator ID | [optional] -**create_time** | **int** | Creation time | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StpGroupUser.md b/docs/StpGroupUser.md deleted file mode 100644 index a5a103e..0000000 --- a/docs/StpGroupUser.md +++ /dev/null @@ -1,12 +0,0 @@ -# StpGroupUser - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**stp_id** | **int** | STP Group ID | [optional] -**create_time** | **int** | Creation time | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StructuredBuy.md b/docs/StructuredBuy.md deleted file mode 100644 index 4a3e128..0000000 --- a/docs/StructuredBuy.md +++ /dev/null @@ -1,12 +0,0 @@ -# StructuredBuy - -Dual Investment Purchase -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pid** | **str** | Plan ID | [optional] -**amount** | **str** | Purchase 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/StructuredGetProjectList.md b/docs/StructuredGetProjectList.md deleted file mode 100644 index 38e9f37..0000000 --- a/docs/StructuredGetProjectList.md +++ /dev/null @@ -1,22 +0,0 @@ -# StructuredGetProjectList - -Structured Products -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Plan ID | [optional] -**type** | **str** | product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball | [optional] -**name_en** | **str** | name | [optional] -**investment_coin** | **str** | Investment Currency | [optional] -**investment_period** | **str** | Investment term | [optional] -**min_annual_rate** | **str** | Minimum annual rate | [optional] -**mid_annual_rate** | **str** | Intermediate annual rate | [optional] -**max_annual_rate** | **str** | Maximum annual rate | [optional] -**watch_market** | **str** | Watch market | [optional] -**start_time** | **int** | start time | [optional] -**end_time** | **int** | Finished time | [optional] -**status** | **str** | Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StructuredOrderList.md b/docs/StructuredOrderList.md deleted file mode 100644 index 2886d54..0000000 --- a/docs/StructuredOrderList.md +++ /dev/null @@ -1,17 +0,0 @@ -# StructuredOrderList - -Structured order -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**pid** | **str** | Plan ID | [optional] -**lock_coin** | **str** | Locked coin | [optional] -**amount** | **str** | Locked amount | [optional] -**status** | **str** | Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE | [optional] -**income** | **str** | Income | [optional] -**create_time** | **int** | Created time | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccount.md b/docs/SubAccount.md deleted file mode 100644 index 70dbc36..0000000 --- a/docs/SubAccount.md +++ /dev/null @@ -1,17 +0,0 @@ -# SubAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**remark** | **str** | custom text | [optional] -**login_name** | **str** | Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters | -**password** | **str** | The sub-account's password. (Default: the same as main account's password) | [optional] -**email** | **str** | The sub-account's email address. (Default: the same as main account's email address) | [optional] -**state** | **int** | State: 1-normal, 2-locked\" | [optional] [readonly] -**type** | **int** | \"Sub-account type: 1 - sub-account, 3 - cross margin account | [optional] [readonly] -**user_id** | **int** | The user id of the sub-account | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccountApi.md b/docs/SubAccountApi.md deleted file mode 100644 index 3f938a3..0000000 --- a/docs/SubAccountApi.md +++ /dev/null @@ -1,760 +0,0 @@ -# gate_api.SubAccountApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_sub_accounts**](SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts -[**create_sub_accounts**](SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account -[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account -[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account -[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account -[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account -[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account -[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account -[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account -[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account -[**list_unified_mode**](SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode - - -# **list_sub_accounts** -> list[SubAccount] list_sub_accounts(type=type) - -List sub-accounts - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -type = '0' # str | `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. (optional) - -try: - # List sub-accounts - api_response = api_instance.list_sub_accounts(type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->list_sub_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **str**| `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. | [optional] - -### Return type - -[**list[SubAccount]**](SubAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_sub_accounts** -> SubAccount create_sub_accounts(sub_account) - -Create a new sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -sub_account = gate_api.SubAccount() # SubAccount | - -try: - # Create a new sub-account - api_response = api_instance.create_sub_accounts(sub_account) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->create_sub_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_account** | [**SubAccount**](SubAccount.md)| | - -### Return type - -[**SubAccount**](SubAccount.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** | Created Successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_sub_account** -> SubAccount get_sub_account(user_id) - -Get the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id - -try: - # Get the sub-account - api_response = api_instance.get_sub_account(user_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 SubAccountApi->get_sub_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - -### Return type - -[**SubAccount**](SubAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_sub_account_keys** -> list[SubAccountKey] list_sub_account_keys(user_id) - -List all API Key of the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id - -try: - # List all API Key of the sub-account - api_response = api_instance.list_sub_account_keys(user_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 SubAccountApi->list_sub_account_keys: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - -### Return type - -[**list[SubAccountKey]**](SubAccountKey.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_sub_account_keys** -> list[SubAccountKey] create_sub_account_keys(user_id, sub_account_key) - -Create API Key of the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id -sub_account_key = gate_api.SubAccountKey() # SubAccountKey | - -try: - # Create API Key of the sub-account - api_response = api_instance.create_sub_account_keys(user_id, sub_account_key) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->create_sub_account_keys: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | - -### Return type - -[**list[SubAccountKey]**](SubAccountKey.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Created Successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_sub_account_key** -> SubAccountKey get_sub_account_key(user_id, key) - -Get the API Key of the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id -key = 'key_example' # str | The API Key of the sub-account - -try: - # Get the API Key of the sub-account - api_response = api_instance.get_sub_account_key(user_id, key) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->get_sub_account_key: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - **key** | **str**| The API Key of the sub-account | - -### Return type - -[**SubAccountKey**](SubAccountKey.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_sub_account_keys** -> update_sub_account_keys(user_id, key, sub_account_key) - -Update API key of the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id -key = 'key_example' # str | The API Key of the sub-account -sub_account_key = gate_api.SubAccountKey() # SubAccountKey | - -try: - # Update API key of the sub-account - api_instance.update_sub_account_keys(user_id, key, sub_account_key) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->update_sub_account_keys: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - **key** | **str**| The API Key of the sub-account | - **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Updated | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_sub_account_keys** -> delete_sub_account_keys(user_id, key) - -Delete API key of the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id -key = 'key_example' # str | The API Key of the sub-account - -try: - # Delete API key of the sub-account - api_instance.delete_sub_account_keys(user_id, key) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->delete_sub_account_keys: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - **key** | **str**| The API Key of the sub-account | - -### 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 | -|-------------|-------------|------------------| -**204** | Delete successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **lock_sub_account** -> lock_sub_account(user_id) - -Lock the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | The user id of the sub-account - -try: - # Lock the sub-account - api_instance.lock_sub_account(user_id) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->lock_sub_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| The user id of the sub-account | - -### 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 | -|-------------|-------------|------------------| -**204** | Lock successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **unlock_sub_account** -> unlock_sub_account(user_id) - -Unlock the sub-account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | The user id of the sub-account - -try: - # Unlock the sub-account - api_instance.unlock_sub_account(user_id) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->unlock_sub_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **int**| The user id of the sub-account | - -### 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 | -|-------------|-------------|------------------| -**204** | Unlock successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_unified_mode** -> list[SubUserMode] list_unified_mode() - -Get sub-account mode - -Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.SubAccountApi(api_client) - -try: - # Get sub-account mode - api_response = api_instance.list_unified_mode() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling SubAccountApi->list_unified_mode: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[SubUserMode]**](SubUserMode.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/SubAccountBalance.md b/docs/SubAccountBalance.md deleted file mode 100644 index 753d3dd..0000000 --- a/docs/SubAccountBalance.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubAccountBalance - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] -**available** | **dict(str, str)** | Available balances of currencies | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccountCrossMarginBalance.md b/docs/SubAccountCrossMarginBalance.md deleted file mode 100644 index ebb3791..0000000 --- a/docs/SubAccountCrossMarginBalance.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubAccountCrossMarginBalance - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] -**available** | [**SubCrossMarginAccount**](.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/SubAccountFuturesBalance.md b/docs/SubAccountFuturesBalance.md deleted file mode 100644 index d5ddf25..0000000 --- a/docs/SubAccountFuturesBalance.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubAccountFuturesBalance - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] -**available** | [**dict(str, FuturesAccount)**](FuturesAccount.md) | Futures account balances | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccountKey.md b/docs/SubAccountKey.md deleted file mode 100644 index dfce92b..0000000 --- a/docs/SubAccountKey.md +++ /dev/null @@ -1,19 +0,0 @@ -# SubAccountKey - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **str** | User ID | [optional] [readonly] -**mode** | **int** | Mode: 1 - classic 2 - portfolio account | [optional] -**name** | **str** | API key name | [optional] -**perms** | [**list[SubAccountKeyPerms]**](SubAccountKeyPerms.md) | | [optional] -**ip_whitelist** | **list[str]** | ip white list (list will be removed if no value is passed) | [optional] -**key** | **str** | API Key | [optional] [readonly] -**state** | **int** | State 1 - normal 2 - locked 3 - frozen | [optional] [readonly] -**created_at** | **int** | Creation time | [optional] [readonly] -**updated_at** | **int** | Last update time | [optional] [readonly] -**last_access** | **int** | Last access time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccountKeyPerms.md b/docs/SubAccountKeyPerms.md deleted file mode 100644 index ed59a5b..0000000 --- a/docs/SubAccountKeyPerms.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubAccountKeyPerms - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy | [optional] -**read_only** | **bool** | read only | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccountMarginBalance.md b/docs/SubAccountMarginBalance.md deleted file mode 100644 index 817fd31..0000000 --- a/docs/SubAccountMarginBalance.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubAccountMarginBalance - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] -**available** | [**list[MarginAccount]**](MarginAccount.md) | Margin account balances | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccountToSubAccount.md b/docs/SubAccountToSubAccount.md deleted file mode 100644 index cc7b962..0000000 --- a/docs/SubAccountToSubAccount.md +++ /dev/null @@ -1,16 +0,0 @@ -# SubAccountToSubAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Transfer currency name | -**sub_account_type** | **str** | Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional] -**sub_account_from** | **str** | Transfer from the user id of the sub-account | -**sub_account_from_type** | **str** | The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. | -**sub_account_to** | **str** | Transfer to the user id of the sub-account | -**sub_account_to_type** | **str** | The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account | -**amount** | **str** | Transfer amount | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md deleted file mode 100644 index 511b3d3..0000000 --- a/docs/SubAccountTransfer.md +++ /dev/null @@ -1,18 +0,0 @@ -# SubAccountTransfer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Transfer currency name | -**sub_account** | **str** | Sub account user ID | -**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | -**amount** | **str** | Transfer amount | -**uid** | **str** | Main account user ID | [optional] [readonly] -**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] -**timest** | **str** | Transfer timestamp | [optional] [readonly] -**source** | **str** | Where the operation is initiated from | [optional] [readonly] -**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md deleted file mode 100644 index de0d009..0000000 --- a/docs/SubCrossMarginAccount.md +++ /dev/null @@ -1,25 +0,0 @@ -# SubCrossMarginAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account | [optional] -**locked** | **bool** | Whether account is locked | [optional] -**balances** | [**dict(str, CrossMarginBalance1)**](CrossMarginBalance1.md) | | [optional] -**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] -**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] -**borrowed_net** | **str** | Total borrowed value in USDT * borrowed factor | [optional] -**net** | **str** | Total net assets in USDT | [optional] -**leverage** | **str** | Position leverage | [optional] -**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] -**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] -**total_initial_margin** | **str** | Total initial margin | [optional] -**total_margin_balance** | **str** | Total margin balance | [optional] -**total_maintenance_margin** | **str** | Total maintenance margin | [optional] -**total_initial_margin_rate** | **str** | Total initial margin rate | [optional] -**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional] -**total_available_margin** | **str** | Total available margin | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SubUserMode.md b/docs/SubUserMode.md deleted file mode 100644 index 137ad4b..0000000 --- a/docs/SubUserMode.md +++ /dev/null @@ -1,12 +0,0 @@ -# SubUserMode - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**is_unified** | **bool** | Is it a unified account? | [optional] -**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SystemTime.md b/docs/SystemTime.md deleted file mode 100644 index abcf889..0000000 --- a/docs/SystemTime.md +++ /dev/null @@ -1,10 +0,0 @@ -# SystemTime - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server_time** | **int** | Server current time(ms) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Ticker.md b/docs/Ticker.md deleted file mode 100644 index 4a104eb..0000000 --- a/docs/Ticker.md +++ /dev/null @@ -1,26 +0,0 @@ -# Ticker - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**last** | **str** | Last trading price | [optional] -**lowest_ask** | **str** | Recent lowest ask | [optional] -**lowest_size** | **str** | The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] -**highest_bid** | **str** | Recent highest bid | [optional] -**highest_size** | **str** | The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] -**change_percentage** | **str** | Change percentage in the last 24h | [optional] -**change_utc0** | **str** | utc0 timezone, the percentage change in the last 24 hours | [optional] -**change_utc8** | **str** | utc8 timezone, the percentage change in the last 24 hours | [optional] -**base_volume** | **str** | Base currency trade volume in the last 24h | [optional] -**quote_volume** | **str** | Quote currency trade volume in the last 24h | [optional] -**high_24h** | **str** | Highest price in 24h | [optional] -**low_24h** | **str** | Lowest price in 24h | [optional] -**etf_net_value** | **str** | ETF net value | [optional] -**etf_pre_net_value** | **str** | ETF previous net value at re-balancing time | [optional] -**etf_pre_timestamp** | **int** | ETF previous re-balancing time | [optional] -**etf_leverage** | **str** | ETF current leverage | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TotalBalance.md b/docs/TotalBalance.md deleted file mode 100644 index 91b929e..0000000 --- a/docs/TotalBalance.md +++ /dev/null @@ -1,12 +0,0 @@ -# TotalBalance - -User's balance in all accounts -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | [**AccountBalance**](AccountBalance.md) | | [optional] -**details** | [**dict(str, AccountBalance)**](AccountBalance.md) | Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Trade.md b/docs/Trade.md deleted file mode 100644 index 94cd01e..0000000 --- a/docs/Trade.md +++ /dev/null @@ -1,25 +0,0 @@ -# Trade - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Trade ID | [optional] -**create_time** | **str** | Trading time | [optional] -**create_time_ms** | **str** | Trading time, with millisecond precision | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**side** | **str** | Order side | [optional] -**role** | **str** | Trade role. No value in public endpoints | [optional] -**amount** | **str** | Trade amount | [optional] -**price** | **str** | Order price | [optional] -**order_id** | **str** | Related order ID. No value in public endpoints | [optional] -**fee** | **str** | Fee deducted. No value in public endpoints | [optional] -**fee_currency** | **str** | Fee currency unit. No value in public endpoints | [optional] -**point_fee** | **str** | Points used to deduct fee. No value in public endpoints | [optional] -**gt_fee** | **str** | GT used to deduct fee. No value in public endpoints | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] -**sequence_id** | **str** | Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market | [optional] -**text** | **str** | User defined information. No value in public endpoints | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TradeFee.md b/docs/TradeFee.md deleted file mode 100644 index a75fdab..0000000 --- a/docs/TradeFee.md +++ /dev/null @@ -1,22 +0,0 @@ -# TradeFee - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**taker_fee** | **str** | taker fee rate | [optional] -**maker_fee** | **str** | maker fee rate | [optional] -**gt_discount** | **bool** | If GT deduction is enabled | [optional] -**gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**loan_fee** | **str** | Loan fee rate of margin lending | [optional] -**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional] -**futures_taker_fee** | **str** | Futures trading taker fee | [optional] -**futures_maker_fee** | **str** | Future trading maker fee | [optional] -**delivery_taker_fee** | **str** | Delivery trading taker fee | [optional] -**delivery_maker_fee** | **str** | Delivery trading maker fee | [optional] -**debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TransactionID.md b/docs/TransactionID.md deleted file mode 100644 index 040c3c3..0000000 --- a/docs/TransactionID.md +++ /dev/null @@ -1,10 +0,0 @@ -# TransactionID - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tx_id** | **int** | Order id | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Transfer.md b/docs/Transfer.md deleted file mode 100644 index 85415bd..0000000 --- a/docs/Transfer.md +++ /dev/null @@ -1,16 +0,0 @@ -# Transfer - -Accounts available to transfer: - `spot`: spot account - `margin`: margin account - `futures`: perpetual futures account - `delivery`: delivery futures account - `options`: options account -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency | -**_from** | **str** | Account to transfer from | -**to** | **str** | Account to transfer to | -**amount** | **str** | Transfer amount | -**currency_pair** | **str** | Margin currency pair. Required if transfer from or to margin account | [optional] -**settle** | **str** | Futures settle currency. Required if transferring from or to futures account | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TransferOrderStatus.md b/docs/TransferOrderStatus.md deleted file mode 100644 index c5ffc42..0000000 --- a/docs/TransferOrderStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransferOrderStatus - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tx_id** | **str** | Order id | [optional] -**status** | **str** | Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TransferablesResult.md b/docs/TransferablesResult.md deleted file mode 100644 index 768c2cc..0000000 --- a/docs/TransferablesResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransferablesResult - -Batch query unified account can be transferred up to a maximum of results -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | The maximum amount that can be transferred out | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TriggerOrderResponse.md b/docs/TriggerOrderResponse.md deleted file mode 100644 index 6f44aa3..0000000 --- a/docs/TriggerOrderResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# TriggerOrderResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Auto 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/TriggerTime.md b/docs/TriggerTime.md deleted file mode 100644 index 702ff62..0000000 --- a/docs/TriggerTime.md +++ /dev/null @@ -1,10 +0,0 @@ -# TriggerTime - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**trigger_time** | **int** | Timestamp of the end of the countdown, in milliseconds | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UidPushOrder.md b/docs/UidPushOrder.md deleted file mode 100644 index 8d5ca0a..0000000 --- a/docs/UidPushOrder.md +++ /dev/null @@ -1,18 +0,0 @@ -# UidPushOrder - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**push_uid** | **int** | Initiator User ID | [optional] -**receive_uid** | **int** | Recipient User ID | [optional] -**currency** | **str** | Currency name | [optional] -**amount** | **str** | Transfer amount | [optional] -**create_time** | **int** | Creation time | [optional] -**status** | **str** | Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success | [optional] -**message** | **str** | PENDING Reason Tips | [optional] -**transaction_type** | **str** | Order Type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UidPushWithdrawal.md b/docs/UidPushWithdrawal.md deleted file mode 100644 index 2510006..0000000 --- a/docs/UidPushWithdrawal.md +++ /dev/null @@ -1,12 +0,0 @@ -# UidPushWithdrawal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**receive_uid** | **int** | Recipient UID | -**currency** | **str** | Currency name | -**amount** | **str** | Transfer amount | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UidPushWithdrawalResp.md b/docs/UidPushWithdrawalResp.md deleted file mode 100644 index 5363c0f..0000000 --- a/docs/UidPushWithdrawalResp.md +++ /dev/null @@ -1,10 +0,0 @@ -# UidPushWithdrawalResp - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniCurrency.md b/docs/UniCurrency.md deleted file mode 100644 index 6810b7e..0000000 --- a/docs/UniCurrency.md +++ /dev/null @@ -1,15 +0,0 @@ -# UniCurrency - -Currency detail -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] [readonly] -**min_lend_amount** | **str** | The minimum lending amount, in the unit of the currency. | [optional] [readonly] -**max_lend_amount** | **str** | The total maximum lending amount, in USDT | [optional] [readonly] -**max_rate** | **str** | Maximum rate (Hourly) | [optional] [readonly] -**min_rate** | **str** | Minimum rate (Hourly) | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniCurrencyInterest.md b/docs/UniCurrencyInterest.md deleted file mode 100644 index bd58430..0000000 --- a/docs/UniCurrencyInterest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UniCurrencyInterest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniCurrencyPair.md b/docs/UniCurrencyPair.md deleted file mode 100644 index 4e0d0c6..0000000 --- a/docs/UniCurrencyPair.md +++ /dev/null @@ -1,14 +0,0 @@ -# UniCurrencyPair - -Currency pair of the loan -## Properties -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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniInterestMode.md b/docs/UniInterestMode.md deleted file mode 100644 index 8084354..0000000 --- a/docs/UniInterestMode.md +++ /dev/null @@ -1,12 +0,0 @@ -# UniInterestMode - -Lend & Earn interest reinvestment toggle -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | -**status** | **bool** | Interest toggle settings, true - interest reinvestment, false - regular dividend | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniInterestRecord.md b/docs/UniInterestRecord.md deleted file mode 100644 index 1859976..0000000 --- a/docs/UniInterestRecord.md +++ /dev/null @@ -1,16 +0,0 @@ -# UniInterestRecord - -Interest Record -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**actual_rate** | **str** | Actual Rate | [optional] [readonly] -**interest** | **str** | Interest | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniLend.md b/docs/UniLend.md deleted file mode 100644 index a6caff9..0000000 --- a/docs/UniLend.md +++ /dev/null @@ -1,20 +0,0 @@ -# UniLend - -Loan record -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**current_amount** | **str** | Current amount | [optional] [readonly] -**amount** | **str** | Total amount | [optional] [readonly] -**lent_amount** | **str** | Lent amount | [optional] [readonly] -**frozen_amount** | **str** | Frozen amount | [optional] [readonly] -**min_rate** | **str** | Minimum interest rate | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] -**reinvest_left_amount** | **str** | Amount not reinvested | [optional] [readonly] -**create_time** | **int** | Created time of the lending order | [optional] [readonly] -**update_time** | **int** | Upated time of the lending order | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniLendInterest.md b/docs/UniLendInterest.md deleted file mode 100644 index 18a0815..0000000 --- a/docs/UniLendInterest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UniLendInterest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**interest** | **str** | Interest | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniLendRecord.md b/docs/UniLendRecord.md deleted file mode 100644 index 294f6d8..0000000 --- a/docs/UniLendRecord.md +++ /dev/null @@ -1,17 +0,0 @@ -# UniLendRecord - -Interest Record -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] [readonly] -**amount** | **str** | current amount | [optional] [readonly] -**last_wallet_amount** | **str** | Last wallet amount | [optional] [readonly] -**last_lent_amount** | **str** | Last lent amount | [optional] [readonly] -**last_frozen_amount** | **str** | Last frozen amount | [optional] [readonly] -**type** | **str** | Record type: lend - lend, redeem - redeem | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniLoan.md b/docs/UniLoan.md deleted file mode 100644 index 6e28454..0000000 --- a/docs/UniLoan.md +++ /dev/null @@ -1,16 +0,0 @@ -# UniLoan - -Loan -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**amount** | **str** | amount | [optional] [readonly] -**type** | **str** | Loan type, platform - platform, margin - margin | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] -**update_time** | **int** | Updated time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniLoanInterestRecord.md b/docs/UniLoanInterestRecord.md deleted file mode 100644 index 01c41f8..0000000 --- a/docs/UniLoanInterestRecord.md +++ /dev/null @@ -1,17 +0,0 @@ -# UniLoanInterestRecord - -Interest record -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**actual_rate** | **str** | Actual rate | [optional] [readonly] -**interest** | **str** | Interest | [optional] [readonly] -**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] -**type** | **str** | Type, platform - platform,margin - margin | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UniLoanRecord.md b/docs/UniLoanRecord.md deleted file mode 100644 index 93fd89e..0000000 --- a/docs/UniLoanRecord.md +++ /dev/null @@ -1,15 +0,0 @@ -# UniLoanRecord - -Loan records -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**amount** | **str** | The amount of lending or repaying | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md deleted file mode 100644 index e017e2a..0000000 --- a/docs/UnifiedAccount.md +++ /dev/null @@ -1,28 +0,0 @@ -# UnifiedAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**refresh_time** | **int** | Time of the most recent refresh | [optional] -**locked** | **bool** | Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode | [optional] -**balances** | [**dict(str, UnifiedBalance)**](UnifiedBalance.md) | | [optional] -**total** | **str** | Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) | [optional] -**borrowed** | **str** | The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. | [optional] -**total_initial_margin** | **str** | Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**total_margin_balance** | **str** | Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**total_maintenance_margin** | **str** | Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional] -**total_initial_margin_rate** | **str** | Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**total_maintenance_margin_rate** | **str** | Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**total_available_margin** | **str** | Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**unified_account_total** | **str** | Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode | [optional] -**unified_account_total_liab** | **str** | Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode | [optional] -**unified_account_total_equity** | **str** | Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode | [optional] -**leverage** | **str** | Actual leverage, valid in cross-currency margin/combined margin mode | [optional] [readonly] -**spot_order_loss** | **str** | Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] -**use_funding** | **bool** | Whether to use funds as margin | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md deleted file mode 100644 index 4bb1f99..0000000 --- a/docs/UnifiedApi.md +++ /dev/null @@ -1,1360 +0,0 @@ -# gate_api.UnifiedApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_unified_accounts**](UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information -[**get_unified_borrowable**](UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account -[**get_unified_transferable**](UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account -[**get_unified_transferables**](UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. -[**list_unified_loans**](UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans -[**create_unified_loan**](UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay -[**list_unified_loan_records**](UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records -[**list_unified_loan_interest_records**](UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records -[**get_unified_risk_units**](UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details -[**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account -[**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account -[**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate -[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers -[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers -[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator -[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency -[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage -[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account -[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates - - -# **list_unified_accounts** -> UnifiedAccount list_unified_accounts(currency=currency, sub_uid=sub_uid) - -Get unified account information - -The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -sub_uid = '10001' # str | Sub account user ID (optional) - -try: - # Get unified account information - api_response = api_instance.list_unified_accounts(currency=currency, sub_uid=sub_uid) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->list_unified_accounts: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **sub_uid** | **str**| Sub account user ID | [optional] - -### Return type - -[**UnifiedAccount**](UnifiedAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_unified_borrowable** -> UnifiedBorrowable get_unified_borrowable(currency) - -Query about the maximum borrowing for the unified account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency - -try: - # Query about the maximum borrowing for the unified account - api_response = api_instance.get_unified_borrowable(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_unified_borrowable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - -### Return type - -[**UnifiedBorrowable**](UnifiedBorrowable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_unified_transferable** -> UnifiedTransferable get_unified_transferable(currency) - -Query about the maximum transferable for the unified account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency - -try: - # Query about the maximum transferable for the unified account - api_response = api_instance.get_unified_transferable(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_unified_transferable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - -### Return type - -[**UnifiedTransferable**](UnifiedTransferable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_unified_transferables** -> list[TransferablesResult] get_unified_transferables(currencies) - -Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currencies = 'BTC,ETH' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - -try: - # Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. - api_response = api_instance.get_unified_transferables(currencies) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_unified_transferables: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currencies** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | - -### Return type - -[**list[TransferablesResult]**](TransferablesResult.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_unified_loans** -> list[UniLoan] list_unified_loans(currency=currency, page=page, limit=limit, type=type) - -List loans - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -type = 'platform' # str | Loan type, platform - platform, margin - margin (optional) - -try: - # List loans - api_response = api_instance.list_unified_loans(currency=currency, page=page, limit=limit, type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->list_unified_loans: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **type** | **str**| Loan type, platform - platform, margin - margin | [optional] - -### Return type - -[**list[UniLoan]**](UniLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_unified_loan** -> UnifiedLoanResult create_unified_loan(unified_loan) - -Borrow or repay - -When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -unified_loan = gate_api.UnifiedLoan() # UnifiedLoan | - -try: - # Borrow or repay - api_response = api_instance.create_unified_loan(unified_loan) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->create_unified_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **unified_loan** | [**UnifiedLoan**](UnifiedLoan.md)| | - -### Return type - -[**UnifiedLoanResult**](UnifiedLoanResult.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Operated successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_unified_loan_records** -> list[UnifiedLoanRecord] list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) - -Get load records - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -type = 'type_example' # str | The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) - -try: - # Get load records - api_response = api_instance.list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->list_unified_loan_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **str**| The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -[**list[UnifiedLoanRecord]**](UnifiedLoanRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_unified_loan_interest_records** -> list[UniLoanInterestRecord] list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) - -List interest records - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -type = 'platform' # str | Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin (optional) - -try: - # List interest records - api_response = api_instance.list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->list_unified_loan_interest_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **type** | **str**| Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin | [optional] - -### Return type - -[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_unified_risk_units** -> UnifiedRiskUnits get_unified_risk_units() - -Get user risk unit details - -Retrieve user risk unit details, only valid in portfolio margin mode - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) - -try: - # Get user risk unit details - api_response = api_instance.get_unified_risk_units() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_unified_risk_units: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UnifiedRiskUnits**](UnifiedRiskUnits.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_unified_mode** -> UnifiedModeSet get_unified_mode() - -Query mode of the unified account - -Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) - -try: - # Query mode of the unified account - api_response = api_instance.get_unified_mode() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_unified_mode: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UnifiedModeSet**](UnifiedModeSet.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_unified_mode** -> set_unified_mode(unified_mode_set) - -Set mode of the unified account - -Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -unified_mode_set = gate_api.UnifiedModeSet() # UnifiedModeSet | - -try: - # Set mode of the unified account - api_instance.set_unified_mode(unified_mode_set) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->set_unified_mode: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **unified_mode_set** | [**UnifiedModeSet**](UnifiedModeSet.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | 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_unified_estimate_rate** -> dict(str, str) get_unified_estimate_rate(currencies) - -Get unified estimate rate - -Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. - -try: - # Get unified estimate rate - api_response = api_instance.get_unified_estimate_rate(currencies) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_unified_estimate_rate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. | - -### Return type - -**dict(str, str)** - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_currency_discount_tiers** -> list[UnifiedDiscount] list_currency_discount_tiers() - -List currency discount tiers - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) - -try: - # List currency discount tiers - api_response = api_instance.list_currency_discount_tiers() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->list_currency_discount_tiers: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[UnifiedDiscount]**](UnifiedDiscount.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_loan_margin_tiers** -> list[UnifiedMarginTiers] list_loan_margin_tiers() - -List loan margin tiers - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) - -try: - # List loan margin tiers - api_response = api_instance.list_loan_margin_tiers() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->list_loan_margin_tiers: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[UnifiedMarginTiers]**](UnifiedMarginTiers.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **calculate_portfolio_margin** -> UnifiedPortfolioOutput calculate_portfolio_margin(unified_portfolio_input) - -Portfolio margin calculator - -Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -unified_portfolio_input = gate_api.UnifiedPortfolioInput() # UnifiedPortfolioInput | - -try: - # Portfolio margin calculator - api_response = api_instance.calculate_portfolio_margin(unified_portfolio_input) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->calculate_portfolio_margin: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **unified_portfolio_input** | [**UnifiedPortfolioInput**](UnifiedPortfolioInput.md)| | - -### Return type - -[**UnifiedPortfolioOutput**](UnifiedPortfolioOutput.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_user_leverage_currency_config** -> UnifiedLeverageConfig get_user_leverage_currency_config(currency) - -Minimum currency leverage that can be set - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency - -try: - # Minimum currency leverage that can be set - api_response = api_instance.get_user_leverage_currency_config(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_user_leverage_currency_config: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - -### Return type - -[**UnifiedLeverageConfig**](UnifiedLeverageConfig.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_user_leverage_currency_setting** -> UnifiedLeverageSetting get_user_leverage_currency_setting(currency=currency) - -Get the leverage multiple of the user currency - -Get the user's currency leverage. If currency is not passed, query all currencies. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency (optional) - -try: - # Get the leverage multiple of the user currency - api_response = api_instance.get_user_leverage_currency_setting(currency=currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_user_leverage_currency_setting: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | [optional] - -### Return type - -[**UnifiedLeverageSetting**](UnifiedLeverageSetting.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_user_leverage_currency_setting** -> set_user_leverage_currency_setting(unified_leverage_setting) - -Set the loan currency leverage - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -unified_leverage_setting = gate_api.UnifiedLeverageSetting() # UnifiedLeverageSetting | - -try: - # Set the loan currency leverage - api_instance.set_user_leverage_currency_setting(unified_leverage_setting) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->set_user_leverage_currency_setting: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **unified_leverage_setting** | [**UnifiedLeverageSetting**](UnifiedLeverageSetting.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | 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_unified_currencies** -> list[UnifiedCurrency] list_unified_currencies(currency=currency) - -List of loan currencies supported by unified account - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency (optional) - -try: - # List of loan currencies supported by unified account - api_response = api_instance.list_unified_currencies(currency=currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->list_unified_currencies: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | [optional] - -### Return type - -[**list[UnifiedCurrency]**](UnifiedCurrency.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_history_loan_rate** -> UnifiedHistoryLoanRate get_history_loan_rate(currency, tier=tier, page=page, limit=limit) - -get historical lending rates - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.UnifiedApi(api_client) -currency = 'USDT' # str | Currency -tier = '1' # str | The VIP level of the floating rate that needs to be queried (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) - -try: - # get historical lending rates - api_response = api_instance.get_history_loan_rate(currency, tier=tier, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling UnifiedApi->get_history_loan_rate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - **tier** | **str**| The VIP level of the floating rate that needs to be queried | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -[**UnifiedHistoryLoanRate**](UnifiedHistoryLoanRate.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md deleted file mode 100644 index a5847e1..0000000 --- a/docs/UnifiedBalance.md +++ /dev/null @@ -1,28 +0,0 @@ -# UnifiedBalance - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**available** | **str** | Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes | [optional] -**freeze** | **str** | The locked amount is valid in single currency margin/cross-currency margin/combined margin mode | [optional] -**borrowed** | **str** | Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**negative_liab** | **str** | Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional] -**futures_pos_liab** | **str** | Contract opening position borrowing currency (abandoned, to be offline field) | [optional] -**equity** | **str** | Equity, valid in single currency margin/cross currency margin/combined margin mode | [optional] -**total_freeze** | **str** | Total occupancy (discarded, to be offline field) | [optional] -**total_liab** | **str** | Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**spot_in_use** | **str** | The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes | [optional] -**funding** | **str** | Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch | [optional] -**funding_version** | **str** | Funding version | [optional] -**cross_balance** | **str** | Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode | [optional] -**iso_balance** | **str** | Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**im** | **str** | Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**mm** | **str** | The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. | [optional] -**imr** | **str** | Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**mmr** | **str** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**margin_balance** | **str** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional] -**available_margin** | **str** | Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined 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/UnifiedBorrowable.md b/docs/UnifiedBorrowable.md deleted file mode 100644 index edd2c95..0000000 --- a/docs/UnifiedBorrowable.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnifiedBorrowable - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | Max borrowable amount | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedCurrency.md b/docs/UnifiedCurrency.md deleted file mode 100644 index 031c9f6..0000000 --- a/docs/UnifiedCurrency.md +++ /dev/null @@ -1,15 +0,0 @@ -# UnifiedCurrency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Currency name | [optional] -**prec** | **str** | Currency precision | [optional] -**min_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional] -**user_max_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional] -**total_max_borrow_amount** | **str** | The maximum debit limit for the platform is USDT | [optional] -**loan_status** | **str** | Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedDiscount.md b/docs/UnifiedDiscount.md deleted file mode 100644 index a75f59f..0000000 --- a/docs/UnifiedDiscount.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnifiedDiscount - -Currency discount tiers -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**discount_tiers** | [**list[UnifiedDiscountTiers]**](UnifiedDiscountTiers.md) | Tiered discount | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedDiscountTiers.md b/docs/UnifiedDiscountTiers.md deleted file mode 100644 index b6d7f19..0000000 --- a/docs/UnifiedDiscountTiers.md +++ /dev/null @@ -1,14 +0,0 @@ -# UnifiedDiscountTiers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tier** | **str** | Tier | [optional] -**discount** | **str** | Discount | [optional] -**lower_limit** | **str** | Lower limit | [optional] -**upper_limit** | **str** | Upper limit,+ indicates positive infinity | [optional] -**leverage** | **str** | Position leverage | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedHistoryLoanRate.md b/docs/UnifiedHistoryLoanRate.md deleted file mode 100644 index 9d9d670..0000000 --- a/docs/UnifiedHistoryLoanRate.md +++ /dev/null @@ -1,13 +0,0 @@ -# UnifiedHistoryLoanRate - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**tier** | **str** | The VIP level of the floating rate required | [optional] -**tier_up_rate** | **str** | VIP level corresponding floating rate | [optional] -**rates** | [**list[UnifiedHistoryLoanRateRates]**](UnifiedHistoryLoanRateRates.md) | Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in 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/UnifiedHistoryLoanRateRates.md b/docs/UnifiedHistoryLoanRateRates.md deleted file mode 100644 index af73623..0000000 --- a/docs/UnifiedHistoryLoanRateRates.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnifiedHistoryLoanRateRates - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **int** | The hourly timestamp corresponding to the interest rate, in milliseconds | [optional] -**rate** | **str** | Historical interest rates for this hour | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedLeverageConfig.md b/docs/UnifiedLeverageConfig.md deleted file mode 100644 index 3fe3c49..0000000 --- a/docs/UnifiedLeverageConfig.md +++ /dev/null @@ -1,16 +0,0 @@ -# UnifiedLeverageConfig - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**current_leverage** | **str** | Current leverage ratio | [optional] -**min_leverage** | **str** | Minimum adjustable leverage ratio | [optional] -**max_leverage** | **str** | Maximum adjustable leverage ratio | [optional] -**debit** | **str** | Current liabilities | [optional] -**available_margin** | **str** | Available Margin | [optional] -**borrowable** | **str** | The current leverage you can choose is | [optional] -**except_leverage_borrowable** | **str** | The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedLeverageSetting.md b/docs/UnifiedLeverageSetting.md deleted file mode 100644 index a5ea773..0000000 --- a/docs/UnifiedLeverageSetting.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnifiedLeverageSetting - -Loan currency leverage -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | -**leverage** | **str** | multiple | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedLoan.md b/docs/UnifiedLoan.md deleted file mode 100644 index 9bc0760..0000000 --- a/docs/UnifiedLoan.md +++ /dev/null @@ -1,15 +0,0 @@ -# UnifiedLoan - -Borrow or repay -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | -**type** | **str** | type: borrow - borrow, repay - repay | -**amount** | **str** | The amount of lending or repaying | -**repaid_all** | **bool** | Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. | [optional] -**text** | **str** | User defined custom ID | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedLoanRecord.md b/docs/UnifiedLoanRecord.md deleted file mode 100644 index 43d8410..0000000 --- a/docs/UnifiedLoanRecord.md +++ /dev/null @@ -1,18 +0,0 @@ -# UnifiedLoanRecord - -Loan records -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | id | [optional] [readonly] -**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly] -**repayment_type** | **str** | Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment | [optional] [readonly] -**borrow_type** | **str** | Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment | [optional] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**amount** | **str** | The amount of lending or repaying | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedLoanResult.md b/docs/UnifiedLoanResult.md deleted file mode 100644 index 218d159..0000000 --- a/docs/UnifiedLoanResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnifiedLoanResult - -Unified account loan and repayment response results -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tran_id** | **int** | Transaction id | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedMarginTiers.md b/docs/UnifiedMarginTiers.md deleted file mode 100644 index 2fb5930..0000000 --- a/docs/UnifiedMarginTiers.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnifiedMarginTiers - -Unified margin tiers -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**margin_tiers** | [**list[MarginTiers]**](MarginTiers.md) | Margin tiers | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedModeSet.md b/docs/UnifiedModeSet.md deleted file mode 100644 index 7d564ce..0000000 --- a/docs/UnifiedModeSet.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnifiedModeSet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model | -**settings** | [**UnifiedSettings**](UnifiedSettings.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedPortfolioInput.md b/docs/UnifiedPortfolioInput.md deleted file mode 100644 index 296fdb1..0000000 --- a/docs/UnifiedPortfolioInput.md +++ /dev/null @@ -1,17 +0,0 @@ -# UnifiedPortfolioInput - -Input for the portfolio margin calculator. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**spot_balances** | [**list[MockSpotBalance]**](MockSpotBalance.md) | Spot | [optional] -**spot_orders** | [**list[MockSpotOrder]**](MockSpotOrder.md) | Spot orders | [optional] -**futures_positions** | [**list[MockFuturesPosition]**](MockFuturesPosition.md) | Futures positions | [optional] -**futures_orders** | [**list[MockFuturesOrder]**](MockFuturesOrder.md) | Futures order | [optional] -**options_positions** | [**list[MockOptionsPosition]**](MockOptionsPosition.md) | Options positions | [optional] -**options_orders** | [**list[MockOptionsOrder]**](MockOptionsOrder.md) | Option orders | [optional] -**spot_hedge** | **bool** | Whether to enable spot hedging. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedPortfolioOutput.md b/docs/UnifiedPortfolioOutput.md deleted file mode 100644 index 11447de..0000000 --- a/docs/UnifiedPortfolioOutput.md +++ /dev/null @@ -1,14 +0,0 @@ -# UnifiedPortfolioOutput - -The output of the portfolio margin calculator. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**maintain_margin_total** | **str** | Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. | [optional] -**initial_margin_total** | **str** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. | [optional] -**calculate_time** | **int** | Calculate time | [optional] -**risk_unit** | [**list[MockRiskUnit]**](MockRiskUnit.md) | Risk unit | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedRiskUnits.md b/docs/UnifiedRiskUnits.md deleted file mode 100644 index 8765dbf..0000000 --- a/docs/UnifiedRiskUnits.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnifiedRiskUnits - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] -**risk_units** | [**list[RiskUnits]**](RiskUnits.md) | Risk unit | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedSettings.md b/docs/UnifiedSettings.md deleted file mode 100644 index 185f55e..0000000 --- a/docs/UnifiedSettings.md +++ /dev/null @@ -1,13 +0,0 @@ -# UnifiedSettings - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**usdt_futures** | **bool** | USDT contract switch. In cross-currency margin mode, it can only be turned on and not off | [optional] -**spot_hedge** | **bool** | Spot hedging switch. | [optional] -**use_funding** | **bool** | switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin | [optional] -**options** | **bool** | Option switch. In cross-currency margin mode, it can only be turned on and not off | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnifiedTransferable.md b/docs/UnifiedTransferable.md deleted file mode 100644 index 69f9b19..0000000 --- a/docs/UnifiedTransferable.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnifiedTransferable - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | The maximum amount that can be transferred out | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserLtvInfo.md b/docs/UserLtvInfo.md deleted file mode 100644 index f267508..0000000 --- a/docs/UserLtvInfo.md +++ /dev/null @@ -1,17 +0,0 @@ -# UserLtvInfo - -User's currency statistics data -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**collateral_currency** | **str** | Collateral | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**alert_ltv** | **str** | Warning collateralization ratio | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] -**min_borrow_amount** | **str** | Minimum borrowable amount for the loan currency | [optional] -**left_borrowable_amount** | **str** | Remaining borrowable amount for the loan currency | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSub.md b/docs/UserSub.md deleted file mode 100644 index 01c7b2e..0000000 --- a/docs/UserSub.md +++ /dev/null @@ -1,13 +0,0 @@ -# UserSub - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uid** | **int** | User ID | [optional] -**belong** | **str** | The system to which the user belongs (partner referral). If empty, it means not belonging to any system. | [optional] -**type** | **int** | Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) | [optional] -**ref_uid** | **int** | Inviter user ID | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSubRelation.md b/docs/UserSubRelation.md deleted file mode 100644 index 912227c..0000000 --- a/docs/UserSubRelation.md +++ /dev/null @@ -1,10 +0,0 @@ -# UserSubRelation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**list** | [**list[UserSub]**](UserSub.md) | Subordinate relationship list | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserTotalAmount.md b/docs/UserTotalAmount.md deleted file mode 100644 index 38d1b41..0000000 --- a/docs/UserTotalAmount.md +++ /dev/null @@ -1,12 +0,0 @@ -# UserTotalAmount - -Total borrowed amount and pledged collateral amount by the user -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**borrow_amount** | **str** | Total borrowing amount, calculated in USDT | [optional] -**collateral_amount** | **str** | Total collateral amount, calculated in USDT | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WalletApi.md b/docs/WalletApi.md deleted file mode 100644 index 6373f86..0000000 --- a/docs/WalletApi.md +++ /dev/null @@ -1,1488 +0,0 @@ -# gate_api.WalletApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency -[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address -[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records -[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records -[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts -[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts -[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts -[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account -[**get_transfer_order_status**](WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query -[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status -[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances -[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances -[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances -[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info -[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address -[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee -[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances -[**list_small_balance**](WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance -[**convert_small_balance**](WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance -[**list_small_balance_history**](WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history -[**list_push_orders**](WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history - - -# **list_currency_chains** -> list[CurrencyChain] list_currency_chains(currency) - -List chains supported for specified currency - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'GT' # str | Currency name - -try: - # List chains supported for specified currency - api_response = api_instance.list_currency_chains(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 WalletApi->list_currency_chains: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | - -### Return type - -[**list[CurrencyChain]**](CurrencyChain.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_deposit_address** -> DepositAddress get_deposit_address(currency) - -Generate currency deposit address - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'USDT' # str | Currency name - -try: - # Generate currency deposit address - api_response = api_instance.get_deposit_address(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 WalletApi->get_deposit_address: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | - -### Return type - -[**DepositAddress**](DepositAddress.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** | Address successfully generated | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_withdrawals** -> list[WithdrawalRecord] list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset) - -Retrieve withdrawal records - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # Retrieve withdrawal records - api_response = api_instance.list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_withdrawals: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[WithdrawalRecord]**](WithdrawalRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_deposits** -> list[LedgerRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) - -Retrieve deposit records - -Record time range cannot exceed 30 days - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | The maximum number of entries returned in the list is limited to 500 transactions. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # Retrieve deposit records - api_response = api_instance.list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_deposits: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| The maximum number of entries returned in the list is limited to 500 transactions. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[LedgerRecord]**](LedgerRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **transfer** -> TransactionID transfer(transfer) - -Transfer between trading accounts - -Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options - -### 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) -transfer = gate_api.Transfer() # Transfer | - -try: - # Transfer between trading accounts - api_response = api_instance.transfer(transfer) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->transfer: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transfer** | [**Transfer**](Transfer.md)| | - -### Return type - -[**TransactionID**](TransactionID.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** | Balance transferred | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_sub_account_transfers** -> list[SubAccountTransfer] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) - -Retrieve transfer records between main and sub accounts - -Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved - -### 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) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) - -try: - # Retrieve transfer records between main and sub accounts - api_response = api_instance.list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_sub_account_transfers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - -### Return type - -[**list[SubAccountTransfer]**](SubAccountTransfer.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **transfer_with_sub_account** -> TransactionID transfer_with_sub_account(sub_account_transfer) - -Transfer between main and sub accounts - -Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. - -### 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) -sub_account_transfer = gate_api.SubAccountTransfer() # SubAccountTransfer | - -try: - # Transfer between main and sub accounts - api_response = api_instance.transfer_with_sub_account(sub_account_transfer) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->transfer_with_sub_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_account_transfer** | [**SubAccountTransfer**](SubAccountTransfer.md)| | - -### Return type - -[**TransactionID**](TransactionID.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** | Balance transferred | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sub_account_to_sub_account** -> TransactionID sub_account_to_sub_account(sub_account_to_sub_account) - -Sub-account transfers to sub-account - -It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. - -### 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) -sub_account_to_sub_account = gate_api.SubAccountToSubAccount() # SubAccountToSubAccount | - -try: - # Sub-account transfers to sub-account - api_response = api_instance.sub_account_to_sub_account(sub_account_to_sub_account) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->sub_account_to_sub_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_account_to_sub_account** | [**SubAccountToSubAccount**](SubAccountToSubAccount.md)| | - -### Return type - -[**TransactionID**](TransactionID.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** | Balance transferred | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_transfer_order_status** -> TransferOrderStatus get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) - -Transfer status query - -Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -client_order_id = 'da3ce7a088c8b0372b741419c7829033' # str | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. (optional) -tx_id = '59636381286' # str | The transfer operation number and client_order_id cannot be empty at the same time (optional) - -try: - # Transfer status query - api_response = api_instance.get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->get_transfer_order_status: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client_order_id** | **str**| The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] - **tx_id** | **str**| The transfer operation number and client_order_id cannot be empty at the same time | [optional] - -### Return type - -[**TransferOrderStatus**](TransferOrderStatus.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Transfer status obtained successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_withdraw_status** -> list[WithdrawStatus] list_withdraw_status(currency=currency) - -Retrieve withdrawal status - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) - -try: - # Retrieve withdrawal status - api_response = api_instance.list_withdraw_status(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 WalletApi->list_withdraw_status: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - -### Return type - -[**list[WithdrawStatus]**](WithdrawStatus.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_sub_account_balances** -> list[SubAccountBalance] list_sub_account_balances(sub_uid=sub_uid) - -Retrieve sub account balances - -### 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) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) - -try: - # Retrieve sub account balances - api_response = api_instance.list_sub_account_balances(sub_uid=sub_uid) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_sub_account_balances: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - -### Return type - -[**list[SubAccountBalance]**](SubAccountBalance.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_sub_account_margin_balances** -> list[SubAccountMarginBalance] list_sub_account_margin_balances(sub_uid=sub_uid) - -Query sub accounts' margin balances - -### 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) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) - -try: - # Query sub accounts' margin balances - api_response = api_instance.list_sub_account_margin_balances(sub_uid=sub_uid) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_sub_account_margin_balances: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - -### Return type - -[**list[SubAccountMarginBalance]**](SubAccountMarginBalance.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_sub_account_futures_balances** -> list[SubAccountFuturesBalance] list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) - -Query sub accounts' futures account balances - -### 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) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) -settle = 'usdt' # str | Query only balances of specified settle currency (optional) - -try: - # Query sub accounts' futures account balances - api_response = api_instance.list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_sub_account_futures_balances: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - **settle** | **str**| Query only balances of specified settle currency | [optional] - -### Return type - -[**list[SubAccountFuturesBalance]**](SubAccountFuturesBalance.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_sub_account_cross_margin_balances** -> list[SubAccountCrossMarginBalance] list_sub_account_cross_margin_balances(sub_uid=sub_uid) - -Query subaccount's cross_margin account info - -### 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) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) - -try: - # Query subaccount's cross_margin account info - api_response = api_instance.list_sub_account_cross_margin_balances(sub_uid=sub_uid) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_sub_account_cross_margin_balances: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - -### Return type - -[**list[SubAccountCrossMarginBalance]**](SubAccountCrossMarginBalance.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_saved_address** -> list[SavedAddress] list_saved_address(currency, chain=chain, limit=limit, page=page) - -Query saved address - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'USDT' # str | Currency -chain = '' # str | Chain name (optional) (default to '') -limit = '50' # str | Maximum number returned, 100 at most (optional) (default to '50') -page = 1 # int | Page number (optional) (default to 1) - -try: - # Query saved address - api_response = api_instance.list_saved_address(currency, chain=chain, limit=limit, page=page) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_saved_address: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - **chain** | **str**| Chain name | [optional] [default to ''] - **limit** | **str**| Maximum number returned, 100 at most | [optional] [default to '50'] - **page** | **int**| Page number | [optional] [default to 1] - -### Return type - -[**list[SavedAddress]**](SavedAddress.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_trade_fee** -> TradeFee get_trade_fee(currency_pair=currency_pair, settle=settle) - -Retrieve personal trading fee - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional) -settle = 'BTC' # str | Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. (optional) - -try: - # Retrieve personal trading fee - api_response = api_instance.get_trade_fee(currency_pair=currency_pair, settle=settle) - 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_trade_fee: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional] - **settle** | **str**| Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. | [optional] - -### Return type - -[**TradeFee**](TradeFee.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_total_balance** -> TotalBalance get_total_balance(currency=currency) - -Retrieve user's total balances - -This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'USDT' # str | Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. (optional) (default to 'USDT') - -try: - # Retrieve user's total balances - api_response = api_instance.get_total_balance(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 WalletApi->get_total_balance: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. | [optional] [default to 'USDT'] - -### Return type - -[**TotalBalance**](TotalBalance.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 is valid and is successfully responded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_small_balance** -> list[SmallBalance] list_small_balance() - -List small balance - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) - -try: - # List small balance - api_response = api_instance.list_small_balance() - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_small_balance: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[SmallBalance]**](SmallBalance.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **convert_small_balance** -> convert_small_balance(convert_small_balance) - -Convert small balance - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -convert_small_balance = gate_api.ConvertSmallBalance() # ConvertSmallBalance | - -try: - # Convert small balance - api_instance.convert_small_balance(convert_small_balance) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->convert_small_balance: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **convert_small_balance** | [**ConvertSmallBalance**](ConvertSmallBalance.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_small_balance_history** -> list[SmallBalanceHistory] list_small_balance_history(currency=currency, page=page, limit=limit) - -List small balance history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -currency = 'currency_example' # str | Currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) - -try: - # List small balance history - api_response = api_instance.list_small_balance_history(currency=currency, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_small_balance_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -[**list[SmallBalanceHistory]**](SmallBalanceHistory.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_push_orders** -> list[UidPushOrder] list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) - -Retrieve the UID transfer history - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WalletApi(api_client) -id = 56 # int | Order ID (optional) -_from = 56 # int | The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp (optional) -to = 56 # int | The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. (optional) -limit = 100 # int | The maximum number of items returned in the list, the default value is 100 (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -transaction_type = 'withdraw' # str | The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. (optional) (default to 'withdraw') - -try: - # Retrieve the UID transfer history - api_response = api_instance.list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WalletApi->list_push_orders: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| Order ID | [optional] - **_from** | **int**| The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp | [optional] - **to** | **int**| The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. | [optional] - **limit** | **int**| The maximum number of items returned in the list, the default value is 100 | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **transaction_type** | **str**| The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. | [optional] [default to 'withdraw'] - -### Return type - -[**list[UidPushOrder]**](UidPushOrder.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/WithdrawStatus.md b/docs/WithdrawStatus.md deleted file mode 100644 index 2b8e5de..0000000 --- a/docs/WithdrawStatus.md +++ /dev/null @@ -1,21 +0,0 @@ -# WithdrawStatus - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**name** | **str** | Currency name | [optional] -**name_cn** | **str** | Currency Chinese name | [optional] -**deposit** | **str** | Deposits fee | [optional] -**withdraw_percent** | **str** | Withdrawal fee rate percentage | [optional] -**withdraw_fix** | **str** | Fixed withdrawal fee | [optional] -**withdraw_day_limit** | **str** | Daily allowed withdrawal amount | [optional] -**withdraw_amount_mini** | **str** | Minimum withdrawal amount | [optional] -**withdraw_day_limit_remain** | **str** | Daily withdrawal amount left | [optional] -**withdraw_eachtime_limit** | **str** | Maximum amount for each withdrawal | [optional] -**withdraw_fix_on_chains** | **dict(str, str)** | Fixed withdrawal fee on multiple chains | [optional] -**withdraw_percent_on_chains** | **dict(str, str)** | Percentage withdrawal fee on multiple chains | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WithdrawalApi.md b/docs/WithdrawalApi.md deleted file mode 100644 index 7a118ce..0000000 --- a/docs/WithdrawalApi.md +++ /dev/null @@ -1,216 +0,0 @@ -# gate_api.WithdrawalApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw -[**withdraw_push_order**](WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer -[**cancel_withdrawal**](WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID - - -# **withdraw** -> LedgerRecord withdraw(ledger_record) - -Withdraw - -Withdrawals to Gate addresses do not incur transaction fees. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WithdrawalApi(api_client) -ledger_record = gate_api.LedgerRecord() # LedgerRecord | - -try: - # Withdraw - api_response = api_instance.withdraw(ledger_record) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WithdrawalApi->withdraw: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ledger_record** | [**LedgerRecord**](LedgerRecord.md)| | - -### Return type - -[**LedgerRecord**](LedgerRecord.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** | Withdraw request is accepted. Refer to withdrawal records for status | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **withdraw_push_order** -> UidPushWithdrawalResp withdraw_push_order(uid_push_withdrawal) - -UID transfer - -Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.WithdrawalApi(api_client) -uid_push_withdrawal = gate_api.UidPushWithdrawal() # UidPushWithdrawal | - -try: - # UID transfer - api_response = api_instance.withdraw_push_order(uid_push_withdrawal) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling WithdrawalApi->withdraw_push_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uid_push_withdrawal** | [**UidPushWithdrawal**](UidPushWithdrawal.md)| | - -### Return type - -[**UidPushWithdrawalResp**](UidPushWithdrawalResp.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The request has been accepted. Check the withdrawal record status for the processing result. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **cancel_withdrawal** -> LedgerRecord cancel_withdrawal(withdrawal_id) - -Cancel withdrawal with specified 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.WithdrawalApi(api_client) -withdrawal_id = '210496' # str | - -try: - # Cancel withdrawal with specified ID - api_response = api_instance.cancel_withdrawal(withdrawal_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 WithdrawalApi->cancel_withdrawal: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **withdrawal_id** | **str**| | - -### Return type - -[**LedgerRecord**](LedgerRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**202** | Cancellation accepted. Refer to record status for the cancellation result | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md deleted file mode 100644 index 1a59dd1..0000000 --- a/docs/WithdrawalRecord.md +++ /dev/null @@ -1,21 +0,0 @@ -# WithdrawalRecord - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Record ID | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] -**block_number** | **str** | 区块编号 | [optional] [readonly] -**withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**timestamp** | **str** | Operation time | [optional] [readonly] -**amount** | **str** | Currency amount | -**fee** | **str** | fee | [optional] [readonly] -**currency** | **str** | Currency name | -**address** | **str** | Withdrawal address. Required for withdrawals | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] -**status** | **str** | Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/gate_api/__init__.py b/gate_api/__init__.py deleted file mode 100644 index a04fbd1..0000000 --- a/gate_api/__init__.py +++ /dev/null @@ -1,293 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -__version__ = "6.96.0" - -# import apis into sdk package -from gate_api.api.earn_uni_api import EarnUniApi -from gate_api.api.margin_uni_api import MarginUniApi -from gate_api.api.sub_account_api import SubAccountApi -from gate_api.api.unified_api import UnifiedApi -from gate_api.api.account_api import AccountApi -from gate_api.api.collateral_loan_api import CollateralLoanApi -from gate_api.api.delivery_api import DeliveryApi -from gate_api.api.earn_api import EarnApi -from gate_api.api.flash_swap_api import FlashSwapApi -from gate_api.api.futures_api import FuturesApi -from gate_api.api.margin_api import MarginApi -from gate_api.api.multi_collateral_loan_api import MultiCollateralLoanApi -from gate_api.api.options_api import OptionsApi -from gate_api.api.rebate_api import RebateApi -from gate_api.api.spot_api import SpotApi -from gate_api.api.wallet_api import WalletApi -from gate_api.api.withdrawal_api import WithdrawalApi - -# import ApiClient -from gate_api.api_client import ApiClient -from gate_api.configuration import Configuration -from gate_api.exceptions import OpenApiException -from gate_api.exceptions import ApiTypeError -from gate_api.exceptions import ApiValueError -from gate_api.exceptions import ApiKeyError -from gate_api.exceptions import ApiException -# import models into sdk package -from gate_api.models.account_balance import AccountBalance -from gate_api.models.account_detail import AccountDetail -from gate_api.models.account_detail_key import AccountDetailKey -from gate_api.models.account_rate_limit import AccountRateLimit -from gate_api.models.agency_commission import AgencyCommission -from gate_api.models.agency_commission_history import AgencyCommissionHistory -from gate_api.models.agency_transaction import AgencyTransaction -from gate_api.models.agency_transaction_history import AgencyTransactionHistory -from gate_api.models.auto_repay_setting import AutoRepaySetting -from gate_api.models.batch_amend_item import BatchAmendItem -from gate_api.models.batch_amend_order_req import BatchAmendOrderReq -from gate_api.models.batch_futures_order import BatchFuturesOrder -from gate_api.models.batch_order import BatchOrder -from gate_api.models.borrow_currency_info import BorrowCurrencyInfo -from gate_api.models.broker_commission import BrokerCommission -from gate_api.models.broker_commission1 import BrokerCommission1 -from gate_api.models.broker_transaction import BrokerTransaction -from gate_api.models.broker_transaction1 import BrokerTransaction1 -from gate_api.models.cancel_batch_order import CancelBatchOrder -from gate_api.models.cancel_order_result import CancelOrderResult -from gate_api.models.collateral_adjust import CollateralAdjust -from gate_api.models.collateral_adjust_res import CollateralAdjustRes -from gate_api.models.collateral_align import CollateralAlign -from gate_api.models.collateral_currency import CollateralCurrency -from gate_api.models.collateral_currency_info import CollateralCurrencyInfo -from gate_api.models.collateral_currency_res import CollateralCurrencyRes -from gate_api.models.collateral_current_rate import CollateralCurrentRate -from gate_api.models.collateral_fix_rate import CollateralFixRate -from gate_api.models.collateral_loan_currency import CollateralLoanCurrency -from gate_api.models.collateral_ltv import CollateralLtv -from gate_api.models.collateral_order import CollateralOrder -from gate_api.models.collateral_record import CollateralRecord -from gate_api.models.contract import Contract -from gate_api.models.contract_stat import ContractStat -from gate_api.models.convert_small_balance import ConvertSmallBalance -from gate_api.models.countdown_cancel_all_futures_task import CountdownCancelAllFuturesTask -from gate_api.models.countdown_cancel_all_options_task import CountdownCancelAllOptionsTask -from gate_api.models.countdown_cancel_all_spot_task import CountdownCancelAllSpotTask -from gate_api.models.create_collateral_order import CreateCollateralOrder -from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder -from gate_api.models.create_uni_lend import CreateUniLend -from gate_api.models.create_uni_loan import CreateUniLoan -from gate_api.models.cross_margin_account import CrossMarginAccount -from gate_api.models.cross_margin_account_book import CrossMarginAccountBook -from gate_api.models.cross_margin_balance import CrossMarginBalance -from gate_api.models.cross_margin_balance1 import CrossMarginBalance1 -from gate_api.models.cross_margin_currency import CrossMarginCurrency -from gate_api.models.cross_margin_loan import CrossMarginLoan -from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest -from gate_api.models.cross_margin_repayment import CrossMarginRepayment -from gate_api.models.cross_margin_transferable import CrossMarginTransferable -from gate_api.models.currency import Currency -from gate_api.models.currency_chain import CurrencyChain -from gate_api.models.currency_pair import CurrencyPair -from gate_api.models.currency_quota import CurrencyQuota -from gate_api.models.debit_fee import DebitFee -from gate_api.models.delivery_candlestick import DeliveryCandlestick -from gate_api.models.delivery_contract import DeliveryContract -from gate_api.models.delivery_settlement import DeliverySettlement -from gate_api.models.deposit_address import DepositAddress -from gate_api.models.dual_get_orders import DualGetOrders -from gate_api.models.dual_get_plans import DualGetPlans -from gate_api.models.eth2_rate_list import Eth2RateList -from gate_api.models.eth2_swap import Eth2Swap -from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair -from gate_api.models.flash_swap_order import FlashSwapOrder -from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview -from gate_api.models.flash_swap_order_request import FlashSwapOrderRequest -from gate_api.models.flash_swap_preview_request import FlashSwapPreviewRequest -from gate_api.models.funding_account import FundingAccount -from gate_api.models.funding_rate_record import FundingRateRecord -from gate_api.models.future_cancel_order_result import FutureCancelOrderResult -from gate_api.models.futures_account import FuturesAccount -from gate_api.models.futures_account_book import FuturesAccountBook -from gate_api.models.futures_account_history import FuturesAccountHistory -from gate_api.models.futures_auto_deleverage import FuturesAutoDeleverage -from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest -from gate_api.models.futures_candlestick import FuturesCandlestick -from gate_api.models.futures_fee import FuturesFee -from gate_api.models.futures_index_constituents import FuturesIndexConstituents -from gate_api.models.futures_initial_order import FuturesInitialOrder -from gate_api.models.futures_limit_risk_tiers import FuturesLimitRiskTiers -from gate_api.models.futures_liq_order import FuturesLiqOrder -from gate_api.models.futures_liquidate import FuturesLiquidate -from gate_api.models.futures_order import FuturesOrder -from gate_api.models.futures_order_amendment import FuturesOrderAmendment -from gate_api.models.futures_order_book import FuturesOrderBook -from gate_api.models.futures_order_book_item import FuturesOrderBookItem -from gate_api.models.futures_premium_index import FuturesPremiumIndex -from gate_api.models.futures_price_trigger import FuturesPriceTrigger -from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder -from gate_api.models.futures_ticker import FuturesTicker -from gate_api.models.futures_trade import FuturesTrade -from gate_api.models.index_constituent import IndexConstituent -from gate_api.models.insurance_record import InsuranceRecord -from gate_api.models.ledger_record import LedgerRecord -from gate_api.models.liquidate_order import LiquidateOrder -from gate_api.models.margin_account import MarginAccount -from gate_api.models.margin_account_book import MarginAccountBook -from gate_api.models.margin_account_currency import MarginAccountCurrency -from gate_api.models.margin_leverage_tier import MarginLeverageTier -from gate_api.models.margin_market_leverage import MarginMarketLeverage -from gate_api.models.margin_tiers import MarginTiers -from gate_api.models.margin_transferable import MarginTransferable -from gate_api.models.max_uni_borrowable import MaxUniBorrowable -from gate_api.models.mock_futures_order import MockFuturesOrder -from gate_api.models.mock_futures_position import MockFuturesPosition -from gate_api.models.mock_margin_result import MockMarginResult -from gate_api.models.mock_options_order import MockOptionsOrder -from gate_api.models.mock_options_position import MockOptionsPosition -from gate_api.models.mock_risk_unit import MockRiskUnit -from gate_api.models.mock_spot_balance import MockSpotBalance -from gate_api.models.mock_spot_order import MockSpotOrder -from gate_api.models.multi_chain_address_item import MultiChainAddressItem -from gate_api.models.multi_collateral_currency import MultiCollateralCurrency -from gate_api.models.multi_collateral_item import MultiCollateralItem -from gate_api.models.multi_collateral_order import MultiCollateralOrder -from gate_api.models.multi_collateral_record import MultiCollateralRecord -from gate_api.models.multi_collateral_record_currency import MultiCollateralRecordCurrency -from gate_api.models.multi_loan_item import MultiLoanItem -from gate_api.models.multi_loan_repay_item import MultiLoanRepayItem -from gate_api.models.multi_repay_record import MultiRepayRecord -from gate_api.models.multi_repay_resp import MultiRepayResp -from gate_api.models.my_futures_trade import MyFuturesTrade -from gate_api.models.my_futures_trade_time_range import MyFuturesTradeTimeRange -from gate_api.models.open_orders import OpenOrders -from gate_api.models.options_account import OptionsAccount -from gate_api.models.options_account_book import OptionsAccountBook -from gate_api.models.options_candlestick import OptionsCandlestick -from gate_api.models.options_contract import OptionsContract -from gate_api.models.options_mmp import OptionsMMP -from gate_api.models.options_mmp_reset import OptionsMMPReset -from gate_api.models.options_my_settlements import OptionsMySettlements -from gate_api.models.options_my_trade import OptionsMyTrade -from gate_api.models.options_order import OptionsOrder -from gate_api.models.options_position import OptionsPosition -from gate_api.models.options_position_close import OptionsPositionClose -from gate_api.models.options_position_close_order import OptionsPositionCloseOrder -from gate_api.models.options_settlement import OptionsSettlement -from gate_api.models.options_ticker import OptionsTicker -from gate_api.models.options_underlying import OptionsUnderlying -from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker -from gate_api.models.order import Order -from gate_api.models.order_book import OrderBook -from gate_api.models.order_cancel import OrderCancel -from gate_api.models.order_patch import OrderPatch -from gate_api.models.order_resp import OrderResp -from gate_api.models.partner_commission_history import PartnerCommissionHistory -from gate_api.models.partner_sub import PartnerSub -from gate_api.models.partner_sub_list import PartnerSubList -from gate_api.models.partner_transaction_history import PartnerTransactionHistory -from gate_api.models.patch_uni_lend import PatchUniLend -from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder -from gate_api.models.position import Position -from gate_api.models.position_close import PositionClose -from gate_api.models.position_close_order import PositionCloseOrder -from gate_api.models.profit_loss_range import ProfitLossRange -from gate_api.models.rebate_user_info import RebateUserInfo -from gate_api.models.repay_currency_res import RepayCurrencyRes -from gate_api.models.repay_loan import RepayLoan -from gate_api.models.repay_multi_loan import RepayMultiLoan -from gate_api.models.repay_record import RepayRecord -from gate_api.models.repay_record_currency import RepayRecordCurrency -from gate_api.models.repay_record_left_interest import RepayRecordLeftInterest -from gate_api.models.repay_record_repaid_currency import RepayRecordRepaidCurrency -from gate_api.models.repay_record_total_interest import RepayRecordTotalInterest -from gate_api.models.repay_resp import RepayResp -from gate_api.models.risk_units import RiskUnits -from gate_api.models.saved_address import SavedAddress -from gate_api.models.small_balance import SmallBalance -from gate_api.models.small_balance_history import SmallBalanceHistory -from gate_api.models.spot_account import SpotAccount -from gate_api.models.spot_account_book import SpotAccountBook -from gate_api.models.spot_currency_chain import SpotCurrencyChain -from gate_api.models.spot_fee import SpotFee -from gate_api.models.spot_insurance_history import SpotInsuranceHistory -from gate_api.models.spot_price_put_order import SpotPricePutOrder -from gate_api.models.spot_price_trigger import SpotPriceTrigger -from gate_api.models.spot_price_triggered_order import SpotPriceTriggeredOrder -from gate_api.models.stp_group import StpGroup -from gate_api.models.stp_group_user import StpGroupUser -from gate_api.models.structured_buy import StructuredBuy -from gate_api.models.structured_get_project_list import StructuredGetProjectList -from gate_api.models.structured_order_list import StructuredOrderList -from gate_api.models.sub_account import SubAccount -from gate_api.models.sub_account_balance import SubAccountBalance -from gate_api.models.sub_account_cross_margin_balance import SubAccountCrossMarginBalance -from gate_api.models.sub_account_futures_balance import SubAccountFuturesBalance -from gate_api.models.sub_account_key import SubAccountKey -from gate_api.models.sub_account_key_perms import SubAccountKeyPerms -from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance -from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount -from gate_api.models.sub_account_transfer import SubAccountTransfer -from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount -from gate_api.models.sub_user_mode import SubUserMode -from gate_api.models.system_time import SystemTime -from gate_api.models.ticker import Ticker -from gate_api.models.total_balance import TotalBalance -from gate_api.models.trade import Trade -from gate_api.models.trade_fee import TradeFee -from gate_api.models.transaction_id import TransactionID -from gate_api.models.transfer import Transfer -from gate_api.models.transfer_order_status import TransferOrderStatus -from gate_api.models.transferables_result import TransferablesResult -from gate_api.models.trigger_order_response import TriggerOrderResponse -from gate_api.models.trigger_time import TriggerTime -from gate_api.models.uid_push_order import UidPushOrder -from gate_api.models.uid_push_withdrawal import UidPushWithdrawal -from gate_api.models.uid_push_withdrawal_resp import UidPushWithdrawalResp -from gate_api.models.uni_currency import UniCurrency -from gate_api.models.uni_currency_interest import UniCurrencyInterest -from gate_api.models.uni_currency_pair import UniCurrencyPair -from gate_api.models.uni_interest_mode import UniInterestMode -from gate_api.models.uni_interest_record import UniInterestRecord -from gate_api.models.uni_lend import UniLend -from gate_api.models.uni_lend_interest import UniLendInterest -from gate_api.models.uni_lend_record import UniLendRecord -from gate_api.models.uni_loan import UniLoan -from gate_api.models.uni_loan_interest_record import UniLoanInterestRecord -from gate_api.models.uni_loan_record import UniLoanRecord -from gate_api.models.unified_account import UnifiedAccount -from gate_api.models.unified_balance import UnifiedBalance -from gate_api.models.unified_borrowable import UnifiedBorrowable -from gate_api.models.unified_currency import UnifiedCurrency -from gate_api.models.unified_discount import UnifiedDiscount -from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers -from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate -from gate_api.models.unified_history_loan_rate_rates import UnifiedHistoryLoanRateRates -from gate_api.models.unified_leverage_config import UnifiedLeverageConfig -from gate_api.models.unified_leverage_setting import UnifiedLeverageSetting -from gate_api.models.unified_loan import UnifiedLoan -from gate_api.models.unified_loan_record import UnifiedLoanRecord -from gate_api.models.unified_loan_result import UnifiedLoanResult -from gate_api.models.unified_margin_tiers import UnifiedMarginTiers -from gate_api.models.unified_mode_set import UnifiedModeSet -from gate_api.models.unified_portfolio_input import UnifiedPortfolioInput -from gate_api.models.unified_portfolio_output import UnifiedPortfolioOutput -from gate_api.models.unified_risk_units import UnifiedRiskUnits -from gate_api.models.unified_settings import UnifiedSettings -from gate_api.models.unified_transferable import UnifiedTransferable -from gate_api.models.user_ltv_info import UserLtvInfo -from gate_api.models.user_sub import UserSub -from gate_api.models.user_sub_relation import UserSubRelation -from gate_api.models.user_total_amount import UserTotalAmount -from gate_api.models.withdraw_status import WithdrawStatus -from gate_api.models.withdrawal_record import WithdrawalRecord - diff --git a/gate_api/api/__init__.py b/gate_api/api/__init__.py deleted file mode 100644 index 6cd727a..0000000 --- a/gate_api/api/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from gate_api.api.earn_uni_api import EarnUniApi -from gate_api.api.margin_uni_api import MarginUniApi -from gate_api.api.sub_account_api import SubAccountApi -from gate_api.api.unified_api import UnifiedApi -from gate_api.api.account_api import AccountApi -from gate_api.api.collateral_loan_api import CollateralLoanApi -from gate_api.api.delivery_api import DeliveryApi -from gate_api.api.earn_api import EarnApi -from gate_api.api.flash_swap_api import FlashSwapApi -from gate_api.api.futures_api import FuturesApi -from gate_api.api.margin_api import MarginApi -from gate_api.api.multi_collateral_loan_api import MultiCollateralLoanApi -from gate_api.api.options_api import OptionsApi -from gate_api.api.rebate_api import RebateApi -from gate_api.api.spot_api import SpotApi -from gate_api.api.wallet_api import WalletApi -from gate_api.api.withdrawal_api import WithdrawalApi diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py deleted file mode 100644 index 6827757..0000000 --- a/gate_api/api/account_api.py +++ /dev/null @@ -1,1054 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class AccountApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_account_detail(self, **kwargs): # noqa: E501 - """Get account 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_account_detail(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.AccountDetail - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_account_detail_with_http_info(**kwargs) # noqa: E501 - - def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 - """Get account detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_detail_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.AccountDetail, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_account_detail" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/account/detail', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AccountDetail', # noqa: E501 - auth_settings=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_account_rate_limit(self, **kwargs): # noqa: E501 - """Get user transaction rate limit information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_rate_limit(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.AccountRateLimit] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_account_rate_limit_with_http_info(**kwargs) # noqa: E501 - - def get_account_rate_limit_with_http_info(self, **kwargs): # noqa: E501 - """Get user transaction rate limit information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_rate_limit_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.AccountRateLimit], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_account_rate_limit" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/account/rate_limit', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AccountRateLimit]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_stp_groups(self, **kwargs): # noqa: E501 - """List STP Groups # noqa: E501 - - Retrieve the list of STP groups created by the main account user only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_stp_groups(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str name: Perform a fuzzy search based on the name - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.StpGroup] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_stp_groups_with_http_info(**kwargs) # noqa: E501 - - def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501 - """List STP Groups # noqa: E501 - - Retrieve the list of STP groups created by the main account user only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_stp_groups_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str name: Perform a fuzzy search based on the name - :param _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.StpGroup], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_stp_groups" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 - query_params.append(('name', local_var_params['name'])) # 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( - '/account/stp_groups', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[StpGroup]', # noqa: E501 - auth_settings=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_stp_group(self, stp_group, **kwargs): # noqa: E501 - """Create STP Group # noqa: E501 - - Only the main account is allowed to create a new STP user group # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_stp_group(stp_group, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param StpGroup stp_group: (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.StpGroup - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_stp_group_with_http_info(stp_group, **kwargs) # noqa: E501 - - def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501 - """Create STP Group # noqa: E501 - - Only the main account is allowed to create a new STP user group # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_stp_group_with_http_info(stp_group, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param StpGroup stp_group: (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.StpGroup, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'stp_group' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_stp_group" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'stp_group' is set - if self.api_client.client_side_validation and ('stp_group' not in local_var_params or # noqa: E501 - local_var_params['stp_group'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stp_group` when calling `create_stp_group`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'stp_group' in local_var_params: - body_params = local_var_params['stp_group'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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( - '/account/stp_groups', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='StpGroup', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 - """List users of the STP group # noqa: E501 - - Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_stp_groups_users(stp_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.StpGroupUser] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_stp_groups_users_with_http_info(stp_id, **kwargs) # noqa: E501 - - def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501 - """List users of the STP group # noqa: E501 - - Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_stp_groups_users_with_http_info(stp_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.StpGroupUser], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'stp_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_stp_groups_users" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'stp_id' is set - if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501 - local_var_params['stp_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stp_id` when calling `list_stp_groups_users`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'stp_id' in local_var_params: - path_params['stp_id'] = local_var_params['stp_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( - '/account/stp_groups/{stp_id}/users', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[StpGroupUser]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501 - """Add users to the STP group # noqa: E501 - - - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_stp_group_users(stp_id, request_body, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param list[int] request_body: User ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.StpGroupUser] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.add_stp_group_users_with_http_info(stp_id, request_body, **kwargs) # noqa: E501 - - def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # noqa: E501 - """Add users to the STP group # noqa: E501 - - - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_stp_group_users_with_http_info(stp_id, request_body, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param list[int] request_body: User ID (required) - :param _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.StpGroupUser], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'stp_id', - 'request_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_stp_group_users" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'stp_id' is set - if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501 - local_var_params['stp_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stp_id` when calling `add_stp_group_users`") # noqa: E501 - # verify the required parameter 'request_body' is set - if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501 - local_var_params['request_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `request_body` when calling `add_stp_group_users`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'stp_id' in local_var_params: - path_params['stp_id'] = local_var_params['stp_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'request_body' in local_var_params: - body_params = local_var_params['request_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/account/stp_groups/{stp_id}/users', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[StpGroupUser]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 - """Delete the user in the STP group # noqa: E501 - - - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_stp_group_users(stp_id, user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param int user_id: STP user ID, multiple can be separated by commas (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.StpGroupUser] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_stp_group_users_with_http_info(stp_id, user_id, **kwargs) # noqa: E501 - - def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # noqa: E501 - """Delete the user in the STP group # noqa: E501 - - - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_stp_group_users_with_http_info(stp_id, user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param int user_id: STP user ID, multiple can be separated by commas (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.StpGroupUser], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'stp_id', - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_stp_group_users" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'stp_id' is set - if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501 - local_var_params['stp_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `stp_id` when calling `delete_stp_group_users`") # noqa: E501 - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `delete_stp_group_users`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'stp_id' in local_var_params: - path_params['stp_id'] = local_var_params['stp_id'] # noqa: E501 - - query_params = [] - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/account/stp_groups/{stp_id}/users', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[StpGroupUser]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_debit_fee(self, **kwargs): # noqa: E501 - """Query GT deduction configuration. # noqa: E501 - - Query the current GT deduction configuration for the account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_debit_fee(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.DebitFee - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_debit_fee_with_http_info(**kwargs) # noqa: E501 - - def get_debit_fee_with_http_info(self, **kwargs): # noqa: E501 - """Query GT deduction configuration. # noqa: E501 - - Query the current GT deduction configuration for the account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_debit_fee_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.DebitFee, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_debit_fee" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/account/debit_fee', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DebitFee', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def set_debit_fee(self, debit_fee, **kwargs): # noqa: E501 - """Set GT deduction. # noqa: E501 - - Enable or disable GT deduction for the current account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_debit_fee(debit_fee, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param DebitFee debit_fee: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_debit_fee_with_http_info(debit_fee, **kwargs) # noqa: E501 - - def set_debit_fee_with_http_info(self, debit_fee, **kwargs): # noqa: E501 - """Set GT deduction. # noqa: E501 - - Enable or disable GT deduction for the current account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_debit_fee_with_http_info(debit_fee, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param DebitFee debit_fee: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'debit_fee' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_debit_fee" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'debit_fee' is set - if self.api_client.client_side_validation and ('debit_fee' not in local_var_params or # noqa: E501 - local_var_params['debit_fee'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `debit_fee` when calling `set_debit_fee`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'debit_fee' in local_var_params: - body_params = local_var_params['debit_fee'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/account/debit_fee', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py deleted file mode 100644 index 861d48e..0000000 --- a/gate_api/api/collateral_loan_api.py +++ /dev/null @@ -1,1241 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class CollateralLoanApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_collateral_loan_orders(self, **kwargs): # noqa: E501 - """List 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_collateral_loan_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str collateral_currency: Collateral - :param str borrow_currency: Borrowed currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CollateralOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_collateral_loan_orders_with_http_info(**kwargs) # noqa: E501 - - def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 - """List 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_collateral_loan_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str collateral_currency: Collateral - :param str borrow_currency: Borrowed currency - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CollateralOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'page', - 'limit', - 'collateral_currency', - 'borrow_currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_collateral_loan_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 - query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 - if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 - query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CollateralOrder]', # noqa: E501 - auth_settings=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_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E501 - """Place 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_collateral_loan(create_collateral_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateCollateralOrder create_collateral_order: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OrderResp - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_collateral_loan_with_http_info(create_collateral_order, **kwargs) # noqa: E501 - - def create_collateral_loan_with_http_info(self, create_collateral_order, **kwargs): # noqa: E501 - """Place 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_collateral_loan_with_http_info(create_collateral_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateCollateralOrder create_collateral_order: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OrderResp, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'create_collateral_order' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_collateral_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'create_collateral_order' is set - if self.api_client.client_side_validation and ('create_collateral_order' not in local_var_params or # noqa: E501 - local_var_params['create_collateral_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_collateral_order` when calling `create_collateral_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_collateral_order' in local_var_params: - body_params = local_var_params['create_collateral_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OrderResp', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_collateral_loan_order_detail(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (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.CollateralOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_collateral_loan_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 - - def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_collateral_loan_order_detail_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (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.CollateralOrder, 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_collateral_loan_order_detail" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_collateral_loan_order_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'order_id' in local_var_params: - path_params['order_id'] = local_var_params['order_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CollateralOrder', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501 - """Repayment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_collateral_loan(repay_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param RepayLoan repay_loan: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.RepayResp - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.repay_collateral_loan_with_http_info(repay_loan, **kwargs) # noqa: E501 - - def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E501 - """Repayment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_collateral_loan_with_http_info(repay_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param RepayLoan repay_loan: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.RepayResp, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'repay_loan' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method repay_collateral_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'repay_loan' is set - if self.api_client.client_side_validation and ('repay_loan' not in local_var_params or # noqa: E501 - local_var_params['repay_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `repay_loan` when calling `repay_collateral_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'repay_loan' in local_var_params: - body_params = local_var_params['repay_loan'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/repay', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='RepayResp', # noqa: E501 - auth_settings=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_repay_records(self, source, **kwargs): # noqa: E501 - """Repayment history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_repay_records(source, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.RepayRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_repay_records_with_http_info(source, **kwargs) # noqa: E501 - - def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 - """Repayment history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_repay_records_with_http_info(source, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param _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.RepayRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'source', - 'borrow_currency', - 'collateral_currency', - 'page', - 'limit', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_repay_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'source' is set - if self.api_client.client_side_validation and ('source' not in local_var_params or # noqa: E501 - local_var_params['source'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `source` when calling `list_repay_records`") # noqa: E501 - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_repay_records`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'source' in local_var_params and local_var_params['source'] is not None: # noqa: E501 - query_params.append(('source', local_var_params['source'])) # noqa: E501 - if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 - query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 - if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 - query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/repay_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[RepayRecord]', # noqa: E501 - auth_settings=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_collateral_records(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collateral_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CollateralRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_collateral_records_with_http_info(**kwargs) # noqa: E501 - - def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collateral_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral - :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.CollateralRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'page', - 'limit', - '_from', - 'to', - 'borrow_currency', - 'collateral_currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_collateral_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 - query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 - if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 - query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/collaterals', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CollateralRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def operate_collateral(self, collateral_align, **kwargs): # noqa: E501 - """Increase or redeem collateral # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.operate_collateral(collateral_align, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CollateralAlign collateral_align: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.operate_collateral_with_http_info(collateral_align, **kwargs) # noqa: E501 - - def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa: E501 - """Increase or redeem collateral # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.operate_collateral_with_http_info(collateral_align, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CollateralAlign collateral_align: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collateral_align' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method operate_collateral" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'collateral_align' is set - if self.api_client.client_side_validation and ('collateral_align' not in local_var_params or # noqa: E501 - local_var_params['collateral_align'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collateral_align` when calling `operate_collateral`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'collateral_align' in local_var_params: - body_params = local_var_params['collateral_align'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/collaterals', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user_total_amount(self, **kwargs): # noqa: E501 - """Query the total borrowing and collateral amount for the user # 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_total_amount(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.UserTotalAmount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_total_amount_with_http_info(**kwargs) # noqa: E501 - - def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501 - """Query the total borrowing and collateral amount for the user # 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_total_amount_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.UserTotalAmount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_total_amount" % 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( - '/loan/collateral/total_amount', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserTotalAmount', # noqa: E501 - auth_settings=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_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 - """Query user's collateralization ratio # 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_ltv_info(collateral_currency, borrow_currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str collateral_currency: Collateral (required) - :param str borrow_currency: Borrowed currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.UserLtvInfo - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_ltv_info_with_http_info(collateral_currency, borrow_currency, **kwargs) # noqa: E501 - - def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 - """Query user's collateralization ratio # 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_ltv_info_with_http_info(collateral_currency, borrow_currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str collateral_currency: Collateral (required) - :param str borrow_currency: Borrowed currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.UserLtvInfo, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collateral_currency', - 'borrow_currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_ltv_info" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'collateral_currency' is set - if self.api_client.client_side_validation and ('collateral_currency' not in local_var_params or # noqa: E501 - local_var_params['collateral_currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collateral_currency` when calling `get_user_ltv_info`") # noqa: E501 - # verify the required parameter 'borrow_currency' is set - if self.api_client.client_side_validation and ('borrow_currency' not in local_var_params or # noqa: E501 - local_var_params['borrow_currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `borrow_currency` when calling `get_user_ltv_info`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 - query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 - if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 - query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/ltv', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserLtvInfo', # noqa: E501 - auth_settings=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_collateral_currencies(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collateral_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CollateralLoanCurrency] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_collateral_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collateral_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CollateralLoanCurrency], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'loan_currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_collateral_currencies" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'loan_currency' in local_var_params and local_var_params['loan_currency'] is not None: # noqa: E501 - query_params.append(('loan_currency', local_var_params['loan_currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/loan/collateral/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CollateralLoanCurrency]', # noqa: E501 - auth_settings=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/delivery_api.py b/gate_api/api/delivery_api.py deleted file mode 100644 index c0c689f..0000000 --- a/gate_api/api/delivery_api.py +++ /dev/null @@ -1,3765 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class DeliveryApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_contracts(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.DeliveryContract] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_contracts_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_contracts_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.DeliveryContract], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_contracts" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_contracts`") # 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/contracts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[DeliveryContract]', # noqa: E501 - auth_settings=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_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_delivery_contract(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.DeliveryContract - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_delivery_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_delivery_contract_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.DeliveryContract, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_delivery_contract" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_contract`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_delivery_contract`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/contracts/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DeliveryContract', # noqa: E501 - auth_settings=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_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 - - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_order_book(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrderBook - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 - - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_order_book_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update - :param _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.FuturesOrderBook, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'interval', - 'limit', - 'with_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_order_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_order_book`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_order_book`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value less than or equal to `50`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 - query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/order_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrderBook', # noqa: E501 - auth_settings=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_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_trades(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range - :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesTrade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_trades_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range - :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time - :param _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.FuturesTrade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'last_id', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_trades" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_trades`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_trades`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 - query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesTrade]', # noqa: E501 - auth_settings=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_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 - - Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_candlesticks(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 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.DeliveryCandlestick] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 - - Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_candlesticks_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 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.DeliveryCandlestick], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - '_from', - 'to', - 'limit', - 'interval' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_candlesticks" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_candlesticks`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_candlesticks`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_candlesticks`, must be a value less than or equal to `2000`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/candlesticks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[DeliveryCandlestick]', # noqa: E501 - auth_settings=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_delivery_tickers(self, settle, **kwargs): # noqa: E501 - """List futures tickers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_tickers(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesTicker] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_tickers_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List futures tickers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_tickers_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param _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.FuturesTicker], 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 list_delivery_tickers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_tickers`") # noqa: E501 - - collection_formats = {} - - 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 = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/tickers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesTicker]', # noqa: E501 - auth_settings=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_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_insurance_ledger(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 to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.InsuranceRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_insurance_ledger_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 to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.InsuranceRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_insurance_ledger" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_insurance_ledger`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - 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 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/insurance', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[InsuranceRecord]', # noqa: E501 - auth_settings=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_delivery_accounts(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_accounts(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.FuturesAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_accounts_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_accounts_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_accounts" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_accounts`") # 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 - # 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( - '/delivery/{settle}/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesAccount', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_account_book(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 to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_account_book_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_account_book_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 to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - :param _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.FuturesAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'limit', - '_from', - 'to', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_account_book`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - 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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesAccountBook]', # noqa: E501 - auth_settings=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_delivery_positions(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_positions(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Position] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_positions_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_positions_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_positions" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_positions`") # 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 - # 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( - '/delivery/{settle}/positions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Position]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_delivery_position(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_delivery_position_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_delivery_position_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_delivery_position" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_position`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_delivery_position`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/positions/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_delivery_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position 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.update_delivery_position_margin(settle, contract, change, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_delivery_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 - - def update_delivery_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position 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.update_delivery_position_margin_with_http_info(settle, contract, change, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'change' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_delivery_position_margin" % k - ) - 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 `update_delivery_position_margin`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_margin`") # noqa: E501 - # verify the required parameter 'change' is set - if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501 - local_var_params['change'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `change` when calling `update_delivery_position_margin`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'change' in local_var_params and local_var_params['change'] is not None: # noqa: E501 - query_params.append(('change', local_var_params['change'])) # 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( - '/delivery/{settle}/positions/{contract}/margin', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_delivery_position_leverage(settle, contract, leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (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.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_delivery_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 - - def update_delivery_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_delivery_position_leverage_with_http_info(settle, contract, leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'leverage' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_delivery_position_leverage" % k - ) - 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 `update_delivery_position_leverage`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_leverage`") # noqa: E501 - # verify the required parameter 'leverage' is set - if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501 - local_var_params['leverage'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `leverage` when calling `update_delivery_position_leverage`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501 - query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501 - - 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( - '/delivery/{settle}/positions/{contract}/leverage', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_delivery_position_risk_limit(settle, contract, risk_limit, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New position risk limit (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.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_delivery_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 - - def update_delivery_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_delivery_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New position risk limit (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.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'risk_limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_delivery_position_risk_limit" % k - ) - 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 `update_delivery_position_risk_limit`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_risk_limit`") # noqa: E501 - # verify the required parameter 'risk_limit' is set - if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501 - local_var_params['risk_limit'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_delivery_position_risk_limit`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501 - query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501 - - header_params = {} - - 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( - '/delivery/{settle}/positions/{contract}/risk_limit', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_orders(settle, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param int count_total: Whether to return total number matched. Default to 0(no return) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 - - def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_orders_with_http_info(settle, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param int count_total: Whether to return total number matched. Default to 0(no return) - :param _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.FuturesOrder], 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', - 'last_id', - 'count_total' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_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_delivery_orders`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_delivery_orders`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '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 '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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 - query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 - if 'count_total' in local_var_params and local_var_params['count_total'] is not None: # noqa: E501 - query_params.append(('count_total', local_var_params['count_total'])) # 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( - '/delivery/{settle}/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesOrder]', # noqa: E501 - auth_settings=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_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_delivery_order(settle, futures_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param FuturesOrder futures_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.FuturesOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_delivery_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 - - def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_delivery_order_with_http_info(settle, futures_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param FuturesOrder futures_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.FuturesOrder, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'futures_order' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_delivery_order" % k - ) - 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_delivery_order`") # noqa: E501 - # verify the required parameter 'futures_order' is set - if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501 - local_var_params['futures_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `futures_order` when calling `create_delivery_order`") # noqa: E501 - - collection_formats = {} - - 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_order' in local_var_params: - body_params = local_var_params['futures_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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( - '/delivery/{settle}/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrder', # noqa: E501 - auth_settings=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_delivery_orders(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_delivery_orders(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str side: All bids or asks. Both included if not specified - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_delivery_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_delivery_orders_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str side: All bids or asks. Both included if not specified - :param _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.FuturesOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'side' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_delivery_orders" % k - ) - 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_delivery_orders`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `cancel_delivery_orders`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '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( - '/delivery/{settle}/orders', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesOrder]', # noqa: E501 - auth_settings=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_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_delivery_order(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 - - def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_delivery_order_with_http_info(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _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.FuturesOrder, 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_delivery_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_delivery_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/delivery/{settle}/orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrder', # noqa: E501 - auth_settings=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_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single 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_delivery_order(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 - - def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_delivery_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 str order_id: Retrieve the data of the order with the specified 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.FuturesOrder, 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 cancel_delivery_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `cancel_delivery_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_delivery_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/delivery/{settle}/orders/{order_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrder', # noqa: E501 - auth_settings=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_my_delivery_trades(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_my_delivery_trades(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param int count_total: Whether to return total number matched. Default to 0(no return) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MyFuturesTrade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_my_delivery_trades_with_http_info(settle, **kwargs) # noqa: E501 - - def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_my_delivery_trades_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param int count_total: Whether to return total number matched. Default to 0(no return) - :param _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.MyFuturesTrade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'order', - 'limit', - 'offset', - 'last_id', - 'count_total' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_my_delivery_trades" % k - ) - 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_my_delivery_trades`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_delivery_trades`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'order' in local_var_params and local_var_params['order'] is not None: # noqa: E501 - query_params.append(('order', local_var_params['order'])) # 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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 - query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 - if 'count_total' in local_var_params and local_var_params['count_total'] is not None: # noqa: E501 - query_params.append(('count_total', local_var_params['count_total'])) # 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( - '/delivery/{settle}/my_trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MyFuturesTrade]', # noqa: E501 - auth_settings=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_delivery_position_close(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_position_close(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.PositionClose] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_position_close_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_position_close_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.PositionClose], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_position_close" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_position_close`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - 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( - '/delivery/{settle}/position_close', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[PositionClose]', # noqa: E501 - auth_settings=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_delivery_liquidates(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_liquidates(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesLiquidate] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_liquidates_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_liquidates_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesLiquidate], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'at' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_liquidates" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_liquidates`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 - query_params.append(('at', local_var_params['at'])) # noqa: E501 - - 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( - '/delivery/{settle}/liquidates', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesLiquidate]', # noqa: E501 - auth_settings=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_delivery_settlements(self, settle, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_settlements(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a settlement timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.DeliverySettlement] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_settlements_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_settlements_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a settlement timestamp - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.DeliverySettlement], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'at' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_settlements" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_settlements`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 - query_params.append(('at', local_var_params['at'])) # noqa: E501 - - 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( - '/delivery/{settle}/settlements', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[DeliverySettlement]', # noqa: E501 - auth_settings=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_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 - - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_risk_limit_tiers(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FuturesLimitRiskTiers] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_delivery_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 - - def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 - - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_delivery_risk_limit_tiers_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.FuturesLimitRiskTiers], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_delivery_risk_limit_tiers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_risk_limit_tiers`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_risk_limit_tiers`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_risk_limit_tiers`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_delivery_risk_limit_tiers`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/delivery/{settle}/risk_limit_tiers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesLimitRiskTiers]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered 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_price_triggered_delivery_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: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int 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_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 - - def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered 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_price_triggered_delivery_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: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int 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_delivery_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_price_triggered_delivery_orders`") # noqa: E501 - # verify the required parameter 'status' is set - if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 - local_var_params['status'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `status` when calling `list_price_triggered_delivery_orders`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - 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( - '/delivery/{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_delivery_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a 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_delivery_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_delivery_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501 - - def create_price_triggered_delivery_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 - - 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_delivery_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_delivery_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `create_price_triggered_delivery_order`") # noqa: E501 - # verify the required parameter 'futures_price_triggered_order' is set - if self.api_client.client_side_validation and ('futures_price_triggered_order' not in local_var_params or # noqa: E501 - local_var_params['futures_price_triggered_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `futures_price_triggered_order` when calling `create_price_triggered_delivery_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/delivery/{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_delivery_order_list(self, settle, contract, **kwargs): # noqa: E501 - """Cancel All Price-triggered 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_delivery_order_list(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FuturesPriceTriggeredOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_price_triggered_delivery_order_list_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel All Price-triggered 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_delivery_order_list_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.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_delivery_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_delivery_order_list`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `cancel_price_triggered_delivery_order_list`") # noqa: E501 - - collection_formats = {} - - 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( - '/delivery/{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_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a 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.get_price_triggered_delivery_order(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 - - def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 - - 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_delivery_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 str order_id: Retrieve the data of the order with the specified 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.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_delivery_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_price_triggered_delivery_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_price_triggered_delivery_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/delivery/{settle}/price_orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='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 cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a 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.cancel_price_triggered_delivery_order(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.cancel_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 - - def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 - - 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_delivery_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 str order_id: Retrieve the data of the order with the specified 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.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 cancel_price_triggered_delivery_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_delivery_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_price_triggered_delivery_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/delivery/{settle}/price_orders/{order_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='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) diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py deleted file mode 100644 index debcadf..0000000 --- a/gate_api/api/earn_api.py +++ /dev/null @@ -1,977 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class EarnApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 - """ETH2 swap # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.swap_eth2(eth2_swap, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param Eth2Swap eth2_swap: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.swap_eth2_with_http_info(eth2_swap, **kwargs) # noqa: E501 - - def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 - """ETH2 swap # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.swap_eth2_with_http_info(eth2_swap, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param Eth2Swap eth2_swap: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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 = [ - 'eth2_swap' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method swap_eth2" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'eth2_swap' is set - if self.api_client.client_side_validation and ('eth2_swap' not in local_var_params or # noqa: E501 - local_var_params['eth2_swap'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `eth2_swap` when calling `swap_eth2`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'eth2_swap' in local_var_params: - body_params = local_var_params['eth2_swap'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/staking/eth2/swap', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def rate_list_eth2(self, **kwargs): # noqa: E501 - """ETH2 historical rate of return query # noqa: E501 - - Check the ETH earnings rate record for the last 31 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rate_list_eth2(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Eth2RateList] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.rate_list_eth2_with_http_info(**kwargs) # noqa: E501 - - def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 - """ETH2 historical rate of return query # noqa: E501 - - Check the ETH earnings rate record for the last 31 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rate_list_eth2_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Eth2RateList], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method rate_list_eth2" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/staking/eth2/rate_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Eth2RateList]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_dual_investment_plans(self, **kwargs): # noqa: E501 - """Dual Investment product list # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_dual_investment_plans(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int plan_id: Financial project id - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.DualGetPlans] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_dual_investment_plans_with_http_info(**kwargs) # noqa: E501 - - def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment product list # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_dual_investment_plans_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int plan_id: Financial project id - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.DualGetPlans], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'plan_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_dual_investment_plans" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'plan_id' in local_var_params and local_var_params['plan_id'] is not None: # noqa: E501 - query_params.append(('plan_id', local_var_params['plan_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/earn/dual/investment_plan', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[DualGetPlans]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_dual_orders(self, **kwargs): # noqa: E501 - """Dual Investment order list # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_dual_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int _from: Start checkout time - :param int to: End settlement time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.DualGetOrders] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_dual_orders_with_http_info(**kwargs) # noqa: E501 - - def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment order list # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_dual_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int _from: Start checkout time - :param int to: End settlement time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.DualGetOrders], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_from', - 'to', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_dual_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_dual_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_dual_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_dual_orders`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/dual/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[DualGetOrders]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def place_dual_order(self, place_dual_investment_order, **kwargs): # noqa: E501 - """Place Dual Investment order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_dual_order(place_dual_investment_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param PlaceDualInvestmentOrder place_dual_investment_order: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.place_dual_order_with_http_info(place_dual_investment_order, **kwargs) # noqa: E501 - - def place_dual_order_with_http_info(self, place_dual_investment_order, **kwargs): # noqa: E501 - """Place Dual Investment order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_dual_order_with_http_info(place_dual_investment_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param PlaceDualInvestmentOrder place_dual_investment_order: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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 = [ - 'place_dual_investment_order' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method place_dual_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'place_dual_investment_order' is set - if self.api_client.client_side_validation and ('place_dual_investment_order' not in local_var_params or # noqa: E501 - local_var_params['place_dual_investment_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `place_dual_investment_order` when calling `place_dual_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'place_dual_investment_order' in local_var_params: - body_params = local_var_params['place_dual_investment_order'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/dual/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_structured_products(self, status, **kwargs): # noqa: E501 - """Structured Product List # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_structured_products(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish (required) - :param str type: Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.StructuredGetProjectList] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_structured_products_with_http_info(status, **kwargs) # noqa: E501 - - def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E501 - """Structured Product List # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_structured_products_with_http_info(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish (required) - :param str type: Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.StructuredGetProjectList], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status', - 'type', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_structured_products" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'status' is set - if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 - local_var_params['status'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `status` when calling `list_structured_products`") # noqa: E501 - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_structured_products`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_products`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_products`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 - query_params.append(('status', local_var_params['status'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/earn/structured/products', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[StructuredGetProjectList]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_structured_orders(self, **kwargs): # noqa: E501 - """Structured Product Order List # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_structured_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int _from: Start timestamp - :param int to: End timestamp - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.StructuredOrderList] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_structured_orders_with_http_info(**kwargs) # noqa: E501 - - def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 - """Structured Product Order List # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_structured_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int _from: Start timestamp - :param int to: End timestamp - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.StructuredOrderList], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_from', - 'to', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_structured_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_structured_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_orders`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/structured/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[StructuredOrderList]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_structured_order(structured_buy, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param StructuredBuy structured_buy: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.place_structured_order_with_http_info(structured_buy, **kwargs) # noqa: E501 - - def place_structured_order_with_http_info(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_structured_order_with_http_info(structured_buy, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param StructuredBuy structured_buy: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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 = [ - 'structured_buy' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method place_structured_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'structured_buy' is set - if self.api_client.client_side_validation and ('structured_buy' not in local_var_params or # noqa: E501 - local_var_params['structured_buy'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `structured_buy` when calling `place_structured_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'structured_buy' in local_var_params: - body_params = local_var_params['structured_buy'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/structured/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py deleted file mode 100644 index 9a18d82..0000000 --- a/gate_api/api/earn_uni_api.py +++ /dev/null @@ -1,1213 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class EarnUniApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_uni_currencies(self, **kwargs): # noqa: E501 - """List currencies for lending # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniCurrency] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_uni_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List currencies for lending # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniCurrency], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_uni_currencies" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniCurrency]', # noqa: E501 - auth_settings=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_uni_currency(self, currency, **kwargs): # noqa: E501 - """Get currency detail for lending # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UniCurrency - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_uni_currency_with_http_info(currency, **kwargs) # noqa: E501 - - def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get currency detail for lending # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UniCurrency, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_uni_currency" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_currency`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency' in local_var_params: - path_params['currency'] = local_var_params['currency'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/currencies/{currency}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UniCurrency', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_user_uni_lends(self, **kwargs): # noqa: E501 - """List user's lending 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_user_uni_lends(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniLend] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_user_uni_lends_with_http_info(**kwargs) # noqa: E501 - - def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 - """List user's lending orders # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_user_uni_lends_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLend], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_user_uni_lends" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/lends', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLend]', # noqa: E501 - auth_settings=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_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 - """Lend or redeem # noqa: E501 - - `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_lend(create_uni_lend, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateUniLend create_uni_lend: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_uni_lend_with_http_info(create_uni_lend, **kwargs) # noqa: E501 - - def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E501 - """Lend or redeem # noqa: E501 - - `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_lend_with_http_info(create_uni_lend, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateUniLend create_uni_lend: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'create_uni_lend' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_uni_lend" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'create_uni_lend' is set - if self.api_client.client_side_validation and ('create_uni_lend' not in local_var_params or # noqa: E501 - local_var_params['create_uni_lend'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_uni_lend` when calling `create_uni_lend`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_uni_lend' in local_var_params: - body_params = local_var_params['create_uni_lend'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/lends', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501 - """Amend lending order # noqa: E501 - - Currently only supports amending the minimum interest rate (hour) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_uni_lend(patch_uni_lend, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param PatchUniLend patch_uni_lend: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.change_uni_lend_with_http_info(patch_uni_lend, **kwargs) # noqa: E501 - - def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E501 - """Amend lending order # noqa: E501 - - Currently only supports amending the minimum interest rate (hour) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_uni_lend_with_http_info(patch_uni_lend, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param PatchUniLend patch_uni_lend: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'patch_uni_lend' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method change_uni_lend" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'patch_uni_lend' is set - if self.api_client.client_side_validation and ('patch_uni_lend' not in local_var_params or # noqa: E501 - local_var_params['patch_uni_lend'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `patch_uni_lend` when calling `change_uni_lend`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'patch_uni_lend' in local_var_params: - body_params = local_var_params['patch_uni_lend'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/lends', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_uni_lend_records(self, **kwargs): # noqa: E501 - """List records of lending # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_lend_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: type: lend - lend, redeem - redeem - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.UniLendRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_uni_lend_records_with_http_info(**kwargs) # noqa: E501 - - def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 - """List records of lending # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_lend_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: type: lend - lend, redeem - redeem - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.UniLendRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit', - '_from', - 'to', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_uni_lend_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/lend_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLendRecord]', # noqa: E501 - auth_settings=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_uni_interest(self, currency, **kwargs): # noqa: E501 - """Get the user's total interest income of specified currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_interest(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UniLendInterest - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_uni_interest_with_http_info(currency, **kwargs) # noqa: E501 - - def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the user's total interest income of specified currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_interest_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UniLendInterest, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_uni_interest" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_interest`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency' in local_var_params: - path_params['currency'] = local_var_params['currency'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/interests/{currency}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UniLendInterest', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_uni_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_interest_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.UniInterestRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_uni_interest_records_with_http_info(**kwargs) # noqa: E501 - - def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_interest_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp - :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.UniInterestRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_uni_interest_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/interest_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniInterestRecord]', # noqa: E501 - auth_settings=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 switch_interest_reinvest(self, uni_interest_mode, **kwargs): # noqa: E501 - """Set interest reinvestment toggle # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.switch_interest_reinvest(uni_interest_mode, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UniInterestMode uni_interest_mode: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.switch_interest_reinvest_with_http_info(uni_interest_mode, **kwargs) # noqa: E501 - - def switch_interest_reinvest_with_http_info(self, uni_interest_mode, **kwargs): # noqa: E501 - """Set interest reinvestment toggle # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.switch_interest_reinvest_with_http_info(uni_interest_mode, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UniInterestMode uni_interest_mode: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'uni_interest_mode' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method switch_interest_reinvest" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'uni_interest_mode' is set - if self.api_client.client_side_validation and ('uni_interest_mode' not in local_var_params or # noqa: E501 - local_var_params['uni_interest_mode'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `uni_interest_mode` when calling `switch_interest_reinvest`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'uni_interest_mode' in local_var_params: - body_params = local_var_params['uni_interest_mode'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/interest_reinvest', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 - """query currency interest compounding status # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_interest_status(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UniCurrencyInterest - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_uni_interest_status_with_http_info(currency, **kwargs) # noqa: E501 - - def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E501 - """query currency interest compounding status # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_interest_status_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UniCurrencyInterest, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_uni_interest_status" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_interest_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency' in local_var_params: - path_params['currency'] = local_var_params['currency'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/interest_status/{currency}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UniCurrencyInterest', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py deleted file mode 100644 index a01a23c..0000000 --- a/gate_api/api/flash_swap_api.py +++ /dev/null @@ -1,648 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class FlashSwapApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 - """List All Supported Currency Pairs In Flash Swap # noqa: E501 - - `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_flash_swap_currency_pair(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FlashSwapCurrencyPair] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_flash_swap_currency_pair_with_http_info(**kwargs) # noqa: E501 - - def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 - """List All Supported Currency Pairs In Flash Swap # noqa: E501 - - `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_flash_swap_currency_pair_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000 - :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.FlashSwapCurrencyPair], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_flash_swap_currency_pair" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_flash_swap_currency_pair`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_currency_pair`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_currency_pair`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/flash_swap/currency_pairs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FlashSwapCurrencyPair]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_flash_swap_orders(self, **kwargs): # noqa: E501 - """List all flash swap 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_flash_swap_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int status: Flash swap order status `1` - success `2` - failure - :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FlashSwapOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_flash_swap_orders_with_http_info(**kwargs) # noqa: E501 - - def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 - """List all flash swap orders # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_flash_swap_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int status: Flash swap order status `1` - success `2` - failure - :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.FlashSwapOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status', - 'sell_currency', - 'buy_currency', - 'reverse', - 'limit', - 'page' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_flash_swap_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'sell_currency' in local_var_params and local_var_params['sell_currency'] is not None: # noqa: E501 - query_params.append(('sell_currency', local_var_params['sell_currency'])) # noqa: E501 - if 'buy_currency' in local_var_params and local_var_params['buy_currency'] is not None: # noqa: E501 - query_params.append(('buy_currency', local_var_params['buy_currency'])) # noqa: E501 - if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 - query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/flash_swap/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FlashSwapOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_flash_swap_order(self, flash_swap_order_request, **kwargs): # noqa: E501 - """Create a flash swap order # noqa: E501 - - Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_flash_swap_order(flash_swap_order_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param FlashSwapOrderRequest flash_swap_order_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.FlashSwapOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_flash_swap_order_with_http_info(flash_swap_order_request, **kwargs) # noqa: E501 - - def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwargs): # noqa: E501 - """Create a flash swap order # noqa: E501 - - Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_flash_swap_order_with_http_info(flash_swap_order_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param FlashSwapOrderRequest flash_swap_order_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.FlashSwapOrder, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'flash_swap_order_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_flash_swap_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'flash_swap_order_request' is set - if self.api_client.client_side_validation and ('flash_swap_order_request' not in local_var_params or # noqa: E501 - local_var_params['flash_swap_order_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `flash_swap_order_request` when calling `create_flash_swap_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'flash_swap_order_request' in local_var_params: - body_params = local_var_params['flash_swap_order_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/flash_swap/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FlashSwapOrder', # noqa: E501 - auth_settings=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_flash_swap_order(self, order_id, **kwargs): # noqa: E501 - """Get a single flash swap order's 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_flash_swap_order(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Flash swap order ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.FlashSwapOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_flash_swap_order_with_http_info(order_id, **kwargs) # noqa: E501 - - def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single flash swap order's detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_flash_swap_order_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Flash swap order ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.FlashSwapOrder, 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_flash_swap_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_flash_swap_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/flash_swap/orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FlashSwapOrder', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noqa: E501 - """Initiate a flash swap order preview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.preview_flash_swap_order(flash_swap_preview_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param FlashSwapPreviewRequest flash_swap_preview_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.FlashSwapOrderPreview - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.preview_flash_swap_order_with_http_info(flash_swap_preview_request, **kwargs) # noqa: E501 - - def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **kwargs): # noqa: E501 - """Initiate a flash swap order preview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.preview_flash_swap_order_with_http_info(flash_swap_preview_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param FlashSwapPreviewRequest flash_swap_preview_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.FlashSwapOrderPreview, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'flash_swap_preview_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method preview_flash_swap_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'flash_swap_preview_request' is set - if self.api_client.client_side_validation and ('flash_swap_preview_request' not in local_var_params or # noqa: E501 - local_var_params['flash_swap_preview_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `flash_swap_preview_request` when calling `preview_flash_swap_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'flash_swap_preview_request' in local_var_params: - body_params = local_var_params['flash_swap_preview_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/flash_swap/orders/preview', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FlashSwapOrderPreview', # noqa: E501 - auth_settings=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 deleted file mode 100644 index be60203..0000000 --- a/gate_api/api/futures_api.py +++ /dev/null @@ -1,6260 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class FuturesApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_futures_contracts(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_contracts(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 to be 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_with_http_info(settle, **kwargs) # noqa: E501 - - def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 - - 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_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 to be 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" % 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`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_contracts`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_contracts`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_contracts`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - 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', '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 - """Get a single contract # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_futures_contract(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.Contract - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_futures_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_futures_contract_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(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', - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_futures_contract" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_contract`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_futures_contract`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/contracts/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='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 list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 - - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_order_book(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrderBook - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 - - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_order_book_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update - :param _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.FuturesOrderBook, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'interval', - 'limit', - 'with_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_order_book" % k - ) - 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_order_book`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_order_book`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value less than or equal to `50`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 - query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/order_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrderBook', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_trades(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range - :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesTrade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_trades_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range - :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time - :param _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.FuturesTrade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'offset', - 'last_id', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_trades" % k - ) - 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_trades`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_trades`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_trades`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 - query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesTrade]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 - - Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_candlesticks(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesCandlestick] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 - - Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_candlesticks_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesCandlestick], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - '_from', - 'to', - 'limit', - 'interval' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_candlesticks" % k - ) - 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_candlesticks`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_candlesticks`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_candlesticks`, must be a value less than or equal to `2000`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - - 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}/candlesticks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesCandlestick]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 - """Premium Index K-Line # noqa: E501 - - Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_premium_index(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesPremiumIndex] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_premium_index_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Premium Index K-Line # noqa: E501 - - Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_premium_index_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesPremiumIndex], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - '_from', - 'to', - 'limit', - 'interval' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_premium_index" % k - ) - 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_premium_index`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_premium_index`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_premium_index`, must be a value less than or equal to `2000`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - - 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}/premium_index', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesPremiumIndex]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_tickers(self, settle, **kwargs): # noqa: E501 - """List futures tickers # 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_tickers(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.FuturesTicker] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_tickers_with_http_info(settle, **kwargs) # noqa: E501 - - def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List futures tickers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_tickers_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.FuturesTicker], 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 list_futures_tickers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_tickers`") # noqa: E501 - - collection_formats = {} - - 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 = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/tickers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesTicker]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa: E501 - """Funding rate history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_funding_rate_history(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FundingRateRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_funding_rate_history_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_futures_funding_rate_history_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Funding rate history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_funding_rate_history_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :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.FundingRateRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_funding_rate_history" % k - ) - 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_funding_rate_history`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_funding_rate_history`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/funding_rate', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FundingRateRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_insurance_ledger(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 to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.InsuranceRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 - - def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_insurance_ledger_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 to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.InsuranceRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_insurance_ledger" % k - ) - 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_insurance_ledger`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - 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 - - 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}/insurance', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[InsuranceRecord]', # noqa: E501 - auth_settings=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_contract_stats(self, settle, contract, **kwargs): # noqa: E501 - """Futures stats # 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_contract_stats(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start timestamp - :param str interval: - :param int limit: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.ContractStat] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_contract_stats_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures stats # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_contract_stats_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start timestamp - :param str interval: - :param int limit: - :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.ContractStat], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - '_from', - 'interval', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_contract_stats" % k - ) - 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_contract_stats`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_contract_stats`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/contract_stats', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ContractStat]', # noqa: E501 - auth_settings=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_index_constituents(self, settle, index, **kwargs): # noqa: E501 - """Get index constituents # 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_index_constituents(settle, index, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str index: Index name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.FuturesIndexConstituents - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_index_constituents_with_http_info(settle, index, **kwargs) # noqa: E501 - - def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noqa: E501 - """Get index constituents # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_index_constituents_with_http_info(settle, index, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str index: Index name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.FuturesIndexConstituents, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'index' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_index_constituents" % k - ) - 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_index_constituents`") # noqa: E501 - # verify the required parameter 'index' is set - if self.api_client.client_side_validation and ('index' not in local_var_params or # noqa: E501 - local_var_params['index'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `index` when calling `get_index_constituents`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'index' in local_var_params: - path_params['index'] = local_var_params['index'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/index_constituents/{index}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesIndexConstituents', # noqa: E501 - auth_settings=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_liquidated_orders(self, settle, **kwargs): # noqa: E501 - """Retrieve liquidation history # noqa: E501 - - Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_liquidated_orders(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp - :param int limit: Maximum number of records to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FuturesLiqOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_liquidated_orders_with_http_info(settle, **kwargs) # noqa: E501 - - def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 - """Retrieve liquidation history # noqa: E501 - - Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_liquidated_orders_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp - :param int limit: Maximum number of records to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.FuturesLiqOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - '_from', - 'to', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_liquidated_orders" % k - ) - 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_liquidated_orders`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - 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}/liq_orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesLiqOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 - - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_risk_limit_tiers(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FuturesLimitRiskTiers] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 - - def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 - - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_risk_limit_tiers_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.FuturesLimitRiskTiers], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_risk_limit_tiers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_risk_limit_tiers`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_risk_limit_tiers`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_risk_limit_tiers`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_risk_limit_tiers`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/risk_limit_tiers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesLimitRiskTiers]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_accounts(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_accounts(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.FuturesAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_accounts_with_http_info(settle, **kwargs) # noqa: E501 - - def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_accounts_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_accounts" % k - ) - 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_accounts`") # 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 - # 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}/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesAccount', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_account_book(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 - - If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_account_book(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_account_book_with_http_info(settle, **kwargs) # noqa: E501 - - def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 - - If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_account_book_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction - :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.FuturesAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'offset', - '_from', - 'to', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_account_book" % k - ) - 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_account_book`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_account_book`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesAccountBook]', # noqa: E501 - auth_settings=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_positions(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # 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_positions(settle, async_req=True) - >>> result = thread.get() - - :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 to be 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.Position] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_positions_with_http_info(settle, **kwargs) # noqa: E501 - - def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_positions_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :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 to be 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.Position], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'holding', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_positions" % k - ) - 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_positions`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_positions`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'holding' in local_var_params and local_var_params['holding'] is not None: # noqa: E501 - query_params.append(('holding', local_var_params['holding'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - 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}/positions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Position]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_position(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # 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_position(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_position_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_position_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_position" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_position`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_position`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/positions/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position 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.update_position_margin(settle, contract, change, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 - - def update_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position 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.update_position_margin_with_http_info(settle, contract, change, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'change' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_position_margin" % k - ) - 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 `update_position_margin`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_position_margin`") # noqa: E501 - # verify the required parameter 'change' is set - if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501 - local_var_params['change'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `change` when calling `update_position_margin`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'change' in local_var_params and local_var_params['change'] is not None: # noqa: E501 - query_params.append(('change', local_var_params['change'])) # 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}/positions/{contract}/margin', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_position_leverage(settle, contract, leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 - - def update_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_position_leverage_with_http_info(settle, contract, leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'leverage', - 'cross_leverage_limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_position_leverage" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `update_position_leverage`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_position_leverage`") # noqa: E501 - # verify the required parameter 'leverage' is set - if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501 - local_var_params['leverage'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `leverage` when calling `update_position_leverage`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501 - query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501 - if 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None: # noqa: E501 - query_params.append(('cross_leverage_limit', local_var_params['cross_leverage_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( - '/futures/{settle}/positions/{contract}/leverage', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_position_risk_limit(settle, contract, risk_limit, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Position - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 - - def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Position, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'risk_limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_position_risk_limit" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `update_position_risk_limit`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_position_risk_limit`") # noqa: E501 - # verify the required parameter 'risk_limit' is set - if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501 - local_var_params['risk_limit'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_position_risk_limit`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501 - query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501 - - header_params = {} - - 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}/positions/{contract}/risk_limit', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Position', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 - """Enable or disable dual mode # noqa: E501 - - Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_dual_mode(settle, dual_mode, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param bool dual_mode: Whether to enable dual mode (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.FuturesAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_dual_mode_with_http_info(settle, dual_mode, **kwargs) # noqa: E501 - - def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E501 - """Enable or disable dual mode # noqa: E501 - - Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_dual_mode_with_http_info(settle, dual_mode, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param bool dual_mode: Whether to enable dual mode (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'dual_mode' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_dual_mode" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `set_dual_mode`") # noqa: E501 - # verify the required parameter 'dual_mode' is set - if self.api_client.client_side_validation and ('dual_mode' not in local_var_params or # noqa: E501 - local_var_params['dual_mode'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `dual_mode` when calling `set_dual_mode`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'dual_mode' in local_var_params and local_var_params['dual_mode'] is not None: # noqa: E501 - query_params.append(('dual_mode', local_var_params['dual_mode'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/dual_mode', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesAccount', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 - """Retrieve position detail in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dual_mode_position(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Position] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_dual_mode_position_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Retrieve position detail in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dual_mode_position_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_dual_mode_position" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_dual_mode_position`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_dual_mode_position`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/dual_comp/positions/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Position]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_dual_mode_position_margin(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 - """Update position margin in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_dual_mode_position_margin(settle, contract, change, dual_side, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) - :param str dual_side: Long or short position (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Position] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_dual_mode_position_margin_with_http_info(settle, contract, change, dual_side, **kwargs) # noqa: E501 - - def update_dual_mode_position_margin_with_http_info(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 - """Update position margin in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_dual_mode_position_margin_with_http_info(settle, contract, change, dual_side, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) - :param str dual_side: Long or short position (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'change', - 'dual_side' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_dual_mode_position_margin" % k - ) - 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 `update_dual_mode_position_margin`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_margin`") # noqa: E501 - # verify the required parameter 'change' is set - if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501 - local_var_params['change'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `change` when calling `update_dual_mode_position_margin`") # noqa: E501 - # verify the required parameter 'dual_side' is set - if self.api_client.client_side_validation and ('dual_side' not in local_var_params or # noqa: E501 - local_var_params['dual_side'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `dual_side` when calling `update_dual_mode_position_margin`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'change' in local_var_params and local_var_params['change'] is not None: # noqa: E501 - query_params.append(('change', local_var_params['change'])) # noqa: E501 - if 'dual_side' in local_var_params and local_var_params['dual_side'] is not None: # noqa: E501 - query_params.append(('dual_side', local_var_params['dual_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}/dual_comp/positions/{contract}/margin', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Position]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_dual_mode_position_leverage(settle, contract, leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Position] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_dual_mode_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 - - def update_dual_mode_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_dual_mode_position_leverage_with_http_info(settle, contract, leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'leverage', - 'cross_leverage_limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_dual_mode_position_leverage" % k - ) - 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 `update_dual_mode_position_leverage`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_leverage`") # noqa: E501 - # verify the required parameter 'leverage' is set - if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501 - local_var_params['leverage'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `leverage` when calling `update_dual_mode_position_leverage`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501 - query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501 - if 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None: # noqa: E501 - query_params.append(('cross_leverage_limit', local_var_params['cross_leverage_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( - '/futures/{settle}/dual_comp/positions/{contract}/leverage', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Position]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_dual_mode_position_risk_limit(settle, contract, risk_limit, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Position] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_dual_mode_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 - - def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit in dual mode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_dual_mode_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'risk_limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_dual_mode_position_risk_limit" % k - ) - 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 `update_dual_mode_position_risk_limit`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_risk_limit`") # noqa: E501 - # verify the required parameter 'risk_limit' is set - if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501 - local_var_params['risk_limit'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_dual_mode_position_risk_limit`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501 - query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/dual_comp/positions/{contract}/risk_limit', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Position]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 - - - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_orders(settle, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_futures_orders_with_http_info(settle, status, **kwargs) # noqa: E501 - - def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 - - - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_futures_orders_with_http_info(settle, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param _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.FuturesOrder], 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', - 'last_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_futures_orders" % k - ) - 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_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_futures_orders`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_orders`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '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 '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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 - query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 - - 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}/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesOrder]', # noqa: E501 - auth_settings=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_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 - - - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_futures_order(settle, futures_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param FuturesOrder futures_order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 - - def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 - - - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_futures_order_with_http_info(settle, futures_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param FuturesOrder futures_order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'futures_order', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_futures_order" % k - ) - 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_futures_order`") # noqa: E501 - # verify the required parameter 'futures_order' is set - if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501 - local_var_params['futures_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `futures_order` when calling `create_futures_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'futures_order' in local_var_params: - body_params = local_var_params['futures_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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}/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrder', # noqa: E501 - auth_settings=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_futures_orders(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_futures_orders(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_futures_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 - - def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 - - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_futures_orders_with_http_info(settle, contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask - :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.FuturesOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'x_gate_exptime', - 'side' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_futures_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `cancel_futures_orders`") # noqa: E501 - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `cancel_futures_orders`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '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 = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/orders', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesOrder]', # noqa: E501 - auth_settings=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_orders_with_time_range(self, settle, **kwargs): # noqa: E501 - """List Futures Orders By Time Range # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orders_with_time_range(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp - :param int limit: Maximum number of records to be 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.FuturesOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_orders_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 - - def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 - """List Futures Orders By Time Range # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orders_with_time_range_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp - :param int limit: Maximum number of records to be 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.FuturesOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_orders_with_time_range" % k - ) - 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_orders_with_time_range`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `get_orders_with_time_range`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/orders_timerange', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesOrder]', # noqa: E501 - auth_settings=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_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a batch of futures orders # noqa: E501 - - - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_batch_futures_order(settle, futures_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param list[FuturesOrder] futures_order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.BatchFuturesOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_batch_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 - - def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a batch of futures orders # noqa: E501 - - - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_batch_futures_order_with_http_info(settle, futures_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param list[FuturesOrder] futures_order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.BatchFuturesOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'futures_order', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_batch_futures_order" % k - ) - 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_batch_futures_order`") # noqa: E501 - # verify the required parameter 'futures_order' is set - if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501 - local_var_params['futures_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `futures_order` when calling `create_batch_futures_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'futures_order' in local_var_params: - body_params = local_var_params['futures_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/batch_orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BatchFuturesOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_futures_order(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 - - def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_futures_order_with_http_info(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) - :param _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.FuturesOrder, 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_futures_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_futures_order`") # noqa: E501 - - collection_formats = {} - - 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}/orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrder', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.amend_futures_order(settle, order_id, futures_order_amendment, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) - :param FuturesOrderAmendment futures_order_amendment: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.amend_futures_order_with_http_info(settle, order_id, futures_order_amendment, **kwargs) # noqa: E501 - - def amend_futures_order_with_http_info(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.amend_futures_order_with_http_info(settle, order_id, futures_order_amendment, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) - :param FuturesOrderAmendment futures_order_amendment: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrder, 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', - 'futures_order_amendment', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method amend_futures_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `amend_futures_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `amend_futures_order`") # noqa: E501 - # verify the required parameter 'futures_order_amendment' is set - if self.api_client.client_side_validation and ('futures_order_amendment' not in local_var_params or # noqa: E501 - local_var_params['futures_order_amendment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `futures_order_amendment` when calling `amend_futures_order`") # noqa: E501 - - collection_formats = {} - - 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 = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'futures_order_amendment' in local_var_params: - body_params = local_var_params['futures_order_amendment'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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}/orders/{order_id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrder', # noqa: E501 - auth_settings=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_futures_order(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single 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_futures_order(settle, order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.FuturesOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 - - def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_futures_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 str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.FuturesOrder, 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', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_futures_order" % k - ) - 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_futures_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_futures_order`") # noqa: E501 - - collection_formats = {} - - 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 = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/orders/{order_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrder', # noqa: E501 - auth_settings=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_my_trades(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_my_trades(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MyFuturesTrade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_my_trades_with_http_info(settle, **kwargs) # noqa: E501 - - def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_my_trades_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. - :param _return_http_data_only: response data without head status code - 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.MyFuturesTrade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'order', - 'limit', - 'offset', - 'last_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_my_trades" % k - ) - 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_my_trades`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_trades`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'order' in local_var_params and local_var_params['order'] is not None: # noqa: E501 - query_params.append(('order', local_var_params['order'])) # 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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 - query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 - - 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}/my_trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MyFuturesTrade]', # noqa: E501 - auth_settings=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_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 - """List personal trading history by time range # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_my_trades_with_time_range(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str role: Query role, maker or taker. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MyFuturesTradeTimeRange] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_my_trades_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 - - def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history by time range # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_my_trades_with_time_range_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param str role: Query role, maker or taker. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MyFuturesTradeTimeRange], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - '_from', - 'to', - 'limit', - 'offset', - 'role' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_my_trades_with_time_range" % k - ) - 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_my_trades_with_time_range`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 - query_params.append(('role', local_var_params['role'])) # 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}/my_trades_timerange', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MyFuturesTradeTimeRange]', # noqa: E501 - auth_settings=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_position_close(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_position_close(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param str side: Query side. long or shot - :param str pnl: Query profit or loss - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.PositionClose] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_position_close_with_http_info(settle, **kwargs) # noqa: E501 - - def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_position_close_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param str side: Query side. long or shot - :param str pnl: Query profit or loss - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.PositionClose], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'offset', - '_from', - 'to', - 'side', - 'pnl' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_position_close" % k - ) - 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_position_close`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_position_close`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_position_close`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_position_close`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if '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 'pnl' in local_var_params and local_var_params['pnl'] is not None: # noqa: E501 - query_params.append(('pnl', local_var_params['pnl'])) # 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}/position_close', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[PositionClose]', # noqa: E501 - auth_settings=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_liquidates(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_liquidates(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesLiquidate] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_liquidates_with_http_info(settle, **kwargs) # noqa: E501 - - def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_liquidates_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesLiquidate], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'at' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_liquidates" % k - ) - 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_liquidates`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 - query_params.append(('at', local_var_params['at'])) # noqa: E501 - - 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}/liquidates', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesLiquidate]', # noqa: E501 - auth_settings=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_auto_deleverages(self, settle, **kwargs): # noqa: E501 - """List Auto-Deleveraging History # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_auto_deleverages(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify an auto-deleveraging timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesAutoDeleverage] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_auto_deleverages_with_http_info(settle, **kwargs) # noqa: E501 - - def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 - """List Auto-Deleveraging History # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_auto_deleverages_with_http_info(settle, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify an auto-deleveraging timestamp - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesAutoDeleverage], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract', - 'limit', - 'at' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_auto_deleverages" % k - ) - 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_auto_deleverages`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 - query_params.append(('at', local_var_params['at'])) # noqa: E501 - - 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}/auto_deleverages', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesAutoDeleverage]', # noqa: E501 - auth_settings=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 countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 - - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.TriggerTime - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, **kwargs) # noqa: E501 - - def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 - - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.TriggerTime, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'countdown_cancel_all_futures_task' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method countdown_cancel_all_futures" % k - ) - 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 `countdown_cancel_all_futures`") # noqa: E501 - # verify the required parameter 'countdown_cancel_all_futures_task' is set - if self.api_client.client_side_validation and ('countdown_cancel_all_futures_task' not in local_var_params or # noqa: E501 - local_var_params['countdown_cancel_all_futures_task'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `countdown_cancel_all_futures_task` when calling `countdown_cancel_all_futures`") # noqa: E501 - - collection_formats = {} - - 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 'countdown_cancel_all_futures_task' in local_var_params: - body_params = local_var_params['countdown_cancel_all_futures_task'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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}/countdown_cancel_all', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TriggerTime', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_futures_fee(self, settle, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_futures_fee(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: dict(str, gate_api.FuturesFee) - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_futures_fee_with_http_info(settle, **kwargs) # noqa: E501 - - def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_futures_fee_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(dict(str, gate_api.FuturesFee), status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_futures_fee" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_fee`") # noqa: E501 - - collection_formats = {} - - 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}/fee', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='dict(str, FuturesFee)', # noqa: E501 - auth_settings=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_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 - - Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_batch_future_orders(settle, request_body, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param list[str] request_body: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FutureCancelOrderResult] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_batch_future_orders_with_http_info(settle, request_body, **kwargs) # noqa: E501 - - def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 - - Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_batch_future_orders_with_http_info(settle, request_body, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param list[str] request_body: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.FutureCancelOrderResult], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'request_body', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_batch_future_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `cancel_batch_future_orders`") # noqa: E501 - # verify the required parameter 'request_body' is set - if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501 - local_var_params['request_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `request_body` when calling `cancel_batch_future_orders`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'request_body' in local_var_params: - body_params = local_var_params['request_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/batch_cancel_orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FutureCancelOrderResult]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 - """Batch modify orders with specified IDs # noqa: E501 - - You can specify multiple different order IDs. You can only modify up to 10 orders in one request. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.amend_batch_future_orders(settle, batch_amend_order_req, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param list[BatchAmendOrderReq] batch_amend_order_req: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.BatchFuturesOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, **kwargs) # noqa: E501 - - def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 - """Batch modify orders with specified IDs # noqa: E501 - - You can specify multiple different order IDs. You can only modify up to 10 orders in one request. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param list[BatchAmendOrderReq] batch_amend_order_req: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.BatchFuturesOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'settle', - 'batch_amend_order_req', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method amend_batch_future_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `amend_batch_future_orders`") # noqa: E501 - # verify the required parameter 'batch_amend_order_req' is set - if self.api_client.client_side_validation and ('batch_amend_order_req' not in local_var_params or # noqa: E501 - local_var_params['batch_amend_order_req'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `batch_amend_order_req` when calling `amend_batch_future_orders`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'settle' in local_var_params: - path_params['settle'] = local_var_params['settle'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'batch_amend_order_req' in local_var_params: - body_params = local_var_params['batch_amend_order_req'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/futures/{settle}/batch_amend_orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BatchFuturesOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered 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_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: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int 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 - """List All Price-triggered 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_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: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int 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 a 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 a 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 Price-triggered 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 Price-triggered 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 - """Get a 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.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 str order_id: Retrieve the data of the order with the specified 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.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 - """Get a 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.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 str order_id: Retrieve the data of the order with the specified 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.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, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='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 cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a 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.cancel_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 str order_id: Retrieve the data of the order with the specified 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.FuturesPriceTriggeredOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 - - def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 - - 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_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 str order_id: Retrieve the data of the order with the specified 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.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 cancel_price_triggered_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'settle' is set - if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 - local_var_params['settle'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_order`") # noqa: E501 - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_price_triggered_order`") # noqa: E501 - - collection_formats = {} - - 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}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='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) diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py deleted file mode 100644 index 395c9b8..0000000 --- a/gate_api/api/margin_api.py +++ /dev/null @@ -1,2739 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class MarginApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_margin_accounts(self, **kwargs): # noqa: E501 - """Margin account 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_margin_accounts(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.MarginAccount] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_margin_accounts_with_http_info(**kwargs) # noqa: E501 - - def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Margin account 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_margin_accounts_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.MarginAccount], 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 list_margin_accounts" % 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( - '/margin/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MarginAccount]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_margin_account_book(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 - - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_account_book(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.MarginAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 - - def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 - - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_account_book_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.MarginAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'currency_pair', - 'type', - '_from', - 'to', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_margin_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - 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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MarginAccountBook]', # noqa: E501 - auth_settings=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_funding_accounts(self, **kwargs): # noqa: E501 - """Funding account 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_funding_accounts(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FundingAccount] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 - - def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Funding account 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_funding_accounts_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param _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.FundingAccount], 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_funding_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( - '/margin/funding_accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FundingAccount]', # noqa: E501 - auth_settings=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_auto_repay_status(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment 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_auto_repay_status(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.AutoRepaySetting - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 - - def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_auto_repay_status_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.AutoRepaySetting, 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_auto_repay_status" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/auto_repay', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AutoRepaySetting', # noqa: E501 - auth_settings=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_auto_repay(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment 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.set_auto_repay(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.AutoRepaySetting - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 - - def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_auto_repay_with_http_info(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_auto_repay" % k - ) - 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 `set_auto_repay`") # 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 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/auto_repay', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AutoRepaySetting', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_margin_transferable(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_transferable(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.MarginTransferable - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 - - def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_transferable_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.MarginTransferable, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'currency_pair' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_margin_transferable" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_margin_transferable`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/transferable', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='MarginTransferable', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_cross_margin_currencies(self, **kwargs): # noqa: E501 - """Currencies supported by cross margin.(deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginCurrency] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_cross_margin_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_cross_margin_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Currencies supported by cross margin.(deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginCurrency], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_currencies" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginCurrency]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_currency(self, currency, **kwargs): # noqa: E501 - """Retrieve detail of one single currency supported by cross margin. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_currency(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginCurrency - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_currency_with_http_info(currency, **kwargs) # noqa: E501 - - def get_cross_margin_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Retrieve detail of one single currency supported by cross margin. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_currency_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginCurrency, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_currency" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_currency`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency' in local_var_params: - path_params['currency'] = local_var_params['currency'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/currencies/{currency}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginCurrency', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_account(self, **kwargs): # noqa: E501 - """Retrieve cross margin account. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_account(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_account_with_http_info(**kwargs) # noqa: E501 - - def get_cross_margin_account_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin account. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_account_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginAccount', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_cross_margin_account_book(self, **kwargs): # noqa: E501 - """Retrieve cross margin account change history. (deprecated) # noqa: E501 - - The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_account_book(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_cross_margin_account_book_with_http_info(**kwargs) # noqa: E501 - - def list_cross_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin account change history. (deprecated) # noqa: E501 - - The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_account_book_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - '_from', - 'to', - 'page', - 'limit', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginAccountBook]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated) # noqa: E501 - - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_loans(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) - :param str currency: Filter by currency - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginLoan] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501 - - def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated) # noqa: E501 - - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_loans_with_http_info(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) - :param str currency: Filter by currency - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status', - 'currency', - 'limit', - 'offset', - 'reverse' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_loans" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'status' is set - if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 - local_var_params['status'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `status` when calling `list_cross_margin_loans`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_loans`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 - query_params.append(('status', local_var_params['status'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 - query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/loans', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginLoan]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_cross_margin_loan(self, cross_margin_loan, **kwargs): # noqa: E501 - """Create a cross margin borrow loan. (deprecated) # noqa: E501 - - Borrow amount cannot be less than currency minimum borrow amount # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cross_margin_loan(cross_margin_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CrossMarginLoan cross_margin_loan: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginLoan - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_cross_margin_loan_with_http_info(cross_margin_loan, **kwargs) # noqa: E501 - - def create_cross_margin_loan_with_http_info(self, cross_margin_loan, **kwargs): # noqa: E501 - """Create a cross margin borrow loan. (deprecated) # noqa: E501 - - Borrow amount cannot be less than currency minimum borrow amount # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cross_margin_loan_with_http_info(cross_margin_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CrossMarginLoan cross_margin_loan: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'cross_margin_loan' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_cross_margin_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'cross_margin_loan' is set - if self.api_client.client_side_validation and ('cross_margin_loan' not in local_var_params or # noqa: E501 - local_var_params['cross_margin_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `cross_margin_loan` when calling `create_cross_margin_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'cross_margin_loan' in local_var_params: - body_params = local_var_params['cross_margin_loan'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/loans', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginLoan', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_loan(self, loan_id, **kwargs): # noqa: E501 - """Retrieve single borrow loan detail. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_loan(loan_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str loan_id: Borrow loan ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginLoan - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_loan_with_http_info(loan_id, **kwargs) # noqa: E501 - - def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 - """Retrieve single borrow loan detail. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_loan_with_http_info(loan_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str loan_id: Borrow loan ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'loan_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'loan_id' is set - if self.api_client.client_side_validation and ('loan_id' not in local_var_params or # noqa: E501 - local_var_params['loan_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `loan_id` when calling `get_cross_margin_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'loan_id' in local_var_params: - path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/loans/{loan_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginLoan', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_cross_margin_repayments(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated) # noqa: E501 - - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_repayments(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: - :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginRepayment] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501 - - def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated) # noqa: E501 - - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_repayments_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: - :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginRepayment], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'loan_id', - 'limit', - 'offset', - 'reverse' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_repayments" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501 - query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 - query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/repayments', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginRepayment]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def repay_cross_margin_loan(self, cross_margin_repay_request, **kwargs): # noqa: E501 - """Cross margin repayments. (deprecated) # noqa: E501 - - When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_cross_margin_loan(cross_margin_repay_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CrossMarginRepayRequest cross_margin_repay_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginLoan] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, **kwargs) # noqa: E501 - - def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **kwargs): # noqa: E501 - """Cross margin repayments. (deprecated) # noqa: E501 - - When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CrossMarginRepayRequest cross_margin_repay_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'cross_margin_repay_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method repay_cross_margin_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'cross_margin_repay_request' is set - if self.api_client.client_side_validation and ('cross_margin_repay_request' not in local_var_params or # noqa: E501 - local_var_params['cross_margin_repay_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `cross_margin_repay_request` when calling `repay_cross_margin_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'cross_margin_repay_request' in local_var_params: - body_params = local_var_params['cross_margin_repay_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/repayments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginLoan]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_interest_records(self, **kwargs): # noqa: E501 - """Interest records for the cross margin account. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_interest_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniLoanInterestRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_interest_records_with_http_info(**kwargs) # noqa: E501 - - def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """Interest records for the cross margin account. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_interest_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_interest_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/interest_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLoanInterestRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_transferable(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific cross margin currency. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_transferable(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginTransferable - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 - - def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific cross margin currency. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_transferable_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginTransferable, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_transferable" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_transferable`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/transferable', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginTransferable', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Estimated interest rates. (deprecated) # noqa: E501 - - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_estimate_rate(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: dict - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 - - def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Estimated interest rates. (deprecated) # noqa: E501 - - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_estimate_rate_with_http_info(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currencies' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_estimate_rate" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_cross_margin_estimate_rate`") # noqa: E501 - - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) > 10): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) < 1): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - collection_formats['currencies'] = 'multi' # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/estimate_rate', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='dict(str, str)', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_borrowable(self, currency, **kwargs): # noqa: E501 - """Get the max borrowable amount for a specific cross margin currency. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_borrowable(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedBorrowable - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_borrowable_with_http_info(currency, **kwargs) # noqa: E501 - - def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max borrowable amount for a specific cross margin currency. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_borrowable_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedBorrowable, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_borrowable" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_borrowable`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/borrowable', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedBorrowable', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_margin_tier(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MarginLeverageTier] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 - - def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_margin_tier_with_http_info(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_margin_tier" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_user_margin_tier`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/user/loan_margin_tiers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MarginLeverageTier]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # 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_market_margin_tier(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MarginLeverageTier] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 - - def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # 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_market_margin_tier_with_http_info(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, 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_market_margin_tier" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_market_margin_tier`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - 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 = [] # noqa: E501 - - return self.api_client.call_api( - '/margin/loan_margin_tiers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MarginLeverageTier]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # 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_market_leverage(margin_market_leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param MarginMarketLeverage margin_market_leverage: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 - - def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # 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_market_leverage_with_http_info(margin_market_leverage, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param MarginMarketLeverage margin_market_leverage: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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 = [ - 'margin_market_leverage' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_user_market_leverage" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'margin_market_leverage' is set - if self.api_client.client_side_validation and ('margin_market_leverage' not in local_var_params or # noqa: E501 - local_var_params['margin_market_leverage'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `margin_market_leverage` when calling `set_user_market_leverage`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'margin_market_leverage' in local_var_params: - body_params = local_var_params['margin_market_leverage'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/leverage/user_market_setting', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_margin_user_account(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 - - Support querying risk rate per position account and margin rate per position account # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_user_account(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.MarginAccount] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 - - def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 - - Support querying risk rate per position account and margin rate per position account # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_user_account_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.MarginAccount], 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 list_margin_user_account" % 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( - '/margin/user/account', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MarginAccount]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py deleted file mode 100644 index 1ceca59..0000000 --- a/gate_api/api/margin_uni_api.py +++ /dev/null @@ -1,1008 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class MarginUniApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_uni_currency_pairs(self, **kwargs): # noqa: E501 - """List lending markets # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_currency_pairs(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniCurrencyPair] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_uni_currency_pairs_with_http_info(**kwargs) # noqa: E501 - - def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 - """List lending markets # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_currency_pairs_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniCurrencyPair], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_uni_currency_pairs" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/currency_pairs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniCurrencyPair]', # noqa: E501 - auth_settings=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_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency_pair(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.UniCurrencyPair - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 - - def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency_pair_with_http_info(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.UniCurrencyPair, 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 get_uni_currency_pair" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency_pair' in local_var_params: - path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/currency_pairs/{currency_pair}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UniCurrencyPair', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 - - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: dict - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 - - def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 - - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currencies' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_margin_uni_estimate_rate" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`") # noqa: E501 - - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) > 10): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) < 1): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - collection_formats['currencies'] = 'multi' # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/estimate_rate', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='dict(str, str)', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_uni_loans(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loans(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniLoan] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 - - def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loans_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'currency', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_uni_loans" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/loans', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLoan]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_loan(create_uni_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateUniLoan create_uni_loan: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 - - def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_loan_with_http_info(create_uni_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateUniLoan create_uni_loan: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'create_uni_loan' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_uni_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'create_uni_loan' is set - if self.api_client.client_side_validation and ('create_uni_loan' not in local_var_params or # noqa: E501 - local_var_params['create_uni_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_uni_loan` when calling `create_uni_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_uni_loan' in local_var_params: - body_params = local_var_params['create_uni_loan'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/loans', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_uni_loan_records(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency - :param str currency_pair: Currency pair - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniLoanRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 - - def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency - :param str currency_pair: Currency pair - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'type', - 'currency', - 'currency_pair', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_uni_loan_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if '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 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/loan_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLoanRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_interest_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniLoanInterestRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 - - def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_interest_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'currency', - 'page', - 'limit', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_uni_loan_interest_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/interest_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLoanInterestRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_borrowable(currency, currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (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.MaxUniBorrowable - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 - - def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_borrowable_with_http_info(currency, currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (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.MaxUniBorrowable, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'currency_pair' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_uni_borrowable" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_borrowable`") # noqa: E501 - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_borrowable`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/uni/borrowable', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='MaxUniBorrowable', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py deleted file mode 100644 index 8cea842..0000000 --- a/gate_api/api/multi_collateral_loan_api.py +++ /dev/null @@ -1,1461 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class MultiCollateralLoanApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_multi_collateral_orders(self, **kwargs): # noqa: E501 - """List Multi-Collateral 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_multi_collateral_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str sort: Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. - :param str order_type: Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.MultiCollateralOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_multi_collateral_orders_with_http_info(**kwargs) # noqa: E501 - - def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 - """List Multi-Collateral 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_multi_collateral_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str sort: Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. - :param str order_type: Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.MultiCollateralOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'page', - 'limit', - 'sort', - 'order_type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_multi_collateral_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_collateral_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_orders`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_orders`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 - query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - if 'order_type' in local_var_params and local_var_params['order_type'] is not None: # noqa: E501 - query_params.append(('order_type', local_var_params['order_type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MultiCollateralOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_multi_collateral(self, create_multi_collateral_order, **kwargs): # noqa: E501 - """Create Multi-Collateral Order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_multi_collateral(create_multi_collateral_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateMultiCollateralOrder create_multi_collateral_order: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OrderResp - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_multi_collateral_with_http_info(create_multi_collateral_order, **kwargs) # noqa: E501 - - def create_multi_collateral_with_http_info(self, create_multi_collateral_order, **kwargs): # noqa: E501 - """Create Multi-Collateral Order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_multi_collateral_with_http_info(create_multi_collateral_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CreateMultiCollateralOrder create_multi_collateral_order: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OrderResp, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'create_multi_collateral_order' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_multi_collateral" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'create_multi_collateral_order' is set - if self.api_client.client_side_validation and ('create_multi_collateral_order' not in local_var_params or # noqa: E501 - local_var_params['create_multi_collateral_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_multi_collateral_order` when calling `create_multi_collateral`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_multi_collateral_order' in local_var_params: - body_params = local_var_params['create_multi_collateral_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OrderResp', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 - """Get Multi-Collateral 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_multi_collateral_order_detail(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Order ID returned on successful order creation (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.MultiCollateralOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_multi_collateral_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 - - def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get Multi-Collateral 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_multi_collateral_order_detail_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Order ID returned on successful order creation (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.MultiCollateralOrder, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'order_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_multi_collateral_order_detail" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_multi_collateral_order_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'order_id' in local_var_params: - path_params['order_id'] = local_var_params['order_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='MultiCollateralOrder', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_multi_repay_records(self, type, **kwargs): # noqa: E501 - """List Multi-Collateral Repay Records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_multi_repay_records(type, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.MultiRepayRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_multi_repay_records_with_http_info(type, **kwargs) # noqa: E501 - - def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 - """List Multi-Collateral Repay Records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_multi_repay_records_with_http_info(type, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.MultiRepayRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'type', - 'borrow_currency', - 'page', - 'limit', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_multi_repay_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 - local_var_params['type'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `type` when calling `list_multi_repay_records`") # noqa: E501 - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_repay_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 - query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/repay', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MultiRepayRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def repay_multi_collateral_loan(self, repay_multi_loan, **kwargs): # noqa: E501 - """Repay Multi-Collateral Loan # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_multi_collateral_loan(repay_multi_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param RepayMultiLoan repay_multi_loan: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.MultiRepayResp - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.repay_multi_collateral_loan_with_http_info(repay_multi_loan, **kwargs) # noqa: E501 - - def repay_multi_collateral_loan_with_http_info(self, repay_multi_loan, **kwargs): # noqa: E501 - """Repay Multi-Collateral Loan # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_multi_collateral_loan_with_http_info(repay_multi_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param RepayMultiLoan repay_multi_loan: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.MultiRepayResp, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'repay_multi_loan' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method repay_multi_collateral_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'repay_multi_loan' is set - if self.api_client.client_side_validation and ('repay_multi_loan' not in local_var_params or # noqa: E501 - local_var_params['repay_multi_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `repay_multi_loan` when calling `repay_multi_collateral_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'repay_multi_loan' in local_var_params: - body_params = local_var_params['repay_multi_loan'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/repay', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='MultiRepayResp', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_multi_collateral_records(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_multi_collateral_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str collateral_currency: Collateral - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.MultiCollateralRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_multi_collateral_records_with_http_info(**kwargs) # noqa: E501 - - def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_multi_collateral_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str collateral_currency: Collateral - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.MultiCollateralRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'page', - 'limit', - '_from', - 'to', - 'collateral_currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_multi_collateral_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 - query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/mortgage', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MultiCollateralRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def operate_multi_collateral(self, collateral_adjust, **kwargs): # noqa: E501 - """Operate Multi-Collateral # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.operate_multi_collateral(collateral_adjust, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CollateralAdjust collateral_adjust: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CollateralAdjustRes - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.operate_multi_collateral_with_http_info(collateral_adjust, **kwargs) # noqa: E501 - - def operate_multi_collateral_with_http_info(self, collateral_adjust, **kwargs): # noqa: E501 - """Operate Multi-Collateral # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.operate_multi_collateral_with_http_info(collateral_adjust, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CollateralAdjust collateral_adjust: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CollateralAdjustRes, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collateral_adjust' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method operate_multi_collateral" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'collateral_adjust' is set - if self.api_client.client_side_validation and ('collateral_adjust' not in local_var_params or # noqa: E501 - local_var_params['collateral_adjust'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collateral_adjust` when calling `operate_multi_collateral`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'collateral_adjust' in local_var_params: - body_params = local_var_params['collateral_adjust'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/mortgage', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CollateralAdjustRes', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 - """List User Currency Quota # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_user_currency_quota(type, currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: Currency types: collateral - collateral currency, borrow - borrowing currency. (required) - :param str currency: When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CurrencyQuota] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_user_currency_quota_with_http_info(type, currency, **kwargs) # noqa: E501 - - def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # noqa: E501 - """List User Currency Quota # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_user_currency_quota_with_http_info(type, currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: Currency types: collateral - collateral currency, borrow - borrowing currency. (required) - :param str currency: When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CurrencyQuota], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'type', - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_user_currency_quota" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 - local_var_params['type'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `type` when calling `list_user_currency_quota`") # noqa: E501 - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `list_user_currency_quota`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/currency_quota', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CurrencyQuota]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_multi_collateral_currencies(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies in Multi-Collateral # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_multi_collateral_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.MultiCollateralCurrency - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_multi_collateral_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_multi_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies in Multi-Collateral # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_multi_collateral_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.MultiCollateralCurrency, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_multi_collateral_currencies" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='MultiCollateralCurrency', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_multi_collateral_ltv(self, **kwargs): # noqa: E501 - """Get Multi-Collateral ratio # noqa: E501 - - The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_multi_collateral_ltv(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CollateralLtv - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_multi_collateral_ltv_with_http_info(**kwargs) # noqa: E501 - - def get_multi_collateral_ltv_with_http_info(self, **kwargs): # noqa: E501 - """Get Multi-Collateral ratio # noqa: E501 - - The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_multi_collateral_ltv_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CollateralLtv, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_multi_collateral_ltv" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/ltv', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CollateralLtv', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_multi_collateral_fix_rate(self, **kwargs): # noqa: E501 - """Query fixed interest rates for the currency for 7 days and 30 days # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_multi_collateral_fix_rate(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CollateralFixRate] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_multi_collateral_fix_rate_with_http_info(**kwargs) # noqa: E501 - - def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501 - """Query fixed interest rates for the currency for 7 days and 30 days # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_multi_collateral_fix_rate_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CollateralFixRate], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_multi_collateral_fix_rate" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/fixed_rate', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CollateralFixRate]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 - """Query the current interest rate of the currency # noqa: E501 - - Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_multi_collateral_current_rate(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. (required) - :param str vip_level: VIP level, defaults to 0 if not transferred - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CollateralCurrentRate] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_multi_collateral_current_rate_with_http_info(currencies, **kwargs) # noqa: E501 - - def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Query the current interest rate of the currency # noqa: E501 - - Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_multi_collateral_current_rate_with_http_info(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. (required) - :param str vip_level: VIP level, defaults to 0 if not transferred - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CollateralCurrentRate], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currencies', - 'vip_level' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_multi_collateral_current_rate" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_multi_collateral_current_rate`") # noqa: E501 - - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) > 100): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_multi_collateral_current_rate`, number of items must be less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) < 1): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_multi_collateral_current_rate`, number of items must be greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - collection_formats['currencies'] = 'multi' # noqa: E501 - if 'vip_level' in local_var_params and local_var_params['vip_level'] is not None: # noqa: E501 - query_params.append(('vip_level', local_var_params['vip_level'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/loan/multi_collateral/current_rate', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CollateralCurrentRate]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py deleted file mode 100644 index b5f74f7..0000000 --- a/gate_api/api/options_api.py +++ /dev/null @@ -1,3441 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class OptionsApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_options_underlyings(self, **kwargs): # noqa: E501 - """List all underlyings # 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_options_underlyings(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.OptionsUnderlying] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_underlyings_with_http_info(**kwargs) # noqa: E501 - - def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501 - """List all underlyings # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_underlyings_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.OptionsUnderlying], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_underlyings" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/options/underlyings', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsUnderlying]', # noqa: E501 - auth_settings=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_options_expirations(self, underlying, **kwargs): # noqa: E501 - """List all expiration times # 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_options_expirations(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying 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: list[int] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_expirations_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List all expiration times # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_expirations_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying 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(list[int], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_expirations" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_expirations`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/options/expirations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[int]', # noqa: E501 - auth_settings=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_options_contracts(self, underlying, **kwargs): # noqa: E501 - """List all the contracts with specified underlying and expiration time # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_contracts(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int expiration: Unix timestamp of the expiration time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsContract] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_contracts_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List all the contracts with specified underlying and expiration time # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_contracts_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int expiration: Unix timestamp of the expiration time - :param _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.OptionsContract], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying', - 'expiration' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_contracts" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_contracts`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - if 'expiration' in local_var_params and local_var_params['expiration'] is not None: # noqa: E501 - query_params.append(('expiration', local_var_params['expiration'])) # 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( - '/options/contracts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsContract]', # noqa: E501 - auth_settings=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_options_contract(self, contract, **kwargs): # noqa: E501 - """Query specified contract 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_options_contract(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OptionsContract - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_options_contract_with_http_info(contract, **kwargs) # noqa: E501 - - def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501 - """Query specified contract detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_contract_with_http_info(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OptionsContract, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_options_contract" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_options_contract`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/options/contracts/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsContract', # noqa: E501 - auth_settings=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_options_settlements(self, underlying, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_settlements(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsSettlement] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_settlements_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :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.OptionsSettlement], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying', - 'limit', - 'offset', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_settlements" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_settlements`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_settlements`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - 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( - '/options/settlements', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsSettlement]', # noqa: E501 - auth_settings=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_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E501 - """Get specified contract's settlement # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_settlement(contract, underlying, at, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: (required) - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int at: (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.OptionsSettlement - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_options_settlement_with_http_info(contract, underlying, at, **kwargs) # noqa: E501 - - def get_options_settlement_with_http_info(self, contract, underlying, at, **kwargs): # noqa: E501 - """Get specified contract's settlement # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_settlement_with_http_info(contract, underlying, at, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: (required) - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int at: (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.OptionsSettlement, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'contract', - 'underlying', - 'at' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_options_settlement" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_options_settlement`") # noqa: E501 - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `get_options_settlement`") # noqa: E501 - # verify the required parameter 'at' is set - if self.api_client.client_side_validation and ('at' not in local_var_params or # noqa: E501 - local_var_params['at'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `at` when calling `get_options_settlement`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 - query_params.append(('at', local_var_params['at'])) # noqa: E501 - - 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( - '/options/settlements/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsSettlement', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 - """List my options settlements # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_options_settlements(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsMySettlements] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_my_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List my options settlements # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_options_settlements_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :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.OptionsMySettlements], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying', - 'contract', - 'limit', - 'offset', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_my_options_settlements" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_my_options_settlements`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_my_options_settlements`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/my_settlements', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsMySettlements]', # noqa: E501 - auth_settings=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_options_order_book(self, contract, **kwargs): # noqa: E501 - """Options order book # noqa: E501 - - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_order_book(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesOrderBook - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_order_book_with_http_info(contract, **kwargs) # noqa: E501 - - def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E501 - """Options order book # noqa: E501 - - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_order_book_with_http_info(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update - :param _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.FuturesOrderBook, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'contract', - 'interval', - 'limit', - 'with_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_order_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_options_order_book`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value less than or equal to `50`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 - query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/options/order_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='FuturesOrderBook', # noqa: E501 - auth_settings=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_options_tickers(self, underlying, **kwargs): # noqa: E501 - """List tickers of options contracts # 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_options_tickers(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying 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: list[gate_api.OptionsTicker] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_tickers_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List tickers of options contracts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_tickers_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying 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(list[gate_api.OptionsTicker], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_tickers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_tickers`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/options/tickers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsTicker]', # noqa: E501 - auth_settings=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_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 - """Get underlying ticker # 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_options_underlying_tickers(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (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.OptionsUnderlyingTicker - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_underlying_tickers_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 - """Get underlying ticker # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_underlying_tickers_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (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.OptionsUnderlyingTicker, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_underlying_tickers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_underlying_tickers`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'underlying' in local_var_params: - path_params['underlying'] = local_var_params['underlying'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/options/underlying/tickers/{underlying}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsUnderlyingTicker', # noqa: E501 - auth_settings=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_options_candlesticks(self, contract, **kwargs): # noqa: E501 - """Get options candlesticks # 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_options_candlesticks(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param str interval: Interval time between data points - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsCandlestick] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_candlesticks_with_http_info(contract, **kwargs) # noqa: E501 - - def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: E501 - """Get options candlesticks # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_candlesticks_with_http_info(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param str interval: Interval time between data points - :param _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.OptionsCandlestick], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'contract', - 'limit', - '_from', - 'to', - 'interval' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_candlesticks" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `list_options_candlesticks`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - - 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( - '/options/candlesticks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsCandlestick]', # noqa: E501 - auth_settings=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_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E501 - """Mark price candlesticks of an underlying # 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_options_underlying_candlesticks(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param str interval: Interval time between data points - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesCandlestick] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_underlying_candlesticks_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwargs): # noqa: E501 - """Mark price candlesticks of an underlying # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_underlying_candlesticks_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp - :param str interval: Interval time between data points - :param _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.FuturesCandlestick], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying', - 'limit', - '_from', - 'to', - 'interval' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_underlying_candlesticks" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_underlying_candlesticks`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - - 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( - '/options/underlying/candlesticks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesCandlestick]', # noqa: E501 - auth_settings=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_options_trades(self, **kwargs): # noqa: E501 - """Options trade history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_trades(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str type: `C` is call, while `P` is put - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.FuturesTrade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_trades_with_http_info(**kwargs) # noqa: E501 - - def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 - """Options trade history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_trades_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str type: `C` is call, while `P` is put - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :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.FuturesTrade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'contract', - 'type', - 'limit', - 'offset', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_trades" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_trades`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_trades`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 '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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - 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( - '/options/trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FuturesTrade]', # noqa: E501 - auth_settings=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_options_account(self, **kwargs): # noqa: E501 - """List options account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_account(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OptionsAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_account_with_http_info(**kwargs) # noqa: E501 - - def list_options_account_with_http_info(self, **kwargs): # noqa: E501 - """List options account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_account_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OptionsAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsAccount', # noqa: E501 - auth_settings=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_options_account_book(self, **kwargs): # noqa: E501 - """List account changing history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_account_book(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_account_book_with_http_info(**kwargs) # noqa: E501 - - def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List account changing history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_options_account_book_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL - :param _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.OptionsAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - '_from', - 'to', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_account_book`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsAccountBook]', # noqa: E501 - auth_settings=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_options_positions(self, **kwargs): # noqa: E501 - """List user's positions of specified underlying # 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_options_positions(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.OptionsPosition] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_positions_with_http_info(**kwargs) # noqa: E501 - - def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 - """List user's positions of specified underlying # 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_options_positions_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.OptionsPosition], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_positions" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/positions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsPosition]', # noqa: E501 - auth_settings=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_options_position(self, contract, **kwargs): # noqa: E501 - """Get specified contract position # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_position(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OptionsPosition - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_options_position_with_http_info(contract, **kwargs) # noqa: E501 - - def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501 - """Get specified contract position # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_position_with_http_info(contract, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OptionsPosition, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_options_position" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'contract' is set - if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 - local_var_params['contract'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `contract` when calling `get_options_position`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'contract' in local_var_params: - path_params['contract'] = local_var_params['contract'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/positions/{contract}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsPosition', # noqa: E501 - auth_settings=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_options_position_close(self, underlying, **kwargs): # noqa: E501 - """List user's liquidation history of specified underlying # 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_options_position_close(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract 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.OptionsPositionClose] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_position_close_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_options_position_close_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List user's liquidation history of specified underlying # 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_options_position_close_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract 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.OptionsPositionClose], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying', - 'contract' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_position_close" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_position_close`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - 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( - '/options/position_close', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsPositionClose]', # noqa: E501 - auth_settings=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_options_orders(self, status, **kwargs): # noqa: E501 - """List options 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_options_orders(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str contract: Options contract name - :param str underlying: Underlying - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_options_orders_with_http_info(status, **kwargs) # noqa: E501 - - def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 - """List options 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_options_orders_with_http_info(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str contract: Options contract name - :param str underlying: Underlying - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :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.OptionsOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status', - 'contract', - 'underlying', - 'limit', - 'offset', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_options_orders" % k - ) - 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_options_orders`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_orders`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsOrder]', # noqa: E501 - auth_settings=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_options_order(self, options_order, **kwargs): # noqa: E501 - """Create an options 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_options_order(options_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param OptionsOrder options_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.OptionsOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_options_order_with_http_info(options_order, **kwargs) # noqa: E501 - - def create_options_order_with_http_info(self, options_order, **kwargs): # noqa: E501 - """Create an options 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_options_order_with_http_info(options_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param OptionsOrder options_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.OptionsOrder, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'options_order' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_options_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'options_order' is set - if self.api_client.client_side_validation and ('options_order' not in local_var_params or # noqa: E501 - local_var_params['options_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `options_order` when calling `create_options_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'options_order' in local_var_params: - body_params = local_var_params['options_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsOrder', # noqa: E501 - auth_settings=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_options_orders(self, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # 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_options_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str underlying: Underlying - :param str side: All bids or asks. Both included if not specified - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_options_orders_with_http_info(**kwargs) # noqa: E501 - - def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_options_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str underlying: Underlying - :param str side: All bids or asks. Both included if not specified - :param _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.OptionsOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'contract', - 'underlying', - 'side' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_options_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - 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 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - 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( - '/options/orders', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsOrder]', # noqa: E501 - auth_settings=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_options_order(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_order(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (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.OptionsOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_options_order_with_http_info(order_id, **kwargs) # noqa: E501 - - def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_order_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (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.OptionsOrder, 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_options_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_options_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/options/orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsOrder', # noqa: E501 - auth_settings=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_options_order(self, order_id, **kwargs): # noqa: E501 - """Cancel a single 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_options_order(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (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.OptionsOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_options_order_with_http_info(order_id, **kwargs) # noqa: E501 - - def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_options_order_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (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.OptionsOrder, 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_options_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_options_order`") # noqa: E501 - - collection_formats = {} - - 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( - '/options/orders/{order_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsOrder', # noqa: E501 - auth_settings=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 countdown_cancel_all_options(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 - - Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.countdown_cancel_all_options(countdown_cancel_all_options_task, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CountdownCancelAllOptionsTask countdown_cancel_all_options_task: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.TriggerTime - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, **kwargs) # noqa: E501 - - def countdown_cancel_all_options_with_http_info(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 - - Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CountdownCancelAllOptionsTask countdown_cancel_all_options_task: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.TriggerTime, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'countdown_cancel_all_options_task' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method countdown_cancel_all_options" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'countdown_cancel_all_options_task' is set - if self.api_client.client_side_validation and ('countdown_cancel_all_options_task' not in local_var_params or # noqa: E501 - local_var_params['countdown_cancel_all_options_task'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `countdown_cancel_all_options_task` when calling `countdown_cancel_all_options`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'countdown_cancel_all_options_task' in local_var_params: - body_params = local_var_params['countdown_cancel_all_options_task'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/countdown_cancel_all', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TriggerTime', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_options_trades(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OptionsMyTrade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_my_options_trades_with_http_info(underlying, **kwargs) # noqa: E501 - - def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_options_trades_with_http_info(underlying, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp - :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.OptionsMyTrade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying', - 'contract', - 'limit', - 'offset', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_my_options_trades" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'underlying' is set - if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 - local_var_params['underlying'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `underlying` when calling `list_my_options_trades`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_my_options_trades`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 - query_params.append(('contract', local_var_params['contract'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/my_trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsMyTrade]', # noqa: E501 - auth_settings=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_options_mmp(self, **kwargs): # noqa: E501 - """MMP Query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_mmp(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.OptionsMMP] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_options_mmp_with_http_info(**kwargs) # noqa: E501 - - def get_options_mmp_with_http_info(self, **kwargs): # noqa: E501 - """MMP Query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_options_mmp_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str underlying: Underlying - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.OptionsMMP], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'underlying' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_options_mmp" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 - query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/mmp', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OptionsMMP]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def set_options_mmp(self, options_mmp, **kwargs): # noqa: E501 - """MMP Settings # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_options_mmp(options_mmp, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param OptionsMMP options_mmp: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OptionsMMP - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_options_mmp_with_http_info(options_mmp, **kwargs) # noqa: E501 - - def set_options_mmp_with_http_info(self, options_mmp, **kwargs): # noqa: E501 - """MMP Settings # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_options_mmp_with_http_info(options_mmp, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param OptionsMMP options_mmp: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OptionsMMP, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'options_mmp' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_options_mmp" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'options_mmp' is set - if self.api_client.client_side_validation and ('options_mmp' not in local_var_params or # noqa: E501 - local_var_params['options_mmp'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `options_mmp` when calling `set_options_mmp`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'options_mmp' in local_var_params: - body_params = local_var_params['options_mmp'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/mmp', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsMMP', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def reset_options_mmp(self, options_mmp_reset, **kwargs): # noqa: E501 - """MMP Reset # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_options_mmp(options_mmp_reset, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param OptionsMMPReset options_mmp_reset: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OptionsMMP - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.reset_options_mmp_with_http_info(options_mmp_reset, **kwargs) # noqa: E501 - - def reset_options_mmp_with_http_info(self, options_mmp_reset, **kwargs): # noqa: E501 - """MMP Reset # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_options_mmp_with_http_info(options_mmp_reset, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param OptionsMMPReset options_mmp_reset: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OptionsMMP, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'options_mmp_reset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method reset_options_mmp" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'options_mmp_reset' is set - if self.api_client.client_side_validation and ('options_mmp_reset' not in local_var_params or # noqa: E501 - local_var_params['options_mmp_reset'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `options_mmp_reset` when calling `reset_options_mmp`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'options_mmp_reset' in local_var_params: - body_params = local_var_params['options_mmp_reset'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/options/mmp/reset', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OptionsMMP', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py deleted file mode 100644 index 9136c26..0000000 --- a/gate_api/api/rebate_api.py +++ /dev/null @@ -1,1216 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class RebateApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def agency_transaction_history(self, **kwargs): # noqa: E501 - """The agency obtains the transaction history of the recommended user # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.agency_transaction_history(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.AgencyTransactionHistory] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.agency_transaction_history_with_http_info(**kwargs) # noqa: E501 - - def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """The agency obtains the transaction history of the recommended user # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.agency_transaction_history_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.AgencyTransactionHistory], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'user_id', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method agency_transaction_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `agency_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/agency/transaction_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AgencyTransactionHistory]', # noqa: E501 - auth_settings=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 agency_commissions_history(self, **kwargs): # noqa: E501 - """The agency obtains the commission history of the recommended user # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.agency_commissions_history(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.AgencyCommissionHistory] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.agency_commissions_history_with_http_info(**kwargs) # noqa: E501 - - def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 - """The agency obtains the commission history of the recommended user # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.agency_commissions_history_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.AgencyCommissionHistory], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'user_id', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method agency_commissions_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `agency_commissions_history`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/agency/commission_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AgencyCommissionHistory]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def partner_transaction_history(self, **kwargs): # noqa: E501 - """Partner obtains transaction records of recommended users # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.partner_transaction_history(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.PartnerTransactionHistory - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.partner_transaction_history_with_http_info(**kwargs) # noqa: E501 - - def partner_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """Partner obtains transaction records of recommended users # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.partner_transaction_history_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.PartnerTransactionHistory, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'user_id', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method partner_transaction_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `partner_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `partner_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `partner_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/partner/transaction_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PartnerTransactionHistory', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def partner_commissions_history(self, **kwargs): # noqa: E501 - """Partner obtains commission records of recommended users # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.partner_commissions_history(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.PartnerCommissionHistory - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.partner_commissions_history_with_http_info(**kwargs) # noqa: E501 - - def partner_commissions_history_with_http_info(self, **kwargs): # noqa: E501 - """Partner obtains commission records of recommended users # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.partner_commissions_history_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.PartnerCommissionHistory, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'user_id', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method partner_commissions_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `partner_commissions_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `partner_commissions_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `partner_commissions_history`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/partner/commission_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PartnerCommissionHistory', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def partner_sub_list(self, **kwargs): # noqa: E501 - """Partner subordinate list # noqa: E501 - - Including sub-agents, direct customers, indirect customers # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.partner_sub_list(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: User ID. If not specified, all user records will be returned - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.PartnerSubList - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.partner_sub_list_with_http_info(**kwargs) # noqa: E501 - - def partner_sub_list_with_http_info(self, **kwargs): # noqa: E501 - """Partner subordinate list # noqa: E501 - - Including sub-agents, direct customers, indirect customers # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.partner_sub_list_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: User ID. If not specified, all user records will be returned - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.PartnerSubList, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method partner_sub_list" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `partner_sub_list`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `partner_sub_list`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `partner_sub_list`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/partner/sub_list', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PartnerSubList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def rebate_broker_commission_history(self, **kwargs): # noqa: E501 - """The broker obtains the user's commission rebate records # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rebate_broker_commission_history(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.BrokerCommission] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.rebate_broker_commission_history_with_http_info(**kwargs) # noqa: E501 - - def rebate_broker_commission_history_with_http_info(self, **kwargs): # noqa: E501 - """The broker obtains the user's commission rebate records # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rebate_broker_commission_history_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.BrokerCommission], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - 'user_id', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method rebate_broker_commission_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_commission_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_commission_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `rebate_broker_commission_history`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/broker/commission_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BrokerCommission]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def rebate_broker_transaction_history(self, **kwargs): # noqa: E501 - """The broker obtains the user's trading history # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rebate_broker_transaction_history(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.BrokerTransaction] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.rebate_broker_transaction_history_with_http_info(**kwargs) # noqa: E501 - - def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """The broker obtains the user's trading history # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rebate_broker_transaction_history_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.BrokerTransaction], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - 'user_id', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method rebate_broker_transaction_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `rebate_broker_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 - query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/broker/transaction_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BrokerTransaction]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def rebate_user_info(self, **kwargs): # noqa: E501 - """User retrieves rebate information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rebate_user_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.RebateUserInfo] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.rebate_user_info_with_http_info(**kwargs) # noqa: E501 - - def rebate_user_info_with_http_info(self, **kwargs): # noqa: E501 - """User retrieves rebate information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.rebate_user_info_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.RebateUserInfo], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method rebate_user_info" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/user/info', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[RebateUserInfo]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def user_sub_relation(self, user_id_list, **kwargs): # noqa: E501 - """User-subordinate relationship # noqa: E501 - - Query whether the specified user is in the system # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.user_sub_relation(user_id_list, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100 (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UserSubRelation - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.user_sub_relation_with_http_info(user_id_list, **kwargs) # noqa: E501 - - def user_sub_relation_with_http_info(self, user_id_list, **kwargs): # noqa: E501 - """User-subordinate relationship # noqa: E501 - - Query whether the specified user is in the system # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.user_sub_relation_with_http_info(user_id_list, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100 (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UserSubRelation, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id_list' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method user_sub_relation" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id_list' is set - if self.api_client.client_side_validation and ('user_id_list' not in local_var_params or # noqa: E501 - local_var_params['user_id_list'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id_list` when calling `user_sub_relation`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'user_id_list' in local_var_params and local_var_params['user_id_list'] is not None: # noqa: E501 - query_params.append(('user_id_list', local_var_params['user_id_list'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/rebate/user/sub_relation', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserSubRelation', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py deleted file mode 100644 index fd8ae80..0000000 --- a/gate_api/api/spot_api.py +++ /dev/null @@ -1,4023 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class SpotApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_currencies(self, **kwargs): # noqa: E501 - """List all currencies' details # noqa: E501 - - When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Currency] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List all currencies' details # noqa: E501 - - When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Currency], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_currencies" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Currency]', # noqa: E501 - auth_settings=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_currency(self, currency, **kwargs): # noqa: E501 - """Get details of a specific currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_currency(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.Currency - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_currency_with_http_info(currency, **kwargs) # noqa: E501 - - def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get details of a specific currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_currency_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.Currency, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_currency" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_currency`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency' in local_var_params: - path_params['currency'] = local_var_params['currency'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/currencies/{currency}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Currency', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_currency_pairs(self, **kwargs): # noqa: E501 - """List all currency pairs 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.list_currency_pairs(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CurrencyPair] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_currency_pairs_with_http_info(**kwargs) # noqa: E501 - - def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 - """List all currency pairs supported # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_currency_pairs_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CurrencyPair], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_currency_pairs" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/currency_pairs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CurrencyPair]', # noqa: E501 - auth_settings=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_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get details of a specifc currency pair # 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_currency_pair(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CurrencyPair - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 - - def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get details of a specifc currency pair # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_currency_pair_with_http_info(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CurrencyPair, 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 get_currency_pair" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_currency_pair`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency_pair' in local_var_params: - path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/currency_pairs/{currency_pair}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CurrencyPair', # noqa: E501 - auth_settings=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_tickers(self, **kwargs): # noqa: E501 - """Retrieve ticker information # noqa: E501 - - Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_tickers(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str timezone: Timezone - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Ticker] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_tickers_with_http_info(**kwargs) # noqa: E501 - - def list_tickers_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve ticker information # noqa: E501 - - Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_tickers_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str timezone: Timezone - :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.Ticker], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'timezone' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_tickers" % k - ) - 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 - if 'timezone' in local_var_params and local_var_params['timezone'] is not None: # noqa: E501 - query_params.append(('timezone', local_var_params['timezone'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/tickers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Ticker]', # noqa: E501 - auth_settings=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_order_book(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve order book # noqa: E501 - - Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_order_book(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Return order book ID - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OrderBook - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_order_book_with_http_info(currency_pair, **kwargs) # noqa: E501 - - def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve order book # noqa: E501 - - Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_order_book_with_http_info(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Return order book ID - :param _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.OrderBook, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'interval', - 'limit', - 'with_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_order_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_order_book`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_order_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 - query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/order_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OrderBook', # noqa: E501 - auth_settings=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_trades(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve market trades # noqa: E501 - - Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_trades(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.Trade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_trades_with_http_info(currency_pair, **kwargs) # noqa: E501 - - def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve market trades # noqa: E501 - - Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_trades_with_http_info(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results - :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Trade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'limit', - 'last_id', - 'reverse', - '_from', - 'to', - 'page' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_trades" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_trades`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_trades`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_trades`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 - query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 - if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 - query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Trade]', # noqa: E501 - auth_settings=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_candlesticks(self, currency_pair, **kwargs): # noqa: E501 - """Market candlesticks # noqa: E501 - - Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_candlesticks(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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[list[str]] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_candlesticks_with_http_info(currency_pair, **kwargs) # noqa: E501 - - def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Market candlesticks # noqa: E501 - - Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_candlesticks_with_http_info(currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time - :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days - :param _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[list[str]], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'limit', - '_from', - 'to', - 'interval' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_candlesticks" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_candlesticks`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 - query_params.append(('interval', local_var_params['interval'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/candlesticks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[list[str]]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_fee(self, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 - - This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_fee(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SpotFee - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_fee_with_http_info(**kwargs) # noqa: E501 - - def get_fee_with_http_info(self, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 - - This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_fee_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs - :param _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.SpotFee, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_fee" % k - ) - 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/fee', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SpotFee', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 - """Query a batch of user trading fee rates # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_batch_spot_fee(currency_pairs, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pairs: A request can only query up to 50 currency pairs (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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, gate_api.SpotFee) - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_batch_spot_fee_with_http_info(currency_pairs, **kwargs) # noqa: E501 - - def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: E501 - """Query a batch of user trading fee rates # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_batch_spot_fee_with_http_info(currency_pairs, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pairs: A request can only query up to 50 currency pairs (required) - :param _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, gate_api.SpotFee), status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pairs' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_batch_spot_fee" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pairs' is set - if self.api_client.client_side_validation and ('currency_pairs' not in local_var_params or # noqa: E501 - local_var_params['currency_pairs'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pairs` when calling `get_batch_spot_fee`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency_pairs' in local_var_params and local_var_params['currency_pairs'] is not None: # noqa: E501 - query_params.append(('currency_pairs', local_var_params['currency_pairs'])) # 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/batch_fee', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='dict(str, SpotFee)', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_spot_accounts(self, **kwargs): # noqa: E501 - """List spot 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: Retrieve data of the specified currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.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 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: Retrieve data of the specified currency - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.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 account book # noqa: E501 - - Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_spot_account_book(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SpotAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_spot_account_book_with_http_info(**kwargs) # noqa: E501 - - def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501 - """Query account book # noqa: E501 - - Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_spot_account_book_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SpotAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - '_from', - 'to', - 'page', - 'limit', - 'type', - 'code' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_spot_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_spot_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'code' in local_var_params and local_var_params['code'] is not None: # noqa: E501 - query_params.append(('code', local_var_params['code'])) # noqa: E501 - - header_params = {} - - 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/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SpotAccountBook]', # noqa: E501 - auth_settings=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_batch_orders(self, order, **kwargs): # noqa: E501 - """Create a batch of orders # noqa: E501 - - Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_batch_orders(order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[Order] order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.BatchOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_batch_orders_with_http_info(order, **kwargs) # noqa: E501 - - def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501 - """Create a batch of orders # noqa: E501 - - Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_batch_orders_with_http_info(order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[Order] order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.BatchOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'order', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_batch_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order' is set - if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501 - local_var_params['order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order` when calling `create_batch_orders`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'order' in local_var_params: - body_params = local_var_params['order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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/batch_orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BatchOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_all_open_orders(self, **kwargs): # noqa: E501 - """List all open orders # noqa: E501 - - Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_all_open_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records returned in one page in each currency pair - :param str account: Specify query account. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OpenOrders] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_all_open_orders_with_http_info(**kwargs) # noqa: E501 - - def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501 - """List all open orders # noqa: E501 - - Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_all_open_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records returned in one page in each currency pair - :param str account: Specify query account. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OpenOrders], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'page', - 'limit', - 'account' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_all_open_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_all_open_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - - 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/open_orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OpenOrders]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501 - """close position when cross-currency is disabled # noqa: E501 - - Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cross_liquidate_order(liquidate_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param LiquidateOrder liquidate_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.Order - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_cross_liquidate_order_with_http_info(liquidate_order, **kwargs) # noqa: E501 - - def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs): # noqa: E501 - """close position when cross-currency is disabled # noqa: E501 - - Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cross_liquidate_order_with_http_info(liquidate_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param LiquidateOrder liquidate_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.Order, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'liquidate_order' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_cross_liquidate_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'liquidate_order' is set - if self.api_client.client_side_validation and ('liquidate_order' not in local_var_params or # noqa: E501 - local_var_params['liquidate_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `liquidate_order` when calling `create_cross_liquidate_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'liquidate_order' in local_var_params: - body_params = local_var_params['liquidate_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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/cross_liquidate_orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Order', # noqa: E501 - auth_settings=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_orders(self, currency_pair, status, **kwargs): # noqa: E501 - """List orders # noqa: E501 - - Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_orders(currency_pair, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) - :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) - :param int page: Page number - :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 - :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str side: All bids or asks. Both included if not specified - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_orders_with_http_info(currency_pair, status, **kwargs) # noqa: E501 - - def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: E501 - """List orders # noqa: E501 - - Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_orders_with_http_info(currency_pair, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) - :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) - :param int page: Page number - :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 - :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str side: All bids or asks. Both included if not specified - :param _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.Order], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'status', - 'page', - 'limit', - 'account', - '_from', - 'to', - 'side' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_orders`") # noqa: E501 - # verify the required parameter 'status' is set - if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 - local_var_params['status'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `status` when calling `list_orders`") # noqa: E501 - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_orders`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if '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( - '/spot/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Order]', # noqa: E501 - auth_settings=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_order(self, order, **kwargs): # noqa: E501 - """Create an order # noqa: E501 - - Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_order(order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param Order order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - 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 - - Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_order_with_http_info(order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param Order order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'order', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order' is set - if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501 - local_var_params['order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order` when calling `create_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'order' in local_var_params: - body_params = local_var_params['order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Order', # noqa: E501 - auth_settings=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_orders(self, **kwargs): # noqa: E501 - """Cancel all `open` orders in specified currency pair # noqa: E501 - - When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str side: All bids or asks. Both included if not specified - :param str account: Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OrderCancel] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_orders_with_http_info(**kwargs) # noqa: E501 - - def cancel_orders_with_http_info(self, **kwargs): # noqa: E501 - """Cancel all `open` orders in specified currency pair # noqa: E501 - - When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str side: All bids or asks. Both included if not specified - :param str account: Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OrderCancel], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'side', - 'account', - 'action_mode', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_orders" % k - ) - 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 - 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 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - if 'action_mode' in local_var_params and local_var_params['action_mode'] is not None: # noqa: E501 - query_params.append(('action_mode', local_var_params['action_mode'])) # noqa: E501 - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/spot/orders', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OrderCancel]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 - - Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_batch_orders(cancel_batch_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[CancelBatchOrder] cancel_batch_order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CancelOrderResult] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_batch_orders_with_http_info(cancel_batch_order, **kwargs) # noqa: E501 - - def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 - - Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_batch_orders_with_http_info(cancel_batch_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[CancelBatchOrder] cancel_batch_order: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.CancelOrderResult], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'cancel_batch_order', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_batch_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'cancel_batch_order' is set - if self.api_client.client_side_validation and ('cancel_batch_order' not in local_var_params or # noqa: E501 - local_var_params['cancel_batch_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `cancel_batch_order` when calling `cancel_batch_orders`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'cancel_batch_order' in local_var_params: - body_params = local_var_params['cancel_batch_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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/cancel_batch_orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CancelOrderResult]', # noqa: E501 - auth_settings=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_order(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_order(order_id, currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. (required) - :param str account: Specify query account. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 - - def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 - - By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_order_with_http_info(order_id, currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. (required) - :param str account: Specify query account. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'order_id', - 'currency_pair', - 'account' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_order" % k - ) - 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_order`") # noqa: E501 - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'order_id' in local_var_params: - path_params['order_id'] = local_var_params['order_id'] # noqa: E501 - - query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - - 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/orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Order', # noqa: E501 - auth_settings=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_order(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 - - By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_order(order_id, currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Currency pair (required) - :param str account: Specify query account. - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 - - def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 - - By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_order_with_http_info(order_id, currency_pair, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Currency pair (required) - :param str account: Specify query account. - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'order_id', - 'currency_pair', - 'account', - 'action_mode', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_order" % k - ) - 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_order`") # noqa: E501 - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `cancel_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'order_id' in local_var_params: - path_params['order_id'] = local_var_params['order_id'] # noqa: E501 - - query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - if 'action_mode' in local_var_params and local_var_params['action_mode'] is not None: # noqa: E501 - query_params.append(('action_mode', local_var_params['action_mode'])) # noqa: E501 - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/spot/orders/{order_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Order', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 - - By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.amend_order(order_id, order_patch, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param OrderPatch order_patch: (required) - :param str currency_pair: Currency pair - :param str account: Specify query account. - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.amend_order_with_http_info(order_id, order_patch, **kwargs) # noqa: E501 - - def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 - - By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.amend_order_with_http_info(order_id, order_patch, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param OrderPatch order_patch: (required) - :param str currency_pair: Currency pair - :param str account: Specify query account. - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'order_id', - 'order_patch', - 'currency_pair', - 'account', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method amend_order" % k - ) - 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 `amend_order`") # noqa: E501 - # verify the required parameter 'order_patch' is set - if self.api_client.client_side_validation and ('order_patch' not in local_var_params or # noqa: E501 - local_var_params['order_patch'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_patch` when calling `amend_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'order_id' in local_var_params: - path_params['order_id'] = local_var_params['order_id'] # noqa: E501 - - query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'order_patch' in local_var_params: - body_params = local_var_params['order_patch'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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/orders/{order_id}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Order', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_my_trades(self, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_trades(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param int page: Page number - :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present - :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Trade] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_my_trades_with_http_info(**kwargs) # noqa: E501 - - def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 - - By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_my_trades_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param int page: Page number - :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present - :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Trade], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'limit', - 'page', - 'order_id', - 'account', - '_from', - 'to' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_my_trades" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_trades`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_trades`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_my_trades`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 - query_params.append(('order_id', local_var_params['order_id'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/spot/my_trades', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Trade]', # noqa: E501 - auth_settings=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_system_time(self, **kwargs): # noqa: E501 - """Get server current time # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_system_time(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.SystemTime - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_system_time_with_http_info(**kwargs) # noqa: E501 - - def get_system_time_with_http_info(self, **kwargs): # noqa: E501 - """Get server current time # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_system_time_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.SystemTime, 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_system_time" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/time', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SystemTime', # noqa: E501 - auth_settings=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 countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 - - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.countdown_cancel_all_spot(countdown_cancel_all_spot_task, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CountdownCancelAllSpotTask countdown_cancel_all_spot_task: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.TriggerTime - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, **kwargs) # noqa: E501 - - def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 - - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CountdownCancelAllSpotTask countdown_cancel_all_spot_task: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.TriggerTime, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'countdown_cancel_all_spot_task' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method countdown_cancel_all_spot" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'countdown_cancel_all_spot_task' is set - if self.api_client.client_side_validation and ('countdown_cancel_all_spot_task' not in local_var_params or # noqa: E501 - local_var_params['countdown_cancel_all_spot_task'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `countdown_cancel_all_spot_task` when calling `countdown_cancel_all_spot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'countdown_cancel_all_spot_task' in local_var_params: - body_params = local_var_params['countdown_cancel_all_spot_task'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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/countdown_cancel_all', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TriggerTime', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 - """Batch modification of orders # noqa: E501 - - By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the 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.amend_batch_orders(batch_amend_item, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[BatchAmendItem] batch_amend_item: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.BatchOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.amend_batch_orders_with_http_info(batch_amend_item, **kwargs) # noqa: E501 - - def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa: E501 - """Batch modification of orders # noqa: E501 - - By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the 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.amend_batch_orders_with_http_info(batch_amend_item, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[BatchAmendItem] batch_amend_item: (required) - :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.BatchOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'batch_amend_item', - 'x_gate_exptime' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method amend_batch_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'batch_amend_item' is set - if self.api_client.client_side_validation and ('batch_amend_item' not in local_var_params or # noqa: E501 - local_var_params['batch_amend_item'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `batch_amend_item` when calling `amend_batch_orders`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'x_gate_exptime' in local_var_params: - header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'batch_amend_item' in local_var_params: - body_params = local_var_params['batch_amend_item'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/spot/amend_batch_orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BatchOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): # noqa: E501 - """Query spot insurance fund historical data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_spot_insurance_history(business, currency, _from, to, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str business: Leverage business, margin - position by position; unified - unified account (required) - :param str currency: Currency (required) - :param int _from: Start timestamp, seconds (required) - :param int to: End timestamp, in seconds (required) - :param int page: Page number - :param int limit: The maximum number of items returned in the list, the default value is 30 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.SpotInsuranceHistory] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_spot_insurance_history_with_http_info(business, currency, _from, to, **kwargs) # noqa: E501 - - def get_spot_insurance_history_with_http_info(self, business, currency, _from, to, **kwargs): # noqa: E501 - """Query spot insurance fund historical data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_spot_insurance_history_with_http_info(business, currency, _from, to, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str business: Leverage business, margin - position by position; unified - unified account (required) - :param str currency: Currency (required) - :param int _from: Start timestamp, seconds (required) - :param int to: End timestamp, in seconds (required) - :param int page: Page number - :param int limit: The maximum number of items returned in the list, the default value is 30 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.SpotInsuranceHistory], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'business', - 'currency', - '_from', - 'to', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_spot_insurance_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'business' is set - if self.api_client.client_side_validation and ('business' not in local_var_params or # noqa: E501 - local_var_params['business'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `business` when calling `get_spot_insurance_history`") # noqa: E501 - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_spot_insurance_history`") # noqa: E501 - # verify the required parameter '_from' is set - if self.api_client.client_side_validation and ('_from' not in local_var_params or # noqa: E501 - local_var_params['_from'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_from` when calling `get_spot_insurance_history`") # noqa: E501 - # verify the required parameter 'to' is set - if self.api_client.client_side_validation and ('to' not in local_var_params or # noqa: E501 - local_var_params['to'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `to` when calling `get_spot_insurance_history`") # noqa: E501 - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `get_spot_insurance_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_spot_insurance_history`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_spot_insurance_history`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'business' in local_var_params and local_var_params['business'] is not None: # noqa: E501 - query_params.append(('business', local_var_params['business'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/spot/insurance_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SpotInsuranceHistory]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 - """Retrieve running auto order list # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_spot_price_triggered_orders(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` - :param int limit: Maximum number of records to be 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.SpotPriceTriggeredOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_spot_price_triggered_orders_with_http_info(status, **kwargs) # noqa: E501 - - def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # noqa: E501 - """Retrieve running auto order list # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_spot_price_triggered_orders_with_http_info(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` - :param int limit: Maximum number of records to be 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.SpotPriceTriggeredOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status', - 'market', - 'account', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_spot_price_triggered_orders" % k - ) - 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_price_triggered_orders`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - 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 'market' in local_var_params and local_var_params['market'] is not None: # noqa: E501 - query_params.append(('market', local_var_params['market'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - if '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( - '/spot/price_orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SpotPriceTriggeredOrder]', # noqa: E501 - auth_settings=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_price_triggered_order(self, spot_price_triggered_order, **kwargs): # noqa: E501 - """Create a 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_spot_price_triggered_order(spot_price_triggered_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SpotPriceTriggeredOrder spot_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_spot_price_triggered_order_with_http_info(spot_price_triggered_order, **kwargs) # noqa: E501 - - def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_spot_price_triggered_order_with_http_info(spot_price_triggered_order, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SpotPriceTriggeredOrder spot_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 = [ - 'spot_price_triggered_order' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_spot_price_triggered_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'spot_price_triggered_order' is set - if self.api_client.client_side_validation and ('spot_price_triggered_order' not in local_var_params or # noqa: E501 - local_var_params['spot_price_triggered_order'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `spot_price_triggered_order` when calling `create_spot_price_triggered_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'spot_price_triggered_order' in local_var_params: - body_params = local_var_params['spot_price_triggered_order'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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/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_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 - """Cancel All Price-triggered 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_price_triggered_order_list(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SpotPriceTriggeredOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_spot_price_triggered_order_list_with_http_info(**kwargs) # noqa: E501 - - def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # noqa: E501 - """Cancel All Price-triggered 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_price_triggered_order_list_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` - :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.SpotPriceTriggeredOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'market', - 'account' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_spot_price_triggered_order_list" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'market' in local_var_params and local_var_params['market'] is not None: # noqa: E501 - query_params.append(('market', local_var_params['market'])) # noqa: E501 - if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 - query_params.append(('account', local_var_params['account'])) # noqa: E501 - - 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/price_orders', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SpotPriceTriggeredOrder]', # noqa: E501 - auth_settings=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_price_triggered_order(self, order_id, **kwargs): # noqa: E501 - """Get a 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.get_spot_price_triggered_order(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SpotPriceTriggeredOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 - - def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_spot_price_triggered_order_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _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.SpotPriceTriggeredOrder, 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_price_triggered_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `get_spot_price_triggered_order`") # noqa: E501 - - collection_formats = {} - - 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/price_orders/{order_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SpotPriceTriggeredOrder', # noqa: E501 - auth_settings=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_price_triggered_order(self, order_id, **kwargs): # noqa: E501 - """cancel a 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.cancel_spot_price_triggered_order(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SpotPriceTriggeredOrder - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 - - def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_spot_price_triggered_order_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) - :param _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.SpotPriceTriggeredOrder, 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_price_triggered_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'order_id' is set - if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 - local_var_params['order_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_spot_price_triggered_order`") # noqa: E501 - - collection_formats = {} - - 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/price_orders/{order_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SpotPriceTriggeredOrder', # noqa: E501 - auth_settings=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/sub_account_api.py b/gate_api/api/sub_account_api.py deleted file mode 100644 index 3ab7b07..0000000 --- a/gate_api/api/sub_account_api.py +++ /dev/null @@ -1,1299 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class SubAccountApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_sub_accounts(self, **kwargs): # noqa: E501 - """List sub-accounts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_accounts(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccount] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_sub_accounts_with_http_info(**kwargs) # noqa: E501 - - def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501 - """List sub-accounts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_accounts_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. - :param _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.SubAccount], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_sub_accounts" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/sub_accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccount]', # noqa: E501 - auth_settings=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_sub_accounts(self, sub_account, **kwargs): # noqa: E501 - """Create a new sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_sub_accounts(sub_account, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SubAccount sub_account: (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.SubAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_sub_accounts_with_http_info(sub_account, **kwargs) # noqa: E501 - - def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E501 - """Create a new sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_sub_accounts_with_http_info(sub_account, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SubAccount sub_account: (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.SubAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_account' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_sub_accounts" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'sub_account' is set - if self.api_client.client_side_validation and ('sub_account' not in local_var_params or # noqa: E501 - local_var_params['sub_account'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `sub_account` when calling `create_sub_accounts`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'sub_account' in local_var_params: - body_params = local_var_params['sub_account'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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( - '/sub_accounts', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SubAccount', # noqa: E501 - auth_settings=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_sub_account(self, user_id, **kwargs): # noqa: E501 - """Get the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sub_account(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 - - def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Get the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sub_account_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_sub_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `get_sub_account`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_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( - '/sub_accounts/{user_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SubAccount', # noqa: E501 - auth_settings=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_sub_account_keys(self, user_id, **kwargs): # noqa: E501 - """List all API Key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_keys(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountKey] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_sub_account_keys_with_http_info(user_id, **kwargs) # noqa: E501 - - def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 - """List all API Key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_keys_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountKey], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_sub_account_keys" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `list_sub_account_keys`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_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( - '/sub_accounts/{user_id}/keys', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccountKey]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: E501 - """Create API Key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_sub_account_keys(user_id, sub_account_key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param SubAccountKey sub_account_key: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountKey] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_sub_account_keys_with_http_info(user_id, sub_account_key, **kwargs) # noqa: E501 - - def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwargs): # noqa: E501 - """Create API Key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_sub_account_keys_with_http_info(user_id, sub_account_key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param SubAccountKey sub_account_key: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountKey], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id', - 'sub_account_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_sub_account_keys" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `create_sub_account_keys`") # noqa: E501 - # verify the required parameter 'sub_account_key' is set - if self.api_client.client_side_validation and ('sub_account_key' not in local_var_params or # noqa: E501 - local_var_params['sub_account_key'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `sub_account_key` when calling `create_sub_account_keys`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'sub_account_key' in local_var_params: - body_params = local_var_params['sub_account_key'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # 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( - '/sub_accounts/{user_id}/keys', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccountKey]', # noqa: E501 - auth_settings=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_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 - """Get the API Key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sub_account_key(user_id, key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountKey - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_sub_account_key_with_http_info(user_id, key, **kwargs) # noqa: E501 - - def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E501 - """Get the API Key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sub_account_key_with_http_info(user_id, key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) - :param _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.SubAccountKey, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id', - 'key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_sub_account_key" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `get_sub_account_key`") # noqa: E501 - # verify the required parameter 'key' is set - if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 - local_var_params['key'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `key` when calling `get_sub_account_key`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_id'] # noqa: E501 - if 'key' in local_var_params: - path_params['key'] = local_var_params['key'] # 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( - '/sub_accounts/{user_id}/keys/{key}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='SubAccountKey', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 - """Update API key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_sub_account_keys(user_id, key, sub_account_key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) - :param SubAccountKey sub_account_key: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_sub_account_keys_with_http_info(user_id, key, sub_account_key, **kwargs) # noqa: E501 - - def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 - """Update API key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_sub_account_keys_with_http_info(user_id, key, sub_account_key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) - :param SubAccountKey sub_account_key: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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 = [ - 'user_id', - 'key', - 'sub_account_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_sub_account_keys" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `update_sub_account_keys`") # noqa: E501 - # verify the required parameter 'key' is set - if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 - local_var_params['key'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `key` when calling `update_sub_account_keys`") # noqa: E501 - # verify the required parameter 'sub_account_key' is set - if self.api_client.client_side_validation and ('sub_account_key' not in local_var_params or # noqa: E501 - local_var_params['sub_account_key'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `sub_account_key` when calling `update_sub_account_keys`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_id'] # noqa: E501 - if 'key' in local_var_params: - path_params['key'] = local_var_params['key'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'sub_account_key' in local_var_params: - body_params = local_var_params['sub_account_key'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/sub_accounts/{user_id}/keys/{key}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 - """Delete API key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_sub_account_keys(user_id, key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.delete_sub_account_keys_with_http_info(user_id, key, **kwargs) # noqa: E501 - - def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noqa: E501 - """Delete API key of the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_sub_account_keys_with_http_info(user_id, key, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) - :param _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 = [ - 'user_id', - 'key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_sub_account_keys" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `delete_sub_account_keys`") # noqa: E501 - # verify the required parameter 'key' is set - if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 - local_var_params['key'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `key` when calling `delete_sub_account_keys`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_id'] # noqa: E501 - if 'key' in local_var_params: - path_params['key'] = local_var_params['key'] # noqa: E501 - - 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( - '/sub_accounts/{user_id}/keys/{key}', 'DELETE', - 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 lock_sub_account(self, user_id, **kwargs): # noqa: E501 - """Lock the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lock_sub_account(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.lock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 - - def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Lock the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lock_sub_account_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method lock_sub_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `lock_sub_account`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_id'] # noqa: E501 - - 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( - '/sub_accounts/{user_id}/lock', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 - """Unlock the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unlock_sub_account(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.unlock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 - - def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Unlock the sub-account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unlock_sub_account_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method unlock_sub_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `unlock_sub_account`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['user_id'] = local_var_params['user_id'] # noqa: E501 - - 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( - '/sub_accounts/{user_id}/unlock', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_unified_mode(self, **kwargs): # noqa: E501 - """Get sub-account mode # noqa: E501 - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_mode(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.SubUserMode] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_unified_mode_with_http_info(**kwargs) # noqa: E501 - - def list_unified_mode_with_http_info(self, **kwargs): # noqa: E501 - """Get sub-account mode # noqa: E501 - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_mode_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.SubUserMode], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_unified_mode" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/sub_accounts/unified_mode', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubUserMode]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py deleted file mode 100644 index 7e025c3..0000000 --- a/gate_api/api/unified_api.py +++ /dev/null @@ -1,2347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class UnifiedApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_unified_accounts(self, **kwargs): # noqa: E501 - """Get unified account information # noqa: E501 - - The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_accounts(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param str sub_uid: Sub account user ID - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_unified_accounts_with_http_info(**kwargs) # noqa: E501 - - def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Get unified account information # noqa: E501 - - The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_accounts_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param str sub_uid: Sub account user ID - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'sub_uid' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_unified_accounts" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 - query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedAccount', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 - """Query about the maximum borrowing for the unified account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_borrowable(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedBorrowable - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_unified_borrowable_with_http_info(currency, **kwargs) # noqa: E501 - - def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query about the maximum borrowing for the unified account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_borrowable_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedBorrowable, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_unified_borrowable" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_unified_borrowable`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/borrowable', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedBorrowable', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_unified_transferable(self, currency, **kwargs): # noqa: E501 - """Query about the maximum transferable for the unified account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_transferable(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedTransferable - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_unified_transferable_with_http_info(currency, **kwargs) # noqa: E501 - - def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query about the maximum transferable for the unified account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_transferable_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedTransferable, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_unified_transferable" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_unified_transferable`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/transferable', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedTransferable', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_unified_transferables(self, currencies, **kwargs): # noqa: E501 - """Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_transferables(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.TransferablesResult] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_unified_transferables_with_http_info(currencies, **kwargs) # noqa: E501 - - def get_unified_transferables_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_transferables_with_http_info(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.TransferablesResult], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currencies' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_unified_transferables" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_transferables`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/transferables', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[TransferablesResult]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_unified_loans(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_loans(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param str type: Loan type, platform - platform, margin - margin - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniLoan] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_unified_loans_with_http_info(**kwargs) # noqa: E501 - - def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_loans_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param str type: Loan type, platform - platform, margin - margin - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_unified_loans" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loans`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loans`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loans`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/loans', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLoan]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_unified_loan(self, unified_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 - - When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_unified_loan(unified_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedLoan unified_loan: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedLoanResult - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_unified_loan_with_http_info(unified_loan, **kwargs) # noqa: E501 - - def create_unified_loan_with_http_info(self, unified_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 - - When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_unified_loan_with_http_info(unified_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedLoan unified_loan: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedLoanResult, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'unified_loan' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_unified_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'unified_loan' is set - if self.api_client.client_side_validation and ('unified_loan' not in local_var_params or # noqa: E501 - local_var_params['unified_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `unified_loan` when calling `create_unified_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'unified_loan' in local_var_params: - body_params = local_var_params['unified_loan'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/loans', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedLoanResult', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_unified_loan_records(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_loan_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UnifiedLoanRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_unified_loan_records_with_http_info(**kwargs) # noqa: E501 - - def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_loan_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UnifiedLoanRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'type', - 'currency', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_unified_loan_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/loan_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UnifiedLoanRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_loan_interest_records(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UniLoanInterestRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_unified_loan_interest_records_with_http_info(**kwargs) # noqa: E501 - - def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_loan_interest_records_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit', - '_from', - 'to', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_unified_loan_interest_records" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_interest_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/interest_records', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UniLoanInterestRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_unified_risk_units(self, **kwargs): # noqa: E501 - """Get user risk unit details # noqa: E501 - - Retrieve user risk unit details, only valid in portfolio margin mode # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_risk_units(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedRiskUnits - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_unified_risk_units_with_http_info(**kwargs) # noqa: E501 - - def get_unified_risk_units_with_http_info(self, **kwargs): # noqa: E501 - """Get user risk unit details # noqa: E501 - - Retrieve user risk unit details, only valid in portfolio margin mode # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_risk_units_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedRiskUnits, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_unified_risk_units" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/risk_units', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedRiskUnits', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_unified_mode(self, **kwargs): # noqa: E501 - """Query mode of the unified account # noqa: E501 - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_mode(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedModeSet - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_unified_mode_with_http_info(**kwargs) # noqa: E501 - - def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 - """Query mode of the unified account # noqa: E501 - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_mode_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedModeSet, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_unified_mode" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/unified_mode', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedModeSet', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 - """Set mode of the unified account # noqa: E501 - - Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_unified_mode(unified_mode_set, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedModeSet unified_mode_set: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_unified_mode_with_http_info(unified_mode_set, **kwargs) # noqa: E501 - - def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: E501 - """Set mode of the unified account # noqa: E501 - - Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_unified_mode_with_http_info(unified_mode_set, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedModeSet unified_mode_set: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'unified_mode_set' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_unified_mode" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'unified_mode_set' is set - if self.api_client.client_side_validation and ('unified_mode_set' not in local_var_params or # noqa: E501 - local_var_params['unified_mode_set'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `unified_mode_set` when calling `set_unified_mode`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'unified_mode_set' in local_var_params: - body_params = local_var_params['unified_mode_set'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/unified_mode', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_unified_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Get unified estimate rate # noqa: E501 - - Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_estimate_rate(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: dict - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_unified_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 - - def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Get unified estimate rate # noqa: E501 - - Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_unified_estimate_rate_with_http_info(currencies, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currencies' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_unified_estimate_rate" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_estimate_rate`") # noqa: E501 - - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) > 10): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) < 1): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - collection_formats['currencies'] = 'multi' # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/estimate_rate', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='dict(str, str)', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_currency_discount_tiers(self, **kwargs): # noqa: E501 - """List currency discount tiers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_currency_discount_tiers(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UnifiedDiscount] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_currency_discount_tiers_with_http_info(**kwargs) # noqa: E501 - - def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501 - """List currency discount tiers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_currency_discount_tiers_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UnifiedDiscount], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_currency_discount_tiers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/unified/currency_discount_tiers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UnifiedDiscount]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_loan_margin_tiers(self, **kwargs): # noqa: E501 - """List loan margin tiers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_loan_margin_tiers(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UnifiedMarginTiers] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_loan_margin_tiers_with_http_info(**kwargs) # noqa: E501 - - def list_loan_margin_tiers_with_http_info(self, **kwargs): # noqa: E501 - """List loan margin tiers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_loan_margin_tiers_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UnifiedMarginTiers], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_loan_margin_tiers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/unified/loan_margin_tiers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UnifiedMarginTiers]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def calculate_portfolio_margin(self, unified_portfolio_input, **kwargs): # noqa: E501 - """Portfolio margin calculator # noqa: E501 - - Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.calculate_portfolio_margin(unified_portfolio_input, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedPortfolioInput unified_portfolio_input: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedPortfolioOutput - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.calculate_portfolio_margin_with_http_info(unified_portfolio_input, **kwargs) # noqa: E501 - - def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **kwargs): # noqa: E501 - """Portfolio margin calculator # noqa: E501 - - Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.calculate_portfolio_margin_with_http_info(unified_portfolio_input, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedPortfolioInput unified_portfolio_input: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedPortfolioOutput, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'unified_portfolio_input' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method calculate_portfolio_margin" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'unified_portfolio_input' is set - if self.api_client.client_side_validation and ('unified_portfolio_input' not in local_var_params or # noqa: E501 - local_var_params['unified_portfolio_input'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `unified_portfolio_input` when calling `calculate_portfolio_margin`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'unified_portfolio_input' in local_var_params: - body_params = local_var_params['unified_portfolio_input'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/unified/portfolio_calculator', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedPortfolioOutput', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 - """Minimum currency leverage that can be set # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_leverage_currency_config(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedLeverageConfig - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_leverage_currency_config_with_http_info(currency, **kwargs) # noqa: E501 - - def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): # noqa: E501 - """Minimum currency leverage that can be set # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_leverage_currency_config_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedLeverageConfig, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_leverage_currency_config" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_user_leverage_currency_config`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/leverage/user_currency_config', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedLeverageConfig', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501 - """Get the leverage multiple of the user currency # noqa: E501 - - Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_leverage_currency_setting(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedLeverageSetting - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_leverage_currency_setting_with_http_info(**kwargs) # noqa: E501 - - def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: E501 - """Get the leverage multiple of the user currency # noqa: E501 - - Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_leverage_currency_setting_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedLeverageSetting, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_leverage_currency_setting" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/leverage/user_currency_setting', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedLeverageSetting', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def set_user_leverage_currency_setting(self, unified_leverage_setting, **kwargs): # noqa: E501 - """Set the loan currency leverage # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_user_leverage_currency_setting(unified_leverage_setting, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedLeverageSetting unified_leverage_setting: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, **kwargs) # noqa: E501 - - def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_setting, **kwargs): # noqa: E501 - """Set the loan currency leverage # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UnifiedLeverageSetting unified_leverage_setting: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'unified_leverage_setting' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_user_leverage_currency_setting" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'unified_leverage_setting' is set - if self.api_client.client_side_validation and ('unified_leverage_setting' not in local_var_params or # noqa: E501 - local_var_params['unified_leverage_setting'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `unified_leverage_setting` when calling `set_user_leverage_currency_setting`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'unified_leverage_setting' in local_var_params: - body_params = local_var_params['unified_leverage_setting'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/leverage/user_currency_setting', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_unified_currencies(self, **kwargs): # noqa: E501 - """List of loan currencies supported by unified account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UnifiedCurrency] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_unified_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List of loan currencies supported by unified account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_unified_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UnifiedCurrency], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_unified_currencies" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/unified/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UnifiedCurrency]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 - """get historical lending rates # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_history_loan_rate(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str tier: The VIP level of the floating rate that needs to be queried - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UnifiedHistoryLoanRate - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_history_loan_rate_with_http_info(currency, **kwargs) # noqa: E501 - - def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E501 - """get historical lending rates # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_history_loan_rate_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str tier: The VIP level of the floating rate that needs to be queried - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedHistoryLoanRate, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'tier', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_history_loan_rate" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_history_loan_rate`") # noqa: E501 - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `get_history_loan_rate`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_history_loan_rate`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_history_loan_rate`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'tier' in local_var_params and local_var_params['tier'] is not None: # noqa: E501 - query_params.append(('tier', local_var_params['tier'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/unified/history_loan_rate', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnifiedHistoryLoanRate', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py deleted file mode 100644 index 3343d4c..0000000 --- a/gate_api/api/wallet_api.py +++ /dev/null @@ -1,2511 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class WalletApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_currency_chains(self, currency, **kwargs): # noqa: E501 - """List chains supported for specified currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_currency_chains(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CurrencyChain] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_currency_chains_with_http_info(currency, **kwargs) # noqa: E501 - - def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 - """List chains supported for specified currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_currency_chains_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CurrencyChain], 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_currency_chains" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `list_currency_chains`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/wallet/currency_chains', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CurrencyChain]', # noqa: E501 - auth_settings=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_deposit_address(self, currency, **kwargs): # noqa: E501 - """Generate currency deposit 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.get_deposit_address(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.DepositAddress - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_deposit_address_with_http_info(currency, **kwargs) # noqa: E501 - - def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 - """Generate currency deposit 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.get_deposit_address_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.DepositAddress, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_deposit_address" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_deposit_address`") # noqa: E501 - - collection_formats = {} - - 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( - '/wallet/deposit_address', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DepositAddress', # noqa: E501 - auth_settings=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_withdrawals(self, **kwargs): # noqa: E501 - """Retrieve withdrawal records # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_withdrawals(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.WithdrawalRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_withdrawals_with_http_info(**kwargs) # noqa: E501 - - def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve withdrawal records # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_withdrawals_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.WithdrawalRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_withdrawals" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_withdrawals`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if '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( - '/wallet/withdrawals', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[WithdrawalRecord]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_deposits(self, **kwargs): # noqa: E501 - """Retrieve deposit records # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_deposits(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. - :param int offset: List offset, starting from 0 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.LedgerRecord] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_deposits_with_http_info(**kwargs) # noqa: E501 - - def list_deposits_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve deposit records # noqa: E501 - - Record time range cannot exceed 30 days # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_deposits_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. - :param int offset: List offset, starting from 0 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.LedgerRecord], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_deposits" % k - ) - 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'] > 500: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_deposits`, must be a value less than or equal to `500`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_deposits`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_deposits`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if '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( - '/wallet/deposits', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[LedgerRecord]', # noqa: E501 - auth_settings=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 - - Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.transfer(transfer, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param Transfer transfer: (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.TransactionID - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.transfer_with_http_info(transfer, **kwargs) # noqa: E501 - - def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501 - """Transfer between trading accounts # noqa: E501 - - Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.transfer_with_http_info(transfer, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param Transfer transfer: (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.TransactionID, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'transfer' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method transfer" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'transfer' is set - if self.api_client.client_side_validation and ('transfer' not in local_var_params or # noqa: E501 - local_var_params['transfer'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `transfer` when calling `transfer`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'transfer' in local_var_params: - body_params = local_var_params['transfer'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/transfers', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TransactionID', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_sub_account_transfers(self, **kwargs): # noqa: E501 - """Retrieve transfer records between main and sub accounts # noqa: E501 - - Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_transfers(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.SubAccountTransfer] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_sub_account_transfers_with_http_info(**kwargs) # noqa: E501 - - def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve transfer records between main and sub accounts # noqa: E501 - - Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_transfers_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param 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.SubAccountTransfer], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_uid', - '_from', - 'to', - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_sub_account_transfers" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_sub_account_transfers`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 - query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/sub_account_transfers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccountTransfer]', # noqa: E501 - auth_settings=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_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E501 - """Transfer between main and sub accounts # noqa: E501 - - Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.transfer_with_sub_account(sub_account_transfer, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SubAccountTransfer sub_account_transfer: (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.TransactionID - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.transfer_with_sub_account_with_http_info(sub_account_transfer, **kwargs) # noqa: E501 - - def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwargs): # noqa: E501 - """Transfer between main and sub accounts # noqa: E501 - - Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.transfer_with_sub_account_with_http_info(sub_account_transfer, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SubAccountTransfer sub_account_transfer: (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.TransactionID, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_account_transfer' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method transfer_with_sub_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'sub_account_transfer' is set - if self.api_client.client_side_validation and ('sub_account_transfer' not in local_var_params or # noqa: E501 - local_var_params['sub_account_transfer'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `sub_account_transfer` when calling `transfer_with_sub_account`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'sub_account_transfer' in local_var_params: - body_params = local_var_params['sub_account_transfer'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/sub_account_transfers', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TransactionID', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # noqa: E501 - """Sub-account transfers to sub-account # noqa: E501 - - It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.sub_account_to_sub_account(sub_account_to_sub_account, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SubAccountToSubAccount sub_account_to_sub_account: (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.TransactionID - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, **kwargs) # noqa: E501 - - def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account, **kwargs): # noqa: E501 - """Sub-account transfers to sub-account # noqa: E501 - - It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param SubAccountToSubAccount sub_account_to_sub_account: (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.TransactionID, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_account_to_sub_account' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method sub_account_to_sub_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'sub_account_to_sub_account' is set - if self.api_client.client_side_validation and ('sub_account_to_sub_account' not in local_var_params or # noqa: E501 - local_var_params['sub_account_to_sub_account'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `sub_account_to_sub_account` when calling `sub_account_to_sub_account`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'sub_account_to_sub_account' in local_var_params: - body_params = local_var_params['sub_account_to_sub_account'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/sub_account_to_sub_account', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TransactionID', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_transfer_order_status(self, **kwargs): # noqa: E501 - """Transfer status query # noqa: E501 - - Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_transfer_order_status(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str client_order_id: The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. - :param str tx_id: The transfer operation number and client_order_id cannot be empty at the same time - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.TransferOrderStatus - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_transfer_order_status_with_http_info(**kwargs) # noqa: E501 - - def get_transfer_order_status_with_http_info(self, **kwargs): # noqa: E501 - """Transfer status query # noqa: E501 - - Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_transfer_order_status_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str client_order_id: The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. - :param str tx_id: The transfer operation number and client_order_id cannot be empty at the same time - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.TransferOrderStatus, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'client_order_id', - 'tx_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_transfer_order_status" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'client_order_id' in local_var_params and local_var_params['client_order_id'] is not None: # noqa: E501 - query_params.append(('client_order_id', local_var_params['client_order_id'])) # noqa: E501 - if 'tx_id' in local_var_params and local_var_params['tx_id'] is not None: # noqa: E501 - query_params.append(('tx_id', local_var_params['tx_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/order_status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TransferOrderStatus', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_withdraw_status(self, **kwargs): # noqa: E501 - """Retrieve withdrawal status # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_withdraw_status(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.WithdrawStatus] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_withdraw_status_with_http_info(**kwargs) # noqa: E501 - - def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve withdrawal status # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_withdraw_status_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param _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.WithdrawStatus], 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_withdraw_status" % 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( - '/wallet/withdraw_status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[WithdrawStatus]', # noqa: E501 - auth_settings=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_sub_account_balances(self, **kwargs): # noqa: E501 - """Retrieve sub account balances # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_balances(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountBalance] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_sub_account_balances_with_http_info(**kwargs) # noqa: E501 - - def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve sub account balances # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_balances_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param _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.SubAccountBalance], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_uid' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_sub_account_balances" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 - query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 - - 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/sub_account_balances', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccountBalance]', # noqa: E501 - auth_settings=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_sub_account_margin_balances(self, **kwargs): # noqa: E501 - """Query sub accounts' margin balances # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_margin_balances(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountMarginBalance] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_sub_account_margin_balances_with_http_info(**kwargs) # noqa: E501 - - def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query sub accounts' margin balances # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_margin_balances_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param _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.SubAccountMarginBalance], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_uid' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_sub_account_margin_balances" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 - query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 - - 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/sub_account_margin_balances', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccountMarginBalance]', # noqa: E501 - auth_settings=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_sub_account_futures_balances(self, **kwargs): # noqa: E501 - """Query sub accounts' futures account balances # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_futures_balances(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param str settle: Query only balances of specified settle currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.SubAccountFuturesBalance] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_sub_account_futures_balances_with_http_info(**kwargs) # noqa: E501 - - def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query sub accounts' futures account balances # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_futures_balances_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param str settle: Query only balances of specified settle currency - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.SubAccountFuturesBalance], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_uid', - 'settle' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_sub_account_futures_balances" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 - query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 - if 'settle' in local_var_params and local_var_params['settle'] is not None: # noqa: E501 - query_params.append(('settle', local_var_params['settle'])) # 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/sub_account_futures_balances', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccountFuturesBalance]', # noqa: E501 - auth_settings=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_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501 - """Query subaccount's cross_margin account info # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_cross_margin_balances(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.SubAccountCrossMarginBalance] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_sub_account_cross_margin_balances_with_http_info(**kwargs) # noqa: E501 - - def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query subaccount's cross_margin account info # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_sub_account_cross_margin_balances_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param _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.SubAccountCrossMarginBalance], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sub_uid' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_sub_account_cross_margin_balances" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 - query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 - - 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/sub_account_cross_margin_balances', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SubAccountCrossMarginBalance]', # noqa: E501 - auth_settings=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_saved_address(self, currency, **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) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str chain: Chain name - :param str limit: Maximum number returned, 100 at most - :param int page: Page number - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.SavedAddress] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_saved_address_with_http_info(currency, **kwargs) # noqa: E501 - - def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query saved address # noqa: E501 - - 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) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str chain: Chain name - :param str limit: Maximum number returned, 100 at most - :param int page: Page number - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.SavedAddress], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'chain', - 'limit', - 'page' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_saved_address" % k - ) - 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 - 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 '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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/saved_address', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SavedAddress]', # noqa: E501 - auth_settings=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_trade_fee(self, **kwargs): # noqa: E501 - """Retrieve personal trading fee # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_trade_fee(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs - :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.TradeFee - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_trade_fee_with_http_info(**kwargs) # noqa: E501 - - def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve personal trading fee # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_trade_fee_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs - :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. - :param _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.TradeFee, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency_pair', - 'settle' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_trade_fee" % k - ) - 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 - if 'settle' in local_var_params and local_var_params['settle'] is not None: # noqa: E501 - query_params.append(('settle', local_var_params['settle'])) # 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/fee', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TradeFee', # noqa: E501 - auth_settings=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_total_balance(self, **kwargs): # noqa: E501 - """Retrieve user's total balances # noqa: E501 - - This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_total_balance(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.TotalBalance - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_total_balance_with_http_info(**kwargs) # noqa: E501 - - def get_total_balance_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user's total balances # noqa: E501 - - This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_total_balance_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. - :param _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.TotalBalance, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_total_balance" % 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( - '/wallet/total_balance', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TotalBalance', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_small_balance(self, **kwargs): # noqa: E501 - """List small balance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_small_balance(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.SmallBalance] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_small_balance_with_http_info(**kwargs) # noqa: E501 - - def list_small_balance_with_http_info(self, **kwargs): # noqa: E501 - """List small balance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_small_balance_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.SmallBalance], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_small_balance" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/small_balance', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SmallBalance]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def convert_small_balance(self, convert_small_balance, **kwargs): # noqa: E501 - """Convert small balance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.convert_small_balance(convert_small_balance, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param ConvertSmallBalance convert_small_balance: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.convert_small_balance_with_http_info(convert_small_balance, **kwargs) # noqa: E501 - - def convert_small_balance_with_http_info(self, convert_small_balance, **kwargs): # noqa: E501 - """Convert small balance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.convert_small_balance_with_http_info(convert_small_balance, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param ConvertSmallBalance convert_small_balance: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'convert_small_balance' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method convert_small_balance" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'convert_small_balance' is set - if self.api_client.client_side_validation and ('convert_small_balance' not in local_var_params or # noqa: E501 - local_var_params['convert_small_balance'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `convert_small_balance` when calling `convert_small_balance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'convert_small_balance' in local_var_params: - body_params = local_var_params['convert_small_balance'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/small_balance', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_small_balance_history(self, **kwargs): # noqa: E501 - """List small balance history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_small_balance_history(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.SmallBalanceHistory] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_small_balance_history_with_http_info(**kwargs) # noqa: E501 - - def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 - """List small balance history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_small_balance_history_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.SmallBalanceHistory], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_small_balance_history" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_small_balance_history`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_small_balance_history`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_small_balance_history`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/small_balance_history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[SmallBalanceHistory]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_push_orders(self, **kwargs): # noqa: E501 - """Retrieve the UID transfer history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_push_orders(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int id: Order ID - :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp - :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. - :param int limit: The maximum number of items returned in the list, the default value is 100 - :param int offset: List offset, starting from 0 - :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.UidPushOrder] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_push_orders_with_http_info(**kwargs) # noqa: E501 - - def list_push_orders_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve the UID transfer history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_push_orders_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int id: Order ID - :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp - :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. - :param int limit: The maximum number of items returned in the list, the default value is 100 - :param int offset: List offset, starting from 0 - :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.UidPushOrder], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'id', - '_from', - 'to', - 'limit', - 'offset', - 'transaction_type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_push_orders" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_push_orders`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_push_orders`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'id' in local_var_params and local_var_params['id'] is not None: # noqa: E501 - query_params.append(('id', local_var_params['id'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'transaction_type' in local_var_params and local_var_params['transaction_type'] is not None: # noqa: E501 - query_params.append(('transaction_type', local_var_params['transaction_type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/wallet/push', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UidPushOrder]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py deleted file mode 100644 index 318623a..0000000 --- a/gate_api/api/withdrawal_api.py +++ /dev/null @@ -1,385 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class WithdrawalApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def withdraw(self, ledger_record, **kwargs): # noqa: E501 - """Withdraw # noqa: E501 - - Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraw(ledger_record, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param LedgerRecord ledger_record: (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.LedgerRecord - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.withdraw_with_http_info(ledger_record, **kwargs) # noqa: E501 - - def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501 - """Withdraw # noqa: E501 - - Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraw_with_http_info(ledger_record, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param LedgerRecord ledger_record: (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.LedgerRecord, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'ledger_record' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method withdraw" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'ledger_record' is set - if self.api_client.client_side_validation and ('ledger_record' not in local_var_params or # noqa: E501 - local_var_params['ledger_record'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `ledger_record` when calling `withdraw`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'ledger_record' in local_var_params: - body_params = local_var_params['ledger_record'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/withdrawals', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='LedgerRecord', # noqa: E501 - auth_settings=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 withdraw_push_order(self, uid_push_withdrawal, **kwargs): # noqa: E501 - """UID transfer # noqa: E501 - - Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraw_push_order(uid_push_withdrawal, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UidPushWithdrawal uid_push_withdrawal: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.UidPushWithdrawalResp - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.withdraw_push_order_with_http_info(uid_push_withdrawal, **kwargs) # noqa: E501 - - def withdraw_push_order_with_http_info(self, uid_push_withdrawal, **kwargs): # noqa: E501 - """UID transfer # noqa: E501 - - Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.withdraw_push_order_with_http_info(uid_push_withdrawal, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UidPushWithdrawal uid_push_withdrawal: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.UidPushWithdrawalResp, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'uid_push_withdrawal' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method withdraw_push_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'uid_push_withdrawal' is set - if self.api_client.client_side_validation and ('uid_push_withdrawal' not in local_var_params or # noqa: E501 - local_var_params['uid_push_withdrawal'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `uid_push_withdrawal` when calling `withdraw_push_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'uid_push_withdrawal' in local_var_params: - body_params = local_var_params['uid_push_withdrawal'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/withdrawals/push', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UidPushWithdrawalResp', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def cancel_withdrawal(self, withdrawal_id, **kwargs): # noqa: E501 - """Cancel withdrawal with specified ID # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_withdrawal(withdrawal_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str withdrawal_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.LedgerRecord - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_withdrawal_with_http_info(withdrawal_id, **kwargs) # noqa: E501 - - def cancel_withdrawal_with_http_info(self, withdrawal_id, **kwargs): # noqa: E501 - """Cancel withdrawal with specified 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.cancel_withdrawal_with_http_info(withdrawal_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str withdrawal_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.LedgerRecord, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'withdrawal_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel_withdrawal" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'withdrawal_id' is set - if self.api_client.client_side_validation and ('withdrawal_id' not in local_var_params or # noqa: E501 - local_var_params['withdrawal_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `withdrawal_id` when calling `cancel_withdrawal`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'withdrawal_id' in local_var_params: - path_params['withdrawal_id'] = local_var_params['withdrawal_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( - '/withdrawals/{withdrawal_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='LedgerRecord', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/gate_api/api_client.py b/gate_api/api_client.py deleted file mode 100644 index b0d5c9d..0000000 --- a/gate_api/api_client.py +++ /dev/null @@ -1,707 +0,0 @@ -# coding: utf-8 -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import - -import atexit -import datetime -import hashlib -import hmac -import time -from six.moves.urllib.parse import unquote_plus, urlencode, urlparse - -from dateutil.parser import parse -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from gate_api.configuration import Configuration -import gate_api.models -from gate_api import rest -from gate_api.exceptions import ApiValueError, ApiException, GateApiException - - -class ApiClient(object): - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): - if configuration is None: - configuration = Configuration.get_default_copy() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/6.96.0/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # auth setting - self.update_params_for_auth(method, url, header_params, query_params, body, auth_settings) - - try: - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - except ApiException as e: - e.body = e.body.decode('utf-8') if six.PY3 else e.body - try: - err = json.loads(e.body) - except ValueError: - raise e - else: - if not err.get('label'): - raise e - raise GateApiException(err.get('label'), err.get('message'), err.get('detail'), e) - - content_type = response_data.getheader('content-type') - - self.last_response = response_data - - return_data = response_data - - if not _preload_content: - return return_data - - if six.PY3 and response_type not in ["file", "bytes"]: - match = None - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return return_data - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.openapi_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(gate_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param list post_params: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param list auth_settings: Auth Settings names for the request. - :param response_type: Response data type. - :param dict files: key -> filename, value -> filepath, - for `multipart/form-data`. - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _host: server/host defined in path or operation instead - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, method, url, headers, querys, body, auth_settings): - """Updates header and query params based on authentication setting. - - :param method: Request method - :param url: Request path, host included - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param body: Request body - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if auth_setting['type'] == 'apiv4': - auth_headers = self.gen_sign(method, urlparse(url).path, unquote_plus(urlencode(querys)), body) - headers.update(auth_headers) - continue - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def gen_sign(self, method, url, query_string=None, body=None): - """generate authentication headers - - :param method: http request method - :param url: http resource path - :param query_string: query string - :param body: request body - :return: signature headers - """ - t = time.time() - m = hashlib.sha512() - if body is not None: - if not isinstance(body, six.string_types): - body = json.dumps(body) - m.update(body.encode('utf-8')) - hashed_payload = m.hexdigest() - s = '%s\n%s\n%s\n%s\n%s' % (method, url, query_string or "", hashed_payload, t) - sign = hmac.new(self.configuration.secret.encode('utf-8'), s.encode('utf-8'), - hashlib.sha512).hexdigest() - return {'KEY': self.configuration.key, 'Timestamp': str(t), 'SIGN': sign} - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - has_discriminator = False - if (hasattr(klass, 'get_real_child_model') - and klass.discriminator_value_class_map): - has_discriminator = True - - if not klass.openapi_types and has_discriminator is False: - return data - - kwargs = {} - if (data is not None and - klass.openapi_types is not None and - isinstance(data, (list, dict))): - for attr, attr_type in six.iteritems(klass.openapi_types): - if klass.attribute_map[attr] in data: - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if has_discriminator: - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/gate_api/configuration.py b/gate_api/configuration.py deleted file mode 100644 index 41fd6db..0000000 --- a/gate_api/configuration.py +++ /dev/null @@ -1,369 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param key: APIv4 key - :param secret: APIv4 secret - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - - :Example: - - You can set the APIv4 key and secret like: - -conf = gate_api.Configuration( - key='example_key' - secret='example_secret' -) - - The following headers will be added to the HTTP request: - KEY: example_key - SIGN: generated_signature_using_example_secret - Timestamp: request_timestamp - """ - - _default = None - - def __init__(self, host="https://api.gateio.ws/api/v4", - key=None, secret=None, - username=None, password=None, - discard_unknown_keys=False, - ): - """Constructor - """ - self.host = host - """Default Base url - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - # Init APIv4 authentication key and secret - self.key = key - """API key for APIv4 authentication - """ - self.secret = secret - """API secret for APIv4 authentication - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("gate_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Disable client side validation - self.client_side_validation = True - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :return: The logger_file path. - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :return: The debug status, True or False. - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :return: The format string. - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.key is not None and self.secret is not None: - auth['apiv4'] = { - 'type': 'apiv4', - 'in': 'header', - 'key': 'SIGN', - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 4.96.0\n"\ - "SDK Package Version: 6.96.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.gateio.ws/api/v4", - 'description': "Real Trading", - }, - { - 'url': "https://fx-api-testnet.gateio.ws/api/v4", - 'description': "TestNet Trading", - } - ] - - def get_host_from_settings(self, index, variables=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :return: URL based on host settings - """ - variables = {} if variables is None else variables - servers = self.get_host_settings() - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server['variables'].items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py deleted file mode 100644 index e890184..0000000 --- a/gate_api/exceptions.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import six - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -class GateApiException(ApiException): - def __init__(self, label=None, message=None, detail=None, exp=None): - """Init GateApiException from ApiException - - :param str label: error label parsed - :param str message: error message parsed - :param str detail: possible error message parsed - :param ApiException exp: parent exception - """ - self.label = label - self.message = detail if detail else message - self.status = exp.status - self.reason = exp.reason - self.body = exp.body - self.headers = exp.headers - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, six.integer_types): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py deleted file mode 100644 index 508e320..0000000 --- a/gate_api/models/__init__.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import models into model package -from gate_api.models.account_balance import AccountBalance -from gate_api.models.account_detail import AccountDetail -from gate_api.models.account_detail_key import AccountDetailKey -from gate_api.models.account_rate_limit import AccountRateLimit -from gate_api.models.agency_commission import AgencyCommission -from gate_api.models.agency_commission_history import AgencyCommissionHistory -from gate_api.models.agency_transaction import AgencyTransaction -from gate_api.models.agency_transaction_history import AgencyTransactionHistory -from gate_api.models.auto_repay_setting import AutoRepaySetting -from gate_api.models.batch_amend_item import BatchAmendItem -from gate_api.models.batch_amend_order_req import BatchAmendOrderReq -from gate_api.models.batch_futures_order import BatchFuturesOrder -from gate_api.models.batch_order import BatchOrder -from gate_api.models.borrow_currency_info import BorrowCurrencyInfo -from gate_api.models.broker_commission import BrokerCommission -from gate_api.models.broker_commission1 import BrokerCommission1 -from gate_api.models.broker_transaction import BrokerTransaction -from gate_api.models.broker_transaction1 import BrokerTransaction1 -from gate_api.models.cancel_batch_order import CancelBatchOrder -from gate_api.models.cancel_order_result import CancelOrderResult -from gate_api.models.collateral_adjust import CollateralAdjust -from gate_api.models.collateral_adjust_res import CollateralAdjustRes -from gate_api.models.collateral_align import CollateralAlign -from gate_api.models.collateral_currency import CollateralCurrency -from gate_api.models.collateral_currency_info import CollateralCurrencyInfo -from gate_api.models.collateral_currency_res import CollateralCurrencyRes -from gate_api.models.collateral_current_rate import CollateralCurrentRate -from gate_api.models.collateral_fix_rate import CollateralFixRate -from gate_api.models.collateral_loan_currency import CollateralLoanCurrency -from gate_api.models.collateral_ltv import CollateralLtv -from gate_api.models.collateral_order import CollateralOrder -from gate_api.models.collateral_record import CollateralRecord -from gate_api.models.contract import Contract -from gate_api.models.contract_stat import ContractStat -from gate_api.models.convert_small_balance import ConvertSmallBalance -from gate_api.models.countdown_cancel_all_futures_task import CountdownCancelAllFuturesTask -from gate_api.models.countdown_cancel_all_options_task import CountdownCancelAllOptionsTask -from gate_api.models.countdown_cancel_all_spot_task import CountdownCancelAllSpotTask -from gate_api.models.create_collateral_order import CreateCollateralOrder -from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder -from gate_api.models.create_uni_lend import CreateUniLend -from gate_api.models.create_uni_loan import CreateUniLoan -from gate_api.models.cross_margin_account import CrossMarginAccount -from gate_api.models.cross_margin_account_book import CrossMarginAccountBook -from gate_api.models.cross_margin_balance import CrossMarginBalance -from gate_api.models.cross_margin_balance1 import CrossMarginBalance1 -from gate_api.models.cross_margin_currency import CrossMarginCurrency -from gate_api.models.cross_margin_loan import CrossMarginLoan -from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest -from gate_api.models.cross_margin_repayment import CrossMarginRepayment -from gate_api.models.cross_margin_transferable import CrossMarginTransferable -from gate_api.models.currency import Currency -from gate_api.models.currency_chain import CurrencyChain -from gate_api.models.currency_pair import CurrencyPair -from gate_api.models.currency_quota import CurrencyQuota -from gate_api.models.debit_fee import DebitFee -from gate_api.models.delivery_candlestick import DeliveryCandlestick -from gate_api.models.delivery_contract import DeliveryContract -from gate_api.models.delivery_settlement import DeliverySettlement -from gate_api.models.deposit_address import DepositAddress -from gate_api.models.dual_get_orders import DualGetOrders -from gate_api.models.dual_get_plans import DualGetPlans -from gate_api.models.eth2_rate_list import Eth2RateList -from gate_api.models.eth2_swap import Eth2Swap -from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair -from gate_api.models.flash_swap_order import FlashSwapOrder -from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview -from gate_api.models.flash_swap_order_request import FlashSwapOrderRequest -from gate_api.models.flash_swap_preview_request import FlashSwapPreviewRequest -from gate_api.models.funding_account import FundingAccount -from gate_api.models.funding_rate_record import FundingRateRecord -from gate_api.models.future_cancel_order_result import FutureCancelOrderResult -from gate_api.models.futures_account import FuturesAccount -from gate_api.models.futures_account_book import FuturesAccountBook -from gate_api.models.futures_account_history import FuturesAccountHistory -from gate_api.models.futures_auto_deleverage import FuturesAutoDeleverage -from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest -from gate_api.models.futures_candlestick import FuturesCandlestick -from gate_api.models.futures_fee import FuturesFee -from gate_api.models.futures_index_constituents import FuturesIndexConstituents -from gate_api.models.futures_initial_order import FuturesInitialOrder -from gate_api.models.futures_limit_risk_tiers import FuturesLimitRiskTiers -from gate_api.models.futures_liq_order import FuturesLiqOrder -from gate_api.models.futures_liquidate import FuturesLiquidate -from gate_api.models.futures_order import FuturesOrder -from gate_api.models.futures_order_amendment import FuturesOrderAmendment -from gate_api.models.futures_order_book import FuturesOrderBook -from gate_api.models.futures_order_book_item import FuturesOrderBookItem -from gate_api.models.futures_premium_index import FuturesPremiumIndex -from gate_api.models.futures_price_trigger import FuturesPriceTrigger -from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder -from gate_api.models.futures_ticker import FuturesTicker -from gate_api.models.futures_trade import FuturesTrade -from gate_api.models.index_constituent import IndexConstituent -from gate_api.models.insurance_record import InsuranceRecord -from gate_api.models.ledger_record import LedgerRecord -from gate_api.models.liquidate_order import LiquidateOrder -from gate_api.models.margin_account import MarginAccount -from gate_api.models.margin_account_book import MarginAccountBook -from gate_api.models.margin_account_currency import MarginAccountCurrency -from gate_api.models.margin_leverage_tier import MarginLeverageTier -from gate_api.models.margin_market_leverage import MarginMarketLeverage -from gate_api.models.margin_tiers import MarginTiers -from gate_api.models.margin_transferable import MarginTransferable -from gate_api.models.max_uni_borrowable import MaxUniBorrowable -from gate_api.models.mock_futures_order import MockFuturesOrder -from gate_api.models.mock_futures_position import MockFuturesPosition -from gate_api.models.mock_margin_result import MockMarginResult -from gate_api.models.mock_options_order import MockOptionsOrder -from gate_api.models.mock_options_position import MockOptionsPosition -from gate_api.models.mock_risk_unit import MockRiskUnit -from gate_api.models.mock_spot_balance import MockSpotBalance -from gate_api.models.mock_spot_order import MockSpotOrder -from gate_api.models.multi_chain_address_item import MultiChainAddressItem -from gate_api.models.multi_collateral_currency import MultiCollateralCurrency -from gate_api.models.multi_collateral_item import MultiCollateralItem -from gate_api.models.multi_collateral_order import MultiCollateralOrder -from gate_api.models.multi_collateral_record import MultiCollateralRecord -from gate_api.models.multi_collateral_record_currency import MultiCollateralRecordCurrency -from gate_api.models.multi_loan_item import MultiLoanItem -from gate_api.models.multi_loan_repay_item import MultiLoanRepayItem -from gate_api.models.multi_repay_record import MultiRepayRecord -from gate_api.models.multi_repay_resp import MultiRepayResp -from gate_api.models.my_futures_trade import MyFuturesTrade -from gate_api.models.my_futures_trade_time_range import MyFuturesTradeTimeRange -from gate_api.models.open_orders import OpenOrders -from gate_api.models.options_account import OptionsAccount -from gate_api.models.options_account_book import OptionsAccountBook -from gate_api.models.options_candlestick import OptionsCandlestick -from gate_api.models.options_contract import OptionsContract -from gate_api.models.options_mmp import OptionsMMP -from gate_api.models.options_mmp_reset import OptionsMMPReset -from gate_api.models.options_my_settlements import OptionsMySettlements -from gate_api.models.options_my_trade import OptionsMyTrade -from gate_api.models.options_order import OptionsOrder -from gate_api.models.options_position import OptionsPosition -from gate_api.models.options_position_close import OptionsPositionClose -from gate_api.models.options_position_close_order import OptionsPositionCloseOrder -from gate_api.models.options_settlement import OptionsSettlement -from gate_api.models.options_ticker import OptionsTicker -from gate_api.models.options_underlying import OptionsUnderlying -from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker -from gate_api.models.order import Order -from gate_api.models.order_book import OrderBook -from gate_api.models.order_cancel import OrderCancel -from gate_api.models.order_patch import OrderPatch -from gate_api.models.order_resp import OrderResp -from gate_api.models.partner_commission_history import PartnerCommissionHistory -from gate_api.models.partner_sub import PartnerSub -from gate_api.models.partner_sub_list import PartnerSubList -from gate_api.models.partner_transaction_history import PartnerTransactionHistory -from gate_api.models.patch_uni_lend import PatchUniLend -from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder -from gate_api.models.position import Position -from gate_api.models.position_close import PositionClose -from gate_api.models.position_close_order import PositionCloseOrder -from gate_api.models.profit_loss_range import ProfitLossRange -from gate_api.models.rebate_user_info import RebateUserInfo -from gate_api.models.repay_currency_res import RepayCurrencyRes -from gate_api.models.repay_loan import RepayLoan -from gate_api.models.repay_multi_loan import RepayMultiLoan -from gate_api.models.repay_record import RepayRecord -from gate_api.models.repay_record_currency import RepayRecordCurrency -from gate_api.models.repay_record_left_interest import RepayRecordLeftInterest -from gate_api.models.repay_record_repaid_currency import RepayRecordRepaidCurrency -from gate_api.models.repay_record_total_interest import RepayRecordTotalInterest -from gate_api.models.repay_resp import RepayResp -from gate_api.models.risk_units import RiskUnits -from gate_api.models.saved_address import SavedAddress -from gate_api.models.small_balance import SmallBalance -from gate_api.models.small_balance_history import SmallBalanceHistory -from gate_api.models.spot_account import SpotAccount -from gate_api.models.spot_account_book import SpotAccountBook -from gate_api.models.spot_currency_chain import SpotCurrencyChain -from gate_api.models.spot_fee import SpotFee -from gate_api.models.spot_insurance_history import SpotInsuranceHistory -from gate_api.models.spot_price_put_order import SpotPricePutOrder -from gate_api.models.spot_price_trigger import SpotPriceTrigger -from gate_api.models.spot_price_triggered_order import SpotPriceTriggeredOrder -from gate_api.models.stp_group import StpGroup -from gate_api.models.stp_group_user import StpGroupUser -from gate_api.models.structured_buy import StructuredBuy -from gate_api.models.structured_get_project_list import StructuredGetProjectList -from gate_api.models.structured_order_list import StructuredOrderList -from gate_api.models.sub_account import SubAccount -from gate_api.models.sub_account_balance import SubAccountBalance -from gate_api.models.sub_account_cross_margin_balance import SubAccountCrossMarginBalance -from gate_api.models.sub_account_futures_balance import SubAccountFuturesBalance -from gate_api.models.sub_account_key import SubAccountKey -from gate_api.models.sub_account_key_perms import SubAccountKeyPerms -from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance -from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount -from gate_api.models.sub_account_transfer import SubAccountTransfer -from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount -from gate_api.models.sub_user_mode import SubUserMode -from gate_api.models.system_time import SystemTime -from gate_api.models.ticker import Ticker -from gate_api.models.total_balance import TotalBalance -from gate_api.models.trade import Trade -from gate_api.models.trade_fee import TradeFee -from gate_api.models.transaction_id import TransactionID -from gate_api.models.transfer import Transfer -from gate_api.models.transfer_order_status import TransferOrderStatus -from gate_api.models.transferables_result import TransferablesResult -from gate_api.models.trigger_order_response import TriggerOrderResponse -from gate_api.models.trigger_time import TriggerTime -from gate_api.models.uid_push_order import UidPushOrder -from gate_api.models.uid_push_withdrawal import UidPushWithdrawal -from gate_api.models.uid_push_withdrawal_resp import UidPushWithdrawalResp -from gate_api.models.uni_currency import UniCurrency -from gate_api.models.uni_currency_interest import UniCurrencyInterest -from gate_api.models.uni_currency_pair import UniCurrencyPair -from gate_api.models.uni_interest_mode import UniInterestMode -from gate_api.models.uni_interest_record import UniInterestRecord -from gate_api.models.uni_lend import UniLend -from gate_api.models.uni_lend_interest import UniLendInterest -from gate_api.models.uni_lend_record import UniLendRecord -from gate_api.models.uni_loan import UniLoan -from gate_api.models.uni_loan_interest_record import UniLoanInterestRecord -from gate_api.models.uni_loan_record import UniLoanRecord -from gate_api.models.unified_account import UnifiedAccount -from gate_api.models.unified_balance import UnifiedBalance -from gate_api.models.unified_borrowable import UnifiedBorrowable -from gate_api.models.unified_currency import UnifiedCurrency -from gate_api.models.unified_discount import UnifiedDiscount -from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers -from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate -from gate_api.models.unified_history_loan_rate_rates import UnifiedHistoryLoanRateRates -from gate_api.models.unified_leverage_config import UnifiedLeverageConfig -from gate_api.models.unified_leverage_setting import UnifiedLeverageSetting -from gate_api.models.unified_loan import UnifiedLoan -from gate_api.models.unified_loan_record import UnifiedLoanRecord -from gate_api.models.unified_loan_result import UnifiedLoanResult -from gate_api.models.unified_margin_tiers import UnifiedMarginTiers -from gate_api.models.unified_mode_set import UnifiedModeSet -from gate_api.models.unified_portfolio_input import UnifiedPortfolioInput -from gate_api.models.unified_portfolio_output import UnifiedPortfolioOutput -from gate_api.models.unified_risk_units import UnifiedRiskUnits -from gate_api.models.unified_settings import UnifiedSettings -from gate_api.models.unified_transferable import UnifiedTransferable -from gate_api.models.user_ltv_info import UserLtvInfo -from gate_api.models.user_sub import UserSub -from gate_api.models.user_sub_relation import UserSubRelation -from gate_api.models.user_total_amount import UserTotalAmount -from gate_api.models.withdraw_status import WithdrawStatus -from gate_api.models.withdrawal_record import WithdrawalRecord diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py deleted file mode 100644 index 03dfc20..0000000 --- a/gate_api/models/account_balance.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AccountBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'amount': 'str', - 'currency': 'str', - 'unrealised_pnl': 'str', - 'borrowed': 'str' - } - - attribute_map = { - 'amount': 'amount', - 'currency': 'currency', - 'unrealised_pnl': 'unrealised_pnl', - 'borrowed': 'borrowed' - } - - def __init__(self, amount=None, currency=None, unrealised_pnl=None, borrowed=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """AccountBalance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._amount = None - self._currency = None - self._unrealised_pnl = None - self._borrowed = None - self.discriminator = None - - if amount is not None: - self.amount = amount - if currency is not None: - self.currency = currency - if unrealised_pnl is not None: - self.unrealised_pnl = unrealised_pnl - if borrowed is not None: - self.borrowed = borrowed - - @property - def amount(self): - """Gets the amount of this AccountBalance. # noqa: E501 - - Account total balance amount # noqa: E501 - - :return: The amount of this AccountBalance. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this AccountBalance. - - Account total balance amount # noqa: E501 - - :param amount: The amount of this AccountBalance. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def currency(self): - """Gets the currency of this AccountBalance. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this AccountBalance. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this AccountBalance. - - Currency # noqa: E501 - - :param currency: The currency of this AccountBalance. # noqa: E501 - :type: str - """ - allowed_values = ["BTC", "CNY", "USD", "USDT"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and currency not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `currency` ({0}), must be one of {1}" # noqa: E501 - .format(currency, allowed_values) - ) - - self._currency = currency - - @property - def unrealised_pnl(self): - """Gets the unrealised_pnl of this AccountBalance. # noqa: E501 - - Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts # noqa: E501 - - :return: The unrealised_pnl of this AccountBalance. # noqa: E501 - :rtype: str - """ - return self._unrealised_pnl - - @unrealised_pnl.setter - def unrealised_pnl(self, unrealised_pnl): - """Sets the unrealised_pnl of this AccountBalance. - - Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts # noqa: E501 - - :param unrealised_pnl: The unrealised_pnl of this AccountBalance. # noqa: E501 - :type: str - """ - - self._unrealised_pnl = unrealised_pnl - - @property - def borrowed(self): - """Gets the borrowed of this AccountBalance. # noqa: E501 - - Borrowed,this field will only appear in margin and cross_margin accounts # noqa: E501 - - :return: The borrowed of this AccountBalance. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this AccountBalance. - - Borrowed,this field will only appear in margin and cross_margin accounts # noqa: E501 - - :param borrowed: The borrowed of this AccountBalance. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccountBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AccountBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py deleted file mode 100644 index 914531f..0000000 --- a/gate_api/models/account_detail.py +++ /dev/null @@ -1,261 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AccountDetail(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'ip_whitelist': 'list[str]', - 'currency_pairs': 'list[str]', - 'user_id': 'int', - 'tier': 'int', - 'key': 'AccountDetailKey', - 'copy_trading_role': 'int' - } - - attribute_map = { - 'ip_whitelist': 'ip_whitelist', - 'currency_pairs': 'currency_pairs', - 'user_id': 'user_id', - 'tier': 'tier', - 'key': 'key', - 'copy_trading_role': 'copy_trading_role' - } - - def __init__(self, ip_whitelist=None, currency_pairs=None, user_id=None, tier=None, key=None, copy_trading_role=None, local_vars_configuration=None): # noqa: E501 - # type: (list[str], list[str], int, int, AccountDetailKey, int, Configuration) -> None - """AccountDetail - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._ip_whitelist = None - self._currency_pairs = None - self._user_id = None - self._tier = None - self._key = None - self._copy_trading_role = None - self.discriminator = None - - if ip_whitelist is not None: - self.ip_whitelist = ip_whitelist - if currency_pairs is not None: - self.currency_pairs = currency_pairs - if user_id is not None: - self.user_id = user_id - if tier is not None: - self.tier = tier - if key is not None: - self.key = key - if copy_trading_role is not None: - self.copy_trading_role = copy_trading_role - - @property - def ip_whitelist(self): - """Gets the ip_whitelist of this AccountDetail. # noqa: E501 - - IP whitelist # noqa: E501 - - :return: The ip_whitelist of this AccountDetail. # noqa: E501 - :rtype: list[str] - """ - return self._ip_whitelist - - @ip_whitelist.setter - def ip_whitelist(self, ip_whitelist): - """Sets the ip_whitelist of this AccountDetail. - - IP whitelist # noqa: E501 - - :param ip_whitelist: The ip_whitelist of this AccountDetail. # noqa: E501 - :type: list[str] - """ - - self._ip_whitelist = ip_whitelist - - @property - def currency_pairs(self): - """Gets the currency_pairs of this AccountDetail. # noqa: E501 - - CurrencyPair whitelisting # noqa: E501 - - :return: The currency_pairs of this AccountDetail. # noqa: E501 - :rtype: list[str] - """ - return self._currency_pairs - - @currency_pairs.setter - def currency_pairs(self, currency_pairs): - """Sets the currency_pairs of this AccountDetail. - - CurrencyPair whitelisting # noqa: E501 - - :param currency_pairs: The currency_pairs of this AccountDetail. # noqa: E501 - :type: list[str] - """ - - self._currency_pairs = currency_pairs - - @property - def user_id(self): - """Gets the user_id of this AccountDetail. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this AccountDetail. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this AccountDetail. - - User ID # noqa: E501 - - :param user_id: The user_id of this AccountDetail. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def tier(self): - """Gets the tier of this AccountDetail. # noqa: E501 - - User VIP level # noqa: E501 - - :return: The tier of this AccountDetail. # noqa: E501 - :rtype: int - """ - return self._tier - - @tier.setter - def tier(self, tier): - """Sets the tier of this AccountDetail. - - User VIP level # noqa: E501 - - :param tier: The tier of this AccountDetail. # noqa: E501 - :type: int - """ - - self._tier = tier - - @property - def key(self): - """Gets the key of this AccountDetail. # noqa: E501 - - - :return: The key of this AccountDetail. # noqa: E501 - :rtype: AccountDetailKey - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this AccountDetail. - - - :param key: The key of this AccountDetail. # noqa: E501 - :type: AccountDetailKey - """ - - self._key = key - - @property - def copy_trading_role(self): - """Gets the copy_trading_role of this AccountDetail. # noqa: E501 - - User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower # noqa: E501 - - :return: The copy_trading_role of this AccountDetail. # noqa: E501 - :rtype: int - """ - return self._copy_trading_role - - @copy_trading_role.setter - def copy_trading_role(self, copy_trading_role): - """Sets the copy_trading_role of this AccountDetail. - - User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower # noqa: E501 - - :param copy_trading_role: The copy_trading_role of this AccountDetail. # noqa: E501 - :type: int - """ - - self._copy_trading_role = copy_trading_role - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccountDetail): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AccountDetail): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py deleted file mode 100644 index 75cde18..0000000 --- a/gate_api/models/account_detail_key.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AccountDetailKey(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'mode': 'int' - } - - attribute_map = { - 'mode': 'mode' - } - - def __init__(self, mode=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """AccountDetailKey - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._mode = None - self.discriminator = None - - if mode is not None: - self.mode = mode - - @property - def mode(self): - """Gets the mode of this AccountDetailKey. # noqa: E501 - - mode: 1 - classic account 2 - portfolio margin account # noqa: E501 - - :return: The mode of this AccountDetailKey. # noqa: E501 - :rtype: int - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this AccountDetailKey. - - mode: 1 - classic account 2 - portfolio margin account # noqa: E501 - - :param mode: The mode of this AccountDetailKey. # noqa: E501 - :type: int - """ - - self._mode = mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccountDetailKey): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AccountDetailKey): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py deleted file mode 100644 index 24b19e8..0000000 --- a/gate_api/models/account_rate_limit.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AccountRateLimit(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'tier': 'str', - 'ratio': 'str', - 'main_ratio': 'str', - 'updated_at': 'str' - } - - attribute_map = { - 'tier': 'tier', - 'ratio': 'ratio', - 'main_ratio': 'main_ratio', - 'updated_at': 'updated_at' - } - - def __init__(self, tier=None, ratio=None, main_ratio=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """AccountRateLimit - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._tier = None - self._ratio = None - self._main_ratio = None - self._updated_at = None - self.discriminator = None - - if tier is not None: - self.tier = tier - if ratio is not None: - self.ratio = ratio - if main_ratio is not None: - self.main_ratio = main_ratio - if updated_at is not None: - self.updated_at = updated_at - - @property - def tier(self): - """Gets the tier of this AccountRateLimit. # noqa: E501 - - Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) # noqa: E501 - - :return: The tier of this AccountRateLimit. # noqa: E501 - :rtype: str - """ - return self._tier - - @tier.setter - def tier(self, tier): - """Sets the tier of this AccountRateLimit. - - Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) # noqa: E501 - - :param tier: The tier of this AccountRateLimit. # noqa: E501 - :type: str - """ - - self._tier = tier - - @property - def ratio(self): - """Gets the ratio of this AccountRateLimit. # noqa: E501 - - Transaction rate # noqa: E501 - - :return: The ratio of this AccountRateLimit. # noqa: E501 - :rtype: str - """ - return self._ratio - - @ratio.setter - def ratio(self, ratio): - """Sets the ratio of this AccountRateLimit. - - Transaction rate # noqa: E501 - - :param ratio: The ratio of this AccountRateLimit. # noqa: E501 - :type: str - """ - - self._ratio = ratio - - @property - def main_ratio(self): - """Gets the main_ratio of this AccountRateLimit. # noqa: E501 - - Total transaction ratio of main account # noqa: E501 - - :return: The main_ratio of this AccountRateLimit. # noqa: E501 - :rtype: str - """ - return self._main_ratio - - @main_ratio.setter - def main_ratio(self, main_ratio): - """Sets the main_ratio of this AccountRateLimit. - - Total transaction ratio of main account # noqa: E501 - - :param main_ratio: The main_ratio of this AccountRateLimit. # noqa: E501 - :type: str - """ - - self._main_ratio = main_ratio - - @property - def updated_at(self): - """Gets the updated_at of this AccountRateLimit. # noqa: E501 - - Update time # noqa: E501 - - :return: The updated_at of this AccountRateLimit. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this AccountRateLimit. - - Update time # noqa: E501 - - :param updated_at: The updated_at of this AccountRateLimit. # noqa: E501 - :type: str - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccountRateLimit): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AccountRateLimit): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py deleted file mode 100644 index c55dad8..0000000 --- a/gate_api/models/agency_commission.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AgencyCommission(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'commission_time': 'int', - 'user_id': 'int', - 'group_name': 'str', - 'commission_amount': 'str', - 'commission_asset': 'str', - 'source': 'str' - } - - attribute_map = { - 'commission_time': 'commission_time', - 'user_id': 'user_id', - 'group_name': 'group_name', - 'commission_amount': 'commission_amount', - 'commission_asset': 'commission_asset', - 'source': 'source' - } - - def __init__(self, commission_time=None, user_id=None, group_name=None, commission_amount=None, commission_asset=None, source=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, Configuration) -> None - """AgencyCommission - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._commission_time = None - self._user_id = None - self._group_name = None - self._commission_amount = None - self._commission_asset = None - self._source = None - self.discriminator = None - - if commission_time is not None: - self.commission_time = commission_time - if user_id is not None: - self.user_id = user_id - if group_name is not None: - self.group_name = group_name - if commission_amount is not None: - self.commission_amount = commission_amount - if commission_asset is not None: - self.commission_asset = commission_asset - if source is not None: - self.source = source - - @property - def commission_time(self): - """Gets the commission_time of this AgencyCommission. # noqa: E501 - - Commission Time. (unix timestamp) # noqa: E501 - - :return: The commission_time of this AgencyCommission. # noqa: E501 - :rtype: int - """ - return self._commission_time - - @commission_time.setter - def commission_time(self, commission_time): - """Sets the commission_time of this AgencyCommission. - - Commission Time. (unix timestamp) # noqa: E501 - - :param commission_time: The commission_time of this AgencyCommission. # noqa: E501 - :type: int - """ - - self._commission_time = commission_time - - @property - def user_id(self): - """Gets the user_id of this AgencyCommission. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this AgencyCommission. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this AgencyCommission. - - User ID # noqa: E501 - - :param user_id: The user_id of this AgencyCommission. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def group_name(self): - """Gets the group_name of this AgencyCommission. # noqa: E501 - - Group name # noqa: E501 - - :return: The group_name of this AgencyCommission. # noqa: E501 - :rtype: str - """ - return self._group_name - - @group_name.setter - def group_name(self, group_name): - """Sets the group_name of this AgencyCommission. - - Group name # noqa: E501 - - :param group_name: The group_name of this AgencyCommission. # noqa: E501 - :type: str - """ - - self._group_name = group_name - - @property - def commission_amount(self): - """Gets the commission_amount of this AgencyCommission. # noqa: E501 - - Commission Amount # noqa: E501 - - :return: The commission_amount of this AgencyCommission. # noqa: E501 - :rtype: str - """ - return self._commission_amount - - @commission_amount.setter - def commission_amount(self, commission_amount): - """Sets the commission_amount of this AgencyCommission. - - Commission Amount # noqa: E501 - - :param commission_amount: The commission_amount of this AgencyCommission. # noqa: E501 - :type: str - """ - - self._commission_amount = commission_amount - - @property - def commission_asset(self): - """Gets the commission_asset of this AgencyCommission. # noqa: E501 - - Commission Asset # noqa: E501 - - :return: The commission_asset of this AgencyCommission. # noqa: E501 - :rtype: str - """ - return self._commission_asset - - @commission_asset.setter - def commission_asset(self, commission_asset): - """Sets the commission_asset of this AgencyCommission. - - Commission Asset # noqa: E501 - - :param commission_asset: The commission_asset of this AgencyCommission. # noqa: E501 - :type: str - """ - - self._commission_asset = commission_asset - - @property - def source(self): - """Gets the source of this AgencyCommission. # noqa: E501 - - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 - - :return: The source of this AgencyCommission. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this AgencyCommission. - - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 - - :param source: The source of this AgencyCommission. # noqa: E501 - :type: str - """ - - self._source = source - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgencyCommission): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgencyCommission): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py deleted file mode 100644 index 59c4540..0000000 --- a/gate_api/models/agency_commission_history.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AgencyCommissionHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'total': 'int', - 'list': 'list[AgencyCommission]' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'total': 'total', - 'list': 'list' - } - - def __init__(self, currency_pair=None, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, list[AgencyCommission], Configuration) -> None - """AgencyCommissionHistory - a 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._total = None - self._list = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if total is not None: - self.total = total - if list is not None: - self.list = list - - @property - def currency_pair(self): - """Gets the currency_pair of this AgencyCommissionHistory. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this AgencyCommissionHistory. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this AgencyCommissionHistory. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this AgencyCommissionHistory. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def total(self): - """Gets the total of this AgencyCommissionHistory. # noqa: E501 - - Total # noqa: E501 - - :return: The total of this AgencyCommissionHistory. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this AgencyCommissionHistory. - - Total # noqa: E501 - - :param total: The total of this AgencyCommissionHistory. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def list(self): - """Gets the list of this AgencyCommissionHistory. # noqa: E501 - - List of comission history # noqa: E501 - - :return: The list of this AgencyCommissionHistory. # noqa: E501 - :rtype: list[AgencyCommission] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this AgencyCommissionHistory. - - List of comission history # noqa: E501 - - :param list: The list of this AgencyCommissionHistory. # noqa: E501 - :type: list[AgencyCommission] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgencyCommissionHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgencyCommissionHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py deleted file mode 100644 index ffba857..0000000 --- a/gate_api/models/agency_transaction.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AgencyTransaction(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'transaction_time': 'int', - 'user_id': 'int', - 'group_name': 'str', - 'fee': 'str', - 'fee_asset': 'str', - 'currency_pair': 'str', - 'amount': 'str', - 'amount_asset': 'str', - 'source': 'str' - } - - attribute_map = { - 'transaction_time': 'transaction_time', - 'user_id': 'user_id', - 'group_name': 'group_name', - 'fee': 'fee', - 'fee_asset': 'fee_asset', - 'currency_pair': 'currency_pair', - 'amount': 'amount', - 'amount_asset': 'amount_asset', - 'source': 'source' - } - - def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, fee_asset=None, currency_pair=None, amount=None, amount_asset=None, source=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, str, Configuration) -> None - """AgencyTransaction - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._transaction_time = None - self._user_id = None - self._group_name = None - self._fee = None - self._fee_asset = None - self._currency_pair = None - self._amount = None - self._amount_asset = None - self._source = None - self.discriminator = None - - if transaction_time is not None: - self.transaction_time = transaction_time - if user_id is not None: - self.user_id = user_id - if group_name is not None: - self.group_name = group_name - if fee is not None: - self.fee = fee - if fee_asset is not None: - self.fee_asset = fee_asset - if currency_pair is not None: - self.currency_pair = currency_pair - if amount is not None: - self.amount = amount - if amount_asset is not None: - self.amount_asset = amount_asset - if source is not None: - self.source = source - - @property - def transaction_time(self): - """Gets the transaction_time of this AgencyTransaction. # noqa: E501 - - Transaction Time. (unix timestamp) # noqa: E501 - - :return: The transaction_time of this AgencyTransaction. # noqa: E501 - :rtype: int - """ - return self._transaction_time - - @transaction_time.setter - def transaction_time(self, transaction_time): - """Sets the transaction_time of this AgencyTransaction. - - Transaction Time. (unix timestamp) # noqa: E501 - - :param transaction_time: The transaction_time of this AgencyTransaction. # noqa: E501 - :type: int - """ - - self._transaction_time = transaction_time - - @property - def user_id(self): - """Gets the user_id of this AgencyTransaction. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this AgencyTransaction. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this AgencyTransaction. - - User ID # noqa: E501 - - :param user_id: The user_id of this AgencyTransaction. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def group_name(self): - """Gets the group_name of this AgencyTransaction. # noqa: E501 - - Group name # noqa: E501 - - :return: The group_name of this AgencyTransaction. # noqa: E501 - :rtype: str - """ - return self._group_name - - @group_name.setter - def group_name(self, group_name): - """Sets the group_name of this AgencyTransaction. - - Group name # noqa: E501 - - :param group_name: The group_name of this AgencyTransaction. # noqa: E501 - :type: str - """ - - self._group_name = group_name - - @property - def fee(self): - """Gets the fee of this AgencyTransaction. # noqa: E501 - - Fee # noqa: E501 - - :return: The fee of this AgencyTransaction. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this AgencyTransaction. - - Fee # noqa: E501 - - :param fee: The fee of this AgencyTransaction. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def fee_asset(self): - """Gets the fee_asset of this AgencyTransaction. # noqa: E501 - - Fee currency # noqa: E501 - - :return: The fee_asset of this AgencyTransaction. # noqa: E501 - :rtype: str - """ - return self._fee_asset - - @fee_asset.setter - def fee_asset(self, fee_asset): - """Sets the fee_asset of this AgencyTransaction. - - Fee currency # noqa: E501 - - :param fee_asset: The fee_asset of this AgencyTransaction. # noqa: E501 - :type: str - """ - - self._fee_asset = fee_asset - - @property - def currency_pair(self): - """Gets the currency_pair of this AgencyTransaction. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this AgencyTransaction. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this AgencyTransaction. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this AgencyTransaction. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def amount(self): - """Gets the amount of this AgencyTransaction. # noqa: E501 - - Commission Amount # noqa: E501 - - :return: The amount of this AgencyTransaction. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this AgencyTransaction. - - Commission Amount # noqa: E501 - - :param amount: The amount of this AgencyTransaction. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def amount_asset(self): - """Gets the amount_asset of this AgencyTransaction. # noqa: E501 - - Commission Asset # noqa: E501 - - :return: The amount_asset of this AgencyTransaction. # noqa: E501 - :rtype: str - """ - return self._amount_asset - - @amount_asset.setter - def amount_asset(self, amount_asset): - """Sets the amount_asset of this AgencyTransaction. - - Commission Asset # noqa: E501 - - :param amount_asset: The amount_asset of this AgencyTransaction. # noqa: E501 - :type: str - """ - - self._amount_asset = amount_asset - - @property - def source(self): - """Gets the source of this AgencyTransaction. # noqa: E501 - - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 - - :return: The source of this AgencyTransaction. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this AgencyTransaction. - - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 - - :param source: The source of this AgencyTransaction. # noqa: E501 - :type: str - """ - - self._source = source - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgencyTransaction): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgencyTransaction): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py deleted file mode 100644 index 63f4d6b..0000000 --- a/gate_api/models/agency_transaction_history.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AgencyTransactionHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'total': 'int', - 'list': 'list[AgencyTransaction]' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'total': 'total', - 'list': 'list' - } - - def __init__(self, currency_pair=None, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, list[AgencyTransaction], Configuration) -> None - """AgencyTransactionHistory - a 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._total = None - self._list = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if total is not None: - self.total = total - if list is not None: - self.list = list - - @property - def currency_pair(self): - """Gets the currency_pair of this AgencyTransactionHistory. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this AgencyTransactionHistory. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this AgencyTransactionHistory. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this AgencyTransactionHistory. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def total(self): - """Gets the total of this AgencyTransactionHistory. # noqa: E501 - - Total # noqa: E501 - - :return: The total of this AgencyTransactionHistory. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this AgencyTransactionHistory. - - Total # noqa: E501 - - :param total: The total of this AgencyTransactionHistory. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def list(self): - """Gets the list of this AgencyTransactionHistory. # noqa: E501 - - List of transaction history # noqa: E501 - - :return: The list of this AgencyTransactionHistory. # noqa: E501 - :rtype: list[AgencyTransaction] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this AgencyTransactionHistory. - - List of transaction history # noqa: E501 - - :param list: The list of this AgencyTransactionHistory. # noqa: E501 - :type: list[AgencyTransaction] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgencyTransactionHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgencyTransactionHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py deleted file mode 100644 index 8b3fe3c..0000000 --- a/gate_api/models/auto_repay_setting.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AutoRepaySetting(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'status': 'str' - } - - attribute_map = { - 'status': 'status' - } - - def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, Configuration) -> None - """AutoRepaySetting - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._status = None - self.discriminator = None - - if status is not None: - self.status = status - - @property - def status(self): - """Gets the status of this AutoRepaySetting. # noqa: E501 - - Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501 - - :return: The status of this AutoRepaySetting. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this AutoRepaySetting. - - Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501 - - :param status: The status of this AutoRepaySetting. # noqa: E501 - :type: str - """ - allowed_values = ["on", "off"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AutoRepaySetting): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AutoRepaySetting): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py deleted file mode 100644 index ae56f80..0000000 --- a/gate_api/models/batch_amend_item.py +++ /dev/null @@ -1,296 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BatchAmendItem(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'str', - 'currency_pair': 'str', - 'account': 'str', - 'amount': 'str', - 'price': 'str', - 'amend_text': 'str', - 'action_mode': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'currency_pair': 'currency_pair', - 'account': 'account', - 'amount': 'amount', - 'price': 'price', - 'amend_text': 'amend_text', - 'action_mode': 'action_mode' - } - - def __init__(self, order_id=None, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, Configuration) -> None - """BatchAmendItem - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._currency_pair = None - self._account = None - self._amount = None - self._price = None - self._amend_text = None - self._action_mode = None - self.discriminator = None - - self.order_id = order_id - self.currency_pair = currency_pair - if account is not None: - self.account = account - if amount is not None: - self.amount = amount - if price is not None: - self.price = price - if amend_text is not None: - self.amend_text = amend_text - if action_mode is not None: - self.action_mode = action_mode - - @property - def order_id(self): - """Gets the order_id of this BatchAmendItem. # noqa: E501 - - The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). # noqa: E501 - - :return: The order_id of this BatchAmendItem. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this BatchAmendItem. - - The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). # noqa: E501 - - :param order_id: The order_id of this BatchAmendItem. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 - raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 - - self._order_id = order_id - - @property - def currency_pair(self): - """Gets the currency_pair of this BatchAmendItem. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this BatchAmendItem. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this BatchAmendItem. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this BatchAmendItem. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 - raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 - - self._currency_pair = currency_pair - - @property - def account(self): - """Gets the account of this BatchAmendItem. # noqa: E501 - - Default spot, unified account and warehouse-by-store leverage account. # noqa: E501 - - :return: The account of this BatchAmendItem. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this BatchAmendItem. - - Default spot, unified account and warehouse-by-store leverage account. # noqa: E501 - - :param account: The account of this BatchAmendItem. # noqa: E501 - :type: str - """ - - self._account = account - - @property - def amount(self): - """Gets the amount of this BatchAmendItem. # noqa: E501 - - trade amount, only one of amount and price can be specified # noqa: E501 - - :return: The amount of this BatchAmendItem. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this BatchAmendItem. - - trade amount, only one of amount and price can be specified # noqa: E501 - - :param amount: The amount of this BatchAmendItem. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def price(self): - """Gets the price of this BatchAmendItem. # noqa: E501 - - trade price, only one of amount and price can be specified # noqa: E501 - - :return: The price of this BatchAmendItem. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this BatchAmendItem. - - trade price, only one of amount and price can be specified # noqa: E501 - - :param price: The price of this BatchAmendItem. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def amend_text(self): - """Gets the amend_text of this BatchAmendItem. # noqa: E501 - - Custom info during amending order # noqa: E501 - - :return: The amend_text of this BatchAmendItem. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this BatchAmendItem. - - Custom info during amending order # noqa: E501 - - :param amend_text: The amend_text of this BatchAmendItem. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - amend_text is not None and len(amend_text) > 31): - raise ValueError("Invalid value for `amend_text`, length must be less than or equal to `31`") # noqa: E501 - - self._amend_text = amend_text - - @property - def action_mode(self): - """Gets the action_mode of this BatchAmendItem. # noqa: E501 - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :return: The action_mode of this BatchAmendItem. # noqa: E501 - :rtype: str - """ - return self._action_mode - - @action_mode.setter - def action_mode(self, action_mode): - """Sets the action_mode of this BatchAmendItem. - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :param action_mode: The action_mode of this BatchAmendItem. # noqa: E501 - :type: str - """ - - self._action_mode = action_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BatchAmendItem): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BatchAmendItem): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py deleted file mode 100644 index e6ab0e6..0000000 --- a/gate_api/models/batch_amend_order_req.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BatchAmendOrderReq(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'text': 'str', - 'size': 'int', - 'price': 'str', - 'amend_text': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'text': 'text', - 'size': 'size', - 'price': 'price', - 'amend_text': 'amend_text' - } - - def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, str, str, Configuration) -> None - """BatchAmendOrderReq - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._text = None - self._size = None - self._price = None - self._amend_text = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if text is not None: - self.text = text - if size is not None: - self.size = size - if price is not None: - self.price = price - if amend_text is not None: - self.amend_text = amend_text - - @property - def order_id(self): - """Gets the order_id of this BatchAmendOrderReq. # noqa: E501 - - Order id, order_id and text must contain at least one # noqa: E501 - - :return: The order_id of this BatchAmendOrderReq. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this BatchAmendOrderReq. - - Order id, order_id and text must contain at least one # noqa: E501 - - :param order_id: The order_id of this BatchAmendOrderReq. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def text(self): - """Gets the text of this BatchAmendOrderReq. # noqa: E501 - - User-defined order text, at least one of order_id and text must be passed # noqa: E501 - - :return: The text of this BatchAmendOrderReq. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this BatchAmendOrderReq. - - User-defined order text, at least one of order_id and text must be passed # noqa: E501 - - :param text: The text of this BatchAmendOrderReq. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def size(self): - """Gets the size of this BatchAmendOrderReq. # noqa: E501 - - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 - - :return: The size of this BatchAmendOrderReq. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this BatchAmendOrderReq. - - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 - - :param size: The size of this BatchAmendOrderReq. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def price(self): - """Gets the price of this BatchAmendOrderReq. # noqa: E501 - - New order price. # noqa: E501 - - :return: The price of this BatchAmendOrderReq. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this BatchAmendOrderReq. - - New order price. # noqa: E501 - - :param price: The price of this BatchAmendOrderReq. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def amend_text(self): - """Gets the amend_text of this BatchAmendOrderReq. # noqa: E501 - - Custom info during amending order # noqa: E501 - - :return: The amend_text of this BatchAmendOrderReq. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this BatchAmendOrderReq. - - Custom info during amending order # noqa: E501 - - :param amend_text: The amend_text of this BatchAmendOrderReq. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BatchAmendOrderReq): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BatchAmendOrderReq): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py deleted file mode 100644 index 0d8529a..0000000 --- a/gate_api/models/batch_futures_order.py +++ /dev/null @@ -1,909 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BatchFuturesOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'succeeded': 'bool', - 'label': 'str', - 'detail': 'str', - 'id': 'int', - 'user': 'int', - 'create_time': 'float', - 'finish_time': 'float', - 'finish_as': 'str', - 'status': 'str', - 'contract': 'str', - 'size': 'int', - 'iceberg': 'int', - 'price': 'str', - 'close': 'bool', - 'is_close': 'bool', - 'reduce_only': 'bool', - 'is_reduce_only': 'bool', - 'is_liq': 'bool', - 'tif': 'str', - 'left': 'int', - 'fill_price': 'str', - 'text': 'str', - 'tkfr': 'str', - 'mkfr': 'str', - 'refu': 'int', - 'auto_size': 'str', - 'stp_act': 'str', - 'stp_id': 'int' - } - - attribute_map = { - 'succeeded': 'succeeded', - 'label': 'label', - 'detail': 'detail', - 'id': 'id', - 'user': 'user', - 'create_time': 'create_time', - 'finish_time': 'finish_time', - 'finish_as': 'finish_as', - 'status': 'status', - 'contract': 'contract', - 'size': 'size', - 'iceberg': 'iceberg', - 'price': 'price', - 'close': 'close', - 'is_close': 'is_close', - 'reduce_only': 'reduce_only', - 'is_reduce_only': 'is_reduce_only', - 'is_liq': 'is_liq', - 'tif': 'tif', - 'left': 'left', - 'fill_price': 'fill_price', - 'text': 'text', - 'tkfr': 'tkfr', - 'mkfr': 'mkfr', - 'refu': 'refu', - 'auto_size': 'auto_size', - 'stp_act': 'stp_act', - 'stp_id': 'stp_id' - } - - def __init__(self, succeeded=None, label=None, detail=None, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_act=None, stp_id=None, local_vars_configuration=None): # noqa: E501 - # type: (bool, str, str, int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, str, int, Configuration) -> None - """BatchFuturesOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._succeeded = None - self._label = None - self._detail = None - self._id = None - self._user = None - self._create_time = None - self._finish_time = None - self._finish_as = None - self._status = None - self._contract = None - self._size = None - self._iceberg = None - self._price = None - self._close = None - self._is_close = None - self._reduce_only = None - self._is_reduce_only = None - self._is_liq = None - self._tif = None - self._left = None - self._fill_price = None - self._text = None - self._tkfr = None - self._mkfr = None - self._refu = None - self._auto_size = None - self._stp_act = None - self._stp_id = None - self.discriminator = None - - if succeeded is not None: - self.succeeded = succeeded - if label is not None: - self.label = label - if detail is not None: - self.detail = detail - if id is not None: - self.id = id - if user is not None: - self.user = user - if create_time is not None: - self.create_time = create_time - if finish_time is not None: - self.finish_time = finish_time - if finish_as is not None: - self.finish_as = finish_as - if status is not None: - self.status = status - if contract is not None: - self.contract = contract - if size is not None: - self.size = size - if iceberg is not None: - self.iceberg = iceberg - if price is not None: - self.price = price - if close is not None: - self.close = close - if is_close is not None: - self.is_close = is_close - if reduce_only is not None: - self.reduce_only = reduce_only - if is_reduce_only is not None: - self.is_reduce_only = is_reduce_only - if is_liq is not None: - self.is_liq = is_liq - if tif is not None: - self.tif = tif - if left is not None: - self.left = left - if fill_price is not None: - self.fill_price = fill_price - if text is not None: - self.text = text - if tkfr is not None: - self.tkfr = tkfr - if mkfr is not None: - self.mkfr = mkfr - if refu is not None: - self.refu = refu - if auto_size is not None: - self.auto_size = auto_size - if stp_act is not None: - self.stp_act = stp_act - if stp_id is not None: - self.stp_id = stp_id - - @property - def succeeded(self): - """Gets the succeeded of this BatchFuturesOrder. # noqa: E501 - - Whether the batch of orders succeeded # noqa: E501 - - :return: The succeeded of this BatchFuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this BatchFuturesOrder. - - Whether the batch of orders succeeded # noqa: E501 - - :param succeeded: The succeeded of this BatchFuturesOrder. # noqa: E501 - :type: bool - """ - - self._succeeded = succeeded - - @property - def label(self): - """Gets the label of this BatchFuturesOrder. # noqa: E501 - - Error label, only exists if execution fails # noqa: E501 - - :return: The label of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this BatchFuturesOrder. - - Error label, only exists if execution fails # noqa: E501 - - :param label: The label of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._label = label - - @property - def detail(self): - """Gets the detail of this BatchFuturesOrder. # noqa: E501 - - Error detail, only present if execution failed and details need to be given # noqa: E501 - - :return: The detail of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._detail - - @detail.setter - def detail(self, detail): - """Sets the detail of this BatchFuturesOrder. - - Error detail, only present if execution failed and details need to be given # noqa: E501 - - :param detail: The detail of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._detail = detail - - @property - def id(self): - """Gets the id of this BatchFuturesOrder. # noqa: E501 - - Futures order ID # noqa: E501 - - :return: The id of this BatchFuturesOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this BatchFuturesOrder. - - Futures order ID # noqa: E501 - - :param id: The id of this BatchFuturesOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def user(self): - """Gets the user of this BatchFuturesOrder. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this BatchFuturesOrder. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this BatchFuturesOrder. - - User ID # noqa: E501 - - :param user: The user of this BatchFuturesOrder. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def create_time(self): - """Gets the create_time of this BatchFuturesOrder. # noqa: E501 - - Creation time of order # noqa: E501 - - :return: The create_time of this BatchFuturesOrder. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this BatchFuturesOrder. - - Creation time of order # noqa: E501 - - :param create_time: The create_time of this BatchFuturesOrder. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def finish_time(self): - """Gets the finish_time of this BatchFuturesOrder. # noqa: E501 - - Order finished time. Not returned if order is open # noqa: E501 - - :return: The finish_time of this BatchFuturesOrder. # noqa: E501 - :rtype: float - """ - return self._finish_time - - @finish_time.setter - def finish_time(self, finish_time): - """Sets the finish_time of this BatchFuturesOrder. - - Order finished time. Not returned if order is open # noqa: E501 - - :param finish_time: The finish_time of this BatchFuturesOrder. # noqa: E501 - :type: float - """ - - self._finish_time = finish_time - - @property - def finish_as(self): - """Gets the finish_as of this BatchFuturesOrder. # noqa: E501 - - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 - - :return: The finish_as of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._finish_as - - @finish_as.setter - def finish_as(self, finish_as): - """Sets the finish_as of this BatchFuturesOrder. - - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 - - :param finish_as: The finish_as of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "stp"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 - .format(finish_as, allowed_values) - ) - - self._finish_as = finish_as - - @property - def status(self): - """Gets the status of this BatchFuturesOrder. # noqa: E501 - - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 - - :return: The status of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchFuturesOrder. - - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 - - :param status: The status of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["open", "finished"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def contract(self): - """Gets the contract of this BatchFuturesOrder. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this BatchFuturesOrder. - - Futures contract # noqa: E501 - - :param contract: The contract of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def size(self): - """Gets the size of this BatchFuturesOrder. # noqa: E501 - - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 - - :return: The size of this BatchFuturesOrder. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this BatchFuturesOrder. - - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 - - :param size: The size of this BatchFuturesOrder. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def iceberg(self): - """Gets the iceberg of this BatchFuturesOrder. # noqa: E501 - - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 - - :return: The iceberg of this BatchFuturesOrder. # noqa: E501 - :rtype: int - """ - return self._iceberg - - @iceberg.setter - def iceberg(self, iceberg): - """Sets the iceberg of this BatchFuturesOrder. - - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 - - :param iceberg: The iceberg of this BatchFuturesOrder. # noqa: E501 - :type: int - """ - - self._iceberg = iceberg - - @property - def price(self): - """Gets the price of this BatchFuturesOrder. # noqa: E501 - - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 - - :return: The price of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this BatchFuturesOrder. - - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 - - :param price: The price of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def close(self): - """Gets the close of this BatchFuturesOrder. # noqa: E501 - - Set as `true` to close the position, with `size` set to 0 # noqa: E501 - - :return: The close of this BatchFuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._close - - @close.setter - def close(self, close): - """Sets the close of this BatchFuturesOrder. - - Set as `true` to close the position, with `size` set to 0 # noqa: E501 - - :param close: The close of this BatchFuturesOrder. # noqa: E501 - :type: bool - """ - - self._close = close - - @property - def is_close(self): - """Gets the is_close of this BatchFuturesOrder. # noqa: E501 - - Is the order to close position # noqa: E501 - - :return: The is_close of this BatchFuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._is_close - - @is_close.setter - def is_close(self, is_close): - """Sets the is_close of this BatchFuturesOrder. - - Is the order to close position # noqa: E501 - - :param is_close: The is_close of this BatchFuturesOrder. # noqa: E501 - :type: bool - """ - - self._is_close = is_close - - @property - def reduce_only(self): - """Gets the reduce_only of this BatchFuturesOrder. # noqa: E501 - - Set as `true` to be reduce-only order # noqa: E501 - - :return: The reduce_only of this BatchFuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._reduce_only - - @reduce_only.setter - def reduce_only(self, reduce_only): - """Sets the reduce_only of this BatchFuturesOrder. - - Set as `true` to be reduce-only order # noqa: E501 - - :param reduce_only: The reduce_only of this BatchFuturesOrder. # noqa: E501 - :type: bool - """ - - self._reduce_only = reduce_only - - @property - def is_reduce_only(self): - """Gets the is_reduce_only of this BatchFuturesOrder. # noqa: E501 - - Is the order reduce-only # noqa: E501 - - :return: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._is_reduce_only - - @is_reduce_only.setter - def is_reduce_only(self, is_reduce_only): - """Sets the is_reduce_only of this BatchFuturesOrder. - - Is the order reduce-only # noqa: E501 - - :param is_reduce_only: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 - :type: bool - """ - - self._is_reduce_only = is_reduce_only - - @property - def is_liq(self): - """Gets the is_liq of this BatchFuturesOrder. # noqa: E501 - - Is the order for liquidation # noqa: E501 - - :return: The is_liq of this BatchFuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._is_liq - - @is_liq.setter - def is_liq(self, is_liq): - """Sets the is_liq of this BatchFuturesOrder. - - Is the order for liquidation # noqa: E501 - - :param is_liq: The is_liq of this BatchFuturesOrder. # noqa: E501 - :type: bool - """ - - self._is_liq = is_liq - - @property - def tif(self): - """Gets the tif of this BatchFuturesOrder. # noqa: E501 - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 - - :return: The tif of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._tif - - @tif.setter - def tif(self, tif): - """Sets the tif of this BatchFuturesOrder. - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 - - :param tif: The tif of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 - .format(tif, allowed_values) - ) - - self._tif = tif - - @property - def left(self): - """Gets the left of this BatchFuturesOrder. # noqa: E501 - - Size left to be traded # noqa: E501 - - :return: The left of this BatchFuturesOrder. # noqa: E501 - :rtype: int - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this BatchFuturesOrder. - - Size left to be traded # noqa: E501 - - :param left: The left of this BatchFuturesOrder. # noqa: E501 - :type: int - """ - - self._left = left - - @property - def fill_price(self): - """Gets the fill_price of this BatchFuturesOrder. # noqa: E501 - - Fill price of the order # noqa: E501 - - :return: The fill_price of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this BatchFuturesOrder. - - Fill price of the order # noqa: E501 - - :param fill_price: The fill_price of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def text(self): - """Gets the text of this BatchFuturesOrder. # noqa: E501 - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 - - :return: The text of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this BatchFuturesOrder. - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 - - :param text: The text of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def tkfr(self): - """Gets the tkfr of this BatchFuturesOrder. # noqa: E501 - - Taker fee # noqa: E501 - - :return: The tkfr of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._tkfr - - @tkfr.setter - def tkfr(self, tkfr): - """Sets the tkfr of this BatchFuturesOrder. - - Taker fee # noqa: E501 - - :param tkfr: The tkfr of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._tkfr = tkfr - - @property - def mkfr(self): - """Gets the mkfr of this BatchFuturesOrder. # noqa: E501 - - Maker fee # noqa: E501 - - :return: The mkfr of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._mkfr - - @mkfr.setter - def mkfr(self, mkfr): - """Sets the mkfr of this BatchFuturesOrder. - - Maker fee # noqa: E501 - - :param mkfr: The mkfr of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - - self._mkfr = mkfr - - @property - def refu(self): - """Gets the refu of this BatchFuturesOrder. # noqa: E501 - - Reference user ID # noqa: E501 - - :return: The refu of this BatchFuturesOrder. # noqa: E501 - :rtype: int - """ - return self._refu - - @refu.setter - def refu(self, refu): - """Sets the refu of this BatchFuturesOrder. - - Reference user ID # noqa: E501 - - :param refu: The refu of this BatchFuturesOrder. # noqa: E501 - :type: int - """ - - self._refu = refu - - @property - def auto_size(self): - """Gets the auto_size of this BatchFuturesOrder. # noqa: E501 - - Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 - - :return: The auto_size of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._auto_size - - @auto_size.setter - def auto_size(self, auto_size): - """Sets the auto_size of this BatchFuturesOrder. - - Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 - - :param auto_size: The auto_size of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["close_long", "close_short"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and auto_size not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `auto_size` ({0}), must be one of {1}" # noqa: E501 - .format(auto_size, allowed_values) - ) - - self._auto_size = auto_size - - @property - def stp_act(self): - """Gets the stp_act of this BatchFuturesOrder. # noqa: E501 - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :return: The stp_act of this BatchFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._stp_act - - @stp_act.setter - def stp_act(self, stp_act): - """Sets the stp_act of this BatchFuturesOrder. - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :param stp_act: The stp_act of this BatchFuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["co", "cn", "cb", "-"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 - .format(stp_act, allowed_values) - ) - - self._stp_act = stp_act - - @property - def stp_id(self): - """Gets the stp_id of this BatchFuturesOrder. # noqa: E501 - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :return: The stp_id of this BatchFuturesOrder. # noqa: E501 - :rtype: int - """ - return self._stp_id - - @stp_id.setter - def stp_id(self, stp_id): - """Sets the stp_id of this BatchFuturesOrder. - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :param stp_id: The stp_id of this BatchFuturesOrder. # noqa: E501 - :type: int - """ - - self._stp_id = stp_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, BatchFuturesOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BatchFuturesOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py deleted file mode 100644 index a90d329..0000000 --- a/gate_api/models/batch_order.py +++ /dev/null @@ -1,1173 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BatchOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'amend_text': 'str', - 'text': 'str', - 'succeeded': 'bool', - 'label': 'str', - 'message': 'str', - 'id': 'str', - 'create_time': 'str', - 'update_time': 'str', - 'create_time_ms': 'int', - 'update_time_ms': 'int', - 'status': 'str', - 'currency_pair': 'str', - 'type': 'str', - 'account': 'str', - 'side': 'str', - 'amount': 'str', - 'price': 'str', - 'time_in_force': 'str', - 'iceberg': 'str', - 'auto_borrow': 'bool', - 'auto_repay': 'bool', - 'left': 'str', - 'filled_amount': 'str', - 'fill_price': 'str', - 'filled_total': 'str', - 'avg_deal_price': 'str', - 'fee': 'str', - 'fee_currency': 'str', - 'point_fee': 'str', - 'gt_fee': 'str', - 'gt_discount': 'bool', - 'rebated_fee': 'str', - 'rebated_fee_currency': 'str', - 'stp_id': 'int', - 'stp_act': 'str', - 'finish_as': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'amend_text': 'amend_text', - 'text': 'text', - 'succeeded': 'succeeded', - 'label': 'label', - 'message': 'message', - 'id': 'id', - 'create_time': 'create_time', - 'update_time': 'update_time', - 'create_time_ms': 'create_time_ms', - 'update_time_ms': 'update_time_ms', - 'status': 'status', - 'currency_pair': 'currency_pair', - 'type': 'type', - 'account': 'account', - 'side': 'side', - 'amount': 'amount', - 'price': 'price', - 'time_in_force': 'time_in_force', - 'iceberg': 'iceberg', - 'auto_borrow': 'auto_borrow', - 'auto_repay': 'auto_repay', - 'left': 'left', - 'filled_amount': 'filled_amount', - 'fill_price': 'fill_price', - 'filled_total': 'filled_total', - 'avg_deal_price': 'avg_deal_price', - 'fee': 'fee', - 'fee_currency': 'fee_currency', - 'point_fee': 'point_fee', - 'gt_fee': 'gt_fee', - 'gt_discount': 'gt_discount', - 'rebated_fee': 'rebated_fee', - 'rebated_fee_currency': 'rebated_fee_currency', - 'stp_id': 'stp_id', - 'stp_act': 'stp_act', - 'finish_as': 'finish_as' - } - - def __init__(self, order_id=None, amend_text=None, text=None, succeeded=None, label=None, message=None, id=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, bool, str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, Configuration) -> None - """BatchOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._amend_text = None - self._text = None - self._succeeded = None - self._label = None - self._message = None - self._id = None - self._create_time = None - self._update_time = None - self._create_time_ms = None - self._update_time_ms = None - self._status = None - self._currency_pair = None - self._type = None - self._account = None - self._side = None - self._amount = None - self._price = None - self._time_in_force = None - self._iceberg = None - self._auto_borrow = None - self._auto_repay = None - self._left = None - self._filled_amount = None - self._fill_price = None - self._filled_total = None - self._avg_deal_price = None - self._fee = None - self._fee_currency = None - self._point_fee = None - self._gt_fee = None - self._gt_discount = None - self._rebated_fee = None - self._rebated_fee_currency = None - self._stp_id = None - self._stp_act = None - self._finish_as = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if amend_text is not None: - self.amend_text = amend_text - if text is not None: - self.text = text - if succeeded is not None: - self.succeeded = succeeded - if label is not None: - self.label = label - if message is not None: - self.message = message - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if update_time is not None: - self.update_time = update_time - if create_time_ms is not None: - self.create_time_ms = create_time_ms - if update_time_ms is not None: - self.update_time_ms = update_time_ms - if status is not None: - self.status = status - if currency_pair is not None: - self.currency_pair = currency_pair - if type is not None: - self.type = type - if account is not None: - self.account = account - if side is not None: - self.side = side - if amount is not None: - self.amount = amount - if price is not None: - self.price = price - if time_in_force is not None: - self.time_in_force = time_in_force - if iceberg is not None: - self.iceberg = iceberg - if auto_borrow is not None: - self.auto_borrow = auto_borrow - if auto_repay is not None: - self.auto_repay = auto_repay - if left is not None: - self.left = left - if filled_amount is not None: - self.filled_amount = filled_amount - if fill_price is not None: - self.fill_price = fill_price - if filled_total is not None: - self.filled_total = filled_total - if avg_deal_price is not None: - self.avg_deal_price = avg_deal_price - if fee is not None: - self.fee = fee - if fee_currency is not None: - self.fee_currency = fee_currency - if point_fee is not None: - self.point_fee = point_fee - if gt_fee is not None: - self.gt_fee = gt_fee - if gt_discount is not None: - self.gt_discount = gt_discount - if rebated_fee is not None: - self.rebated_fee = rebated_fee - if rebated_fee_currency is not None: - self.rebated_fee_currency = rebated_fee_currency - if stp_id is not None: - self.stp_id = stp_id - if stp_act is not None: - self.stp_act = stp_act - if finish_as is not None: - self.finish_as = finish_as - - @property - def order_id(self): - """Gets the order_id of this BatchOrder. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this BatchOrder. - - Order ID # noqa: E501 - - :param order_id: The order_id of this BatchOrder. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def amend_text(self): - """Gets the amend_text of this BatchOrder. # noqa: E501 - - The custom data that the user remarked when amending the order # noqa: E501 - - :return: The amend_text of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this BatchOrder. - - The custom data that the user remarked when amending the order # noqa: E501 - - :param amend_text: The amend_text of this BatchOrder. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - @property - def text(self): - """Gets the text of this BatchOrder. # noqa: E501 - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :return: The text of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this BatchOrder. - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :param text: The text of this BatchOrder. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def succeeded(self): - """Gets the succeeded of this BatchOrder. # noqa: E501 - - Whether the batch of orders succeeded # noqa: E501 - - :return: The succeeded of this BatchOrder. # noqa: E501 - :rtype: bool - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this BatchOrder. - - Whether the batch of orders succeeded # noqa: E501 - - :param succeeded: The succeeded of this BatchOrder. # noqa: E501 - :type: bool - """ - - self._succeeded = succeeded - - @property - def label(self): - """Gets the label of this BatchOrder. # noqa: E501 - - Error label, if any, otherwise an empty string # noqa: E501 - - :return: The label of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this BatchOrder. - - Error label, if any, otherwise an empty string # noqa: E501 - - :param label: The label of this BatchOrder. # noqa: E501 - :type: str - """ - - self._label = label - - @property - def message(self): - """Gets the message of this BatchOrder. # noqa: E501 - - Detailed error message, if any, otherwise an empty string # noqa: E501 - - :return: The message of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BatchOrder. - - Detailed error message, if any, otherwise an empty string # noqa: E501 - - :param message: The message of this BatchOrder. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def id(self): - """Gets the id of this BatchOrder. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this BatchOrder. - - Order ID # noqa: E501 - - :param id: The id of this BatchOrder. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this BatchOrder. # noqa: E501 - - Creation time of order # noqa: E501 - - :return: The create_time of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this BatchOrder. - - Creation time of order # noqa: E501 - - :param create_time: The create_time of this BatchOrder. # noqa: E501 - :type: str - """ - - self._create_time = create_time - - @property - def update_time(self): - """Gets the update_time of this BatchOrder. # noqa: E501 - - Last modification time of order # noqa: E501 - - :return: The update_time of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this BatchOrder. - - Last modification time of order # noqa: E501 - - :param update_time: The update_time of this BatchOrder. # noqa: E501 - :type: str - """ - - self._update_time = update_time - - @property - def create_time_ms(self): - """Gets the create_time_ms of this BatchOrder. # noqa: E501 - - Creation time of order (in milliseconds) # noqa: E501 - - :return: The create_time_ms of this BatchOrder. # 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 BatchOrder. - - Creation time of order (in milliseconds) # noqa: E501 - - :param create_time_ms: The create_time_ms of this BatchOrder. # noqa: E501 - :type: int - """ - - self._create_time_ms = create_time_ms - - @property - def update_time_ms(self): - """Gets the update_time_ms of this BatchOrder. # noqa: E501 - - Last modification time of order (in milliseconds) # noqa: E501 - - :return: The update_time_ms of this BatchOrder. # 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 BatchOrder. - - Last modification time of order (in milliseconds) # noqa: E501 - - :param update_time_ms: The update_time_ms of this BatchOrder. # noqa: E501 - :type: int - """ - - self._update_time_ms = update_time_ms - - @property - def status(self): - """Gets the status of this BatchOrder. # noqa: E501 - - Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 - - :return: The status of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this BatchOrder. - - Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 - - :param status: The status of this BatchOrder. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed", "cancelled"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def currency_pair(self): - """Gets the currency_pair of this BatchOrder. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this BatchOrder. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this BatchOrder. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def type(self): - """Gets the type of this BatchOrder. # noqa: E501 - - Order Type - limit : Limit Order - market : Market Order # noqa: E501 - - :return: The type of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this BatchOrder. - - Order Type - limit : Limit Order - market : Market Order # noqa: E501 - - :param type: The type of this BatchOrder. # noqa: E501 - :type: str - """ - allowed_values = ["limit", "market"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def account(self): - """Gets the account of this BatchOrder. # noqa: E501 - - Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 - - :return: The account of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this BatchOrder. - - Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 - - :param account: The account of this BatchOrder. # noqa: E501 - :type: str - """ - allowed_values = ["spot", "margin", "cross_margin", "unified"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `account` ({0}), must be one of {1}" # noqa: E501 - .format(account, allowed_values) - ) - - self._account = account - - @property - def side(self): - """Gets the side of this BatchOrder. # noqa: E501 - - Order side # noqa: E501 - - :return: The side of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this BatchOrder. - - Order side # noqa: E501 - - :param side: The side of this BatchOrder. # noqa: E501 - :type: str - """ - 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 BatchOrder. # noqa: E501 - - Trade amount # noqa: E501 - - :return: The amount of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this BatchOrder. - - Trade amount # noqa: E501 - - :param amount: The amount of this BatchOrder. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def price(self): - """Gets the price of this BatchOrder. # noqa: E501 - - Order price # noqa: E501 - - :return: The price of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this BatchOrder. - - Order price # noqa: E501 - - :param price: The price of this BatchOrder. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def time_in_force(self): - """Gets the time_in_force of this BatchOrder. # noqa: E501 - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 - - :return: The time_in_force of this BatchOrder. # 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 BatchOrder. - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 - - :param time_in_force: The time_in_force of this BatchOrder. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 - .format(time_in_force, allowed_values) - ) - - self._time_in_force = time_in_force - - @property - def iceberg(self): - """Gets the iceberg of this BatchOrder. # noqa: E501 - - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 - - :return: The iceberg of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._iceberg - - @iceberg.setter - def iceberg(self, iceberg): - """Sets the iceberg of this BatchOrder. - - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 - - :param iceberg: The iceberg of this BatchOrder. # noqa: E501 - :type: str - """ - - self._iceberg = iceberg - - @property - def auto_borrow(self): - """Gets the auto_borrow of this BatchOrder. # noqa: E501 - - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 - - :return: The auto_borrow of this BatchOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_borrow - - @auto_borrow.setter - def auto_borrow(self, auto_borrow): - """Sets the auto_borrow of this BatchOrder. - - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 - - :param auto_borrow: The auto_borrow of this BatchOrder. # noqa: E501 - :type: bool - """ - - self._auto_borrow = auto_borrow - - @property - def auto_repay(self): - """Gets the auto_repay of this BatchOrder. # noqa: E501 - - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 - - :return: The auto_repay of this BatchOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_repay - - @auto_repay.setter - def auto_repay(self, auto_repay): - """Sets the auto_repay of this BatchOrder. - - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 - - :param auto_repay: The auto_repay of this BatchOrder. # noqa: E501 - :type: bool - """ - - self._auto_repay = auto_repay - - @property - def left(self): - """Gets the left of this BatchOrder. # noqa: E501 - - Amount left to fill # noqa: E501 - - :return: The left of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this BatchOrder. - - Amount left to fill # noqa: E501 - - :param left: The left of this BatchOrder. # noqa: E501 - :type: str - """ - - self._left = left - - @property - def filled_amount(self): - """Gets the filled_amount of this BatchOrder. # noqa: E501 - - Amount traded to fill # noqa: E501 - - :return: The filled_amount of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._filled_amount - - @filled_amount.setter - def filled_amount(self, filled_amount): - """Sets the filled_amount of this BatchOrder. - - Amount traded to fill # noqa: E501 - - :param filled_amount: The filled_amount of this BatchOrder. # noqa: E501 - :type: str - """ - - self._filled_amount = filled_amount - - @property - def fill_price(self): - """Gets the fill_price of this BatchOrder. # noqa: E501 - - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 - - :return: The fill_price of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this BatchOrder. - - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 - - :param fill_price: The fill_price of this BatchOrder. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def filled_total(self): - """Gets the filled_total of this BatchOrder. # noqa: E501 - - Total filled in quote currency # noqa: E501 - - :return: The filled_total of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._filled_total - - @filled_total.setter - def filled_total(self, filled_total): - """Sets the filled_total of this BatchOrder. - - Total filled in quote currency # noqa: E501 - - :param filled_total: The filled_total of this BatchOrder. # noqa: E501 - :type: str - """ - - self._filled_total = filled_total - - @property - def avg_deal_price(self): - """Gets the avg_deal_price of this BatchOrder. # noqa: E501 - - Average fill price # noqa: E501 - - :return: The avg_deal_price of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._avg_deal_price - - @avg_deal_price.setter - def avg_deal_price(self, avg_deal_price): - """Sets the avg_deal_price of this BatchOrder. - - Average fill price # noqa: E501 - - :param avg_deal_price: The avg_deal_price of this BatchOrder. # noqa: E501 - :type: str - """ - - self._avg_deal_price = avg_deal_price - - @property - def fee(self): - """Gets the fee of this BatchOrder. # noqa: E501 - - Fee deducted # noqa: E501 - - :return: The fee of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this BatchOrder. - - Fee deducted # noqa: E501 - - :param fee: The fee of this BatchOrder. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def fee_currency(self): - """Gets the fee_currency of this BatchOrder. # noqa: E501 - - Fee currency unit # noqa: E501 - - :return: The fee_currency of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._fee_currency - - @fee_currency.setter - def fee_currency(self, fee_currency): - """Sets the fee_currency of this BatchOrder. - - Fee currency unit # noqa: E501 - - :param fee_currency: The fee_currency of this BatchOrder. # noqa: E501 - :type: str - """ - - self._fee_currency = fee_currency - - @property - def point_fee(self): - """Gets the point_fee of this BatchOrder. # noqa: E501 - - Points used to deduct fee # noqa: E501 - - :return: The point_fee of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._point_fee - - @point_fee.setter - def point_fee(self, point_fee): - """Sets the point_fee of this BatchOrder. - - Points used to deduct fee # noqa: E501 - - :param point_fee: The point_fee of this BatchOrder. # noqa: E501 - :type: str - """ - - self._point_fee = point_fee - - @property - def gt_fee(self): - """Gets the gt_fee of this BatchOrder. # noqa: E501 - - GT used to deduct fee # noqa: E501 - - :return: The gt_fee of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._gt_fee - - @gt_fee.setter - def gt_fee(self, gt_fee): - """Sets the gt_fee of this BatchOrder. - - GT used to deduct fee # noqa: E501 - - :param gt_fee: The gt_fee of this BatchOrder. # noqa: E501 - :type: str - """ - - self._gt_fee = gt_fee - - @property - def gt_discount(self): - """Gets the gt_discount of this BatchOrder. # noqa: E501 - - Whether GT fee discount is used # noqa: E501 - - :return: The gt_discount of this BatchOrder. # noqa: E501 - :rtype: bool - """ - return self._gt_discount - - @gt_discount.setter - def gt_discount(self, gt_discount): - """Sets the gt_discount of this BatchOrder. - - Whether GT fee discount is used # noqa: E501 - - :param gt_discount: The gt_discount of this BatchOrder. # noqa: E501 - :type: bool - """ - - self._gt_discount = gt_discount - - @property - def rebated_fee(self): - """Gets the rebated_fee of this BatchOrder. # noqa: E501 - - Rebated fee # noqa: E501 - - :return: The rebated_fee of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._rebated_fee - - @rebated_fee.setter - def rebated_fee(self, rebated_fee): - """Sets the rebated_fee of this BatchOrder. - - Rebated fee # noqa: E501 - - :param rebated_fee: The rebated_fee of this BatchOrder. # noqa: E501 - :type: str - """ - - self._rebated_fee = rebated_fee - - @property - def rebated_fee_currency(self): - """Gets the rebated_fee_currency of this BatchOrder. # noqa: E501 - - Rebated fee currency unit # noqa: E501 - - :return: The rebated_fee_currency of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._rebated_fee_currency - - @rebated_fee_currency.setter - def rebated_fee_currency(self, rebated_fee_currency): - """Sets the rebated_fee_currency of this BatchOrder. - - Rebated fee currency unit # noqa: E501 - - :param rebated_fee_currency: The rebated_fee_currency of this BatchOrder. # noqa: E501 - :type: str - """ - - self._rebated_fee_currency = rebated_fee_currency - - @property - def stp_id(self): - """Gets the stp_id of this BatchOrder. # noqa: E501 - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :return: The stp_id of this BatchOrder. # noqa: E501 - :rtype: int - """ - return self._stp_id - - @stp_id.setter - def stp_id(self, stp_id): - """Sets the stp_id of this BatchOrder. - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :param stp_id: The stp_id of this BatchOrder. # noqa: E501 - :type: int - """ - - self._stp_id = stp_id - - @property - def stp_act(self): - """Gets the stp_act of this BatchOrder. # noqa: E501 - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :return: The stp_act of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._stp_act - - @stp_act.setter - def stp_act(self, stp_act): - """Sets the stp_act of this BatchOrder. - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :param stp_act: The stp_act of this BatchOrder. # noqa: E501 - :type: str - """ - allowed_values = ["cn", "co", "cb", "-"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 - .format(stp_act, allowed_values) - ) - - self._stp_act = stp_act - - @property - def finish_as(self): - """Gets the finish_as of this BatchOrder. # noqa: E501 - - How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 - - :return: The finish_as of this BatchOrder. # noqa: E501 - :rtype: str - """ - return self._finish_as - - @finish_as.setter - def finish_as(self, finish_as): - """Sets the finish_as of this BatchOrder. - - How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 - - :param finish_as: The finish_as of this BatchOrder. # noqa: E501 - :type: str - """ - allowed_values = ["open", "filled", "cancelled", "ioc", "stp"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 - .format(finish_as, allowed_values) - ) - - self._finish_as = finish_as - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BatchOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BatchOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py deleted file mode 100644 index 58762be..0000000 --- a/gate_api/models/borrow_currency_info.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BorrowCurrencyInfo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'left_repay_principal': 'str', - 'left_repay_interest': 'str', - 'left_repay_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'left_repay_principal': 'left_repay_principal', - 'left_repay_interest': 'left_repay_interest', - 'left_repay_usdt': 'left_repay_usdt' - } - - def __init__(self, currency=None, index_price=None, left_repay_principal=None, left_repay_interest=None, left_repay_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """BorrowCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._left_repay_principal = None - self._left_repay_interest = None - self._left_repay_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if left_repay_principal is not None: - self.left_repay_principal = left_repay_principal - if left_repay_interest is not None: - self.left_repay_interest = left_repay_interest - if left_repay_usdt is not None: - self.left_repay_usdt = left_repay_usdt - - @property - def currency(self): - """Gets the currency of this BorrowCurrencyInfo. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this BorrowCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this BorrowCurrencyInfo. - - Currency # noqa: E501 - - :param currency: The currency of this BorrowCurrencyInfo. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this BorrowCurrencyInfo. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this BorrowCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this BorrowCurrencyInfo. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this BorrowCurrencyInfo. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def left_repay_principal(self): - """Gets the left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 - - outstanding principal # noqa: E501 - - :return: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._left_repay_principal - - @left_repay_principal.setter - def left_repay_principal(self, left_repay_principal): - """Sets the left_repay_principal of this BorrowCurrencyInfo. - - outstanding principal # noqa: E501 - - :param left_repay_principal: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 - :type: str - """ - - self._left_repay_principal = left_repay_principal - - @property - def left_repay_interest(self): - """Gets the left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 - - outstanding interest # noqa: E501 - - :return: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._left_repay_interest - - @left_repay_interest.setter - def left_repay_interest(self, left_repay_interest): - """Sets the left_repay_interest of this BorrowCurrencyInfo. - - outstanding interest # noqa: E501 - - :param left_repay_interest: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 - :type: str - """ - - self._left_repay_interest = left_repay_interest - - @property - def left_repay_usdt(self): - """Gets the left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 - - Value of left total repayments amount in USDT # noqa: E501 - - :return: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._left_repay_usdt - - @left_repay_usdt.setter - def left_repay_usdt(self, left_repay_usdt): - """Sets the left_repay_usdt of this BorrowCurrencyInfo. - - Value of left total repayments amount in USDT # noqa: E501 - - :param left_repay_usdt: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 - :type: str - """ - - self._left_repay_usdt = left_repay_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BorrowCurrencyInfo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BorrowCurrencyInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py deleted file mode 100644 index e6f2d36..0000000 --- a/gate_api/models/broker_commission.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BrokerCommission(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'int', - 'list': 'list[BrokerCommission1]' - } - - attribute_map = { - 'total': 'total', - 'list': 'list' - } - - def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[BrokerCommission1], Configuration) -> None - """BrokerCommission - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._list = None - self.discriminator = None - - if total is not None: - self.total = total - if list is not None: - self.list = list - - @property - def total(self): - """Gets the total of this BrokerCommission. # noqa: E501 - - Total # noqa: E501 - - :return: The total of this BrokerCommission. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this BrokerCommission. - - Total # noqa: E501 - - :param total: The total of this BrokerCommission. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def list(self): - """Gets the list of this BrokerCommission. # noqa: E501 - - List of comission history # noqa: E501 - - :return: The list of this BrokerCommission. # noqa: E501 - :rtype: list[BrokerCommission1] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this BrokerCommission. - - List of comission history # noqa: E501 - - :param list: The list of this BrokerCommission. # noqa: E501 - :type: list[BrokerCommission1] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BrokerCommission): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BrokerCommission): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py deleted file mode 100644 index 3c60c83..0000000 --- a/gate_api/models/broker_commission1.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BrokerCommission1(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'commission_time': 'int', - 'user_id': 'int', - 'group_name': 'str', - 'amount': 'str', - 'fee': 'str', - 'fee_asset': 'str', - 'rebate_fee': 'str', - 'source': 'str', - 'currency_pair': 'str' - } - - attribute_map = { - 'commission_time': 'commission_time', - 'user_id': 'user_id', - 'group_name': 'group_name', - 'amount': 'amount', - 'fee': 'fee', - 'fee_asset': 'fee_asset', - 'rebate_fee': 'rebate_fee', - 'source': 'source', - 'currency_pair': 'currency_pair' - } - - def __init__(self, commission_time=None, user_id=None, group_name=None, amount=None, fee=None, fee_asset=None, rebate_fee=None, source=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, str, Configuration) -> None - """BrokerCommission1 - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._commission_time = None - self._user_id = None - self._group_name = None - self._amount = None - self._fee = None - self._fee_asset = None - self._rebate_fee = None - self._source = None - self._currency_pair = None - self.discriminator = None - - if commission_time is not None: - self.commission_time = commission_time - if user_id is not None: - self.user_id = user_id - if group_name is not None: - self.group_name = group_name - if amount is not None: - self.amount = amount - if fee is not None: - self.fee = fee - if fee_asset is not None: - self.fee_asset = fee_asset - if rebate_fee is not None: - self.rebate_fee = rebate_fee - if source is not None: - self.source = source - if currency_pair is not None: - self.currency_pair = currency_pair - - @property - def commission_time(self): - """Gets the commission_time of this BrokerCommission1. # noqa: E501 - - Commission Time. (unix timestamp) # noqa: E501 - - :return: The commission_time of this BrokerCommission1. # noqa: E501 - :rtype: int - """ - return self._commission_time - - @commission_time.setter - def commission_time(self, commission_time): - """Sets the commission_time of this BrokerCommission1. - - Commission Time. (unix timestamp) # noqa: E501 - - :param commission_time: The commission_time of this BrokerCommission1. # noqa: E501 - :type: int - """ - - self._commission_time = commission_time - - @property - def user_id(self): - """Gets the user_id of this BrokerCommission1. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this BrokerCommission1. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this BrokerCommission1. - - User ID # noqa: E501 - - :param user_id: The user_id of this BrokerCommission1. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def group_name(self): - """Gets the group_name of this BrokerCommission1. # noqa: E501 - - Group name # noqa: E501 - - :return: The group_name of this BrokerCommission1. # noqa: E501 - :rtype: str - """ - return self._group_name - - @group_name.setter - def group_name(self, group_name): - """Sets the group_name of this BrokerCommission1. - - Group name # noqa: E501 - - :param group_name: The group_name of this BrokerCommission1. # noqa: E501 - :type: str - """ - - self._group_name = group_name - - @property - def amount(self): - """Gets the amount of this BrokerCommission1. # noqa: E501 - - The amount of commission rebates # noqa: E501 - - :return: The amount of this BrokerCommission1. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this BrokerCommission1. - - The amount of commission rebates # noqa: E501 - - :param amount: The amount of this BrokerCommission1. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def fee(self): - """Gets the fee of this BrokerCommission1. # noqa: E501 - - Fee # noqa: E501 - - :return: The fee of this BrokerCommission1. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this BrokerCommission1. - - Fee # noqa: E501 - - :param fee: The fee of this BrokerCommission1. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def fee_asset(self): - """Gets the fee_asset of this BrokerCommission1. # noqa: E501 - - Fee currency # noqa: E501 - - :return: The fee_asset of this BrokerCommission1. # noqa: E501 - :rtype: str - """ - return self._fee_asset - - @fee_asset.setter - def fee_asset(self, fee_asset): - """Sets the fee_asset of this BrokerCommission1. - - Fee currency # noqa: E501 - - :param fee_asset: The fee_asset of this BrokerCommission1. # noqa: E501 - :type: str - """ - - self._fee_asset = fee_asset - - @property - def rebate_fee(self): - """Gets the rebate_fee of this BrokerCommission1. # noqa: E501 - - The income from rebates, converted to USDT # noqa: E501 - - :return: The rebate_fee of this BrokerCommission1. # noqa: E501 - :rtype: str - """ - return self._rebate_fee - - @rebate_fee.setter - def rebate_fee(self, rebate_fee): - """Sets the rebate_fee of this BrokerCommission1. - - The income from rebates, converted to USDT # noqa: E501 - - :param rebate_fee: The rebate_fee of this BrokerCommission1. # noqa: E501 - :type: str - """ - - self._rebate_fee = rebate_fee - - @property - def source(self): - """Gets the source of this BrokerCommission1. # noqa: E501 - - Rebate Type: Spot、Futures、Options # noqa: E501 - - :return: The source of this BrokerCommission1. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this BrokerCommission1. - - Rebate Type: Spot、Futures、Options # noqa: E501 - - :param source: The source of this BrokerCommission1. # noqa: E501 - :type: str - """ - - self._source = source - - @property - def currency_pair(self): - """Gets the currency_pair of this BrokerCommission1. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this BrokerCommission1. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this BrokerCommission1. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this BrokerCommission1. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BrokerCommission1): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BrokerCommission1): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py deleted file mode 100644 index 96ce328..0000000 --- a/gate_api/models/broker_transaction.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BrokerTransaction(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'int', - 'list': 'list[BrokerTransaction1]' - } - - attribute_map = { - 'total': 'total', - 'list': 'list' - } - - def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[BrokerTransaction1], Configuration) -> None - """BrokerTransaction - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._list = None - self.discriminator = None - - if total is not None: - self.total = total - if list is not None: - self.list = list - - @property - def total(self): - """Gets the total of this BrokerTransaction. # noqa: E501 - - Total # noqa: E501 - - :return: The total of this BrokerTransaction. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this BrokerTransaction. - - Total # noqa: E501 - - :param total: The total of this BrokerTransaction. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def list(self): - """Gets the list of this BrokerTransaction. # noqa: E501 - - List of transaction history # noqa: E501 - - :return: The list of this BrokerTransaction. # noqa: E501 - :rtype: list[BrokerTransaction1] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this BrokerTransaction. - - List of transaction history # noqa: E501 - - :param list: The list of this BrokerTransaction. # noqa: E501 - :type: list[BrokerTransaction1] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BrokerTransaction): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BrokerTransaction): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py deleted file mode 100644 index 3e507d1..0000000 --- a/gate_api/models/broker_transaction1.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class BrokerTransaction1(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'transaction_time': 'int', - 'user_id': 'int', - 'group_name': 'str', - 'fee': 'str', - 'currency_pair': 'str', - 'amount': 'str', - 'fee_asset': 'str', - 'source': 'str' - } - - attribute_map = { - 'transaction_time': 'transaction_time', - 'user_id': 'user_id', - 'group_name': 'group_name', - 'fee': 'fee', - 'currency_pair': 'currency_pair', - 'amount': 'amount', - 'fee_asset': 'fee_asset', - 'source': 'source' - } - - def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, currency_pair=None, amount=None, fee_asset=None, source=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, Configuration) -> None - """BrokerTransaction1 - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._transaction_time = None - self._user_id = None - self._group_name = None - self._fee = None - self._currency_pair = None - self._amount = None - self._fee_asset = None - self._source = None - self.discriminator = None - - if transaction_time is not None: - self.transaction_time = transaction_time - if user_id is not None: - self.user_id = user_id - if group_name is not None: - self.group_name = group_name - if fee is not None: - self.fee = fee - if currency_pair is not None: - self.currency_pair = currency_pair - if amount is not None: - self.amount = amount - if fee_asset is not None: - self.fee_asset = fee_asset - if source is not None: - self.source = source - - @property - def transaction_time(self): - """Gets the transaction_time of this BrokerTransaction1. # noqa: E501 - - Transaction Time. (unix timestamp) # noqa: E501 - - :return: The transaction_time of this BrokerTransaction1. # noqa: E501 - :rtype: int - """ - return self._transaction_time - - @transaction_time.setter - def transaction_time(self, transaction_time): - """Sets the transaction_time of this BrokerTransaction1. - - Transaction Time. (unix timestamp) # noqa: E501 - - :param transaction_time: The transaction_time of this BrokerTransaction1. # noqa: E501 - :type: int - """ - - self._transaction_time = transaction_time - - @property - def user_id(self): - """Gets the user_id of this BrokerTransaction1. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this BrokerTransaction1. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this BrokerTransaction1. - - User ID # noqa: E501 - - :param user_id: The user_id of this BrokerTransaction1. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def group_name(self): - """Gets the group_name of this BrokerTransaction1. # noqa: E501 - - Group name # noqa: E501 - - :return: The group_name of this BrokerTransaction1. # noqa: E501 - :rtype: str - """ - return self._group_name - - @group_name.setter - def group_name(self, group_name): - """Sets the group_name of this BrokerTransaction1. - - Group name # noqa: E501 - - :param group_name: The group_name of this BrokerTransaction1. # noqa: E501 - :type: str - """ - - self._group_name = group_name - - @property - def fee(self): - """Gets the fee of this BrokerTransaction1. # noqa: E501 - - fee (usdt) # noqa: E501 - - :return: The fee of this BrokerTransaction1. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this BrokerTransaction1. - - fee (usdt) # noqa: E501 - - :param fee: The fee of this BrokerTransaction1. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def currency_pair(self): - """Gets the currency_pair of this BrokerTransaction1. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this BrokerTransaction1. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this BrokerTransaction1. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this BrokerTransaction1. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def amount(self): - """Gets the amount of this BrokerTransaction1. # noqa: E501 - - Commission Amount # noqa: E501 - - :return: The amount of this BrokerTransaction1. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this BrokerTransaction1. - - Commission Amount # noqa: E501 - - :param amount: The amount of this BrokerTransaction1. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def fee_asset(self): - """Gets the fee_asset of this BrokerTransaction1. # noqa: E501 - - Fee currency # noqa: E501 - - :return: The fee_asset of this BrokerTransaction1. # noqa: E501 - :rtype: str - """ - return self._fee_asset - - @fee_asset.setter - def fee_asset(self, fee_asset): - """Sets the fee_asset of this BrokerTransaction1. - - Fee currency # noqa: E501 - - :param fee_asset: The fee_asset of this BrokerTransaction1. # noqa: E501 - :type: str - """ - - self._fee_asset = fee_asset - - @property - def source(self): - """Gets the source of this BrokerTransaction1. # noqa: E501 - - Rebate Type: Spot、Futures、Options # noqa: E501 - - :return: The source of this BrokerTransaction1. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this BrokerTransaction1. - - Rebate Type: Spot、Futures、Options # noqa: E501 - - :param source: The source of this BrokerTransaction1. # noqa: E501 - :type: str - """ - - self._source = source - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BrokerTransaction1): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BrokerTransaction1): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py deleted file mode 100644 index d8e5f13..0000000 --- a/gate_api/models/cancel_batch_order.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CancelBatchOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency_pair': 'str', - 'id': 'str', - 'account': 'str', - 'action_mode': 'str' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'id': 'id', - 'account': 'account', - 'action_mode': 'action_mode' - } - - def __init__(self, currency_pair=None, id=None, account=None, action_mode=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """CancelBatchOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pair = None - self._id = None - self._account = None - self._action_mode = None - self.discriminator = None - - self.currency_pair = currency_pair - self.id = id - if account is not None: - self.account = account - if action_mode is not None: - self.action_mode = action_mode - - @property - def currency_pair(self): - """Gets the currency_pair of this CancelBatchOrder. # noqa: E501 - - Order currency pair # noqa: E501 - - :return: The currency_pair of this CancelBatchOrder. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this CancelBatchOrder. - - Order currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this CancelBatchOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 - raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 - - self._currency_pair = currency_pair - - @property - def id(self): - """Gets the id of this CancelBatchOrder. # noqa: E501 - - Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation # noqa: E501 - - :return: The id of this CancelBatchOrder. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CancelBatchOrder. - - Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation # noqa: E501 - - :param id: The id of this CancelBatchOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def account(self): - """Gets the account of this CancelBatchOrder. # noqa: E501 - - If the canceled order is a unified account apikey, this field must be specified and set to `unified` # noqa: E501 - - :return: The account of this CancelBatchOrder. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this CancelBatchOrder. - - If the canceled order is a unified account apikey, this field must be specified and set to `unified` # noqa: E501 - - :param account: The account of this CancelBatchOrder. # noqa: E501 - :type: str - """ - - self._account = account - - @property - def action_mode(self): - """Gets the action_mode of this CancelBatchOrder. # noqa: E501 - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :return: The action_mode of this CancelBatchOrder. # noqa: E501 - :rtype: str - """ - return self._action_mode - - @action_mode.setter - def action_mode(self, action_mode): - """Sets the action_mode of this CancelBatchOrder. - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :param action_mode: The action_mode of this CancelBatchOrder. # noqa: E501 - :type: str - """ - - self._action_mode = action_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CancelBatchOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CancelBatchOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py deleted file mode 100644 index d4be89f..0000000 --- a/gate_api/models/cancel_order_result.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CancelOrderResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency_pair': 'str', - 'id': 'str', - 'text': 'str', - 'succeeded': 'bool', - 'label': 'str', - 'message': 'str', - 'account': 'str' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'id': 'id', - 'text': 'text', - 'succeeded': 'succeeded', - 'label': 'label', - 'message': 'message', - 'account': 'account' - } - - def __init__(self, currency_pair=None, id=None, text=None, succeeded=None, label=None, message=None, account=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, bool, str, str, str, Configuration) -> None - """CancelOrderResult - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pair = None - self._id = None - self._text = None - self._succeeded = None - self._label = None - self._message = None - self._account = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if id is not None: - self.id = id - if text is not None: - self.text = text - if succeeded is not None: - self.succeeded = succeeded - if label is not None: - self.label = label - if message is not None: - self.message = message - if account is not None: - self.account = account - - @property - def currency_pair(self): - """Gets the currency_pair of this CancelOrderResult. # noqa: E501 - - Order currency pair # noqa: E501 - - :return: The currency_pair of this CancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this CancelOrderResult. - - Order currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this CancelOrderResult. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def id(self): - """Gets the id of this CancelOrderResult. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this CancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CancelOrderResult. - - Order ID # noqa: E501 - - :param id: The id of this CancelOrderResult. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def text(self): - """Gets the text of this CancelOrderResult. # noqa: E501 - - Custom order information # noqa: E501 - - :return: The text of this CancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this CancelOrderResult. - - Custom order information # noqa: E501 - - :param text: The text of this CancelOrderResult. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def succeeded(self): - """Gets the succeeded of this CancelOrderResult. # noqa: E501 - - Whether cancellation succeeded # noqa: E501 - - :return: The succeeded of this CancelOrderResult. # noqa: E501 - :rtype: bool - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this CancelOrderResult. - - Whether cancellation succeeded # noqa: E501 - - :param succeeded: The succeeded of this CancelOrderResult. # noqa: E501 - :type: bool - """ - - self._succeeded = succeeded - - @property - def label(self): - """Gets the label of this CancelOrderResult. # noqa: E501 - - Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 - - :return: The label of this CancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this CancelOrderResult. - - Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 - - :param label: The label of this CancelOrderResult. # noqa: E501 - :type: str - """ - - self._label = label - - @property - def message(self): - """Gets the message of this CancelOrderResult. # noqa: E501 - - Error message when failed to cancel the order; empty if succeeded # noqa: E501 - - :return: The message of this CancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this CancelOrderResult. - - Error message when failed to cancel the order; empty if succeeded # noqa: E501 - - :param message: The message of this CancelOrderResult. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def account(self): - """Gets the account of this CancelOrderResult. # noqa: E501 - - Default is empty (deprecated) # noqa: E501 - - :return: The account of this CancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this CancelOrderResult. - - Default is empty (deprecated) # noqa: E501 - - :param account: The account of this CancelOrderResult. # noqa: E501 - :type: str - """ - - self._account = account - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CancelOrderResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CancelOrderResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py deleted file mode 100644 index 3ed0b11..0000000 --- a/gate_api/models/collateral_adjust.py +++ /dev/null @@ -1,181 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralAdjust(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'type': 'str', - 'collaterals': 'list[CollateralCurrency]' - } - - attribute_map = { - 'order_id': 'order_id', - 'type': 'type', - 'collaterals': 'collaterals' - } - - def __init__(self, order_id=None, type=None, collaterals=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, list[CollateralCurrency], Configuration) -> None - """CollateralAdjust - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._type = None - self._collaterals = None - self.discriminator = None - - self.order_id = order_id - self.type = type - if collaterals is not None: - self.collaterals = collaterals - - @property - def order_id(self): - """Gets the order_id of this CollateralAdjust. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this CollateralAdjust. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this CollateralAdjust. - - Order ID # noqa: E501 - - :param order_id: The order_id of this CollateralAdjust. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 - raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 - - self._order_id = order_id - - @property - def type(self): - """Gets the type of this CollateralAdjust. # noqa: E501 - - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 - - :return: The type of this CollateralAdjust. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CollateralAdjust. - - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 - - :param type: The type of this CollateralAdjust. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - @property - def collaterals(self): - """Gets the collaterals of this CollateralAdjust. # noqa: E501 - - Collateral Currency List # noqa: E501 - - :return: The collaterals of this CollateralAdjust. # noqa: E501 - :rtype: list[CollateralCurrency] - """ - return self._collaterals - - @collaterals.setter - def collaterals(self, collaterals): - """Sets the collaterals of this CollateralAdjust. - - Collateral Currency List # noqa: E501 - - :param collaterals: The collaterals of this CollateralAdjust. # noqa: E501 - :type: list[CollateralCurrency] - """ - - self._collaterals = collaterals - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralAdjust): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralAdjust): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py deleted file mode 100644 index 4f0e933..0000000 --- a/gate_api/models/collateral_adjust_res.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralAdjustRes(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'collateral_currencies': 'list[CollateralCurrencyRes]' - } - - attribute_map = { - 'order_id': 'order_id', - 'collateral_currencies': 'collateral_currencies' - } - - def __init__(self, order_id=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[CollateralCurrencyRes], Configuration) -> None - """CollateralAdjustRes - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._collateral_currencies = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if collateral_currencies is not None: - self.collateral_currencies = collateral_currencies - - @property - def order_id(self): - """Gets the order_id of this CollateralAdjustRes. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this CollateralAdjustRes. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this CollateralAdjustRes. - - Order ID # noqa: E501 - - :param order_id: The order_id of this CollateralAdjustRes. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def collateral_currencies(self): - """Gets the collateral_currencies of this CollateralAdjustRes. # noqa: E501 - - Collateral Currency Information # noqa: E501 - - :return: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 - :rtype: list[CollateralCurrencyRes] - """ - return self._collateral_currencies - - @collateral_currencies.setter - def collateral_currencies(self, collateral_currencies): - """Sets the collateral_currencies of this CollateralAdjustRes. - - Collateral Currency Information # noqa: E501 - - :param collateral_currencies: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 - :type: list[CollateralCurrencyRes] - """ - - self._collateral_currencies = collateral_currencies - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralAdjustRes): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralAdjustRes): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py deleted file mode 100644 index 3b77762..0000000 --- a/gate_api/models/collateral_align.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralAlign(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'collateral_currency': 'str', - 'collateral_amount': 'str', - 'type': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'collateral_currency': 'collateral_currency', - 'collateral_amount': 'collateral_amount', - 'type': 'type' - } - - def __init__(self, order_id=None, collateral_currency=None, collateral_amount=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, Configuration) -> None - """CollateralAlign - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._collateral_currency = None - self._collateral_amount = None - self._type = None - self.discriminator = None - - self.order_id = order_id - self.collateral_currency = collateral_currency - self.collateral_amount = collateral_amount - self.type = type - - @property - def order_id(self): - """Gets the order_id of this CollateralAlign. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this CollateralAlign. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this CollateralAlign. - - Order ID # noqa: E501 - - :param order_id: The order_id of this CollateralAlign. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 - raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 - - self._order_id = order_id - - @property - def collateral_currency(self): - """Gets the collateral_currency of this CollateralAlign. # noqa: E501 - - Collateral # noqa: E501 - - :return: The collateral_currency of this CollateralAlign. # noqa: E501 - :rtype: str - """ - return self._collateral_currency - - @collateral_currency.setter - def collateral_currency(self, collateral_currency): - """Sets the collateral_currency of this CollateralAlign. - - Collateral # noqa: E501 - - :param collateral_currency: The collateral_currency of this CollateralAlign. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and collateral_currency is None: # noqa: E501 - raise ValueError("Invalid value for `collateral_currency`, must not be `None`") # noqa: E501 - - self._collateral_currency = collateral_currency - - @property - def collateral_amount(self): - """Gets the collateral_amount of this CollateralAlign. # noqa: E501 - - Collateral amount # noqa: E501 - - :return: The collateral_amount of this CollateralAlign. # noqa: E501 - :rtype: str - """ - return self._collateral_amount - - @collateral_amount.setter - def collateral_amount(self, collateral_amount): - """Sets the collateral_amount of this CollateralAlign. - - Collateral amount # noqa: E501 - - :param collateral_amount: The collateral_amount of this CollateralAlign. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and collateral_amount is None: # noqa: E501 - raise ValueError("Invalid value for `collateral_amount`, must not be `None`") # noqa: E501 - - self._collateral_amount = collateral_amount - - @property - def type(self): - """Gets the type of this CollateralAlign. # noqa: E501 - - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 - - :return: The type of this CollateralAlign. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CollateralAlign. - - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 - - :param type: The type of this CollateralAlign. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralAlign): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralAlign): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py deleted file mode 100644 index 47f69b4..0000000 --- a/gate_api/models/collateral_currency.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """CollateralCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - - @property - def currency(self): - """Gets the currency of this CollateralCurrency. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this CollateralCurrency. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CollateralCurrency. - - Currency # noqa: E501 - - :param currency: The currency of this CollateralCurrency. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this CollateralCurrency. # noqa: E501 - - Size # noqa: E501 - - :return: The amount of this CollateralCurrency. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CollateralCurrency. - - Size # noqa: E501 - - :param amount: The amount of this CollateralCurrency. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py deleted file mode 100644 index 2671b11..0000000 --- a/gate_api/models/collateral_currency_info.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralCurrencyInfo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'left_collateral': 'str', - 'left_collateral_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'left_collateral': 'left_collateral', - 'left_collateral_usdt': 'left_collateral_usdt' - } - - def __init__(self, currency=None, index_price=None, left_collateral=None, left_collateral_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """CollateralCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._left_collateral = None - self._left_collateral_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if left_collateral is not None: - self.left_collateral = left_collateral - if left_collateral_usdt is not None: - self.left_collateral_usdt = left_collateral_usdt - - @property - def currency(self): - """Gets the currency of this CollateralCurrencyInfo. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this CollateralCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CollateralCurrencyInfo. - - Currency # noqa: E501 - - :param currency: The currency of this CollateralCurrencyInfo. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this CollateralCurrencyInfo. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this CollateralCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this CollateralCurrencyInfo. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this CollateralCurrencyInfo. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def left_collateral(self): - """Gets the left_collateral of this CollateralCurrencyInfo. # noqa: E501 - - Left Collateral Amount # noqa: E501 - - :return: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._left_collateral - - @left_collateral.setter - def left_collateral(self, left_collateral): - """Sets the left_collateral of this CollateralCurrencyInfo. - - Left Collateral Amount # noqa: E501 - - :param left_collateral: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 - :type: str - """ - - self._left_collateral = left_collateral - - @property - def left_collateral_usdt(self): - """Gets the left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 - - Value of left collateral amount in USDT # noqa: E501 - - :return: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 - :rtype: str - """ - return self._left_collateral_usdt - - @left_collateral_usdt.setter - def left_collateral_usdt(self, left_collateral_usdt): - """Sets the left_collateral_usdt of this CollateralCurrencyInfo. - - Value of left collateral amount in USDT # noqa: E501 - - :param left_collateral_usdt: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 - :type: str - """ - - self._left_collateral_usdt = left_collateral_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralCurrencyInfo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralCurrencyInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py deleted file mode 100644 index 585b8a6..0000000 --- a/gate_api/models/collateral_currency_res.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralCurrencyRes(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'succeeded': 'bool', - 'label': 'str', - 'message': 'str', - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'succeeded': 'succeeded', - 'label': 'label', - 'message': 'message', - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, succeeded=None, label=None, message=None, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (bool, str, str, str, str, Configuration) -> None - """CollateralCurrencyRes - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._succeeded = None - self._label = None - self._message = None - self._currency = None - self._amount = None - self.discriminator = None - - if succeeded is not None: - self.succeeded = succeeded - if label is not None: - self.label = label - if message is not None: - self.message = message - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - - @property - def succeeded(self): - """Gets the succeeded of this CollateralCurrencyRes. # noqa: E501 - - Update success status # noqa: E501 - - :return: The succeeded of this CollateralCurrencyRes. # noqa: E501 - :rtype: bool - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this CollateralCurrencyRes. - - Update success status # noqa: E501 - - :param succeeded: The succeeded of this CollateralCurrencyRes. # noqa: E501 - :type: bool - """ - - self._succeeded = succeeded - - @property - def label(self): - """Gets the label of this CollateralCurrencyRes. # noqa: E501 - - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 - - :return: The label of this CollateralCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this CollateralCurrencyRes. - - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 - - :param label: The label of this CollateralCurrencyRes. # noqa: E501 - :type: str - """ - - self._label = label - - @property - def message(self): - """Gets the message of this CollateralCurrencyRes. # noqa: E501 - - Error description in case of operation failure; empty when successful. # noqa: E501 - - :return: The message of this CollateralCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this CollateralCurrencyRes. - - Error description in case of operation failure; empty when successful. # noqa: E501 - - :param message: The message of this CollateralCurrencyRes. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def currency(self): - """Gets the currency of this CollateralCurrencyRes. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this CollateralCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CollateralCurrencyRes. - - Currency # noqa: E501 - - :param currency: The currency of this CollateralCurrencyRes. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this CollateralCurrencyRes. # noqa: E501 - - Quantity of successful collateral operation; 0 if the operation fails. # noqa: E501 - - :return: The amount of this CollateralCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CollateralCurrencyRes. - - Quantity of successful collateral operation; 0 if the operation fails. # noqa: E501 - - :param amount: The amount of this CollateralCurrencyRes. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralCurrencyRes): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralCurrencyRes): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py deleted file mode 100644 index 0031fc0..0000000 --- a/gate_api/models/collateral_current_rate.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralCurrentRate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'current_rate': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'current_rate': 'current_rate' - } - - def __init__(self, currency=None, current_rate=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """CollateralCurrentRate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._current_rate = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if current_rate is not None: - self.current_rate = current_rate - - @property - def currency(self): - """Gets the currency of this CollateralCurrentRate. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this CollateralCurrentRate. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CollateralCurrentRate. - - Currency # noqa: E501 - - :param currency: The currency of this CollateralCurrentRate. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def current_rate(self): - """Gets the current_rate of this CollateralCurrentRate. # noqa: E501 - - Currency current interest rate # noqa: E501 - - :return: The current_rate of this CollateralCurrentRate. # noqa: E501 - :rtype: str - """ - return self._current_rate - - @current_rate.setter - def current_rate(self, current_rate): - """Sets the current_rate of this CollateralCurrentRate. - - Currency current interest rate # noqa: E501 - - :param current_rate: The current_rate of this CollateralCurrentRate. # noqa: E501 - :type: str - """ - - self._current_rate = current_rate - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralCurrentRate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralCurrentRate): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py deleted file mode 100644 index f11afc2..0000000 --- a/gate_api/models/collateral_fix_rate.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralFixRate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'rate_7d': 'str', - 'rate_30d': 'str', - 'update_time': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'rate_7d': 'rate_7d', - 'rate_30d': 'rate_30d', - 'update_time': 'update_time' - } - - def __init__(self, currency=None, rate_7d=None, rate_30d=None, update_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, int, Configuration) -> None - """CollateralFixRate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._rate_7d = None - self._rate_30d = None - self._update_time = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if rate_7d is not None: - self.rate_7d = rate_7d - if rate_30d is not None: - self.rate_30d = rate_30d - if update_time is not None: - self.update_time = update_time - - @property - def currency(self): - """Gets the currency of this CollateralFixRate. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this CollateralFixRate. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CollateralFixRate. - - Currency # noqa: E501 - - :param currency: The currency of this CollateralFixRate. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def rate_7d(self): - """Gets the rate_7d of this CollateralFixRate. # noqa: E501 - - Fixed interest rate for a lending period of 7 days # noqa: E501 - - :return: The rate_7d of this CollateralFixRate. # noqa: E501 - :rtype: str - """ - return self._rate_7d - - @rate_7d.setter - def rate_7d(self, rate_7d): - """Sets the rate_7d of this CollateralFixRate. - - Fixed interest rate for a lending period of 7 days # noqa: E501 - - :param rate_7d: The rate_7d of this CollateralFixRate. # noqa: E501 - :type: str - """ - - self._rate_7d = rate_7d - - @property - def rate_30d(self): - """Gets the rate_30d of this CollateralFixRate. # noqa: E501 - - Fixed interest rate for a lending period of 30 days # noqa: E501 - - :return: The rate_30d of this CollateralFixRate. # noqa: E501 - :rtype: str - """ - return self._rate_30d - - @rate_30d.setter - def rate_30d(self, rate_30d): - """Sets the rate_30d of this CollateralFixRate. - - Fixed interest rate for a lending period of 30 days # noqa: E501 - - :param rate_30d: The rate_30d of this CollateralFixRate. # noqa: E501 - :type: str - """ - - self._rate_30d = rate_30d - - @property - def update_time(self): - """Gets the update_time of this CollateralFixRate. # noqa: E501 - - Update time, timestamp, unit in seconds # noqa: E501 - - :return: The update_time of this CollateralFixRate. # noqa: E501 - :rtype: int - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this CollateralFixRate. - - Update time, timestamp, unit in seconds # noqa: E501 - - :param update_time: The update_time of this CollateralFixRate. # noqa: E501 - :type: int - """ - - self._update_time = update_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralFixRate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralFixRate): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py deleted file mode 100644 index 90120f4..0000000 --- a/gate_api/models/collateral_loan_currency.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralLoanCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'loan_currency': 'str', - 'collateral_currency': 'list[str]' - } - - attribute_map = { - 'loan_currency': 'loan_currency', - 'collateral_currency': 'collateral_currency' - } - - def __init__(self, loan_currency=None, collateral_currency=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[str], Configuration) -> None - """CollateralLoanCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._loan_currency = None - self._collateral_currency = None - self.discriminator = None - - if loan_currency is not None: - self.loan_currency = loan_currency - if collateral_currency is not None: - self.collateral_currency = collateral_currency - - @property - def loan_currency(self): - """Gets the loan_currency of this CollateralLoanCurrency. # noqa: E501 - - Borrowed currency # noqa: E501 - - :return: The loan_currency of this CollateralLoanCurrency. # noqa: E501 - :rtype: str - """ - return self._loan_currency - - @loan_currency.setter - def loan_currency(self, loan_currency): - """Sets the loan_currency of this CollateralLoanCurrency. - - Borrowed currency # noqa: E501 - - :param loan_currency: The loan_currency of this CollateralLoanCurrency. # noqa: E501 - :type: str - """ - - self._loan_currency = loan_currency - - @property - def collateral_currency(self): - """Gets the collateral_currency of this CollateralLoanCurrency. # noqa: E501 - - List of supported collateral currencies # noqa: E501 - - :return: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 - :rtype: list[str] - """ - return self._collateral_currency - - @collateral_currency.setter - def collateral_currency(self, collateral_currency): - """Sets the collateral_currency of this CollateralLoanCurrency. - - List of supported collateral currencies # noqa: E501 - - :param collateral_currency: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 - :type: list[str] - """ - - self._collateral_currency = collateral_currency - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralLoanCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralLoanCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py deleted file mode 100644 index daee385..0000000 --- a/gate_api/models/collateral_ltv.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralLtv(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'init_ltv': 'str', - 'alert_ltv': 'str', - 'liquidate_ltv': 'str' - } - - attribute_map = { - 'init_ltv': 'init_ltv', - 'alert_ltv': 'alert_ltv', - 'liquidate_ltv': 'liquidate_ltv' - } - - def __init__(self, init_ltv=None, alert_ltv=None, liquidate_ltv=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """CollateralLtv - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._init_ltv = None - self._alert_ltv = None - self._liquidate_ltv = None - self.discriminator = None - - if init_ltv is not None: - self.init_ltv = init_ltv - if alert_ltv is not None: - self.alert_ltv = alert_ltv - if liquidate_ltv is not None: - self.liquidate_ltv = liquidate_ltv - - @property - def init_ltv(self): - """Gets the init_ltv of this CollateralLtv. # noqa: E501 - - The initial collateralization rate # noqa: E501 - - :return: The init_ltv of this CollateralLtv. # noqa: E501 - :rtype: str - """ - return self._init_ltv - - @init_ltv.setter - def init_ltv(self, init_ltv): - """Sets the init_ltv of this CollateralLtv. - - The initial collateralization rate # noqa: E501 - - :param init_ltv: The init_ltv of this CollateralLtv. # noqa: E501 - :type: str - """ - - self._init_ltv = init_ltv - - @property - def alert_ltv(self): - """Gets the alert_ltv of this CollateralLtv. # noqa: E501 - - Warning collateralization ratio # noqa: E501 - - :return: The alert_ltv of this CollateralLtv. # noqa: E501 - :rtype: str - """ - return self._alert_ltv - - @alert_ltv.setter - def alert_ltv(self, alert_ltv): - """Sets the alert_ltv of this CollateralLtv. - - Warning collateralization ratio # noqa: E501 - - :param alert_ltv: The alert_ltv of this CollateralLtv. # noqa: E501 - :type: str - """ - - self._alert_ltv = alert_ltv - - @property - def liquidate_ltv(self): - """Gets the liquidate_ltv of this CollateralLtv. # noqa: E501 - - The liquidation collateralization rate # noqa: E501 - - :return: The liquidate_ltv of this CollateralLtv. # noqa: E501 - :rtype: str - """ - return self._liquidate_ltv - - @liquidate_ltv.setter - def liquidate_ltv(self, liquidate_ltv): - """Sets the liquidate_ltv of this CollateralLtv. - - The liquidation collateralization rate # noqa: E501 - - :param liquidate_ltv: The liquidate_ltv of this CollateralLtv. # noqa: E501 - :type: str - """ - - self._liquidate_ltv = liquidate_ltv - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralLtv): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralLtv): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py deleted file mode 100644 index da2b478..0000000 --- a/gate_api/models/collateral_order.py +++ /dev/null @@ -1,543 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'collateral_currency': 'str', - 'collateral_amount': 'str', - 'borrow_currency': 'str', - 'borrow_amount': 'str', - 'repaid_amount': 'str', - 'repaid_principal': 'str', - 'repaid_interest': 'str', - 'init_ltv': 'str', - 'current_ltv': 'str', - 'liquidate_ltv': 'str', - 'status': 'str', - 'borrow_time': 'int', - 'left_repay_total': 'str', - 'left_repay_principal': 'str', - 'left_repay_interest': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'collateral_currency': 'collateral_currency', - 'collateral_amount': 'collateral_amount', - 'borrow_currency': 'borrow_currency', - 'borrow_amount': 'borrow_amount', - 'repaid_amount': 'repaid_amount', - 'repaid_principal': 'repaid_principal', - 'repaid_interest': 'repaid_interest', - 'init_ltv': 'init_ltv', - 'current_ltv': 'current_ltv', - 'liquidate_ltv': 'liquidate_ltv', - 'status': 'status', - 'borrow_time': 'borrow_time', - 'left_repay_total': 'left_repay_total', - 'left_repay_principal': 'left_repay_principal', - 'left_repay_interest': 'left_repay_interest' - } - - def __init__(self, order_id=None, collateral_currency=None, collateral_amount=None, borrow_currency=None, borrow_amount=None, repaid_amount=None, repaid_principal=None, repaid_interest=None, init_ltv=None, current_ltv=None, liquidate_ltv=None, status=None, borrow_time=None, left_repay_total=None, left_repay_principal=None, left_repay_interest=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, str, str, str, str, str, str, str, int, str, str, str, Configuration) -> None - """CollateralOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._collateral_currency = None - self._collateral_amount = None - self._borrow_currency = None - self._borrow_amount = None - self._repaid_amount = None - self._repaid_principal = None - self._repaid_interest = None - self._init_ltv = None - self._current_ltv = None - self._liquidate_ltv = None - self._status = None - self._borrow_time = None - self._left_repay_total = None - self._left_repay_principal = None - self._left_repay_interest = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if collateral_currency is not None: - self.collateral_currency = collateral_currency - if collateral_amount is not None: - self.collateral_amount = collateral_amount - if borrow_currency is not None: - self.borrow_currency = borrow_currency - if borrow_amount is not None: - self.borrow_amount = borrow_amount - if repaid_amount is not None: - self.repaid_amount = repaid_amount - if repaid_principal is not None: - self.repaid_principal = repaid_principal - if repaid_interest is not None: - self.repaid_interest = repaid_interest - if init_ltv is not None: - self.init_ltv = init_ltv - if current_ltv is not None: - self.current_ltv = current_ltv - if liquidate_ltv is not None: - self.liquidate_ltv = liquidate_ltv - if status is not None: - self.status = status - if borrow_time is not None: - self.borrow_time = borrow_time - if left_repay_total is not None: - self.left_repay_total = left_repay_total - if left_repay_principal is not None: - self.left_repay_principal = left_repay_principal - if left_repay_interest is not None: - self.left_repay_interest = left_repay_interest - - @property - def order_id(self): - """Gets the order_id of this CollateralOrder. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this CollateralOrder. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this CollateralOrder. - - Order ID # noqa: E501 - - :param order_id: The order_id of this CollateralOrder. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def collateral_currency(self): - """Gets the collateral_currency of this CollateralOrder. # noqa: E501 - - Collateral # noqa: E501 - - :return: The collateral_currency of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._collateral_currency - - @collateral_currency.setter - def collateral_currency(self, collateral_currency): - """Sets the collateral_currency of this CollateralOrder. - - Collateral # noqa: E501 - - :param collateral_currency: The collateral_currency of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._collateral_currency = collateral_currency - - @property - def collateral_amount(self): - """Gets the collateral_amount of this CollateralOrder. # noqa: E501 - - Collateral amount # noqa: E501 - - :return: The collateral_amount of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._collateral_amount - - @collateral_amount.setter - def collateral_amount(self, collateral_amount): - """Sets the collateral_amount of this CollateralOrder. - - Collateral amount # noqa: E501 - - :param collateral_amount: The collateral_amount of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._collateral_amount = collateral_amount - - @property - def borrow_currency(self): - """Gets the borrow_currency of this CollateralOrder. # noqa: E501 - - Borrowed currency # noqa: E501 - - :return: The borrow_currency of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._borrow_currency - - @borrow_currency.setter - def borrow_currency(self, borrow_currency): - """Sets the borrow_currency of this CollateralOrder. - - Borrowed currency # noqa: E501 - - :param borrow_currency: The borrow_currency of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._borrow_currency = borrow_currency - - @property - def borrow_amount(self): - """Gets the borrow_amount of this CollateralOrder. # noqa: E501 - - Borrowing amount # noqa: E501 - - :return: The borrow_amount of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._borrow_amount - - @borrow_amount.setter - def borrow_amount(self, borrow_amount): - """Sets the borrow_amount of this CollateralOrder. - - Borrowing amount # noqa: E501 - - :param borrow_amount: The borrow_amount of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._borrow_amount = borrow_amount - - @property - def repaid_amount(self): - """Gets the repaid_amount of this CollateralOrder. # noqa: E501 - - Repaid amount # noqa: E501 - - :return: The repaid_amount of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._repaid_amount - - @repaid_amount.setter - def repaid_amount(self, repaid_amount): - """Sets the repaid_amount of this CollateralOrder. - - Repaid amount # noqa: E501 - - :param repaid_amount: The repaid_amount of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._repaid_amount = repaid_amount - - @property - def repaid_principal(self): - """Gets the repaid_principal of this CollateralOrder. # noqa: E501 - - Repaid principal # noqa: E501 - - :return: The repaid_principal of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._repaid_principal - - @repaid_principal.setter - def repaid_principal(self, repaid_principal): - """Sets the repaid_principal of this CollateralOrder. - - Repaid principal # noqa: E501 - - :param repaid_principal: The repaid_principal of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._repaid_principal = repaid_principal - - @property - def repaid_interest(self): - """Gets the repaid_interest of this CollateralOrder. # noqa: E501 - - Repaid interest # noqa: E501 - - :return: The repaid_interest of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._repaid_interest - - @repaid_interest.setter - def repaid_interest(self, repaid_interest): - """Sets the repaid_interest of this CollateralOrder. - - Repaid interest # noqa: E501 - - :param repaid_interest: The repaid_interest of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._repaid_interest = repaid_interest - - @property - def init_ltv(self): - """Gets the init_ltv of this CollateralOrder. # noqa: E501 - - The initial collateralization rate # noqa: E501 - - :return: The init_ltv of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._init_ltv - - @init_ltv.setter - def init_ltv(self, init_ltv): - """Sets the init_ltv of this CollateralOrder. - - The initial collateralization rate # noqa: E501 - - :param init_ltv: The init_ltv of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._init_ltv = init_ltv - - @property - def current_ltv(self): - """Gets the current_ltv of this CollateralOrder. # noqa: E501 - - The current collateralization rate # noqa: E501 - - :return: The current_ltv of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._current_ltv - - @current_ltv.setter - def current_ltv(self, current_ltv): - """Sets the current_ltv of this CollateralOrder. - - The current collateralization rate # noqa: E501 - - :param current_ltv: The current_ltv of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._current_ltv = current_ltv - - @property - def liquidate_ltv(self): - """Gets the liquidate_ltv of this CollateralOrder. # noqa: E501 - - The liquidation collateralization rate # noqa: E501 - - :return: The liquidate_ltv of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._liquidate_ltv - - @liquidate_ltv.setter - def liquidate_ltv(self, liquidate_ltv): - """Sets the liquidate_ltv of this CollateralOrder. - - The liquidation collateralization rate # noqa: E501 - - :param liquidate_ltv: The liquidate_ltv of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._liquidate_ltv = liquidate_ltv - - @property - def status(self): - """Gets the status of this CollateralOrder. # noqa: E501 - - Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 - - :return: The status of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this CollateralOrder. - - Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 - - :param status: The status of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def borrow_time(self): - """Gets the borrow_time of this CollateralOrder. # noqa: E501 - - Borrowing time, timestamp in seconds # noqa: E501 - - :return: The borrow_time of this CollateralOrder. # noqa: E501 - :rtype: int - """ - return self._borrow_time - - @borrow_time.setter - def borrow_time(self, borrow_time): - """Sets the borrow_time of this CollateralOrder. - - Borrowing time, timestamp in seconds # noqa: E501 - - :param borrow_time: The borrow_time of this CollateralOrder. # noqa: E501 - :type: int - """ - - self._borrow_time = borrow_time - - @property - def left_repay_total(self): - """Gets the left_repay_total of this CollateralOrder. # noqa: E501 - - Outstanding principal and interest (outstanding principal + outstanding interest) # noqa: E501 - - :return: The left_repay_total of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._left_repay_total - - @left_repay_total.setter - def left_repay_total(self, left_repay_total): - """Sets the left_repay_total of this CollateralOrder. - - Outstanding principal and interest (outstanding principal + outstanding interest) # noqa: E501 - - :param left_repay_total: The left_repay_total of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._left_repay_total = left_repay_total - - @property - def left_repay_principal(self): - """Gets the left_repay_principal of this CollateralOrder. # noqa: E501 - - outstanding principal # noqa: E501 - - :return: The left_repay_principal of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._left_repay_principal - - @left_repay_principal.setter - def left_repay_principal(self, left_repay_principal): - """Sets the left_repay_principal of this CollateralOrder. - - outstanding principal # noqa: E501 - - :param left_repay_principal: The left_repay_principal of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._left_repay_principal = left_repay_principal - - @property - def left_repay_interest(self): - """Gets the left_repay_interest of this CollateralOrder. # noqa: E501 - - outstanding interest # noqa: E501 - - :return: The left_repay_interest of this CollateralOrder. # noqa: E501 - :rtype: str - """ - return self._left_repay_interest - - @left_repay_interest.setter - def left_repay_interest(self, left_repay_interest): - """Sets the left_repay_interest of this CollateralOrder. - - outstanding interest # noqa: E501 - - :param left_repay_interest: The left_repay_interest of this CollateralOrder. # noqa: E501 - :type: str - """ - - self._left_repay_interest = left_repay_interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollateralOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py deleted file mode 100644 index 36d8f8f..0000000 --- a/gate_api/models/collateral_record.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CollateralRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'record_id': 'int', - 'borrow_currency': 'str', - 'borrow_amount': 'str', - 'collateral_currency': 'str', - 'before_collateral': 'str', - 'after_collateral': 'str', - 'before_ltv': 'str', - 'after_ltv': 'str', - 'operate_time': 'int' - } - - attribute_map = { - 'order_id': 'order_id', - 'record_id': 'record_id', - 'borrow_currency': 'borrow_currency', - 'borrow_amount': 'borrow_amount', - 'collateral_currency': 'collateral_currency', - 'before_collateral': 'before_collateral', - 'after_collateral': 'after_collateral', - 'before_ltv': 'before_ltv', - 'after_ltv': 'after_ltv', - 'operate_time': 'operate_time' - } - - def __init__(self, order_id=None, record_id=None, borrow_currency=None, borrow_amount=None, collateral_currency=None, before_collateral=None, after_collateral=None, before_ltv=None, after_ltv=None, operate_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, str, int, Configuration) -> None - """CollateralRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._record_id = None - self._borrow_currency = None - self._borrow_amount = None - self._collateral_currency = None - self._before_collateral = None - self._after_collateral = None - self._before_ltv = None - self._after_ltv = None - self._operate_time = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if record_id is not None: - self.record_id = record_id - if borrow_currency is not None: - self.borrow_currency = borrow_currency - if borrow_amount is not None: - self.borrow_amount = borrow_amount - if collateral_currency is not None: - self.collateral_currency = collateral_currency - if before_collateral is not None: - self.before_collateral = before_collateral - if after_collateral is not None: - self.after_collateral = after_collateral - if before_ltv is not None: - self.before_ltv = before_ltv - if after_ltv is not None: - self.after_ltv = after_ltv - if operate_time is not None: - self.operate_time = operate_time - - @property - def order_id(self): - """Gets the order_id of this CollateralRecord. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this CollateralRecord. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this CollateralRecord. - - Order ID # noqa: E501 - - :param order_id: The order_id of this CollateralRecord. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def record_id(self): - """Gets the record_id of this CollateralRecord. # noqa: E501 - - Collateral record ID # noqa: E501 - - :return: The record_id of this CollateralRecord. # noqa: E501 - :rtype: int - """ - return self._record_id - - @record_id.setter - def record_id(self, record_id): - """Sets the record_id of this CollateralRecord. - - Collateral record ID # noqa: E501 - - :param record_id: The record_id of this CollateralRecord. # noqa: E501 - :type: int - """ - - self._record_id = record_id - - @property - def borrow_currency(self): - """Gets the borrow_currency of this CollateralRecord. # noqa: E501 - - Borrowed currency # noqa: E501 - - :return: The borrow_currency of this CollateralRecord. # noqa: E501 - :rtype: str - """ - return self._borrow_currency - - @borrow_currency.setter - def borrow_currency(self, borrow_currency): - """Sets the borrow_currency of this CollateralRecord. - - Borrowed currency # noqa: E501 - - :param borrow_currency: The borrow_currency of this CollateralRecord. # noqa: E501 - :type: str - """ - - self._borrow_currency = borrow_currency - - @property - def borrow_amount(self): - """Gets the borrow_amount of this CollateralRecord. # noqa: E501 - - Borrowing amount # noqa: E501 - - :return: The borrow_amount of this CollateralRecord. # noqa: E501 - :rtype: str - """ - return self._borrow_amount - - @borrow_amount.setter - def borrow_amount(self, borrow_amount): - """Sets the borrow_amount of this CollateralRecord. - - Borrowing amount # noqa: E501 - - :param borrow_amount: The borrow_amount of this CollateralRecord. # noqa: E501 - :type: str - """ - - self._borrow_amount = borrow_amount - - @property - def collateral_currency(self): - """Gets the collateral_currency of this CollateralRecord. # noqa: E501 - - Collateral # noqa: E501 - - :return: The collateral_currency of this CollateralRecord. # noqa: E501 - :rtype: str - """ - return self._collateral_currency - - @collateral_currency.setter - def collateral_currency(self, collateral_currency): - """Sets the collateral_currency of this CollateralRecord. - - Collateral # noqa: E501 - - :param collateral_currency: The collateral_currency of this CollateralRecord. # noqa: E501 - :type: str - """ - - self._collateral_currency = collateral_currency - - @property - def before_collateral(self): - """Gets the before_collateral of this CollateralRecord. # noqa: E501 - - The collateral amount before adjustment # noqa: E501 - - :return: The before_collateral of this CollateralRecord. # noqa: E501 - :rtype: str - """ - return self._before_collateral - - @before_collateral.setter - def before_collateral(self, before_collateral): - """Sets the before_collateral of this CollateralRecord. - - The collateral amount before adjustment # noqa: E501 - - :param before_collateral: The before_collateral of this CollateralRecord. # noqa: E501 - :type: str - """ - - self._before_collateral = before_collateral - - @property - def after_collateral(self): - """Gets the after_collateral of this CollateralRecord. # noqa: E501 - - The collateral amount after adjustment # noqa: E501 - - :return: The after_collateral of this CollateralRecord. # noqa: E501 - :rtype: str - """ - return self._after_collateral - - @after_collateral.setter - def after_collateral(self, after_collateral): - """Sets the after_collateral of this CollateralRecord. - - The collateral amount after adjustment # noqa: E501 - - :param after_collateral: The after_collateral of this CollateralRecord. # noqa: E501 - :type: str - """ - - self._after_collateral = after_collateral - - @property - def before_ltv(self): - """Gets the before_ltv of this CollateralRecord. # noqa: E501 - - The collateral ratio before adjustment # noqa: E501 - - :return: The before_ltv of this CollateralRecord. # noqa: E501 - :rtype: str - """ - return self._before_ltv - - @before_ltv.setter - def before_ltv(self, before_ltv): - """Sets the before_ltv of this CollateralRecord. - - The collateral ratio before adjustment # noqa: E501 - - :param before_ltv: The before_ltv of this CollateralRecord. # noqa: E501 - :type: str - """ - - self._before_ltv = before_ltv - - @property - def after_ltv(self): - """Gets the after_ltv of this CollateralRecord. # noqa: E501 - - The collateral ratio after adjustment # noqa: E501 - - :return: The after_ltv of this CollateralRecord. # noqa: E501 - :rtype: str - """ - return self._after_ltv - - @after_ltv.setter - def after_ltv(self, after_ltv): - """Sets the after_ltv of this CollateralRecord. - - The collateral ratio after adjustment # noqa: E501 - - :param after_ltv: The after_ltv of this CollateralRecord. # noqa: E501 - :type: str - """ - - self._after_ltv = after_ltv - - @property - def operate_time(self): - """Gets the operate_time of this CollateralRecord. # noqa: E501 - - Timestamp of the operation, in seconds # noqa: E501 - - :return: The operate_time of this CollateralRecord. # noqa: E501 - :rtype: int - """ - return self._operate_time - - @operate_time.setter - def operate_time(self, operate_time): - """Sets the operate_time of this CollateralRecord. - - Timestamp of the operation, in seconds # noqa: E501 - - :param operate_time: The operate_time of this CollateralRecord. # noqa: E501 - :type: int - """ - - self._operate_time = operate_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, CollateralRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollateralRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py deleted file mode 100644 index 0af2632..0000000 --- a/gate_api/models/contract.py +++ /dev/null @@ -1,1115 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Contract(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'type': 'str', - 'quanto_multiplier': 'str', - 'leverage_min': 'str', - 'leverage_max': 'str', - 'maintenance_rate': 'str', - 'mark_type': 'str', - 'mark_price': 'str', - 'index_price': 'str', - 'last_price': 'str', - 'maker_fee_rate': 'str', - 'taker_fee_rate': 'str', - 'order_price_round': 'str', - 'mark_price_round': 'str', - 'funding_rate': 'str', - 'funding_interval': 'int', - 'funding_next_apply': 'float', - 'risk_limit_base': 'str', - 'risk_limit_step': 'str', - 'risk_limit_max': 'str', - 'order_size_min': 'int', - 'order_size_max': 'int', - 'order_price_deviate': 'str', - 'ref_discount_rate': 'str', - 'ref_rebate_rate': 'str', - 'orderbook_id': 'int', - 'trade_id': 'int', - 'trade_size': 'int', - 'position_size': 'int', - 'config_change_time': 'float', - 'in_delisting': 'bool', - 'orders_limit': 'int', - 'enable_bonus': 'bool', - 'enable_credit': 'bool', - 'create_time': 'float', - 'funding_cap_ratio': 'str' - } - - attribute_map = { - 'name': 'name', - 'type': 'type', - 'quanto_multiplier': 'quanto_multiplier', - 'leverage_min': 'leverage_min', - 'leverage_max': 'leverage_max', - 'maintenance_rate': 'maintenance_rate', - 'mark_type': 'mark_type', - 'mark_price': 'mark_price', - 'index_price': 'index_price', - 'last_price': 'last_price', - 'maker_fee_rate': 'maker_fee_rate', - 'taker_fee_rate': 'taker_fee_rate', - 'order_price_round': 'order_price_round', - 'mark_price_round': 'mark_price_round', - 'funding_rate': 'funding_rate', - 'funding_interval': 'funding_interval', - 'funding_next_apply': 'funding_next_apply', - 'risk_limit_base': 'risk_limit_base', - 'risk_limit_step': 'risk_limit_step', - 'risk_limit_max': 'risk_limit_max', - 'order_size_min': 'order_size_min', - 'order_size_max': 'order_size_max', - 'order_price_deviate': 'order_price_deviate', - 'ref_discount_rate': 'ref_discount_rate', - 'ref_rebate_rate': 'ref_rebate_rate', - 'orderbook_id': 'orderbook_id', - 'trade_id': 'trade_id', - 'trade_size': 'trade_size', - 'position_size': 'position_size', - 'config_change_time': 'config_change_time', - 'in_delisting': 'in_delisting', - 'orders_limit': 'orders_limit', - 'enable_bonus': 'enable_bonus', - 'enable_credit': 'enable_credit', - 'create_time': 'create_time', - 'funding_cap_ratio': 'funding_cap_ratio' - } - - def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, funding_rate=None, funding_interval=None, funding_next_apply=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, enable_bonus=None, enable_credit=None, create_time=None, funding_cap_ratio=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, str, Configuration) -> None - """Contract - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._type = None - self._quanto_multiplier = None - self._leverage_min = None - self._leverage_max = None - self._maintenance_rate = None - self._mark_type = None - self._mark_price = None - self._index_price = None - self._last_price = None - self._maker_fee_rate = None - self._taker_fee_rate = None - self._order_price_round = None - self._mark_price_round = None - self._funding_rate = None - self._funding_interval = None - self._funding_next_apply = None - self._risk_limit_base = None - self._risk_limit_step = None - self._risk_limit_max = None - self._order_size_min = None - self._order_size_max = None - self._order_price_deviate = None - self._ref_discount_rate = None - self._ref_rebate_rate = None - self._orderbook_id = None - self._trade_id = None - self._trade_size = None - self._position_size = None - self._config_change_time = None - self._in_delisting = None - self._orders_limit = None - self._enable_bonus = None - self._enable_credit = None - self._create_time = None - self._funding_cap_ratio = None - self.discriminator = None - - if name is not None: - self.name = name - if type is not None: - self.type = type - if quanto_multiplier is not None: - self.quanto_multiplier = quanto_multiplier - if leverage_min is not None: - self.leverage_min = leverage_min - if leverage_max is not None: - self.leverage_max = leverage_max - if maintenance_rate is not None: - self.maintenance_rate = maintenance_rate - if mark_type is not None: - self.mark_type = mark_type - if mark_price is not None: - self.mark_price = mark_price - if index_price is not None: - self.index_price = index_price - if last_price is not None: - self.last_price = last_price - if maker_fee_rate is not None: - self.maker_fee_rate = maker_fee_rate - if taker_fee_rate is not None: - self.taker_fee_rate = taker_fee_rate - if order_price_round is not None: - self.order_price_round = order_price_round - if mark_price_round is not None: - self.mark_price_round = mark_price_round - if funding_rate is not None: - self.funding_rate = funding_rate - if funding_interval is not None: - self.funding_interval = funding_interval - if funding_next_apply is not None: - self.funding_next_apply = funding_next_apply - if risk_limit_base is not None: - self.risk_limit_base = risk_limit_base - if risk_limit_step is not None: - self.risk_limit_step = risk_limit_step - if risk_limit_max is not None: - self.risk_limit_max = risk_limit_max - if order_size_min is not None: - self.order_size_min = order_size_min - if order_size_max is not None: - self.order_size_max = order_size_max - if order_price_deviate is not None: - self.order_price_deviate = order_price_deviate - if ref_discount_rate is not None: - self.ref_discount_rate = ref_discount_rate - if ref_rebate_rate is not None: - self.ref_rebate_rate = ref_rebate_rate - if orderbook_id is not None: - self.orderbook_id = orderbook_id - if trade_id is not None: - self.trade_id = trade_id - if trade_size is not None: - self.trade_size = trade_size - if position_size is not None: - self.position_size = position_size - if config_change_time is not None: - self.config_change_time = config_change_time - if in_delisting is not None: - self.in_delisting = in_delisting - if orders_limit is not None: - self.orders_limit = orders_limit - if enable_bonus is not None: - self.enable_bonus = enable_bonus - if enable_credit is not None: - self.enable_credit = enable_credit - if create_time is not None: - self.create_time = create_time - if funding_cap_ratio is not None: - self.funding_cap_ratio = funding_cap_ratio - - @property - def name(self): - """Gets the name of this Contract. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The name of this Contract. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Contract. - - Futures contract # noqa: E501 - - :param name: The name of this Contract. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def type(self): - """Gets the type of this Contract. # noqa: E501 - - Futures contract type # noqa: E501 - - :return: The type of this Contract. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Contract. - - Futures contract type # noqa: E501 - - :param type: The type of this Contract. # noqa: E501 - :type: str - """ - allowed_values = ["inverse", "direct"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def quanto_multiplier(self): - """Gets the quanto_multiplier of this Contract. # noqa: E501 - - Multiplier used in converting from invoicing to settlement currency # noqa: E501 - - :return: The quanto_multiplier of this Contract. # noqa: E501 - :rtype: str - """ - return self._quanto_multiplier - - @quanto_multiplier.setter - def quanto_multiplier(self, quanto_multiplier): - """Sets the quanto_multiplier of this Contract. - - Multiplier used in converting from invoicing to settlement currency # noqa: E501 - - :param quanto_multiplier: The quanto_multiplier of this Contract. # noqa: E501 - :type: str - """ - - self._quanto_multiplier = quanto_multiplier - - @property - def leverage_min(self): - """Gets the leverage_min of this Contract. # noqa: E501 - - Minimum leverage # noqa: E501 - - :return: The leverage_min of this Contract. # noqa: E501 - :rtype: str - """ - return self._leverage_min - - @leverage_min.setter - def leverage_min(self, leverage_min): - """Sets the leverage_min of this Contract. - - Minimum leverage # noqa: E501 - - :param leverage_min: The leverage_min of this Contract. # noqa: E501 - :type: str - """ - - self._leverage_min = leverage_min - - @property - def leverage_max(self): - """Gets the leverage_max of this Contract. # noqa: E501 - - Maximum leverage # noqa: E501 - - :return: The leverage_max of this Contract. # noqa: E501 - :rtype: str - """ - return self._leverage_max - - @leverage_max.setter - def leverage_max(self, leverage_max): - """Sets the leverage_max of this Contract. - - Maximum leverage # noqa: E501 - - :param leverage_max: The leverage_max of this Contract. # noqa: E501 - :type: str - """ - - self._leverage_max = leverage_max - - @property - def maintenance_rate(self): - """Gets the maintenance_rate of this Contract. # noqa: E501 - - Maintenance rate of margin # noqa: E501 - - :return: The maintenance_rate of this Contract. # noqa: E501 - :rtype: str - """ - return self._maintenance_rate - - @maintenance_rate.setter - def maintenance_rate(self, maintenance_rate): - """Sets the maintenance_rate of this Contract. - - Maintenance rate of margin # noqa: E501 - - :param maintenance_rate: The maintenance_rate of this Contract. # noqa: E501 - :type: str - """ - - self._maintenance_rate = maintenance_rate - - @property - def mark_type(self): - """Gets the mark_type of this Contract. # noqa: E501 - - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 - - :return: The mark_type of this Contract. # noqa: E501 - :rtype: str - """ - return self._mark_type - - @mark_type.setter - def mark_type(self, mark_type): - """Sets the mark_type of this Contract. - - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 - - :param mark_type: The mark_type of this Contract. # noqa: E501 - :type: str - """ - allowed_values = ["internal", "index"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and mark_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `mark_type` ({0}), must be one of {1}" # noqa: E501 - .format(mark_type, allowed_values) - ) - - self._mark_type = mark_type - - @property - def mark_price(self): - """Gets the mark_price of this Contract. # noqa: E501 - - Current mark price # noqa: E501 - - :return: The mark_price of this Contract. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this Contract. - - Current mark price # noqa: E501 - - :param mark_price: The mark_price of this Contract. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def index_price(self): - """Gets the index_price of this Contract. # noqa: E501 - - Current index price # noqa: E501 - - :return: The index_price of this Contract. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this Contract. - - Current index price # noqa: E501 - - :param index_price: The index_price of this Contract. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def last_price(self): - """Gets the last_price of this Contract. # noqa: E501 - - Last trading price # noqa: E501 - - :return: The last_price of this Contract. # noqa: E501 - :rtype: str - """ - return self._last_price - - @last_price.setter - def last_price(self, last_price): - """Sets the last_price of this Contract. - - Last trading price # noqa: E501 - - :param last_price: The last_price of this Contract. # noqa: E501 - :type: str - """ - - self._last_price = last_price - - @property - def maker_fee_rate(self): - """Gets the maker_fee_rate of this Contract. # noqa: E501 - - Maker fee rate, where negative means rebate # noqa: E501 - - :return: The maker_fee_rate of this Contract. # noqa: E501 - :rtype: str - """ - return self._maker_fee_rate - - @maker_fee_rate.setter - def maker_fee_rate(self, maker_fee_rate): - """Sets the maker_fee_rate of this Contract. - - Maker fee rate, where negative means rebate # noqa: E501 - - :param maker_fee_rate: The maker_fee_rate of this Contract. # noqa: E501 - :type: str - """ - - self._maker_fee_rate = maker_fee_rate - - @property - def taker_fee_rate(self): - """Gets the taker_fee_rate of this Contract. # noqa: E501 - - Taker fee rate # noqa: E501 - - :return: The taker_fee_rate of this Contract. # noqa: E501 - :rtype: str - """ - return self._taker_fee_rate - - @taker_fee_rate.setter - def taker_fee_rate(self, taker_fee_rate): - """Sets the taker_fee_rate of this Contract. - - Taker fee rate # noqa: E501 - - :param taker_fee_rate: The taker_fee_rate of this Contract. # noqa: E501 - :type: str - """ - - self._taker_fee_rate = taker_fee_rate - - @property - def order_price_round(self): - """Gets the order_price_round of this Contract. # noqa: E501 - - Minimum order price increment # noqa: E501 - - :return: The order_price_round of this Contract. # noqa: E501 - :rtype: str - """ - return self._order_price_round - - @order_price_round.setter - def order_price_round(self, order_price_round): - """Sets the order_price_round of this Contract. - - Minimum order price increment # noqa: E501 - - :param order_price_round: The order_price_round of this Contract. # noqa: E501 - :type: str - """ - - self._order_price_round = order_price_round - - @property - def mark_price_round(self): - """Gets the mark_price_round of this Contract. # noqa: E501 - - Minimum mark price increment # noqa: E501 - - :return: The mark_price_round of this Contract. # noqa: E501 - :rtype: str - """ - return self._mark_price_round - - @mark_price_round.setter - def mark_price_round(self, mark_price_round): - """Sets the mark_price_round of this Contract. - - Minimum mark price increment # noqa: E501 - - :param mark_price_round: The mark_price_round of this Contract. # noqa: E501 - :type: str - """ - - self._mark_price_round = mark_price_round - - @property - def funding_rate(self): - """Gets the funding_rate of this Contract. # noqa: E501 - - Current funding rate # noqa: E501 - - :return: The funding_rate of this Contract. # noqa: E501 - :rtype: str - """ - return self._funding_rate - - @funding_rate.setter - def funding_rate(self, funding_rate): - """Sets the funding_rate of this Contract. - - Current funding rate # noqa: E501 - - :param funding_rate: The funding_rate of this Contract. # noqa: E501 - :type: str - """ - - self._funding_rate = funding_rate - - @property - def funding_interval(self): - """Gets the funding_interval of this Contract. # noqa: E501 - - Funding application interval, unit in seconds # noqa: E501 - - :return: The funding_interval of this Contract. # noqa: E501 - :rtype: int - """ - return self._funding_interval - - @funding_interval.setter - def funding_interval(self, funding_interval): - """Sets the funding_interval of this Contract. - - Funding application interval, unit in seconds # noqa: E501 - - :param funding_interval: The funding_interval of this Contract. # noqa: E501 - :type: int - """ - - self._funding_interval = funding_interval - - @property - def funding_next_apply(self): - """Gets the funding_next_apply of this Contract. # noqa: E501 - - Next funding time # noqa: E501 - - :return: The funding_next_apply of this Contract. # noqa: E501 - :rtype: float - """ - return self._funding_next_apply - - @funding_next_apply.setter - def funding_next_apply(self, funding_next_apply): - """Sets the funding_next_apply of this Contract. - - Next funding time # noqa: E501 - - :param funding_next_apply: The funding_next_apply of this Contract. # noqa: E501 - :type: float - """ - - self._funding_next_apply = funding_next_apply - - @property - def risk_limit_base(self): - """Gets the risk_limit_base of this Contract. # noqa: E501 - - Risk limit base,deprecated # noqa: E501 - - :return: The risk_limit_base of this Contract. # noqa: E501 - :rtype: str - """ - return self._risk_limit_base - - @risk_limit_base.setter - def risk_limit_base(self, risk_limit_base): - """Sets the risk_limit_base of this Contract. - - Risk limit base,deprecated # noqa: E501 - - :param risk_limit_base: The risk_limit_base of this Contract. # noqa: E501 - :type: str - """ - - self._risk_limit_base = risk_limit_base - - @property - def risk_limit_step(self): - """Gets the risk_limit_step of this Contract. # noqa: E501 - - Step of adjusting risk limit,deprecated # noqa: E501 - - :return: The risk_limit_step of this Contract. # noqa: E501 - :rtype: str - """ - return self._risk_limit_step - - @risk_limit_step.setter - def risk_limit_step(self, risk_limit_step): - """Sets the risk_limit_step of this Contract. - - Step of adjusting risk limit,deprecated # noqa: E501 - - :param risk_limit_step: The risk_limit_step of this Contract. # noqa: E501 - :type: str - """ - - self._risk_limit_step = risk_limit_step - - @property - def risk_limit_max(self): - """Gets the risk_limit_max of this Contract. # noqa: E501 - - Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. # noqa: E501 - - :return: The risk_limit_max of this Contract. # noqa: E501 - :rtype: str - """ - return self._risk_limit_max - - @risk_limit_max.setter - def risk_limit_max(self, risk_limit_max): - """Sets the risk_limit_max of this Contract. - - Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. # noqa: E501 - - :param risk_limit_max: The risk_limit_max of this Contract. # noqa: E501 - :type: str - """ - - self._risk_limit_max = risk_limit_max - - @property - def order_size_min(self): - """Gets the order_size_min of this Contract. # noqa: E501 - - Minimum order size the contract allowed # noqa: E501 - - :return: The order_size_min of this Contract. # noqa: E501 - :rtype: int - """ - return self._order_size_min - - @order_size_min.setter - def order_size_min(self, order_size_min): - """Sets the order_size_min of this Contract. - - Minimum order size the contract allowed # noqa: E501 - - :param order_size_min: The order_size_min of this Contract. # noqa: E501 - :type: int - """ - - self._order_size_min = order_size_min - - @property - def order_size_max(self): - """Gets the order_size_max of this Contract. # noqa: E501 - - Maximum order size the contract allowed # noqa: E501 - - :return: The order_size_max of this Contract. # noqa: E501 - :rtype: int - """ - return self._order_size_max - - @order_size_max.setter - def order_size_max(self, order_size_max): - """Sets the order_size_max of this Contract. - - Maximum order size the contract allowed # noqa: E501 - - :param order_size_max: The order_size_max of this Contract. # noqa: E501 - :type: int - """ - - self._order_size_max = order_size_max - - @property - def order_price_deviate(self): - """Gets the order_price_deviate of this Contract. # noqa: E501 - - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 - - :return: The order_price_deviate of this Contract. # noqa: E501 - :rtype: str - """ - return self._order_price_deviate - - @order_price_deviate.setter - def order_price_deviate(self, order_price_deviate): - """Sets the order_price_deviate of this Contract. - - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 - - :param order_price_deviate: The order_price_deviate of this Contract. # noqa: E501 - :type: str - """ - - self._order_price_deviate = order_price_deviate - - @property - def ref_discount_rate(self): - """Gets the ref_discount_rate of this Contract. # noqa: E501 - - Referral fee rate discount # noqa: E501 - - :return: The ref_discount_rate of this Contract. # noqa: E501 - :rtype: str - """ - return self._ref_discount_rate - - @ref_discount_rate.setter - def ref_discount_rate(self, ref_discount_rate): - """Sets the ref_discount_rate of this Contract. - - Referral fee rate discount # noqa: E501 - - :param ref_discount_rate: The ref_discount_rate of this Contract. # noqa: E501 - :type: str - """ - - self._ref_discount_rate = ref_discount_rate - - @property - def ref_rebate_rate(self): - """Gets the ref_rebate_rate of this Contract. # noqa: E501 - - Referrer commission rate # noqa: E501 - - :return: The ref_rebate_rate of this Contract. # noqa: E501 - :rtype: str - """ - return self._ref_rebate_rate - - @ref_rebate_rate.setter - def ref_rebate_rate(self, ref_rebate_rate): - """Sets the ref_rebate_rate of this Contract. - - Referrer commission rate # noqa: E501 - - :param ref_rebate_rate: The ref_rebate_rate of this Contract. # noqa: E501 - :type: str - """ - - self._ref_rebate_rate = ref_rebate_rate - - @property - def orderbook_id(self): - """Gets the orderbook_id of this Contract. # noqa: E501 - - Current orderbook ID # noqa: E501 - - :return: The orderbook_id of this Contract. # noqa: E501 - :rtype: int - """ - return self._orderbook_id - - @orderbook_id.setter - def orderbook_id(self, orderbook_id): - """Sets the orderbook_id of this Contract. - - Current orderbook ID # noqa: E501 - - :param orderbook_id: The orderbook_id of this Contract. # noqa: E501 - :type: int - """ - - self._orderbook_id = orderbook_id - - @property - def trade_id(self): - """Gets the trade_id of this Contract. # noqa: E501 - - Current trade ID # noqa: E501 - - :return: The trade_id of this Contract. # noqa: E501 - :rtype: int - """ - return self._trade_id - - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this Contract. - - Current trade ID # noqa: E501 - - :param trade_id: The trade_id of this Contract. # noqa: E501 - :type: int - """ - - self._trade_id = trade_id - - @property - def trade_size(self): - """Gets the trade_size of this Contract. # noqa: E501 - - Historical accumulated trade size # noqa: E501 - - :return: The trade_size of this Contract. # noqa: E501 - :rtype: int - """ - return self._trade_size - - @trade_size.setter - def trade_size(self, trade_size): - """Sets the trade_size of this Contract. - - Historical accumulated trade size # noqa: E501 - - :param trade_size: The trade_size of this Contract. # noqa: E501 - :type: int - """ - - self._trade_size = trade_size - - @property - def position_size(self): - """Gets the position_size of this Contract. # noqa: E501 - - Current total long position size # noqa: E501 - - :return: The position_size of this Contract. # noqa: E501 - :rtype: int - """ - return self._position_size - - @position_size.setter - def position_size(self, position_size): - """Sets the position_size of this Contract. - - Current total long position size # noqa: E501 - - :param position_size: The position_size of this Contract. # noqa: E501 - :type: int - """ - - self._position_size = position_size - - @property - def config_change_time(self): - """Gets the config_change_time of this Contract. # noqa: E501 - - Last changed time of configuration # noqa: E501 - - :return: The config_change_time of this Contract. # noqa: E501 - :rtype: float - """ - return self._config_change_time - - @config_change_time.setter - def config_change_time(self, config_change_time): - """Sets the config_change_time of this Contract. - - Last changed time of configuration # noqa: E501 - - :param config_change_time: The config_change_time of this Contract. # noqa: E501 - :type: float - """ - - self._config_change_time = config_change_time - - @property - def in_delisting(self): - """Gets the in_delisting of this Contract. # noqa: E501 - - `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline # noqa: E501 - - :return: The in_delisting of this Contract. # noqa: E501 - :rtype: bool - """ - return self._in_delisting - - @in_delisting.setter - def in_delisting(self, in_delisting): - """Sets the in_delisting of this Contract. - - `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline # noqa: E501 - - :param in_delisting: The in_delisting of this Contract. # noqa: E501 - :type: bool - """ - - self._in_delisting = in_delisting - - @property - def orders_limit(self): - """Gets the orders_limit of this Contract. # noqa: E501 - - Maximum number of open orders # noqa: E501 - - :return: The orders_limit of this Contract. # noqa: E501 - :rtype: int - """ - return self._orders_limit - - @orders_limit.setter - def orders_limit(self, orders_limit): - """Sets the orders_limit of this Contract. - - Maximum number of open orders # noqa: E501 - - :param orders_limit: The orders_limit of this Contract. # noqa: E501 - :type: int - """ - - self._orders_limit = orders_limit - - @property - def enable_bonus(self): - """Gets the enable_bonus of this Contract. # noqa: E501 - - Whether bouns is enabled # noqa: E501 - - :return: The enable_bonus of this Contract. # noqa: E501 - :rtype: bool - """ - return self._enable_bonus - - @enable_bonus.setter - def enable_bonus(self, enable_bonus): - """Sets the enable_bonus of this Contract. - - Whether bouns is enabled # noqa: E501 - - :param enable_bonus: The enable_bonus of this Contract. # noqa: E501 - :type: bool - """ - - self._enable_bonus = enable_bonus - - @property - def enable_credit(self): - """Gets the enable_credit of this Contract. # noqa: E501 - - Whether portfolio margin account is enabled # noqa: E501 - - :return: The enable_credit of this Contract. # noqa: E501 - :rtype: bool - """ - return self._enable_credit - - @enable_credit.setter - def enable_credit(self, enable_credit): - """Sets the enable_credit of this Contract. - - Whether portfolio margin account is enabled # noqa: E501 - - :param enable_credit: The enable_credit of this Contract. # noqa: E501 - :type: bool - """ - - self._enable_credit = enable_credit - - @property - def create_time(self): - """Gets the create_time of this Contract. # noqa: E501 - - Created time of the contract # noqa: E501 - - :return: The create_time of this Contract. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this Contract. - - Created time of the contract # noqa: E501 - - :param create_time: The create_time of this Contract. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def funding_cap_ratio(self): - """Gets the funding_cap_ratio of this Contract. # noqa: E501 - - The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio # noqa: E501 - - :return: The funding_cap_ratio of this Contract. # noqa: E501 - :rtype: str - """ - return self._funding_cap_ratio - - @funding_cap_ratio.setter - def funding_cap_ratio(self, funding_cap_ratio): - """Sets the funding_cap_ratio of this Contract. - - The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio # noqa: E501 - - :param funding_cap_ratio: The funding_cap_ratio of this Contract. # noqa: E501 - :type: str - """ - - self._funding_cap_ratio = funding_cap_ratio - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Contract): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Contract): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py deleted file mode 100644 index 450c573..0000000 --- a/gate_api/models/contract_stat.py +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class ContractStat(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'int', - 'lsr_taker': 'float', - 'lsr_account': 'float', - 'long_liq_size': 'int', - 'long_liq_amount': 'float', - 'long_liq_usd': 'float', - 'short_liq_size': 'int', - 'short_liq_amount': 'float', - 'short_liq_usd': 'float', - 'open_interest': 'int', - 'open_interest_usd': 'float', - 'top_lsr_account': 'float', - 'top_lsr_size': 'float' - } - - attribute_map = { - 'time': 'time', - 'lsr_taker': 'lsr_taker', - 'lsr_account': 'lsr_account', - 'long_liq_size': 'long_liq_size', - 'long_liq_amount': 'long_liq_amount', - 'long_liq_usd': 'long_liq_usd', - 'short_liq_size': 'short_liq_size', - 'short_liq_amount': 'short_liq_amount', - 'short_liq_usd': 'short_liq_usd', - 'open_interest': 'open_interest', - 'open_interest_usd': 'open_interest_usd', - 'top_lsr_account': 'top_lsr_account', - 'top_lsr_size': 'top_lsr_size' - } - - def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=None, long_liq_amount=None, long_liq_usd=None, short_liq_size=None, short_liq_amount=None, short_liq_usd=None, open_interest=None, open_interest_usd=None, top_lsr_account=None, top_lsr_size=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, float, int, float, float, int, float, float, int, float, float, float, Configuration) -> None - """ContractStat - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._lsr_taker = None - self._lsr_account = None - self._long_liq_size = None - self._long_liq_amount = None - self._long_liq_usd = None - self._short_liq_size = None - self._short_liq_amount = None - self._short_liq_usd = None - self._open_interest = None - self._open_interest_usd = None - self._top_lsr_account = None - self._top_lsr_size = None - self.discriminator = None - - if time is not None: - self.time = time - if lsr_taker is not None: - self.lsr_taker = lsr_taker - if lsr_account is not None: - self.lsr_account = lsr_account - if long_liq_size is not None: - self.long_liq_size = long_liq_size - if long_liq_amount is not None: - self.long_liq_amount = long_liq_amount - if long_liq_usd is not None: - self.long_liq_usd = long_liq_usd - 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 open_interest is not None: - self.open_interest = open_interest - if open_interest_usd is not None: - self.open_interest_usd = open_interest_usd - if top_lsr_account is not None: - self.top_lsr_account = top_lsr_account - if top_lsr_size is not None: - self.top_lsr_size = top_lsr_size - - @property - def time(self): - """Gets the time of this ContractStat. # noqa: E501 - - Stat timestamp # noqa: E501 - - :return: The time of this ContractStat. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this ContractStat. - - Stat timestamp # noqa: E501 - - :param time: The time of this ContractStat. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def lsr_taker(self): - """Gets the lsr_taker of this ContractStat. # noqa: E501 - - Long/short account number ratio # noqa: E501 - - :return: The lsr_taker of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._lsr_taker - - @lsr_taker.setter - def lsr_taker(self, lsr_taker): - """Sets the lsr_taker of this ContractStat. - - Long/short account number ratio # noqa: E501 - - :param lsr_taker: The lsr_taker of this ContractStat. # noqa: E501 - :type: float - """ - - self._lsr_taker = lsr_taker - - @property - def lsr_account(self): - """Gets the lsr_account of this ContractStat. # noqa: E501 - - Long/short taker size ratio # noqa: E501 - - :return: The lsr_account of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._lsr_account - - @lsr_account.setter - def lsr_account(self, lsr_account): - """Sets the lsr_account of this ContractStat. - - Long/short taker size ratio # noqa: E501 - - :param lsr_account: The lsr_account of this ContractStat. # noqa: E501 - :type: float - """ - - self._lsr_account = lsr_account - - @property - def long_liq_size(self): - """Gets the long_liq_size of this ContractStat. # noqa: E501 - - Long liquidation size # noqa: E501 - - :return: The long_liq_size of this ContractStat. # noqa: E501 - :rtype: int - """ - return self._long_liq_size - - @long_liq_size.setter - def long_liq_size(self, long_liq_size): - """Sets the long_liq_size of this ContractStat. - - Long liquidation size # noqa: E501 - - :param long_liq_size: The long_liq_size of this ContractStat. # noqa: E501 - :type: int - """ - - self._long_liq_size = long_liq_size - - @property - def long_liq_amount(self): - """Gets the long_liq_amount of this ContractStat. # noqa: E501 - - Long liquidation amount(base currency) # noqa: E501 - - :return: The long_liq_amount of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._long_liq_amount - - @long_liq_amount.setter - def long_liq_amount(self, long_liq_amount): - """Sets the long_liq_amount of this ContractStat. - - Long liquidation amount(base currency) # noqa: E501 - - :param long_liq_amount: The long_liq_amount of this ContractStat. # noqa: E501 - :type: float - """ - - self._long_liq_amount = long_liq_amount - - @property - def long_liq_usd(self): - """Gets the long_liq_usd of this ContractStat. # noqa: E501 - - Long liquidation volume(quote currency) # noqa: E501 - - :return: The long_liq_usd of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._long_liq_usd - - @long_liq_usd.setter - def long_liq_usd(self, long_liq_usd): - """Sets the long_liq_usd of this ContractStat. - - Long liquidation volume(quote currency) # noqa: E501 - - :param long_liq_usd: The long_liq_usd of this ContractStat. # noqa: E501 - :type: float - """ - - self._long_liq_usd = long_liq_usd - - @property - def short_liq_size(self): - """Gets the short_liq_size of this ContractStat. # noqa: E501 - - Short liquidation size # noqa: E501 - - :return: The short_liq_size of this ContractStat. # noqa: E501 - :rtype: int - """ - return self._short_liq_size - - @short_liq_size.setter - def short_liq_size(self, short_liq_size): - """Sets the short_liq_size of this ContractStat. - - Short liquidation size # noqa: E501 - - :param short_liq_size: The short_liq_size of this ContractStat. # noqa: E501 - :type: int - """ - - self._short_liq_size = short_liq_size - - @property - def short_liq_amount(self): - """Gets the short_liq_amount of this ContractStat. # noqa: E501 - - Short liquidation amount(base currency) # noqa: E501 - - :return: The short_liq_amount of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._short_liq_amount - - @short_liq_amount.setter - def short_liq_amount(self, short_liq_amount): - """Sets the short_liq_amount of this ContractStat. - - Short liquidation amount(base currency) # noqa: E501 - - :param short_liq_amount: The short_liq_amount of this ContractStat. # noqa: E501 - :type: float - """ - - self._short_liq_amount = short_liq_amount - - @property - def short_liq_usd(self): - """Gets the short_liq_usd of this ContractStat. # noqa: E501 - - Short liquidation volume(quote currency) # noqa: E501 - - :return: The short_liq_usd of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._short_liq_usd - - @short_liq_usd.setter - def short_liq_usd(self, short_liq_usd): - """Sets the short_liq_usd of this ContractStat. - - Short liquidation volume(quote currency) # noqa: E501 - - :param short_liq_usd: The short_liq_usd of this ContractStat. # noqa: E501 - :type: float - """ - - self._short_liq_usd = short_liq_usd - - @property - def open_interest(self): - """Gets the open_interest of this ContractStat. # noqa: E501 - - Open interest size # noqa: E501 - - :return: The open_interest of this ContractStat. # noqa: E501 - :rtype: int - """ - return self._open_interest - - @open_interest.setter - def open_interest(self, open_interest): - """Sets the open_interest of this ContractStat. - - Open interest size # noqa: E501 - - :param open_interest: The open_interest of this ContractStat. # noqa: E501 - :type: int - """ - - self._open_interest = open_interest - - @property - def open_interest_usd(self): - """Gets the open_interest_usd of this ContractStat. # noqa: E501 - - Open interest volume(quote currency) # noqa: E501 - - :return: The open_interest_usd of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._open_interest_usd - - @open_interest_usd.setter - def open_interest_usd(self, open_interest_usd): - """Sets the open_interest_usd of this ContractStat. - - Open interest volume(quote currency) # noqa: E501 - - :param open_interest_usd: The open_interest_usd of this ContractStat. # noqa: E501 - :type: float - """ - - self._open_interest_usd = open_interest_usd - - @property - def top_lsr_account(self): - """Gets the top_lsr_account of this ContractStat. # noqa: E501 - - Top trader long/short account ratio # noqa: E501 - - :return: The top_lsr_account of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._top_lsr_account - - @top_lsr_account.setter - def top_lsr_account(self, top_lsr_account): - """Sets the top_lsr_account of this ContractStat. - - Top trader long/short account ratio # noqa: E501 - - :param top_lsr_account: The top_lsr_account of this ContractStat. # noqa: E501 - :type: float - """ - - self._top_lsr_account = top_lsr_account - - @property - def top_lsr_size(self): - """Gets the top_lsr_size of this ContractStat. # noqa: E501 - - Top trader long/short position ratio # noqa: E501 - - :return: The top_lsr_size of this ContractStat. # noqa: E501 - :rtype: float - """ - return self._top_lsr_size - - @top_lsr_size.setter - def top_lsr_size(self, top_lsr_size): - """Sets the top_lsr_size of this ContractStat. - - Top trader long/short position ratio # noqa: E501 - - :param top_lsr_size: The top_lsr_size of this ContractStat. # noqa: E501 - :type: float - """ - - self._top_lsr_size = top_lsr_size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ContractStat): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ContractStat): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py deleted file mode 100644 index e254254..0000000 --- a/gate_api/models/convert_small_balance.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class ConvertSmallBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'list[str]', - 'is_all': 'bool' - } - - attribute_map = { - 'currency': 'currency', - 'is_all': 'is_all' - } - - def __init__(self, currency=None, is_all=None, local_vars_configuration=None): # noqa: E501 - # type: (list[str], bool, Configuration) -> None - """ConvertSmallBalance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._is_all = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if is_all is not None: - self.is_all = is_all - - @property - def currency(self): - """Gets the currency of this ConvertSmallBalance. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this ConvertSmallBalance. # noqa: E501 - :rtype: list[str] - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this ConvertSmallBalance. - - Currency # noqa: E501 - - :param currency: The currency of this ConvertSmallBalance. # noqa: E501 - :type: list[str] - """ - - self._currency = currency - - @property - def is_all(self): - """Gets the is_all of this ConvertSmallBalance. # noqa: E501 - - Whether to exchange all # noqa: E501 - - :return: The is_all of this ConvertSmallBalance. # noqa: E501 - :rtype: bool - """ - return self._is_all - - @is_all.setter - def is_all(self, is_all): - """Sets the is_all of this ConvertSmallBalance. - - Whether to exchange all # noqa: E501 - - :param is_all: The is_all of this ConvertSmallBalance. # noqa: E501 - :type: bool - """ - - self._is_all = is_all - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConvertSmallBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ConvertSmallBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py deleted file mode 100644 index 4501ba2..0000000 --- a/gate_api/models/countdown_cancel_all_futures_task.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CountdownCancelAllFuturesTask(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'timeout': 'int', - 'contract': 'str' - } - - attribute_map = { - 'timeout': 'timeout', - 'contract': 'contract' - } - - def __init__(self, timeout=None, contract=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, Configuration) -> None - """CountdownCancelAllFuturesTask - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._timeout = None - self._contract = None - self.discriminator = None - - self.timeout = timeout - if contract is not None: - self.contract = contract - - @property - def timeout(self): - """Gets the timeout of this CountdownCancelAllFuturesTask. # noqa: E501 - - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 - - :return: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501 - :rtype: int - """ - return self._timeout - - @timeout.setter - def timeout(self, timeout): - """Sets the timeout of this CountdownCancelAllFuturesTask. - - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 - - :param timeout: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 - raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 - - self._timeout = timeout - - @property - def contract(self): - """Gets the contract of this CountdownCancelAllFuturesTask. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this CountdownCancelAllFuturesTask. - - Futures contract # noqa: E501 - - :param contract: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 - :type: str - """ - - self._contract = contract - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CountdownCancelAllFuturesTask): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CountdownCancelAllFuturesTask): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py deleted file mode 100644 index 62cc503..0000000 --- a/gate_api/models/countdown_cancel_all_options_task.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CountdownCancelAllOptionsTask(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'timeout': 'int', - 'contract': 'str', - 'underlying': 'str' - } - - attribute_map = { - 'timeout': 'timeout', - 'contract': 'contract', - 'underlying': 'underlying' - } - - def __init__(self, timeout=None, contract=None, underlying=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, Configuration) -> None - """CountdownCancelAllOptionsTask - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._timeout = None - self._contract = None - self._underlying = None - self.discriminator = None - - self.timeout = timeout - if contract is not None: - self.contract = contract - if underlying is not None: - self.underlying = underlying - - @property - def timeout(self): - """Gets the timeout of this CountdownCancelAllOptionsTask. # noqa: E501 - - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 - - :return: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501 - :rtype: int - """ - return self._timeout - - @timeout.setter - def timeout(self, timeout): - """Sets the timeout of this CountdownCancelAllOptionsTask. - - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 - - :param timeout: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 - raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 - - self._timeout = timeout - - @property - def contract(self): - """Gets the contract of this CountdownCancelAllOptionsTask. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this CountdownCancelAllOptionsTask. - - Options contract name # noqa: E501 - - :param contract: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def underlying(self): - """Gets the underlying of this CountdownCancelAllOptionsTask. # noqa: E501 - - Underlying # noqa: E501 - - :return: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 - :rtype: str - """ - return self._underlying - - @underlying.setter - def underlying(self, underlying): - """Sets the underlying of this CountdownCancelAllOptionsTask. - - Underlying # noqa: E501 - - :param underlying: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 - :type: str - """ - - self._underlying = underlying - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CountdownCancelAllOptionsTask): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CountdownCancelAllOptionsTask): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py deleted file mode 100644 index f2764ab..0000000 --- a/gate_api/models/countdown_cancel_all_spot_task.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CountdownCancelAllSpotTask(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'timeout': 'int', - 'currency_pair': 'str' - } - - attribute_map = { - 'timeout': 'timeout', - 'currency_pair': 'currency_pair' - } - - def __init__(self, timeout=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, Configuration) -> None - """CountdownCancelAllSpotTask - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._timeout = None - self._currency_pair = None - self.discriminator = None - - self.timeout = timeout - if currency_pair is not None: - self.currency_pair = currency_pair - - @property - def timeout(self): - """Gets the timeout of this CountdownCancelAllSpotTask. # noqa: E501 - - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 - - :return: The timeout of this CountdownCancelAllSpotTask. # noqa: E501 - :rtype: int - """ - return self._timeout - - @timeout.setter - def timeout(self, timeout): - """Sets the timeout of this CountdownCancelAllSpotTask. - - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 - - :param timeout: The timeout of this CountdownCancelAllSpotTask. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 - raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 - - self._timeout = timeout - - @property - def currency_pair(self): - """Gets the currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this CountdownCancelAllSpotTask. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this CountdownCancelAllSpotTask. # 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, CountdownCancelAllSpotTask): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CountdownCancelAllSpotTask): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py deleted file mode 100644 index b82beab..0000000 --- a/gate_api/models/create_collateral_order.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CreateCollateralOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'collateral_amount': 'str', - 'collateral_currency': 'str', - 'borrow_amount': 'str', - 'borrow_currency': 'str' - } - - attribute_map = { - 'collateral_amount': 'collateral_amount', - 'collateral_currency': 'collateral_currency', - 'borrow_amount': 'borrow_amount', - 'borrow_currency': 'borrow_currency' - } - - def __init__(self, collateral_amount=None, collateral_currency=None, borrow_amount=None, borrow_currency=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """CreateCollateralOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._collateral_amount = None - self._collateral_currency = None - self._borrow_amount = None - self._borrow_currency = None - self.discriminator = None - - self.collateral_amount = collateral_amount - self.collateral_currency = collateral_currency - self.borrow_amount = borrow_amount - self.borrow_currency = borrow_currency - - @property - def collateral_amount(self): - """Gets the collateral_amount of this CreateCollateralOrder. # noqa: E501 - - Collateral amount # noqa: E501 - - :return: The collateral_amount of this CreateCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._collateral_amount - - @collateral_amount.setter - def collateral_amount(self, collateral_amount): - """Sets the collateral_amount of this CreateCollateralOrder. - - Collateral amount # noqa: E501 - - :param collateral_amount: The collateral_amount of this CreateCollateralOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and collateral_amount is None: # noqa: E501 - raise ValueError("Invalid value for `collateral_amount`, must not be `None`") # noqa: E501 - - self._collateral_amount = collateral_amount - - @property - def collateral_currency(self): - """Gets the collateral_currency of this CreateCollateralOrder. # noqa: E501 - - Collateral # noqa: E501 - - :return: The collateral_currency of this CreateCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._collateral_currency - - @collateral_currency.setter - def collateral_currency(self, collateral_currency): - """Sets the collateral_currency of this CreateCollateralOrder. - - Collateral # noqa: E501 - - :param collateral_currency: The collateral_currency of this CreateCollateralOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and collateral_currency is None: # noqa: E501 - raise ValueError("Invalid value for `collateral_currency`, must not be `None`") # noqa: E501 - - self._collateral_currency = collateral_currency - - @property - def borrow_amount(self): - """Gets the borrow_amount of this CreateCollateralOrder. # noqa: E501 - - Borrowing amount # noqa: E501 - - :return: The borrow_amount of this CreateCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._borrow_amount - - @borrow_amount.setter - def borrow_amount(self, borrow_amount): - """Sets the borrow_amount of this CreateCollateralOrder. - - Borrowing amount # noqa: E501 - - :param borrow_amount: The borrow_amount of this CreateCollateralOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and borrow_amount is None: # noqa: E501 - raise ValueError("Invalid value for `borrow_amount`, must not be `None`") # noqa: E501 - - self._borrow_amount = borrow_amount - - @property - def borrow_currency(self): - """Gets the borrow_currency of this CreateCollateralOrder. # noqa: E501 - - Borrowed currency # noqa: E501 - - :return: The borrow_currency of this CreateCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._borrow_currency - - @borrow_currency.setter - def borrow_currency(self, borrow_currency): - """Sets the borrow_currency of this CreateCollateralOrder. - - Borrowed currency # noqa: E501 - - :param borrow_currency: The borrow_currency of this CreateCollateralOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and borrow_currency is None: # noqa: E501 - raise ValueError("Invalid value for `borrow_currency`, must not be `None`") # noqa: E501 - - self._borrow_currency = borrow_currency - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateCollateralOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateCollateralOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py deleted file mode 100644 index 84e5e21..0000000 --- a/gate_api/models/create_multi_collateral_order.py +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CreateMultiCollateralOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'str', - 'order_type': 'str', - 'fixed_type': 'str', - 'fixed_rate': 'str', - 'auto_renew': 'bool', - 'auto_repay': 'bool', - 'borrow_currency': 'str', - 'borrow_amount': 'str', - 'collateral_currencies': 'list[CollateralCurrency]' - } - - attribute_map = { - 'order_id': 'order_id', - 'order_type': 'order_type', - 'fixed_type': 'fixed_type', - 'fixed_rate': 'fixed_rate', - 'auto_renew': 'auto_renew', - 'auto_repay': 'auto_repay', - 'borrow_currency': 'borrow_currency', - 'borrow_amount': 'borrow_amount', - 'collateral_currencies': 'collateral_currencies' - } - - def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=None, auto_renew=None, auto_repay=None, borrow_currency=None, borrow_amount=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, bool, bool, str, str, list[CollateralCurrency], Configuration) -> None - """CreateMultiCollateralOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._order_type = None - self._fixed_type = None - self._fixed_rate = None - self._auto_renew = None - self._auto_repay = None - self._borrow_currency = None - self._borrow_amount = None - self._collateral_currencies = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if order_type is not None: - self.order_type = order_type - if fixed_type is not None: - self.fixed_type = fixed_type - if fixed_rate is not None: - self.fixed_rate = fixed_rate - if auto_renew is not None: - self.auto_renew = auto_renew - if auto_repay is not None: - self.auto_repay = auto_repay - self.borrow_currency = borrow_currency - self.borrow_amount = borrow_amount - if collateral_currencies is not None: - self.collateral_currencies = collateral_currencies - - @property - def order_id(self): - """Gets the order_id of this CreateMultiCollateralOrder. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this CreateMultiCollateralOrder. - - Order ID # noqa: E501 - - :param order_id: The order_id of this CreateMultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def order_type(self): - """Gets the order_type of this CreateMultiCollateralOrder. # noqa: E501 - - current - current, fixed - fixed, if not specified, default to current # noqa: E501 - - :return: The order_type of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._order_type - - @order_type.setter - def order_type(self, order_type): - """Sets the order_type of this CreateMultiCollateralOrder. - - current - current, fixed - fixed, if not specified, default to current # noqa: E501 - - :param order_type: The order_type of this CreateMultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._order_type = order_type - - @property - def fixed_type(self): - """Gets the fixed_type of this CreateMultiCollateralOrder. # noqa: E501 - - Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed # noqa: E501 - - :return: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._fixed_type - - @fixed_type.setter - def fixed_type(self, fixed_type): - """Sets the fixed_type of this CreateMultiCollateralOrder. - - Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed # noqa: E501 - - :param fixed_type: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._fixed_type = fixed_type - - @property - def fixed_rate(self): - """Gets the fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 - - Fixed interest rate, must be specified for fixed # noqa: E501 - - :return: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._fixed_rate - - @fixed_rate.setter - def fixed_rate(self, fixed_rate): - """Sets the fixed_rate of this CreateMultiCollateralOrder. - - Fixed interest rate, must be specified for fixed # noqa: E501 - - :param fixed_rate: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._fixed_rate = fixed_rate - - @property - def auto_renew(self): - """Gets the auto_renew of this CreateMultiCollateralOrder. # noqa: E501 - - Fixed interest rate, automatic renewal # noqa: E501 - - :return: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_renew - - @auto_renew.setter - def auto_renew(self, auto_renew): - """Sets the auto_renew of this CreateMultiCollateralOrder. - - Fixed interest rate, automatic renewal # noqa: E501 - - :param auto_renew: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 - :type: bool - """ - - self._auto_renew = auto_renew - - @property - def auto_repay(self): - """Gets the auto_repay of this CreateMultiCollateralOrder. # noqa: E501 - - Fixed interest rate, automatic repayment # noqa: E501 - - :return: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_repay - - @auto_repay.setter - def auto_repay(self, auto_repay): - """Sets the auto_repay of this CreateMultiCollateralOrder. - - Fixed interest rate, automatic repayment # noqa: E501 - - :param auto_repay: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 - :type: bool - """ - - self._auto_repay = auto_repay - - @property - def borrow_currency(self): - """Gets the borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 - - Borrowed currency # noqa: E501 - - :return: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._borrow_currency - - @borrow_currency.setter - def borrow_currency(self, borrow_currency): - """Sets the borrow_currency of this CreateMultiCollateralOrder. - - Borrowed currency # noqa: E501 - - :param borrow_currency: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and borrow_currency is None: # noqa: E501 - raise ValueError("Invalid value for `borrow_currency`, must not be `None`") # noqa: E501 - - self._borrow_currency = borrow_currency - - @property - def borrow_amount(self): - """Gets the borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 - - Borrowing amount # noqa: E501 - - :return: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._borrow_amount - - @borrow_amount.setter - def borrow_amount(self, borrow_amount): - """Sets the borrow_amount of this CreateMultiCollateralOrder. - - Borrowing amount # noqa: E501 - - :param borrow_amount: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and borrow_amount is None: # noqa: E501 - raise ValueError("Invalid value for `borrow_amount`, must not be `None`") # noqa: E501 - - self._borrow_amount = borrow_amount - - @property - def collateral_currencies(self): - """Gets the collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 - - Collateral currency and amount # noqa: E501 - - :return: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 - :rtype: list[CollateralCurrency] - """ - return self._collateral_currencies - - @collateral_currencies.setter - def collateral_currencies(self, collateral_currencies): - """Sets the collateral_currencies of this CreateMultiCollateralOrder. - - Collateral currency and amount # noqa: E501 - - :param collateral_currencies: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 - :type: list[CollateralCurrency] - """ - - self._collateral_currencies = collateral_currencies - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateMultiCollateralOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateMultiCollateralOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py deleted file mode 100644 index b45bd6b..0000000 --- a/gate_api/models/create_uni_lend.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CreateUniLend(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str', - 'type': 'str', - 'min_rate': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount', - 'type': 'type', - 'min_rate': 'min_rate' - } - - def __init__(self, currency=None, amount=None, type=None, min_rate=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """CreateUniLend - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self._type = None - self._min_rate = None - self.discriminator = None - - self.currency = currency - self.amount = amount - self.type = type - if min_rate is not None: - self.min_rate = min_rate - - @property - def currency(self): - """Gets the currency of this CreateUniLend. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this CreateUniLend. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CreateUniLend. - - Currency name # noqa: E501 - - :param currency: The currency of this CreateUniLend. # 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 CreateUniLend. # noqa: E501 - - The amount of currency could be lent # noqa: E501 - - :return: The amount of this CreateUniLend. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CreateUniLend. - - The amount of currency could be lent # noqa: E501 - - :param amount: The amount of this CreateUniLend. # 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 type(self): - """Gets the type of this CreateUniLend. # noqa: E501 - - type: lend - lend, redeem - redeem # noqa: E501 - - :return: The type of this CreateUniLend. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CreateUniLend. - - type: lend - lend, redeem - redeem # noqa: E501 - - :param type: The type of this CreateUniLend. # 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 = ["lend", "redeem"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def min_rate(self): - """Gets the min_rate of this CreateUniLend. # noqa: E501 - - The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501 - - :return: The min_rate of this CreateUniLend. # noqa: E501 - :rtype: str - """ - return self._min_rate - - @min_rate.setter - def min_rate(self, min_rate): - """Sets the min_rate of this CreateUniLend. - - The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501 - - :param min_rate: The min_rate of this CreateUniLend. # noqa: E501 - :type: str - """ - - self._min_rate = min_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, CreateUniLend): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateUniLend): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py deleted file mode 100644 index 419b667..0000000 --- a/gate_api/models/create_uni_loan.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CreateUniLoan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'type': 'str', - 'amount': 'str', - 'repaid_all': 'bool', - 'currency_pair': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'type': 'type', - 'amount': 'amount', - 'repaid_all': 'repaid_all', - 'currency_pair': 'currency_pair' - } - - def __init__(self, currency=None, type=None, amount=None, repaid_all=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, bool, str, Configuration) -> None - """CreateUniLoan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._type = None - self._amount = None - self._repaid_all = None - self._currency_pair = None - self.discriminator = None - - self.currency = currency - self.type = type - self.amount = amount - if repaid_all is not None: - self.repaid_all = repaid_all - self.currency_pair = currency_pair - - @property - def currency(self): - """Gets the currency of this CreateUniLoan. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this CreateUniLoan. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CreateUniLoan. - - Currency # noqa: E501 - - :param currency: The currency of this CreateUniLoan. # 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 type(self): - """Gets the type of this CreateUniLoan. # noqa: E501 - - type: borrow - borrow, repay - repay # noqa: E501 - - :return: The type of this CreateUniLoan. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CreateUniLoan. - - type: borrow - borrow, repay - repay # noqa: E501 - - :param type: The type of this CreateUniLoan. # 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 = ["borrow", "repay"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def amount(self): - """Gets the amount of this CreateUniLoan. # noqa: E501 - - The amount of lending or repaying # noqa: E501 - - :return: The amount of this CreateUniLoan. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CreateUniLoan. - - The amount of lending or repaying # noqa: E501 - - :param amount: The amount of this CreateUniLoan. # 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 repaid_all(self): - """Gets the repaid_all of this CreateUniLoan. # noqa: E501 - - Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501 - - :return: The repaid_all of this CreateUniLoan. # noqa: E501 - :rtype: bool - """ - return self._repaid_all - - @repaid_all.setter - def repaid_all(self, repaid_all): - """Sets the repaid_all of this CreateUniLoan. - - Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501 - - :param repaid_all: The repaid_all of this CreateUniLoan. # noqa: E501 - :type: bool - """ - - self._repaid_all = repaid_all - - @property - def currency_pair(self): - """Gets the currency_pair of this CreateUniLoan. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this CreateUniLoan. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this CreateUniLoan. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this CreateUniLoan. # 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 - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateUniLoan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateUniLoan): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_account.py b/gate_api/models/cross_margin_account.py deleted file mode 100644 index e76d6ed..0000000 --- a/gate_api/models/cross_margin_account.py +++ /dev/null @@ -1,569 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'refresh_time': 'int', - 'locked': 'bool', - 'balances': 'dict(str, CrossMarginBalance)', - 'total': 'str', - 'borrowed': 'str', - 'interest': 'str', - 'risk': 'str', - 'total_initial_margin': 'str', - 'total_margin_balance': 'str', - 'total_maintenance_margin': 'str', - 'total_initial_margin_rate': 'str', - 'total_maintenance_margin_rate': 'str', - 'total_available_margin': 'str', - 'portfolio_margin_total': 'str', - 'portfolio_margin_total_liab': 'str', - 'portfolio_margin_total_equity': 'str' - } - - attribute_map = { - 'user_id': 'user_id', - 'refresh_time': 'refresh_time', - 'locked': 'locked', - 'balances': 'balances', - 'total': 'total', - 'borrowed': 'borrowed', - 'interest': 'interest', - 'risk': 'risk', - 'total_initial_margin': 'total_initial_margin', - 'total_margin_balance': 'total_margin_balance', - 'total_maintenance_margin': 'total_maintenance_margin', - 'total_initial_margin_rate': 'total_initial_margin_rate', - 'total_maintenance_margin_rate': 'total_maintenance_margin_rate', - 'total_available_margin': 'total_available_margin', - 'portfolio_margin_total': 'portfolio_margin_total', - 'portfolio_margin_total_liab': 'portfolio_margin_total_liab', - 'portfolio_margin_total_equity': 'portfolio_margin_total_equity' - } - - def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, interest=None, risk=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, portfolio_margin_total=None, portfolio_margin_total_liab=None, portfolio_margin_total_equity=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, bool, dict(str, CrossMarginBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """CrossMarginAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._refresh_time = None - self._locked = None - self._balances = None - self._total = None - self._borrowed = None - self._interest = None - self._risk = None - self._total_initial_margin = None - self._total_margin_balance = None - self._total_maintenance_margin = None - self._total_initial_margin_rate = None - self._total_maintenance_margin_rate = None - self._total_available_margin = None - self._portfolio_margin_total = None - self._portfolio_margin_total_liab = None - self._portfolio_margin_total_equity = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if refresh_time is not None: - self.refresh_time = refresh_time - if locked is not None: - self.locked = locked - if balances is not None: - self.balances = balances - if total is not None: - self.total = total - if borrowed is not None: - self.borrowed = borrowed - if interest is not None: - self.interest = interest - if risk is not None: - self.risk = risk - if total_initial_margin is not None: - self.total_initial_margin = total_initial_margin - if total_margin_balance is not None: - self.total_margin_balance = total_margin_balance - if total_maintenance_margin is not None: - self.total_maintenance_margin = total_maintenance_margin - if total_initial_margin_rate is not None: - self.total_initial_margin_rate = total_initial_margin_rate - if total_maintenance_margin_rate is not None: - self.total_maintenance_margin_rate = total_maintenance_margin_rate - if total_available_margin is not None: - self.total_available_margin = total_available_margin - if portfolio_margin_total is not None: - self.portfolio_margin_total = portfolio_margin_total - if portfolio_margin_total_liab is not None: - self.portfolio_margin_total_liab = portfolio_margin_total_liab - if portfolio_margin_total_equity is not None: - self.portfolio_margin_total_equity = portfolio_margin_total_equity - - @property - def user_id(self): - """Gets the user_id of this CrossMarginAccount. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this CrossMarginAccount. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this CrossMarginAccount. - - User ID # noqa: E501 - - :param user_id: The user_id of this CrossMarginAccount. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def refresh_time(self): - """Gets the refresh_time of this CrossMarginAccount. # noqa: E501 - - Time of the most recent refresh # noqa: E501 - - :return: The refresh_time of this CrossMarginAccount. # noqa: E501 - :rtype: int - """ - return self._refresh_time - - @refresh_time.setter - def refresh_time(self, refresh_time): - """Sets the refresh_time of this CrossMarginAccount. - - Time of the most recent refresh # noqa: E501 - - :param refresh_time: The refresh_time of this CrossMarginAccount. # noqa: E501 - :type: int - """ - - self._refresh_time = refresh_time - - @property - def locked(self): - """Gets the locked of this CrossMarginAccount. # noqa: E501 - - Whether account is locked # noqa: E501 - - :return: The locked of this CrossMarginAccount. # noqa: E501 - :rtype: bool - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this CrossMarginAccount. - - Whether account is locked # noqa: E501 - - :param locked: The locked of this CrossMarginAccount. # noqa: E501 - :type: bool - """ - - self._locked = locked - - @property - def balances(self): - """Gets the balances of this CrossMarginAccount. # noqa: E501 - - - :return: The balances of this CrossMarginAccount. # noqa: E501 - :rtype: dict(str, CrossMarginBalance) - """ - return self._balances - - @balances.setter - def balances(self, balances): - """Sets the balances of this CrossMarginAccount. - - - :param balances: The balances of this CrossMarginAccount. # noqa: E501 - :type: dict(str, CrossMarginBalance) - """ - - self._balances = balances - - @property - def total(self): - """Gets the total of this CrossMarginAccount. # noqa: E501 - - Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 - - :return: The total of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this CrossMarginAccount. - - Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 - - :param total: The total of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def borrowed(self): - """Gets the borrowed of this CrossMarginAccount. # noqa: E501 - - Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 - - :return: The borrowed of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this CrossMarginAccount. - - Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 - - :param borrowed: The borrowed of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def interest(self): - """Gets the interest of this CrossMarginAccount. # noqa: E501 - - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 - - :return: The interest of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this CrossMarginAccount. - - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 - - :param interest: The interest of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._interest = interest - - @property - def risk(self): - """Gets the risk of this CrossMarginAccount. # noqa: E501 - - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 - - :return: The risk of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._risk - - @risk.setter - def risk(self, risk): - """Sets the risk of this CrossMarginAccount. - - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 - - :param risk: The risk of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._risk = risk - - @property - def total_initial_margin(self): - """Gets the total_initial_margin of this CrossMarginAccount. # noqa: E501 - - Total initial margin # noqa: E501 - - :return: The total_initial_margin of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin - - @total_initial_margin.setter - def total_initial_margin(self, total_initial_margin): - """Sets the total_initial_margin of this CrossMarginAccount. - - Total initial margin # noqa: E501 - - :param total_initial_margin: The total_initial_margin of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin = total_initial_margin - - @property - def total_margin_balance(self): - """Gets the total_margin_balance of this CrossMarginAccount. # noqa: E501 - - Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501 - - :return: The total_margin_balance of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_margin_balance - - @total_margin_balance.setter - def total_margin_balance(self, total_margin_balance): - """Sets the total_margin_balance of this CrossMarginAccount. - - Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501 - - :param total_margin_balance: The total_margin_balance of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_margin_balance = total_margin_balance - - @property - def total_maintenance_margin(self): - """Gets the total_maintenance_margin of this CrossMarginAccount. # noqa: E501 - - Total maintenance margin # noqa: E501 - - :return: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin - - @total_maintenance_margin.setter - def total_maintenance_margin(self, total_maintenance_margin): - """Sets the total_maintenance_margin of this CrossMarginAccount. - - Total maintenance margin # noqa: E501 - - :param total_maintenance_margin: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin = total_maintenance_margin - - @property - def total_initial_margin_rate(self): - """Gets the total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 - - Total initial margin rate # noqa: E501 - - :return: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin_rate - - @total_initial_margin_rate.setter - def total_initial_margin_rate(self, total_initial_margin_rate): - """Sets the total_initial_margin_rate of this CrossMarginAccount. - - Total initial margin rate # noqa: E501 - - :param total_initial_margin_rate: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin_rate = total_initial_margin_rate - - @property - def total_maintenance_margin_rate(self): - """Gets the total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 - - Total maintenance margin rate # noqa: E501 - - :return: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin_rate - - @total_maintenance_margin_rate.setter - def total_maintenance_margin_rate(self, total_maintenance_margin_rate): - """Sets the total_maintenance_margin_rate of this CrossMarginAccount. - - Total maintenance margin rate # noqa: E501 - - :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin_rate = total_maintenance_margin_rate - - @property - def total_available_margin(self): - """Gets the total_available_margin of this CrossMarginAccount. # noqa: E501 - - Total available margin # noqa: E501 - - :return: The total_available_margin of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_available_margin - - @total_available_margin.setter - def total_available_margin(self, total_available_margin): - """Sets the total_available_margin of this CrossMarginAccount. - - Total available margin # noqa: E501 - - :param total_available_margin: The total_available_margin of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_available_margin = total_available_margin - - @property - def portfolio_margin_total(self): - """Gets the portfolio_margin_total of this CrossMarginAccount. # noqa: E501 - - Total amount of the portfolio margin account # noqa: E501 - - :return: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._portfolio_margin_total - - @portfolio_margin_total.setter - def portfolio_margin_total(self, portfolio_margin_total): - """Sets the portfolio_margin_total of this CrossMarginAccount. - - Total amount of the portfolio margin account # noqa: E501 - - :param portfolio_margin_total: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._portfolio_margin_total = portfolio_margin_total - - @property - def portfolio_margin_total_liab(self): - """Gets the portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 - - Total liabilities of the portfolio margin account # noqa: E501 - - :return: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._portfolio_margin_total_liab - - @portfolio_margin_total_liab.setter - def portfolio_margin_total_liab(self, portfolio_margin_total_liab): - """Sets the portfolio_margin_total_liab of this CrossMarginAccount. - - Total liabilities of the portfolio margin account # noqa: E501 - - :param portfolio_margin_total_liab: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._portfolio_margin_total_liab = portfolio_margin_total_liab - - @property - def portfolio_margin_total_equity(self): - """Gets the portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 - - Total equity of the portfolio margin account # noqa: E501 - - :return: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._portfolio_margin_total_equity - - @portfolio_margin_total_equity.setter - def portfolio_margin_total_equity(self, portfolio_margin_total_equity): - """Sets the portfolio_margin_total_equity of this CrossMarginAccount. - - Total equity of the portfolio margin account # noqa: E501 - - :param portfolio_margin_total_equity: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._portfolio_margin_total_equity = portfolio_margin_total_equity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_account_book.py b/gate_api/models/cross_margin_account_book.py deleted file mode 100644 index faf0dd2..0000000 --- a/gate_api/models/cross_margin_account_book.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginAccountBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'time': 'int', - 'currency': 'str', - 'change': 'str', - 'balance': 'str', - 'type': 'str' - } - - attribute_map = { - 'id': 'id', - 'time': 'time', - 'currency': 'currency', - 'change': 'change', - 'balance': 'balance', - 'type': 'type' - } - - def __init__(self, id=None, time=None, currency=None, change=None, balance=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, str, str, str, Configuration) -> None - """CrossMarginAccountBook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._time = None - self._currency = None - self._change = None - self._balance = None - self._type = None - self.discriminator = None - - if id is not None: - self.id = id - if time is not None: - self.time = time - if currency is not None: - self.currency = currency - if change is not None: - self.change = change - if balance is not None: - self.balance = balance - if type is not None: - self.type = type - - @property - def id(self): - """Gets the id of this CrossMarginAccountBook. # noqa: E501 - - Balance change record ID # noqa: E501 - - :return: The id of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CrossMarginAccountBook. - - Balance change record ID # noqa: E501 - - :param id: The id of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def time(self): - """Gets the time of this CrossMarginAccountBook. # noqa: E501 - - The timestamp of the change (in milliseconds) # noqa: E501 - - :return: The time of this CrossMarginAccountBook. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this CrossMarginAccountBook. - - The timestamp of the change (in milliseconds) # noqa: E501 - - :param time: The time of this CrossMarginAccountBook. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def currency(self): - """Gets the currency of this CrossMarginAccountBook. # noqa: E501 - - Currency changed # noqa: E501 - - :return: The currency of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginAccountBook. - - Currency changed # noqa: E501 - - :param currency: The currency of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def change(self): - """Gets the change of this CrossMarginAccountBook. # noqa: E501 - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :return: The change of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this CrossMarginAccountBook. - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :param change: The change of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def balance(self): - """Gets the balance of this CrossMarginAccountBook. # noqa: E501 - - Balance after change # noqa: E501 - - :return: The balance of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this CrossMarginAccountBook. - - Balance after change # noqa: E501 - - :param balance: The balance of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._balance = balance - - @property - def type(self): - """Gets the type of this CrossMarginAccountBook. # noqa: E501 - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :return: The type of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CrossMarginAccountBook. - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :param type: The type of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginAccountBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginAccountBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py deleted file mode 100644 index b3c766a..0000000 --- a/gate_api/models/cross_margin_balance.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'available': 'str', - 'freeze': 'str', - 'borrowed': 'str', - 'interest': 'str', - 'negative_liab': 'str', - 'futures_pos_liab': 'str', - 'equity': 'str', - 'total_freeze': 'str', - 'total_liab': 'str' - } - - attribute_map = { - 'available': 'available', - 'freeze': 'freeze', - 'borrowed': 'borrowed', - 'interest': 'interest', - 'negative_liab': 'negative_liab', - 'futures_pos_liab': 'futures_pos_liab', - 'equity': 'equity', - 'total_freeze': 'total_freeze', - 'total_liab': 'total_liab' - } - - def __init__(self, available=None, freeze=None, borrowed=None, interest=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None - """CrossMarginBalance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._available = None - self._freeze = None - self._borrowed = None - self._interest = None - self._negative_liab = None - self._futures_pos_liab = None - self._equity = None - self._total_freeze = None - self._total_liab = None - self.discriminator = None - - if available is not None: - self.available = available - if freeze is not None: - self.freeze = freeze - if borrowed is not None: - self.borrowed = borrowed - if interest is not None: - self.interest = interest - if negative_liab is not None: - self.negative_liab = negative_liab - if futures_pos_liab is not None: - self.futures_pos_liab = futures_pos_liab - if equity is not None: - self.equity = equity - if total_freeze is not None: - self.total_freeze = total_freeze - if total_liab is not None: - self.total_liab = total_liab - - @property - def available(self): - """Gets the available of this CrossMarginBalance. # noqa: E501 - - Available amount # noqa: E501 - - :return: The available of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this CrossMarginBalance. - - Available amount # noqa: E501 - - :param available: The available of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def freeze(self): - """Gets the freeze of this CrossMarginBalance. # noqa: E501 - - Locked amount # noqa: E501 - - :return: The freeze of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._freeze - - @freeze.setter - def freeze(self, freeze): - """Sets the freeze of this CrossMarginBalance. - - Locked amount # noqa: E501 - - :param freeze: The freeze of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._freeze = freeze - - @property - def borrowed(self): - """Gets the borrowed of this CrossMarginBalance. # noqa: E501 - - Borrowed amount # noqa: E501 - - :return: The borrowed of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this CrossMarginBalance. - - Borrowed amount # noqa: E501 - - :param borrowed: The borrowed of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def interest(self): - """Gets the interest of this CrossMarginBalance. # noqa: E501 - - Unpaid interests # noqa: E501 - - :return: The interest of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this CrossMarginBalance. - - Unpaid interests # noqa: E501 - - :param interest: The interest of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._interest = interest - - @property - def negative_liab(self): - """Gets the negative_liab of this CrossMarginBalance. # noqa: E501 - - Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501 - - :return: The negative_liab of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._negative_liab - - @negative_liab.setter - def negative_liab(self, negative_liab): - """Sets the negative_liab of this CrossMarginBalance. - - Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501 - - :param negative_liab: The negative_liab of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._negative_liab = negative_liab - - @property - def futures_pos_liab(self): - """Gets the futures_pos_liab of this CrossMarginBalance. # noqa: E501 - - Borrowing to Open Positions in Futures # noqa: E501 - - :return: The futures_pos_liab of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._futures_pos_liab - - @futures_pos_liab.setter - def futures_pos_liab(self, futures_pos_liab): - """Sets the futures_pos_liab of this CrossMarginBalance. - - Borrowing to Open Positions in Futures # noqa: E501 - - :param futures_pos_liab: The futures_pos_liab of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._futures_pos_liab = futures_pos_liab - - @property - def equity(self): - """Gets the equity of this CrossMarginBalance. # noqa: E501 - - Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501 - - :return: The equity of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._equity - - @equity.setter - def equity(self, equity): - """Sets the equity of this CrossMarginBalance. - - Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501 - - :param equity: The equity of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._equity = equity - - @property - def total_freeze(self): - """Gets the total_freeze of this CrossMarginBalance. # noqa: E501 - - Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501 - - :return: The total_freeze of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._total_freeze - - @total_freeze.setter - def total_freeze(self, total_freeze): - """Sets the total_freeze of this CrossMarginBalance. - - Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501 - - :param total_freeze: The total_freeze of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._total_freeze = total_freeze - - @property - def total_liab(self): - """Gets the total_liab of this CrossMarginBalance. # noqa: E501 - - Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501 - - :return: The total_liab of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._total_liab - - @total_liab.setter - def total_liab(self, total_liab): - """Sets the total_liab of this CrossMarginBalance. - - Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501 - - :param total_liab: The total_liab of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._total_liab = total_liab - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_balance1.py b/gate_api/models/cross_margin_balance1.py deleted file mode 100644 index 354247d..0000000 --- a/gate_api/models/cross_margin_balance1.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginBalance1(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'available': 'str', - 'freeze': 'str', - 'borrowed': 'str', - 'interest': 'str' - } - - attribute_map = { - 'available': 'available', - 'freeze': 'freeze', - 'borrowed': 'borrowed', - 'interest': 'interest' - } - - def __init__(self, available=None, freeze=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """CrossMarginBalance1 - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._available = None - self._freeze = None - self._borrowed = None - self._interest = None - self.discriminator = None - - if available is not None: - self.available = available - if freeze is not None: - self.freeze = freeze - if borrowed is not None: - self.borrowed = borrowed - if interest is not None: - self.interest = interest - - @property - def available(self): - """Gets the available of this CrossMarginBalance1. # noqa: E501 - - Available amount # noqa: E501 - - :return: The available of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this CrossMarginBalance1. - - Available amount # noqa: E501 - - :param available: The available of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def freeze(self): - """Gets the freeze of this CrossMarginBalance1. # noqa: E501 - - Locked amount # noqa: E501 - - :return: The freeze of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._freeze - - @freeze.setter - def freeze(self, freeze): - """Sets the freeze of this CrossMarginBalance1. - - Locked amount # noqa: E501 - - :param freeze: The freeze of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._freeze = freeze - - @property - def borrowed(self): - """Gets the borrowed of this CrossMarginBalance1. # noqa: E501 - - Borrowed amount # noqa: E501 - - :return: The borrowed of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this CrossMarginBalance1. - - Borrowed amount # noqa: E501 - - :param borrowed: The borrowed of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def interest(self): - """Gets the interest of this CrossMarginBalance1. # noqa: E501 - - Unpaid interests # noqa: E501 - - :return: The interest of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this CrossMarginBalance1. - - Unpaid interests # noqa: E501 - - :param interest: The interest of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._interest = interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginBalance1): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginBalance1): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_currency.py b/gate_api/models/cross_margin_currency.py deleted file mode 100644 index 3b9f37a..0000000 --- a/gate_api/models/cross_margin_currency.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'rate': 'str', - 'prec': 'str', - 'discount': 'str', - 'min_borrow_amount': 'str', - 'user_max_borrow_amount': 'str', - 'total_max_borrow_amount': 'str', - 'price': 'str', - 'loanable': 'bool', - 'status': 'int' - } - - attribute_map = { - 'name': 'name', - 'rate': 'rate', - 'prec': 'prec', - 'discount': 'discount', - 'min_borrow_amount': 'min_borrow_amount', - 'user_max_borrow_amount': 'user_max_borrow_amount', - 'total_max_borrow_amount': 'total_max_borrow_amount', - 'price': 'price', - 'loanable': 'loanable', - 'status': 'status' - } - - def __init__(self, name=None, rate=None, prec=None, discount=None, min_borrow_amount=None, user_max_borrow_amount=None, total_max_borrow_amount=None, price=None, loanable=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, bool, int, Configuration) -> None - """CrossMarginCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._rate = None - self._prec = None - self._discount = None - self._min_borrow_amount = None - self._user_max_borrow_amount = None - self._total_max_borrow_amount = None - self._price = None - self._loanable = None - self._status = None - self.discriminator = None - - if name is not None: - self.name = name - if rate is not None: - self.rate = rate - if prec is not None: - self.prec = prec - if discount is not None: - self.discount = discount - if min_borrow_amount is not None: - self.min_borrow_amount = min_borrow_amount - if user_max_borrow_amount is not None: - self.user_max_borrow_amount = user_max_borrow_amount - if total_max_borrow_amount is not None: - self.total_max_borrow_amount = total_max_borrow_amount - if price is not None: - self.price = price - if loanable is not None: - self.loanable = loanable - if status is not None: - self.status = status - - @property - def name(self): - """Gets the name of this CrossMarginCurrency. # noqa: E501 - - Currency name # noqa: E501 - - :return: The name of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this CrossMarginCurrency. - - Currency name # noqa: E501 - - :param name: The name of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def rate(self): - """Gets the rate of this CrossMarginCurrency. # noqa: E501 - - Minimum lending rate (hourly rate) # noqa: E501 - - :return: The rate of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._rate - - @rate.setter - def rate(self, rate): - """Sets the rate of this CrossMarginCurrency. - - Minimum lending rate (hourly rate) # noqa: E501 - - :param rate: The rate of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._rate = rate - - @property - def prec(self): - """Gets the prec of this CrossMarginCurrency. # noqa: E501 - - Currency precision # noqa: E501 - - :return: The prec of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._prec - - @prec.setter - def prec(self, prec): - """Sets the prec of this CrossMarginCurrency. - - Currency precision # noqa: E501 - - :param prec: The prec of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._prec = prec - - @property - def discount(self): - """Gets the discount of this CrossMarginCurrency. # noqa: E501 - - Currency value discount, which is used in total value calculation # noqa: E501 - - :return: The discount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._discount - - @discount.setter - def discount(self, discount): - """Sets the discount of this CrossMarginCurrency. - - Currency value discount, which is used in total value calculation # noqa: E501 - - :param discount: The discount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._discount = discount - - @property - def min_borrow_amount(self): - """Gets the min_borrow_amount of this CrossMarginCurrency. # noqa: E501 - - Minimum currency borrow amount. Unit is currency itself # noqa: E501 - - :return: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._min_borrow_amount - - @min_borrow_amount.setter - def min_borrow_amount(self, min_borrow_amount): - """Sets the min_borrow_amount of this CrossMarginCurrency. - - Minimum currency borrow amount. Unit is currency itself # noqa: E501 - - :param min_borrow_amount: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._min_borrow_amount = min_borrow_amount - - @property - def user_max_borrow_amount(self): - """Gets the user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - - Maximum borrow value allowed per user, in USDT # noqa: E501 - - :return: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._user_max_borrow_amount - - @user_max_borrow_amount.setter - def user_max_borrow_amount(self, user_max_borrow_amount): - """Sets the user_max_borrow_amount of this CrossMarginCurrency. - - Maximum borrow value allowed per user, in USDT # noqa: E501 - - :param user_max_borrow_amount: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._user_max_borrow_amount = user_max_borrow_amount - - @property - def total_max_borrow_amount(self): - """Gets the total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - - Maximum borrow value allowed for this currency, in USDT # noqa: E501 - - :return: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._total_max_borrow_amount - - @total_max_borrow_amount.setter - def total_max_borrow_amount(self, total_max_borrow_amount): - """Sets the total_max_borrow_amount of this CrossMarginCurrency. - - Maximum borrow value allowed for this currency, in USDT # noqa: E501 - - :param total_max_borrow_amount: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._total_max_borrow_amount = total_max_borrow_amount - - @property - def price(self): - """Gets the price of this CrossMarginCurrency. # noqa: E501 - - Price change between this currency and USDT # noqa: E501 - - :return: The price of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this CrossMarginCurrency. - - Price change between this currency and USDT # noqa: E501 - - :param price: The price of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def loanable(self): - """Gets the loanable of this CrossMarginCurrency. # noqa: E501 - - Whether currency is borrowed # noqa: E501 - - :return: The loanable of this CrossMarginCurrency. # noqa: E501 - :rtype: bool - """ - return self._loanable - - @loanable.setter - def loanable(self, loanable): - """Sets the loanable of this CrossMarginCurrency. - - Whether currency is borrowed # noqa: E501 - - :param loanable: The loanable of this CrossMarginCurrency. # noqa: E501 - :type: bool - """ - - self._loanable = loanable - - @property - def status(self): - """Gets the status of this CrossMarginCurrency. # noqa: E501 - - status - `0` : disable - `1` : enable # noqa: E501 - - :return: The status of this CrossMarginCurrency. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this CrossMarginCurrency. - - status - `0` : disable - `1` : enable # noqa: E501 - - :param status: The status of this CrossMarginCurrency. # noqa: E501 - :type: int - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py deleted file mode 100644 index 9a09c9e..0000000 --- a/gate_api/models/cross_margin_loan.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginLoan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'create_time': 'int', - 'update_time': 'int', - 'currency': 'str', - 'amount': 'str', - 'text': 'str', - 'status': 'int', - 'repaid': 'str', - 'repaid_interest': 'str', - 'unpaid_interest': 'str' - } - - attribute_map = { - 'id': 'id', - 'create_time': 'create_time', - 'update_time': 'update_time', - 'currency': 'currency', - 'amount': 'amount', - 'text': 'text', - 'status': 'status', - 'repaid': 'repaid', - 'repaid_interest': 'repaid_interest', - 'unpaid_interest': 'unpaid_interest' - } - - def __init__(self, id=None, create_time=None, update_time=None, currency=None, amount=None, text=None, status=None, repaid=None, repaid_interest=None, unpaid_interest=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, int, str, str, str, int, str, str, str, Configuration) -> None - """CrossMarginLoan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._create_time = None - self._update_time = None - self._currency = None - self._amount = None - self._text = None - self._status = None - self._repaid = None - self._repaid_interest = None - self._unpaid_interest = None - self.discriminator = None - - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if update_time is not None: - self.update_time = update_time - self.currency = currency - self.amount = amount - if text is not None: - self.text = text - if status is not None: - self.status = status - if repaid is not None: - self.repaid = repaid - if repaid_interest is not None: - self.repaid_interest = repaid_interest - if unpaid_interest is not None: - self.unpaid_interest = unpaid_interest - - @property - def id(self): - """Gets the id of this CrossMarginLoan. # noqa: E501 - - Loan record ID # noqa: E501 - - :return: The id of this CrossMarginLoan. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CrossMarginLoan. - - Loan record ID # noqa: E501 - - :param id: The id of this CrossMarginLoan. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this CrossMarginLoan. # noqa: E501 - - Creation timestamp, in milliseconds # noqa: E501 - - :return: The create_time of this CrossMarginLoan. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this CrossMarginLoan. - - Creation timestamp, in milliseconds # noqa: E501 - - :param create_time: The create_time of this CrossMarginLoan. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def update_time(self): - """Gets the update_time of this CrossMarginLoan. # noqa: E501 - - Update timestamp, in milliseconds # noqa: E501 - - :return: The update_time of this CrossMarginLoan. # noqa: E501 - :rtype: int - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this CrossMarginLoan. - - Update timestamp, in milliseconds # noqa: E501 - - :param update_time: The update_time of this CrossMarginLoan. # noqa: E501 - :type: int - """ - - self._update_time = update_time - - @property - def currency(self): - """Gets the currency of this CrossMarginLoan. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this CrossMarginLoan. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginLoan. - - Currency name # noqa: E501 - - :param currency: The currency of this CrossMarginLoan. # 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 CrossMarginLoan. # noqa: E501 - - Borrowed amount # noqa: E501 - - :return: The amount of this CrossMarginLoan. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CrossMarginLoan. - - Borrowed amount # noqa: E501 - - :param amount: The amount of this CrossMarginLoan. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def text(self): - """Gets the text of this CrossMarginLoan. # noqa: E501 - - User defined custom ID # noqa: E501 - - :return: The text of this CrossMarginLoan. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this CrossMarginLoan. - - User defined custom ID # noqa: E501 - - :param text: The text of this CrossMarginLoan. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def status(self): - """Gets the status of this CrossMarginLoan. # noqa: E501 - - Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete # noqa: E501 - - :return: The status of this CrossMarginLoan. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this CrossMarginLoan. - - Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete # noqa: E501 - - :param status: The status of this CrossMarginLoan. # noqa: E501 - :type: int - """ - allowed_values = [1, 2, 3] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def repaid(self): - """Gets the repaid of this CrossMarginLoan. # noqa: E501 - - Repaid amount # noqa: E501 - - :return: The repaid of this CrossMarginLoan. # noqa: E501 - :rtype: str - """ - return self._repaid - - @repaid.setter - def repaid(self, repaid): - """Sets the repaid of this CrossMarginLoan. - - Repaid amount # noqa: E501 - - :param repaid: The repaid of this CrossMarginLoan. # noqa: E501 - :type: str - """ - - self._repaid = repaid - - @property - def repaid_interest(self): - """Gets the repaid_interest of this CrossMarginLoan. # noqa: E501 - - Repaid interest # noqa: E501 - - :return: The repaid_interest of this CrossMarginLoan. # noqa: E501 - :rtype: str - """ - return self._repaid_interest - - @repaid_interest.setter - def repaid_interest(self, repaid_interest): - """Sets the repaid_interest of this CrossMarginLoan. - - Repaid interest # noqa: E501 - - :param repaid_interest: The repaid_interest of this CrossMarginLoan. # noqa: E501 - :type: str - """ - - self._repaid_interest = repaid_interest - - @property - def unpaid_interest(self): - """Gets the unpaid_interest of this CrossMarginLoan. # noqa: E501 - - Outstanding interest yet to be paid # noqa: E501 - - :return: The unpaid_interest of this CrossMarginLoan. # noqa: E501 - :rtype: str - """ - return self._unpaid_interest - - @unpaid_interest.setter - def unpaid_interest(self, unpaid_interest): - """Sets the unpaid_interest of this CrossMarginLoan. - - Outstanding interest yet to be paid # noqa: E501 - - :param unpaid_interest: The unpaid_interest of this CrossMarginLoan. # noqa: E501 - :type: str - """ - - self._unpaid_interest = unpaid_interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginLoan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginLoan): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_repay_request.py b/gate_api/models/cross_margin_repay_request.py deleted file mode 100644 index 406a95d..0000000 --- a/gate_api/models/cross_margin_repay_request.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginRepayRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """CrossMarginRepayRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - self.currency = currency - self.amount = amount - - @property - def currency(self): - """Gets the currency of this CrossMarginRepayRequest. # noqa: E501 - - Repayment currency # noqa: E501 - - :return: The currency of this CrossMarginRepayRequest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginRepayRequest. - - Repayment currency # noqa: E501 - - :param currency: The currency of this CrossMarginRepayRequest. # 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 CrossMarginRepayRequest. # noqa: E501 - - Repayment amount # noqa: E501 - - :return: The amount of this CrossMarginRepayRequest. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CrossMarginRepayRequest. - - Repayment amount # noqa: E501 - - :param amount: The amount of this CrossMarginRepayRequest. # 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, CrossMarginRepayRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginRepayRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py deleted file mode 100644 index dcbb97b..0000000 --- a/gate_api/models/cross_margin_repayment.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginRepayment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'create_time': 'int', - 'loan_id': 'str', - 'currency': 'str', - 'principal': 'str', - 'interest': 'str', - 'repayment_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'create_time': 'create_time', - 'loan_id': 'loan_id', - 'currency': 'currency', - 'principal': 'principal', - 'interest': 'interest', - 'repayment_type': 'repayment_type' - } - - def __init__(self, id=None, create_time=None, loan_id=None, currency=None, principal=None, interest=None, repayment_type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, str, str, str, str, Configuration) -> None - """CrossMarginRepayment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._create_time = None - self._loan_id = None - self._currency = None - self._principal = None - self._interest = None - self._repayment_type = None - self.discriminator = None - - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if loan_id is not None: - self.loan_id = loan_id - if currency is not None: - self.currency = currency - if principal is not None: - self.principal = principal - if interest is not None: - self.interest = interest - if repayment_type is not None: - self.repayment_type = repayment_type - - @property - def id(self): - """Gets the id of this CrossMarginRepayment. # noqa: E501 - - Loan record ID # noqa: E501 - - :return: The id of this CrossMarginRepayment. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CrossMarginRepayment. - - Loan record ID # noqa: E501 - - :param id: The id of this CrossMarginRepayment. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this CrossMarginRepayment. # noqa: E501 - - Repayment time # noqa: E501 - - :return: The create_time of this CrossMarginRepayment. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this CrossMarginRepayment. - - Repayment time # noqa: E501 - - :param create_time: The create_time of this CrossMarginRepayment. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def loan_id(self): - """Gets the loan_id of this CrossMarginRepayment. # noqa: E501 - - Loan record ID # noqa: E501 - - :return: The loan_id of this CrossMarginRepayment. # noqa: E501 - :rtype: str - """ - return self._loan_id - - @loan_id.setter - def loan_id(self, loan_id): - """Sets the loan_id of this CrossMarginRepayment. - - Loan record ID # noqa: E501 - - :param loan_id: The loan_id of this CrossMarginRepayment. # noqa: E501 - :type: str - """ - - self._loan_id = loan_id - - @property - def currency(self): - """Gets the currency of this CrossMarginRepayment. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this CrossMarginRepayment. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginRepayment. - - Currency name # noqa: E501 - - :param currency: The currency of this CrossMarginRepayment. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def principal(self): - """Gets the principal of this CrossMarginRepayment. # noqa: E501 - - Repaid principal # noqa: E501 - - :return: The principal of this CrossMarginRepayment. # noqa: E501 - :rtype: str - """ - return self._principal - - @principal.setter - def principal(self, principal): - """Sets the principal of this CrossMarginRepayment. - - Repaid principal # noqa: E501 - - :param principal: The principal of this CrossMarginRepayment. # noqa: E501 - :type: str - """ - - self._principal = principal - - @property - def interest(self): - """Gets the interest of this CrossMarginRepayment. # noqa: E501 - - Repaid interest # noqa: E501 - - :return: The interest of this CrossMarginRepayment. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this CrossMarginRepayment. - - Repaid interest # noqa: E501 - - :param interest: The interest of this CrossMarginRepayment. # noqa: E501 - :type: str - """ - - self._interest = interest - - @property - def repayment_type(self): - """Gets the repayment_type of this CrossMarginRepayment. # noqa: E501 - - Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation # noqa: E501 - - :return: The repayment_type of this CrossMarginRepayment. # noqa: E501 - :rtype: str - """ - return self._repayment_type - - @repayment_type.setter - def repayment_type(self, repayment_type): - """Sets the repayment_type of this CrossMarginRepayment. - - Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation # noqa: E501 - - :param repayment_type: The repayment_type of this CrossMarginRepayment. # noqa: E501 - :type: str - """ - - self._repayment_type = repayment_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, CrossMarginRepayment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginRepayment): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_transferable.py b/gate_api/models/cross_margin_transferable.py deleted file mode 100644 index 531070e..0000000 --- a/gate_api/models/cross_margin_transferable.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginTransferable(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """CrossMarginTransferable - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - - @property - def currency(self): - """Gets the currency of this CrossMarginTransferable. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this CrossMarginTransferable. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginTransferable. - - Currency detail # noqa: E501 - - :param currency: The currency of this CrossMarginTransferable. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this CrossMarginTransferable. # noqa: E501 - - Max transferable amount # noqa: E501 - - :return: The amount of this CrossMarginTransferable. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CrossMarginTransferable. - - Max transferable amount # noqa: E501 - - :param amount: The amount of this CrossMarginTransferable. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginTransferable): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginTransferable): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py deleted file mode 100644 index 449bdc7..0000000 --- a/gate_api/models/currency.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Currency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'name': 'str', - 'delisted': 'bool', - 'withdraw_disabled': 'bool', - 'withdraw_delayed': 'bool', - 'deposit_disabled': 'bool', - 'trade_disabled': 'bool', - 'fixed_rate': 'str', - 'chain': 'str', - 'chains': 'list[SpotCurrencyChain]' - } - - attribute_map = { - 'currency': 'currency', - 'name': 'name', - 'delisted': 'delisted', - 'withdraw_disabled': 'withdraw_disabled', - 'withdraw_delayed': 'withdraw_delayed', - 'deposit_disabled': 'deposit_disabled', - 'trade_disabled': 'trade_disabled', - 'fixed_rate': 'fixed_rate', - 'chain': 'chain', - 'chains': 'chains' - } - - def __init__(self, currency=None, name=None, delisted=None, withdraw_disabled=None, withdraw_delayed=None, deposit_disabled=None, trade_disabled=None, fixed_rate=None, chain=None, chains=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, bool, bool, bool, bool, bool, str, str, list[SpotCurrencyChain], Configuration) -> None - """Currency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._name = None - self._delisted = None - self._withdraw_disabled = None - self._withdraw_delayed = None - self._deposit_disabled = None - self._trade_disabled = None - self._fixed_rate = None - self._chain = None - self._chains = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if name is not None: - self.name = name - if delisted is not None: - self.delisted = delisted - if withdraw_disabled is not None: - self.withdraw_disabled = withdraw_disabled - if withdraw_delayed is not None: - self.withdraw_delayed = withdraw_delayed - if deposit_disabled is not None: - self.deposit_disabled = deposit_disabled - if trade_disabled is not None: - self.trade_disabled = trade_disabled - if fixed_rate is not None: - self.fixed_rate = fixed_rate - if chain is not None: - self.chain = chain - if chains is not None: - self.chains = chains - - @property - def currency(self): - """Gets the currency of this Currency. # noqa: E501 - - Currency symbol # noqa: E501 - - :return: The currency of this Currency. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this Currency. - - Currency symbol # noqa: E501 - - :param currency: The currency of this Currency. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def name(self): - """Gets the name of this Currency. # noqa: E501 - - Currency name # noqa: E501 - - :return: The name of this Currency. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Currency. - - Currency name # noqa: E501 - - :param name: The name of this Currency. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def delisted(self): - """Gets the delisted of this Currency. # noqa: E501 - - Whether currency is de-listed # noqa: E501 - - :return: The delisted of this Currency. # noqa: E501 - :rtype: bool - """ - return self._delisted - - @delisted.setter - def delisted(self, delisted): - """Sets the delisted of this Currency. - - Whether currency is de-listed # noqa: E501 - - :param delisted: The delisted of this Currency. # noqa: E501 - :type: bool - """ - - self._delisted = delisted - - @property - def withdraw_disabled(self): - """Gets the withdraw_disabled of this Currency. # noqa: E501 - - Whether currency's withdrawal is disabled (deprecated) # noqa: E501 - - :return: The withdraw_disabled of this Currency. # noqa: E501 - :rtype: bool - """ - return self._withdraw_disabled - - @withdraw_disabled.setter - def withdraw_disabled(self, withdraw_disabled): - """Sets the withdraw_disabled of this Currency. - - Whether currency's withdrawal is disabled (deprecated) # noqa: E501 - - :param withdraw_disabled: The withdraw_disabled of this Currency. # noqa: E501 - :type: bool - """ - - self._withdraw_disabled = withdraw_disabled - - @property - def withdraw_delayed(self): - """Gets the withdraw_delayed of this Currency. # noqa: E501 - - Whether currency's withdrawal is delayed (deprecated) # noqa: E501 - - :return: The withdraw_delayed of this Currency. # noqa: E501 - :rtype: bool - """ - return self._withdraw_delayed - - @withdraw_delayed.setter - def withdraw_delayed(self, withdraw_delayed): - """Sets the withdraw_delayed of this Currency. - - Whether currency's withdrawal is delayed (deprecated) # noqa: E501 - - :param withdraw_delayed: The withdraw_delayed of this Currency. # noqa: E501 - :type: bool - """ - - self._withdraw_delayed = withdraw_delayed - - @property - def deposit_disabled(self): - """Gets the deposit_disabled of this Currency. # noqa: E501 - - Whether currency's deposit is disabled (deprecated) # noqa: E501 - - :return: The deposit_disabled of this Currency. # noqa: E501 - :rtype: bool - """ - return self._deposit_disabled - - @deposit_disabled.setter - def deposit_disabled(self, deposit_disabled): - """Sets the deposit_disabled of this Currency. - - Whether currency's deposit is disabled (deprecated) # noqa: E501 - - :param deposit_disabled: The deposit_disabled of this Currency. # noqa: E501 - :type: bool - """ - - self._deposit_disabled = deposit_disabled - - @property - def trade_disabled(self): - """Gets the trade_disabled of this Currency. # noqa: E501 - - Whether currency's trading is disabled # noqa: E501 - - :return: The trade_disabled of this Currency. # noqa: E501 - :rtype: bool - """ - return self._trade_disabled - - @trade_disabled.setter - def trade_disabled(self, trade_disabled): - """Sets the trade_disabled of this Currency. - - Whether currency's trading is disabled # noqa: E501 - - :param trade_disabled: The trade_disabled of this Currency. # noqa: E501 - :type: bool - """ - - self._trade_disabled = trade_disabled - - @property - def fixed_rate(self): - """Gets the fixed_rate of this Currency. # noqa: E501 - - Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies # noqa: E501 - - :return: The fixed_rate of this Currency. # noqa: E501 - :rtype: str - """ - return self._fixed_rate - - @fixed_rate.setter - def fixed_rate(self, fixed_rate): - """Sets the fixed_rate of this Currency. - - Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies # noqa: E501 - - :param fixed_rate: The fixed_rate of this Currency. # noqa: E501 - :type: str - """ - - self._fixed_rate = fixed_rate - - @property - def chain(self): - """Gets the chain of this Currency. # noqa: E501 - - The main chain corresponding to the coin # noqa: E501 - - :return: The chain of this Currency. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this Currency. - - The main chain corresponding to the coin # noqa: E501 - - :param chain: The chain of this Currency. # noqa: E501 - :type: str - """ - - self._chain = chain - - @property - def chains(self): - """Gets the chains of this Currency. # noqa: E501 - - All links corresponding to coins # noqa: E501 - - :return: The chains of this Currency. # noqa: E501 - :rtype: list[SpotCurrencyChain] - """ - return self._chains - - @chains.setter - def chains(self, chains): - """Sets the chains of this Currency. - - All links corresponding to coins # noqa: E501 - - :param chains: The chains of this Currency. # noqa: E501 - :type: list[SpotCurrencyChain] - """ - - self._chains = chains - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Currency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Currency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py deleted file mode 100644 index 1f4eb6d..0000000 --- a/gate_api/models/currency_chain.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CurrencyChain(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'chain': 'str', - 'name_cn': 'str', - 'name_en': 'str', - 'contract_address': 'str', - 'is_disabled': 'int', - 'is_deposit_disabled': 'int', - 'is_withdraw_disabled': 'int', - 'decimal': 'str' - } - - attribute_map = { - 'chain': 'chain', - 'name_cn': 'name_cn', - 'name_en': 'name_en', - 'contract_address': 'contract_address', - 'is_disabled': 'is_disabled', - 'is_deposit_disabled': 'is_deposit_disabled', - 'is_withdraw_disabled': 'is_withdraw_disabled', - 'decimal': 'decimal' - } - - def __init__(self, chain=None, name_cn=None, name_en=None, contract_address=None, is_disabled=None, is_deposit_disabled=None, is_withdraw_disabled=None, decimal=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, int, int, str, Configuration) -> None - """CurrencyChain - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._chain = None - self._name_cn = None - self._name_en = None - self._contract_address = None - self._is_disabled = None - self._is_deposit_disabled = None - self._is_withdraw_disabled = None - self._decimal = None - self.discriminator = None - - if chain is not None: - self.chain = chain - if name_cn is not None: - self.name_cn = name_cn - if name_en is not None: - self.name_en = name_en - if contract_address is not None: - self.contract_address = contract_address - if is_disabled is not None: - self.is_disabled = is_disabled - if is_deposit_disabled is not None: - self.is_deposit_disabled = is_deposit_disabled - if is_withdraw_disabled is not None: - self.is_withdraw_disabled = is_withdraw_disabled - if decimal is not None: - self.decimal = decimal - - @property - def chain(self): - """Gets the chain of this CurrencyChain. # noqa: E501 - - Chain name # noqa: E501 - - :return: The chain of this CurrencyChain. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this CurrencyChain. - - Chain name # noqa: E501 - - :param chain: The chain of this CurrencyChain. # noqa: E501 - :type: str - """ - - self._chain = chain - - @property - def name_cn(self): - """Gets the name_cn of this CurrencyChain. # noqa: E501 - - Chain name in Chinese # noqa: E501 - - :return: The name_cn of this CurrencyChain. # noqa: E501 - :rtype: str - """ - return self._name_cn - - @name_cn.setter - def name_cn(self, name_cn): - """Sets the name_cn of this CurrencyChain. - - Chain name in Chinese # noqa: E501 - - :param name_cn: The name_cn of this CurrencyChain. # noqa: E501 - :type: str - """ - - self._name_cn = name_cn - - @property - def name_en(self): - """Gets the name_en of this CurrencyChain. # noqa: E501 - - Chain name in English # noqa: E501 - - :return: The name_en of this CurrencyChain. # noqa: E501 - :rtype: str - """ - return self._name_en - - @name_en.setter - def name_en(self, name_en): - """Sets the name_en of this CurrencyChain. - - Chain name in English # noqa: E501 - - :param name_en: The name_en of this CurrencyChain. # noqa: E501 - :type: str - """ - - self._name_en = name_en - - @property - def contract_address(self): - """Gets the contract_address of this CurrencyChain. # noqa: E501 - - Smart contract address for the currency; if no address is available, it will be an empty string # noqa: E501 - - :return: The contract_address of this CurrencyChain. # noqa: E501 - :rtype: str - """ - return self._contract_address - - @contract_address.setter - def contract_address(self, contract_address): - """Sets the contract_address of this CurrencyChain. - - Smart contract address for the currency; if no address is available, it will be an empty string # noqa: E501 - - :param contract_address: The contract_address of this CurrencyChain. # noqa: E501 - :type: str - """ - - self._contract_address = contract_address - - @property - def is_disabled(self): - """Gets the is_disabled of this CurrencyChain. # noqa: E501 - - If it is disabled. 0 means NOT being disabled # noqa: E501 - - :return: The is_disabled of this CurrencyChain. # noqa: E501 - :rtype: int - """ - return self._is_disabled - - @is_disabled.setter - def is_disabled(self, is_disabled): - """Sets the is_disabled of this CurrencyChain. - - If it is disabled. 0 means NOT being disabled # noqa: E501 - - :param is_disabled: The is_disabled of this CurrencyChain. # noqa: E501 - :type: int - """ - - self._is_disabled = is_disabled - - @property - def is_deposit_disabled(self): - """Gets the is_deposit_disabled of this CurrencyChain. # noqa: E501 - - Is deposit disabled. 0 means not # noqa: E501 - - :return: The is_deposit_disabled of this CurrencyChain. # noqa: E501 - :rtype: int - """ - return self._is_deposit_disabled - - @is_deposit_disabled.setter - def is_deposit_disabled(self, is_deposit_disabled): - """Sets the is_deposit_disabled of this CurrencyChain. - - Is deposit disabled. 0 means not # noqa: E501 - - :param is_deposit_disabled: The is_deposit_disabled of this CurrencyChain. # noqa: E501 - :type: int - """ - - self._is_deposit_disabled = is_deposit_disabled - - @property - def is_withdraw_disabled(self): - """Gets the is_withdraw_disabled of this CurrencyChain. # noqa: E501 - - Is withdrawal disabled. 0 means not # noqa: E501 - - :return: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 - :rtype: int - """ - return self._is_withdraw_disabled - - @is_withdraw_disabled.setter - def is_withdraw_disabled(self, is_withdraw_disabled): - """Sets the is_withdraw_disabled of this CurrencyChain. - - Is withdrawal disabled. 0 means not # noqa: E501 - - :param is_withdraw_disabled: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 - :type: int - """ - - self._is_withdraw_disabled = is_withdraw_disabled - - @property - def decimal(self): - """Gets the decimal of this CurrencyChain. # noqa: E501 - - Withdrawal precision # noqa: E501 - - :return: The decimal of this CurrencyChain. # noqa: E501 - :rtype: str - """ - return self._decimal - - @decimal.setter - def decimal(self, decimal): - """Sets the decimal of this CurrencyChain. - - Withdrawal precision # noqa: E501 - - :param decimal: The decimal of this CurrencyChain. # noqa: E501 - :type: str - """ - - self._decimal = decimal - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CurrencyChain): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CurrencyChain): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py deleted file mode 100644 index e6195f7..0000000 --- a/gate_api/models/currency_pair.py +++ /dev/null @@ -1,549 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CurrencyPair(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'base': 'str', - 'base_name': 'str', - 'quote': 'str', - 'quote_name': 'str', - 'fee': 'str', - 'min_base_amount': 'str', - 'min_quote_amount': 'str', - 'max_base_amount': 'str', - 'max_quote_amount': 'str', - 'amount_precision': 'int', - 'precision': 'int', - 'trade_status': 'str', - 'sell_start': 'int', - 'buy_start': 'int', - 'type': 'str' - } - - attribute_map = { - 'id': 'id', - 'base': 'base', - 'base_name': 'base_name', - 'quote': 'quote', - 'quote_name': 'quote_name', - 'fee': 'fee', - 'min_base_amount': 'min_base_amount', - 'min_quote_amount': 'min_quote_amount', - 'max_base_amount': 'max_base_amount', - 'max_quote_amount': 'max_quote_amount', - 'amount_precision': 'amount_precision', - 'precision': 'precision', - 'trade_status': 'trade_status', - 'sell_start': 'sell_start', - 'buy_start': 'buy_start', - 'type': 'type' - } - - def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=None, fee=None, min_base_amount=None, min_quote_amount=None, max_base_amount=None, max_quote_amount=None, amount_precision=None, precision=None, trade_status=None, sell_start=None, buy_start=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, int, int, str, int, int, str, Configuration) -> None - """CurrencyPair - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._base = None - self._base_name = None - self._quote = None - self._quote_name = None - self._fee = None - self._min_base_amount = None - self._min_quote_amount = None - self._max_base_amount = None - self._max_quote_amount = None - self._amount_precision = None - self._precision = None - self._trade_status = None - self._sell_start = None - self._buy_start = None - self._type = None - self.discriminator = None - - if id is not None: - self.id = id - if base is not None: - self.base = base - if base_name is not None: - self.base_name = base_name - if quote is not None: - self.quote = quote - if quote_name is not None: - self.quote_name = quote_name - if fee is not None: - self.fee = fee - if min_base_amount is not None: - self.min_base_amount = min_base_amount - if min_quote_amount is not None: - self.min_quote_amount = min_quote_amount - if max_base_amount is not None: - self.max_base_amount = max_base_amount - if max_quote_amount is not None: - self.max_quote_amount = max_quote_amount - if amount_precision is not None: - self.amount_precision = amount_precision - if precision is not None: - self.precision = precision - if trade_status is not None: - self.trade_status = trade_status - if sell_start is not None: - self.sell_start = sell_start - if buy_start is not None: - self.buy_start = buy_start - if type is not None: - self.type = type - - @property - def id(self): - """Gets the id of this CurrencyPair. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The id of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CurrencyPair. - - Currency pair # noqa: E501 - - :param id: The id of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def base(self): - """Gets the base of this CurrencyPair. # noqa: E501 - - Base currency # noqa: E501 - - :return: The base of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._base - - @base.setter - def base(self, base): - """Sets the base of this CurrencyPair. - - Base currency # noqa: E501 - - :param base: The base of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._base = base - - @property - def base_name(self): - """Gets the base_name of this CurrencyPair. # noqa: E501 - - Transaction currency name # noqa: E501 - - :return: The base_name of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._base_name - - @base_name.setter - def base_name(self, base_name): - """Sets the base_name of this CurrencyPair. - - Transaction currency name # noqa: E501 - - :param base_name: The base_name of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._base_name = base_name - - @property - def quote(self): - """Gets the quote of this CurrencyPair. # noqa: E501 - - Quote currency # noqa: E501 - - :return: The quote of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._quote - - @quote.setter - def quote(self, quote): - """Sets the quote of this CurrencyPair. - - Quote currency # noqa: E501 - - :param quote: The quote of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._quote = quote - - @property - def quote_name(self): - """Gets the quote_name of this CurrencyPair. # noqa: E501 - - Name of the denominated currency # noqa: E501 - - :return: The quote_name of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._quote_name - - @quote_name.setter - def quote_name(self, quote_name): - """Sets the quote_name of this CurrencyPair. - - Name of the denominated currency # noqa: E501 - - :param quote_name: The quote_name of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._quote_name = quote_name - - @property - def fee(self): - """Gets the fee of this CurrencyPair. # noqa: E501 - - Trading fee # noqa: E501 - - :return: The fee of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this CurrencyPair. - - Trading fee # noqa: E501 - - :param fee: The fee of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def min_base_amount(self): - """Gets the min_base_amount of this CurrencyPair. # noqa: E501 - - Minimum amount of base currency to trade, `null` means no limit # noqa: E501 - - :return: The min_base_amount of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._min_base_amount - - @min_base_amount.setter - def min_base_amount(self, min_base_amount): - """Sets the min_base_amount of this CurrencyPair. - - Minimum amount of base currency to trade, `null` means no limit # noqa: E501 - - :param min_base_amount: The min_base_amount of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._min_base_amount = min_base_amount - - @property - def min_quote_amount(self): - """Gets the min_quote_amount of this CurrencyPair. # noqa: E501 - - Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 - - :return: The min_quote_amount of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._min_quote_amount - - @min_quote_amount.setter - def min_quote_amount(self, min_quote_amount): - """Sets the min_quote_amount of this CurrencyPair. - - Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 - - :param min_quote_amount: The min_quote_amount of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._min_quote_amount = min_quote_amount - - @property - def max_base_amount(self): - """Gets the max_base_amount of this CurrencyPair. # noqa: E501 - - Maximum amount of base currency to trade, `null` means no limit # noqa: E501 - - :return: The max_base_amount of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._max_base_amount - - @max_base_amount.setter - def max_base_amount(self, max_base_amount): - """Sets the max_base_amount of this CurrencyPair. - - Maximum amount of base currency to trade, `null` means no limit # noqa: E501 - - :param max_base_amount: The max_base_amount of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._max_base_amount = max_base_amount - - @property - def max_quote_amount(self): - """Gets the max_quote_amount of this CurrencyPair. # noqa: E501 - - Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 - - :return: The max_quote_amount of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._max_quote_amount - - @max_quote_amount.setter - def max_quote_amount(self, max_quote_amount): - """Sets the max_quote_amount of this CurrencyPair. - - Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 - - :param max_quote_amount: The max_quote_amount of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._max_quote_amount = max_quote_amount - - @property - def amount_precision(self): - """Gets the amount_precision of this CurrencyPair. # noqa: E501 - - Amount scale # noqa: E501 - - :return: The amount_precision of this CurrencyPair. # noqa: E501 - :rtype: int - """ - return self._amount_precision - - @amount_precision.setter - def amount_precision(self, amount_precision): - """Sets the amount_precision of this CurrencyPair. - - Amount scale # noqa: E501 - - :param amount_precision: The amount_precision of this CurrencyPair. # noqa: E501 - :type: int - """ - - self._amount_precision = amount_precision - - @property - def precision(self): - """Gets the precision of this CurrencyPair. # noqa: E501 - - Price scale # noqa: E501 - - :return: The precision of this CurrencyPair. # noqa: E501 - :rtype: int - """ - return self._precision - - @precision.setter - def precision(self, precision): - """Sets the precision of this CurrencyPair. - - Price scale # noqa: E501 - - :param precision: The precision of this CurrencyPair. # noqa: E501 - :type: int - """ - - self._precision = precision - - @property - def trade_status(self): - """Gets the trade_status of this CurrencyPair. # noqa: E501 - - How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501 - - :return: The trade_status of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._trade_status - - @trade_status.setter - def trade_status(self, trade_status): - """Sets the trade_status of this CurrencyPair. - - How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501 - - :param trade_status: The trade_status of this CurrencyPair. # noqa: E501 - :type: str - """ - allowed_values = ["untradable", "buyable", "sellable", "tradable"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and trade_status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `trade_status` ({0}), must be one of {1}" # noqa: E501 - .format(trade_status, allowed_values) - ) - - self._trade_status = trade_status - - @property - def sell_start(self): - """Gets the sell_start of this CurrencyPair. # noqa: E501 - - Sell start unix timestamp in seconds # noqa: E501 - - :return: The sell_start of this CurrencyPair. # noqa: E501 - :rtype: int - """ - return self._sell_start - - @sell_start.setter - def sell_start(self, sell_start): - """Sets the sell_start of this CurrencyPair. - - Sell start unix timestamp in seconds # noqa: E501 - - :param sell_start: The sell_start of this CurrencyPair. # noqa: E501 - :type: int - """ - - self._sell_start = sell_start - - @property - def buy_start(self): - """Gets the buy_start of this CurrencyPair. # noqa: E501 - - Buy start unix timestamp in seconds # noqa: E501 - - :return: The buy_start of this CurrencyPair. # noqa: E501 - :rtype: int - """ - return self._buy_start - - @buy_start.setter - def buy_start(self, buy_start): - """Sets the buy_start of this CurrencyPair. - - Buy start unix timestamp in seconds # noqa: E501 - - :param buy_start: The buy_start of this CurrencyPair. # noqa: E501 - :type: int - """ - - self._buy_start = buy_start - - @property - def type(self): - """Gets the type of this CurrencyPair. # noqa: E501 - - Trading pair type, normal: normal, premarket: pre-market # noqa: E501 - - :return: The type of this CurrencyPair. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CurrencyPair. - - Trading pair type, normal: normal, premarket: pre-market # noqa: E501 - - :param type: The type of this CurrencyPair. # noqa: E501 - :type: str - """ - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CurrencyPair): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CurrencyPair): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py deleted file mode 100644 index 58a945d..0000000 --- a/gate_api/models/currency_quota.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CurrencyQuota(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'min_quota': 'str', - 'left_quota': 'str', - 'left_quote_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'min_quota': 'min_quota', - 'left_quota': 'left_quota', - 'left_quote_usdt': 'left_quote_usdt' - } - - def __init__(self, currency=None, index_price=None, min_quota=None, left_quota=None, left_quote_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """CurrencyQuota - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._min_quota = None - self._left_quota = None - self._left_quote_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if min_quota is not None: - self.min_quota = min_quota - if left_quota is not None: - self.left_quota = left_quota - if left_quote_usdt is not None: - self.left_quote_usdt = left_quote_usdt - - @property - def currency(self): - """Gets the currency of this CurrencyQuota. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this CurrencyQuota. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CurrencyQuota. - - Currency # noqa: E501 - - :param currency: The currency of this CurrencyQuota. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this CurrencyQuota. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this CurrencyQuota. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this CurrencyQuota. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this CurrencyQuota. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def min_quota(self): - """Gets the min_quota of this CurrencyQuota. # noqa: E501 - - Minimum borrowing/collateral quota for the currency # noqa: E501 - - :return: The min_quota of this CurrencyQuota. # noqa: E501 - :rtype: str - """ - return self._min_quota - - @min_quota.setter - def min_quota(self, min_quota): - """Sets the min_quota of this CurrencyQuota. - - Minimum borrowing/collateral quota for the currency # noqa: E501 - - :param min_quota: The min_quota of this CurrencyQuota. # noqa: E501 - :type: str - """ - - self._min_quota = min_quota - - @property - def left_quota(self): - """Gets the left_quota of this CurrencyQuota. # noqa: E501 - - Remaining borrowing/collateral limit for the currency # noqa: E501 - - :return: The left_quota of this CurrencyQuota. # noqa: E501 - :rtype: str - """ - return self._left_quota - - @left_quota.setter - def left_quota(self, left_quota): - """Sets the left_quota of this CurrencyQuota. - - Remaining borrowing/collateral limit for the currency # noqa: E501 - - :param left_quota: The left_quota of this CurrencyQuota. # noqa: E501 - :type: str - """ - - self._left_quota = left_quota - - @property - def left_quote_usdt(self): - """Gets the left_quote_usdt of this CurrencyQuota. # noqa: E501 - - Remaining currency limit converted to USDT # noqa: E501 - - :return: The left_quote_usdt of this CurrencyQuota. # noqa: E501 - :rtype: str - """ - return self._left_quote_usdt - - @left_quote_usdt.setter - def left_quote_usdt(self, left_quote_usdt): - """Sets the left_quote_usdt of this CurrencyQuota. - - Remaining currency limit converted to USDT # noqa: E501 - - :param left_quote_usdt: The left_quote_usdt of this CurrencyQuota. # noqa: E501 - :type: str - """ - - self._left_quote_usdt = left_quote_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CurrencyQuota): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CurrencyQuota): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py deleted file mode 100644 index 24b86ad..0000000 --- a/gate_api/models/debit_fee.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class DebitFee(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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 - """DebitFee - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._enabled = None - self.discriminator = None - - self.enabled = enabled - - @property - def enabled(self): - """Gets the enabled of this DebitFee. # noqa: E501 - - Whether GT fee discount is used # noqa: E501 - - :return: The enabled of this DebitFee. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this DebitFee. - - Whether GT fee discount is used # noqa: E501 - - :param enabled: The enabled of this DebitFee. # noqa: E501 - :type: bool - """ - if self.local_vars_configuration.client_side_validation and enabled is None: # noqa: E501 - 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, DebitFee): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DebitFee): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py deleted file mode 100644 index 8bbd1ba..0000000 --- a/gate_api/models/delivery_candlestick.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class DeliveryCandlestick(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 't': 'float', - 'v': 'int', - 'c': 'str', - 'h': 'str', - 'l': 'str', - 'o': 'str' - } - - attribute_map = { - 't': 't', - 'v': 'v', - 'c': 'c', - 'h': 'h', - 'l': 'l', - 'o': 'o' - } - - def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501 - # type: (float, int, str, str, str, str, Configuration) -> None - """DeliveryCandlestick - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._t = None - self._v = None - self._c = None - self._h = None - self._l = None - self._o = None - self.discriminator = None - - if t is not None: - self.t = t - if v is not None: - self.v = v - if c is not None: - self.c = c - if h is not None: - self.h = h - if l is not None: - self.l = l - if o is not None: - self.o = o - - @property - def t(self): - """Gets the t of this DeliveryCandlestick. # noqa: E501 - - Unix timestamp in seconds # noqa: E501 - - :return: The t of this DeliveryCandlestick. # noqa: E501 - :rtype: float - """ - return self._t - - @t.setter - def t(self, t): - """Sets the t of this DeliveryCandlestick. - - Unix timestamp in seconds # noqa: E501 - - :param t: The t of this DeliveryCandlestick. # noqa: E501 - :type: float - """ - - self._t = t - - @property - def v(self): - """Gets the v of this DeliveryCandlestick. # noqa: E501 - - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 - - :return: The v of this DeliveryCandlestick. # noqa: E501 - :rtype: int - """ - return self._v - - @v.setter - def v(self, v): - """Sets the v of this DeliveryCandlestick. - - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 - - :param v: The v of this DeliveryCandlestick. # noqa: E501 - :type: int - """ - - self._v = v - - @property - def c(self): - """Gets the c of this DeliveryCandlestick. # noqa: E501 - - Close price (quote currency) # noqa: E501 - - :return: The c of this DeliveryCandlestick. # noqa: E501 - :rtype: str - """ - return self._c - - @c.setter - def c(self, c): - """Sets the c of this DeliveryCandlestick. - - Close price (quote currency) # noqa: E501 - - :param c: The c of this DeliveryCandlestick. # noqa: E501 - :type: str - """ - - self._c = c - - @property - def h(self): - """Gets the h of this DeliveryCandlestick. # noqa: E501 - - Highest price (quote currency) # noqa: E501 - - :return: The h of this DeliveryCandlestick. # noqa: E501 - :rtype: str - """ - return self._h - - @h.setter - def h(self, h): - """Sets the h of this DeliveryCandlestick. - - Highest price (quote currency) # noqa: E501 - - :param h: The h of this DeliveryCandlestick. # noqa: E501 - :type: str - """ - - self._h = h - - @property - def l(self): - """Gets the l of this DeliveryCandlestick. # noqa: E501 - - Lowest price (quote currency) # noqa: E501 - - :return: The l of this DeliveryCandlestick. # noqa: E501 - :rtype: str - """ - return self._l - - @l.setter - def l(self, l): - """Sets the l of this DeliveryCandlestick. - - Lowest price (quote currency) # noqa: E501 - - :param l: The l of this DeliveryCandlestick. # noqa: E501 - :type: str - """ - - self._l = l - - @property - def o(self): - """Gets the o of this DeliveryCandlestick. # noqa: E501 - - Open price (quote currency) # noqa: E501 - - :return: The o of this DeliveryCandlestick. # noqa: E501 - :rtype: str - """ - return self._o - - @o.setter - def o(self, o): - """Sets the o of this DeliveryCandlestick. - - Open price (quote currency) # noqa: E501 - - :param o: The o of this DeliveryCandlestick. # noqa: E501 - :type: str - """ - - self._o = o - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DeliveryCandlestick): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DeliveryCandlestick): - 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 deleted file mode 100644 index ee2632c..0000000 --- a/gate_api/models/delivery_contract.py +++ /dev/null @@ -1,1177 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class DeliveryContract(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'underlying': 'str', - 'cycle': 'str', - 'type': 'str', - 'quanto_multiplier': 'str', - 'leverage_min': 'str', - 'leverage_max': 'str', - 'maintenance_rate': 'str', - 'mark_type': 'str', - 'mark_price': 'str', - 'index_price': 'str', - 'last_price': 'str', - 'maker_fee_rate': 'str', - 'taker_fee_rate': 'str', - 'order_price_round': 'str', - 'mark_price_round': 'str', - 'basis_rate': 'str', - 'basis_value': 'str', - 'basis_impact_value': 'str', - 'settle_price': 'str', - 'settle_price_interval': 'int', - 'settle_price_duration': 'int', - 'expire_time': 'int', - 'risk_limit_base': 'str', - 'risk_limit_step': 'str', - 'risk_limit_max': 'str', - 'order_size_min': 'int', - 'order_size_max': 'int', - 'order_price_deviate': 'str', - 'ref_discount_rate': 'str', - 'ref_rebate_rate': 'str', - 'orderbook_id': 'int', - 'trade_id': 'int', - 'trade_size': 'int', - 'position_size': 'int', - 'config_change_time': 'float', - 'in_delisting': 'bool', - 'orders_limit': 'int' - } - - attribute_map = { - 'name': 'name', - 'underlying': 'underlying', - 'cycle': 'cycle', - 'type': 'type', - 'quanto_multiplier': 'quanto_multiplier', - 'leverage_min': 'leverage_min', - 'leverage_max': 'leverage_max', - 'maintenance_rate': 'maintenance_rate', - 'mark_type': 'mark_type', - 'mark_price': 'mark_price', - 'index_price': 'index_price', - 'last_price': 'last_price', - 'maker_fee_rate': 'maker_fee_rate', - 'taker_fee_rate': 'taker_fee_rate', - 'order_price_round': 'order_price_round', - 'mark_price_round': 'mark_price_round', - 'basis_rate': 'basis_rate', - 'basis_value': 'basis_value', - 'basis_impact_value': 'basis_impact_value', - 'settle_price': 'settle_price', - 'settle_price_interval': 'settle_price_interval', - 'settle_price_duration': 'settle_price_duration', - 'expire_time': 'expire_time', - 'risk_limit_base': 'risk_limit_base', - 'risk_limit_step': 'risk_limit_step', - 'risk_limit_max': 'risk_limit_max', - 'order_size_min': 'order_size_min', - 'order_size_max': 'order_size_max', - 'order_price_deviate': 'order_price_deviate', - 'ref_discount_rate': 'ref_discount_rate', - 'ref_rebate_rate': 'ref_rebate_rate', - 'orderbook_id': 'orderbook_id', - 'trade_id': 'trade_id', - 'trade_size': 'trade_size', - 'position_size': 'position_size', - 'config_change_time': 'config_change_time', - 'in_delisting': 'in_delisting', - 'orders_limit': 'orders_limit' - } - - def __init__(self, name=None, underlying=None, cycle=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, basis_rate=None, basis_value=None, basis_impact_value=None, settle_price=None, settle_price_interval=None, settle_price_duration=None, expire_time=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, int, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, Configuration) -> None - """DeliveryContract - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._underlying = None - self._cycle = None - self._type = None - self._quanto_multiplier = None - self._leverage_min = None - self._leverage_max = None - self._maintenance_rate = None - self._mark_type = None - self._mark_price = None - self._index_price = None - self._last_price = None - self._maker_fee_rate = None - self._taker_fee_rate = None - self._order_price_round = None - self._mark_price_round = None - self._basis_rate = None - self._basis_value = None - self._basis_impact_value = None - self._settle_price = None - self._settle_price_interval = None - self._settle_price_duration = None - self._expire_time = None - self._risk_limit_base = None - self._risk_limit_step = None - self._risk_limit_max = None - self._order_size_min = None - self._order_size_max = None - self._order_price_deviate = None - self._ref_discount_rate = None - self._ref_rebate_rate = None - self._orderbook_id = None - self._trade_id = None - self._trade_size = None - self._position_size = None - self._config_change_time = None - self._in_delisting = None - self._orders_limit = None - self.discriminator = None - - if name is not None: - self.name = name - if underlying is not None: - self.underlying = underlying - if cycle is not None: - self.cycle = cycle - if type is not None: - self.type = type - if quanto_multiplier is not None: - self.quanto_multiplier = quanto_multiplier - if leverage_min is not None: - self.leverage_min = leverage_min - if leverage_max is not None: - self.leverage_max = leverage_max - if maintenance_rate is not None: - self.maintenance_rate = maintenance_rate - if mark_type is not None: - self.mark_type = mark_type - if mark_price is not None: - self.mark_price = mark_price - if index_price is not None: - self.index_price = index_price - if last_price is not None: - self.last_price = last_price - if maker_fee_rate is not None: - self.maker_fee_rate = maker_fee_rate - if taker_fee_rate is not None: - self.taker_fee_rate = taker_fee_rate - if order_price_round is not None: - self.order_price_round = order_price_round - if mark_price_round is not None: - self.mark_price_round = mark_price_round - if basis_rate is not None: - self.basis_rate = basis_rate - if basis_value is not None: - self.basis_value = basis_value - if basis_impact_value is not None: - self.basis_impact_value = basis_impact_value - if settle_price is not None: - self.settle_price = settle_price - if settle_price_interval is not None: - self.settle_price_interval = settle_price_interval - if settle_price_duration is not None: - self.settle_price_duration = settle_price_duration - if expire_time is not None: - self.expire_time = expire_time - if risk_limit_base is not None: - self.risk_limit_base = risk_limit_base - if risk_limit_step is not None: - self.risk_limit_step = risk_limit_step - if risk_limit_max is not None: - self.risk_limit_max = risk_limit_max - if order_size_min is not None: - self.order_size_min = order_size_min - if order_size_max is not None: - self.order_size_max = order_size_max - if order_price_deviate is not None: - self.order_price_deviate = order_price_deviate - if ref_discount_rate is not None: - self.ref_discount_rate = ref_discount_rate - if ref_rebate_rate is not None: - self.ref_rebate_rate = ref_rebate_rate - if orderbook_id is not None: - self.orderbook_id = orderbook_id - if trade_id is not None: - self.trade_id = trade_id - if trade_size is not None: - self.trade_size = trade_size - if position_size is not None: - self.position_size = position_size - if config_change_time is not None: - self.config_change_time = config_change_time - if in_delisting is not None: - self.in_delisting = in_delisting - if orders_limit is not None: - self.orders_limit = orders_limit - - @property - def name(self): - """Gets the name of this DeliveryContract. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The name of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DeliveryContract. - - Futures contract # noqa: E501 - - :param name: The name of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def underlying(self): - """Gets the underlying of this DeliveryContract. # noqa: E501 - - Underlying # noqa: E501 - - :return: The underlying of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._underlying - - @underlying.setter - def underlying(self, underlying): - """Sets the underlying of this DeliveryContract. - - Underlying # noqa: E501 - - :param underlying: The underlying of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._underlying = underlying - - @property - def cycle(self): - """Gets the cycle of this DeliveryContract. # noqa: E501 - - Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 - - :return: The cycle of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._cycle - - @cycle.setter - def cycle(self, cycle): - """Sets the cycle of this DeliveryContract. - - Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 - - :param cycle: The cycle of this DeliveryContract. # noqa: E501 - :type: str - """ - allowed_values = ["WEEKLY", "BI-WEEKLY", "QUARTERLY", "BI-QUARTERLY"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and cycle not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `cycle` ({0}), must be one of {1}" # noqa: E501 - .format(cycle, allowed_values) - ) - - self._cycle = cycle - - @property - def type(self): - """Gets the type of this DeliveryContract. # noqa: E501 - - Futures contract type # noqa: E501 - - :return: The type of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DeliveryContract. - - Futures contract type # noqa: E501 - - :param type: The type of this DeliveryContract. # noqa: E501 - :type: str - """ - allowed_values = ["inverse", "direct"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def quanto_multiplier(self): - """Gets the quanto_multiplier of this DeliveryContract. # noqa: E501 - - Multiplier used in converting from invoicing to settlement currency # noqa: E501 - - :return: The quanto_multiplier of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._quanto_multiplier - - @quanto_multiplier.setter - def quanto_multiplier(self, quanto_multiplier): - """Sets the quanto_multiplier of this DeliveryContract. - - Multiplier used in converting from invoicing to settlement currency # noqa: E501 - - :param quanto_multiplier: The quanto_multiplier of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._quanto_multiplier = quanto_multiplier - - @property - def leverage_min(self): - """Gets the leverage_min of this DeliveryContract. # noqa: E501 - - Minimum leverage # noqa: E501 - - :return: The leverage_min of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._leverage_min - - @leverage_min.setter - def leverage_min(self, leverage_min): - """Sets the leverage_min of this DeliveryContract. - - Minimum leverage # noqa: E501 - - :param leverage_min: The leverage_min of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._leverage_min = leverage_min - - @property - def leverage_max(self): - """Gets the leverage_max of this DeliveryContract. # noqa: E501 - - Maximum leverage # noqa: E501 - - :return: The leverage_max of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._leverage_max - - @leverage_max.setter - def leverage_max(self, leverage_max): - """Sets the leverage_max of this DeliveryContract. - - Maximum leverage # noqa: E501 - - :param leverage_max: The leverage_max of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._leverage_max = leverage_max - - @property - def maintenance_rate(self): - """Gets the maintenance_rate of this DeliveryContract. # noqa: E501 - - Maintenance rate of margin # noqa: E501 - - :return: The maintenance_rate of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._maintenance_rate - - @maintenance_rate.setter - def maintenance_rate(self, maintenance_rate): - """Sets the maintenance_rate of this DeliveryContract. - - Maintenance rate of margin # noqa: E501 - - :param maintenance_rate: The maintenance_rate of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._maintenance_rate = maintenance_rate - - @property - def mark_type(self): - """Gets the mark_type of this DeliveryContract. # noqa: E501 - - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 - - :return: The mark_type of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._mark_type - - @mark_type.setter - def mark_type(self, mark_type): - """Sets the mark_type of this DeliveryContract. - - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 - - :param mark_type: The mark_type of this DeliveryContract. # noqa: E501 - :type: str - """ - allowed_values = ["internal", "index"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and mark_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `mark_type` ({0}), must be one of {1}" # noqa: E501 - .format(mark_type, allowed_values) - ) - - self._mark_type = mark_type - - @property - def mark_price(self): - """Gets the mark_price of this DeliveryContract. # noqa: E501 - - Current mark price # noqa: E501 - - :return: The mark_price of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this DeliveryContract. - - Current mark price # noqa: E501 - - :param mark_price: The mark_price of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def index_price(self): - """Gets the index_price of this DeliveryContract. # noqa: E501 - - Current index price # noqa: E501 - - :return: The index_price of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this DeliveryContract. - - Current index price # noqa: E501 - - :param index_price: The index_price of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def last_price(self): - """Gets the last_price of this DeliveryContract. # noqa: E501 - - Last trading price # noqa: E501 - - :return: The last_price of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._last_price - - @last_price.setter - def last_price(self, last_price): - """Sets the last_price of this DeliveryContract. - - Last trading price # noqa: E501 - - :param last_price: The last_price of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._last_price = last_price - - @property - def maker_fee_rate(self): - """Gets the maker_fee_rate of this DeliveryContract. # noqa: E501 - - Maker fee rate, where negative means rebate # noqa: E501 - - :return: The maker_fee_rate of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._maker_fee_rate - - @maker_fee_rate.setter - def maker_fee_rate(self, maker_fee_rate): - """Sets the maker_fee_rate of this DeliveryContract. - - Maker fee rate, where negative means rebate # noqa: E501 - - :param maker_fee_rate: The maker_fee_rate of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._maker_fee_rate = maker_fee_rate - - @property - def taker_fee_rate(self): - """Gets the taker_fee_rate of this DeliveryContract. # noqa: E501 - - Taker fee rate # noqa: E501 - - :return: The taker_fee_rate of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._taker_fee_rate - - @taker_fee_rate.setter - def taker_fee_rate(self, taker_fee_rate): - """Sets the taker_fee_rate of this DeliveryContract. - - Taker fee rate # noqa: E501 - - :param taker_fee_rate: The taker_fee_rate of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._taker_fee_rate = taker_fee_rate - - @property - def order_price_round(self): - """Gets the order_price_round of this DeliveryContract. # noqa: E501 - - Minimum order price increment # noqa: E501 - - :return: The order_price_round of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._order_price_round - - @order_price_round.setter - def order_price_round(self, order_price_round): - """Sets the order_price_round of this DeliveryContract. - - Minimum order price increment # noqa: E501 - - :param order_price_round: The order_price_round of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._order_price_round = order_price_round - - @property - def mark_price_round(self): - """Gets the mark_price_round of this DeliveryContract. # noqa: E501 - - Minimum mark price increment # noqa: E501 - - :return: The mark_price_round of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._mark_price_round - - @mark_price_round.setter - def mark_price_round(self, mark_price_round): - """Sets the mark_price_round of this DeliveryContract. - - Minimum mark price increment # noqa: E501 - - :param mark_price_round: The mark_price_round of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._mark_price_round = mark_price_round - - @property - def basis_rate(self): - """Gets the basis_rate of this DeliveryContract. # noqa: E501 - - Fair basis rate # noqa: E501 - - :return: The basis_rate of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._basis_rate - - @basis_rate.setter - def basis_rate(self, basis_rate): - """Sets the basis_rate of this DeliveryContract. - - Fair basis rate # noqa: E501 - - :param basis_rate: The basis_rate of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._basis_rate = basis_rate - - @property - def basis_value(self): - """Gets the basis_value of this DeliveryContract. # noqa: E501 - - Fair basis value # noqa: E501 - - :return: The basis_value of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._basis_value - - @basis_value.setter - def basis_value(self, basis_value): - """Sets the basis_value of this DeliveryContract. - - Fair basis value # noqa: E501 - - :param basis_value: The basis_value of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._basis_value = basis_value - - @property - def basis_impact_value(self): - """Gets the basis_impact_value of this DeliveryContract. # noqa: E501 - - Funding used for calculating impact bid, ask price # noqa: E501 - - :return: The basis_impact_value of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._basis_impact_value - - @basis_impact_value.setter - def basis_impact_value(self, basis_impact_value): - """Sets the basis_impact_value of this DeliveryContract. - - Funding used for calculating impact bid, ask price # noqa: E501 - - :param basis_impact_value: The basis_impact_value of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._basis_impact_value = basis_impact_value - - @property - def settle_price(self): - """Gets the settle_price of this DeliveryContract. # noqa: E501 - - Settle price # noqa: E501 - - :return: The settle_price of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._settle_price - - @settle_price.setter - def settle_price(self, settle_price): - """Sets the settle_price of this DeliveryContract. - - Settle price # noqa: E501 - - :param settle_price: The settle_price of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._settle_price = settle_price - - @property - def settle_price_interval(self): - """Gets the settle_price_interval of this DeliveryContract. # noqa: E501 - - Settle price update interval # noqa: E501 - - :return: The settle_price_interval of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._settle_price_interval - - @settle_price_interval.setter - def settle_price_interval(self, settle_price_interval): - """Sets the settle_price_interval of this DeliveryContract. - - Settle price update interval # noqa: E501 - - :param settle_price_interval: The settle_price_interval of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._settle_price_interval = settle_price_interval - - @property - def settle_price_duration(self): - """Gets the settle_price_duration of this DeliveryContract. # noqa: E501 - - Settle price update duration in seconds # noqa: E501 - - :return: The settle_price_duration of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._settle_price_duration - - @settle_price_duration.setter - def settle_price_duration(self, settle_price_duration): - """Sets the settle_price_duration of this DeliveryContract. - - Settle price update duration in seconds # noqa: E501 - - :param settle_price_duration: The settle_price_duration of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._settle_price_duration = settle_price_duration - - @property - def expire_time(self): - """Gets the expire_time of this DeliveryContract. # noqa: E501 - - Contract expiry timestamp # noqa: E501 - - :return: The expire_time of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._expire_time - - @expire_time.setter - def expire_time(self, expire_time): - """Sets the expire_time of this DeliveryContract. - - Contract expiry timestamp # noqa: E501 - - :param expire_time: The expire_time of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._expire_time = expire_time - - @property - def risk_limit_base(self): - """Gets the risk_limit_base of this DeliveryContract. # noqa: E501 - - Risk limit base # noqa: E501 - - :return: The risk_limit_base of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._risk_limit_base - - @risk_limit_base.setter - def risk_limit_base(self, risk_limit_base): - """Sets the risk_limit_base of this DeliveryContract. - - Risk limit base # noqa: E501 - - :param risk_limit_base: The risk_limit_base of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._risk_limit_base = risk_limit_base - - @property - def risk_limit_step(self): - """Gets the risk_limit_step of this DeliveryContract. # noqa: E501 - - Step of adjusting risk limit # noqa: E501 - - :return: The risk_limit_step of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._risk_limit_step - - @risk_limit_step.setter - def risk_limit_step(self, risk_limit_step): - """Sets the risk_limit_step of this DeliveryContract. - - Step of adjusting risk limit # noqa: E501 - - :param risk_limit_step: The risk_limit_step of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._risk_limit_step = risk_limit_step - - @property - def risk_limit_max(self): - """Gets the risk_limit_max of this DeliveryContract. # noqa: E501 - - Maximum risk limit the contract allowed # noqa: E501 - - :return: The risk_limit_max of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._risk_limit_max - - @risk_limit_max.setter - def risk_limit_max(self, risk_limit_max): - """Sets the risk_limit_max of this DeliveryContract. - - Maximum risk limit the contract allowed # noqa: E501 - - :param risk_limit_max: The risk_limit_max of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._risk_limit_max = risk_limit_max - - @property - def order_size_min(self): - """Gets the order_size_min of this DeliveryContract. # noqa: E501 - - Minimum order size the contract allowed # noqa: E501 - - :return: The order_size_min of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._order_size_min - - @order_size_min.setter - def order_size_min(self, order_size_min): - """Sets the order_size_min of this DeliveryContract. - - Minimum order size the contract allowed # noqa: E501 - - :param order_size_min: The order_size_min of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._order_size_min = order_size_min - - @property - def order_size_max(self): - """Gets the order_size_max of this DeliveryContract. # noqa: E501 - - Maximum order size the contract allowed # noqa: E501 - - :return: The order_size_max of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._order_size_max - - @order_size_max.setter - def order_size_max(self, order_size_max): - """Sets the order_size_max of this DeliveryContract. - - Maximum order size the contract allowed # noqa: E501 - - :param order_size_max: The order_size_max of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._order_size_max = order_size_max - - @property - def order_price_deviate(self): - """Gets the order_price_deviate of this DeliveryContract. # noqa: E501 - - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 - - :return: The order_price_deviate of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._order_price_deviate - - @order_price_deviate.setter - def order_price_deviate(self, order_price_deviate): - """Sets the order_price_deviate of this DeliveryContract. - - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 - - :param order_price_deviate: The order_price_deviate of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._order_price_deviate = order_price_deviate - - @property - def ref_discount_rate(self): - """Gets the ref_discount_rate of this DeliveryContract. # noqa: E501 - - Referral fee rate discount # noqa: E501 - - :return: The ref_discount_rate of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._ref_discount_rate - - @ref_discount_rate.setter - def ref_discount_rate(self, ref_discount_rate): - """Sets the ref_discount_rate of this DeliveryContract. - - Referral fee rate discount # noqa: E501 - - :param ref_discount_rate: The ref_discount_rate of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._ref_discount_rate = ref_discount_rate - - @property - def ref_rebate_rate(self): - """Gets the ref_rebate_rate of this DeliveryContract. # noqa: E501 - - Referrer commission rate # noqa: E501 - - :return: The ref_rebate_rate of this DeliveryContract. # noqa: E501 - :rtype: str - """ - return self._ref_rebate_rate - - @ref_rebate_rate.setter - def ref_rebate_rate(self, ref_rebate_rate): - """Sets the ref_rebate_rate of this DeliveryContract. - - Referrer commission rate # noqa: E501 - - :param ref_rebate_rate: The ref_rebate_rate of this DeliveryContract. # noqa: E501 - :type: str - """ - - self._ref_rebate_rate = ref_rebate_rate - - @property - def orderbook_id(self): - """Gets the orderbook_id of this DeliveryContract. # noqa: E501 - - Current orderbook ID # noqa: E501 - - :return: The orderbook_id of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._orderbook_id - - @orderbook_id.setter - def orderbook_id(self, orderbook_id): - """Sets the orderbook_id of this DeliveryContract. - - Current orderbook ID # noqa: E501 - - :param orderbook_id: The orderbook_id of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._orderbook_id = orderbook_id - - @property - def trade_id(self): - """Gets the trade_id of this DeliveryContract. # noqa: E501 - - Current trade ID # noqa: E501 - - :return: The trade_id of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._trade_id - - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this DeliveryContract. - - Current trade ID # noqa: E501 - - :param trade_id: The trade_id of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._trade_id = trade_id - - @property - def trade_size(self): - """Gets the trade_size of this DeliveryContract. # noqa: E501 - - Historical accumulated trade size # noqa: E501 - - :return: The trade_size of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._trade_size - - @trade_size.setter - def trade_size(self, trade_size): - """Sets the trade_size of this DeliveryContract. - - Historical accumulated trade size # noqa: E501 - - :param trade_size: The trade_size of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._trade_size = trade_size - - @property - def position_size(self): - """Gets the position_size of this DeliveryContract. # noqa: E501 - - Current total long position size # noqa: E501 - - :return: The position_size of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._position_size - - @position_size.setter - def position_size(self, position_size): - """Sets the position_size of this DeliveryContract. - - Current total long position size # noqa: E501 - - :param position_size: The position_size of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._position_size = position_size - - @property - def config_change_time(self): - """Gets the config_change_time of this DeliveryContract. # noqa: E501 - - Last changed time of configuration # noqa: E501 - - :return: The config_change_time of this DeliveryContract. # noqa: E501 - :rtype: float - """ - return self._config_change_time - - @config_change_time.setter - def config_change_time(self, config_change_time): - """Sets the config_change_time of this DeliveryContract. - - Last changed time of configuration # noqa: E501 - - :param config_change_time: The config_change_time of this DeliveryContract. # noqa: E501 - :type: float - """ - - self._config_change_time = config_change_time - - @property - def in_delisting(self): - """Gets the in_delisting of this DeliveryContract. # noqa: E501 - - Contract is delisting # noqa: E501 - - :return: The in_delisting of this DeliveryContract. # noqa: E501 - :rtype: bool - """ - return self._in_delisting - - @in_delisting.setter - def in_delisting(self, in_delisting): - """Sets the in_delisting of this DeliveryContract. - - Contract is delisting # noqa: E501 - - :param in_delisting: The in_delisting of this DeliveryContract. # noqa: E501 - :type: bool - """ - - self._in_delisting = in_delisting - - @property - def orders_limit(self): - """Gets the orders_limit of this DeliveryContract. # noqa: E501 - - Maximum number of open orders # noqa: E501 - - :return: The orders_limit of this DeliveryContract. # noqa: E501 - :rtype: int - """ - return self._orders_limit - - @orders_limit.setter - def orders_limit(self, orders_limit): - """Sets the orders_limit of this DeliveryContract. - - Maximum number of open orders # noqa: E501 - - :param orders_limit: The orders_limit of this DeliveryContract. # noqa: E501 - :type: int - """ - - self._orders_limit = orders_limit - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DeliveryContract): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DeliveryContract): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py deleted file mode 100644 index bc01b64..0000000 --- a/gate_api/models/delivery_settlement.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class DeliverySettlement(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'int', - 'contract': 'str', - 'leverage': 'str', - 'size': 'int', - 'margin': 'str', - 'entry_price': 'str', - 'settle_price': 'str', - 'profit': 'str', - 'fee': 'str' - } - - attribute_map = { - 'time': 'time', - 'contract': 'contract', - 'leverage': 'leverage', - 'size': 'size', - 'margin': 'margin', - 'entry_price': 'entry_price', - 'settle_price': 'settle_price', - 'profit': 'profit', - 'fee': 'fee' - } - - def __init__(self, time=None, contract=None, leverage=None, size=None, margin=None, entry_price=None, settle_price=None, profit=None, fee=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, int, str, str, str, str, str, Configuration) -> None - """DeliverySettlement - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._contract = None - self._leverage = None - self._size = None - self._margin = None - self._entry_price = None - self._settle_price = None - self._profit = None - self._fee = None - self.discriminator = None - - if time is not None: - self.time = time - if contract is not None: - self.contract = contract - if leverage is not None: - self.leverage = leverage - if size is not None: - self.size = size - if margin is not None: - self.margin = margin - if entry_price is not None: - self.entry_price = entry_price - if settle_price is not None: - self.settle_price = settle_price - if profit is not None: - self.profit = profit - if fee is not None: - self.fee = fee - - @property - def time(self): - """Gets the time of this DeliverySettlement. # noqa: E501 - - Liquidation time # noqa: E501 - - :return: The time of this DeliverySettlement. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this DeliverySettlement. - - Liquidation time # noqa: E501 - - :param time: The time of this DeliverySettlement. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def contract(self): - """Gets the contract of this DeliverySettlement. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this DeliverySettlement. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this DeliverySettlement. - - Futures contract # noqa: E501 - - :param contract: The contract of this DeliverySettlement. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def leverage(self): - """Gets the leverage of this DeliverySettlement. # noqa: E501 - - Position leverage # noqa: E501 - - :return: The leverage of this DeliverySettlement. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this DeliverySettlement. - - Position leverage # noqa: E501 - - :param leverage: The leverage of this DeliverySettlement. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def size(self): - """Gets the size of this DeliverySettlement. # noqa: E501 - - Position size # noqa: E501 - - :return: The size of this DeliverySettlement. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this DeliverySettlement. - - Position size # noqa: E501 - - :param size: The size of this DeliverySettlement. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def margin(self): - """Gets the margin of this DeliverySettlement. # noqa: E501 - - Position margin # noqa: E501 - - :return: The margin of this DeliverySettlement. # noqa: E501 - :rtype: str - """ - return self._margin - - @margin.setter - def margin(self, margin): - """Sets the margin of this DeliverySettlement. - - Position margin # noqa: E501 - - :param margin: The margin of this DeliverySettlement. # noqa: E501 - :type: str - """ - - self._margin = margin - - @property - def entry_price(self): - """Gets the entry_price of this DeliverySettlement. # noqa: E501 - - Average entry price # noqa: E501 - - :return: The entry_price of this DeliverySettlement. # noqa: E501 - :rtype: str - """ - return self._entry_price - - @entry_price.setter - def entry_price(self, entry_price): - """Sets the entry_price of this DeliverySettlement. - - Average entry price # noqa: E501 - - :param entry_price: The entry_price of this DeliverySettlement. # noqa: E501 - :type: str - """ - - self._entry_price = entry_price - - @property - def settle_price(self): - """Gets the settle_price of this DeliverySettlement. # noqa: E501 - - Settled price # noqa: E501 - - :return: The settle_price of this DeliverySettlement. # noqa: E501 - :rtype: str - """ - return self._settle_price - - @settle_price.setter - def settle_price(self, settle_price): - """Sets the settle_price of this DeliverySettlement. - - Settled price # noqa: E501 - - :param settle_price: The settle_price of this DeliverySettlement. # noqa: E501 - :type: str - """ - - self._settle_price = settle_price - - @property - def profit(self): - """Gets the profit of this DeliverySettlement. # noqa: E501 - - Profit # noqa: E501 - - :return: The profit of this DeliverySettlement. # noqa: E501 - :rtype: str - """ - return self._profit - - @profit.setter - def profit(self, profit): - """Sets the profit of this DeliverySettlement. - - Profit # noqa: E501 - - :param profit: The profit of this DeliverySettlement. # noqa: E501 - :type: str - """ - - self._profit = profit - - @property - def fee(self): - """Gets the fee of this DeliverySettlement. # noqa: E501 - - Fee deducted # noqa: E501 - - :return: The fee of this DeliverySettlement. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this DeliverySettlement. - - Fee deducted # noqa: E501 - - :param fee: The fee of this DeliverySettlement. # noqa: E501 - :type: str - """ - - self._fee = 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, DeliverySettlement): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DeliverySettlement): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py deleted file mode 100644 index 9601ce8..0000000 --- a/gate_api/models/deposit_address.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class DepositAddress(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'address': 'str', - 'multichain_addresses': 'list[MultiChainAddressItem]' - } - - attribute_map = { - 'currency': 'currency', - 'address': 'address', - 'multichain_addresses': 'multichain_addresses' - } - - def __init__(self, currency=None, address=None, multichain_addresses=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, list[MultiChainAddressItem], Configuration) -> None - """DepositAddress - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._address = None - self._multichain_addresses = None - self.discriminator = None - - self.currency = currency - self.address = address - if multichain_addresses is not None: - self.multichain_addresses = multichain_addresses - - @property - def currency(self): - """Gets the currency of this DepositAddress. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this DepositAddress. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this DepositAddress. - - Currency detail # noqa: E501 - - :param currency: The currency of this DepositAddress. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def address(self): - """Gets the address of this DepositAddress. # noqa: E501 - - Deposit address # noqa: E501 - - :return: The address of this DepositAddress. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this DepositAddress. - - Deposit address # noqa: E501 - - :param address: The address of this DepositAddress. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501 - raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 - - self._address = address - - @property - def multichain_addresses(self): - """Gets the multichain_addresses of this DepositAddress. # noqa: E501 - - - :return: The multichain_addresses of this DepositAddress. # noqa: E501 - :rtype: list[MultiChainAddressItem] - """ - return self._multichain_addresses - - @multichain_addresses.setter - def multichain_addresses(self, multichain_addresses): - """Sets the multichain_addresses of this DepositAddress. - - - :param multichain_addresses: The multichain_addresses of this DepositAddress. # noqa: E501 - :type: list[MultiChainAddressItem] - """ - - self._multichain_addresses = multichain_addresses - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DepositAddress): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DepositAddress): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py deleted file mode 100644 index f6b5a2f..0000000 --- a/gate_api/models/dual_get_orders.py +++ /dev/null @@ -1,571 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class DualGetOrders(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'plan_id': 'int', - 'copies': 'str', - 'invest_amount': 'str', - 'settlement_amount': 'str', - 'create_time': 'int', - 'complete_time': 'int', - 'status': 'str', - 'invest_currency': 'str', - 'exercise_currency': 'str', - 'exercise_price': 'str', - 'settlement_price': 'str', - 'settlement_currency': 'str', - 'apy_display': 'str', - 'apy_settlement': 'str', - 'delivery_time': 'int', - 'text': 'str' - } - - attribute_map = { - 'id': 'id', - 'plan_id': 'plan_id', - 'copies': 'copies', - 'invest_amount': 'invest_amount', - 'settlement_amount': 'settlement_amount', - 'create_time': 'create_time', - 'complete_time': 'complete_time', - 'status': 'status', - 'invest_currency': 'invest_currency', - 'exercise_currency': 'exercise_currency', - 'exercise_price': 'exercise_price', - 'settlement_price': 'settlement_price', - 'settlement_currency': 'settlement_currency', - 'apy_display': 'apy_display', - 'apy_settlement': 'apy_settlement', - 'delivery_time': 'delivery_time', - 'text': 'text' - } - - def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settlement_amount=None, create_time=None, complete_time=None, status=None, invest_currency=None, exercise_currency=None, exercise_price=None, settlement_price=None, settlement_currency=None, apy_display=None, apy_settlement=None, delivery_time=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, int, int, str, str, str, str, str, str, str, str, int, str, Configuration) -> None - """DualGetOrders - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._plan_id = None - self._copies = None - self._invest_amount = None - self._settlement_amount = None - self._create_time = None - self._complete_time = None - self._status = None - self._invest_currency = None - self._exercise_currency = None - self._exercise_price = None - self._settlement_price = None - self._settlement_currency = None - self._apy_display = None - self._apy_settlement = None - self._delivery_time = None - self._text = None - self.discriminator = None - - if id is not None: - self.id = id - if plan_id is not None: - self.plan_id = plan_id - if copies is not None: - self.copies = copies - if invest_amount is not None: - self.invest_amount = invest_amount - if settlement_amount is not None: - self.settlement_amount = settlement_amount - if create_time is not None: - self.create_time = create_time - if complete_time is not None: - self.complete_time = complete_time - if status is not None: - self.status = status - if invest_currency is not None: - self.invest_currency = invest_currency - if exercise_currency is not None: - self.exercise_currency = exercise_currency - if exercise_price is not None: - self.exercise_price = exercise_price - if settlement_price is not None: - self.settlement_price = settlement_price - if settlement_currency is not None: - self.settlement_currency = settlement_currency - if apy_display is not None: - self.apy_display = apy_display - if apy_settlement is not None: - self.apy_settlement = apy_settlement - if delivery_time is not None: - self.delivery_time = delivery_time - if text is not None: - self.text = text - - @property - def id(self): - """Gets the id of this DualGetOrders. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this DualGetOrders. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this DualGetOrders. - - Order ID # noqa: E501 - - :param id: The id of this DualGetOrders. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def plan_id(self): - """Gets the plan_id of this DualGetOrders. # noqa: E501 - - Plan ID # noqa: E501 - - :return: The plan_id of this DualGetOrders. # noqa: E501 - :rtype: int - """ - return self._plan_id - - @plan_id.setter - def plan_id(self, plan_id): - """Sets the plan_id of this DualGetOrders. - - Plan ID # noqa: E501 - - :param plan_id: The plan_id of this DualGetOrders. # noqa: E501 - :type: int - """ - - self._plan_id = plan_id - - @property - def copies(self): - """Gets the copies of this DualGetOrders. # noqa: E501 - - Copies # 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. - - Copies # noqa: E501 - - :param copies: The copies of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._copies = copies - - @property - def invest_amount(self): - """Gets the invest_amount of this DualGetOrders. # noqa: E501 - - Investment Amount # noqa: E501 - - :return: The invest_amount of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._invest_amount - - @invest_amount.setter - def invest_amount(self, invest_amount): - """Sets the invest_amount of this DualGetOrders. - - Investment Amount # noqa: E501 - - :param invest_amount: The invest_amount of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._invest_amount = invest_amount - - @property - def settlement_amount(self): - """Gets the settlement_amount of this DualGetOrders. # noqa: E501 - - Settlement Amount # noqa: E501 - - :return: The settlement_amount of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._settlement_amount - - @settlement_amount.setter - def settlement_amount(self, settlement_amount): - """Sets the settlement_amount of this DualGetOrders. - - Settlement Amount # noqa: E501 - - :param settlement_amount: The settlement_amount of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._settlement_amount = settlement_amount - - @property - def create_time(self): - """Gets the create_time of this DualGetOrders. # noqa: E501 - - Creation time # noqa: E501 - - :return: The create_time of this DualGetOrders. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this DualGetOrders. - - Creation time # noqa: E501 - - :param create_time: The create_time of this DualGetOrders. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def complete_time(self): - """Gets the complete_time of this DualGetOrders. # noqa: E501 - - Completion Time # noqa: E501 - - :return: The complete_time of this DualGetOrders. # noqa: E501 - :rtype: int - """ - return self._complete_time - - @complete_time.setter - def complete_time(self, complete_time): - """Sets the complete_time of this DualGetOrders. - - Completion Time # noqa: E501 - - :param complete_time: The complete_time of this DualGetOrders. # noqa: E501 - :type: int - """ - - self._complete_time = complete_time - - @property - def status(self): - """Gets the status of this DualGetOrders. # noqa: E501 - - Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 - - :return: The status of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this DualGetOrders. - - Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 - - :param status: The status of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def invest_currency(self): - """Gets the invest_currency of this DualGetOrders. # noqa: E501 - - Investment Currency # noqa: E501 - - :return: The invest_currency of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._invest_currency - - @invest_currency.setter - def invest_currency(self, invest_currency): - """Sets the invest_currency of this DualGetOrders. - - Investment Currency # noqa: E501 - - :param invest_currency: The invest_currency of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._invest_currency = invest_currency - - @property - def exercise_currency(self): - """Gets the exercise_currency of this DualGetOrders. # noqa: E501 - - Strike Currency # noqa: E501 - - :return: The exercise_currency of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._exercise_currency - - @exercise_currency.setter - def exercise_currency(self, exercise_currency): - """Sets the exercise_currency of this DualGetOrders. - - Strike Currency # noqa: E501 - - :param exercise_currency: The exercise_currency of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._exercise_currency = exercise_currency - - @property - def exercise_price(self): - """Gets the exercise_price of this DualGetOrders. # noqa: E501 - - Strike price # noqa: E501 - - :return: The exercise_price of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._exercise_price - - @exercise_price.setter - def exercise_price(self, exercise_price): - """Sets the exercise_price of this DualGetOrders. - - Strike price # noqa: E501 - - :param exercise_price: The exercise_price of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._exercise_price = exercise_price - - @property - def settlement_price(self): - """Gets the settlement_price of this DualGetOrders. # noqa: E501 - - settlement price # noqa: E501 - - :return: The settlement_price of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._settlement_price - - @settlement_price.setter - def settlement_price(self, settlement_price): - """Sets the settlement_price of this DualGetOrders. - - settlement price # noqa: E501 - - :param settlement_price: The settlement_price of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._settlement_price = settlement_price - - @property - def settlement_currency(self): - """Gets the settlement_currency of this DualGetOrders. # noqa: E501 - - Settle currency # noqa: E501 - - :return: The settlement_currency of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._settlement_currency - - @settlement_currency.setter - def settlement_currency(self, settlement_currency): - """Sets the settlement_currency of this DualGetOrders. - - Settle currency # noqa: E501 - - :param settlement_currency: The settlement_currency of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._settlement_currency = settlement_currency - - @property - def apy_display(self): - """Gets the apy_display of this DualGetOrders. # noqa: E501 - - APY # noqa: E501 - - :return: The apy_display of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._apy_display - - @apy_display.setter - def apy_display(self, apy_display): - """Sets the apy_display of this DualGetOrders. - - APY # noqa: E501 - - :param apy_display: The apy_display of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._apy_display = apy_display - - @property - def apy_settlement(self): - """Gets the apy_settlement of this DualGetOrders. # noqa: E501 - - Settlement APY # noqa: E501 - - :return: The apy_settlement of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._apy_settlement - - @apy_settlement.setter - def apy_settlement(self, apy_settlement): - """Sets the apy_settlement of this DualGetOrders. - - Settlement APY # noqa: E501 - - :param apy_settlement: The apy_settlement of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._apy_settlement = apy_settlement - - @property - def delivery_time(self): - """Gets the delivery_time of this DualGetOrders. # noqa: E501 - - Settlement time # noqa: E501 - - :return: The delivery_time of this DualGetOrders. # noqa: E501 - :rtype: int - """ - return self._delivery_time - - @delivery_time.setter - def delivery_time(self, delivery_time): - """Sets the delivery_time of this DualGetOrders. - - Settlement time # noqa: E501 - - :param delivery_time: The delivery_time of this DualGetOrders. # noqa: E501 - :type: int - """ - - self._delivery_time = delivery_time - - @property - def text(self): - """Gets the text of this DualGetOrders. # noqa: E501 - - Custom order information # noqa: E501 - - :return: The text of this DualGetOrders. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this DualGetOrders. - - Custom order information # noqa: E501 - - :param text: The text of this DualGetOrders. # noqa: E501 - :type: str - """ - - self._text = text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DualGetOrders): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DualGetOrders): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py deleted file mode 100644 index e1319ed..0000000 --- a/gate_api/models/dual_get_plans.py +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class DualGetPlans(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'instrument_name': 'str', - 'invest_currency': 'str', - 'exercise_currency': 'str', - 'exercise_price': 'float', - 'delivery_time': 'int', - 'min_copies': 'int', - 'max_copies': 'int', - 'per_value': 'str', - 'apy_display': 'str', - 'start_time': 'int', - 'end_time': 'int', - 'status': 'str' - } - - attribute_map = { - 'id': 'id', - 'instrument_name': 'instrument_name', - 'invest_currency': 'invest_currency', - 'exercise_currency': 'exercise_currency', - 'exercise_price': 'exercise_price', - 'delivery_time': 'delivery_time', - 'min_copies': 'min_copies', - 'max_copies': 'max_copies', - 'per_value': 'per_value', - 'apy_display': 'apy_display', - 'start_time': 'start_time', - 'end_time': 'end_time', - 'status': 'status' - } - - def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise_currency=None, exercise_price=None, delivery_time=None, min_copies=None, max_copies=None, per_value=None, apy_display=None, start_time=None, end_time=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, float, int, int, int, str, str, int, int, str, Configuration) -> None - """DualGetPlans - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._instrument_name = None - self._invest_currency = None - self._exercise_currency = None - self._exercise_price = None - self._delivery_time = None - self._min_copies = None - self._max_copies = None - self._per_value = None - self._apy_display = None - self._start_time = None - self._end_time = None - self._status = None - self.discriminator = None - - if id is not None: - self.id = id - if instrument_name is not None: - self.instrument_name = instrument_name - if invest_currency is not None: - self.invest_currency = invest_currency - if exercise_currency is not None: - self.exercise_currency = exercise_currency - if exercise_price is not None: - self.exercise_price = exercise_price - if delivery_time is not None: - self.delivery_time = delivery_time - if min_copies is not None: - self.min_copies = min_copies - if max_copies is not None: - self.max_copies = max_copies - if per_value is not None: - self.per_value = per_value - if apy_display is not None: - self.apy_display = apy_display - if start_time is not None: - self.start_time = start_time - if end_time is not None: - self.end_time = end_time - if status is not None: - self.status = status - - @property - def id(self): - """Gets the id of this DualGetPlans. # noqa: E501 - - Plan ID # noqa: E501 - - :return: The id of this DualGetPlans. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this DualGetPlans. - - Plan ID # noqa: E501 - - :param id: The id of this DualGetPlans. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def instrument_name(self): - """Gets the instrument_name of this DualGetPlans. # noqa: E501 - - Instrument Name # noqa: E501 - - :return: The instrument_name of this DualGetPlans. # noqa: E501 - :rtype: str - """ - return self._instrument_name - - @instrument_name.setter - def instrument_name(self, instrument_name): - """Sets the instrument_name of this DualGetPlans. - - Instrument Name # noqa: E501 - - :param instrument_name: The instrument_name of this DualGetPlans. # noqa: E501 - :type: str - """ - - self._instrument_name = instrument_name - - @property - def invest_currency(self): - """Gets the invest_currency of this DualGetPlans. # noqa: E501 - - Investment Currency # noqa: E501 - - :return: The invest_currency of this DualGetPlans. # noqa: E501 - :rtype: str - """ - return self._invest_currency - - @invest_currency.setter - def invest_currency(self, invest_currency): - """Sets the invest_currency of this DualGetPlans. - - Investment Currency # noqa: E501 - - :param invest_currency: The invest_currency of this DualGetPlans. # noqa: E501 - :type: str - """ - - self._invest_currency = invest_currency - - @property - def exercise_currency(self): - """Gets the exercise_currency of this DualGetPlans. # noqa: E501 - - Strike Currency # noqa: E501 - - :return: The exercise_currency of this DualGetPlans. # noqa: E501 - :rtype: str - """ - return self._exercise_currency - - @exercise_currency.setter - def exercise_currency(self, exercise_currency): - """Sets the exercise_currency of this DualGetPlans. - - Strike Currency # noqa: E501 - - :param exercise_currency: The exercise_currency of this DualGetPlans. # noqa: E501 - :type: str - """ - - self._exercise_currency = exercise_currency - - @property - def exercise_price(self): - """Gets the exercise_price of this DualGetPlans. # noqa: E501 - - Strike price # noqa: E501 - - :return: The exercise_price of this DualGetPlans. # noqa: E501 - :rtype: float - """ - return self._exercise_price - - @exercise_price.setter - def exercise_price(self, exercise_price): - """Sets the exercise_price of this DualGetPlans. - - Strike price # noqa: E501 - - :param exercise_price: The exercise_price of this DualGetPlans. # noqa: E501 - :type: float - """ - - self._exercise_price = exercise_price - - @property - def delivery_time(self): - """Gets the delivery_time of this DualGetPlans. # noqa: E501 - - Settlement time # noqa: E501 - - :return: The delivery_time of this DualGetPlans. # noqa: E501 - :rtype: int - """ - return self._delivery_time - - @delivery_time.setter - def delivery_time(self, delivery_time): - """Sets the delivery_time of this DualGetPlans. - - Settlement time # noqa: E501 - - :param delivery_time: The delivery_time of this DualGetPlans. # noqa: E501 - :type: int - """ - - self._delivery_time = delivery_time - - @property - def min_copies(self): - """Gets the min_copies of this DualGetPlans. # noqa: E501 - - Minimum Copies # 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 Copies # 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 Copies # 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 Copies # 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 - - Per Unit Value # noqa: E501 - - :return: The per_value of this DualGetPlans. # noqa: E501 - :rtype: str - """ - return self._per_value - - @per_value.setter - def per_value(self, per_value): - """Sets the per_value of this DualGetPlans. - - Per Unit Value # noqa: E501 - - :param per_value: The per_value of this DualGetPlans. # noqa: E501 - :type: str - """ - - self._per_value = per_value - - @property - def apy_display(self): - """Gets the apy_display of this DualGetPlans. # noqa: E501 - - APY # noqa: E501 - - :return: The apy_display of this DualGetPlans. # noqa: E501 - :rtype: str - """ - return self._apy_display - - @apy_display.setter - def apy_display(self, apy_display): - """Sets the apy_display of this DualGetPlans. - - APY # noqa: E501 - - :param apy_display: The apy_display of this DualGetPlans. # noqa: E501 - :type: str - """ - - self._apy_display = apy_display - - @property - def start_time(self): - """Gets the start_time of this DualGetPlans. # noqa: E501 - - start time # noqa: E501 - - :return: The start_time of this DualGetPlans. # noqa: E501 - :rtype: int - """ - return self._start_time - - @start_time.setter - def start_time(self, start_time): - """Sets the start_time of this DualGetPlans. - - start time # noqa: E501 - - :param start_time: The start_time of this DualGetPlans. # noqa: E501 - :type: int - """ - - self._start_time = start_time - - @property - def end_time(self): - """Gets the end_time of this DualGetPlans. # noqa: E501 - - Finished time # noqa: E501 - - :return: The end_time of this DualGetPlans. # noqa: E501 - :rtype: int - """ - return self._end_time - - @end_time.setter - def end_time(self, end_time): - """Sets the end_time of this DualGetPlans. - - Finished time # noqa: E501 - - :param end_time: The end_time of this DualGetPlans. # noqa: E501 - :type: int - """ - - self._end_time = end_time - - @property - def status(self): - """Gets the status of this DualGetPlans. # noqa: E501 - - Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-ended # noqa: E501 - - :return: The status of this DualGetPlans. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this DualGetPlans. - - Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-ended # noqa: E501 - - :param status: The status of this DualGetPlans. # noqa: E501 - :type: str - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DualGetPlans): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DualGetPlans): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py deleted file mode 100644 index 3e78f7c..0000000 --- a/gate_api/models/eth2_rate_list.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Eth2RateList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'date_time': 'int', - 'date': 'str', - 'rate': 'str' - } - - attribute_map = { - 'date_time': 'date_time', - 'date': 'date', - 'rate': 'rate' - } - - def __init__(self, date_time=None, date=None, rate=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, Configuration) -> None - """Eth2RateList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._date_time = None - self._date = None - self._rate = None - self.discriminator = None - - if date_time is not None: - self.date_time = date_time - if date is not None: - self.date = date - if rate is not None: - self.rate = rate - - @property - def date_time(self): - """Gets the date_time of this Eth2RateList. # noqa: E501 - - Date and Time Stamp # noqa: E501 - - :return: The date_time of this Eth2RateList. # noqa: E501 - :rtype: int - """ - return self._date_time - - @date_time.setter - def date_time(self, date_time): - """Sets the date_time of this Eth2RateList. - - Date and Time Stamp # noqa: E501 - - :param date_time: The date_time of this Eth2RateList. # noqa: E501 - :type: int - """ - - self._date_time = date_time - - @property - def date(self): - """Gets the date of this Eth2RateList. # noqa: E501 - - Date # noqa: E501 - - :return: The date of this Eth2RateList. # noqa: E501 - :rtype: str - """ - return self._date - - @date.setter - def date(self, date): - """Sets the date of this Eth2RateList. - - Date # noqa: E501 - - :param date: The date of this Eth2RateList. # noqa: E501 - :type: str - """ - - self._date = date - - @property - def rate(self): - """Gets the rate of this Eth2RateList. # noqa: E501 - - percentage # noqa: E501 - - :return: The rate of this Eth2RateList. # noqa: E501 - :rtype: str - """ - return self._rate - - @rate.setter - def rate(self, rate): - """Sets the rate of this Eth2RateList. - - percentage # noqa: E501 - - :param rate: The rate of this Eth2RateList. # noqa: E501 - :type: str - """ - - self._rate = rate - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Eth2RateList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Eth2RateList): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py deleted file mode 100644 index 23a2a8e..0000000 --- a/gate_api/models/eth2_swap.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Eth2Swap(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'side': 'str', - 'amount': 'str' - } - - attribute_map = { - 'side': 'side', - 'amount': 'amount' - } - - def __init__(self, side=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """Eth2Swap - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._side = None - self._amount = None - self.discriminator = None - - self.side = side - self.amount = amount - - @property - def side(self): - """Gets the side of this Eth2Swap. # noqa: E501 - - 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) # noqa: E501 - - :return: The side of this Eth2Swap. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this Eth2Swap. - - 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) # noqa: E501 - - :param side: The side of this Eth2Swap. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 - raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501 - - self._side = side - - @property - def amount(self): - """Gets the amount of this Eth2Swap. # noqa: E501 - - amount # noqa: E501 - - :return: The amount of this Eth2Swap. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this Eth2Swap. - - amount # noqa: E501 - - :param amount: The amount of this Eth2Swap. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Eth2Swap): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Eth2Swap): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py deleted file mode 100644 index fe52683..0000000 --- a/gate_api/models/flash_swap_currency_pair.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FlashSwapCurrencyPair(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'sell_currency': 'str', - 'buy_currency': 'str', - 'sell_min_amount': 'str', - 'sell_max_amount': 'str', - 'buy_min_amount': 'str', - 'buy_max_amount': 'str' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'sell_currency': 'sell_currency', - 'buy_currency': 'buy_currency', - 'sell_min_amount': 'sell_min_amount', - 'sell_max_amount': 'sell_max_amount', - 'buy_min_amount': 'buy_min_amount', - 'buy_max_amount': 'buy_max_amount' - } - - def __init__(self, currency_pair=None, sell_currency=None, buy_currency=None, sell_min_amount=None, sell_max_amount=None, buy_min_amount=None, buy_max_amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, Configuration) -> None - """FlashSwapCurrencyPair - a 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._sell_currency = None - self._buy_currency = None - self._sell_min_amount = None - self._sell_max_amount = None - self._buy_min_amount = None - self._buy_max_amount = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if sell_currency is not None: - self.sell_currency = sell_currency - if buy_currency is not None: - self.buy_currency = buy_currency - if sell_min_amount is not None: - self.sell_min_amount = sell_min_amount - if sell_max_amount is not None: - self.sell_max_amount = sell_max_amount - if buy_min_amount is not None: - self.buy_min_amount = buy_min_amount - if buy_max_amount is not None: - self.buy_max_amount = buy_max_amount - - @property - def currency_pair(self): - """Gets the currency_pair of this FlashSwapCurrencyPair. # noqa: E501 - - The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501 - - :return: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this FlashSwapCurrencyPair. - - The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501 - - :param currency_pair: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def sell_currency(self): - """Gets the sell_currency of this FlashSwapCurrencyPair. # noqa: E501 - - The currency to be sold # noqa: E501 - - :return: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._sell_currency - - @sell_currency.setter - def sell_currency(self, sell_currency): - """Sets the sell_currency of this FlashSwapCurrencyPair. - - The currency to be sold # noqa: E501 - - :param sell_currency: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 - :type: str - """ - - self._sell_currency = sell_currency - - @property - def buy_currency(self): - """Gets the buy_currency of this FlashSwapCurrencyPair. # noqa: E501 - - The currency to be bought # noqa: E501 - - :return: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._buy_currency - - @buy_currency.setter - def buy_currency(self, buy_currency): - """Sets the buy_currency of this FlashSwapCurrencyPair. - - The currency to be bought # noqa: E501 - - :param buy_currency: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 - :type: str - """ - - self._buy_currency = buy_currency - - @property - def sell_min_amount(self): - """Gets the sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - - The minimum quantity required for selling # noqa: E501 - - :return: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._sell_min_amount - - @sell_min_amount.setter - def sell_min_amount(self, sell_min_amount): - """Sets the sell_min_amount of this FlashSwapCurrencyPair. - - The minimum quantity required for selling # noqa: E501 - - :param sell_min_amount: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - :type: str - """ - - self._sell_min_amount = sell_min_amount - - @property - def sell_max_amount(self): - """Gets the sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - - The maximum quantity allowed for selling # noqa: E501 - - :return: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._sell_max_amount - - @sell_max_amount.setter - def sell_max_amount(self, sell_max_amount): - """Sets the sell_max_amount of this FlashSwapCurrencyPair. - - The maximum quantity allowed for selling # noqa: E501 - - :param sell_max_amount: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - :type: str - """ - - self._sell_max_amount = sell_max_amount - - @property - def buy_min_amount(self): - """Gets the buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - - The minimum quantity required for buying # noqa: E501 - - :return: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._buy_min_amount - - @buy_min_amount.setter - def buy_min_amount(self, buy_min_amount): - """Sets the buy_min_amount of this FlashSwapCurrencyPair. - - The minimum quantity required for buying # noqa: E501 - - :param buy_min_amount: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - :type: str - """ - - self._buy_min_amount = buy_min_amount - - @property - def buy_max_amount(self): - """Gets the buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - - The maximum quantity allowed for buying # noqa: E501 - - :return: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._buy_max_amount - - @buy_max_amount.setter - def buy_max_amount(self, buy_max_amount): - """Sets the buy_max_amount of this FlashSwapCurrencyPair. - - The maximum quantity allowed for buying # noqa: E501 - - :param buy_max_amount: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - :type: str - """ - - self._buy_max_amount = buy_max_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, FlashSwapCurrencyPair): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FlashSwapCurrencyPair): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py deleted file mode 100644 index e50d55f..0000000 --- a/gate_api/models/flash_swap_order.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FlashSwapOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'create_time': 'int', - 'user_id': 'int', - 'sell_currency': 'str', - 'sell_amount': 'str', - 'buy_currency': 'str', - 'buy_amount': 'str', - 'price': 'str', - 'status': 'int' - } - - attribute_map = { - 'id': 'id', - 'create_time': 'create_time', - 'user_id': 'user_id', - 'sell_currency': 'sell_currency', - 'sell_amount': 'sell_amount', - 'buy_currency': 'buy_currency', - 'buy_amount': 'buy_amount', - 'price': 'price', - 'status': 'status' - } - - def __init__(self, id=None, create_time=None, user_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, price=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, str, str, str, str, str, int, Configuration) -> None - """FlashSwapOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._create_time = None - self._user_id = None - self._sell_currency = None - self._sell_amount = None - self._buy_currency = None - self._buy_amount = None - self._price = None - self._status = None - self.discriminator = None - - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if user_id is not None: - self.user_id = user_id - if sell_currency is not None: - self.sell_currency = sell_currency - if sell_amount is not None: - self.sell_amount = sell_amount - if buy_currency is not None: - self.buy_currency = buy_currency - if buy_amount is not None: - self.buy_amount = buy_amount - if price is not None: - self.price = price - if status is not None: - self.status = status - - @property - def id(self): - """Gets the id of this FlashSwapOrder. # noqa: E501 - - Flash swap order ID # noqa: E501 - - :return: The id of this FlashSwapOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FlashSwapOrder. - - Flash swap order ID # noqa: E501 - - :param id: The id of this FlashSwapOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this FlashSwapOrder. # noqa: E501 - - Creation time of order (in milliseconds) # noqa: E501 - - :return: The create_time of this FlashSwapOrder. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this FlashSwapOrder. - - Creation time of order (in milliseconds) # noqa: E501 - - :param create_time: The create_time of this FlashSwapOrder. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def user_id(self): - """Gets the user_id of this FlashSwapOrder. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this FlashSwapOrder. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this FlashSwapOrder. - - User ID # noqa: E501 - - :param user_id: The user_id of this FlashSwapOrder. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def sell_currency(self): - """Gets the sell_currency of this FlashSwapOrder. # noqa: E501 - - Currency to sell # noqa: E501 - - :return: The sell_currency of this FlashSwapOrder. # noqa: E501 - :rtype: str - """ - return self._sell_currency - - @sell_currency.setter - def sell_currency(self, sell_currency): - """Sets the sell_currency of this FlashSwapOrder. - - Currency to sell # noqa: E501 - - :param sell_currency: The sell_currency of this FlashSwapOrder. # noqa: E501 - :type: str - """ - - self._sell_currency = sell_currency - - @property - def sell_amount(self): - """Gets the sell_amount of this FlashSwapOrder. # noqa: E501 - - Amount to sell # noqa: E501 - - :return: The sell_amount of this FlashSwapOrder. # noqa: E501 - :rtype: str - """ - return self._sell_amount - - @sell_amount.setter - def sell_amount(self, sell_amount): - """Sets the sell_amount of this FlashSwapOrder. - - Amount to sell # noqa: E501 - - :param sell_amount: The sell_amount of this FlashSwapOrder. # noqa: E501 - :type: str - """ - - self._sell_amount = sell_amount - - @property - def buy_currency(self): - """Gets the buy_currency of this FlashSwapOrder. # noqa: E501 - - Currency to buy # noqa: E501 - - :return: The buy_currency of this FlashSwapOrder. # noqa: E501 - :rtype: str - """ - return self._buy_currency - - @buy_currency.setter - def buy_currency(self, buy_currency): - """Sets the buy_currency of this FlashSwapOrder. - - Currency to buy # noqa: E501 - - :param buy_currency: The buy_currency of this FlashSwapOrder. # noqa: E501 - :type: str - """ - - self._buy_currency = buy_currency - - @property - def buy_amount(self): - """Gets the buy_amount of this FlashSwapOrder. # noqa: E501 - - Amount to buy # noqa: E501 - - :return: The buy_amount of this FlashSwapOrder. # noqa: E501 - :rtype: str - """ - return self._buy_amount - - @buy_amount.setter - def buy_amount(self, buy_amount): - """Sets the buy_amount of this FlashSwapOrder. - - Amount to buy # noqa: E501 - - :param buy_amount: The buy_amount of this FlashSwapOrder. # noqa: E501 - :type: str - """ - - self._buy_amount = buy_amount - - @property - def price(self): - """Gets the price of this FlashSwapOrder. # noqa: E501 - - Price # noqa: E501 - - :return: The price of this FlashSwapOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FlashSwapOrder. - - Price # noqa: E501 - - :param price: The price of this FlashSwapOrder. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def status(self): - """Gets the status of this FlashSwapOrder. # noqa: E501 - - Flash swap order status `1` - success `2` - failure # noqa: E501 - - :return: The status of this FlashSwapOrder. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this FlashSwapOrder. - - Flash swap order status `1` - success `2` - failure # noqa: E501 - - :param status: The status of this FlashSwapOrder. # noqa: E501 - :type: int - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FlashSwapOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FlashSwapOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py deleted file mode 100644 index b0e582c..0000000 --- a/gate_api/models/flash_swap_order_preview.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FlashSwapOrderPreview(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'preview_id': 'str', - 'sell_currency': 'str', - 'sell_amount': 'str', - 'buy_currency': 'str', - 'buy_amount': 'str', - 'price': 'str' - } - - attribute_map = { - 'preview_id': 'preview_id', - 'sell_currency': 'sell_currency', - 'sell_amount': 'sell_amount', - 'buy_currency': 'buy_currency', - 'buy_amount': 'buy_amount', - 'price': 'price' - } - - def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, price=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """FlashSwapOrderPreview - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._preview_id = None - self._sell_currency = None - self._sell_amount = None - self._buy_currency = None - self._buy_amount = None - self._price = None - self.discriminator = None - - if preview_id is not None: - self.preview_id = preview_id - if sell_currency is not None: - self.sell_currency = sell_currency - if sell_amount is not None: - self.sell_amount = sell_amount - if buy_currency is not None: - self.buy_currency = buy_currency - if buy_amount is not None: - self.buy_amount = buy_amount - if price is not None: - self.price = price - - @property - def preview_id(self): - """Gets the preview_id of this FlashSwapOrderPreview. # noqa: E501 - - Preview result ID # noqa: E501 - - :return: The preview_id of this FlashSwapOrderPreview. # noqa: E501 - :rtype: str - """ - return self._preview_id - - @preview_id.setter - def preview_id(self, preview_id): - """Sets the preview_id of this FlashSwapOrderPreview. - - Preview result ID # noqa: E501 - - :param preview_id: The preview_id of this FlashSwapOrderPreview. # noqa: E501 - :type: str - """ - - self._preview_id = preview_id - - @property - def sell_currency(self): - """Gets the sell_currency of this FlashSwapOrderPreview. # noqa: E501 - - Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 - - :return: The sell_currency of this FlashSwapOrderPreview. # noqa: E501 - :rtype: str - """ - return self._sell_currency - - @sell_currency.setter - def sell_currency(self, sell_currency): - """Sets the sell_currency of this FlashSwapOrderPreview. - - Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 - - :param sell_currency: The sell_currency of this FlashSwapOrderPreview. # noqa: E501 - :type: str - """ - - self._sell_currency = sell_currency - - @property - def sell_amount(self): - """Gets the sell_amount of this FlashSwapOrderPreview. # noqa: E501 - - Amount to sell # noqa: E501 - - :return: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 - :rtype: str - """ - return self._sell_amount - - @sell_amount.setter - def sell_amount(self, sell_amount): - """Sets the sell_amount of this FlashSwapOrderPreview. - - Amount to sell # noqa: E501 - - :param sell_amount: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 - :type: str - """ - - self._sell_amount = sell_amount - - @property - def buy_currency(self): - """Gets the buy_currency of this FlashSwapOrderPreview. # noqa: E501 - - Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 - - :return: The buy_currency of this FlashSwapOrderPreview. # noqa: E501 - :rtype: str - """ - return self._buy_currency - - @buy_currency.setter - def buy_currency(self, buy_currency): - """Sets the buy_currency of this FlashSwapOrderPreview. - - Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 - - :param buy_currency: The buy_currency of this FlashSwapOrderPreview. # noqa: E501 - :type: str - """ - - self._buy_currency = buy_currency - - @property - def buy_amount(self): - """Gets the buy_amount of this FlashSwapOrderPreview. # noqa: E501 - - Amount to buy # noqa: E501 - - :return: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 - :rtype: str - """ - return self._buy_amount - - @buy_amount.setter - def buy_amount(self, buy_amount): - """Sets the buy_amount of this FlashSwapOrderPreview. - - Amount to buy # noqa: E501 - - :param buy_amount: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 - :type: str - """ - - self._buy_amount = buy_amount - - @property - def price(self): - """Gets the price of this FlashSwapOrderPreview. # noqa: E501 - - Price # noqa: E501 - - :return: The price of this FlashSwapOrderPreview. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FlashSwapOrderPreview. - - Price # noqa: E501 - - :param price: The price of this FlashSwapOrderPreview. # 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, FlashSwapOrderPreview): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FlashSwapOrderPreview): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py deleted file mode 100644 index 7ce00f8..0000000 --- a/gate_api/models/flash_swap_order_request.py +++ /dev/null @@ -1,240 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FlashSwapOrderRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'preview_id': 'str', - 'sell_currency': 'str', - 'sell_amount': 'str', - 'buy_currency': 'str', - 'buy_amount': 'str' - } - - attribute_map = { - 'preview_id': 'preview_id', - 'sell_currency': 'sell_currency', - 'sell_amount': 'sell_amount', - 'buy_currency': 'buy_currency', - 'buy_amount': 'buy_amount' - } - - def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """FlashSwapOrderRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._preview_id = None - self._sell_currency = None - self._sell_amount = None - self._buy_currency = None - self._buy_amount = None - self.discriminator = None - - self.preview_id = preview_id - self.sell_currency = sell_currency - self.sell_amount = sell_amount - self.buy_currency = buy_currency - self.buy_amount = buy_amount - - @property - def preview_id(self): - """Gets the preview_id of this FlashSwapOrderRequest. # noqa: E501 - - Preview result ID # noqa: E501 - - :return: The preview_id of this FlashSwapOrderRequest. # noqa: E501 - :rtype: str - """ - return self._preview_id - - @preview_id.setter - def preview_id(self, preview_id): - """Sets the preview_id of this FlashSwapOrderRequest. - - Preview result ID # noqa: E501 - - :param preview_id: The preview_id of this FlashSwapOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and preview_id is None: # noqa: E501 - raise ValueError("Invalid value for `preview_id`, must not be `None`") # noqa: E501 - - self._preview_id = preview_id - - @property - def sell_currency(self): - """Gets the sell_currency of this FlashSwapOrderRequest. # noqa: E501 - - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 - - :return: The sell_currency of this FlashSwapOrderRequest. # noqa: E501 - :rtype: str - """ - return self._sell_currency - - @sell_currency.setter - def sell_currency(self, sell_currency): - """Sets the sell_currency of this FlashSwapOrderRequest. - - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 - - :param sell_currency: The sell_currency of this FlashSwapOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sell_currency is None: # noqa: E501 - raise ValueError("Invalid value for `sell_currency`, must not be `None`") # noqa: E501 - - self._sell_currency = sell_currency - - @property - def sell_amount(self): - """Gets the sell_amount of this FlashSwapOrderRequest. # noqa: E501 - - Amount to sell (based on the preview result) # noqa: E501 - - :return: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 - :rtype: str - """ - return self._sell_amount - - @sell_amount.setter - def sell_amount(self, sell_amount): - """Sets the sell_amount of this FlashSwapOrderRequest. - - Amount to sell (based on the preview result) # noqa: E501 - - :param sell_amount: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sell_amount is None: # noqa: E501 - raise ValueError("Invalid value for `sell_amount`, must not be `None`") # noqa: E501 - - self._sell_amount = sell_amount - - @property - def buy_currency(self): - """Gets the buy_currency of this FlashSwapOrderRequest. # noqa: E501 - - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 - - :return: The buy_currency of this FlashSwapOrderRequest. # noqa: E501 - :rtype: str - """ - return self._buy_currency - - @buy_currency.setter - def buy_currency(self, buy_currency): - """Sets the buy_currency of this FlashSwapOrderRequest. - - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 - - :param buy_currency: The buy_currency of this FlashSwapOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and buy_currency is None: # noqa: E501 - raise ValueError("Invalid value for `buy_currency`, must not be `None`") # noqa: E501 - - self._buy_currency = buy_currency - - @property - def buy_amount(self): - """Gets the buy_amount of this FlashSwapOrderRequest. # noqa: E501 - - Amount to buy (based on the preview result) # noqa: E501 - - :return: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 - :rtype: str - """ - return self._buy_amount - - @buy_amount.setter - def buy_amount(self, buy_amount): - """Sets the buy_amount of this FlashSwapOrderRequest. - - Amount to buy (based on the preview result) # noqa: E501 - - :param buy_amount: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and buy_amount is None: # noqa: E501 - raise ValueError("Invalid value for `buy_amount`, must not be `None`") # noqa: E501 - - self._buy_amount = buy_amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FlashSwapOrderRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FlashSwapOrderRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py deleted file mode 100644 index 1905832..0000000 --- a/gate_api/models/flash_swap_preview_request.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FlashSwapPreviewRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'sell_currency': 'str', - 'sell_amount': 'str', - 'buy_currency': 'str', - 'buy_amount': 'str' - } - - attribute_map = { - 'sell_currency': 'sell_currency', - 'sell_amount': 'sell_amount', - 'buy_currency': 'buy_currency', - 'buy_amount': 'buy_amount' - } - - def __init__(self, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """FlashSwapPreviewRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._sell_currency = None - self._sell_amount = None - self._buy_currency = None - self._buy_amount = None - self.discriminator = None - - self.sell_currency = sell_currency - if sell_amount is not None: - self.sell_amount = sell_amount - self.buy_currency = buy_currency - if buy_amount is not None: - self.buy_amount = buy_amount - - @property - def sell_currency(self): - """Gets the sell_currency of this FlashSwapPreviewRequest. # noqa: E501 - - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 - - :return: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501 - :rtype: str - """ - return self._sell_currency - - @sell_currency.setter - def sell_currency(self, sell_currency): - """Sets the sell_currency of this FlashSwapPreviewRequest. - - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 - - :param sell_currency: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sell_currency is None: # noqa: E501 - raise ValueError("Invalid value for `sell_currency`, must not be `None`") # noqa: E501 - - self._sell_currency = sell_currency - - @property - def sell_amount(self): - """Gets the sell_amount of this FlashSwapPreviewRequest. # noqa: E501 - - Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 - - :return: The sell_amount of this FlashSwapPreviewRequest. # noqa: E501 - :rtype: str - """ - return self._sell_amount - - @sell_amount.setter - def sell_amount(self, sell_amount): - """Sets the sell_amount of this FlashSwapPreviewRequest. - - Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 - - :param sell_amount: The sell_amount of this FlashSwapPreviewRequest. # noqa: E501 - :type: str - """ - - self._sell_amount = sell_amount - - @property - def buy_currency(self): - """Gets the buy_currency of this FlashSwapPreviewRequest. # noqa: E501 - - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 - - :return: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501 - :rtype: str - """ - return self._buy_currency - - @buy_currency.setter - def buy_currency(self, buy_currency): - """Sets the buy_currency of this FlashSwapPreviewRequest. - - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 - - :param buy_currency: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and buy_currency is None: # noqa: E501 - raise ValueError("Invalid value for `buy_currency`, must not be `None`") # noqa: E501 - - self._buy_currency = buy_currency - - @property - def buy_amount(self): - """Gets the buy_amount of this FlashSwapPreviewRequest. # noqa: E501 - - Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 - - :return: The buy_amount of this FlashSwapPreviewRequest. # noqa: E501 - :rtype: str - """ - return self._buy_amount - - @buy_amount.setter - def buy_amount(self, buy_amount): - """Sets the buy_amount of this FlashSwapPreviewRequest. - - Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 - - :param buy_amount: The buy_amount of this FlashSwapPreviewRequest. # noqa: E501 - :type: str - """ - - self._buy_amount = buy_amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FlashSwapPreviewRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FlashSwapPreviewRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py deleted file mode 100644 index 19cbfb6..0000000 --- a/gate_api/models/funding_account.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FundingAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'lent': 'str', - 'total_lent': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'available': 'available', - 'locked': 'locked', - 'lent': 'lent', - 'total_lent': 'total_lent' - } - - def __init__(self, currency=None, available=None, locked=None, lent=None, total_lent=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """FundingAccount - a 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._lent = None - self._total_lent = 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 lent is not None: - self.lent = lent - if total_lent is not None: - self.total_lent = total_lent - - @property - def currency(self): - """Gets the currency of this FundingAccount. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this FundingAccount. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this FundingAccount. - - Currency name # noqa: E501 - - :param currency: The currency of this FundingAccount. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def available(self): - """Gets the available of this FundingAccount. # noqa: E501 - - Available assets to lend, which is identical to spot account `available` # noqa: E501 - - :return: The available of this FundingAccount. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this FundingAccount. - - Available assets to lend, which is identical to spot account `available` # noqa: E501 - - :param available: The available of this FundingAccount. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def locked(self): - """Gets the locked of this FundingAccount. # noqa: E501 - - Locked amount. i.e. amount in `open` loans # noqa: E501 - - :return: The locked of this FundingAccount. # noqa: E501 - :rtype: str - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this FundingAccount. - - Locked amount. i.e. amount in `open` loans # noqa: E501 - - :param locked: The locked of this FundingAccount. # noqa: E501 - :type: str - """ - - self._locked = locked - - @property - def lent(self): - """Gets the lent of this FundingAccount. # noqa: E501 - - Outstanding loan amount yet to be repaid # noqa: E501 - - :return: The lent of this FundingAccount. # noqa: E501 - :rtype: str - """ - return self._lent - - @lent.setter - def lent(self, lent): - """Sets the lent of this FundingAccount. - - Outstanding loan amount yet to be repaid # noqa: E501 - - :param lent: The lent of this FundingAccount. # noqa: E501 - :type: str - """ - - self._lent = lent - - @property - def total_lent(self): - """Gets the total_lent of this FundingAccount. # noqa: E501 - - Amount used for lending. total_lent = lent + locked # noqa: E501 - - :return: The total_lent of this FundingAccount. # noqa: E501 - :rtype: str - """ - return self._total_lent - - @total_lent.setter - def total_lent(self, total_lent): - """Sets the total_lent of this FundingAccount. - - Amount used for lending. total_lent = lent + locked # noqa: E501 - - :param total_lent: The total_lent of this FundingAccount. # noqa: E501 - :type: str - """ - - self._total_lent = total_lent - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FundingAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FundingAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py deleted file mode 100644 index 840509d..0000000 --- a/gate_api/models/funding_rate_record.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FundingRateRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 't': 'int', - 'r': 'str' - } - - attribute_map = { - 't': 't', - 'r': 'r' - } - - def __init__(self, t=None, r=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, Configuration) -> None - """FundingRateRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._t = None - self._r = None - self.discriminator = None - - if t is not None: - self.t = t - if r is not None: - self.r = r - - @property - def t(self): - """Gets the t of this FundingRateRecord. # noqa: E501 - - Unix timestamp in seconds # noqa: E501 - - :return: The t of this FundingRateRecord. # noqa: E501 - :rtype: int - """ - return self._t - - @t.setter - def t(self, t): - """Sets the t of this FundingRateRecord. - - Unix timestamp in seconds # noqa: E501 - - :param t: The t of this FundingRateRecord. # noqa: E501 - :type: int - """ - - self._t = t - - @property - def r(self): - """Gets the r of this FundingRateRecord. # noqa: E501 - - Funding rate # noqa: E501 - - :return: The r of this FundingRateRecord. # noqa: E501 - :rtype: str - """ - return self._r - - @r.setter - def r(self, r): - """Sets the r of this FundingRateRecord. - - Funding rate # noqa: E501 - - :param r: The r of this FundingRateRecord. # noqa: E501 - :type: str - """ - - self._r = r - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FundingRateRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FundingRateRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py deleted file mode 100644 index 836de56..0000000 --- a/gate_api/models/future_cancel_order_result.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FutureCancelOrderResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'user_id': 'int', - 'succeeded': 'bool', - 'message': 'str' - } - - attribute_map = { - 'id': 'id', - 'user_id': 'user_id', - 'succeeded': 'succeeded', - 'message': 'message' - } - - def __init__(self, id=None, user_id=None, succeeded=None, message=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, bool, str, Configuration) -> None - """FutureCancelOrderResult - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._user_id = None - self._succeeded = None - self._message = None - self.discriminator = None - - if id is not None: - self.id = id - if user_id is not None: - self.user_id = user_id - if succeeded is not None: - self.succeeded = succeeded - if message is not None: - self.message = message - - @property - def id(self): - """Gets the id of this FutureCancelOrderResult. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this FutureCancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FutureCancelOrderResult. - - Order ID # noqa: E501 - - :param id: The id of this FutureCancelOrderResult. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def user_id(self): - """Gets the user_id of this FutureCancelOrderResult. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this FutureCancelOrderResult. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this FutureCancelOrderResult. - - User ID # noqa: E501 - - :param user_id: The user_id of this FutureCancelOrderResult. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def succeeded(self): - """Gets the succeeded of this FutureCancelOrderResult. # noqa: E501 - - Whether cancellation succeeded # noqa: E501 - - :return: The succeeded of this FutureCancelOrderResult. # noqa: E501 - :rtype: bool - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this FutureCancelOrderResult. - - Whether cancellation succeeded # noqa: E501 - - :param succeeded: The succeeded of this FutureCancelOrderResult. # noqa: E501 - :type: bool - """ - - self._succeeded = succeeded - - @property - def message(self): - """Gets the message of this FutureCancelOrderResult. # noqa: E501 - - Error message when failed to cancel the order; empty if succeeded # noqa: E501 - - :return: The message of this FutureCancelOrderResult. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this FutureCancelOrderResult. - - Error message when failed to cancel the order; empty if succeeded # noqa: E501 - - :param message: The message of this FutureCancelOrderResult. # noqa: E501 - :type: str - """ - - self._message = message - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FutureCancelOrderResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FutureCancelOrderResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py deleted file mode 100644 index e1a6095..0000000 --- a/gate_api/models/futures_account.py +++ /dev/null @@ -1,793 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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': 'str', - 'unrealised_pnl': 'str', - 'position_margin': 'str', - 'order_margin': 'str', - 'available': 'str', - 'point': 'str', - 'currency': 'str', - 'in_dual_mode': 'bool', - 'enable_credit': 'bool', - 'position_initial_margin': 'str', - 'maintenance_margin': 'str', - 'bonus': 'str', - 'enable_evolved_classic': 'bool', - 'cross_order_margin': 'str', - 'cross_initial_margin': 'str', - 'cross_maintenance_margin': 'str', - 'cross_unrealised_pnl': 'str', - 'cross_available': 'str', - 'cross_margin_balance': 'str', - 'cross_mmr': 'str', - 'cross_imr': 'str', - 'isolated_position_margin': 'str', - 'enable_new_dual_mode': 'bool', - 'margin_mode': 'int', - 'history': 'FuturesAccountHistory' - } - - attribute_map = { - 'total': 'total', - 'unrealised_pnl': 'unrealised_pnl', - 'position_margin': 'position_margin', - 'order_margin': 'order_margin', - 'available': 'available', - 'point': 'point', - 'currency': 'currency', - 'in_dual_mode': 'in_dual_mode', - 'enable_credit': 'enable_credit', - 'position_initial_margin': 'position_initial_margin', - 'maintenance_margin': 'maintenance_margin', - 'bonus': 'bonus', - 'enable_evolved_classic': 'enable_evolved_classic', - 'cross_order_margin': 'cross_order_margin', - 'cross_initial_margin': 'cross_initial_margin', - 'cross_maintenance_margin': 'cross_maintenance_margin', - 'cross_unrealised_pnl': 'cross_unrealised_pnl', - 'cross_available': 'cross_available', - 'cross_margin_balance': 'cross_margin_balance', - 'cross_mmr': 'cross_mmr', - 'cross_imr': 'cross_imr', - 'isolated_position_margin': 'isolated_position_margin', - 'enable_new_dual_mode': 'enable_new_dual_mode', - 'margin_mode': 'margin_mode', - 'history': 'history' - } - - def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_margin=None, available=None, point=None, currency=None, in_dual_mode=None, enable_credit=None, position_initial_margin=None, maintenance_margin=None, bonus=None, enable_evolved_classic=None, cross_order_margin=None, cross_initial_margin=None, cross_maintenance_margin=None, cross_unrealised_pnl=None, cross_available=None, cross_margin_balance=None, cross_mmr=None, cross_imr=None, isolated_position_margin=None, enable_new_dual_mode=None, margin_mode=None, history=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, bool, bool, str, str, str, bool, str, str, str, str, str, str, str, str, str, bool, int, FuturesAccountHistory, Configuration) -> None - """FuturesAccount - a 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._unrealised_pnl = None - self._position_margin = None - self._order_margin = None - self._available = None - self._point = None - self._currency = None - self._in_dual_mode = None - self._enable_credit = None - self._position_initial_margin = None - self._maintenance_margin = None - self._bonus = None - self._enable_evolved_classic = None - self._cross_order_margin = None - self._cross_initial_margin = None - self._cross_maintenance_margin = None - self._cross_unrealised_pnl = None - self._cross_available = None - self._cross_margin_balance = None - self._cross_mmr = None - self._cross_imr = None - self._isolated_position_margin = None - self._enable_new_dual_mode = None - self._margin_mode = None - self._history = None - self.discriminator = None - - if total is not None: - self.total = total - if unrealised_pnl is not None: - self.unrealised_pnl = unrealised_pnl - if position_margin is not None: - self.position_margin = position_margin - if order_margin is not None: - self.order_margin = order_margin - if available is not None: - self.available = available - if point is not None: - self.point = point - if currency is not None: - self.currency = currency - if in_dual_mode is not None: - self.in_dual_mode = in_dual_mode - if enable_credit is not None: - self.enable_credit = enable_credit - if position_initial_margin is not None: - self.position_initial_margin = position_initial_margin - if maintenance_margin is not None: - self.maintenance_margin = maintenance_margin - if bonus is not None: - self.bonus = bonus - if enable_evolved_classic is not None: - self.enable_evolved_classic = enable_evolved_classic - if cross_order_margin is not None: - self.cross_order_margin = cross_order_margin - if cross_initial_margin is not None: - self.cross_initial_margin = cross_initial_margin - if cross_maintenance_margin is not None: - self.cross_maintenance_margin = cross_maintenance_margin - if cross_unrealised_pnl is not None: - self.cross_unrealised_pnl = cross_unrealised_pnl - if cross_available is not None: - self.cross_available = cross_available - if cross_margin_balance is not None: - self.cross_margin_balance = cross_margin_balance - if cross_mmr is not None: - self.cross_mmr = cross_mmr - if cross_imr is not None: - self.cross_imr = cross_imr - if isolated_position_margin is not None: - self.isolated_position_margin = isolated_position_margin - if enable_new_dual_mode is not None: - self.enable_new_dual_mode = enable_new_dual_mode - if margin_mode is not None: - self.margin_mode = margin_mode - if history is not None: - self.history = history - - @property - def total(self): - """Gets the total of this FuturesAccount. # noqa: E501 - - total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) # noqa: E501 - - :return: The total of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this FuturesAccount. - - total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) # noqa: E501 - - :param total: The total of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def unrealised_pnl(self): - """Gets the unrealised_pnl of this FuturesAccount. # noqa: E501 - - Unrealized PNL # noqa: E501 - - :return: The unrealised_pnl of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._unrealised_pnl - - @unrealised_pnl.setter - def unrealised_pnl(self, unrealised_pnl): - """Sets the unrealised_pnl of this FuturesAccount. - - Unrealized PNL # noqa: E501 - - :param unrealised_pnl: The unrealised_pnl of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._unrealised_pnl = unrealised_pnl - - @property - def position_margin(self): - """Gets the position_margin of this FuturesAccount. # noqa: E501 - - Position margin # noqa: E501 - - :return: The position_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._position_margin - - @position_margin.setter - def position_margin(self, position_margin): - """Sets the position_margin of this FuturesAccount. - - Position margin # noqa: E501 - - :param position_margin: The position_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._position_margin = position_margin - - @property - def order_margin(self): - """Gets the order_margin of this FuturesAccount. # noqa: E501 - - Order margin of unfinished orders # noqa: E501 - - :return: The order_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._order_margin - - @order_margin.setter - def order_margin(self, order_margin): - """Sets the order_margin of this FuturesAccount. - - Order margin of unfinished orders # noqa: E501 - - :param order_margin: The order_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._order_margin = order_margin - - @property - def available(self): - """Gets the available of this FuturesAccount. # noqa: E501 - - The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 - - :return: The available of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this FuturesAccount. - - The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 - - :param available: The available of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def point(self): - """Gets the point of this FuturesAccount. # noqa: E501 - - POINT amount # noqa: E501 - - :return: The point of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._point - - @point.setter - def point(self, point): - """Sets the point of this FuturesAccount. - - POINT amount # noqa: E501 - - :param point: The point of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._point = point - - @property - def currency(self): - """Gets the currency of this FuturesAccount. # noqa: E501 - - Settle currency # noqa: E501 - - :return: The currency of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this FuturesAccount. - - Settle currency # noqa: E501 - - :param currency: The currency of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def in_dual_mode(self): - """Gets the in_dual_mode of this FuturesAccount. # noqa: E501 - - Whether dual mode is enabled # noqa: E501 - - :return: The in_dual_mode of this FuturesAccount. # noqa: E501 - :rtype: bool - """ - return self._in_dual_mode - - @in_dual_mode.setter - def in_dual_mode(self, in_dual_mode): - """Sets the in_dual_mode of this FuturesAccount. - - Whether dual mode is enabled # noqa: E501 - - :param in_dual_mode: The in_dual_mode of this FuturesAccount. # noqa: E501 - :type: bool - """ - - self._in_dual_mode = in_dual_mode - - @property - def enable_credit(self): - """Gets the enable_credit of this FuturesAccount. # noqa: E501 - - Whether portfolio margin account mode is enabled # noqa: E501 - - :return: The enable_credit of this FuturesAccount. # noqa: E501 - :rtype: bool - """ - return self._enable_credit - - @enable_credit.setter - def enable_credit(self, enable_credit): - """Sets the enable_credit of this FuturesAccount. - - Whether portfolio margin account mode is enabled # noqa: E501 - - :param enable_credit: The enable_credit of this FuturesAccount. # noqa: E501 - :type: bool - """ - - self._enable_credit = enable_credit - - @property - def position_initial_margin(self): - """Gets the position_initial_margin of this FuturesAccount. # noqa: E501 - - Initial margin position, applicable to the portfolio margin account model # noqa: E501 - - :return: The position_initial_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._position_initial_margin - - @position_initial_margin.setter - def position_initial_margin(self, position_initial_margin): - """Sets the position_initial_margin of this FuturesAccount. - - Initial margin position, applicable to the portfolio margin account model # noqa: E501 - - :param position_initial_margin: The position_initial_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._position_initial_margin = position_initial_margin - - @property - def maintenance_margin(self): - """Gets the maintenance_margin of this FuturesAccount. # noqa: E501 - - The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model # noqa: E501 - - :return: The maintenance_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._maintenance_margin - - @maintenance_margin.setter - def maintenance_margin(self, maintenance_margin): - """Sets the maintenance_margin of this FuturesAccount. - - The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model # noqa: E501 - - :param maintenance_margin: The maintenance_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._maintenance_margin = maintenance_margin - - @property - def bonus(self): - """Gets the bonus of this FuturesAccount. # noqa: E501 - - Perpetual Contract Bonus # noqa: E501 - - :return: The bonus of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._bonus - - @bonus.setter - def bonus(self, bonus): - """Sets the bonus of this FuturesAccount. - - Perpetual Contract Bonus # noqa: E501 - - :param bonus: The bonus of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._bonus = bonus - - @property - def enable_evolved_classic(self): - """Gets the enable_evolved_classic of this FuturesAccount. # noqa: E501 - - Classic account margin mode, true-new mode, false-old mode # noqa: E501 - - :return: The enable_evolved_classic of this FuturesAccount. # noqa: E501 - :rtype: bool - """ - return self._enable_evolved_classic - - @enable_evolved_classic.setter - def enable_evolved_classic(self, enable_evolved_classic): - """Sets the enable_evolved_classic of this FuturesAccount. - - Classic account margin mode, true-new mode, false-old mode # noqa: E501 - - :param enable_evolved_classic: The enable_evolved_classic of this FuturesAccount. # noqa: E501 - :type: bool - """ - - self._enable_evolved_classic = enable_evolved_classic - - @property - def cross_order_margin(self): - """Gets the cross_order_margin of this FuturesAccount. # noqa: E501 - - Full -warehouse hanging order deposit, suitable for the new classic account margin model # noqa: E501 - - :return: The cross_order_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_order_margin - - @cross_order_margin.setter - def cross_order_margin(self, cross_order_margin): - """Sets the cross_order_margin of this FuturesAccount. - - Full -warehouse hanging order deposit, suitable for the new classic account margin model # noqa: E501 - - :param cross_order_margin: The cross_order_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_order_margin = cross_order_margin - - @property - def cross_initial_margin(self): - """Gets the cross_initial_margin of this FuturesAccount. # noqa: E501 - - The initial security deposit of the full warehouse is suitable for the new classic account margin model # noqa: E501 - - :return: The cross_initial_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_initial_margin - - @cross_initial_margin.setter - def cross_initial_margin(self, cross_initial_margin): - """Sets the cross_initial_margin of this FuturesAccount. - - The initial security deposit of the full warehouse is suitable for the new classic account margin model # noqa: E501 - - :param cross_initial_margin: The cross_initial_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_initial_margin = cross_initial_margin - - @property - def cross_maintenance_margin(self): - """Gets the cross_maintenance_margin of this FuturesAccount. # noqa: E501 - - Maintain deposit in full warehouse, suitable for new classic account margin models # noqa: E501 - - :return: The cross_maintenance_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_maintenance_margin - - @cross_maintenance_margin.setter - def cross_maintenance_margin(self, cross_maintenance_margin): - """Sets the cross_maintenance_margin of this FuturesAccount. - - Maintain deposit in full warehouse, suitable for new classic account margin models # noqa: E501 - - :param cross_maintenance_margin: The cross_maintenance_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_maintenance_margin = cross_maintenance_margin - - @property - def cross_unrealised_pnl(self): - """Gets the cross_unrealised_pnl of this FuturesAccount. # noqa: E501 - - The full warehouse does not achieve profit and loss, suitable for the new classic account margin model # noqa: E501 - - :return: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_unrealised_pnl - - @cross_unrealised_pnl.setter - def cross_unrealised_pnl(self, cross_unrealised_pnl): - """Sets the cross_unrealised_pnl of this FuturesAccount. - - The full warehouse does not achieve profit and loss, suitable for the new classic account margin model # noqa: E501 - - :param cross_unrealised_pnl: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_unrealised_pnl = cross_unrealised_pnl - - @property - def cross_available(self): - """Gets the cross_available of this FuturesAccount. # noqa: E501 - - Full warehouse available amount, suitable for the new classic account margin model # noqa: E501 - - :return: The cross_available of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_available - - @cross_available.setter - def cross_available(self, cross_available): - """Sets the cross_available of this FuturesAccount. - - Full warehouse available amount, suitable for the new classic account margin model # noqa: E501 - - :param cross_available: The cross_available of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_available = cross_available - - @property - def cross_margin_balance(self): - """Gets the cross_margin_balance of this FuturesAccount. # noqa: E501 - - Full margin balance, suitable for the new classic account margin model # noqa: E501 - - :return: The cross_margin_balance of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_margin_balance - - @cross_margin_balance.setter - def cross_margin_balance(self, cross_margin_balance): - """Sets the cross_margin_balance of this FuturesAccount. - - Full margin balance, suitable for the new classic account margin model # noqa: E501 - - :param cross_margin_balance: The cross_margin_balance of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_margin_balance = cross_margin_balance - - @property - def cross_mmr(self): - """Gets the cross_mmr of this FuturesAccount. # noqa: E501 - - Maintain margin ratio for the full position, suitable for the new classic account margin model # noqa: E501 - - :return: The cross_mmr of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_mmr - - @cross_mmr.setter - def cross_mmr(self, cross_mmr): - """Sets the cross_mmr of this FuturesAccount. - - Maintain margin ratio for the full position, suitable for the new classic account margin model # noqa: E501 - - :param cross_mmr: The cross_mmr of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_mmr = cross_mmr - - @property - def cross_imr(self): - """Gets the cross_imr of this FuturesAccount. # noqa: E501 - - The initial margin rate of the full position is suitable for the new classic account margin model # noqa: E501 - - :return: The cross_imr of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._cross_imr - - @cross_imr.setter - def cross_imr(self, cross_imr): - """Sets the cross_imr of this FuturesAccount. - - The initial margin rate of the full position is suitable for the new classic account margin model # noqa: E501 - - :param cross_imr: The cross_imr of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._cross_imr = cross_imr - - @property - def isolated_position_margin(self): - """Gets the isolated_position_margin of this FuturesAccount. # noqa: E501 - - Ware -position margin, suitable for the new classic account margin model # noqa: E501 - - :return: The isolated_position_margin of this FuturesAccount. # noqa: E501 - :rtype: str - """ - return self._isolated_position_margin - - @isolated_position_margin.setter - def isolated_position_margin(self, isolated_position_margin): - """Sets the isolated_position_margin of this FuturesAccount. - - Ware -position margin, suitable for the new classic account margin model # noqa: E501 - - :param isolated_position_margin: The isolated_position_margin of this FuturesAccount. # noqa: E501 - :type: str - """ - - self._isolated_position_margin = isolated_position_margin - - @property - def enable_new_dual_mode(self): - """Gets the enable_new_dual_mode of this FuturesAccount. # noqa: E501 - - Whether to open a new two-way position mode # noqa: E501 - - :return: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 - :rtype: bool - """ - return self._enable_new_dual_mode - - @enable_new_dual_mode.setter - def enable_new_dual_mode(self, enable_new_dual_mode): - """Sets the enable_new_dual_mode of this FuturesAccount. - - Whether to open a new two-way position mode # noqa: E501 - - :param enable_new_dual_mode: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 - :type: bool - """ - - self._enable_new_dual_mode = enable_new_dual_mode - - @property - def margin_mode(self): - """Gets the margin_mode of this FuturesAccount. # noqa: E501 - - Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode # noqa: E501 - - :return: The margin_mode of this FuturesAccount. # noqa: E501 - :rtype: int - """ - return self._margin_mode - - @margin_mode.setter - def margin_mode(self, margin_mode): - """Sets the margin_mode of this FuturesAccount. - - Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode # noqa: E501 - - :param margin_mode: The margin_mode of this FuturesAccount. # noqa: E501 - :type: int - """ - - self._margin_mode = margin_mode - - @property - def history(self): - """Gets the history of this FuturesAccount. # noqa: E501 - - - :return: The history of this FuturesAccount. # noqa: E501 - :rtype: FuturesAccountHistory - """ - return self._history - - @history.setter - def history(self, history): - """Sets the history of this FuturesAccount. - - - :param history: The history of this FuturesAccount. # noqa: E501 - :type: FuturesAccountHistory - """ - - self._history = history - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py deleted file mode 100644 index 558f5e9..0000000 --- a/gate_api/models/futures_account_book.py +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesAccountBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'float', - 'change': 'str', - 'balance': 'str', - 'type': 'str', - 'text': 'str', - 'contract': 'str', - 'trade_id': 'str', - 'id': 'str' - } - - attribute_map = { - 'time': 'time', - 'change': 'change', - 'balance': 'balance', - 'type': 'type', - 'text': 'text', - 'contract': 'contract', - 'trade_id': 'trade_id', - 'id': 'id' - } - - def __init__(self, time=None, change=None, balance=None, type=None, text=None, contract=None, trade_id=None, id=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, str, str, str, str, str, str, Configuration) -> None - """FuturesAccountBook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._change = None - self._balance = None - self._type = None - self._text = None - self._contract = None - self._trade_id = None - self._id = None - self.discriminator = None - - if time is not None: - self.time = time - if change is not None: - self.change = change - if balance is not None: - self.balance = balance - if type is not None: - self.type = type - if text is not None: - self.text = text - if contract is not None: - self.contract = contract - if trade_id is not None: - self.trade_id = trade_id - if id is not None: - self.id = id - - @property - def time(self): - """Gets the time of this FuturesAccountBook. # noqa: E501 - - Change time # noqa: E501 - - :return: The time of this FuturesAccountBook. # noqa: E501 - :rtype: float - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this FuturesAccountBook. - - Change time # noqa: E501 - - :param time: The time of this FuturesAccountBook. # noqa: E501 - :type: float - """ - - self._time = time - - @property - def change(self): - """Gets the change of this FuturesAccountBook. # noqa: E501 - - Change amount # noqa: E501 - - :return: The change of this FuturesAccountBook. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this FuturesAccountBook. - - Change amount # noqa: E501 - - :param change: The change of this FuturesAccountBook. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def balance(self): - """Gets the balance of this FuturesAccountBook. # noqa: E501 - - Balance after change # noqa: E501 - - :return: The balance of this FuturesAccountBook. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this FuturesAccountBook. - - Balance after change # noqa: E501 - - :param balance: The balance of this FuturesAccountBook. # noqa: E501 - :type: str - """ - - self._balance = balance - - @property - def type(self): - """Gets the type of this FuturesAccountBook. # noqa: E501 - - Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 - - :return: The type of this FuturesAccountBook. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this FuturesAccountBook. - - Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 - - :param type: The type of this FuturesAccountBook. # noqa: E501 - :type: str - """ - allowed_values = ["dnw", "pnl", "fee", "refr", "fund", "point_dnw", "point_fee", "point_refr", "bonus_offset"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def text(self): - """Gets the text of this FuturesAccountBook. # noqa: E501 - - Comment # noqa: E501 - - :return: The text of this FuturesAccountBook. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this FuturesAccountBook. - - Comment # noqa: E501 - - :param text: The text of this FuturesAccountBook. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def contract(self): - """Gets the contract of this FuturesAccountBook. # noqa: E501 - - Futures contract, the field is only available for data after 2023-10-30. # noqa: E501 - - :return: The contract of this FuturesAccountBook. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesAccountBook. - - Futures contract, the field is only available for data after 2023-10-30. # noqa: E501 - - :param contract: The contract of this FuturesAccountBook. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def trade_id(self): - """Gets the trade_id of this FuturesAccountBook. # noqa: E501 - - trade id # noqa: E501 - - :return: The trade_id of this FuturesAccountBook. # noqa: E501 - :rtype: str - """ - return self._trade_id - - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this FuturesAccountBook. - - trade id # noqa: E501 - - :param trade_id: The trade_id of this FuturesAccountBook. # noqa: E501 - :type: str - """ - - self._trade_id = trade_id - - @property - def id(self): - """Gets the id of this FuturesAccountBook. # noqa: E501 - - 账户变更记录 id # noqa: E501 - - :return: The id of this FuturesAccountBook. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FuturesAccountBook. - - 账户变更记录 id # noqa: E501 - - :param id: The id of this FuturesAccountBook. # noqa: E501 - :type: str - """ - - self._id = id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesAccountBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesAccountBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py deleted file mode 100644 index 86fa0c3..0000000 --- a/gate_api/models/futures_account_history.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesAccountHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'dnw': 'str', - 'pnl': 'str', - 'fee': 'str', - 'refr': 'str', - 'fund': 'str', - 'point_dnw': 'str', - 'point_fee': 'str', - 'point_refr': 'str', - 'bonus_dnw': 'str', - 'bonus_offset': 'str' - } - - attribute_map = { - 'dnw': 'dnw', - 'pnl': 'pnl', - 'fee': 'fee', - 'refr': 'refr', - 'fund': 'fund', - 'point_dnw': 'point_dnw', - 'point_fee': 'point_fee', - 'point_refr': 'point_refr', - 'bonus_dnw': 'bonus_dnw', - 'bonus_offset': 'bonus_offset' - } - - def __init__(self, dnw=None, pnl=None, fee=None, refr=None, fund=None, point_dnw=None, point_fee=None, point_refr=None, bonus_dnw=None, bonus_offset=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """FuturesAccountHistory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._dnw = None - self._pnl = None - self._fee = None - self._refr = None - self._fund = None - self._point_dnw = None - self._point_fee = None - self._point_refr = None - self._bonus_dnw = None - self._bonus_offset = None - self.discriminator = None - - if dnw is not None: - self.dnw = dnw - if pnl is not None: - self.pnl = pnl - if fee is not None: - self.fee = fee - if refr is not None: - self.refr = refr - if fund is not None: - self.fund = fund - if point_dnw is not None: - self.point_dnw = point_dnw - if point_fee is not None: - self.point_fee = point_fee - if point_refr is not None: - self.point_refr = point_refr - if bonus_dnw is not None: - self.bonus_dnw = bonus_dnw - if bonus_offset is not None: - self.bonus_offset = bonus_offset - - @property - def dnw(self): - """Gets the dnw of this FuturesAccountHistory. # noqa: E501 - - total amount of deposit and withdraw # noqa: E501 - - :return: The dnw of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._dnw - - @dnw.setter - def dnw(self, dnw): - """Sets the dnw of this FuturesAccountHistory. - - total amount of deposit and withdraw # noqa: E501 - - :param dnw: The dnw of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._dnw = dnw - - @property - def pnl(self): - """Gets the pnl of this FuturesAccountHistory. # noqa: E501 - - total amount of trading profit and loss # noqa: E501 - - :return: The pnl of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._pnl - - @pnl.setter - def pnl(self, pnl): - """Sets the pnl of this FuturesAccountHistory. - - total amount of trading profit and loss # noqa: E501 - - :param pnl: The pnl of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._pnl = pnl - - @property - def fee(self): - """Gets the fee of this FuturesAccountHistory. # noqa: E501 - - total amount of fee # noqa: E501 - - :return: The fee of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this FuturesAccountHistory. - - total amount of fee # noqa: E501 - - :param fee: The fee of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def refr(self): - """Gets the refr of this FuturesAccountHistory. # noqa: E501 - - total amount of referrer rebates # noqa: E501 - - :return: The refr of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._refr - - @refr.setter - def refr(self, refr): - """Sets the refr of this FuturesAccountHistory. - - total amount of referrer rebates # noqa: E501 - - :param refr: The refr of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._refr = refr - - @property - def fund(self): - """Gets the fund of this FuturesAccountHistory. # noqa: E501 - - total amount of funding costs # noqa: E501 - - :return: The fund of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._fund - - @fund.setter - def fund(self, fund): - """Sets the fund of this FuturesAccountHistory. - - total amount of funding costs # noqa: E501 - - :param fund: The fund of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._fund = fund - - @property - def point_dnw(self): - """Gets the point_dnw of this FuturesAccountHistory. # noqa: E501 - - total amount of point deposit and withdraw # noqa: E501 - - :return: The point_dnw of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._point_dnw - - @point_dnw.setter - def point_dnw(self, point_dnw): - """Sets the point_dnw of this FuturesAccountHistory. - - total amount of point deposit and withdraw # noqa: E501 - - :param point_dnw: The point_dnw of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._point_dnw = point_dnw - - @property - def point_fee(self): - """Gets the point_fee of this FuturesAccountHistory. # noqa: E501 - - total amount of point fee # noqa: E501 - - :return: The point_fee of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._point_fee - - @point_fee.setter - def point_fee(self, point_fee): - """Sets the point_fee of this FuturesAccountHistory. - - total amount of point fee # noqa: E501 - - :param point_fee: The point_fee of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._point_fee = point_fee - - @property - def point_refr(self): - """Gets the point_refr of this FuturesAccountHistory. # noqa: E501 - - total amount of referrer rebates of point fee # noqa: E501 - - :return: The point_refr of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._point_refr - - @point_refr.setter - def point_refr(self, point_refr): - """Sets the point_refr of this FuturesAccountHistory. - - total amount of referrer rebates of point fee # noqa: E501 - - :param point_refr: The point_refr of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._point_refr = point_refr - - @property - def bonus_dnw(self): - """Gets the bonus_dnw of this FuturesAccountHistory. # noqa: E501 - - total amount of perpetual contract bonus transfer # noqa: E501 - - :return: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._bonus_dnw - - @bonus_dnw.setter - def bonus_dnw(self, bonus_dnw): - """Sets the bonus_dnw of this FuturesAccountHistory. - - total amount of perpetual contract bonus transfer # noqa: E501 - - :param bonus_dnw: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._bonus_dnw = bonus_dnw - - @property - def bonus_offset(self): - """Gets the bonus_offset of this FuturesAccountHistory. # noqa: E501 - - total amount of perpetual contract bonus deduction # noqa: E501 - - :return: The bonus_offset of this FuturesAccountHistory. # noqa: E501 - :rtype: str - """ - return self._bonus_offset - - @bonus_offset.setter - def bonus_offset(self, bonus_offset): - """Sets the bonus_offset of this FuturesAccountHistory. - - total amount of perpetual contract bonus deduction # noqa: E501 - - :param bonus_offset: The bonus_offset of this FuturesAccountHistory. # noqa: E501 - :type: str - """ - - self._bonus_offset = bonus_offset - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesAccountHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesAccountHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py deleted file mode 100644 index 2a70fbf..0000000 --- a/gate_api/models/futures_auto_deleverage.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesAutoDeleverage(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'int', - 'user': 'int', - 'order_id': 'int', - 'contract': 'str', - 'leverage': 'str', - 'cross_leverage_limit': 'str', - 'entry_price': 'str', - 'fill_price': 'str', - 'trade_size': 'int', - 'position_size': 'int' - } - - attribute_map = { - 'time': 'time', - 'user': 'user', - 'order_id': 'order_id', - 'contract': 'contract', - 'leverage': 'leverage', - 'cross_leverage_limit': 'cross_leverage_limit', - 'entry_price': 'entry_price', - 'fill_price': 'fill_price', - 'trade_size': 'trade_size', - 'position_size': 'position_size' - } - - def __init__(self, time=None, user=None, order_id=None, contract=None, leverage=None, cross_leverage_limit=None, entry_price=None, fill_price=None, trade_size=None, position_size=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, str, str, str, str, str, int, int, Configuration) -> None - """FuturesAutoDeleverage - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._user = None - self._order_id = None - self._contract = None - self._leverage = None - self._cross_leverage_limit = None - self._entry_price = None - self._fill_price = None - self._trade_size = None - self._position_size = None - self.discriminator = None - - if time is not None: - self.time = time - if user is not None: - self.user = user - if order_id is not None: - self.order_id = order_id - if contract is not None: - self.contract = contract - if leverage is not None: - self.leverage = leverage - if cross_leverage_limit is not None: - self.cross_leverage_limit = cross_leverage_limit - if entry_price is not None: - self.entry_price = entry_price - if fill_price is not None: - self.fill_price = fill_price - if trade_size is not None: - self.trade_size = trade_size - if position_size is not None: - self.position_size = position_size - - @property - def time(self): - """Gets the time of this FuturesAutoDeleverage. # noqa: E501 - - Automatic deleveraging time # noqa: E501 - - :return: The time of this FuturesAutoDeleverage. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this FuturesAutoDeleverage. - - Automatic deleveraging time # noqa: E501 - - :param time: The time of this FuturesAutoDeleverage. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def user(self): - """Gets the user of this FuturesAutoDeleverage. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this FuturesAutoDeleverage. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this FuturesAutoDeleverage. - - User ID # noqa: E501 - - :param user: The user of this FuturesAutoDeleverage. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def order_id(self): - """Gets the order_id of this FuturesAutoDeleverage. # noqa: E501 - - Order ID. Order IDs before 2023-02-20 are null # noqa: E501 - - :return: The order_id of this FuturesAutoDeleverage. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this FuturesAutoDeleverage. - - Order ID. Order IDs before 2023-02-20 are null # noqa: E501 - - :param order_id: The order_id of this FuturesAutoDeleverage. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def contract(self): - """Gets the contract of this FuturesAutoDeleverage. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this FuturesAutoDeleverage. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesAutoDeleverage. - - Futures contract # noqa: E501 - - :param contract: The contract of this FuturesAutoDeleverage. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def leverage(self): - """Gets the leverage of this FuturesAutoDeleverage. # noqa: E501 - - Position leverage # noqa: E501 - - :return: The leverage of this FuturesAutoDeleverage. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this FuturesAutoDeleverage. - - Position leverage # noqa: E501 - - :param leverage: The leverage of this FuturesAutoDeleverage. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def cross_leverage_limit(self): - """Gets the cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 - - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 - - :return: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 - :rtype: str - """ - return self._cross_leverage_limit - - @cross_leverage_limit.setter - def cross_leverage_limit(self, cross_leverage_limit): - """Sets the cross_leverage_limit of this FuturesAutoDeleverage. - - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 - - :param cross_leverage_limit: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 - :type: str - """ - - self._cross_leverage_limit = cross_leverage_limit - - @property - def entry_price(self): - """Gets the entry_price of this FuturesAutoDeleverage. # noqa: E501 - - Average entry price # noqa: E501 - - :return: The entry_price of this FuturesAutoDeleverage. # noqa: E501 - :rtype: str - """ - return self._entry_price - - @entry_price.setter - def entry_price(self, entry_price): - """Sets the entry_price of this FuturesAutoDeleverage. - - Average entry price # noqa: E501 - - :param entry_price: The entry_price of this FuturesAutoDeleverage. # noqa: E501 - :type: str - """ - - self._entry_price = entry_price - - @property - def fill_price(self): - """Gets the fill_price of this FuturesAutoDeleverage. # noqa: E501 - - Average fill price # noqa: E501 - - :return: The fill_price of this FuturesAutoDeleverage. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this FuturesAutoDeleverage. - - Average fill price # noqa: E501 - - :param fill_price: The fill_price of this FuturesAutoDeleverage. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def trade_size(self): - """Gets the trade_size of this FuturesAutoDeleverage. # noqa: E501 - - Trading size # noqa: E501 - - :return: The trade_size of this FuturesAutoDeleverage. # noqa: E501 - :rtype: int - """ - return self._trade_size - - @trade_size.setter - def trade_size(self, trade_size): - """Sets the trade_size of this FuturesAutoDeleverage. - - Trading size # noqa: E501 - - :param trade_size: The trade_size of this FuturesAutoDeleverage. # noqa: E501 - :type: int - """ - - self._trade_size = trade_size - - @property - def position_size(self): - """Gets the position_size of this FuturesAutoDeleverage. # noqa: E501 - - Positions after auto-deleveraging # noqa: E501 - - :return: The position_size of this FuturesAutoDeleverage. # noqa: E501 - :rtype: int - """ - return self._position_size - - @position_size.setter - def position_size(self, position_size): - """Sets the position_size of this FuturesAutoDeleverage. - - Positions after auto-deleveraging # noqa: E501 - - :param position_size: The position_size of this FuturesAutoDeleverage. # noqa: E501 - :type: int - """ - - self._position_size = position_size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesAutoDeleverage): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesAutoDeleverage): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py deleted file mode 100644 index a421bca..0000000 --- a/gate_api/models/futures_batch_amend_order_request.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesBatchAmendOrderRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'text': 'str', - 'size': 'int', - 'price': 'str', - 'amend_text': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'text': 'text', - 'size': 'size', - 'price': 'price', - 'amend_text': 'amend_text' - } - - def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, str, str, Configuration) -> None - """FuturesBatchAmendOrderRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._text = None - self._size = None - self._price = None - self._amend_text = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if text is not None: - self.text = text - if size is not None: - self.size = size - if price is not None: - self.price = price - if amend_text is not None: - self.amend_text = amend_text - - @property - def order_id(self): - """Gets the order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 - - Order id, order_id and text must contain at least one # noqa: E501 - - :return: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this FuturesBatchAmendOrderRequest. - - Order id, order_id and text must contain at least one # noqa: E501 - - :param order_id: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def text(self): - """Gets the text of this FuturesBatchAmendOrderRequest. # noqa: E501 - - User-defined order text, at least one of order_id and text must be passed # noqa: E501 - - :return: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this FuturesBatchAmendOrderRequest. - - User-defined order text, at least one of order_id and text must be passed # noqa: E501 - - :param text: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def size(self): - """Gets the size of this FuturesBatchAmendOrderRequest. # noqa: E501 - - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 - - :return: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FuturesBatchAmendOrderRequest. - - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 - - :param size: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def price(self): - """Gets the price of this FuturesBatchAmendOrderRequest. # noqa: E501 - - New order price. # noqa: E501 - - :return: The price of this FuturesBatchAmendOrderRequest. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FuturesBatchAmendOrderRequest. - - New order price. # noqa: E501 - - :param price: The price of this FuturesBatchAmendOrderRequest. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def amend_text(self): - """Gets the amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 - - Custom info during amending order # noqa: E501 - - :return: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this FuturesBatchAmendOrderRequest. - - Custom info during amending order # noqa: E501 - - :param amend_text: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesBatchAmendOrderRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesBatchAmendOrderRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py deleted file mode 100644 index 70af555..0000000 --- a/gate_api/models/futures_candlestick.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesCandlestick(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 't': 'float', - 'v': 'int', - 'c': 'str', - 'h': 'str', - 'l': 'str', - 'o': 'str', - 'sum': 'str' - } - - attribute_map = { - 't': 't', - 'v': 'v', - 'c': 'c', - 'h': 'h', - 'l': 'l', - 'o': 'o', - 'sum': 'sum' - } - - def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, sum=None, local_vars_configuration=None): # noqa: E501 - # type: (float, int, str, str, str, str, str, Configuration) -> None - """FuturesCandlestick - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._t = None - self._v = None - self._c = None - self._h = None - self._l = None - self._o = None - self._sum = None - self.discriminator = None - - if t is not None: - self.t = t - if v is not None: - self.v = v - if c is not None: - self.c = c - if h is not None: - self.h = h - if l is not None: - self.l = l - if o is not None: - self.o = o - if sum is not None: - self.sum = sum - - @property - def t(self): - """Gets the t of this FuturesCandlestick. # noqa: E501 - - Unix timestamp in seconds # noqa: E501 - - :return: The t of this FuturesCandlestick. # noqa: E501 - :rtype: float - """ - return self._t - - @t.setter - def t(self, t): - """Sets the t of this FuturesCandlestick. - - Unix timestamp in seconds # noqa: E501 - - :param t: The t of this FuturesCandlestick. # noqa: E501 - :type: float - """ - - self._t = t - - @property - def v(self): - """Gets the v of this FuturesCandlestick. # noqa: E501 - - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 - - :return: The v of this FuturesCandlestick. # noqa: E501 - :rtype: int - """ - return self._v - - @v.setter - def v(self, v): - """Sets the v of this FuturesCandlestick. - - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 - - :param v: The v of this FuturesCandlestick. # noqa: E501 - :type: int - """ - - self._v = v - - @property - def c(self): - """Gets the c of this FuturesCandlestick. # noqa: E501 - - Close price (quote currency) # noqa: E501 - - :return: The c of this FuturesCandlestick. # noqa: E501 - :rtype: str - """ - return self._c - - @c.setter - def c(self, c): - """Sets the c of this FuturesCandlestick. - - Close price (quote currency) # noqa: E501 - - :param c: The c of this FuturesCandlestick. # noqa: E501 - :type: str - """ - - self._c = c - - @property - def h(self): - """Gets the h of this FuturesCandlestick. # noqa: E501 - - Highest price (quote currency) # noqa: E501 - - :return: The h of this FuturesCandlestick. # noqa: E501 - :rtype: str - """ - return self._h - - @h.setter - def h(self, h): - """Sets the h of this FuturesCandlestick. - - Highest price (quote currency) # noqa: E501 - - :param h: The h of this FuturesCandlestick. # noqa: E501 - :type: str - """ - - self._h = h - - @property - def l(self): - """Gets the l of this FuturesCandlestick. # noqa: E501 - - Lowest price (quote currency) # noqa: E501 - - :return: The l of this FuturesCandlestick. # noqa: E501 - :rtype: str - """ - return self._l - - @l.setter - def l(self, l): - """Sets the l of this FuturesCandlestick. - - Lowest price (quote currency) # noqa: E501 - - :param l: The l of this FuturesCandlestick. # noqa: E501 - :type: str - """ - - self._l = l - - @property - def o(self): - """Gets the o of this FuturesCandlestick. # noqa: E501 - - Open price (quote currency) # noqa: E501 - - :return: The o of this FuturesCandlestick. # noqa: E501 - :rtype: str - """ - return self._o - - @o.setter - def o(self, o): - """Sets the o of this FuturesCandlestick. - - Open price (quote currency) # noqa: E501 - - :param o: The o of this FuturesCandlestick. # noqa: E501 - :type: str - """ - - self._o = o - - @property - def sum(self): - """Gets the sum of this FuturesCandlestick. # noqa: E501 - - Trading volume (unit: Quote currency) # noqa: E501 - - :return: The sum of this FuturesCandlestick. # noqa: E501 - :rtype: str - """ - return self._sum - - @sum.setter - def sum(self, sum): - """Sets the sum of this FuturesCandlestick. - - Trading volume (unit: Quote currency) # noqa: E501 - - :param sum: The sum of this FuturesCandlestick. # noqa: E501 - :type: str - """ - - self._sum = sum - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesCandlestick): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesCandlestick): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py deleted file mode 100644 index a05f42e..0000000 --- a/gate_api/models/futures_fee.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesFee(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'taker_fee': 'str', - 'maker_fee': 'str' - } - - attribute_map = { - 'taker_fee': 'taker_fee', - 'maker_fee': 'maker_fee' - } - - def __init__(self, taker_fee=None, maker_fee=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """FuturesFee - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._taker_fee = None - self._maker_fee = None - self.discriminator = None - - if taker_fee is not None: - self.taker_fee = taker_fee - if maker_fee is not None: - self.maker_fee = maker_fee - - @property - def taker_fee(self): - """Gets the taker_fee of this FuturesFee. # noqa: E501 - - Taker fee # noqa: E501 - - :return: The taker_fee of this FuturesFee. # noqa: E501 - :rtype: str - """ - return self._taker_fee - - @taker_fee.setter - def taker_fee(self, taker_fee): - """Sets the taker_fee of this FuturesFee. - - Taker fee # noqa: E501 - - :param taker_fee: The taker_fee of this FuturesFee. # noqa: E501 - :type: str - """ - - self._taker_fee = taker_fee - - @property - def maker_fee(self): - """Gets the maker_fee of this FuturesFee. # noqa: E501 - - maker fee # noqa: E501 - - :return: The maker_fee of this FuturesFee. # noqa: E501 - :rtype: str - """ - return self._maker_fee - - @maker_fee.setter - def maker_fee(self, maker_fee): - """Sets the maker_fee of this FuturesFee. - - maker fee # noqa: E501 - - :param maker_fee: The maker_fee of this FuturesFee. # noqa: E501 - :type: str - """ - - self._maker_fee = maker_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, FuturesFee): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesFee): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py deleted file mode 100644 index d0a158d..0000000 --- a/gate_api/models/futures_index_constituents.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesIndexConstituents(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'index': 'str', - 'constituents': 'list[IndexConstituent]' - } - - attribute_map = { - 'index': 'index', - 'constituents': 'constituents' - } - - def __init__(self, index=None, constituents=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[IndexConstituent], Configuration) -> None - """FuturesIndexConstituents - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._index = None - self._constituents = None - self.discriminator = None - - if index is not None: - self.index = index - if constituents is not None: - self.constituents = constituents - - @property - def index(self): - """Gets the index of this FuturesIndexConstituents. # noqa: E501 - - Index name # noqa: E501 - - :return: The index of this FuturesIndexConstituents. # noqa: E501 - :rtype: str - """ - return self._index - - @index.setter - def index(self, index): - """Sets the index of this FuturesIndexConstituents. - - Index name # noqa: E501 - - :param index: The index of this FuturesIndexConstituents. # noqa: E501 - :type: str - """ - - self._index = index - - @property - def constituents(self): - """Gets the constituents of this FuturesIndexConstituents. # noqa: E501 - - Constituents # noqa: E501 - - :return: The constituents of this FuturesIndexConstituents. # noqa: E501 - :rtype: list[IndexConstituent] - """ - return self._constituents - - @constituents.setter - def constituents(self, constituents): - """Sets the constituents of this FuturesIndexConstituents. - - Constituents # noqa: E501 - - :param constituents: The constituents of this FuturesIndexConstituents. # noqa: E501 - :type: list[IndexConstituent] - """ - - self._constituents = constituents - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesIndexConstituents): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesIndexConstituents): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py deleted file mode 100644 index ff355ca..0000000 --- a/gate_api/models/futures_initial_order.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesInitialOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'contract': 'str', - 'size': 'int', - 'price': 'str', - 'close': 'bool', - 'tif': 'str', - 'text': 'str', - 'reduce_only': 'bool', - 'auto_size': 'str', - 'is_reduce_only': 'bool', - 'is_close': 'bool' - } - - attribute_map = { - 'contract': 'contract', - 'size': 'size', - 'price': 'price', - 'close': 'close', - 'tif': 'tif', - 'text': 'text', - 'reduce_only': 'reduce_only', - 'auto_size': 'auto_size', - 'is_reduce_only': 'is_reduce_only', - 'is_close': 'is_close' - } - - def __init__(self, contract=None, size=None, price=None, close=False, tif='gtc', text=None, reduce_only=False, auto_size=None, is_reduce_only=None, is_close=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, bool, str, str, bool, str, bool, bool, Configuration) -> None - """FuturesInitialOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._contract = None - self._size = None - self._price = None - self._close = None - self._tif = None - self._text = None - self._reduce_only = None - self._auto_size = None - self._is_reduce_only = None - self._is_close = None - self.discriminator = None - - self.contract = contract - if size is not None: - self.size = size - self.price = price - if close is not None: - self.close = close - if tif is not None: - self.tif = tif - if text is not None: - self.text = text - if reduce_only is not None: - self.reduce_only = reduce_only - if auto_size is not None: - self.auto_size = auto_size - if is_reduce_only is not None: - self.is_reduce_only = is_reduce_only - if is_close is not None: - self.is_close = is_close - - @property - def contract(self): - """Gets the contract of this FuturesInitialOrder. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this FuturesInitialOrder. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesInitialOrder. - - Futures contract # noqa: E501 - - :param contract: The contract of this FuturesInitialOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 - raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 - - self._contract = contract - - @property - def size(self): - """Gets the size of this FuturesInitialOrder. # noqa: E501 - - Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 # noqa: E501 - - :return: The size of this FuturesInitialOrder. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FuturesInitialOrder. - - Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 # noqa: E501 - - :param size: The size of this FuturesInitialOrder. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def price(self): - """Gets the price of this FuturesInitialOrder. # noqa: E501 - - Order price. Set to 0 to use market price # noqa: E501 - - :return: The price of this FuturesInitialOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FuturesInitialOrder. - - Order price. Set to 0 to use market price # noqa: E501 - - :param price: The price of this FuturesInitialOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 - raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 - - self._price = price - - @property - def close(self): - """Gets the close of this FuturesInitialOrder. # noqa: E501 - - When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false # noqa: E501 - - :return: The close of this FuturesInitialOrder. # noqa: E501 - :rtype: bool - """ - return self._close - - @close.setter - def close(self, close): - """Sets the close of this FuturesInitialOrder. - - When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false # noqa: E501 - - :param close: The close of this FuturesInitialOrder. # noqa: E501 - :type: bool - """ - - self._close = close - - @property - def tif(self): - """Gets the tif of this FuturesInitialOrder. # noqa: E501 - - Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 - - :return: The tif of this FuturesInitialOrder. # noqa: E501 - :rtype: str - """ - return self._tif - - @tif.setter - def tif(self, tif): - """Sets the tif of this FuturesInitialOrder. - - Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 - - :param tif: The tif of this FuturesInitialOrder. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 - .format(tif, allowed_values) - ) - - self._tif = tif - - @property - def text(self): - """Gets the text of this FuturesInitialOrder. # noqa: E501 - - The source of the order, including: - web: web - api: api - app: app # noqa: E501 - - :return: The text of this FuturesInitialOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this FuturesInitialOrder. - - The source of the order, including: - web: web - api: api - app: app # noqa: E501 - - :param text: The text of this FuturesInitialOrder. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def reduce_only(self): - """Gets the reduce_only of this FuturesInitialOrder. # noqa: E501 - - When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions # noqa: E501 - - :return: The reduce_only of this FuturesInitialOrder. # noqa: E501 - :rtype: bool - """ - return self._reduce_only - - @reduce_only.setter - def reduce_only(self, reduce_only): - """Sets the reduce_only of this FuturesInitialOrder. - - When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions # noqa: E501 - - :param reduce_only: The reduce_only of this FuturesInitialOrder. # noqa: E501 - :type: bool - """ - - self._reduce_only = reduce_only - - @property - def auto_size(self): - """Gets the auto_size of this FuturesInitialOrder. # noqa: E501 - - Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size # noqa: E501 - - :return: The auto_size of this FuturesInitialOrder. # noqa: E501 - :rtype: str - """ - return self._auto_size - - @auto_size.setter - def auto_size(self, auto_size): - """Sets the auto_size of this FuturesInitialOrder. - - Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size # noqa: E501 - - :param auto_size: The auto_size of this FuturesInitialOrder. # noqa: E501 - :type: str - """ - - self._auto_size = auto_size - - @property - def is_reduce_only(self): - """Gets the is_reduce_only of this FuturesInitialOrder. # noqa: E501 - - Is the order reduce-only # noqa: E501 - - :return: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 - :rtype: bool - """ - return self._is_reduce_only - - @is_reduce_only.setter - def is_reduce_only(self, is_reduce_only): - """Sets the is_reduce_only of this FuturesInitialOrder. - - Is the order reduce-only # noqa: E501 - - :param is_reduce_only: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 - :type: bool - """ - - self._is_reduce_only = is_reduce_only - - @property - def is_close(self): - """Gets the is_close of this FuturesInitialOrder. # noqa: E501 - - Is the order to close position # noqa: E501 - - :return: The is_close of this FuturesInitialOrder. # noqa: E501 - :rtype: bool - """ - return self._is_close - - @is_close.setter - def is_close(self, is_close): - """Sets the is_close of this FuturesInitialOrder. - - Is the order to close position # noqa: E501 - - :param is_close: The is_close of this FuturesInitialOrder. # noqa: E501 - :type: bool - """ - - self._is_close = is_close - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesInitialOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesInitialOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py deleted file mode 100644 index 6afde67..0000000 --- a/gate_api/models/futures_limit_risk_tiers.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesLimitRiskTiers(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'tier': 'int', - 'risk_limit': 'str', - 'initial_rate': 'str', - 'maintenance_rate': 'str', - 'leverage_max': 'str', - 'contract': 'str' - } - - attribute_map = { - 'tier': 'tier', - 'risk_limit': 'risk_limit', - 'initial_rate': 'initial_rate', - 'maintenance_rate': 'maintenance_rate', - 'leverage_max': 'leverage_max', - 'contract': 'contract' - } - - def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_rate=None, leverage_max=None, contract=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, str, Configuration) -> None - """FuturesLimitRiskTiers - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._tier = None - self._risk_limit = None - self._initial_rate = None - self._maintenance_rate = None - self._leverage_max = None - self._contract = None - self.discriminator = None - - if tier is not None: - self.tier = tier - if risk_limit is not None: - self.risk_limit = risk_limit - if initial_rate is not None: - self.initial_rate = initial_rate - if maintenance_rate is not None: - self.maintenance_rate = maintenance_rate - if leverage_max is not None: - self.leverage_max = leverage_max - if contract is not None: - self.contract = contract - - @property - def tier(self): - """Gets the tier of this FuturesLimitRiskTiers. # noqa: E501 - - Tier # noqa: E501 - - :return: The tier of this FuturesLimitRiskTiers. # noqa: E501 - :rtype: int - """ - return self._tier - - @tier.setter - def tier(self, tier): - """Sets the tier of this FuturesLimitRiskTiers. - - Tier # noqa: E501 - - :param tier: The tier of this FuturesLimitRiskTiers. # noqa: E501 - :type: int - """ - - self._tier = tier - - @property - def risk_limit(self): - """Gets the risk_limit of this FuturesLimitRiskTiers. # noqa: E501 - - Position risk limit # noqa: E501 - - :return: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 - :rtype: str - """ - return self._risk_limit - - @risk_limit.setter - def risk_limit(self, risk_limit): - """Sets the risk_limit of this FuturesLimitRiskTiers. - - Position risk limit # noqa: E501 - - :param risk_limit: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 - :type: str - """ - - self._risk_limit = risk_limit - - @property - def initial_rate(self): - """Gets the initial_rate of this FuturesLimitRiskTiers. # noqa: E501 - - Initial margin rate # noqa: E501 - - :return: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 - :rtype: str - """ - return self._initial_rate - - @initial_rate.setter - def initial_rate(self, initial_rate): - """Sets the initial_rate of this FuturesLimitRiskTiers. - - Initial margin rate # noqa: E501 - - :param initial_rate: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 - :type: str - """ - - self._initial_rate = initial_rate - - @property - def maintenance_rate(self): - """Gets the maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 - - Maintenance margin rate # noqa: E501 - - :return: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 - :rtype: str - """ - return self._maintenance_rate - - @maintenance_rate.setter - def maintenance_rate(self, maintenance_rate): - """Sets the maintenance_rate of this FuturesLimitRiskTiers. - - Maintenance margin rate # noqa: E501 - - :param maintenance_rate: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 - :type: str - """ - - self._maintenance_rate = maintenance_rate - - @property - def leverage_max(self): - """Gets the leverage_max of this FuturesLimitRiskTiers. # noqa: E501 - - Maximum leverage # noqa: E501 - - :return: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 - :rtype: str - """ - return self._leverage_max - - @leverage_max.setter - def leverage_max(self, leverage_max): - """Sets the leverage_max of this FuturesLimitRiskTiers. - - Maximum leverage # noqa: E501 - - :param leverage_max: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 - :type: str - """ - - self._leverage_max = leverage_max - - @property - def contract(self): - """Gets the contract of this FuturesLimitRiskTiers. # noqa: E501 - - Markets, visible only during market pagination requests # noqa: E501 - - :return: The contract of this FuturesLimitRiskTiers. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesLimitRiskTiers. - - Markets, visible only during market pagination requests # noqa: E501 - - :param contract: The contract of this FuturesLimitRiskTiers. # noqa: E501 - :type: str - """ - - self._contract = contract - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesLimitRiskTiers): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesLimitRiskTiers): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py deleted file mode 100644 index 50ded5d..0000000 --- a/gate_api/models/futures_liq_order.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesLiqOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'int', - 'contract': 'str', - 'size': 'int', - 'order_size': 'int', - 'order_price': 'str', - 'fill_price': 'str', - 'left': 'int' - } - - attribute_map = { - 'time': 'time', - 'contract': 'contract', - 'size': 'size', - 'order_size': 'order_size', - 'order_price': 'order_price', - 'fill_price': 'fill_price', - 'left': 'left' - } - - def __init__(self, time=None, contract=None, size=None, order_size=None, order_price=None, fill_price=None, left=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, int, str, str, int, Configuration) -> None - """FuturesLiqOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._contract = None - self._size = None - self._order_size = None - self._order_price = None - self._fill_price = None - self._left = None - self.discriminator = None - - if time is not None: - self.time = time - if contract is not None: - self.contract = contract - if size is not None: - self.size = size - if order_size is not None: - self.order_size = order_size - if order_price is not None: - self.order_price = order_price - if fill_price is not None: - self.fill_price = fill_price - if left is not None: - self.left = left - - @property - def time(self): - """Gets the time of this FuturesLiqOrder. # noqa: E501 - - Liquidation time # noqa: E501 - - :return: The time of this FuturesLiqOrder. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this FuturesLiqOrder. - - Liquidation time # noqa: E501 - - :param time: The time of this FuturesLiqOrder. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def contract(self): - """Gets the contract of this FuturesLiqOrder. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this FuturesLiqOrder. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesLiqOrder. - - Futures contract # noqa: E501 - - :param contract: The contract of this FuturesLiqOrder. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def size(self): - """Gets the size of this FuturesLiqOrder. # noqa: E501 - - User position size # noqa: E501 - - :return: The size of this FuturesLiqOrder. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FuturesLiqOrder. - - User position size # noqa: E501 - - :param size: The size of this FuturesLiqOrder. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def order_size(self): - """Gets the order_size of this FuturesLiqOrder. # noqa: E501 - - Number of forced liquidation orders # noqa: E501 - - :return: The order_size of this FuturesLiqOrder. # noqa: E501 - :rtype: int - """ - return self._order_size - - @order_size.setter - def order_size(self, order_size): - """Sets the order_size of this FuturesLiqOrder. - - Number of forced liquidation orders # noqa: E501 - - :param order_size: The order_size of this FuturesLiqOrder. # noqa: E501 - :type: int - """ - - self._order_size = order_size - - @property - def order_price(self): - """Gets the order_price of this FuturesLiqOrder. # noqa: E501 - - Liquidation order price # noqa: E501 - - :return: The order_price of this FuturesLiqOrder. # noqa: E501 - :rtype: str - """ - return self._order_price - - @order_price.setter - def order_price(self, order_price): - """Sets the order_price of this FuturesLiqOrder. - - Liquidation order price # noqa: E501 - - :param order_price: The order_price of this FuturesLiqOrder. # noqa: E501 - :type: str - """ - - self._order_price = order_price - - @property - def fill_price(self): - """Gets the fill_price of this FuturesLiqOrder. # noqa: E501 - - Liquidation order average taker price # noqa: E501 - - :return: The fill_price of this FuturesLiqOrder. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this FuturesLiqOrder. - - Liquidation order average taker price # noqa: E501 - - :param fill_price: The fill_price of this FuturesLiqOrder. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def left(self): - """Gets the left of this FuturesLiqOrder. # noqa: E501 - - System liquidation order maker size # noqa: E501 - - :return: The left of this FuturesLiqOrder. # noqa: E501 - :rtype: int - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this FuturesLiqOrder. - - System liquidation order maker size # noqa: E501 - - :param left: The left of this FuturesLiqOrder. # noqa: E501 - :type: int - """ - - 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, FuturesLiqOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesLiqOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py deleted file mode 100644 index 99727e4..0000000 --- a/gate_api/models/futures_liquidate.py +++ /dev/null @@ -1,431 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesLiquidate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'int', - 'contract': 'str', - 'leverage': 'str', - 'size': 'int', - 'margin': 'str', - 'entry_price': 'str', - 'liq_price': 'str', - 'mark_price': 'str', - 'order_id': 'int', - 'order_price': 'str', - 'fill_price': 'str', - 'left': 'int' - } - - attribute_map = { - 'time': 'time', - 'contract': 'contract', - 'leverage': 'leverage', - 'size': 'size', - 'margin': 'margin', - 'entry_price': 'entry_price', - 'liq_price': 'liq_price', - 'mark_price': 'mark_price', - 'order_id': 'order_id', - 'order_price': 'order_price', - 'fill_price': 'fill_price', - 'left': 'left' - } - - def __init__(self, time=None, contract=None, leverage=None, size=None, margin=None, entry_price=None, liq_price=None, mark_price=None, order_id=None, order_price=None, fill_price=None, left=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, int, str, str, str, str, int, str, str, int, Configuration) -> None - """FuturesLiquidate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._contract = None - self._leverage = None - self._size = None - self._margin = None - self._entry_price = None - self._liq_price = None - self._mark_price = None - self._order_id = None - self._order_price = None - self._fill_price = None - self._left = None - self.discriminator = None - - if time is not None: - self.time = time - if contract is not None: - self.contract = contract - if leverage is not None: - self.leverage = leverage - if size is not None: - self.size = size - if margin is not None: - self.margin = margin - 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 order_id is not None: - self.order_id = order_id - if order_price is not None: - self.order_price = order_price - if fill_price is not None: - self.fill_price = fill_price - if left is not None: - self.left = left - - @property - def time(self): - """Gets the time of this FuturesLiquidate. # noqa: E501 - - Liquidation time # noqa: E501 - - :return: The time of this FuturesLiquidate. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this FuturesLiquidate. - - Liquidation time # noqa: E501 - - :param time: The time of this FuturesLiquidate. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def contract(self): - """Gets the contract of this FuturesLiquidate. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesLiquidate. - - Futures contract # noqa: E501 - - :param contract: The contract of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def leverage(self): - """Gets the leverage of this FuturesLiquidate. # noqa: E501 - - Position leverage. Not returned in public endpoints. # noqa: E501 - - :return: The leverage of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this FuturesLiquidate. - - Position leverage. Not returned in public endpoints. # noqa: E501 - - :param leverage: The leverage of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def size(self): - """Gets the size of this FuturesLiquidate. # noqa: E501 - - Position size # noqa: E501 - - :return: The size of this FuturesLiquidate. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FuturesLiquidate. - - Position size # noqa: E501 - - :param size: The size of this FuturesLiquidate. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def margin(self): - """Gets the margin of this FuturesLiquidate. # noqa: E501 - - Position margin. Not returned in public endpoints. # noqa: E501 - - :return: The margin of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._margin - - @margin.setter - def margin(self, margin): - """Sets the margin of this FuturesLiquidate. - - Position margin. Not returned in public endpoints. # noqa: E501 - - :param margin: The margin of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._margin = margin - - @property - def entry_price(self): - """Gets the entry_price of this FuturesLiquidate. # noqa: E501 - - Average entry price. Not returned in public endpoints. # noqa: E501 - - :return: The entry_price of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._entry_price - - @entry_price.setter - def entry_price(self, entry_price): - """Sets the entry_price of this FuturesLiquidate. - - Average entry price. Not returned in public endpoints. # noqa: E501 - - :param entry_price: The entry_price of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._entry_price = entry_price - - @property - def liq_price(self): - """Gets the liq_price of this FuturesLiquidate. # noqa: E501 - - Liquidation price. Not returned in public endpoints. # noqa: E501 - - :return: The liq_price of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._liq_price - - @liq_price.setter - def liq_price(self, liq_price): - """Sets the liq_price of this FuturesLiquidate. - - Liquidation price. Not returned in public endpoints. # noqa: E501 - - :param liq_price: The liq_price of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._liq_price = liq_price - - @property - def mark_price(self): - """Gets the mark_price of this FuturesLiquidate. # noqa: E501 - - Mark price. Not returned in public endpoints. # noqa: E501 - - :return: The mark_price of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this FuturesLiquidate. - - Mark price. Not returned in public endpoints. # noqa: E501 - - :param mark_price: The mark_price of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def order_id(self): - """Gets the order_id of this FuturesLiquidate. # noqa: E501 - - Liquidation order ID. Not returned in public endpoints. # noqa: E501 - - :return: The order_id of this FuturesLiquidate. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this FuturesLiquidate. - - Liquidation order ID. Not returned in public endpoints. # noqa: E501 - - :param order_id: The order_id of this FuturesLiquidate. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def order_price(self): - """Gets the order_price of this FuturesLiquidate. # noqa: E501 - - Liquidation order price # noqa: E501 - - :return: The order_price of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._order_price - - @order_price.setter - def order_price(self, order_price): - """Sets the order_price of this FuturesLiquidate. - - Liquidation order price # noqa: E501 - - :param order_price: The order_price of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._order_price = order_price - - @property - def fill_price(self): - """Gets the fill_price of this FuturesLiquidate. # noqa: E501 - - Liquidation order average taker price # noqa: E501 - - :return: The fill_price of this FuturesLiquidate. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this FuturesLiquidate. - - Liquidation order average taker price # noqa: E501 - - :param fill_price: The fill_price of this FuturesLiquidate. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def left(self): - """Gets the left of this FuturesLiquidate. # noqa: E501 - - Liquidation order maker size # noqa: E501 - - :return: The left of this FuturesLiquidate. # noqa: E501 - :rtype: int - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this FuturesLiquidate. - - Liquidation order maker size # noqa: E501 - - :param left: The left of this FuturesLiquidate. # noqa: E501 - :type: int - """ - - 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, FuturesLiquidate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesLiquidate): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py deleted file mode 100644 index 01811aa..0000000 --- a/gate_api/models/futures_order.py +++ /dev/null @@ -1,883 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'user': 'int', - 'create_time': 'float', - 'finish_time': 'float', - 'finish_as': 'str', - 'status': 'str', - 'contract': 'str', - 'size': 'int', - 'iceberg': 'int', - 'price': 'str', - 'close': 'bool', - 'is_close': 'bool', - 'reduce_only': 'bool', - 'is_reduce_only': 'bool', - 'is_liq': 'bool', - 'tif': 'str', - 'left': 'int', - 'fill_price': 'str', - 'text': 'str', - 'tkfr': 'str', - 'mkfr': 'str', - 'refu': 'int', - 'auto_size': 'str', - 'stp_id': 'int', - 'stp_act': 'str', - 'amend_text': 'str', - 'biz_info': 'str' - } - - attribute_map = { - 'id': 'id', - 'user': 'user', - 'create_time': 'create_time', - 'finish_time': 'finish_time', - 'finish_as': 'finish_as', - 'status': 'status', - 'contract': 'contract', - 'size': 'size', - 'iceberg': 'iceberg', - 'price': 'price', - 'close': 'close', - 'is_close': 'is_close', - 'reduce_only': 'reduce_only', - 'is_reduce_only': 'is_reduce_only', - 'is_liq': 'is_liq', - 'tif': 'tif', - 'left': 'left', - 'fill_price': 'fill_price', - 'text': 'text', - 'tkfr': 'tkfr', - 'mkfr': 'mkfr', - 'refu': 'refu', - 'auto_size': 'auto_size', - 'stp_id': 'stp_id', - 'stp_act': 'stp_act', - 'amend_text': 'amend_text', - 'biz_info': 'biz_info' - } - - def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_id=None, stp_act=None, amend_text=None, biz_info=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, str, Configuration) -> None - """FuturesOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._user = None - self._create_time = None - self._finish_time = None - self._finish_as = None - self._status = None - self._contract = None - self._size = None - self._iceberg = None - self._price = None - self._close = None - self._is_close = None - self._reduce_only = None - self._is_reduce_only = None - self._is_liq = None - self._tif = None - self._left = None - self._fill_price = None - self._text = None - self._tkfr = None - self._mkfr = None - self._refu = None - self._auto_size = None - self._stp_id = None - self._stp_act = None - self._amend_text = None - self._biz_info = None - self.discriminator = None - - if id is not None: - self.id = id - if user is not None: - self.user = user - if create_time is not None: - self.create_time = create_time - if finish_time is not None: - self.finish_time = finish_time - if finish_as is not None: - self.finish_as = finish_as - if status is not None: - self.status = status - self.contract = contract - self.size = size - if iceberg is not None: - self.iceberg = iceberg - if price is not None: - self.price = price - if close is not None: - self.close = close - if is_close is not None: - self.is_close = is_close - if reduce_only is not None: - self.reduce_only = reduce_only - if is_reduce_only is not None: - self.is_reduce_only = is_reduce_only - if is_liq is not None: - self.is_liq = is_liq - if tif is not None: - self.tif = tif - if left is not None: - self.left = left - if fill_price is not None: - self.fill_price = fill_price - if text is not None: - self.text = text - if tkfr is not None: - self.tkfr = tkfr - if mkfr is not None: - self.mkfr = mkfr - if refu is not None: - self.refu = refu - if auto_size is not None: - self.auto_size = auto_size - if stp_id is not None: - self.stp_id = stp_id - if stp_act is not None: - self.stp_act = stp_act - if amend_text is not None: - self.amend_text = amend_text - if biz_info is not None: - self.biz_info = biz_info - - @property - def id(self): - """Gets the id of this FuturesOrder. # noqa: E501 - - Futures order ID # noqa: E501 - - :return: The id of this FuturesOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FuturesOrder. - - Futures order ID # noqa: E501 - - :param id: The id of this FuturesOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def user(self): - """Gets the user of this FuturesOrder. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this FuturesOrder. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this FuturesOrder. - - User ID # noqa: E501 - - :param user: The user of this FuturesOrder. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def create_time(self): - """Gets the create_time of this FuturesOrder. # noqa: E501 - - Creation time of order # noqa: E501 - - :return: The create_time of this FuturesOrder. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this FuturesOrder. - - Creation time of order # noqa: E501 - - :param create_time: The create_time of this FuturesOrder. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def finish_time(self): - """Gets the finish_time of this FuturesOrder. # noqa: E501 - - Order finished time. Not returned if order is open # noqa: E501 - - :return: The finish_time of this FuturesOrder. # noqa: E501 - :rtype: float - """ - return self._finish_time - - @finish_time.setter - def finish_time(self, finish_time): - """Sets the finish_time of this FuturesOrder. - - Order finished time. Not returned if order is open # noqa: E501 - - :param finish_time: The finish_time of this FuturesOrder. # noqa: E501 - :type: float - """ - - self._finish_time = finish_time - - @property - def finish_as(self): - """Gets the finish_as of this FuturesOrder. # noqa: E501 - - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 - - :return: The finish_as of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._finish_as - - @finish_as.setter - def finish_as(self, finish_as): - """Sets the finish_as of this FuturesOrder. - - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 - - :param finish_as: The finish_as of this FuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "stp"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 - .format(finish_as, allowed_values) - ) - - self._finish_as = finish_as - - @property - def status(self): - """Gets the status of this FuturesOrder. # noqa: E501 - - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 - - :return: The status of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this FuturesOrder. - - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 - - :param status: The status of this FuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["open", "finished"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def contract(self): - """Gets the contract of this FuturesOrder. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesOrder. - - Futures contract # noqa: E501 - - :param contract: The contract of this FuturesOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 - raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 - - self._contract = contract - - @property - def size(self): - """Gets the size of this FuturesOrder. # noqa: E501 - - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 - - :return: The size of this FuturesOrder. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FuturesOrder. - - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 - - :param size: The size of this FuturesOrder. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - @property - def iceberg(self): - """Gets the iceberg of this FuturesOrder. # noqa: E501 - - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 - - :return: The iceberg of this FuturesOrder. # noqa: E501 - :rtype: int - """ - return self._iceberg - - @iceberg.setter - def iceberg(self, iceberg): - """Sets the iceberg of this FuturesOrder. - - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 - - :param iceberg: The iceberg of this FuturesOrder. # noqa: E501 - :type: int - """ - - self._iceberg = iceberg - - @property - def price(self): - """Gets the price of this FuturesOrder. # noqa: E501 - - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 - - :return: The price of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FuturesOrder. - - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 - - :param price: The price of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def close(self): - """Gets the close of this FuturesOrder. # noqa: E501 - - Set as `true` to close the position, with `size` set to 0 # noqa: E501 - - :return: The close of this FuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._close - - @close.setter - def close(self, close): - """Sets the close of this FuturesOrder. - - Set as `true` to close the position, with `size` set to 0 # noqa: E501 - - :param close: The close of this FuturesOrder. # noqa: E501 - :type: bool - """ - - self._close = close - - @property - def is_close(self): - """Gets the is_close of this FuturesOrder. # noqa: E501 - - Is the order to close position # noqa: E501 - - :return: The is_close of this FuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._is_close - - @is_close.setter - def is_close(self, is_close): - """Sets the is_close of this FuturesOrder. - - Is the order to close position # noqa: E501 - - :param is_close: The is_close of this FuturesOrder. # noqa: E501 - :type: bool - """ - - self._is_close = is_close - - @property - def reduce_only(self): - """Gets the reduce_only of this FuturesOrder. # noqa: E501 - - Set as `true` to be reduce-only order # noqa: E501 - - :return: The reduce_only of this FuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._reduce_only - - @reduce_only.setter - def reduce_only(self, reduce_only): - """Sets the reduce_only of this FuturesOrder. - - Set as `true` to be reduce-only order # noqa: E501 - - :param reduce_only: The reduce_only of this FuturesOrder. # noqa: E501 - :type: bool - """ - - self._reduce_only = reduce_only - - @property - def is_reduce_only(self): - """Gets the is_reduce_only of this FuturesOrder. # noqa: E501 - - Is the order reduce-only # noqa: E501 - - :return: The is_reduce_only of this FuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._is_reduce_only - - @is_reduce_only.setter - def is_reduce_only(self, is_reduce_only): - """Sets the is_reduce_only of this FuturesOrder. - - Is the order reduce-only # noqa: E501 - - :param is_reduce_only: The is_reduce_only of this FuturesOrder. # noqa: E501 - :type: bool - """ - - self._is_reduce_only = is_reduce_only - - @property - def is_liq(self): - """Gets the is_liq of this FuturesOrder. # noqa: E501 - - Is the order for liquidation # noqa: E501 - - :return: The is_liq of this FuturesOrder. # noqa: E501 - :rtype: bool - """ - return self._is_liq - - @is_liq.setter - def is_liq(self, is_liq): - """Sets the is_liq of this FuturesOrder. - - Is the order for liquidation # noqa: E501 - - :param is_liq: The is_liq of this FuturesOrder. # noqa: E501 - :type: bool - """ - - self._is_liq = is_liq - - @property - def tif(self): - """Gets the tif of this FuturesOrder. # noqa: E501 - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 - - :return: The tif of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._tif - - @tif.setter - def tif(self, tif): - """Sets the tif of this FuturesOrder. - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 - - :param tif: The tif of this FuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 - .format(tif, allowed_values) - ) - - self._tif = tif - - @property - def left(self): - """Gets the left of this FuturesOrder. # noqa: E501 - - Size left to be traded # noqa: E501 - - :return: The left of this FuturesOrder. # noqa: E501 - :rtype: int - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this FuturesOrder. - - Size left to be traded # noqa: E501 - - :param left: The left of this FuturesOrder. # noqa: E501 - :type: int - """ - - self._left = left - - @property - def fill_price(self): - """Gets the fill_price of this FuturesOrder. # noqa: E501 - - Fill price of the order # noqa: E501 - - :return: The fill_price of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this FuturesOrder. - - Fill price of the order # noqa: E501 - - :param fill_price: The fill_price of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def text(self): - """Gets the text of this FuturesOrder. # noqa: E501 - - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance # noqa: E501 - - :return: The text of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this FuturesOrder. - - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance # noqa: E501 - - :param text: The text of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def tkfr(self): - """Gets the tkfr of this FuturesOrder. # noqa: E501 - - Taker fee # noqa: E501 - - :return: The tkfr of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._tkfr - - @tkfr.setter - def tkfr(self, tkfr): - """Sets the tkfr of this FuturesOrder. - - Taker fee # noqa: E501 - - :param tkfr: The tkfr of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._tkfr = tkfr - - @property - def mkfr(self): - """Gets the mkfr of this FuturesOrder. # noqa: E501 - - Maker fee # noqa: E501 - - :return: The mkfr of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._mkfr - - @mkfr.setter - def mkfr(self, mkfr): - """Sets the mkfr of this FuturesOrder. - - Maker fee # noqa: E501 - - :param mkfr: The mkfr of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._mkfr = mkfr - - @property - def refu(self): - """Gets the refu of this FuturesOrder. # noqa: E501 - - Reference user ID # noqa: E501 - - :return: The refu of this FuturesOrder. # noqa: E501 - :rtype: int - """ - return self._refu - - @refu.setter - def refu(self, refu): - """Sets the refu of this FuturesOrder. - - Reference user ID # noqa: E501 - - :param refu: The refu of this FuturesOrder. # noqa: E501 - :type: int - """ - - self._refu = refu - - @property - def auto_size(self): - """Gets the auto_size of this FuturesOrder. # noqa: E501 - - Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 - - :return: The auto_size of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._auto_size - - @auto_size.setter - def auto_size(self, auto_size): - """Sets the auto_size of this FuturesOrder. - - Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 - - :param auto_size: The auto_size of this FuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["close_long", "close_short"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and auto_size not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `auto_size` ({0}), must be one of {1}" # noqa: E501 - .format(auto_size, allowed_values) - ) - - self._auto_size = auto_size - - @property - def stp_id(self): - """Gets the stp_id of this FuturesOrder. # noqa: E501 - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :return: The stp_id of this FuturesOrder. # noqa: E501 - :rtype: int - """ - return self._stp_id - - @stp_id.setter - def stp_id(self, stp_id): - """Sets the stp_id of this FuturesOrder. - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :param stp_id: The stp_id of this FuturesOrder. # noqa: E501 - :type: int - """ - - self._stp_id = stp_id - - @property - def stp_act(self): - """Gets the stp_act of this FuturesOrder. # noqa: E501 - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :return: The stp_act of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._stp_act - - @stp_act.setter - def stp_act(self, stp_act): - """Sets the stp_act of this FuturesOrder. - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :param stp_act: The stp_act of this FuturesOrder. # noqa: E501 - :type: str - """ - allowed_values = ["co", "cn", "cb", "-"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 - .format(stp_act, allowed_values) - ) - - self._stp_act = stp_act - - @property - def amend_text(self): - """Gets the amend_text of this FuturesOrder. # noqa: E501 - - The custom data that the user remarked when amending the order # noqa: E501 - - :return: The amend_text of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this FuturesOrder. - - The custom data that the user remarked when amending the order # noqa: E501 - - :param amend_text: The amend_text of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - @property - def biz_info(self): - """Gets the biz_info of this FuturesOrder. # noqa: E501 - - Additional information # noqa: E501 - - :return: The biz_info of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._biz_info - - @biz_info.setter - def biz_info(self, biz_info): - """Sets the biz_info of this FuturesOrder. - - Additional information # noqa: E501 - - :param biz_info: The biz_info of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._biz_info = biz_info - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py deleted file mode 100644 index d50351e..0000000 --- a/gate_api/models/futures_order_amendment.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesOrderAmendment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'size': 'int', - 'price': 'str', - 'amend_text': 'str', - 'biz_info': 'str', - 'bbo': 'str' - } - - attribute_map = { - 'size': 'size', - 'price': 'price', - 'amend_text': 'amend_text', - 'biz_info': 'biz_info', - 'bbo': 'bbo' - } - - def __init__(self, size=None, price=None, amend_text=None, biz_info=None, bbo=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, Configuration) -> None - """FuturesOrderAmendment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._size = None - self._price = None - self._amend_text = None - self._biz_info = None - self._bbo = None - self.discriminator = None - - if size is not None: - self.size = size - if price is not None: - self.price = price - if amend_text is not None: - self.amend_text = amend_text - if biz_info is not None: - self.biz_info = biz_info - if bbo is not None: - self.bbo = bbo - - @property - def size(self): - """Gets the size of this FuturesOrderAmendment. # noqa: E501 - - New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. # noqa: E501 - - :return: The size of this FuturesOrderAmendment. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FuturesOrderAmendment. - - New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. # noqa: E501 - - :param size: The size of this FuturesOrderAmendment. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def price(self): - """Gets the price of this FuturesOrderAmendment. # noqa: E501 - - New order price. # noqa: E501 - - :return: The price of this FuturesOrderAmendment. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FuturesOrderAmendment. - - New order price. # noqa: E501 - - :param price: The price of this FuturesOrderAmendment. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def amend_text(self): - """Gets the amend_text of this FuturesOrderAmendment. # noqa: E501 - - Custom info during amending order # noqa: E501 - - :return: The amend_text of this FuturesOrderAmendment. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this FuturesOrderAmendment. - - Custom info during amending order # noqa: E501 - - :param amend_text: The amend_text of this FuturesOrderAmendment. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - @property - def biz_info(self): - """Gets the biz_info of this FuturesOrderAmendment. # noqa: E501 - - Users can annotate this modification with information. # noqa: E501 - - :return: The biz_info of this FuturesOrderAmendment. # noqa: E501 - :rtype: str - """ - return self._biz_info - - @biz_info.setter - def biz_info(self, biz_info): - """Sets the biz_info of this FuturesOrderAmendment. - - Users can annotate this modification with information. # noqa: E501 - - :param biz_info: The biz_info of this FuturesOrderAmendment. # noqa: E501 - :type: str - """ - - self._biz_info = biz_info - - @property - def bbo(self): - """Gets the bbo of this FuturesOrderAmendment. # noqa: E501 - - Users are able to modify the offer price manually. # noqa: E501 - - :return: The bbo of this FuturesOrderAmendment. # noqa: E501 - :rtype: str - """ - return self._bbo - - @bbo.setter - def bbo(self, bbo): - """Sets the bbo of this FuturesOrderAmendment. - - Users are able to modify the offer price manually. # noqa: E501 - - :param bbo: The bbo of this FuturesOrderAmendment. # noqa: E501 - :type: str - """ - - self._bbo = bbo - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesOrderAmendment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesOrderAmendment): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py deleted file mode 100644 index 31fb88a..0000000 --- a/gate_api/models/futures_order_book.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesOrderBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'current': 'float', - 'update': 'float', - 'asks': 'list[FuturesOrderBookItem]', - 'bids': 'list[FuturesOrderBookItem]' - } - - attribute_map = { - 'id': 'id', - 'current': 'current', - 'update': 'update', - 'asks': 'asks', - 'bids': 'bids' - } - - def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, float, list[FuturesOrderBookItem], list[FuturesOrderBookItem], Configuration) -> None - """FuturesOrderBook - a 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._current = None - self._update = None - self._asks = None - self._bids = None - self.discriminator = None - - if id is not None: - self.id = id - if current is not None: - self.current = current - if update is not None: - self.update = update - self.asks = asks - self.bids = bids - - @property - def id(self): - """Gets the id of this FuturesOrderBook. # noqa: E501 - - Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response # noqa: E501 - - :return: The id of this FuturesOrderBook. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FuturesOrderBook. - - Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response # noqa: E501 - - :param id: The id of this FuturesOrderBook. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def current(self): - """Gets the current of this FuturesOrderBook. # noqa: E501 - - Response data generation timestamp # noqa: E501 - - :return: The current of this FuturesOrderBook. # noqa: E501 - :rtype: float - """ - return self._current - - @current.setter - def current(self, current): - """Sets the current of this FuturesOrderBook. - - Response data generation timestamp # noqa: E501 - - :param current: The current of this FuturesOrderBook. # noqa: E501 - :type: float - """ - - self._current = current - - @property - def update(self): - """Gets the update of this FuturesOrderBook. # noqa: E501 - - Order book changed timestamp # noqa: E501 - - :return: The update of this FuturesOrderBook. # noqa: E501 - :rtype: float - """ - return self._update - - @update.setter - def update(self, update): - """Sets the update of this FuturesOrderBook. - - Order book changed timestamp # noqa: E501 - - :param update: The update of this FuturesOrderBook. # noqa: E501 - :type: float - """ - - self._update = update - - @property - def asks(self): - """Gets the asks of this FuturesOrderBook. # noqa: E501 - - Asks order depth # noqa: E501 - - :return: The asks of this FuturesOrderBook. # noqa: E501 - :rtype: list[FuturesOrderBookItem] - """ - return self._asks - - @asks.setter - def asks(self, asks): - """Sets the asks of this FuturesOrderBook. - - Asks order depth # noqa: E501 - - :param asks: The asks of this FuturesOrderBook. # noqa: E501 - :type: list[FuturesOrderBookItem] - """ - if self.local_vars_configuration.client_side_validation and asks is None: # noqa: E501 - raise ValueError("Invalid value for `asks`, must not be `None`") # noqa: E501 - - self._asks = asks - - @property - def bids(self): - """Gets the bids of this FuturesOrderBook. # noqa: E501 - - Bids order depth # noqa: E501 - - :return: The bids of this FuturesOrderBook. # noqa: E501 - :rtype: list[FuturesOrderBookItem] - """ - return self._bids - - @bids.setter - def bids(self, bids): - """Sets the bids of this FuturesOrderBook. - - Bids order depth # noqa: E501 - - :param bids: The bids of this FuturesOrderBook. # noqa: E501 - :type: list[FuturesOrderBookItem] - """ - if self.local_vars_configuration.client_side_validation and bids is None: # noqa: E501 - raise ValueError("Invalid value for `bids`, must not be `None`") # noqa: E501 - - self._bids = bids - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesOrderBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesOrderBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py deleted file mode 100644 index 365905c..0000000 --- a/gate_api/models/futures_order_book_item.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesOrderBookItem(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 's': 'int' - } - - attribute_map = { - 'p': 'p', - 's': 's' - } - - def __init__(self, p=None, s=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, Configuration) -> None - """FuturesOrderBookItem - a 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._s = None - self.discriminator = None - - if p is not None: - self.p = p - if s is not None: - self.s = s - - @property - def p(self): - """Gets the p of this FuturesOrderBookItem. # noqa: E501 - - Price (quote currency) # noqa: E501 - - :return: The p of this FuturesOrderBookItem. # noqa: E501 - :rtype: str - """ - return self._p - - @p.setter - def p(self, p): - """Sets the p of this FuturesOrderBookItem. - - Price (quote currency) # noqa: E501 - - :param p: The p of this FuturesOrderBookItem. # noqa: E501 - :type: str - """ - - self._p = p - - @property - def s(self): - """Gets the s of this FuturesOrderBookItem. # noqa: E501 - - Size # noqa: E501 - - :return: The s of this FuturesOrderBookItem. # noqa: E501 - :rtype: int - """ - return self._s - - @s.setter - def s(self, s): - """Sets the s of this FuturesOrderBookItem. - - Size # noqa: E501 - - :param s: The s of this FuturesOrderBookItem. # noqa: E501 - :type: int - """ - - self._s = s - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesOrderBookItem): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesOrderBookItem): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py deleted file mode 100644 index 9552be5..0000000 --- a/gate_api/models/futures_premium_index.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesPremiumIndex(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 't': 'float', - 'c': 'str', - 'h': 'str', - 'l': 'str', - 'o': 'str' - } - - attribute_map = { - 't': 't', - 'c': 'c', - 'h': 'h', - 'l': 'l', - 'o': 'o' - } - - def __init__(self, t=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, str, str, str, Configuration) -> None - """FuturesPremiumIndex - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._t = None - self._c = None - self._h = None - self._l = None - self._o = None - self.discriminator = None - - if t is not None: - self.t = t - if c is not None: - self.c = c - if h is not None: - self.h = h - if l is not None: - self.l = l - if o is not None: - self.o = o - - @property - def t(self): - """Gets the t of this FuturesPremiumIndex. # noqa: E501 - - Unix timestamp in seconds # noqa: E501 - - :return: The t of this FuturesPremiumIndex. # noqa: E501 - :rtype: float - """ - return self._t - - @t.setter - def t(self, t): - """Sets the t of this FuturesPremiumIndex. - - Unix timestamp in seconds # noqa: E501 - - :param t: The t of this FuturesPremiumIndex. # noqa: E501 - :type: float - """ - - self._t = t - - @property - def c(self): - """Gets the c of this FuturesPremiumIndex. # noqa: E501 - - Close price # noqa: E501 - - :return: The c of this FuturesPremiumIndex. # noqa: E501 - :rtype: str - """ - return self._c - - @c.setter - def c(self, c): - """Sets the c of this FuturesPremiumIndex. - - Close price # noqa: E501 - - :param c: The c of this FuturesPremiumIndex. # noqa: E501 - :type: str - """ - - self._c = c - - @property - def h(self): - """Gets the h of this FuturesPremiumIndex. # noqa: E501 - - Highest price # noqa: E501 - - :return: The h of this FuturesPremiumIndex. # noqa: E501 - :rtype: str - """ - return self._h - - @h.setter - def h(self, h): - """Sets the h of this FuturesPremiumIndex. - - Highest price # noqa: E501 - - :param h: The h of this FuturesPremiumIndex. # noqa: E501 - :type: str - """ - - self._h = h - - @property - def l(self): - """Gets the l of this FuturesPremiumIndex. # noqa: E501 - - Lowest price` # noqa: E501 - - :return: The l of this FuturesPremiumIndex. # noqa: E501 - :rtype: str - """ - return self._l - - @l.setter - def l(self, l): - """Sets the l of this FuturesPremiumIndex. - - Lowest price` # noqa: E501 - - :param l: The l of this FuturesPremiumIndex. # noqa: E501 - :type: str - """ - - self._l = l - - @property - def o(self): - """Gets the o of this FuturesPremiumIndex. # noqa: E501 - - Open price # noqa: E501 - - :return: The o of this FuturesPremiumIndex. # noqa: E501 - :rtype: str - """ - return self._o - - @o.setter - def o(self, o): - """Sets the o of this FuturesPremiumIndex. - - Open price # noqa: E501 - - :param o: The o of this FuturesPremiumIndex. # noqa: E501 - :type: str - """ - - self._o = o - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesPremiumIndex): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesPremiumIndex): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py deleted file mode 100644 index 89b9d36..0000000 --- a/gate_api/models/futures_price_trigger.py +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesPriceTrigger(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'strategy_type': 'int', - 'price_type': 'int', - 'price': 'str', - 'rule': 'int', - 'expiration': 'int' - } - - attribute_map = { - 'strategy_type': 'strategy_type', - 'price_type': 'price_type', - 'price': 'price', - 'rule': 'rule', - 'expiration': 'expiration' - } - - def __init__(self, strategy_type=None, price_type=None, price=None, rule=None, expiration=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, int, int, Configuration) -> None - """FuturesPriceTrigger - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._strategy_type = None - self._price_type = None - self._price = None - self._rule = None - self._expiration = None - self.discriminator = None - - if strategy_type is not None: - self.strategy_type = strategy_type - if price_type is not None: - self.price_type = price_type - if price is not None: - self.price = price - if rule is not None: - self.rule = rule - if expiration is not None: - self.expiration = expiration - - @property - def strategy_type(self): - """Gets the strategy_type of this FuturesPriceTrigger. # noqa: E501 - - Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price # noqa: E501 - - :return: The strategy_type of this FuturesPriceTrigger. # noqa: E501 - :rtype: int - """ - return self._strategy_type - - @strategy_type.setter - def strategy_type(self, strategy_type): - """Sets the strategy_type of this FuturesPriceTrigger. - - Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price # noqa: E501 - - :param strategy_type: The strategy_type of this FuturesPriceTrigger. # noqa: E501 - :type: int - """ - allowed_values = [0, 1] # noqa: E501 - if self.local_vars_configuration.client_side_validation and strategy_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `strategy_type` ({0}), must be one of {1}" # noqa: E501 - .format(strategy_type, allowed_values) - ) - - self._strategy_type = strategy_type - - @property - def price_type(self): - """Gets the price_type of this FuturesPriceTrigger. # noqa: E501 - - Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501 - - :return: The price_type of this FuturesPriceTrigger. # noqa: E501 - :rtype: int - """ - return self._price_type - - @price_type.setter - def price_type(self, price_type): - """Sets the price_type of this FuturesPriceTrigger. - - Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501 - - :param price_type: The price_type of this FuturesPriceTrigger. # noqa: E501 - :type: int - """ - allowed_values = [0, 1, 2] # noqa: E501 - if self.local_vars_configuration.client_side_validation and price_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `price_type` ({0}), must be one of {1}" # noqa: E501 - .format(price_type, allowed_values) - ) - - self._price_type = price_type - - @property - def price(self): - """Gets the price of this FuturesPriceTrigger. # noqa: E501 - - Value of price on price triggered, or price gap on price gap triggered # noqa: E501 - - :return: The price of this FuturesPriceTrigger. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FuturesPriceTrigger. - - Value of price on price triggered, or price gap on price gap triggered # noqa: E501 - - :param price: The price of this FuturesPriceTrigger. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def rule(self): - """Gets the rule of this FuturesPriceTrigger. # noqa: E501 - - Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 - - :return: The rule of this FuturesPriceTrigger. # noqa: E501 - :rtype: int - """ - return self._rule - - @rule.setter - def rule(self, rule): - """Sets the rule of this FuturesPriceTrigger. - - Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 - - :param rule: The rule of this FuturesPriceTrigger. # noqa: E501 - :type: int - """ - allowed_values = [1, 2] # noqa: E501 - if self.local_vars_configuration.client_side_validation and rule not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `rule` ({0}), must be one of {1}" # noqa: E501 - .format(rule, allowed_values) - ) - - self._rule = rule - - @property - def expiration(self): - """Gets the expiration of this FuturesPriceTrigger. # noqa: E501 - - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 - - :return: The expiration of this FuturesPriceTrigger. # noqa: E501 - :rtype: int - """ - return self._expiration - - @expiration.setter - def expiration(self, expiration): - """Sets the expiration of this FuturesPriceTrigger. - - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 - - :param expiration: The expiration of this FuturesPriceTrigger. # noqa: E501 - :type: int - """ - - self._expiration = expiration - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesPriceTrigger): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesPriceTrigger): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py deleted file mode 100644 index 09a9106..0000000 --- a/gate_api/models/futures_price_triggered_order.py +++ /dev/null @@ -1,441 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesPriceTriggeredOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'initial': 'FuturesInitialOrder', - 'trigger': 'FuturesPriceTrigger', - 'id': 'int', - 'user': 'int', - 'create_time': 'float', - 'finish_time': 'float', - 'trade_id': 'int', - 'status': 'str', - 'finish_as': 'str', - 'reason': 'str', - 'order_type': 'str', - 'me_order_id': 'int' - } - - attribute_map = { - 'initial': 'initial', - 'trigger': 'trigger', - 'id': 'id', - 'user': 'user', - 'create_time': 'create_time', - 'finish_time': 'finish_time', - 'trade_id': 'trade_id', - 'status': 'status', - 'finish_as': 'finish_as', - 'reason': 'reason', - 'order_type': 'order_type', - 'me_order_id': 'me_order_id' - } - - def __init__(self, initial=None, trigger=None, id=None, user=None, create_time=None, finish_time=None, trade_id=None, status=None, finish_as=None, reason=None, order_type=None, me_order_id=None, local_vars_configuration=None): # noqa: E501 - # type: (FuturesInitialOrder, FuturesPriceTrigger, int, int, float, float, int, str, str, str, str, int, Configuration) -> None - """FuturesPriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._initial = None - self._trigger = None - self._id = None - self._user = None - self._create_time = None - self._finish_time = None - self._trade_id = None - self._status = None - self._finish_as = None - self._reason = None - self._order_type = None - self._me_order_id = None - self.discriminator = None - - self.initial = initial - self.trigger = trigger - if id is not None: - self.id = id - if user is not None: - self.user = user - if create_time is not None: - self.create_time = create_time - if finish_time is not None: - self.finish_time = finish_time - if trade_id is not None: - self.trade_id = trade_id - if status is not None: - self.status = status - if finish_as is not None: - self.finish_as = finish_as - if reason is not None: - self.reason = reason - if order_type is not None: - self.order_type = order_type - if me_order_id is not None: - self.me_order_id = me_order_id - - @property - def initial(self): - """Gets the initial of this FuturesPriceTriggeredOrder. # noqa: E501 - - - :return: The initial of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: FuturesInitialOrder - """ - return self._initial - - @initial.setter - def initial(self, initial): - """Sets the initial of this FuturesPriceTriggeredOrder. - - - :param initial: The initial of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: FuturesInitialOrder - """ - if self.local_vars_configuration.client_side_validation and initial is None: # noqa: E501 - raise ValueError("Invalid value for `initial`, must not be `None`") # noqa: E501 - - self._initial = initial - - @property - def trigger(self): - """Gets the trigger of this FuturesPriceTriggeredOrder. # noqa: E501 - - - :return: The trigger of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: FuturesPriceTrigger - """ - return self._trigger - - @trigger.setter - def trigger(self, trigger): - """Sets the trigger of this FuturesPriceTriggeredOrder. - - - :param trigger: The trigger of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: FuturesPriceTrigger - """ - if self.local_vars_configuration.client_side_validation and trigger is None: # noqa: E501 - raise ValueError("Invalid value for `trigger`, must not be `None`") # noqa: E501 - - self._trigger = trigger - - @property - def id(self): - """Gets the id of this FuturesPriceTriggeredOrder. # noqa: E501 - - Auto order ID # noqa: E501 - - :return: The id of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FuturesPriceTriggeredOrder. - - Auto order ID # noqa: E501 - - :param id: The id of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def user(self): - """Gets the user of this FuturesPriceTriggeredOrder. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this FuturesPriceTriggeredOrder. - - User ID # noqa: E501 - - :param user: The user of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def create_time(self): - """Gets the create_time of this FuturesPriceTriggeredOrder. # noqa: E501 - - Creation time # noqa: E501 - - :return: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this FuturesPriceTriggeredOrder. - - Creation time # noqa: E501 - - :param create_time: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def finish_time(self): - """Gets the finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 - - Finished time # noqa: E501 - - :return: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: float - """ - return self._finish_time - - @finish_time.setter - def finish_time(self, finish_time): - """Sets the finish_time of this FuturesPriceTriggeredOrder. - - Finished time # noqa: E501 - - :param finish_time: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: float - """ - - self._finish_time = finish_time - - @property - def trade_id(self): - """Gets the trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 - - ID of the newly created order on condition triggered # noqa: E501 - - :return: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._trade_id - - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this FuturesPriceTriggeredOrder. - - ID of the newly created order on condition triggered # noqa: E501 - - :param trade_id: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._trade_id = trade_id - - @property - def status(self): - """Gets the status of this FuturesPriceTriggeredOrder. # noqa: E501 - - Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501 - - :return: The status of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this FuturesPriceTriggeredOrder. - - Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501 - - :param status: The status of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: str - """ - allowed_values = ["open", "finished", "inactive", "invalid"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def finish_as(self): - """Gets the finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 - - How order is finished # noqa: E501 - - :return: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: str - """ - return self._finish_as - - @finish_as.setter - def finish_as(self, finish_as): - """Sets the finish_as of this FuturesPriceTriggeredOrder. - - How order is finished # noqa: E501 - - :param finish_as: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: str - """ - allowed_values = ["cancelled", "succeeded", "failed", "expired"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 - .format(finish_as, allowed_values) - ) - - self._finish_as = finish_as - - @property - def reason(self): - """Gets the reason of this FuturesPriceTriggeredOrder. # noqa: E501 - - Additional remarks on how the order was finished # noqa: E501 - - :return: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: str - """ - return self._reason - - @reason.setter - def reason(self, reason): - """Sets the reason of this FuturesPriceTriggeredOrder. - - Additional remarks on how the order was finished # noqa: E501 - - :param reason: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: str - """ - - self._reason = reason - - @property - def order_type(self): - """Gets the order_type of this FuturesPriceTriggeredOrder. # noqa: E501 - - Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 - - :return: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: str - """ - return self._order_type - - @order_type.setter - def order_type(self, order_type): - """Sets the order_type of this FuturesPriceTriggeredOrder. - - Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 - - :param order_type: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: str - """ - - self._order_type = order_type - - @property - def me_order_id(self): - """Gets the me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 - - Corresponding order ID of order take-profit/stop-loss. # noqa: E501 - - :return: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._me_order_id - - @me_order_id.setter - def me_order_id(self, me_order_id): - """Sets the me_order_id of this FuturesPriceTriggeredOrder. - - Corresponding order ID of order take-profit/stop-loss. # noqa: E501 - - :param me_order_id: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._me_order_id = me_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, FuturesPriceTriggeredOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesPriceTriggeredOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py deleted file mode 100644 index a4b8467..0000000 --- a/gate_api/models/futures_ticker.py +++ /dev/null @@ -1,739 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesTicker(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'contract': 'str', - 'last': 'str', - 'change_percentage': 'str', - 'total_size': 'str', - 'low_24h': 'str', - 'high_24h': 'str', - 'volume_24h': 'str', - 'volume_24h_btc': 'str', - 'volume_24h_usd': 'str', - 'volume_24h_base': 'str', - 'volume_24h_quote': 'str', - 'volume_24h_settle': 'str', - 'mark_price': 'str', - 'funding_rate': 'str', - 'funding_rate_indicative': 'str', - 'index_price': 'str', - 'quanto_base_rate': 'str', - 'basis_rate': 'str', - 'basis_value': 'str', - 'lowest_ask': 'str', - 'lowest_size': 'str', - 'highest_bid': 'str', - 'highest_size': 'str' - } - - attribute_map = { - 'contract': 'contract', - 'last': 'last', - 'change_percentage': 'change_percentage', - 'total_size': 'total_size', - 'low_24h': 'low_24h', - 'high_24h': 'high_24h', - 'volume_24h': 'volume_24h', - 'volume_24h_btc': 'volume_24h_btc', - 'volume_24h_usd': 'volume_24h_usd', - 'volume_24h_base': 'volume_24h_base', - 'volume_24h_quote': 'volume_24h_quote', - 'volume_24h_settle': 'volume_24h_settle', - 'mark_price': 'mark_price', - 'funding_rate': 'funding_rate', - 'funding_rate_indicative': 'funding_rate_indicative', - 'index_price': 'index_price', - 'quanto_base_rate': 'quanto_base_rate', - 'basis_rate': 'basis_rate', - 'basis_value': 'basis_value', - 'lowest_ask': 'lowest_ask', - 'lowest_size': 'lowest_size', - 'highest_bid': 'highest_bid', - 'highest_size': 'highest_size' - } - - def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, basis_rate=None, basis_value=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """FuturesTicker - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._contract = None - self._last = None - self._change_percentage = None - self._total_size = None - self._low_24h = None - self._high_24h = None - self._volume_24h = None - self._volume_24h_btc = None - self._volume_24h_usd = None - self._volume_24h_base = None - self._volume_24h_quote = None - self._volume_24h_settle = None - self._mark_price = None - self._funding_rate = None - self._funding_rate_indicative = None - self._index_price = None - self._quanto_base_rate = None - self._basis_rate = None - self._basis_value = None - self._lowest_ask = None - self._lowest_size = None - self._highest_bid = None - self._highest_size = None - self.discriminator = None - - if contract is not None: - self.contract = contract - if last is not None: - self.last = last - if change_percentage is not None: - self.change_percentage = change_percentage - if total_size is not None: - self.total_size = total_size - if low_24h is not None: - self.low_24h = low_24h - if high_24h is not None: - self.high_24h = high_24h - if volume_24h is not None: - self.volume_24h = volume_24h - if volume_24h_btc is not None: - self.volume_24h_btc = volume_24h_btc - if volume_24h_usd is not None: - self.volume_24h_usd = volume_24h_usd - if volume_24h_base is not None: - self.volume_24h_base = volume_24h_base - if volume_24h_quote is not None: - self.volume_24h_quote = volume_24h_quote - if volume_24h_settle is not None: - self.volume_24h_settle = volume_24h_settle - if mark_price is not None: - self.mark_price = mark_price - if funding_rate is not None: - self.funding_rate = funding_rate - if funding_rate_indicative is not None: - self.funding_rate_indicative = funding_rate_indicative - if index_price is not None: - self.index_price = index_price - if quanto_base_rate is not None: - self.quanto_base_rate = quanto_base_rate - if basis_rate is not None: - self.basis_rate = basis_rate - if basis_value is not None: - self.basis_value = basis_value - if lowest_ask is not None: - self.lowest_ask = lowest_ask - if lowest_size is not None: - self.lowest_size = lowest_size - if highest_bid is not None: - self.highest_bid = highest_bid - if highest_size is not None: - self.highest_size = highest_size - - @property - def contract(self): - """Gets the contract of this FuturesTicker. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesTicker. - - Futures contract # noqa: E501 - - :param contract: The contract of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def last(self): - """Gets the last of this FuturesTicker. # noqa: E501 - - Last trading price # noqa: E501 - - :return: The last of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._last - - @last.setter - def last(self, last): - """Sets the last of this FuturesTicker. - - Last trading price # noqa: E501 - - :param last: The last of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._last = last - - @property - def change_percentage(self): - """Gets the change_percentage of this FuturesTicker. # noqa: E501 - - Change percentage. # noqa: E501 - - :return: The change_percentage of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._change_percentage - - @change_percentage.setter - def change_percentage(self, change_percentage): - """Sets the change_percentage of this FuturesTicker. - - Change percentage. # noqa: E501 - - :param change_percentage: The change_percentage of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._change_percentage = change_percentage - - @property - def total_size(self): - """Gets the total_size of this FuturesTicker. # noqa: E501 - - Contract total size # noqa: E501 - - :return: The total_size of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._total_size - - @total_size.setter - def total_size(self, total_size): - """Sets the total_size of this FuturesTicker. - - Contract total size # noqa: E501 - - :param total_size: The total_size of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._total_size = total_size - - @property - def low_24h(self): - """Gets the low_24h of this FuturesTicker. # noqa: E501 - - Lowest trading price in recent 24h # noqa: E501 - - :return: The low_24h of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._low_24h - - @low_24h.setter - def low_24h(self, low_24h): - """Sets the low_24h of this FuturesTicker. - - Lowest trading price in recent 24h # noqa: E501 - - :param low_24h: The low_24h of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._low_24h = low_24h - - @property - def high_24h(self): - """Gets the high_24h of this FuturesTicker. # noqa: E501 - - Highest trading price in recent 24h # noqa: E501 - - :return: The high_24h of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._high_24h - - @high_24h.setter - def high_24h(self, high_24h): - """Sets the high_24h of this FuturesTicker. - - Highest trading price in recent 24h # noqa: E501 - - :param high_24h: The high_24h of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._high_24h = high_24h - - @property - def volume_24h(self): - """Gets the volume_24h of this FuturesTicker. # noqa: E501 - - Trade size in recent 24h # noqa: E501 - - :return: The volume_24h of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._volume_24h - - @volume_24h.setter - def volume_24h(self, volume_24h): - """Sets the volume_24h of this FuturesTicker. - - Trade size in recent 24h # noqa: E501 - - :param volume_24h: The volume_24h of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._volume_24h = volume_24h - - @property - def volume_24h_btc(self): - """Gets the volume_24h_btc of this FuturesTicker. # noqa: E501 - - Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 - - :return: The volume_24h_btc of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._volume_24h_btc - - @volume_24h_btc.setter - def volume_24h_btc(self, volume_24h_btc): - """Sets the volume_24h_btc of this FuturesTicker. - - Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 - - :param volume_24h_btc: The volume_24h_btc of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._volume_24h_btc = volume_24h_btc - - @property - def volume_24h_usd(self): - """Gets the volume_24h_usd of this FuturesTicker. # noqa: E501 - - Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 - - :return: The volume_24h_usd of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._volume_24h_usd - - @volume_24h_usd.setter - def volume_24h_usd(self, volume_24h_usd): - """Sets the volume_24h_usd of this FuturesTicker. - - Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 - - :param volume_24h_usd: The volume_24h_usd of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._volume_24h_usd = volume_24h_usd - - @property - def volume_24h_base(self): - """Gets the volume_24h_base of this FuturesTicker. # noqa: E501 - - Trade volume in recent 24h, in base currency # noqa: E501 - - :return: The volume_24h_base of this FuturesTicker. # 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 FuturesTicker. - - Trade volume in recent 24h, in base currency # noqa: E501 - - :param volume_24h_base: The volume_24h_base of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._volume_24h_base = volume_24h_base - - @property - def volume_24h_quote(self): - """Gets the volume_24h_quote of this FuturesTicker. # noqa: E501 - - Trade volume in recent 24h, in quote currency # noqa: E501 - - :return: The volume_24h_quote of this FuturesTicker. # 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 FuturesTicker. - - Trade volume in recent 24h, in quote currency # noqa: E501 - - :param volume_24h_quote: The volume_24h_quote of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._volume_24h_quote = volume_24h_quote - - @property - def volume_24h_settle(self): - """Gets the volume_24h_settle of this FuturesTicker. # noqa: E501 - - Trade volume in recent 24h, in settle currency # noqa: E501 - - :return: The volume_24h_settle of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._volume_24h_settle - - @volume_24h_settle.setter - def volume_24h_settle(self, volume_24h_settle): - """Sets the volume_24h_settle of this FuturesTicker. - - Trade volume in recent 24h, in settle currency # noqa: E501 - - :param volume_24h_settle: The volume_24h_settle of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._volume_24h_settle = volume_24h_settle - - @property - def mark_price(self): - """Gets the mark_price of this FuturesTicker. # noqa: E501 - - Recent mark price # noqa: E501 - - :return: The mark_price of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this FuturesTicker. - - Recent mark price # noqa: E501 - - :param mark_price: The mark_price of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def funding_rate(self): - """Gets the funding_rate of this FuturesTicker. # noqa: E501 - - Funding rate # noqa: E501 - - :return: The funding_rate of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._funding_rate - - @funding_rate.setter - def funding_rate(self, funding_rate): - """Sets the funding_rate of this FuturesTicker. - - Funding rate # noqa: E501 - - :param funding_rate: The funding_rate of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._funding_rate = funding_rate - - @property - def funding_rate_indicative(self): - """Gets the funding_rate_indicative of this FuturesTicker. # noqa: E501 - - Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 - - :return: The funding_rate_indicative of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._funding_rate_indicative - - @funding_rate_indicative.setter - def funding_rate_indicative(self, funding_rate_indicative): - """Sets the funding_rate_indicative of this FuturesTicker. - - Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 - - :param funding_rate_indicative: The funding_rate_indicative of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._funding_rate_indicative = funding_rate_indicative - - @property - def index_price(self): - """Gets the index_price of this FuturesTicker. # noqa: E501 - - Index price # noqa: E501 - - :return: The index_price of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this FuturesTicker. - - Index price # noqa: E501 - - :param index_price: The index_price of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def quanto_base_rate(self): - """Gets the quanto_base_rate of this FuturesTicker. # noqa: E501 - - Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501 - - :return: The quanto_base_rate of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._quanto_base_rate - - @quanto_base_rate.setter - def quanto_base_rate(self, quanto_base_rate): - """Sets the quanto_base_rate of this FuturesTicker. - - Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501 - - :param quanto_base_rate: The quanto_base_rate of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._quanto_base_rate = quanto_base_rate - - @property - def basis_rate(self): - """Gets the basis_rate of this FuturesTicker. # noqa: E501 - - Basis rate # noqa: E501 - - :return: The basis_rate of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._basis_rate - - @basis_rate.setter - def basis_rate(self, basis_rate): - """Sets the basis_rate of this FuturesTicker. - - Basis rate # noqa: E501 - - :param basis_rate: The basis_rate of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._basis_rate = basis_rate - - @property - def basis_value(self): - """Gets the basis_value of this FuturesTicker. # noqa: E501 - - Basis value # noqa: E501 - - :return: The basis_value of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._basis_value - - @basis_value.setter - def basis_value(self, basis_value): - """Sets the basis_value of this FuturesTicker. - - Basis value # noqa: E501 - - :param basis_value: The basis_value of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._basis_value = basis_value - - @property - def lowest_ask(self): - """Gets the lowest_ask of this FuturesTicker. # noqa: E501 - - Recent lowest ask # noqa: E501 - - :return: The lowest_ask of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._lowest_ask - - @lowest_ask.setter - def lowest_ask(self, lowest_ask): - """Sets the lowest_ask of this FuturesTicker. - - Recent lowest ask # noqa: E501 - - :param lowest_ask: The lowest_ask of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._lowest_ask = lowest_ask - - @property - def lowest_size(self): - """Gets the lowest_size of this FuturesTicker. # noqa: E501 - - The latest seller's lowest price order quantity # noqa: E501 - - :return: The lowest_size of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._lowest_size - - @lowest_size.setter - def lowest_size(self, lowest_size): - """Sets the lowest_size of this FuturesTicker. - - The latest seller's lowest price order quantity # noqa: E501 - - :param lowest_size: The lowest_size of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._lowest_size = lowest_size - - @property - def highest_bid(self): - """Gets the highest_bid of this FuturesTicker. # noqa: E501 - - Recent highest bid # noqa: E501 - - :return: The highest_bid of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._highest_bid - - @highest_bid.setter - def highest_bid(self, highest_bid): - """Sets the highest_bid of this FuturesTicker. - - Recent highest bid # noqa: E501 - - :param highest_bid: The highest_bid of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._highest_bid = highest_bid - - @property - def highest_size(self): - """Gets the highest_size of this FuturesTicker. # noqa: E501 - - The latest buyer's highest price order volume # noqa: E501 - - :return: The highest_size of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._highest_size - - @highest_size.setter - def highest_size(self, highest_size): - """Sets the highest_size of this FuturesTicker. - - The latest buyer's highest price order volume # noqa: E501 - - :param highest_size: The highest_size of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._highest_size = highest_size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesTicker): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesTicker): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py deleted file mode 100644 index c28ab4e..0000000 --- a/gate_api/models/futures_trade.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class FuturesTrade(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'create_time': 'float', - 'create_time_ms': 'float', - 'contract': 'str', - 'size': 'int', - 'price': 'str', - 'is_internal': 'bool' - } - - attribute_map = { - 'id': 'id', - 'create_time': 'create_time', - 'create_time_ms': 'create_time_ms', - 'contract': 'contract', - 'size': 'size', - 'price': 'price', - 'is_internal': 'is_internal' - } - - def __init__(self, id=None, create_time=None, create_time_ms=None, contract=None, size=None, price=None, is_internal=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, float, str, int, str, bool, Configuration) -> None - """FuturesTrade - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._create_time = None - self._create_time_ms = None - self._contract = None - self._size = None - self._price = None - self._is_internal = None - self.discriminator = None - - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if create_time_ms is not None: - self.create_time_ms = create_time_ms - if contract is not None: - self.contract = contract - if size is not None: - self.size = size - if price is not None: - self.price = price - if is_internal is not None: - self.is_internal = is_internal - - @property - def id(self): - """Gets the id of this FuturesTrade. # noqa: E501 - - Trade ID # noqa: E501 - - :return: The id of this FuturesTrade. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FuturesTrade. - - Trade ID # noqa: E501 - - :param id: The id of this FuturesTrade. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this FuturesTrade. # noqa: E501 - - Trading time # noqa: E501 - - :return: The create_time of this FuturesTrade. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this FuturesTrade. - - Trading time # noqa: E501 - - :param create_time: The create_time of this FuturesTrade. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def create_time_ms(self): - """Gets the create_time_ms of this FuturesTrade. # noqa: E501 - - Trading time, with milliseconds set to 3 decimal places. # noqa: E501 - - :return: The create_time_ms of this FuturesTrade. # noqa: E501 - :rtype: float - """ - return self._create_time_ms - - @create_time_ms.setter - def create_time_ms(self, create_time_ms): - """Sets the create_time_ms of this FuturesTrade. - - Trading time, with milliseconds set to 3 decimal places. # noqa: E501 - - :param create_time_ms: The create_time_ms of this FuturesTrade. # noqa: E501 - :type: float - """ - - self._create_time_ms = create_time_ms - - @property - def contract(self): - """Gets the contract of this FuturesTrade. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this FuturesTrade. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this FuturesTrade. - - Futures contract # noqa: E501 - - :param contract: The contract of this FuturesTrade. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def size(self): - """Gets the size of this FuturesTrade. # noqa: E501 - - Trading size # noqa: E501 - - :return: The size of this FuturesTrade. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FuturesTrade. - - Trading size # noqa: E501 - - :param size: The size of this FuturesTrade. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def price(self): - """Gets the price of this FuturesTrade. # noqa: E501 - - Trading price (quote currency) # noqa: E501 - - :return: The price of this FuturesTrade. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this FuturesTrade. - - Trading price (quote currency) # noqa: E501 - - :param price: The price of this FuturesTrade. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def is_internal(self): - """Gets the is_internal of this FuturesTrade. # noqa: E501 - - Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501 - - :return: The is_internal of this FuturesTrade. # noqa: E501 - :rtype: bool - """ - return self._is_internal - - @is_internal.setter - def is_internal(self, is_internal): - """Sets the is_internal of this FuturesTrade. - - Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501 - - :param is_internal: The is_internal of this FuturesTrade. # noqa: E501 - :type: bool - """ - - self._is_internal = is_internal - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FuturesTrade): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FuturesTrade): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py deleted file mode 100644 index fff7594..0000000 --- a/gate_api/models/index_constituent.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class IndexConstituent(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'symbols': 'list[str]' - } - - attribute_map = { - 'exchange': 'exchange', - 'symbols': 'symbols' - } - - def __init__(self, exchange=None, symbols=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[str], Configuration) -> None - """IndexConstituent - a 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._symbols = None - self.discriminator = None - - if exchange is not None: - self.exchange = exchange - if symbols is not None: - self.symbols = symbols - - @property - def exchange(self): - """Gets the exchange of this IndexConstituent. # noqa: E501 - - Exchange # noqa: E501 - - :return: The exchange of this IndexConstituent. # noqa: E501 - :rtype: str - """ - return self._exchange - - @exchange.setter - def exchange(self, exchange): - """Sets the exchange of this IndexConstituent. - - Exchange # noqa: E501 - - :param exchange: The exchange of this IndexConstituent. # noqa: E501 - :type: str - """ - - self._exchange = exchange - - @property - def symbols(self): - """Gets the symbols of this IndexConstituent. # noqa: E501 - - Symbol list # noqa: E501 - - :return: The symbols of this IndexConstituent. # noqa: E501 - :rtype: list[str] - """ - return self._symbols - - @symbols.setter - def symbols(self, symbols): - """Sets the symbols of this IndexConstituent. - - Symbol list # noqa: E501 - - :param symbols: The symbols of this IndexConstituent. # noqa: E501 - :type: list[str] - """ - - self._symbols = symbols - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IndexConstituent): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, IndexConstituent): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py deleted file mode 100644 index ac2ace6..0000000 --- a/gate_api/models/insurance_record.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class InsuranceRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 't': 'int', - 'b': 'str' - } - - attribute_map = { - 't': 't', - 'b': 'b' - } - - def __init__(self, t=None, b=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, Configuration) -> None - """InsuranceRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._t = None - self._b = None - self.discriminator = None - - if t is not None: - self.t = t - if b is not None: - self.b = b - - @property - def t(self): - """Gets the t of this InsuranceRecord. # noqa: E501 - - Unix timestamp in seconds # noqa: E501 - - :return: The t of this InsuranceRecord. # noqa: E501 - :rtype: int - """ - return self._t - - @t.setter - def t(self, t): - """Sets the t of this InsuranceRecord. - - Unix timestamp in seconds # noqa: E501 - - :param t: The t of this InsuranceRecord. # noqa: E501 - :type: int - """ - - self._t = t - - @property - def b(self): - """Gets the b of this InsuranceRecord. # noqa: E501 - - Insurance balance # noqa: E501 - - :return: The b of this InsuranceRecord. # noqa: E501 - :rtype: str - """ - return self._b - - @b.setter - def b(self, b): - """Sets the b of this InsuranceRecord. - - Insurance balance # noqa: E501 - - :param b: The b of this InsuranceRecord. # noqa: E501 - :type: str - """ - - self._b = b - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InsuranceRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InsuranceRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py deleted file mode 100644 index ee4a3a9..0000000 --- a/gate_api/models/ledger_record.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class LedgerRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'txid': 'str', - 'withdraw_order_id': 'str', - 'timestamp': 'str', - 'amount': 'str', - 'currency': 'str', - 'address': 'str', - 'memo': 'str', - 'status': 'str', - 'chain': 'str' - } - - attribute_map = { - 'id': 'id', - 'txid': 'txid', - 'withdraw_order_id': 'withdraw_order_id', - 'timestamp': 'timestamp', - 'amount': 'amount', - 'currency': 'currency', - 'address': 'address', - 'memo': 'memo', - 'status': 'status', - 'chain': 'chain' - } - - def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, amount=None, currency=None, address=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """LedgerRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._txid = None - self._withdraw_order_id = None - self._timestamp = None - self._amount = None - self._currency = None - self._address = None - self._memo = None - self._status = None - self._chain = None - self.discriminator = None - - if id is not None: - self.id = id - if txid is not None: - self.txid = txid - if withdraw_order_id is not None: - self.withdraw_order_id = withdraw_order_id - if timestamp is not None: - self.timestamp = timestamp - self.amount = amount - self.currency = currency - if address is not None: - self.address = address - if memo is not None: - self.memo = memo - if status is not None: - self.status = status - self.chain = chain - - @property - def id(self): - """Gets the id of this LedgerRecord. # noqa: E501 - - Record ID # noqa: E501 - - :return: The id of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LedgerRecord. - - Record ID # noqa: E501 - - :param id: The id of this LedgerRecord. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def txid(self): - """Gets the txid of this LedgerRecord. # noqa: E501 - - Hash record of the withdrawal # noqa: E501 - - :return: The txid of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._txid - - @txid.setter - def txid(self, txid): - """Sets the txid of this LedgerRecord. - - Hash record of the withdrawal # noqa: E501 - - :param txid: The txid of this LedgerRecord. # noqa: E501 - :type: str - """ - - self._txid = txid - - @property - def withdraw_order_id(self): - """Gets the withdraw_order_id of this LedgerRecord. # noqa: E501 - - Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :return: The withdraw_order_id of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._withdraw_order_id - - @withdraw_order_id.setter - def withdraw_order_id(self, withdraw_order_id): - """Sets the withdraw_order_id of this LedgerRecord. - - Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :param withdraw_order_id: The withdraw_order_id of this LedgerRecord. # noqa: E501 - :type: str - """ - - self._withdraw_order_id = withdraw_order_id - - @property - def timestamp(self): - """Gets the timestamp of this LedgerRecord. # noqa: E501 - - Operation time # noqa: E501 - - :return: The timestamp of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this LedgerRecord. - - Operation time # noqa: E501 - - :param timestamp: The timestamp of this LedgerRecord. # noqa: E501 - :type: str - """ - - self._timestamp = timestamp - - @property - def amount(self): - """Gets the amount of this LedgerRecord. # noqa: E501 - - Currency amount # noqa: E501 - - :return: The amount of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this LedgerRecord. - - Currency amount # noqa: E501 - - :param amount: The amount of this LedgerRecord. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def currency(self): - """Gets the currency of this LedgerRecord. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this LedgerRecord. - - Currency name # noqa: E501 - - :param currency: The currency of this LedgerRecord. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def address(self): - """Gets the address of this LedgerRecord. # noqa: E501 - - Withdrawal address. Required for withdrawals # noqa: E501 - - :return: The address of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this LedgerRecord. - - Withdrawal address. Required for withdrawals # noqa: E501 - - :param address: The address of this LedgerRecord. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def memo(self): - """Gets the memo of this LedgerRecord. # noqa: E501 - - Additional remarks with regards to the withdrawal # noqa: E501 - - :return: The memo of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._memo - - @memo.setter - def memo(self, memo): - """Sets the memo of this LedgerRecord. - - Additional remarks with regards to the withdrawal # noqa: E501 - - :param memo: The memo of this LedgerRecord. # noqa: E501 - :type: str - """ - - self._memo = memo - - @property - def status(self): - """Gets the status of this LedgerRecord. # noqa: E501 - - Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval # noqa: E501 - - :return: The status of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this LedgerRecord. - - Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval # noqa: E501 - - :param status: The status of this LedgerRecord. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def chain(self): - """Gets the chain of this LedgerRecord. # noqa: E501 - - Name of the chain used in withdrawals # noqa: E501 - - :return: The chain of this LedgerRecord. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this LedgerRecord. - - Name of the chain used in withdrawals # noqa: E501 - - :param chain: The chain of this LedgerRecord. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and chain is None: # noqa: E501 - raise ValueError("Invalid value for `chain`, must not be `None`") # noqa: E501 - - self._chain = chain - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LedgerRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LedgerRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py deleted file mode 100644 index 08b3ae6..0000000 --- a/gate_api/models/liquidate_order.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class LiquidateOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'text': 'str', - 'currency_pair': 'str', - 'amount': 'str', - 'price': 'str', - 'action_mode': 'str' - } - - attribute_map = { - 'text': 'text', - 'currency_pair': 'currency_pair', - 'amount': 'amount', - 'price': 'price', - 'action_mode': 'action_mode' - } - - def __init__(self, text=None, currency_pair=None, amount=None, price=None, action_mode=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """LiquidateOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._text = None - self._currency_pair = None - self._amount = None - self._price = None - self._action_mode = None - self.discriminator = None - - if text is not None: - self.text = text - self.currency_pair = currency_pair - self.amount = amount - self.price = price - if action_mode is not None: - self.action_mode = action_mode - - @property - def text(self): - """Gets the text of this LiquidateOrder. # noqa: E501 - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :return: The text of this LiquidateOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this LiquidateOrder. - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :param text: The text of this LiquidateOrder. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def currency_pair(self): - """Gets the currency_pair of this LiquidateOrder. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this LiquidateOrder. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this LiquidateOrder. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this LiquidateOrder. # 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 amount(self): - """Gets the amount of this LiquidateOrder. # noqa: E501 - - Trade amount # noqa: E501 - - :return: The amount of this LiquidateOrder. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this LiquidateOrder. - - Trade amount # noqa: E501 - - :param amount: The amount of this LiquidateOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def price(self): - """Gets the price of this LiquidateOrder. # noqa: E501 - - Order price # noqa: E501 - - :return: The price of this LiquidateOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this LiquidateOrder. - - Order price # noqa: E501 - - :param price: The price of this LiquidateOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 - raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 - - self._price = price - - @property - def action_mode(self): - """Gets the action_mode of this LiquidateOrder. # noqa: E501 - - Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :return: The action_mode of this LiquidateOrder. # noqa: E501 - :rtype: str - """ - return self._action_mode - - @action_mode.setter - def action_mode(self, action_mode): - """Sets the action_mode of this LiquidateOrder. - - Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :param action_mode: The action_mode of this LiquidateOrder. # noqa: E501 - :type: str - """ - - self._action_mode = action_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LiquidateOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LiquidateOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py deleted file mode 100644 index f805980..0000000 --- a/gate_api/models/margin_account.py +++ /dev/null @@ -1,315 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MarginAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'account_type': 'str', - 'leverage': 'str', - 'locked': 'bool', - 'risk': 'str', - 'mmr': 'str', - 'base': 'MarginAccountCurrency', - 'quote': 'MarginAccountCurrency' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'account_type': 'account_type', - 'leverage': 'leverage', - 'locked': 'locked', - 'risk': 'risk', - 'mmr': 'mmr', - 'base': 'base', - 'quote': 'quote' - } - - def __init__(self, currency_pair=None, account_type=None, leverage=None, locked=None, risk=None, mmr=None, base=None, quote=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, bool, str, str, MarginAccountCurrency, MarginAccountCurrency, Configuration) -> None - """MarginAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pair = None - self._account_type = None - self._leverage = None - self._locked = None - self._risk = None - self._mmr = None - self._base = None - self._quote = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if account_type is not None: - self.account_type = account_type - if leverage is not None: - self.leverage = leverage - if locked is not None: - self.locked = locked - if risk is not None: - self.risk = risk - if mmr is not None: - self.mmr = mmr - if base is not None: - self.base = base - if quote is not None: - self.quote = quote - - @property - def currency_pair(self): - """Gets the currency_pair of this MarginAccount. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this MarginAccount. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this MarginAccount. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this MarginAccount. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def account_type(self): - """Gets the account_type of this MarginAccount. # noqa: E501 - - Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 - - :return: The account_type of this MarginAccount. # noqa: E501 - :rtype: str - """ - return self._account_type - - @account_type.setter - def account_type(self, account_type): - """Sets the account_type of this MarginAccount. - - Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 - - :param account_type: The account_type of this MarginAccount. # noqa: E501 - :type: str - """ - - self._account_type = account_type - - @property - def leverage(self): - """Gets the leverage of this MarginAccount. # noqa: E501 - - User current market leverage multiple # noqa: E501 - - :return: The leverage of this MarginAccount. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this MarginAccount. - - User current market leverage multiple # noqa: E501 - - :param leverage: The leverage of this MarginAccount. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def locked(self): - """Gets the locked of this MarginAccount. # noqa: E501 - - Whether account is locked # noqa: E501 - - :return: The locked of this MarginAccount. # noqa: E501 - :rtype: bool - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this MarginAccount. - - Whether account is locked # noqa: E501 - - :param locked: The locked of this MarginAccount. # noqa: E501 - :type: bool - """ - - self._locked = locked - - @property - def risk(self): - """Gets the risk of this MarginAccount. # noqa: E501 - - Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) # noqa: E501 - - :return: The risk of this MarginAccount. # noqa: E501 - :rtype: str - """ - return self._risk - - @risk.setter - def risk(self, risk): - """Sets the risk of this MarginAccount. - - Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) # noqa: E501 - - :param risk: The risk of this MarginAccount. # noqa: E501 - :type: str - """ - - self._risk = risk - - @property - def mmr(self): - """Gets the mmr of this MarginAccount. # noqa: E501 - - Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) # noqa: E501 - - :return: The mmr of this MarginAccount. # noqa: E501 - :rtype: str - """ - return self._mmr - - @mmr.setter - def mmr(self, mmr): - """Sets the mmr of this MarginAccount. - - Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) # noqa: E501 - - :param mmr: The mmr of this MarginAccount. # noqa: E501 - :type: str - """ - - self._mmr = mmr - - @property - def base(self): - """Gets the base of this MarginAccount. # noqa: E501 - - - :return: The base of this MarginAccount. # noqa: E501 - :rtype: MarginAccountCurrency - """ - return self._base - - @base.setter - def base(self, base): - """Sets the base of this MarginAccount. - - - :param base: The base of this MarginAccount. # noqa: E501 - :type: MarginAccountCurrency - """ - - self._base = base - - @property - def quote(self): - """Gets the quote of this MarginAccount. # noqa: E501 - - - :return: The quote of this MarginAccount. # noqa: E501 - :rtype: MarginAccountCurrency - """ - return self._quote - - @quote.setter - def quote(self, quote): - """Sets the quote of this MarginAccount. - - - :param quote: The quote of this MarginAccount. # noqa: E501 - :type: MarginAccountCurrency - """ - - self._quote = quote - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MarginAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MarginAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py deleted file mode 100644 index 044bd9a..0000000 --- a/gate_api/models/margin_account_book.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MarginAccountBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'time': 'str', - 'time_ms': 'int', - 'currency': 'str', - 'currency_pair': 'str', - 'change': 'str', - 'balance': 'str', - 'type': 'str' - } - - attribute_map = { - 'id': 'id', - 'time': 'time', - 'time_ms': 'time_ms', - 'currency': 'currency', - 'currency_pair': 'currency_pair', - 'change': 'change', - 'balance': 'balance', - 'type': 'type' - } - - def __init__(self, id=None, time=None, time_ms=None, currency=None, currency_pair=None, change=None, balance=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, int, str, str, str, str, str, Configuration) -> None - """MarginAccountBook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._time = None - self._time_ms = None - self._currency = None - self._currency_pair = None - self._change = None - self._balance = None - self._type = None - self.discriminator = None - - if id is not None: - self.id = id - if time is not None: - self.time = time - if time_ms is not None: - self.time_ms = time_ms - if currency is not None: - self.currency = currency - if currency_pair is not None: - self.currency_pair = currency_pair - if change is not None: - self.change = change - if balance is not None: - self.balance = balance - if type is not None: - self.type = type - - @property - def id(self): - """Gets the id of this MarginAccountBook. # noqa: E501 - - Balance change record ID # noqa: E501 - - :return: The id of this MarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this MarginAccountBook. - - Balance change record ID # noqa: E501 - - :param id: The id of this MarginAccountBook. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def time(self): - """Gets the time of this MarginAccountBook. # noqa: E501 - - Balance changed timestamp # noqa: E501 - - :return: The time of this MarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this MarginAccountBook. - - Balance changed timestamp # noqa: E501 - - :param time: The time of this MarginAccountBook. # noqa: E501 - :type: str - """ - - self._time = time - - @property - def time_ms(self): - """Gets the time_ms of this MarginAccountBook. # noqa: E501 - - The timestamp of the change (in milliseconds) # noqa: E501 - - :return: The time_ms of this MarginAccountBook. # noqa: E501 - :rtype: int - """ - return self._time_ms - - @time_ms.setter - def time_ms(self, time_ms): - """Sets the time_ms of this MarginAccountBook. - - The timestamp of the change (in milliseconds) # noqa: E501 - - :param time_ms: The time_ms of this MarginAccountBook. # noqa: E501 - :type: int - """ - - self._time_ms = time_ms - - @property - def currency(self): - """Gets the currency of this MarginAccountBook. # noqa: E501 - - Currency changed # noqa: E501 - - :return: The currency of this MarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MarginAccountBook. - - Currency changed # noqa: E501 - - :param currency: The currency of this MarginAccountBook. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def currency_pair(self): - """Gets the currency_pair of this MarginAccountBook. # noqa: E501 - - Account currency pair # noqa: E501 - - :return: The currency_pair of this MarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this MarginAccountBook. - - Account currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this MarginAccountBook. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def change(self): - """Gets the change of this MarginAccountBook. # noqa: E501 - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :return: The change of this MarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this MarginAccountBook. - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :param change: The change of this MarginAccountBook. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def balance(self): - """Gets the balance of this MarginAccountBook. # noqa: E501 - - Balance after change # noqa: E501 - - :return: The balance of this MarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this MarginAccountBook. - - Balance after change # noqa: E501 - - :param balance: The balance of this MarginAccountBook. # noqa: E501 - :type: str - """ - - self._balance = balance - - @property - def type(self): - """Gets the type of this MarginAccountBook. # noqa: E501 - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :return: The type of this MarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this MarginAccountBook. - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :param type: The type of this MarginAccountBook. # noqa: E501 - :type: str - """ - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MarginAccountBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MarginAccountBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py deleted file mode 100644 index 7c727fd..0000000 --- a/gate_api/models/margin_account_currency.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MarginAccountCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'borrowed': 'str', - 'interest': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'available': 'available', - 'locked': 'locked', - 'borrowed': 'borrowed', - 'interest': 'interest' - } - - def __init__(self, currency=None, available=None, locked=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """MarginAccountCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._available = None - self._locked = None - self._borrowed = None - self._interest = 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 borrowed is not None: - self.borrowed = borrowed - if interest is not None: - self.interest = interest - - @property - def currency(self): - """Gets the currency of this MarginAccountCurrency. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this MarginAccountCurrency. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MarginAccountCurrency. - - Currency name # noqa: E501 - - :param currency: The currency of this MarginAccountCurrency. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def available(self): - """Gets the available of this MarginAccountCurrency. # noqa: E501 - - Amount suitable for margin trading. # noqa: E501 - - :return: The available of this MarginAccountCurrency. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this MarginAccountCurrency. - - Amount suitable for margin trading. # noqa: E501 - - :param available: The available of this MarginAccountCurrency. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def locked(self): - """Gets the locked of this MarginAccountCurrency. # noqa: E501 - - Locked amount, used in margin trading # noqa: E501 - - :return: The locked of this MarginAccountCurrency. # noqa: E501 - :rtype: str - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this MarginAccountCurrency. - - Locked amount, used in margin trading # noqa: E501 - - :param locked: The locked of this MarginAccountCurrency. # noqa: E501 - :type: str - """ - - self._locked = locked - - @property - def borrowed(self): - """Gets the borrowed of this MarginAccountCurrency. # noqa: E501 - - Borrowed amount # noqa: E501 - - :return: The borrowed of this MarginAccountCurrency. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this MarginAccountCurrency. - - Borrowed amount # noqa: E501 - - :param borrowed: The borrowed of this MarginAccountCurrency. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def interest(self): - """Gets the interest of this MarginAccountCurrency. # noqa: E501 - - Unpaid interests # noqa: E501 - - :return: The interest of this MarginAccountCurrency. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this MarginAccountCurrency. - - Unpaid interests # noqa: E501 - - :param interest: The interest of this MarginAccountCurrency. # noqa: E501 - :type: str - """ - - self._interest = interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MarginAccountCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MarginAccountCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py deleted file mode 100644 index 7628994..0000000 --- a/gate_api/models/margin_leverage_tier.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MarginLeverageTier(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'upper_limit': 'str', - 'mmr': 'str', - 'leverage': 'str' - } - - attribute_map = { - 'upper_limit': 'upper_limit', - 'mmr': 'mmr', - 'leverage': 'leverage' - } - - def __init__(self, upper_limit=None, mmr=None, leverage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """MarginLeverageTier - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._upper_limit = None - self._mmr = None - self._leverage = None - self.discriminator = None - - if upper_limit is not None: - self.upper_limit = upper_limit - if mmr is not None: - self.mmr = mmr - if leverage is not None: - self.leverage = leverage - - @property - def upper_limit(self): - """Gets the upper_limit of this MarginLeverageTier. # noqa: E501 - - Maximum loan limit # noqa: E501 - - :return: The upper_limit of this MarginLeverageTier. # noqa: E501 - :rtype: str - """ - return self._upper_limit - - @upper_limit.setter - def upper_limit(self, upper_limit): - """Sets the upper_limit of this MarginLeverageTier. - - Maximum loan limit # noqa: E501 - - :param upper_limit: The upper_limit of this MarginLeverageTier. # noqa: E501 - :type: str - """ - - self._upper_limit = upper_limit - - @property - def mmr(self): - """Gets the mmr of this MarginLeverageTier. # noqa: E501 - - Maintenance margin rate # noqa: E501 - - :return: The mmr of this MarginLeverageTier. # noqa: E501 - :rtype: str - """ - return self._mmr - - @mmr.setter - def mmr(self, mmr): - """Sets the mmr of this MarginLeverageTier. - - Maintenance margin rate # noqa: E501 - - :param mmr: The mmr of this MarginLeverageTier. # noqa: E501 - :type: str - """ - - self._mmr = mmr - - @property - def leverage(self): - """Gets the leverage of this MarginLeverageTier. # noqa: E501 - - Maximum leverage multiple # noqa: E501 - - :return: The leverage of this MarginLeverageTier. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this MarginLeverageTier. - - Maximum leverage multiple # noqa: E501 - - :param leverage: The leverage of this MarginLeverageTier. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MarginLeverageTier): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MarginLeverageTier): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py deleted file mode 100644 index b8c8dda..0000000 --- a/gate_api/models/margin_market_leverage.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MarginMarketLeverage(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency_pair': 'str', - 'leverage': 'str' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'leverage': 'leverage' - } - - def __init__(self, currency_pair=None, leverage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """MarginMarketLeverage - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pair = None - self._leverage = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - self.leverage = leverage - - @property - def currency_pair(self): - """Gets the currency_pair of this MarginMarketLeverage. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this MarginMarketLeverage. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this MarginMarketLeverage. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this MarginMarketLeverage. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def leverage(self): - """Gets the leverage of this MarginMarketLeverage. # noqa: E501 - - Position leverage # noqa: E501 - - :return: The leverage of this MarginMarketLeverage. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this MarginMarketLeverage. - - Position leverage # noqa: E501 - - :param leverage: The leverage of this MarginMarketLeverage. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501 - raise ValueError("Invalid value for `leverage`, must not be `None`") # noqa: E501 - - self._leverage = leverage - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MarginMarketLeverage): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MarginMarketLeverage): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py deleted file mode 100644 index 7ba2e3b..0000000 --- a/gate_api/models/margin_tiers.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MarginTiers(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'tier': 'str', - 'margin_rate': 'str', - 'lower_limit': 'str', - 'upper_limit': 'str', - 'leverage': 'str' - } - - attribute_map = { - 'tier': 'tier', - 'margin_rate': 'margin_rate', - 'lower_limit': 'lower_limit', - 'upper_limit': 'upper_limit', - 'leverage': 'leverage' - } - - def __init__(self, tier=None, margin_rate=None, lower_limit=None, upper_limit=None, leverage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """MarginTiers - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._tier = None - self._margin_rate = None - self._lower_limit = None - self._upper_limit = None - self._leverage = None - self.discriminator = None - - if tier is not None: - self.tier = tier - if margin_rate is not None: - self.margin_rate = margin_rate - if lower_limit is not None: - self.lower_limit = lower_limit - if upper_limit is not None: - self.upper_limit = upper_limit - if leverage is not None: - self.leverage = leverage - - @property - def tier(self): - """Gets the tier of this MarginTiers. # noqa: E501 - - Tier # noqa: E501 - - :return: The tier of this MarginTiers. # noqa: E501 - :rtype: str - """ - return self._tier - - @tier.setter - def tier(self, tier): - """Sets the tier of this MarginTiers. - - Tier # noqa: E501 - - :param tier: The tier of this MarginTiers. # noqa: E501 - :type: str - """ - - self._tier = tier - - @property - def margin_rate(self): - """Gets the margin_rate of this MarginTiers. # noqa: E501 - - Discount # noqa: E501 - - :return: The margin_rate of this MarginTiers. # noqa: E501 - :rtype: str - """ - return self._margin_rate - - @margin_rate.setter - def margin_rate(self, margin_rate): - """Sets the margin_rate of this MarginTiers. - - Discount # noqa: E501 - - :param margin_rate: The margin_rate of this MarginTiers. # noqa: E501 - :type: str - """ - - self._margin_rate = margin_rate - - @property - def lower_limit(self): - """Gets the lower_limit of this MarginTiers. # noqa: E501 - - Lower limit # noqa: E501 - - :return: The lower_limit of this MarginTiers. # noqa: E501 - :rtype: str - """ - return self._lower_limit - - @lower_limit.setter - def lower_limit(self, lower_limit): - """Sets the lower_limit of this MarginTiers. - - Lower limit # noqa: E501 - - :param lower_limit: The lower_limit of this MarginTiers. # noqa: E501 - :type: str - """ - - self._lower_limit = lower_limit - - @property - def upper_limit(self): - """Gets the upper_limit of this MarginTiers. # noqa: E501 - - Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 - - :return: The upper_limit of this MarginTiers. # noqa: E501 - :rtype: str - """ - return self._upper_limit - - @upper_limit.setter - def upper_limit(self, upper_limit): - """Sets the upper_limit of this MarginTiers. - - Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 - - :param upper_limit: The upper_limit of this MarginTiers. # noqa: E501 - :type: str - """ - - self._upper_limit = upper_limit - - @property - def leverage(self): - """Gets the leverage of this MarginTiers. # noqa: E501 - - Position leverage # noqa: E501 - - :return: The leverage of this MarginTiers. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this MarginTiers. - - Position leverage # noqa: E501 - - :param leverage: The leverage of this MarginTiers. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MarginTiers): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MarginTiers): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py deleted file mode 100644 index 475eb4a..0000000 --- a/gate_api/models/margin_transferable.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MarginTransferable(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'currency_pair': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'currency_pair': 'currency_pair', - 'amount': 'amount' - } - - def __init__(self, currency=None, currency_pair=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """MarginTransferable - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._currency_pair = None - self._amount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if currency_pair is not None: - self.currency_pair = currency_pair - if amount is not None: - self.amount = amount - - @property - def currency(self): - """Gets the currency of this MarginTransferable. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this MarginTransferable. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MarginTransferable. - - Currency detail # noqa: E501 - - :param currency: The currency of this MarginTransferable. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def currency_pair(self): - """Gets the currency_pair of this MarginTransferable. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this MarginTransferable. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this MarginTransferable. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this MarginTransferable. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def amount(self): - """Gets the amount of this MarginTransferable. # noqa: E501 - - Max transferable amount # noqa: E501 - - :return: The amount of this MarginTransferable. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this MarginTransferable. - - Max transferable amount # noqa: E501 - - :param amount: The amount of this MarginTransferable. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MarginTransferable): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MarginTransferable): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py deleted file mode 100644 index 308cd25..0000000 --- a/gate_api/models/max_uni_borrowable.py +++ /dev/null @@ -1,181 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MaxUniBorrowable(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'currency_pair': 'str', - 'borrowable': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'currency_pair': 'currency_pair', - 'borrowable': 'borrowable' - } - - def __init__(self, currency=None, currency_pair=None, borrowable=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """MaxUniBorrowable - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._currency_pair = None - self._borrowable = None - self.discriminator = None - - self.currency = currency - if currency_pair is not None: - self.currency_pair = currency_pair - self.borrowable = borrowable - - @property - def currency(self): - """Gets the currency of this MaxUniBorrowable. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this MaxUniBorrowable. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MaxUniBorrowable. - - Currency # noqa: E501 - - :param currency: The currency of this MaxUniBorrowable. # 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 currency_pair(self): - """Gets the currency_pair of this MaxUniBorrowable. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this MaxUniBorrowable. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this MaxUniBorrowable. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this MaxUniBorrowable. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def borrowable(self): - """Gets the borrowable of this MaxUniBorrowable. # noqa: E501 - - Maximum borrowable # noqa: E501 - - :return: The borrowable of this MaxUniBorrowable. # noqa: E501 - :rtype: str - """ - return self._borrowable - - @borrowable.setter - def borrowable(self, borrowable): - """Sets the borrowable of this MaxUniBorrowable. - - Maximum borrowable # noqa: E501 - - :param borrowable: The borrowable of this MaxUniBorrowable. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and borrowable is None: # noqa: E501 - raise ValueError("Invalid value for `borrowable`, must not be `None`") # noqa: E501 - - self._borrowable = borrowable - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MaxUniBorrowable): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MaxUniBorrowable): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py deleted file mode 100644 index 7686660..0000000 --- a/gate_api/models/mock_futures_order.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockFuturesOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'contract': 'str', - 'size': 'str', - 'left': 'str' - } - - attribute_map = { - 'contract': 'contract', - 'size': 'size', - 'left': 'left' - } - - def __init__(self, contract=None, size=None, left=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """MockFuturesOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._contract = None - self._size = None - self._left = None - self.discriminator = None - - self.contract = contract - self.size = size - self.left = left - - @property - def contract(self): - """Gets the contract of this MockFuturesOrder. # noqa: E501 - - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 - - :return: The contract of this MockFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this MockFuturesOrder. - - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 - - :param contract: The contract of this MockFuturesOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 - raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 - - self._contract = contract - - @property - def size(self): - """Gets the size of this MockFuturesOrder. # noqa: E501 - - Futures quantity, representing the initial order quantity, not involved in actual settlement. # noqa: E501 - - :return: The size of this MockFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this MockFuturesOrder. - - Futures quantity, representing the initial order quantity, not involved in actual settlement. # noqa: E501 - - :param size: The size of this MockFuturesOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - @property - def left(self): - """Gets the left of this MockFuturesOrder. # noqa: E501 - - Unfilled contract quantity, involved in actual calculation # noqa: E501 - - :return: The left of this MockFuturesOrder. # noqa: E501 - :rtype: str - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this MockFuturesOrder. - - Unfilled contract quantity, involved in actual calculation # noqa: E501 - - :param left: The left of this MockFuturesOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501 - raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501 - - self._left = left - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockFuturesOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockFuturesOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py deleted file mode 100644 index c6e645c..0000000 --- a/gate_api/models/mock_futures_position.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockFuturesPosition(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'contract': 'str', - 'size': 'str' - } - - attribute_map = { - 'contract': 'contract', - 'size': 'size' - } - - def __init__(self, contract=None, size=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """MockFuturesPosition - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._contract = None - self._size = None - self.discriminator = None - - self.contract = contract - self.size = size - - @property - def contract(self): - """Gets the contract of this MockFuturesPosition. # noqa: E501 - - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 - - :return: The contract of this MockFuturesPosition. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this MockFuturesPosition. - - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 - - :param contract: The contract of this MockFuturesPosition. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 - raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 - - self._contract = contract - - @property - def size(self): - """Gets the size of this MockFuturesPosition. # noqa: E501 - - Position size, measured in contract units. # noqa: E501 - - :return: The size of this MockFuturesPosition. # noqa: E501 - :rtype: str - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this MockFuturesPosition. - - Position size, measured in contract units. # noqa: E501 - - :param size: The size of this MockFuturesPosition. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockFuturesPosition): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockFuturesPosition): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py deleted file mode 100644 index 232b895..0000000 --- a/gate_api/models/mock_margin_result.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockMarginResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'profit_loss_ranges': 'list[ProfitLossRange]', - 'max_loss': 'ProfitLossRange', - 'mr1': 'str', - 'mr2': 'str', - 'mr3': 'str', - 'mr4': 'str' - } - - attribute_map = { - 'type': 'type', - 'profit_loss_ranges': 'profit_loss_ranges', - 'max_loss': 'max_loss', - 'mr1': 'mr1', - 'mr2': 'mr2', - 'mr3': 'mr3', - 'mr4': 'mr4' - } - - def __init__(self, type=None, profit_loss_ranges=None, max_loss=None, mr1=None, mr2=None, mr3=None, mr4=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[ProfitLossRange], ProfitLossRange, str, str, str, str, Configuration) -> None - """MockMarginResult - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._profit_loss_ranges = None - self._max_loss = None - self._mr1 = None - self._mr2 = None - self._mr3 = None - self._mr4 = None - self.discriminator = None - - if type is not None: - self.type = type - if profit_loss_ranges is not None: - self.profit_loss_ranges = profit_loss_ranges - if max_loss is not None: - self.max_loss = max_loss - if mr1 is not None: - self.mr1 = mr1 - if mr2 is not None: - self.mr2 = mr2 - if mr3 is not None: - self.mr3 = mr3 - if mr4 is not None: - self.mr4 = mr4 - - @property - def type(self): - """Gets the type of this MockMarginResult. # noqa: E501 - - Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 - - :return: The type of this MockMarginResult. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this MockMarginResult. - - Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 - - :param type: The type of this MockMarginResult. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def profit_loss_ranges(self): - """Gets the profit_loss_ranges of this MockMarginResult. # noqa: E501 - - The results of 33 pressure scenarios for MR1 # noqa: E501 - - :return: The profit_loss_ranges of this MockMarginResult. # noqa: E501 - :rtype: list[ProfitLossRange] - """ - return self._profit_loss_ranges - - @profit_loss_ranges.setter - def profit_loss_ranges(self, profit_loss_ranges): - """Sets the profit_loss_ranges of this MockMarginResult. - - The results of 33 pressure scenarios for MR1 # noqa: E501 - - :param profit_loss_ranges: The profit_loss_ranges of this MockMarginResult. # noqa: E501 - :type: list[ProfitLossRange] - """ - - self._profit_loss_ranges = profit_loss_ranges - - @property - def max_loss(self): - """Gets the max_loss of this MockMarginResult. # noqa: E501 - - 最大损失 # noqa: E501 - - :return: The max_loss of this MockMarginResult. # noqa: E501 - :rtype: ProfitLossRange - """ - return self._max_loss - - @max_loss.setter - def max_loss(self, max_loss): - """Sets the max_loss of this MockMarginResult. - - 最大损失 # noqa: E501 - - :param max_loss: The max_loss of this MockMarginResult. # noqa: E501 - :type: ProfitLossRange - """ - - self._max_loss = max_loss - - @property - def mr1(self): - """Gets the mr1 of this MockMarginResult. # noqa: E501 - - Stress testing # noqa: E501 - - :return: The mr1 of this MockMarginResult. # noqa: E501 - :rtype: str - """ - return self._mr1 - - @mr1.setter - def mr1(self, mr1): - """Sets the mr1 of this MockMarginResult. - - Stress testing # noqa: E501 - - :param mr1: The mr1 of this MockMarginResult. # noqa: E501 - :type: str - """ - - self._mr1 = mr1 - - @property - def mr2(self): - """Gets the mr2 of this MockMarginResult. # noqa: E501 - - Basis spread risk # noqa: E501 - - :return: The mr2 of this MockMarginResult. # noqa: E501 - :rtype: str - """ - return self._mr2 - - @mr2.setter - def mr2(self, mr2): - """Sets the mr2 of this MockMarginResult. - - Basis spread risk # noqa: E501 - - :param mr2: The mr2 of this MockMarginResult. # noqa: E501 - :type: str - """ - - self._mr2 = mr2 - - @property - def mr3(self): - """Gets the mr3 of this MockMarginResult. # noqa: E501 - - Volatility spread risk # noqa: E501 - - :return: The mr3 of this MockMarginResult. # noqa: E501 - :rtype: str - """ - return self._mr3 - - @mr3.setter - def mr3(self, mr3): - """Sets the mr3 of this MockMarginResult. - - Volatility spread risk # noqa: E501 - - :param mr3: The mr3 of this MockMarginResult. # noqa: E501 - :type: str - """ - - self._mr3 = mr3 - - @property - def mr4(self): - """Gets the mr4 of this MockMarginResult. # noqa: E501 - - Option short risk # noqa: E501 - - :return: The mr4 of this MockMarginResult. # noqa: E501 - :rtype: str - """ - return self._mr4 - - @mr4.setter - def mr4(self, mr4): - """Sets the mr4 of this MockMarginResult. - - Option short risk # noqa: E501 - - :param mr4: The mr4 of this MockMarginResult. # noqa: E501 - :type: str - """ - - self._mr4 = mr4 - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockMarginResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockMarginResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py deleted file mode 100644 index 4c9548e..0000000 --- a/gate_api/models/mock_options_order.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockOptionsOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'options_name': 'str', - 'size': 'str', - 'left': 'str' - } - - attribute_map = { - 'options_name': 'options_name', - 'size': 'size', - 'left': 'left' - } - - def __init__(self, options_name=None, size=None, left=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """MockOptionsOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._options_name = None - self._size = None - self._left = None - self.discriminator = None - - self.options_name = options_name - self.size = size - self.left = left - - @property - def options_name(self): - """Gets the options_name of this MockOptionsOrder. # noqa: E501 - - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 - - :return: The options_name of this MockOptionsOrder. # noqa: E501 - :rtype: str - """ - return self._options_name - - @options_name.setter - def options_name(self, options_name): - """Sets the options_name of this MockOptionsOrder. - - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 - - :param options_name: The options_name of this MockOptionsOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and options_name is None: # noqa: E501 - raise ValueError("Invalid value for `options_name`, must not be `None`") # noqa: E501 - - self._options_name = options_name - - @property - def size(self): - """Gets the size of this MockOptionsOrder. # noqa: E501 - - Initial order quantity, not involved in actual calculation # noqa: E501 - - :return: The size of this MockOptionsOrder. # noqa: E501 - :rtype: str - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this MockOptionsOrder. - - Initial order quantity, not involved in actual calculation # noqa: E501 - - :param size: The size of this MockOptionsOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - @property - def left(self): - """Gets the left of this MockOptionsOrder. # noqa: E501 - - Unfilled contract quantity, involved in actual calculation # noqa: E501 - - :return: The left of this MockOptionsOrder. # noqa: E501 - :rtype: str - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this MockOptionsOrder. - - Unfilled contract quantity, involved in actual calculation # noqa: E501 - - :param left: The left of this MockOptionsOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501 - raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501 - - self._left = left - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockOptionsOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockOptionsOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py deleted file mode 100644 index 79b310d..0000000 --- a/gate_api/models/mock_options_position.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockOptionsPosition(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'options_name': 'str', - 'size': 'str' - } - - attribute_map = { - 'options_name': 'options_name', - 'size': 'size' - } - - def __init__(self, options_name=None, size=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """MockOptionsPosition - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._options_name = None - self._size = None - self.discriminator = None - - self.options_name = options_name - self.size = size - - @property - def options_name(self): - """Gets the options_name of this MockOptionsPosition. # noqa: E501 - - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 - - :return: The options_name of this MockOptionsPosition. # noqa: E501 - :rtype: str - """ - return self._options_name - - @options_name.setter - def options_name(self, options_name): - """Sets the options_name of this MockOptionsPosition. - - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 - - :param options_name: The options_name of this MockOptionsPosition. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and options_name is None: # noqa: E501 - raise ValueError("Invalid value for `options_name`, must not be `None`") # noqa: E501 - - self._options_name = options_name - - @property - def size(self): - """Gets the size of this MockOptionsPosition. # noqa: E501 - - Position size, measured in contract units. # noqa: E501 - - :return: The size of this MockOptionsPosition. # noqa: E501 - :rtype: str - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this MockOptionsPosition. - - Position size, measured in contract units. # noqa: E501 - - :param size: The size of this MockOptionsPosition. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockOptionsPosition): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockOptionsPosition): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py deleted file mode 100644 index 4c32074..0000000 --- a/gate_api/models/mock_risk_unit.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockRiskUnit(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'symbol': 'str', - 'spot_in_use': 'str', - 'maintain_margin': 'str', - 'initial_margin': 'str', - 'margin_result': 'list[MockMarginResult]', - 'delta': 'str', - 'gamma': 'str', - 'theta': 'str', - 'vega': 'str' - } - - attribute_map = { - 'symbol': 'symbol', - 'spot_in_use': 'spot_in_use', - 'maintain_margin': 'maintain_margin', - 'initial_margin': 'initial_margin', - 'margin_result': 'margin_result', - 'delta': 'delta', - 'gamma': 'gamma', - 'theta': 'theta', - 'vega': 'vega' - } - - def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_margin=None, margin_result=None, delta=None, gamma=None, theta=None, vega=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, list[MockMarginResult], str, str, str, str, Configuration) -> None - """MockRiskUnit - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._symbol = None - self._spot_in_use = None - self._maintain_margin = None - self._initial_margin = None - self._margin_result = None - self._delta = None - self._gamma = None - self._theta = None - self._vega = None - self.discriminator = None - - if symbol is not None: - self.symbol = symbol - if spot_in_use is not None: - self.spot_in_use = spot_in_use - if maintain_margin is not None: - self.maintain_margin = maintain_margin - if initial_margin is not None: - self.initial_margin = initial_margin - if margin_result is not None: - self.margin_result = margin_result - if delta is not None: - self.delta = delta - if gamma is not None: - self.gamma = gamma - if theta is not None: - self.theta = theta - if vega is not None: - self.vega = vega - - @property - def symbol(self): - """Gets the symbol of this MockRiskUnit. # noqa: E501 - - Risk unit name # noqa: E501 - - :return: The symbol of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._symbol - - @symbol.setter - def symbol(self, symbol): - """Sets the symbol of this MockRiskUnit. - - Risk unit name # noqa: E501 - - :param symbol: The symbol of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._symbol = symbol - - @property - def spot_in_use(self): - """Gets the spot_in_use of this MockRiskUnit. # noqa: E501 - - Spot usage # noqa: E501 - - :return: The spot_in_use of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._spot_in_use - - @spot_in_use.setter - def spot_in_use(self, spot_in_use): - """Sets the spot_in_use of this MockRiskUnit. - - Spot usage # noqa: E501 - - :param spot_in_use: The spot_in_use of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._spot_in_use = spot_in_use - - @property - def maintain_margin(self): - """Gets the maintain_margin of this MockRiskUnit. # noqa: E501 - - Maintenance margin # noqa: E501 - - :return: The maintain_margin of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._maintain_margin - - @maintain_margin.setter - def maintain_margin(self, maintain_margin): - """Sets the maintain_margin of this MockRiskUnit. - - Maintenance margin # noqa: E501 - - :param maintain_margin: The maintain_margin of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._maintain_margin = maintain_margin - - @property - def initial_margin(self): - """Gets the initial_margin of this MockRiskUnit. # noqa: E501 - - Initial margin # noqa: E501 - - :return: The initial_margin of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._initial_margin - - @initial_margin.setter - def initial_margin(self, initial_margin): - """Sets the initial_margin of this MockRiskUnit. - - Initial margin # noqa: E501 - - :param initial_margin: The initial_margin of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._initial_margin = initial_margin - - @property - def margin_result(self): - """Gets the margin_result of this MockRiskUnit. # noqa: E501 - - Margin result # noqa: E501 - - :return: The margin_result of this MockRiskUnit. # noqa: E501 - :rtype: list[MockMarginResult] - """ - return self._margin_result - - @margin_result.setter - def margin_result(self, margin_result): - """Sets the margin_result of this MockRiskUnit. - - Margin result # noqa: E501 - - :param margin_result: The margin_result of this MockRiskUnit. # noqa: E501 - :type: list[MockMarginResult] - """ - - self._margin_result = margin_result - - @property - def delta(self): - """Gets the delta of this MockRiskUnit. # noqa: E501 - - Total Delta of risk unit # noqa: E501 - - :return: The delta of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._delta - - @delta.setter - def delta(self, delta): - """Sets the delta of this MockRiskUnit. - - Total Delta of risk unit # noqa: E501 - - :param delta: The delta of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._delta = delta - - @property - def gamma(self): - """Gets the gamma of this MockRiskUnit. # noqa: E501 - - Total Gamma of risk unit # noqa: E501 - - :return: The gamma of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._gamma - - @gamma.setter - def gamma(self, gamma): - """Sets the gamma of this MockRiskUnit. - - Total Gamma of risk unit # noqa: E501 - - :param gamma: The gamma of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._gamma = gamma - - @property - def theta(self): - """Gets the theta of this MockRiskUnit. # noqa: E501 - - Total Theta of risk unit # noqa: E501 - - :return: The theta of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._theta - - @theta.setter - def theta(self, theta): - """Sets the theta of this MockRiskUnit. - - Total Theta of risk unit # noqa: E501 - - :param theta: The theta of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._theta = theta - - @property - def vega(self): - """Gets the vega of this MockRiskUnit. # noqa: E501 - - Total Vega of risk unit # noqa: E501 - - :return: The vega of this MockRiskUnit. # noqa: E501 - :rtype: str - """ - return self._vega - - @vega.setter - def vega(self, vega): - """Sets the vega of this MockRiskUnit. - - Total Vega of risk unit # noqa: E501 - - :param vega: The vega of this MockRiskUnit. # noqa: E501 - :type: str - """ - - self._vega = vega - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockRiskUnit): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockRiskUnit): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py deleted file mode 100644 index a5b3c90..0000000 --- a/gate_api/models/mock_spot_balance.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockSpotBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'equity': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'equity': 'equity' - } - - def __init__(self, currency=None, equity=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """MockSpotBalance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._equity = None - self.discriminator = None - - self.currency = currency - self.equity = equity - - @property - def currency(self): - """Gets the currency of this MockSpotBalance. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this MockSpotBalance. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MockSpotBalance. - - Currency name # noqa: E501 - - :param currency: The currency of this MockSpotBalance. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def equity(self): - """Gets the equity of this MockSpotBalance. # noqa: E501 - - Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. # noqa: E501 - - :return: The equity of this MockSpotBalance. # noqa: E501 - :rtype: str - """ - return self._equity - - @equity.setter - def equity(self, equity): - """Sets the equity of this MockSpotBalance. - - Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. # noqa: E501 - - :param equity: The equity of this MockSpotBalance. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and equity is None: # noqa: E501 - raise ValueError("Invalid value for `equity`, must not be `None`") # noqa: E501 - - self._equity = equity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockSpotBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockSpotBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py deleted file mode 100644 index 94ee0e6..0000000 --- a/gate_api/models/mock_spot_order.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MockSpotOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency_pairs': 'str', - 'order_price': 'str', - 'count': 'str', - 'left': 'str', - 'type': 'str' - } - - attribute_map = { - 'currency_pairs': 'currency_pairs', - 'order_price': 'order_price', - 'count': 'count', - 'left': 'left', - 'type': 'type' - } - - def __init__(self, currency_pairs=None, order_price=None, count=None, left=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """MockSpotOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pairs = None - self._order_price = None - self._count = None - self._left = None - self._type = None - self.discriminator = None - - self.currency_pairs = currency_pairs - self.order_price = order_price - if count is not None: - self.count = count - self.left = left - self.type = type - - @property - def currency_pairs(self): - """Gets the currency_pairs of this MockSpotOrder. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pairs of this MockSpotOrder. # noqa: E501 - :rtype: str - """ - return self._currency_pairs - - @currency_pairs.setter - def currency_pairs(self, currency_pairs): - """Sets the currency_pairs of this MockSpotOrder. - - Currency pair # noqa: E501 - - :param currency_pairs: The currency_pairs of this MockSpotOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency_pairs is None: # noqa: E501 - raise ValueError("Invalid value for `currency_pairs`, must not be `None`") # noqa: E501 - - self._currency_pairs = currency_pairs - - @property - def order_price(self): - """Gets the order_price of this MockSpotOrder. # noqa: E501 - - Price # noqa: E501 - - :return: The order_price of this MockSpotOrder. # noqa: E501 - :rtype: str - """ - return self._order_price - - @order_price.setter - def order_price(self, order_price): - """Sets the order_price of this MockSpotOrder. - - Price # noqa: E501 - - :param order_price: The order_price of this MockSpotOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and order_price is None: # noqa: E501 - raise ValueError("Invalid value for `order_price`, must not be `None`") # noqa: E501 - - self._order_price = order_price - - @property - def count(self): - """Gets the count of this MockSpotOrder. # noqa: E501 - - Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. # noqa: E501 - - :return: The count of this MockSpotOrder. # noqa: E501 - :rtype: str - """ - return self._count - - @count.setter - def count(self, count): - """Sets the count of this MockSpotOrder. - - Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. # noqa: E501 - - :param count: The count of this MockSpotOrder. # noqa: E501 - :type: str - """ - - self._count = count - - @property - def left(self): - """Gets the left of this MockSpotOrder. # noqa: E501 - - Unfilled quantity, involved in actual calculation. # noqa: E501 - - :return: The left of this MockSpotOrder. # noqa: E501 - :rtype: str - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this MockSpotOrder. - - Unfilled quantity, involved in actual calculation. # noqa: E501 - - :param left: The left of this MockSpotOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501 - raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501 - - self._left = left - - @property - def type(self): - """Gets the type of this MockSpotOrder. # noqa: E501 - - Order type, sell - sell order, buy - buy order. # noqa: E501 - - :return: The type of this MockSpotOrder. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this MockSpotOrder. - - Order type, sell - sell order, buy - buy order. # noqa: E501 - - :param type: The type of this MockSpotOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MockSpotOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MockSpotOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py deleted file mode 100644 index b8731b1..0000000 --- a/gate_api/models/multi_chain_address_item.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiChainAddressItem(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'chain': 'str', - 'address': 'str', - 'payment_id': 'str', - 'payment_name': 'str', - 'obtain_failed': 'int' - } - - attribute_map = { - 'chain': 'chain', - 'address': 'address', - 'payment_id': 'payment_id', - 'payment_name': 'payment_name', - 'obtain_failed': 'obtain_failed' - } - - def __init__(self, chain=None, address=None, payment_id=None, payment_name=None, obtain_failed=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, Configuration) -> None - """MultiChainAddressItem - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._chain = None - self._address = None - self._payment_id = None - self._payment_name = None - self._obtain_failed = None - self.discriminator = None - - if chain is not None: - self.chain = chain - if address is not None: - self.address = address - if payment_id is not None: - self.payment_id = payment_id - if payment_name is not None: - self.payment_name = payment_name - if obtain_failed is not None: - self.obtain_failed = obtain_failed - - @property - def chain(self): - """Gets the chain of this MultiChainAddressItem. # noqa: E501 - - Name of the chain # noqa: E501 - - :return: The chain of this MultiChainAddressItem. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this MultiChainAddressItem. - - Name of the chain # noqa: E501 - - :param chain: The chain of this MultiChainAddressItem. # noqa: E501 - :type: str - """ - - self._chain = chain - - @property - def address(self): - """Gets the address of this MultiChainAddressItem. # noqa: E501 - - Deposit address # noqa: E501 - - :return: The address of this MultiChainAddressItem. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this MultiChainAddressItem. - - Deposit address # noqa: E501 - - :param address: The address of this MultiChainAddressItem. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def payment_id(self): - """Gets the payment_id of this MultiChainAddressItem. # noqa: E501 - - Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 - - :return: The payment_id of this MultiChainAddressItem. # noqa: E501 - :rtype: str - """ - return self._payment_id - - @payment_id.setter - def payment_id(self, payment_id): - """Sets the payment_id of this MultiChainAddressItem. - - Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 - - :param payment_id: The payment_id of this MultiChainAddressItem. # noqa: E501 - :type: str - """ - - self._payment_id = payment_id - - @property - def payment_name(self): - """Gets the payment_name of this MultiChainAddressItem. # noqa: E501 - - Note type, `Tag` or `Memo` # noqa: E501 - - :return: The payment_name of this MultiChainAddressItem. # noqa: E501 - :rtype: str - """ - return self._payment_name - - @payment_name.setter - def payment_name(self, payment_name): - """Sets the payment_name of this MultiChainAddressItem. - - Note type, `Tag` or `Memo` # noqa: E501 - - :param payment_name: The payment_name of this MultiChainAddressItem. # noqa: E501 - :type: str - """ - - self._payment_name = payment_name - - @property - def obtain_failed(self): - """Gets the obtain_failed of this MultiChainAddressItem. # noqa: E501 - - The obtain failed status- 0: address successfully obtained- 1: failed to obtain address # noqa: E501 - - :return: The obtain_failed of this MultiChainAddressItem. # noqa: E501 - :rtype: int - """ - return self._obtain_failed - - @obtain_failed.setter - def obtain_failed(self, obtain_failed): - """Sets the obtain_failed of this MultiChainAddressItem. - - The obtain failed status- 0: address successfully obtained- 1: failed to obtain address # noqa: E501 - - :param obtain_failed: The obtain_failed of this MultiChainAddressItem. # noqa: E501 - :type: int - """ - - self._obtain_failed = obtain_failed - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiChainAddressItem): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiChainAddressItem): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py deleted file mode 100644 index a350a96..0000000 --- a/gate_api/models/multi_collateral_currency.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiCollateralCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'loan_currencies': 'list[MultiLoanItem]', - 'collateral_currencies': 'list[MultiCollateralItem]' - } - - attribute_map = { - 'loan_currencies': 'loan_currencies', - 'collateral_currencies': 'collateral_currencies' - } - - def __init__(self, loan_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 - # type: (list[MultiLoanItem], list[MultiCollateralItem], Configuration) -> None - """MultiCollateralCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._loan_currencies = None - self._collateral_currencies = None - self.discriminator = None - - if loan_currencies is not None: - self.loan_currencies = loan_currencies - if collateral_currencies is not None: - self.collateral_currencies = collateral_currencies - - @property - def loan_currencies(self): - """Gets the loan_currencies of this MultiCollateralCurrency. # noqa: E501 - - List of supported borrowing currencies # noqa: E501 - - :return: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 - :rtype: list[MultiLoanItem] - """ - return self._loan_currencies - - @loan_currencies.setter - def loan_currencies(self, loan_currencies): - """Sets the loan_currencies of this MultiCollateralCurrency. - - List of supported borrowing currencies # noqa: E501 - - :param loan_currencies: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 - :type: list[MultiLoanItem] - """ - - self._loan_currencies = loan_currencies - - @property - def collateral_currencies(self): - """Gets the collateral_currencies of this MultiCollateralCurrency. # noqa: E501 - - List of supported collateral currencies # noqa: E501 - - :return: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 - :rtype: list[MultiCollateralItem] - """ - return self._collateral_currencies - - @collateral_currencies.setter - def collateral_currencies(self, collateral_currencies): - """Sets the collateral_currencies of this MultiCollateralCurrency. - - List of supported collateral currencies # noqa: E501 - - :param collateral_currencies: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 - :type: list[MultiCollateralItem] - """ - - self._collateral_currencies = collateral_currencies - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiCollateralCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiCollateralCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py deleted file mode 100644 index ddc6772..0000000 --- a/gate_api/models/multi_collateral_item.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiCollateralItem(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'discount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'discount': 'discount' - } - - def __init__(self, currency=None, index_price=None, discount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """MultiCollateralItem - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._discount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if discount is not None: - self.discount = discount - - @property - def currency(self): - """Gets the currency of this MultiCollateralItem. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this MultiCollateralItem. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MultiCollateralItem. - - Currency # noqa: E501 - - :param currency: The currency of this MultiCollateralItem. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this MultiCollateralItem. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this MultiCollateralItem. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this MultiCollateralItem. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this MultiCollateralItem. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def discount(self): - """Gets the discount of this MultiCollateralItem. # noqa: E501 - - Discount # noqa: E501 - - :return: The discount of this MultiCollateralItem. # noqa: E501 - :rtype: str - """ - return self._discount - - @discount.setter - def discount(self, discount): - """Sets the discount of this MultiCollateralItem. - - Discount # noqa: E501 - - :param discount: The discount of this MultiCollateralItem. # noqa: E501 - :type: str - """ - - self._discount = discount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiCollateralItem): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiCollateralItem): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py deleted file mode 100644 index 514007b..0000000 --- a/gate_api/models/multi_collateral_order.py +++ /dev/null @@ -1,487 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiCollateralOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'str', - 'order_type': 'str', - 'fixed_type': 'str', - 'fixed_rate': 'str', - 'expire_time': 'int', - 'auto_renew': 'bool', - 'auto_repay': 'bool', - 'current_ltv': 'str', - 'status': 'str', - 'borrow_time': 'int', - 'total_left_repay_usdt': 'str', - 'total_left_collateral_usdt': 'str', - 'borrow_currencies': 'list[BorrowCurrencyInfo]', - 'collateral_currencies': 'list[CollateralCurrencyInfo]' - } - - attribute_map = { - 'order_id': 'order_id', - 'order_type': 'order_type', - 'fixed_type': 'fixed_type', - 'fixed_rate': 'fixed_rate', - 'expire_time': 'expire_time', - 'auto_renew': 'auto_renew', - 'auto_repay': 'auto_repay', - 'current_ltv': 'current_ltv', - 'status': 'status', - 'borrow_time': 'borrow_time', - 'total_left_repay_usdt': 'total_left_repay_usdt', - 'total_left_collateral_usdt': 'total_left_collateral_usdt', - 'borrow_currencies': 'borrow_currencies', - 'collateral_currencies': 'collateral_currencies' - } - - def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=None, expire_time=None, auto_renew=None, auto_repay=None, current_ltv=None, status=None, borrow_time=None, total_left_repay_usdt=None, total_left_collateral_usdt=None, borrow_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, bool, bool, str, str, int, str, str, list[BorrowCurrencyInfo], list[CollateralCurrencyInfo], Configuration) -> None - """MultiCollateralOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._order_type = None - self._fixed_type = None - self._fixed_rate = None - self._expire_time = None - self._auto_renew = None - self._auto_repay = None - self._current_ltv = None - self._status = None - self._borrow_time = None - self._total_left_repay_usdt = None - self._total_left_collateral_usdt = None - self._borrow_currencies = None - self._collateral_currencies = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if order_type is not None: - self.order_type = order_type - if fixed_type is not None: - self.fixed_type = fixed_type - if fixed_rate is not None: - self.fixed_rate = fixed_rate - if expire_time is not None: - self.expire_time = expire_time - if auto_renew is not None: - self.auto_renew = auto_renew - if auto_repay is not None: - self.auto_repay = auto_repay - if current_ltv is not None: - self.current_ltv = current_ltv - if status is not None: - self.status = status - if borrow_time is not None: - self.borrow_time = borrow_time - if total_left_repay_usdt is not None: - self.total_left_repay_usdt = total_left_repay_usdt - if total_left_collateral_usdt is not None: - self.total_left_collateral_usdt = total_left_collateral_usdt - if borrow_currencies is not None: - self.borrow_currencies = borrow_currencies - if collateral_currencies is not None: - self.collateral_currencies = collateral_currencies - - @property - def order_id(self): - """Gets the order_id of this MultiCollateralOrder. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this MultiCollateralOrder. - - Order ID # noqa: E501 - - :param order_id: The order_id of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def order_type(self): - """Gets the order_type of this MultiCollateralOrder. # noqa: E501 - - current - current, fixed - fixed # noqa: E501 - - :return: The order_type of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._order_type - - @order_type.setter - def order_type(self, order_type): - """Sets the order_type of this MultiCollateralOrder. - - current - current, fixed - fixed # noqa: E501 - - :param order_type: The order_type of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._order_type = order_type - - @property - def fixed_type(self): - """Gets the fixed_type of this MultiCollateralOrder. # noqa: E501 - - Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. # noqa: E501 - - :return: The fixed_type of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._fixed_type - - @fixed_type.setter - def fixed_type(self, fixed_type): - """Sets the fixed_type of this MultiCollateralOrder. - - Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. # noqa: E501 - - :param fixed_type: The fixed_type of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._fixed_type = fixed_type - - @property - def fixed_rate(self): - """Gets the fixed_rate of this MultiCollateralOrder. # noqa: E501 - - Fixed interest rate # noqa: E501 - - :return: The fixed_rate of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._fixed_rate - - @fixed_rate.setter - def fixed_rate(self, fixed_rate): - """Sets the fixed_rate of this MultiCollateralOrder. - - Fixed interest rate # noqa: E501 - - :param fixed_rate: The fixed_rate of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._fixed_rate = fixed_rate - - @property - def expire_time(self): - """Gets the expire_time of this MultiCollateralOrder. # noqa: E501 - - Expiration time, timestamp, unit in seconds. # noqa: E501 - - :return: The expire_time of this MultiCollateralOrder. # noqa: E501 - :rtype: int - """ - return self._expire_time - - @expire_time.setter - def expire_time(self, expire_time): - """Sets the expire_time of this MultiCollateralOrder. - - Expiration time, timestamp, unit in seconds. # noqa: E501 - - :param expire_time: The expire_time of this MultiCollateralOrder. # noqa: E501 - :type: int - """ - - self._expire_time = expire_time - - @property - def auto_renew(self): - """Gets the auto_renew of this MultiCollateralOrder. # noqa: E501 - - Fixed interest rate, automatic renewal # noqa: E501 - - :return: The auto_renew of this MultiCollateralOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_renew - - @auto_renew.setter - def auto_renew(self, auto_renew): - """Sets the auto_renew of this MultiCollateralOrder. - - Fixed interest rate, automatic renewal # noqa: E501 - - :param auto_renew: The auto_renew of this MultiCollateralOrder. # noqa: E501 - :type: bool - """ - - self._auto_renew = auto_renew - - @property - def auto_repay(self): - """Gets the auto_repay of this MultiCollateralOrder. # noqa: E501 - - Fixed interest rate, automatic repayment # noqa: E501 - - :return: The auto_repay of this MultiCollateralOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_repay - - @auto_repay.setter - def auto_repay(self, auto_repay): - """Sets the auto_repay of this MultiCollateralOrder. - - Fixed interest rate, automatic repayment # noqa: E501 - - :param auto_repay: The auto_repay of this MultiCollateralOrder. # noqa: E501 - :type: bool - """ - - self._auto_repay = auto_repay - - @property - def current_ltv(self): - """Gets the current_ltv of this MultiCollateralOrder. # noqa: E501 - - The current collateralization rate # noqa: E501 - - :return: The current_ltv of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._current_ltv - - @current_ltv.setter - def current_ltv(self, current_ltv): - """Sets the current_ltv of this MultiCollateralOrder. - - The current collateralization rate # noqa: E501 - - :param current_ltv: The current_ltv of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._current_ltv = current_ltv - - @property - def status(self): - """Gets the status of this MultiCollateralOrder. # noqa: E501 - - Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 - - :return: The status of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this MultiCollateralOrder. - - Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 - - :param status: The status of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def borrow_time(self): - """Gets the borrow_time of this MultiCollateralOrder. # noqa: E501 - - Borrowing time, timestamp in seconds # noqa: E501 - - :return: The borrow_time of this MultiCollateralOrder. # noqa: E501 - :rtype: int - """ - return self._borrow_time - - @borrow_time.setter - def borrow_time(self, borrow_time): - """Sets the borrow_time of this MultiCollateralOrder. - - Borrowing time, timestamp in seconds # noqa: E501 - - :param borrow_time: The borrow_time of this MultiCollateralOrder. # noqa: E501 - :type: int - """ - - self._borrow_time = borrow_time - - @property - def total_left_repay_usdt(self): - """Gets the total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 - - Value of Left repay amount converted in USDT # noqa: E501 - - :return: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._total_left_repay_usdt - - @total_left_repay_usdt.setter - def total_left_repay_usdt(self, total_left_repay_usdt): - """Sets the total_left_repay_usdt of this MultiCollateralOrder. - - Value of Left repay amount converted in USDT # noqa: E501 - - :param total_left_repay_usdt: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._total_left_repay_usdt = total_left_repay_usdt - - @property - def total_left_collateral_usdt(self): - """Gets the total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 - - Value of Collateral amount in USDT # noqa: E501 - - :return: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 - :rtype: str - """ - return self._total_left_collateral_usdt - - @total_left_collateral_usdt.setter - def total_left_collateral_usdt(self, total_left_collateral_usdt): - """Sets the total_left_collateral_usdt of this MultiCollateralOrder. - - Value of Collateral amount in USDT # noqa: E501 - - :param total_left_collateral_usdt: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 - :type: str - """ - - self._total_left_collateral_usdt = total_left_collateral_usdt - - @property - def borrow_currencies(self): - """Gets the borrow_currencies of this MultiCollateralOrder. # noqa: E501 - - Borrowing Currency List # noqa: E501 - - :return: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 - :rtype: list[BorrowCurrencyInfo] - """ - return self._borrow_currencies - - @borrow_currencies.setter - def borrow_currencies(self, borrow_currencies): - """Sets the borrow_currencies of this MultiCollateralOrder. - - Borrowing Currency List # noqa: E501 - - :param borrow_currencies: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 - :type: list[BorrowCurrencyInfo] - """ - - self._borrow_currencies = borrow_currencies - - @property - def collateral_currencies(self): - """Gets the collateral_currencies of this MultiCollateralOrder. # noqa: E501 - - Collateral Currency List # noqa: E501 - - :return: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 - :rtype: list[CollateralCurrencyInfo] - """ - return self._collateral_currencies - - @collateral_currencies.setter - def collateral_currencies(self, collateral_currencies): - """Sets the collateral_currencies of this MultiCollateralOrder. - - Collateral Currency List # noqa: E501 - - :param collateral_currencies: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 - :type: list[CollateralCurrencyInfo] - """ - - self._collateral_currencies = collateral_currencies - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiCollateralOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiCollateralOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py deleted file mode 100644 index e9f621d..0000000 --- a/gate_api/models/multi_collateral_record.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiCollateralRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'record_id': 'int', - 'before_ltv': 'str', - 'after_ltv': 'str', - 'operate_time': 'int', - 'borrow_currencies': 'list[MultiCollateralRecordCurrency]', - 'collateral_currencies': 'list[MultiCollateralRecordCurrency]' - } - - attribute_map = { - 'order_id': 'order_id', - 'record_id': 'record_id', - 'before_ltv': 'before_ltv', - 'after_ltv': 'after_ltv', - 'operate_time': 'operate_time', - 'borrow_currencies': 'borrow_currencies', - 'collateral_currencies': 'collateral_currencies' - } - - def __init__(self, order_id=None, record_id=None, before_ltv=None, after_ltv=None, operate_time=None, borrow_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, int, list[MultiCollateralRecordCurrency], list[MultiCollateralRecordCurrency], Configuration) -> None - """MultiCollateralRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._record_id = None - self._before_ltv = None - self._after_ltv = None - self._operate_time = None - self._borrow_currencies = None - self._collateral_currencies = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if record_id is not None: - self.record_id = record_id - if before_ltv is not None: - self.before_ltv = before_ltv - if after_ltv is not None: - self.after_ltv = after_ltv - if operate_time is not None: - self.operate_time = operate_time - if borrow_currencies is not None: - self.borrow_currencies = borrow_currencies - if collateral_currencies is not None: - self.collateral_currencies = collateral_currencies - - @property - def order_id(self): - """Gets the order_id of this MultiCollateralRecord. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this MultiCollateralRecord. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this MultiCollateralRecord. - - Order ID # noqa: E501 - - :param order_id: The order_id of this MultiCollateralRecord. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def record_id(self): - """Gets the record_id of this MultiCollateralRecord. # noqa: E501 - - Collateral record ID # noqa: E501 - - :return: The record_id of this MultiCollateralRecord. # noqa: E501 - :rtype: int - """ - return self._record_id - - @record_id.setter - def record_id(self, record_id): - """Sets the record_id of this MultiCollateralRecord. - - Collateral record ID # noqa: E501 - - :param record_id: The record_id of this MultiCollateralRecord. # noqa: E501 - :type: int - """ - - self._record_id = record_id - - @property - def before_ltv(self): - """Gets the before_ltv of this MultiCollateralRecord. # noqa: E501 - - The collateral ratio before adjustment # noqa: E501 - - :return: The before_ltv of this MultiCollateralRecord. # noqa: E501 - :rtype: str - """ - return self._before_ltv - - @before_ltv.setter - def before_ltv(self, before_ltv): - """Sets the before_ltv of this MultiCollateralRecord. - - The collateral ratio before adjustment # noqa: E501 - - :param before_ltv: The before_ltv of this MultiCollateralRecord. # noqa: E501 - :type: str - """ - - self._before_ltv = before_ltv - - @property - def after_ltv(self): - """Gets the after_ltv of this MultiCollateralRecord. # noqa: E501 - - The collateral ratio before adjustment # noqa: E501 - - :return: The after_ltv of this MultiCollateralRecord. # noqa: E501 - :rtype: str - """ - return self._after_ltv - - @after_ltv.setter - def after_ltv(self, after_ltv): - """Sets the after_ltv of this MultiCollateralRecord. - - The collateral ratio before adjustment # noqa: E501 - - :param after_ltv: The after_ltv of this MultiCollateralRecord. # noqa: E501 - :type: str - """ - - self._after_ltv = after_ltv - - @property - def operate_time(self): - """Gets the operate_time of this MultiCollateralRecord. # noqa: E501 - - Operation time, timestamp in seconds. # noqa: E501 - - :return: The operate_time of this MultiCollateralRecord. # noqa: E501 - :rtype: int - """ - return self._operate_time - - @operate_time.setter - def operate_time(self, operate_time): - """Sets the operate_time of this MultiCollateralRecord. - - Operation time, timestamp in seconds. # noqa: E501 - - :param operate_time: The operate_time of this MultiCollateralRecord. # noqa: E501 - :type: int - """ - - self._operate_time = operate_time - - @property - def borrow_currencies(self): - """Gets the borrow_currencies of this MultiCollateralRecord. # noqa: E501 - - Borrowing Currency List # noqa: E501 - - :return: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 - :rtype: list[MultiCollateralRecordCurrency] - """ - return self._borrow_currencies - - @borrow_currencies.setter - def borrow_currencies(self, borrow_currencies): - """Sets the borrow_currencies of this MultiCollateralRecord. - - Borrowing Currency List # noqa: E501 - - :param borrow_currencies: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 - :type: list[MultiCollateralRecordCurrency] - """ - - self._borrow_currencies = borrow_currencies - - @property - def collateral_currencies(self): - """Gets the collateral_currencies of this MultiCollateralRecord. # noqa: E501 - - Collateral Currency List # noqa: E501 - - :return: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 - :rtype: list[MultiCollateralRecordCurrency] - """ - return self._collateral_currencies - - @collateral_currencies.setter - def collateral_currencies(self, collateral_currencies): - """Sets the collateral_currencies of this MultiCollateralRecord. - - Collateral Currency List # noqa: E501 - - :param collateral_currencies: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 - :type: list[MultiCollateralRecordCurrency] - """ - - self._collateral_currencies = collateral_currencies - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiCollateralRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiCollateralRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py deleted file mode 100644 index 40ac61e..0000000 --- a/gate_api/models/multi_collateral_record_currency.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiCollateralRecordCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'before_amount': 'str', - 'before_amount_usdt': 'str', - 'after_amount': 'str', - 'after_amount_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'before_amount': 'before_amount', - 'before_amount_usdt': 'before_amount_usdt', - 'after_amount': 'after_amount', - 'after_amount_usdt': 'after_amount_usdt' - } - - def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """MultiCollateralRecordCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._before_amount = None - self._before_amount_usdt = None - self._after_amount = None - self._after_amount_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if before_amount is not None: - self.before_amount = before_amount - if before_amount_usdt is not None: - self.before_amount_usdt = before_amount_usdt - if after_amount is not None: - self.after_amount = after_amount - if after_amount_usdt is not None: - self.after_amount_usdt = after_amount_usdt - - @property - def currency(self): - """Gets the currency of this MultiCollateralRecordCurrency. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this MultiCollateralRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MultiCollateralRecordCurrency. - - Currency # noqa: E501 - - :param currency: The currency of this MultiCollateralRecordCurrency. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this MultiCollateralRecordCurrency. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this MultiCollateralRecordCurrency. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def before_amount(self): - """Gets the before_amount of this MultiCollateralRecordCurrency. # noqa: E501 - - Amount before the operation # noqa: E501 - - :return: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._before_amount - - @before_amount.setter - def before_amount(self, before_amount): - """Sets the before_amount of this MultiCollateralRecordCurrency. - - Amount before the operation # noqa: E501 - - :param before_amount: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 - :type: str - """ - - self._before_amount = before_amount - - @property - def before_amount_usdt(self): - """Gets the before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - - USDT Amount before the operation. # noqa: E501 - - :return: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._before_amount_usdt - - @before_amount_usdt.setter - def before_amount_usdt(self, before_amount_usdt): - """Sets the before_amount_usdt of this MultiCollateralRecordCurrency. - - USDT Amount before the operation. # noqa: E501 - - :param before_amount_usdt: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - :type: str - """ - - self._before_amount_usdt = before_amount_usdt - - @property - def after_amount(self): - """Gets the after_amount of this MultiCollateralRecordCurrency. # noqa: E501 - - Amount after the operation. # noqa: E501 - - :return: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._after_amount - - @after_amount.setter - def after_amount(self, after_amount): - """Sets the after_amount of this MultiCollateralRecordCurrency. - - Amount after the operation. # noqa: E501 - - :param after_amount: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501 - :type: str - """ - - self._after_amount = after_amount - - @property - def after_amount_usdt(self): - """Gets the after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - - USDT Amount after the operation. # noqa: E501 - - :return: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._after_amount_usdt - - @after_amount_usdt.setter - def after_amount_usdt(self, after_amount_usdt): - """Sets the after_amount_usdt of this MultiCollateralRecordCurrency. - - USDT Amount after the operation. # noqa: E501 - - :param after_amount_usdt: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - :type: str - """ - - self._after_amount_usdt = after_amount_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiCollateralRecordCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiCollateralRecordCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py deleted file mode 100644 index d237838..0000000 --- a/gate_api/models/multi_loan_item.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiLoanItem(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'price': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'price': 'price' - } - - def __init__(self, currency=None, price=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """MultiLoanItem - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._price = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if price is not None: - self.price = price - - @property - def currency(self): - """Gets the currency of this MultiLoanItem. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this MultiLoanItem. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MultiLoanItem. - - Currency # noqa: E501 - - :param currency: The currency of this MultiLoanItem. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def price(self): - """Gets the price of this MultiLoanItem. # noqa: E501 - - Latest price of the currency # noqa: E501 - - :return: The price of this MultiLoanItem. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this MultiLoanItem. - - Latest price of the currency # noqa: E501 - - :param price: The price of this MultiLoanItem. # noqa: E501 - :type: str - """ - - self._price = price - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiLoanItem): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiLoanItem): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py deleted file mode 100644 index 822936b..0000000 --- a/gate_api/models/multi_loan_repay_item.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiLoanRepayItem(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str', - 'repaid_all': 'bool' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount', - 'repaid_all': 'repaid_all' - } - - def __init__(self, currency=None, amount=None, repaid_all=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, bool, Configuration) -> None - """MultiLoanRepayItem - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self._repaid_all = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - if repaid_all is not None: - self.repaid_all = repaid_all - - @property - def currency(self): - """Gets the currency of this MultiLoanRepayItem. # noqa: E501 - - Repayment currency # noqa: E501 - - :return: The currency of this MultiLoanRepayItem. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this MultiLoanRepayItem. - - Repayment currency # noqa: E501 - - :param currency: The currency of this MultiLoanRepayItem. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this MultiLoanRepayItem. # noqa: E501 - - Size # noqa: E501 - - :return: The amount of this MultiLoanRepayItem. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this MultiLoanRepayItem. - - Size # noqa: E501 - - :param amount: The amount of this MultiLoanRepayItem. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def repaid_all(self): - """Gets the repaid_all of this MultiLoanRepayItem. # noqa: E501 - - Repayment method, set to true for full repayment, false for partial repayment. # noqa: E501 - - :return: The repaid_all of this MultiLoanRepayItem. # noqa: E501 - :rtype: bool - """ - return self._repaid_all - - @repaid_all.setter - def repaid_all(self, repaid_all): - """Sets the repaid_all of this MultiLoanRepayItem. - - Repayment method, set to true for full repayment, false for partial repayment. # noqa: E501 - - :param repaid_all: The repaid_all of this MultiLoanRepayItem. # noqa: E501 - :type: bool - """ - - self._repaid_all = repaid_all - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiLoanRepayItem): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiLoanRepayItem): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py deleted file mode 100644 index 9684714..0000000 --- a/gate_api/models/multi_repay_record.py +++ /dev/null @@ -1,431 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiRepayRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'record_id': 'int', - 'init_ltv': 'str', - 'before_ltv': 'str', - 'after_ltv': 'str', - 'borrow_time': 'int', - 'repay_time': 'int', - 'borrow_currencies': 'list[RepayRecordCurrency]', - 'collateral_currencies': 'list[RepayRecordCurrency]', - 'repaid_currencies': 'list[RepayRecordRepaidCurrency]', - 'total_interest_list': 'list[RepayRecordTotalInterest]', - 'left_repay_interest_list': 'list[RepayRecordLeftInterest]' - } - - attribute_map = { - 'order_id': 'order_id', - 'record_id': 'record_id', - 'init_ltv': 'init_ltv', - 'before_ltv': 'before_ltv', - 'after_ltv': 'after_ltv', - 'borrow_time': 'borrow_time', - 'repay_time': 'repay_time', - 'borrow_currencies': 'borrow_currencies', - 'collateral_currencies': 'collateral_currencies', - 'repaid_currencies': 'repaid_currencies', - 'total_interest_list': 'total_interest_list', - 'left_repay_interest_list': 'left_repay_interest_list' - } - - def __init__(self, order_id=None, record_id=None, init_ltv=None, before_ltv=None, after_ltv=None, borrow_time=None, repay_time=None, borrow_currencies=None, collateral_currencies=None, repaid_currencies=None, total_interest_list=None, left_repay_interest_list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, int, int, list[RepayRecordCurrency], list[RepayRecordCurrency], list[RepayRecordRepaidCurrency], list[RepayRecordTotalInterest], list[RepayRecordLeftInterest], Configuration) -> None - """MultiRepayRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._record_id = None - self._init_ltv = None - self._before_ltv = None - self._after_ltv = None - self._borrow_time = None - self._repay_time = None - self._borrow_currencies = None - self._collateral_currencies = None - self._repaid_currencies = None - self._total_interest_list = None - self._left_repay_interest_list = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if record_id is not None: - self.record_id = record_id - if init_ltv is not None: - self.init_ltv = init_ltv - if before_ltv is not None: - self.before_ltv = before_ltv - if after_ltv is not None: - self.after_ltv = after_ltv - if borrow_time is not None: - self.borrow_time = borrow_time - if repay_time is not None: - self.repay_time = repay_time - if borrow_currencies is not None: - self.borrow_currencies = borrow_currencies - if collateral_currencies is not None: - self.collateral_currencies = collateral_currencies - if repaid_currencies is not None: - self.repaid_currencies = repaid_currencies - if total_interest_list is not None: - self.total_interest_list = total_interest_list - if left_repay_interest_list is not None: - self.left_repay_interest_list = left_repay_interest_list - - @property - def order_id(self): - """Gets the order_id of this MultiRepayRecord. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this MultiRepayRecord. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this MultiRepayRecord. - - Order ID # noqa: E501 - - :param order_id: The order_id of this MultiRepayRecord. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def record_id(self): - """Gets the record_id of this MultiRepayRecord. # noqa: E501 - - Repayment record ID # noqa: E501 - - :return: The record_id of this MultiRepayRecord. # noqa: E501 - :rtype: int - """ - return self._record_id - - @record_id.setter - def record_id(self, record_id): - """Sets the record_id of this MultiRepayRecord. - - Repayment record ID # noqa: E501 - - :param record_id: The record_id of this MultiRepayRecord. # noqa: E501 - :type: int - """ - - self._record_id = record_id - - @property - def init_ltv(self): - """Gets the init_ltv of this MultiRepayRecord. # noqa: E501 - - The initial collateralization rate # noqa: E501 - - :return: The init_ltv of this MultiRepayRecord. # noqa: E501 - :rtype: str - """ - return self._init_ltv - - @init_ltv.setter - def init_ltv(self, init_ltv): - """Sets the init_ltv of this MultiRepayRecord. - - The initial collateralization rate # noqa: E501 - - :param init_ltv: The init_ltv of this MultiRepayRecord. # noqa: E501 - :type: str - """ - - self._init_ltv = init_ltv - - @property - def before_ltv(self): - """Gets the before_ltv of this MultiRepayRecord. # noqa: E501 - - Ltv before the operation # noqa: E501 - - :return: The before_ltv of this MultiRepayRecord. # noqa: E501 - :rtype: str - """ - return self._before_ltv - - @before_ltv.setter - def before_ltv(self, before_ltv): - """Sets the before_ltv of this MultiRepayRecord. - - Ltv before the operation # noqa: E501 - - :param before_ltv: The before_ltv of this MultiRepayRecord. # noqa: E501 - :type: str - """ - - self._before_ltv = before_ltv - - @property - def after_ltv(self): - """Gets the after_ltv of this MultiRepayRecord. # noqa: E501 - - Ltv after the operation # noqa: E501 - - :return: The after_ltv of this MultiRepayRecord. # noqa: E501 - :rtype: str - """ - return self._after_ltv - - @after_ltv.setter - def after_ltv(self, after_ltv): - """Sets the after_ltv of this MultiRepayRecord. - - Ltv after the operation # noqa: E501 - - :param after_ltv: The after_ltv of this MultiRepayRecord. # noqa: E501 - :type: str - """ - - self._after_ltv = after_ltv - - @property - def borrow_time(self): - """Gets the borrow_time of this MultiRepayRecord. # noqa: E501 - - Borrowing time, timestamp in seconds. # noqa: E501 - - :return: The borrow_time of this MultiRepayRecord. # noqa: E501 - :rtype: int - """ - return self._borrow_time - - @borrow_time.setter - def borrow_time(self, borrow_time): - """Sets the borrow_time of this MultiRepayRecord. - - Borrowing time, timestamp in seconds. # noqa: E501 - - :param borrow_time: The borrow_time of this MultiRepayRecord. # noqa: E501 - :type: int - """ - - self._borrow_time = borrow_time - - @property - def repay_time(self): - """Gets the repay_time of this MultiRepayRecord. # noqa: E501 - - Repayment time, timestamp in seconds. # noqa: E501 - - :return: The repay_time of this MultiRepayRecord. # noqa: E501 - :rtype: int - """ - return self._repay_time - - @repay_time.setter - def repay_time(self, repay_time): - """Sets the repay_time of this MultiRepayRecord. - - Repayment time, timestamp in seconds. # noqa: E501 - - :param repay_time: The repay_time of this MultiRepayRecord. # noqa: E501 - :type: int - """ - - self._repay_time = repay_time - - @property - def borrow_currencies(self): - """Gets the borrow_currencies of this MultiRepayRecord. # noqa: E501 - - List of borrowing information # noqa: E501 - - :return: The borrow_currencies of this MultiRepayRecord. # noqa: E501 - :rtype: list[RepayRecordCurrency] - """ - return self._borrow_currencies - - @borrow_currencies.setter - def borrow_currencies(self, borrow_currencies): - """Sets the borrow_currencies of this MultiRepayRecord. - - List of borrowing information # noqa: E501 - - :param borrow_currencies: The borrow_currencies of this MultiRepayRecord. # noqa: E501 - :type: list[RepayRecordCurrency] - """ - - self._borrow_currencies = borrow_currencies - - @property - def collateral_currencies(self): - """Gets the collateral_currencies of this MultiRepayRecord. # noqa: E501 - - List of collateral information # noqa: E501 - - :return: The collateral_currencies of this MultiRepayRecord. # noqa: E501 - :rtype: list[RepayRecordCurrency] - """ - return self._collateral_currencies - - @collateral_currencies.setter - def collateral_currencies(self, collateral_currencies): - """Sets the collateral_currencies of this MultiRepayRecord. - - List of collateral information # noqa: E501 - - :param collateral_currencies: The collateral_currencies of this MultiRepayRecord. # noqa: E501 - :type: list[RepayRecordCurrency] - """ - - self._collateral_currencies = collateral_currencies - - @property - def repaid_currencies(self): - """Gets the repaid_currencies of this MultiRepayRecord. # noqa: E501 - - Repay Currency List # noqa: E501 - - :return: The repaid_currencies of this MultiRepayRecord. # noqa: E501 - :rtype: list[RepayRecordRepaidCurrency] - """ - return self._repaid_currencies - - @repaid_currencies.setter - def repaid_currencies(self, repaid_currencies): - """Sets the repaid_currencies of this MultiRepayRecord. - - Repay Currency List # noqa: E501 - - :param repaid_currencies: The repaid_currencies of this MultiRepayRecord. # noqa: E501 - :type: list[RepayRecordRepaidCurrency] - """ - - self._repaid_currencies = repaid_currencies - - @property - def total_interest_list(self): - """Gets the total_interest_list of this MultiRepayRecord. # noqa: E501 - - Total Interest List # noqa: E501 - - :return: The total_interest_list of this MultiRepayRecord. # noqa: E501 - :rtype: list[RepayRecordTotalInterest] - """ - return self._total_interest_list - - @total_interest_list.setter - def total_interest_list(self, total_interest_list): - """Sets the total_interest_list of this MultiRepayRecord. - - Total Interest List # noqa: E501 - - :param total_interest_list: The total_interest_list of this MultiRepayRecord. # noqa: E501 - :type: list[RepayRecordTotalInterest] - """ - - self._total_interest_list = total_interest_list - - @property - def left_repay_interest_list(self): - """Gets the left_repay_interest_list of this MultiRepayRecord. # noqa: E501 - - List of left repay interest # noqa: E501 - - :return: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 - :rtype: list[RepayRecordLeftInterest] - """ - return self._left_repay_interest_list - - @left_repay_interest_list.setter - def left_repay_interest_list(self, left_repay_interest_list): - """Sets the left_repay_interest_list of this MultiRepayRecord. - - List of left repay interest # noqa: E501 - - :param left_repay_interest_list: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 - :type: list[RepayRecordLeftInterest] - """ - - self._left_repay_interest_list = left_repay_interest_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiRepayRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiRepayRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py deleted file mode 100644 index 75586d8..0000000 --- a/gate_api/models/multi_repay_resp.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MultiRepayResp(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'repaid_currencies': 'list[RepayCurrencyRes]' - } - - attribute_map = { - 'order_id': 'order_id', - 'repaid_currencies': 'repaid_currencies' - } - - def __init__(self, order_id=None, repaid_currencies=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[RepayCurrencyRes], Configuration) -> None - """MultiRepayResp - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._repaid_currencies = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if repaid_currencies is not None: - self.repaid_currencies = repaid_currencies - - @property - def order_id(self): - """Gets the order_id of this MultiRepayResp. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this MultiRepayResp. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this MultiRepayResp. - - Order ID # noqa: E501 - - :param order_id: The order_id of this MultiRepayResp. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def repaid_currencies(self): - """Gets the repaid_currencies of this MultiRepayResp. # noqa: E501 - - Repay Currency List # noqa: E501 - - :return: The repaid_currencies of this MultiRepayResp. # noqa: E501 - :rtype: list[RepayCurrencyRes] - """ - return self._repaid_currencies - - @repaid_currencies.setter - def repaid_currencies(self, repaid_currencies): - """Sets the repaid_currencies of this MultiRepayResp. - - Repay Currency List # noqa: E501 - - :param repaid_currencies: The repaid_currencies of this MultiRepayResp. # noqa: E501 - :type: list[RepayCurrencyRes] - """ - - self._repaid_currencies = repaid_currencies - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MultiRepayResp): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MultiRepayResp): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py deleted file mode 100644 index 311039b..0000000 --- a/gate_api/models/my_futures_trade.py +++ /dev/null @@ -1,409 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MyFuturesTrade(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'create_time': 'float', - 'contract': 'str', - 'order_id': 'str', - 'size': 'int', - 'close_size': 'int', - 'price': 'str', - 'role': 'str', - 'text': 'str', - 'fee': 'str', - 'point_fee': 'str' - } - - attribute_map = { - 'id': 'id', - 'create_time': 'create_time', - 'contract': 'contract', - 'order_id': 'order_id', - 'size': 'size', - 'close_size': 'close_size', - 'price': 'price', - 'role': 'role', - 'text': 'text', - 'fee': 'fee', - 'point_fee': 'point_fee' - } - - def __init__(self, id=None, create_time=None, contract=None, order_id=None, size=None, close_size=None, price=None, role=None, text=None, fee=None, point_fee=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, str, str, int, int, str, str, str, str, str, Configuration) -> None - """MyFuturesTrade - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._create_time = None - self._contract = None - self._order_id = None - self._size = None - self._close_size = None - self._price = None - self._role = None - self._text = None - self._fee = None - self._point_fee = None - self.discriminator = None - - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if contract is not None: - self.contract = contract - if order_id is not None: - self.order_id = order_id - if size is not None: - self.size = size - if close_size is not None: - self.close_size = close_size - if price is not None: - self.price = price - if role is not None: - self.role = role - if text is not None: - self.text = text - if fee is not None: - self.fee = fee - if point_fee is not None: - self.point_fee = point_fee - - @property - def id(self): - """Gets the id of this MyFuturesTrade. # noqa: E501 - - Trade ID # noqa: E501 - - :return: The id of this MyFuturesTrade. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this MyFuturesTrade. - - Trade ID # noqa: E501 - - :param id: The id of this MyFuturesTrade. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this MyFuturesTrade. # noqa: E501 - - Trading time # noqa: E501 - - :return: The create_time of this MyFuturesTrade. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this MyFuturesTrade. - - Trading time # noqa: E501 - - :param create_time: The create_time of this MyFuturesTrade. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def contract(self): - """Gets the contract of this MyFuturesTrade. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this MyFuturesTrade. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this MyFuturesTrade. - - Futures contract # noqa: E501 - - :param contract: The contract of this MyFuturesTrade. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def order_id(self): - """Gets the order_id of this MyFuturesTrade. # noqa: E501 - - Order ID related # noqa: E501 - - :return: The order_id of this MyFuturesTrade. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this MyFuturesTrade. - - Order ID related # noqa: E501 - - :param order_id: The order_id of this MyFuturesTrade. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def size(self): - """Gets the size of this MyFuturesTrade. # noqa: E501 - - Trading size # noqa: E501 - - :return: The size of this MyFuturesTrade. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this MyFuturesTrade. - - Trading size # noqa: E501 - - :param size: The size of this MyFuturesTrade. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def close_size(self): - """Gets the close_size of this MyFuturesTrade. # noqa: E501 - - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 - - :return: The close_size of this MyFuturesTrade. # noqa: E501 - :rtype: int - """ - return self._close_size - - @close_size.setter - def close_size(self, close_size): - """Sets the close_size of this MyFuturesTrade. - - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 - - :param close_size: The close_size of this MyFuturesTrade. # noqa: E501 - :type: int - """ - - self._close_size = close_size - - @property - def price(self): - """Gets the price of this MyFuturesTrade. # noqa: E501 - - Trading price # noqa: E501 - - :return: The price of this MyFuturesTrade. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this MyFuturesTrade. - - Trading price # noqa: E501 - - :param price: The price of this MyFuturesTrade. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def role(self): - """Gets the role of this MyFuturesTrade. # noqa: E501 - - Trade role. Available values are `taker` and `maker` # noqa: E501 - - :return: The role of this MyFuturesTrade. # noqa: E501 - :rtype: str - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this MyFuturesTrade. - - Trade role. Available values are `taker` and `maker` # noqa: E501 - - :param role: The role of this MyFuturesTrade. # noqa: E501 - :type: str - """ - allowed_values = ["taker", "maker"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 - .format(role, allowed_values) - ) - - self._role = role - - @property - def text(self): - """Gets the text of this MyFuturesTrade. # noqa: E501 - - User defined information # noqa: E501 - - :return: The text of this MyFuturesTrade. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this MyFuturesTrade. - - User defined information # noqa: E501 - - :param text: The text of this MyFuturesTrade. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def fee(self): - """Gets the fee of this MyFuturesTrade. # noqa: E501 - - Fee deducted # noqa: E501 - - :return: The fee of this MyFuturesTrade. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this MyFuturesTrade. - - Fee deducted # noqa: E501 - - :param fee: The fee of this MyFuturesTrade. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def point_fee(self): - """Gets the point_fee of this MyFuturesTrade. # noqa: E501 - - Points used to deduct fee # noqa: E501 - - :return: The point_fee of this MyFuturesTrade. # noqa: E501 - :rtype: str - """ - return self._point_fee - - @point_fee.setter - def point_fee(self, point_fee): - """Sets the point_fee of this MyFuturesTrade. - - Points used to deduct fee # noqa: E501 - - :param point_fee: The point_fee of this MyFuturesTrade. # noqa: E501 - :type: str - """ - - self._point_fee = point_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, MyFuturesTrade): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MyFuturesTrade): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py deleted file mode 100644 index 58b5d4b..0000000 --- a/gate_api/models/my_futures_trade_time_range.py +++ /dev/null @@ -1,409 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class MyFuturesTradeTimeRange(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'trade_id': 'str', - 'create_time': 'float', - 'contract': 'str', - 'order_id': 'str', - 'size': 'int', - 'close_size': 'int', - 'price': 'str', - 'role': 'str', - 'text': 'str', - 'fee': 'str', - 'point_fee': 'str' - } - - attribute_map = { - 'trade_id': 'trade_id', - 'create_time': 'create_time', - 'contract': 'contract', - 'order_id': 'order_id', - 'size': 'size', - 'close_size': 'close_size', - 'price': 'price', - 'role': 'role', - 'text': 'text', - 'fee': 'fee', - 'point_fee': 'point_fee' - } - - def __init__(self, trade_id=None, create_time=None, contract=None, order_id=None, size=None, close_size=None, price=None, role=None, text=None, fee=None, point_fee=None, local_vars_configuration=None): # noqa: E501 - # type: (str, float, str, str, int, int, str, str, str, str, str, Configuration) -> None - """MyFuturesTradeTimeRange - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._trade_id = None - self._create_time = None - self._contract = None - self._order_id = None - self._size = None - self._close_size = None - self._price = None - self._role = None - self._text = None - self._fee = None - self._point_fee = None - self.discriminator = None - - if trade_id is not None: - self.trade_id = trade_id - if create_time is not None: - self.create_time = create_time - if contract is not None: - self.contract = contract - if order_id is not None: - self.order_id = order_id - if size is not None: - self.size = size - if close_size is not None: - self.close_size = close_size - if price is not None: - self.price = price - if role is not None: - self.role = role - if text is not None: - self.text = text - if fee is not None: - self.fee = fee - if point_fee is not None: - self.point_fee = point_fee - - @property - def trade_id(self): - """Gets the trade_id of this MyFuturesTradeTimeRange. # noqa: E501 - - Trade ID # noqa: E501 - - :return: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._trade_id - - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this MyFuturesTradeTimeRange. - - Trade ID # noqa: E501 - - :param trade_id: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - - self._trade_id = trade_id - - @property - def create_time(self): - """Gets the create_time of this MyFuturesTradeTimeRange. # noqa: E501 - - Trading time # noqa: E501 - - :return: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this MyFuturesTradeTimeRange. - - Trading time # noqa: E501 - - :param create_time: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def contract(self): - """Gets the contract of this MyFuturesTradeTimeRange. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this MyFuturesTradeTimeRange. - - Futures contract # noqa: E501 - - :param contract: The contract of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def order_id(self): - """Gets the order_id of this MyFuturesTradeTimeRange. # noqa: E501 - - Order ID related # noqa: E501 - - :return: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this MyFuturesTradeTimeRange. - - Order ID related # noqa: E501 - - :param order_id: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def size(self): - """Gets the size of this MyFuturesTradeTimeRange. # noqa: E501 - - Trading size # noqa: E501 - - :return: The size of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this MyFuturesTradeTimeRange. - - Trading size # noqa: E501 - - :param size: The size of this MyFuturesTradeTimeRange. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def close_size(self): - """Gets the close_size of this MyFuturesTradeTimeRange. # noqa: E501 - - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 - - :return: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: int - """ - return self._close_size - - @close_size.setter - def close_size(self, close_size): - """Sets the close_size of this MyFuturesTradeTimeRange. - - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 - - :param close_size: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 - :type: int - """ - - self._close_size = close_size - - @property - def price(self): - """Gets the price of this MyFuturesTradeTimeRange. # noqa: E501 - - Trading price # noqa: E501 - - :return: The price of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this MyFuturesTradeTimeRange. - - Trading price # noqa: E501 - - :param price: The price of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def role(self): - """Gets the role of this MyFuturesTradeTimeRange. # noqa: E501 - - Trade role. Available values are `taker` and `maker` # noqa: E501 - - :return: The role of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this MyFuturesTradeTimeRange. - - Trade role. Available values are `taker` and `maker` # noqa: E501 - - :param role: The role of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - allowed_values = ["taker", "maker"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 - .format(role, allowed_values) - ) - - self._role = role - - @property - def text(self): - """Gets the text of this MyFuturesTradeTimeRange. # noqa: E501 - - User defined information # noqa: E501 - - :return: The text of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this MyFuturesTradeTimeRange. - - User defined information # noqa: E501 - - :param text: The text of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def fee(self): - """Gets the fee of this MyFuturesTradeTimeRange. # noqa: E501 - - Fee deducted # noqa: E501 - - :return: The fee of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this MyFuturesTradeTimeRange. - - Fee deducted # noqa: E501 - - :param fee: The fee of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def point_fee(self): - """Gets the point_fee of this MyFuturesTradeTimeRange. # noqa: E501 - - Points used to deduct fee # noqa: E501 - - :return: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 - :rtype: str - """ - return self._point_fee - - @point_fee.setter - def point_fee(self, point_fee): - """Sets the point_fee of this MyFuturesTradeTimeRange. - - Points used to deduct fee # noqa: E501 - - :param point_fee: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 - :type: str - """ - - self._point_fee = point_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, MyFuturesTradeTimeRange): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MyFuturesTradeTimeRange): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py deleted file mode 100644 index 2b5d58c..0000000 --- a/gate_api/models/open_orders.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OpenOrders(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'total': 'int', - 'orders': 'list[Order]' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'total': 'total', - 'orders': 'orders' - } - - def __init__(self, currency_pair=None, total=None, orders=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, list[Order], Configuration) -> None - """OpenOrders - a 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._total = None - self._orders = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if total is not None: - self.total = total - if orders is not None: - self.orders = orders - - @property - def currency_pair(self): - """Gets the currency_pair of this OpenOrders. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this OpenOrders. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this OpenOrders. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this OpenOrders. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def total(self): - """Gets the total of this OpenOrders. # noqa: E501 - - The total number of pending orders for this trading pair on the current page # noqa: E501 - - :return: The total of this OpenOrders. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this OpenOrders. - - The total number of pending orders for this trading pair on the current page # noqa: E501 - - :param total: The total of this OpenOrders. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def orders(self): - """Gets the orders of this OpenOrders. # noqa: E501 - - - :return: The orders of this OpenOrders. # noqa: E501 - :rtype: list[Order] - """ - return self._orders - - @orders.setter - def orders(self, orders): - """Sets the orders of this OpenOrders. - - - :param orders: The orders of this OpenOrders. # noqa: E501 - :type: list[Order] - """ - - 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, OpenOrders): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OpenOrders): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py deleted file mode 100644 index a3f2875..0000000 --- a/gate_api/models/options_account.py +++ /dev/null @@ -1,633 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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': 'int', - 'total': 'str', - 'position_value': 'str', - 'equity': 'str', - 'short_enabled': 'bool', - 'mmp_enabled': 'bool', - 'liq_triggered': 'bool', - 'margin_mode': 'int', - 'unrealised_pnl': 'str', - 'init_margin': 'str', - 'maint_margin': 'str', - 'order_margin': 'str', - 'ask_order_margin': 'str', - 'bid_order_margin': 'str', - 'available': 'str', - 'point': 'str', - 'currency': 'str', - 'orders_limit': 'int', - 'position_notional_limit': 'int' - } - - attribute_map = { - 'user': 'user', - 'total': 'total', - 'position_value': 'position_value', - 'equity': 'equity', - 'short_enabled': 'short_enabled', - 'mmp_enabled': 'mmp_enabled', - 'liq_triggered': 'liq_triggered', - 'margin_mode': 'margin_mode', - 'unrealised_pnl': 'unrealised_pnl', - 'init_margin': 'init_margin', - 'maint_margin': 'maint_margin', - 'order_margin': 'order_margin', - 'ask_order_margin': 'ask_order_margin', - 'bid_order_margin': 'bid_order_margin', - 'available': 'available', - 'point': 'point', - 'currency': 'currency', - 'orders_limit': 'orders_limit', - 'position_notional_limit': 'position_notional_limit' - } - - def __init__(self, user=None, total=None, position_value=None, equity=None, short_enabled=None, mmp_enabled=None, liq_triggered=None, margin_mode=None, unrealised_pnl=None, init_margin=None, maint_margin=None, order_margin=None, ask_order_margin=None, bid_order_margin=None, available=None, point=None, currency=None, orders_limit=None, position_notional_limit=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, bool, bool, bool, int, str, str, str, str, str, str, str, str, str, int, int, Configuration) -> None - """OptionsAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user = None - self._total = None - self._position_value = None - self._equity = None - self._short_enabled = None - self._mmp_enabled = None - self._liq_triggered = None - self._margin_mode = None - self._unrealised_pnl = None - self._init_margin = None - self._maint_margin = None - self._order_margin = None - self._ask_order_margin = None - self._bid_order_margin = None - self._available = None - self._point = None - self._currency = None - self._orders_limit = None - self._position_notional_limit = None - self.discriminator = None - - if user is not None: - self.user = user - if total is not None: - self.total = total - if position_value is not None: - self.position_value = position_value - if equity is not None: - self.equity = equity - if short_enabled is not None: - self.short_enabled = short_enabled - if mmp_enabled is not None: - self.mmp_enabled = mmp_enabled - if liq_triggered is not None: - self.liq_triggered = liq_triggered - if margin_mode is not None: - self.margin_mode = margin_mode - if unrealised_pnl is not None: - self.unrealised_pnl = unrealised_pnl - if init_margin is not None: - self.init_margin = init_margin - if maint_margin is not None: - self.maint_margin = maint_margin - if order_margin is not None: - self.order_margin = order_margin - if ask_order_margin is not None: - self.ask_order_margin = ask_order_margin - if bid_order_margin is not None: - self.bid_order_margin = bid_order_margin - if available is not None: - self.available = available - if point is not None: - self.point = point - if currency is not None: - self.currency = currency - if orders_limit is not None: - self.orders_limit = orders_limit - if position_notional_limit is not None: - self.position_notional_limit = position_notional_limit - - @property - def user(self): - """Gets the user of this OptionsAccount. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this OptionsAccount. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this OptionsAccount. - - User ID # noqa: E501 - - :param user: The user of this OptionsAccount. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def total(self): - """Gets the total of this OptionsAccount. # noqa: E501 - - Account balance # noqa: E501 - - :return: The total of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this OptionsAccount. - - Account balance # noqa: E501 - - :param total: The total of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def position_value(self): - """Gets the position_value of this OptionsAccount. # noqa: E501 - - Position value, long position value is positive, short position value is negative # noqa: E501 - - :return: The position_value of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._position_value - - @position_value.setter - def position_value(self, position_value): - """Sets the position_value of this OptionsAccount. - - Position value, long position value is positive, short position value is negative # noqa: E501 - - :param position_value: The position_value of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._position_value = position_value - - @property - def equity(self): - """Gets the equity of this OptionsAccount. # noqa: E501 - - Account equity, the sum of account balance and position value # noqa: E501 - - :return: The equity of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._equity - - @equity.setter - def equity(self, equity): - """Sets the equity of this OptionsAccount. - - Account equity, the sum of account balance and position value # noqa: E501 - - :param equity: The equity of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._equity = equity - - @property - def short_enabled(self): - """Gets the short_enabled of this OptionsAccount. # noqa: E501 - - If the account is allowed to short # noqa: E501 - - :return: The short_enabled of this OptionsAccount. # noqa: E501 - :rtype: bool - """ - return self._short_enabled - - @short_enabled.setter - def short_enabled(self, short_enabled): - """Sets the short_enabled of this OptionsAccount. - - If the account is allowed to short # noqa: E501 - - :param short_enabled: The short_enabled of this OptionsAccount. # noqa: E501 - :type: bool - """ - - self._short_enabled = short_enabled - - @property - def mmp_enabled(self): - """Gets the mmp_enabled of this OptionsAccount. # noqa: E501 - - Whether to enable MMP # noqa: E501 - - :return: The mmp_enabled of this OptionsAccount. # noqa: E501 - :rtype: bool - """ - return self._mmp_enabled - - @mmp_enabled.setter - def mmp_enabled(self, mmp_enabled): - """Sets the mmp_enabled of this OptionsAccount. - - Whether to enable MMP # noqa: E501 - - :param mmp_enabled: The mmp_enabled of this OptionsAccount. # noqa: E501 - :type: bool - """ - - self._mmp_enabled = mmp_enabled - - @property - def liq_triggered(self): - """Gets the liq_triggered of this OptionsAccount. # noqa: E501 - - Whether to trigger position liquidation # noqa: E501 - - :return: The liq_triggered of this OptionsAccount. # noqa: E501 - :rtype: bool - """ - return self._liq_triggered - - @liq_triggered.setter - def liq_triggered(self, liq_triggered): - """Sets the liq_triggered of this OptionsAccount. - - Whether to trigger position liquidation # noqa: E501 - - :param liq_triggered: The liq_triggered of this OptionsAccount. # noqa: E501 - :type: bool - """ - - self._liq_triggered = liq_triggered - - @property - def margin_mode(self): - """Gets the margin_mode of this OptionsAccount. # noqa: E501 - - | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 # noqa: E501 - - :return: The margin_mode of this OptionsAccount. # noqa: E501 - :rtype: int - """ - return self._margin_mode - - @margin_mode.setter - def margin_mode(self, margin_mode): - """Sets the margin_mode of this OptionsAccount. - - | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 # noqa: E501 - - :param margin_mode: The margin_mode of this OptionsAccount. # noqa: E501 - :type: int - """ - allowed_values = [0, 1, 2] # noqa: E501 - if self.local_vars_configuration.client_side_validation and margin_mode not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `margin_mode` ({0}), must be one of {1}" # noqa: E501 - .format(margin_mode, allowed_values) - ) - - self._margin_mode = margin_mode - - @property - def unrealised_pnl(self): - """Gets the unrealised_pnl of this OptionsAccount. # noqa: E501 - - Unrealized PNL # noqa: E501 - - :return: The unrealised_pnl of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._unrealised_pnl - - @unrealised_pnl.setter - def unrealised_pnl(self, unrealised_pnl): - """Sets the unrealised_pnl of this OptionsAccount. - - Unrealized PNL # noqa: E501 - - :param unrealised_pnl: The unrealised_pnl of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._unrealised_pnl = unrealised_pnl - - @property - def init_margin(self): - """Gets the init_margin of this OptionsAccount. # noqa: E501 - - Initial position margin # noqa: E501 - - :return: The init_margin of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._init_margin - - @init_margin.setter - def init_margin(self, init_margin): - """Sets the init_margin of this OptionsAccount. - - Initial position margin # noqa: E501 - - :param init_margin: The init_margin of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._init_margin = init_margin - - @property - def maint_margin(self): - """Gets the maint_margin of this OptionsAccount. # noqa: E501 - - Position maintenance margin # noqa: E501 - - :return: The maint_margin of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._maint_margin - - @maint_margin.setter - def maint_margin(self, maint_margin): - """Sets the maint_margin of this OptionsAccount. - - Position maintenance margin # noqa: E501 - - :param maint_margin: The maint_margin of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._maint_margin = maint_margin - - @property - def order_margin(self): - """Gets the order_margin of this OptionsAccount. # noqa: E501 - - Order margin of unfinished orders # noqa: E501 - - :return: The order_margin of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._order_margin - - @order_margin.setter - def order_margin(self, order_margin): - """Sets the order_margin of this OptionsAccount. - - Order margin of unfinished orders # noqa: E501 - - :param order_margin: The order_margin of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._order_margin = order_margin - - @property - def ask_order_margin(self): - """Gets the ask_order_margin of this OptionsAccount. # noqa: E501 - - Margin for outstanding sell orders # noqa: E501 - - :return: The ask_order_margin of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._ask_order_margin - - @ask_order_margin.setter - def ask_order_margin(self, ask_order_margin): - """Sets the ask_order_margin of this OptionsAccount. - - Margin for outstanding sell orders # noqa: E501 - - :param ask_order_margin: The ask_order_margin of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._ask_order_margin = ask_order_margin - - @property - def bid_order_margin(self): - """Gets the bid_order_margin of this OptionsAccount. # noqa: E501 - - Margin for outstanding buy orders # noqa: E501 - - :return: The bid_order_margin of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._bid_order_margin - - @bid_order_margin.setter - def bid_order_margin(self, bid_order_margin): - """Sets the bid_order_margin of this OptionsAccount. - - Margin for outstanding buy orders # noqa: E501 - - :param bid_order_margin: The bid_order_margin of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._bid_order_margin = bid_order_margin - - @property - def available(self): - """Gets the available of this OptionsAccount. # noqa: E501 - - Available balance to transfer out or trade # noqa: E501 - - :return: The available of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this OptionsAccount. - - Available balance to transfer out or trade # noqa: E501 - - :param available: The available of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def point(self): - """Gets the point of this OptionsAccount. # noqa: E501 - - POINT amount # noqa: E501 - - :return: The point of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._point - - @point.setter - def point(self, point): - """Sets the point of this OptionsAccount. - - POINT amount # noqa: E501 - - :param point: The point of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._point = point - - @property - def currency(self): - """Gets the currency of this OptionsAccount. # noqa: E501 - - Settle currency # noqa: E501 - - :return: The currency of this OptionsAccount. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this OptionsAccount. - - Settle currency # noqa: E501 - - :param currency: The currency of this OptionsAccount. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def orders_limit(self): - """Gets the orders_limit of this OptionsAccount. # noqa: E501 - - Maximum number of outstanding orders # noqa: E501 - - :return: The orders_limit of this OptionsAccount. # noqa: E501 - :rtype: int - """ - return self._orders_limit - - @orders_limit.setter - def orders_limit(self, orders_limit): - """Sets the orders_limit of this OptionsAccount. - - Maximum number of outstanding orders # noqa: E501 - - :param orders_limit: The orders_limit of this OptionsAccount. # noqa: E501 - :type: int - """ - - self._orders_limit = orders_limit - - @property - def position_notional_limit(self): - """Gets the position_notional_limit of this OptionsAccount. # noqa: E501 - - Notional value upper limit, including the nominal value of positions and outstanding orders # noqa: E501 - - :return: The position_notional_limit of this OptionsAccount. # noqa: E501 - :rtype: int - """ - return self._position_notional_limit - - @position_notional_limit.setter - def position_notional_limit(self, position_notional_limit): - """Sets the position_notional_limit of this OptionsAccount. - - Notional value upper limit, including the nominal value of positions and outstanding orders # noqa: E501 - - :param position_notional_limit: The position_notional_limit of this OptionsAccount. # noqa: E501 - :type: int - """ - - self._position_notional_limit = position_notional_limit - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py deleted file mode 100644 index e843486..0000000 --- a/gate_api/models/options_account_book.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsAccountBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'float', - 'change': 'str', - 'balance': 'str', - 'type': 'str', - 'text': 'str' - } - - attribute_map = { - 'time': 'time', - 'change': 'change', - 'balance': 'balance', - 'type': 'type', - 'text': 'text' - } - - def __init__(self, time=None, change=None, balance=None, type=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, str, str, str, Configuration) -> None - """OptionsAccountBook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._change = None - self._balance = None - self._type = None - self._text = None - self.discriminator = None - - if time is not None: - self.time = time - if change is not None: - self.change = change - if balance is not None: - self.balance = balance - if type is not None: - self.type = type - if text is not None: - self.text = text - - @property - def time(self): - """Gets the time of this OptionsAccountBook. # noqa: E501 - - Change time # noqa: E501 - - :return: The time of this OptionsAccountBook. # noqa: E501 - :rtype: float - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this OptionsAccountBook. - - Change time # noqa: E501 - - :param time: The time of this OptionsAccountBook. # noqa: E501 - :type: float - """ - - self._time = time - - @property - def change(self): - """Gets the change of this OptionsAccountBook. # noqa: E501 - - Amount changed (USDT) # noqa: E501 - - :return: The change of this OptionsAccountBook. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this OptionsAccountBook. - - Amount changed (USDT) # noqa: E501 - - :param change: The change of this OptionsAccountBook. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def balance(self): - """Gets the balance of this OptionsAccountBook. # noqa: E501 - - Account total balance after change (USDT) # noqa: E501 - - :return: The balance of this OptionsAccountBook. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this OptionsAccountBook. - - Account total balance after change (USDT) # noqa: E501 - - :param balance: The balance of this OptionsAccountBook. # noqa: E501 - :type: str - """ - - self._balance = balance - - @property - def type(self): - """Gets the type of this OptionsAccountBook. # noqa: E501 - - Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 - - :return: The type of this OptionsAccountBook. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this OptionsAccountBook. - - Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 - - :param type: The type of this OptionsAccountBook. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def text(self): - """Gets the text of this OptionsAccountBook. # noqa: E501 - - custom text # noqa: E501 - - :return: The text of this OptionsAccountBook. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this OptionsAccountBook. - - custom text # noqa: E501 - - :param text: The text of this OptionsAccountBook. # 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, OptionsAccountBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsAccountBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py deleted file mode 100644 index 6a42d98..0000000 --- a/gate_api/models/options_candlestick.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsCandlestick(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 't': 'float', - 'v': 'int', - 'c': 'str', - 'h': 'str', - 'l': 'str', - 'o': 'str' - } - - attribute_map = { - 't': 't', - 'v': 'v', - 'c': 'c', - 'h': 'h', - 'l': 'l', - 'o': 'o' - } - - def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501 - # type: (float, int, str, str, str, str, Configuration) -> None - """OptionsCandlestick - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._t = None - self._v = None - self._c = None - self._h = None - self._l = None - self._o = None - self.discriminator = None - - if t is not None: - self.t = t - if v is not None: - self.v = v - if c is not None: - self.c = c - if h is not None: - self.h = h - if l is not None: - self.l = l - if o is not None: - self.o = o - - @property - def t(self): - """Gets the t of this OptionsCandlestick. # noqa: E501 - - Unix timestamp in seconds # noqa: E501 - - :return: The t of this OptionsCandlestick. # noqa: E501 - :rtype: float - """ - return self._t - - @t.setter - def t(self, t): - """Sets the t of this OptionsCandlestick. - - Unix timestamp in seconds # noqa: E501 - - :param t: The t of this OptionsCandlestick. # noqa: E501 - :type: float - """ - - self._t = t - - @property - def v(self): - """Gets the v of this OptionsCandlestick. # noqa: E501 - - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 - - :return: The v of this OptionsCandlestick. # noqa: E501 - :rtype: int - """ - return self._v - - @v.setter - def v(self, v): - """Sets the v of this OptionsCandlestick. - - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 - - :param v: The v of this OptionsCandlestick. # noqa: E501 - :type: int - """ - - self._v = v - - @property - def c(self): - """Gets the c of this OptionsCandlestick. # noqa: E501 - - Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :return: The c of this OptionsCandlestick. # noqa: E501 - :rtype: str - """ - return self._c - - @c.setter - def c(self, c): - """Sets the c of this OptionsCandlestick. - - Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :param c: The c of this OptionsCandlestick. # noqa: E501 - :type: str - """ - - self._c = c - - @property - def h(self): - """Gets the h of this OptionsCandlestick. # noqa: E501 - - Highest price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :return: The h of this OptionsCandlestick. # noqa: E501 - :rtype: str - """ - return self._h - - @h.setter - def h(self, h): - """Sets the h of this OptionsCandlestick. - - Highest price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :param h: The h of this OptionsCandlestick. # noqa: E501 - :type: str - """ - - self._h = h - - @property - def l(self): - """Gets the l of this OptionsCandlestick. # noqa: E501 - - Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :return: The l of this OptionsCandlestick. # noqa: E501 - :rtype: str - """ - return self._l - - @l.setter - def l(self, l): - """Sets the l of this OptionsCandlestick. - - Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :param l: The l of this OptionsCandlestick. # noqa: E501 - :type: str - """ - - self._l = l - - @property - def o(self): - """Gets the o of this OptionsCandlestick. # noqa: E501 - - Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :return: The o of this OptionsCandlestick. # noqa: E501 - :rtype: str - """ - return self._o - - @o.setter - def o(self, o): - """Sets the o of this OptionsCandlestick. - - Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 - - :param o: The o of this OptionsCandlestick. # noqa: E501 - :type: str - """ - - self._o = o - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsCandlestick): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsCandlestick): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py deleted file mode 100644 index 7338171..0000000 --- a/gate_api/models/options_contract.py +++ /dev/null @@ -1,795 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsContract(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'tag': 'str', - 'create_time': 'float', - 'expiration_time': 'float', - 'is_call': 'bool', - 'multiplier': 'str', - 'underlying': 'str', - 'underlying_price': 'str', - 'last_price': 'str', - 'mark_price': 'str', - 'index_price': 'str', - 'maker_fee_rate': 'str', - 'taker_fee_rate': 'str', - 'order_price_round': 'str', - 'mark_price_round': 'str', - 'order_size_min': 'int', - 'order_size_max': 'int', - 'order_price_deviate': 'str', - 'ref_discount_rate': 'str', - 'ref_rebate_rate': 'str', - 'orderbook_id': 'int', - 'trade_id': 'int', - 'trade_size': 'int', - 'position_size': 'int', - 'orders_limit': 'int' - } - - attribute_map = { - 'name': 'name', - 'tag': 'tag', - 'create_time': 'create_time', - 'expiration_time': 'expiration_time', - 'is_call': 'is_call', - 'multiplier': 'multiplier', - 'underlying': 'underlying', - 'underlying_price': 'underlying_price', - 'last_price': 'last_price', - 'mark_price': 'mark_price', - 'index_price': 'index_price', - 'maker_fee_rate': 'maker_fee_rate', - 'taker_fee_rate': 'taker_fee_rate', - 'order_price_round': 'order_price_round', - 'mark_price_round': 'mark_price_round', - 'order_size_min': 'order_size_min', - 'order_size_max': 'order_size_max', - 'order_price_deviate': 'order_price_deviate', - 'ref_discount_rate': 'ref_discount_rate', - 'ref_rebate_rate': 'ref_rebate_rate', - 'orderbook_id': 'orderbook_id', - 'trade_id': 'trade_id', - 'trade_size': 'trade_size', - 'position_size': 'position_size', - 'orders_limit': 'orders_limit' - } - - def __init__(self, name=None, tag=None, create_time=None, expiration_time=None, is_call=None, multiplier=None, underlying=None, underlying_price=None, last_price=None, mark_price=None, index_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, orders_limit=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, float, float, bool, str, str, str, str, str, str, str, str, str, str, int, int, str, str, str, int, int, int, int, int, Configuration) -> None - """OptionsContract - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._tag = None - self._create_time = None - self._expiration_time = None - self._is_call = None - self._multiplier = None - self._underlying = None - self._underlying_price = None - self._last_price = None - self._mark_price = None - self._index_price = None - self._maker_fee_rate = None - self._taker_fee_rate = None - self._order_price_round = None - self._mark_price_round = None - self._order_size_min = None - self._order_size_max = None - self._order_price_deviate = None - self._ref_discount_rate = None - self._ref_rebate_rate = None - self._orderbook_id = None - self._trade_id = None - self._trade_size = None - self._position_size = None - self._orders_limit = None - self.discriminator = None - - if name is not None: - self.name = name - if tag is not None: - self.tag = tag - if create_time is not None: - self.create_time = create_time - if expiration_time is not None: - self.expiration_time = expiration_time - if is_call is not None: - self.is_call = is_call - if multiplier is not None: - self.multiplier = multiplier - if underlying is not None: - self.underlying = underlying - if underlying_price is not None: - self.underlying_price = underlying_price - if last_price is not None: - self.last_price = last_price - if mark_price is not None: - self.mark_price = mark_price - if index_price is not None: - self.index_price = index_price - if maker_fee_rate is not None: - self.maker_fee_rate = maker_fee_rate - if taker_fee_rate is not None: - self.taker_fee_rate = taker_fee_rate - if order_price_round is not None: - self.order_price_round = order_price_round - if mark_price_round is not None: - self.mark_price_round = mark_price_round - if order_size_min is not None: - self.order_size_min = order_size_min - if order_size_max is not None: - self.order_size_max = order_size_max - if order_price_deviate is not None: - self.order_price_deviate = order_price_deviate - if ref_discount_rate is not None: - self.ref_discount_rate = ref_discount_rate - if ref_rebate_rate is not None: - self.ref_rebate_rate = ref_rebate_rate - if orderbook_id is not None: - self.orderbook_id = orderbook_id - if trade_id is not None: - self.trade_id = trade_id - if trade_size is not None: - self.trade_size = trade_size - if position_size is not None: - self.position_size = position_size - if orders_limit is not None: - self.orders_limit = orders_limit - - @property - def name(self): - """Gets the name of this OptionsContract. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The name of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this OptionsContract. - - Options contract name # noqa: E501 - - :param name: The name of this OptionsContract. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def tag(self): - """Gets the tag of this OptionsContract. # noqa: E501 - - tag # noqa: E501 - - :return: The tag of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this OptionsContract. - - tag # noqa: E501 - - :param tag: The tag of this OptionsContract. # noqa: E501 - :type: str - """ - - self._tag = tag - - @property - def create_time(self): - """Gets the create_time of this OptionsContract. # noqa: E501 - - Creation time # noqa: E501 - - :return: The create_time of this OptionsContract. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this OptionsContract. - - Creation time # noqa: E501 - - :param create_time: The create_time of this OptionsContract. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def expiration_time(self): - """Gets the expiration_time of this OptionsContract. # noqa: E501 - - Expiration time # noqa: E501 - - :return: The expiration_time of this OptionsContract. # noqa: E501 - :rtype: float - """ - return self._expiration_time - - @expiration_time.setter - def expiration_time(self, expiration_time): - """Sets the expiration_time of this OptionsContract. - - Expiration time # noqa: E501 - - :param expiration_time: The expiration_time of this OptionsContract. # noqa: E501 - :type: float - """ - - self._expiration_time = expiration_time - - @property - def is_call(self): - """Gets the is_call of this OptionsContract. # noqa: E501 - - `true` means call options, while `false` is put options # noqa: E501 - - :return: The is_call of this OptionsContract. # noqa: E501 - :rtype: bool - """ - return self._is_call - - @is_call.setter - def is_call(self, is_call): - """Sets the is_call of this OptionsContract. - - `true` means call options, while `false` is put options # noqa: E501 - - :param is_call: The is_call of this OptionsContract. # noqa: E501 - :type: bool - """ - - self._is_call = is_call - - @property - def multiplier(self): - """Gets the multiplier of this OptionsContract. # noqa: E501 - - Multiplier used in converting from invoicing to settlement currency # noqa: E501 - - :return: The multiplier of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._multiplier - - @multiplier.setter - def multiplier(self, multiplier): - """Sets the multiplier of this OptionsContract. - - Multiplier used in converting from invoicing to settlement currency # noqa: E501 - - :param multiplier: The multiplier of this OptionsContract. # noqa: E501 - :type: str - """ - - self._multiplier = multiplier - - @property - def underlying(self): - """Gets the underlying of this OptionsContract. # noqa: E501 - - Underlying # noqa: E501 - - :return: The underlying of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._underlying - - @underlying.setter - def underlying(self, underlying): - """Sets the underlying of this OptionsContract. - - Underlying # noqa: E501 - - :param underlying: The underlying of this OptionsContract. # noqa: E501 - :type: str - """ - - self._underlying = underlying - - @property - def underlying_price(self): - """Gets the underlying_price of this OptionsContract. # noqa: E501 - - Underlying price (quote currency) # noqa: E501 - - :return: The underlying_price of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._underlying_price - - @underlying_price.setter - def underlying_price(self, underlying_price): - """Sets the underlying_price of this OptionsContract. - - Underlying price (quote currency) # noqa: E501 - - :param underlying_price: The underlying_price of this OptionsContract. # noqa: E501 - :type: str - """ - - self._underlying_price = underlying_price - - @property - def last_price(self): - """Gets the last_price of this OptionsContract. # noqa: E501 - - Last trading price # noqa: E501 - - :return: The last_price of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._last_price - - @last_price.setter - def last_price(self, last_price): - """Sets the last_price of this OptionsContract. - - Last trading price # noqa: E501 - - :param last_price: The last_price of this OptionsContract. # noqa: E501 - :type: str - """ - - self._last_price = last_price - - @property - def mark_price(self): - """Gets the mark_price of this OptionsContract. # noqa: E501 - - Current mark price (quote currency) # noqa: E501 - - :return: The mark_price of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this OptionsContract. - - Current mark price (quote currency) # noqa: E501 - - :param mark_price: The mark_price of this OptionsContract. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def index_price(self): - """Gets the index_price of this OptionsContract. # noqa: E501 - - Current index price (quote currency) # noqa: E501 - - :return: The index_price of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this OptionsContract. - - Current index price (quote currency) # noqa: E501 - - :param index_price: The index_price of this OptionsContract. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def maker_fee_rate(self): - """Gets the maker_fee_rate of this OptionsContract. # noqa: E501 - - Maker fee rate, where negative means rebate # noqa: E501 - - :return: The maker_fee_rate of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._maker_fee_rate - - @maker_fee_rate.setter - def maker_fee_rate(self, maker_fee_rate): - """Sets the maker_fee_rate of this OptionsContract. - - Maker fee rate, where negative means rebate # noqa: E501 - - :param maker_fee_rate: The maker_fee_rate of this OptionsContract. # noqa: E501 - :type: str - """ - - self._maker_fee_rate = maker_fee_rate - - @property - def taker_fee_rate(self): - """Gets the taker_fee_rate of this OptionsContract. # noqa: E501 - - Taker fee rate # noqa: E501 - - :return: The taker_fee_rate of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._taker_fee_rate - - @taker_fee_rate.setter - def taker_fee_rate(self, taker_fee_rate): - """Sets the taker_fee_rate of this OptionsContract. - - Taker fee rate # noqa: E501 - - :param taker_fee_rate: The taker_fee_rate of this OptionsContract. # noqa: E501 - :type: str - """ - - self._taker_fee_rate = taker_fee_rate - - @property - def order_price_round(self): - """Gets the order_price_round of this OptionsContract. # noqa: E501 - - Minimum order price increment # noqa: E501 - - :return: The order_price_round of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._order_price_round - - @order_price_round.setter - def order_price_round(self, order_price_round): - """Sets the order_price_round of this OptionsContract. - - Minimum order price increment # noqa: E501 - - :param order_price_round: The order_price_round of this OptionsContract. # noqa: E501 - :type: str - """ - - self._order_price_round = order_price_round - - @property - def mark_price_round(self): - """Gets the mark_price_round of this OptionsContract. # noqa: E501 - - Minimum mark price increment # noqa: E501 - - :return: The mark_price_round of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._mark_price_round - - @mark_price_round.setter - def mark_price_round(self, mark_price_round): - """Sets the mark_price_round of this OptionsContract. - - Minimum mark price increment # noqa: E501 - - :param mark_price_round: The mark_price_round of this OptionsContract. # noqa: E501 - :type: str - """ - - self._mark_price_round = mark_price_round - - @property - def order_size_min(self): - """Gets the order_size_min of this OptionsContract. # noqa: E501 - - Minimum order size the contract allowed # noqa: E501 - - :return: The order_size_min of this OptionsContract. # noqa: E501 - :rtype: int - """ - return self._order_size_min - - @order_size_min.setter - def order_size_min(self, order_size_min): - """Sets the order_size_min of this OptionsContract. - - Minimum order size the contract allowed # noqa: E501 - - :param order_size_min: The order_size_min of this OptionsContract. # noqa: E501 - :type: int - """ - - self._order_size_min = order_size_min - - @property - def order_size_max(self): - """Gets the order_size_max of this OptionsContract. # noqa: E501 - - Maximum order size the contract allowed # noqa: E501 - - :return: The order_size_max of this OptionsContract. # noqa: E501 - :rtype: int - """ - return self._order_size_max - - @order_size_max.setter - def order_size_max(self, order_size_max): - """Sets the order_size_max of this OptionsContract. - - Maximum order size the contract allowed # noqa: E501 - - :param order_size_max: The order_size_max of this OptionsContract. # noqa: E501 - :type: int - """ - - self._order_size_max = order_size_max - - @property - def order_price_deviate(self): - """Gets the order_price_deviate of this OptionsContract. # noqa: E501 - - The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 - - :return: The order_price_deviate of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._order_price_deviate - - @order_price_deviate.setter - def order_price_deviate(self, order_price_deviate): - """Sets the order_price_deviate of this OptionsContract. - - The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 - - :param order_price_deviate: The order_price_deviate of this OptionsContract. # noqa: E501 - :type: str - """ - - self._order_price_deviate = order_price_deviate - - @property - def ref_discount_rate(self): - """Gets the ref_discount_rate of this OptionsContract. # noqa: E501 - - Referral fee rate discount # noqa: E501 - - :return: The ref_discount_rate of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._ref_discount_rate - - @ref_discount_rate.setter - def ref_discount_rate(self, ref_discount_rate): - """Sets the ref_discount_rate of this OptionsContract. - - Referral fee rate discount # noqa: E501 - - :param ref_discount_rate: The ref_discount_rate of this OptionsContract. # noqa: E501 - :type: str - """ - - self._ref_discount_rate = ref_discount_rate - - @property - def ref_rebate_rate(self): - """Gets the ref_rebate_rate of this OptionsContract. # noqa: E501 - - Referrer commission rate # noqa: E501 - - :return: The ref_rebate_rate of this OptionsContract. # noqa: E501 - :rtype: str - """ - return self._ref_rebate_rate - - @ref_rebate_rate.setter - def ref_rebate_rate(self, ref_rebate_rate): - """Sets the ref_rebate_rate of this OptionsContract. - - Referrer commission rate # noqa: E501 - - :param ref_rebate_rate: The ref_rebate_rate of this OptionsContract. # noqa: E501 - :type: str - """ - - self._ref_rebate_rate = ref_rebate_rate - - @property - def orderbook_id(self): - """Gets the orderbook_id of this OptionsContract. # noqa: E501 - - Current orderbook ID # noqa: E501 - - :return: The orderbook_id of this OptionsContract. # noqa: E501 - :rtype: int - """ - return self._orderbook_id - - @orderbook_id.setter - def orderbook_id(self, orderbook_id): - """Sets the orderbook_id of this OptionsContract. - - Current orderbook ID # noqa: E501 - - :param orderbook_id: The orderbook_id of this OptionsContract. # noqa: E501 - :type: int - """ - - self._orderbook_id = orderbook_id - - @property - def trade_id(self): - """Gets the trade_id of this OptionsContract. # noqa: E501 - - Current trade ID # noqa: E501 - - :return: The trade_id of this OptionsContract. # noqa: E501 - :rtype: int - """ - return self._trade_id - - @trade_id.setter - def trade_id(self, trade_id): - """Sets the trade_id of this OptionsContract. - - Current trade ID # noqa: E501 - - :param trade_id: The trade_id of this OptionsContract. # noqa: E501 - :type: int - """ - - self._trade_id = trade_id - - @property - def trade_size(self): - """Gets the trade_size of this OptionsContract. # noqa: E501 - - Historical accumulated trade size # noqa: E501 - - :return: The trade_size of this OptionsContract. # noqa: E501 - :rtype: int - """ - return self._trade_size - - @trade_size.setter - def trade_size(self, trade_size): - """Sets the trade_size of this OptionsContract. - - Historical accumulated trade size # noqa: E501 - - :param trade_size: The trade_size of this OptionsContract. # noqa: E501 - :type: int - """ - - self._trade_size = trade_size - - @property - def position_size(self): - """Gets the position_size of this OptionsContract. # noqa: E501 - - Current total long position size # noqa: E501 - - :return: The position_size of this OptionsContract. # noqa: E501 - :rtype: int - """ - return self._position_size - - @position_size.setter - def position_size(self, position_size): - """Sets the position_size of this OptionsContract. - - Current total long position size # noqa: E501 - - :param position_size: The position_size of this OptionsContract. # noqa: E501 - :type: int - """ - - self._position_size = position_size - - @property - def orders_limit(self): - """Gets the orders_limit of this OptionsContract. # noqa: E501 - - Maximum number of open orders # noqa: E501 - - :return: The orders_limit of this OptionsContract. # noqa: E501 - :rtype: int - """ - return self._orders_limit - - @orders_limit.setter - def orders_limit(self, orders_limit): - """Sets the orders_limit of this OptionsContract. - - Maximum number of open orders # noqa: E501 - - :param orders_limit: The orders_limit of this OptionsContract. # noqa: E501 - :type: int - """ - - self._orders_limit = orders_limit - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsContract): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsContract): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py deleted file mode 100644 index 6cace49..0000000 --- a/gate_api/models/options_mmp.py +++ /dev/null @@ -1,296 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsMMP(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'underlying': 'str', - 'window': 'int', - 'frozen_period': 'int', - 'qty_limit': 'str', - 'delta_limit': 'str', - 'trigger_time_ms': 'int', - 'frozen_until_ms': 'int' - } - - attribute_map = { - 'underlying': 'underlying', - 'window': 'window', - 'frozen_period': 'frozen_period', - 'qty_limit': 'qty_limit', - 'delta_limit': 'delta_limit', - 'trigger_time_ms': 'trigger_time_ms', - 'frozen_until_ms': 'frozen_until_ms' - } - - def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=None, delta_limit=None, trigger_time_ms=None, frozen_until_ms=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, int, str, str, int, int, Configuration) -> None - """OptionsMMP - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._underlying = None - self._window = None - self._frozen_period = None - self._qty_limit = None - self._delta_limit = None - self._trigger_time_ms = None - self._frozen_until_ms = None - self.discriminator = None - - self.underlying = underlying - self.window = window - self.frozen_period = frozen_period - self.qty_limit = qty_limit - self.delta_limit = delta_limit - if trigger_time_ms is not None: - self.trigger_time_ms = trigger_time_ms - if frozen_until_ms is not None: - self.frozen_until_ms = frozen_until_ms - - @property - def underlying(self): - """Gets the underlying of this OptionsMMP. # noqa: E501 - - Underlying # noqa: E501 - - :return: The underlying of this OptionsMMP. # noqa: E501 - :rtype: str - """ - return self._underlying - - @underlying.setter - def underlying(self, underlying): - """Sets the underlying of this OptionsMMP. - - Underlying # noqa: E501 - - :param underlying: The underlying of this OptionsMMP. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and underlying is None: # noqa: E501 - raise ValueError("Invalid value for `underlying`, must not be `None`") # noqa: E501 - - self._underlying = underlying - - @property - def window(self): - """Gets the window of this OptionsMMP. # noqa: E501 - - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 - - :return: The window of this OptionsMMP. # noqa: E501 - :rtype: int - """ - return self._window - - @window.setter - def window(self, window): - """Sets the window of this OptionsMMP. - - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 - - :param window: The window of this OptionsMMP. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and window is None: # noqa: E501 - raise ValueError("Invalid value for `window`, must not be `None`") # noqa: E501 - - self._window = window - - @property - def frozen_period(self): - """Gets the frozen_period of this OptionsMMP. # noqa: E501 - - Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 - - :return: The frozen_period of this OptionsMMP. # noqa: E501 - :rtype: int - """ - return self._frozen_period - - @frozen_period.setter - def frozen_period(self, frozen_period): - """Sets the frozen_period of this OptionsMMP. - - Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 - - :param frozen_period: The frozen_period of this OptionsMMP. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and frozen_period is None: # noqa: E501 - raise ValueError("Invalid value for `frozen_period`, must not be `None`") # noqa: E501 - - self._frozen_period = frozen_period - - @property - def qty_limit(self): - """Gets the qty_limit of this OptionsMMP. # noqa: E501 - - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 - - :return: The qty_limit of this OptionsMMP. # noqa: E501 - :rtype: str - """ - return self._qty_limit - - @qty_limit.setter - def qty_limit(self, qty_limit): - """Sets the qty_limit of this OptionsMMP. - - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 - - :param qty_limit: The qty_limit of this OptionsMMP. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and qty_limit is None: # noqa: E501 - raise ValueError("Invalid value for `qty_limit`, must not be `None`") # noqa: E501 - - self._qty_limit = qty_limit - - @property - def delta_limit(self): - """Gets the delta_limit of this OptionsMMP. # noqa: E501 - - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 - - :return: The delta_limit of this OptionsMMP. # noqa: E501 - :rtype: str - """ - return self._delta_limit - - @delta_limit.setter - def delta_limit(self, delta_limit): - """Sets the delta_limit of this OptionsMMP. - - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 - - :param delta_limit: The delta_limit of this OptionsMMP. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and delta_limit is None: # noqa: E501 - raise ValueError("Invalid value for `delta_limit`, must not be `None`") # noqa: E501 - - self._delta_limit = delta_limit - - @property - def trigger_time_ms(self): - """Gets the trigger_time_ms of this OptionsMMP. # noqa: E501 - - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 - - :return: The trigger_time_ms of this OptionsMMP. # noqa: E501 - :rtype: int - """ - return self._trigger_time_ms - - @trigger_time_ms.setter - def trigger_time_ms(self, trigger_time_ms): - """Sets the trigger_time_ms of this OptionsMMP. - - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 - - :param trigger_time_ms: The trigger_time_ms of this OptionsMMP. # noqa: E501 - :type: int - """ - - self._trigger_time_ms = trigger_time_ms - - @property - def frozen_until_ms(self): - """Gets the frozen_until_ms of this OptionsMMP. # noqa: E501 - - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 - - :return: The frozen_until_ms of this OptionsMMP. # noqa: E501 - :rtype: int - """ - return self._frozen_until_ms - - @frozen_until_ms.setter - def frozen_until_ms(self, frozen_until_ms): - """Sets the frozen_until_ms of this OptionsMMP. - - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 - - :param frozen_until_ms: The frozen_until_ms of this OptionsMMP. # noqa: E501 - :type: int - """ - - self._frozen_until_ms = frozen_until_ms - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsMMP): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsMMP): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py deleted file mode 100644 index 5e3583a..0000000 --- a/gate_api/models/options_mmp_reset.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsMMPReset(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'underlying': 'str', - 'window': 'int', - 'frozen_period': 'int', - 'qty_limit': 'str', - 'delta_limit': 'str', - 'trigger_time_ms': 'int', - 'frozen_until_ms': 'int' - } - - attribute_map = { - 'underlying': 'underlying', - 'window': 'window', - 'frozen_period': 'frozen_period', - 'qty_limit': 'qty_limit', - 'delta_limit': 'delta_limit', - 'trigger_time_ms': 'trigger_time_ms', - 'frozen_until_ms': 'frozen_until_ms' - } - - def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=None, delta_limit=None, trigger_time_ms=None, frozen_until_ms=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, int, str, str, int, int, Configuration) -> None - """OptionsMMPReset - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._underlying = None - self._window = None - self._frozen_period = None - self._qty_limit = None - self._delta_limit = None - self._trigger_time_ms = None - self._frozen_until_ms = None - self.discriminator = None - - self.underlying = underlying - if window is not None: - self.window = window - if frozen_period is not None: - self.frozen_period = frozen_period - if qty_limit is not None: - self.qty_limit = qty_limit - if delta_limit is not None: - self.delta_limit = delta_limit - if trigger_time_ms is not None: - self.trigger_time_ms = trigger_time_ms - if frozen_until_ms is not None: - self.frozen_until_ms = frozen_until_ms - - @property - def underlying(self): - """Gets the underlying of this OptionsMMPReset. # noqa: E501 - - Underlying # noqa: E501 - - :return: The underlying of this OptionsMMPReset. # noqa: E501 - :rtype: str - """ - return self._underlying - - @underlying.setter - def underlying(self, underlying): - """Sets the underlying of this OptionsMMPReset. - - Underlying # noqa: E501 - - :param underlying: The underlying of this OptionsMMPReset. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and underlying is None: # noqa: E501 - raise ValueError("Invalid value for `underlying`, must not be `None`") # noqa: E501 - - self._underlying = underlying - - @property - def window(self): - """Gets the window of this OptionsMMPReset. # noqa: E501 - - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 - - :return: The window of this OptionsMMPReset. # noqa: E501 - :rtype: int - """ - return self._window - - @window.setter - def window(self, window): - """Sets the window of this OptionsMMPReset. - - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 - - :param window: The window of this OptionsMMPReset. # noqa: E501 - :type: int - """ - - self._window = window - - @property - def frozen_period(self): - """Gets the frozen_period of this OptionsMMPReset. # noqa: E501 - - Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 - - :return: The frozen_period of this OptionsMMPReset. # noqa: E501 - :rtype: int - """ - return self._frozen_period - - @frozen_period.setter - def frozen_period(self, frozen_period): - """Sets the frozen_period of this OptionsMMPReset. - - Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 - - :param frozen_period: The frozen_period of this OptionsMMPReset. # noqa: E501 - :type: int - """ - - self._frozen_period = frozen_period - - @property - def qty_limit(self): - """Gets the qty_limit of this OptionsMMPReset. # noqa: E501 - - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 - - :return: The qty_limit of this OptionsMMPReset. # noqa: E501 - :rtype: str - """ - return self._qty_limit - - @qty_limit.setter - def qty_limit(self, qty_limit): - """Sets the qty_limit of this OptionsMMPReset. - - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 - - :param qty_limit: The qty_limit of this OptionsMMPReset. # noqa: E501 - :type: str - """ - - self._qty_limit = qty_limit - - @property - def delta_limit(self): - """Gets the delta_limit of this OptionsMMPReset. # noqa: E501 - - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 - - :return: The delta_limit of this OptionsMMPReset. # noqa: E501 - :rtype: str - """ - return self._delta_limit - - @delta_limit.setter - def delta_limit(self, delta_limit): - """Sets the delta_limit of this OptionsMMPReset. - - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 - - :param delta_limit: The delta_limit of this OptionsMMPReset. # noqa: E501 - :type: str - """ - - self._delta_limit = delta_limit - - @property - def trigger_time_ms(self): - """Gets the trigger_time_ms of this OptionsMMPReset. # noqa: E501 - - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 - - :return: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 - :rtype: int - """ - return self._trigger_time_ms - - @trigger_time_ms.setter - def trigger_time_ms(self, trigger_time_ms): - """Sets the trigger_time_ms of this OptionsMMPReset. - - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 - - :param trigger_time_ms: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 - :type: int - """ - - self._trigger_time_ms = trigger_time_ms - - @property - def frozen_until_ms(self): - """Gets the frozen_until_ms of this OptionsMMPReset. # noqa: E501 - - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 - - :return: The frozen_until_ms of this OptionsMMPReset. # noqa: E501 - :rtype: int - """ - return self._frozen_until_ms - - @frozen_until_ms.setter - def frozen_until_ms(self, frozen_until_ms): - """Sets the frozen_until_ms of this OptionsMMPReset. - - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 - - :param frozen_until_ms: The frozen_until_ms of this OptionsMMPReset. # noqa: E501 - :type: int - """ - - self._frozen_until_ms = frozen_until_ms - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsMMPReset): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsMMPReset): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py deleted file mode 100644 index f1eb838..0000000 --- a/gate_api/models/options_my_settlements.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsMySettlements(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'float', - 'underlying': 'str', - 'contract': 'str', - 'strike_price': 'str', - 'settle_price': 'str', - 'size': 'int', - 'settle_profit': 'str', - 'fee': 'str', - 'realised_pnl': 'str' - } - - attribute_map = { - 'time': 'time', - 'underlying': 'underlying', - 'contract': 'contract', - 'strike_price': 'strike_price', - 'settle_price': 'settle_price', - 'size': 'size', - 'settle_profit': 'settle_profit', - 'fee': 'fee', - 'realised_pnl': 'realised_pnl' - } - - def __init__(self, time=None, underlying=None, contract=None, strike_price=None, settle_price=None, size=None, settle_profit=None, fee=None, realised_pnl=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, str, str, str, int, str, str, str, Configuration) -> None - """OptionsMySettlements - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._underlying = None - self._contract = None - self._strike_price = None - self._settle_price = None - self._size = None - self._settle_profit = None - self._fee = None - self._realised_pnl = None - self.discriminator = None - - if time is not None: - self.time = time - if underlying is not None: - self.underlying = underlying - if contract is not None: - self.contract = contract - if strike_price is not None: - self.strike_price = strike_price - if settle_price is not None: - self.settle_price = settle_price - if size is not None: - self.size = size - if settle_profit is not None: - self.settle_profit = settle_profit - if fee is not None: - self.fee = fee - if realised_pnl is not None: - self.realised_pnl = realised_pnl - - @property - def time(self): - """Gets the time of this OptionsMySettlements. # noqa: E501 - - Settlement time # noqa: E501 - - :return: The time of this OptionsMySettlements. # noqa: E501 - :rtype: float - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this OptionsMySettlements. - - Settlement time # noqa: E501 - - :param time: The time of this OptionsMySettlements. # noqa: E501 - :type: float - """ - - self._time = time - - @property - def underlying(self): - """Gets the underlying of this OptionsMySettlements. # noqa: E501 - - Underlying # noqa: E501 - - :return: The underlying of this OptionsMySettlements. # noqa: E501 - :rtype: str - """ - return self._underlying - - @underlying.setter - def underlying(self, underlying): - """Sets the underlying of this OptionsMySettlements. - - Underlying # noqa: E501 - - :param underlying: The underlying of this OptionsMySettlements. # noqa: E501 - :type: str - """ - - self._underlying = underlying - - @property - def contract(self): - """Gets the contract of this OptionsMySettlements. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The contract of this OptionsMySettlements. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this OptionsMySettlements. - - Options contract name # noqa: E501 - - :param contract: The contract of this OptionsMySettlements. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def strike_price(self): - """Gets the strike_price of this OptionsMySettlements. # noqa: E501 - - Strike price (quote currency) # noqa: E501 - - :return: The strike_price of this OptionsMySettlements. # noqa: E501 - :rtype: str - """ - return self._strike_price - - @strike_price.setter - def strike_price(self, strike_price): - """Sets the strike_price of this OptionsMySettlements. - - Strike price (quote currency) # noqa: E501 - - :param strike_price: The strike_price of this OptionsMySettlements. # noqa: E501 - :type: str - """ - - self._strike_price = strike_price - - @property - def settle_price(self): - """Gets the settle_price of this OptionsMySettlements. # noqa: E501 - - Settlement price (quote currency) # noqa: E501 - - :return: The settle_price of this OptionsMySettlements. # noqa: E501 - :rtype: str - """ - return self._settle_price - - @settle_price.setter - def settle_price(self, settle_price): - """Sets the settle_price of this OptionsMySettlements. - - Settlement price (quote currency) # noqa: E501 - - :param settle_price: The settle_price of this OptionsMySettlements. # noqa: E501 - :type: str - """ - - self._settle_price = settle_price - - @property - def size(self): - """Gets the size of this OptionsMySettlements. # noqa: E501 - - Size # noqa: E501 - - :return: The size of this OptionsMySettlements. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this OptionsMySettlements. - - Size # noqa: E501 - - :param size: The size of this OptionsMySettlements. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def settle_profit(self): - """Gets the settle_profit of this OptionsMySettlements. # noqa: E501 - - Settlement profit (quote currency) # noqa: E501 - - :return: The settle_profit of this OptionsMySettlements. # noqa: E501 - :rtype: str - """ - return self._settle_profit - - @settle_profit.setter - def settle_profit(self, settle_profit): - """Sets the settle_profit of this OptionsMySettlements. - - Settlement profit (quote currency) # noqa: E501 - - :param settle_profit: The settle_profit of this OptionsMySettlements. # noqa: E501 - :type: str - """ - - self._settle_profit = settle_profit - - @property - def fee(self): - """Gets the fee of this OptionsMySettlements. # noqa: E501 - - Fee (quote currency) # noqa: E501 - - :return: The fee of this OptionsMySettlements. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this OptionsMySettlements. - - Fee (quote currency) # noqa: E501 - - :param fee: The fee of this OptionsMySettlements. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def realised_pnl(self): - """Gets the realised_pnl of this OptionsMySettlements. # noqa: E501 - - The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501 - - :return: The realised_pnl of this OptionsMySettlements. # noqa: E501 - :rtype: str - """ - return self._realised_pnl - - @realised_pnl.setter - def realised_pnl(self, realised_pnl): - """Sets the realised_pnl of this OptionsMySettlements. - - The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501 - - :param realised_pnl: The realised_pnl of this OptionsMySettlements. # noqa: E501 - :type: str - """ - - self._realised_pnl = realised_pnl - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsMySettlements): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsMySettlements): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py deleted file mode 100644 index 1da411f..0000000 --- a/gate_api/models/options_my_trade.py +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsMyTrade(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'create_time': 'float', - 'contract': 'str', - 'order_id': 'int', - 'size': 'int', - 'price': 'str', - 'underlying_price': 'str', - 'role': 'str' - } - - attribute_map = { - 'id': 'id', - 'create_time': 'create_time', - 'contract': 'contract', - 'order_id': 'order_id', - 'size': 'size', - 'price': 'price', - 'underlying_price': 'underlying_price', - 'role': 'role' - } - - def __init__(self, id=None, create_time=None, contract=None, order_id=None, size=None, price=None, underlying_price=None, role=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, str, int, int, str, str, str, Configuration) -> None - """OptionsMyTrade - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._create_time = None - self._contract = None - self._order_id = None - self._size = None - self._price = None - self._underlying_price = None - self._role = None - self.discriminator = None - - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if contract is not None: - self.contract = contract - if order_id is not None: - self.order_id = order_id - if size is not None: - self.size = size - if price is not None: - self.price = price - if underlying_price is not None: - self.underlying_price = underlying_price - if role is not None: - self.role = role - - @property - def id(self): - """Gets the id of this OptionsMyTrade. # noqa: E501 - - Trade ID # noqa: E501 - - :return: The id of this OptionsMyTrade. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OptionsMyTrade. - - Trade ID # noqa: E501 - - :param id: The id of this OptionsMyTrade. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this OptionsMyTrade. # noqa: E501 - - Trading time # noqa: E501 - - :return: The create_time of this OptionsMyTrade. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this OptionsMyTrade. - - Trading time # noqa: E501 - - :param create_time: The create_time of this OptionsMyTrade. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def contract(self): - """Gets the contract of this OptionsMyTrade. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The contract of this OptionsMyTrade. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this OptionsMyTrade. - - Options contract name # noqa: E501 - - :param contract: The contract of this OptionsMyTrade. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def order_id(self): - """Gets the order_id of this OptionsMyTrade. # noqa: E501 - - Order ID related # noqa: E501 - - :return: The order_id of this OptionsMyTrade. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this OptionsMyTrade. - - Order ID related # noqa: E501 - - :param order_id: The order_id of this OptionsMyTrade. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def size(self): - """Gets the size of this OptionsMyTrade. # noqa: E501 - - Trading size # noqa: E501 - - :return: The size of this OptionsMyTrade. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this OptionsMyTrade. - - Trading size # noqa: E501 - - :param size: The size of this OptionsMyTrade. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def price(self): - """Gets the price of this OptionsMyTrade. # noqa: E501 - - Trading price (quote currency) # noqa: E501 - - :return: The price of this OptionsMyTrade. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this OptionsMyTrade. - - Trading price (quote currency) # noqa: E501 - - :param price: The price of this OptionsMyTrade. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def underlying_price(self): - """Gets the underlying_price of this OptionsMyTrade. # noqa: E501 - - Underlying price (quote currency) # noqa: E501 - - :return: The underlying_price of this OptionsMyTrade. # noqa: E501 - :rtype: str - """ - return self._underlying_price - - @underlying_price.setter - def underlying_price(self, underlying_price): - """Sets the underlying_price of this OptionsMyTrade. - - Underlying price (quote currency) # noqa: E501 - - :param underlying_price: The underlying_price of this OptionsMyTrade. # noqa: E501 - :type: str - """ - - self._underlying_price = underlying_price - - @property - def role(self): - """Gets the role of this OptionsMyTrade. # noqa: E501 - - Trade role. Available values are `taker` and `maker` # noqa: E501 - - :return: The role of this OptionsMyTrade. # noqa: E501 - :rtype: str - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this OptionsMyTrade. - - Trade role. Available values are `taker` and `maker` # noqa: E501 - - :param role: The role of this OptionsMyTrade. # noqa: E501 - :type: str - """ - allowed_values = ["taker", "maker"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 - .format(role, allowed_values) - ) - - self._role = role - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsMyTrade): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsMyTrade): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py deleted file mode 100644 index d3306f3..0000000 --- a/gate_api/models/options_order.py +++ /dev/null @@ -1,815 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'user': 'int', - 'create_time': 'float', - 'finish_time': 'float', - 'finish_as': 'str', - 'status': 'str', - 'contract': 'str', - 'size': 'int', - 'iceberg': 'int', - 'price': 'str', - 'close': 'bool', - 'is_close': 'bool', - 'reduce_only': 'bool', - 'is_reduce_only': 'bool', - 'is_liq': 'bool', - 'mmp': 'bool', - 'is_mmp': 'bool', - 'tif': 'str', - 'left': 'int', - 'fill_price': 'str', - 'text': 'str', - 'tkfr': 'str', - 'mkfr': 'str', - 'refu': 'int', - 'refr': 'str' - } - - attribute_map = { - 'id': 'id', - 'user': 'user', - 'create_time': 'create_time', - 'finish_time': 'finish_time', - 'finish_as': 'finish_as', - 'status': 'status', - 'contract': 'contract', - 'size': 'size', - 'iceberg': 'iceberg', - 'price': 'price', - 'close': 'close', - 'is_close': 'is_close', - 'reduce_only': 'reduce_only', - 'is_reduce_only': 'is_reduce_only', - 'is_liq': 'is_liq', - 'mmp': 'mmp', - 'is_mmp': 'is_mmp', - 'tif': 'tif', - 'left': 'left', - 'fill_price': 'fill_price', - 'text': 'text', - 'tkfr': 'tkfr', - 'mkfr': 'mkfr', - 'refu': 'refu', - 'refr': 'refr' - } - - def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, mmp=False, is_mmp=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, refr=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, Configuration) -> None - """OptionsOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._user = None - self._create_time = None - self._finish_time = None - self._finish_as = None - self._status = None - self._contract = None - self._size = None - self._iceberg = None - self._price = None - self._close = None - self._is_close = None - self._reduce_only = None - self._is_reduce_only = None - self._is_liq = None - self._mmp = None - self._is_mmp = None - self._tif = None - self._left = None - self._fill_price = None - self._text = None - self._tkfr = None - self._mkfr = None - self._refu = None - self._refr = None - self.discriminator = None - - if id is not None: - self.id = id - if user is not None: - self.user = user - if create_time is not None: - self.create_time = create_time - if finish_time is not None: - self.finish_time = finish_time - if finish_as is not None: - self.finish_as = finish_as - if status is not None: - self.status = status - self.contract = contract - self.size = size - if iceberg is not None: - self.iceberg = iceberg - if price is not None: - self.price = price - if close is not None: - self.close = close - if is_close is not None: - self.is_close = is_close - if reduce_only is not None: - self.reduce_only = reduce_only - if is_reduce_only is not None: - self.is_reduce_only = is_reduce_only - if is_liq is not None: - self.is_liq = is_liq - if mmp is not None: - self.mmp = mmp - if is_mmp is not None: - self.is_mmp = is_mmp - if tif is not None: - self.tif = tif - if left is not None: - self.left = left - if fill_price is not None: - self.fill_price = fill_price - if text is not None: - self.text = text - if tkfr is not None: - self.tkfr = tkfr - if mkfr is not None: - self.mkfr = mkfr - if refu is not None: - self.refu = refu - if refr is not None: - self.refr = refr - - @property - def id(self): - """Gets the id of this OptionsOrder. # noqa: E501 - - Options order ID # noqa: E501 - - :return: The id of this OptionsOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OptionsOrder. - - Options order ID # noqa: E501 - - :param id: The id of this OptionsOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def user(self): - """Gets the user of this OptionsOrder. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this OptionsOrder. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this OptionsOrder. - - User ID # noqa: E501 - - :param user: The user of this OptionsOrder. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def create_time(self): - """Gets the create_time of this OptionsOrder. # noqa: E501 - - Creation time of order # noqa: E501 - - :return: The create_time of this OptionsOrder. # noqa: E501 - :rtype: float - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this OptionsOrder. - - Creation time of order # noqa: E501 - - :param create_time: The create_time of this OptionsOrder. # noqa: E501 - :type: float - """ - - self._create_time = create_time - - @property - def finish_time(self): - """Gets the finish_time of this OptionsOrder. # noqa: E501 - - Order finished time. Not returned if order is open # noqa: E501 - - :return: The finish_time of this OptionsOrder. # noqa: E501 - :rtype: float - """ - return self._finish_time - - @finish_time.setter - def finish_time(self, finish_time): - """Sets the finish_time of this OptionsOrder. - - Order finished time. Not returned if order is open # noqa: E501 - - :param finish_time: The finish_time of this OptionsOrder. # noqa: E501 - :type: float - """ - - self._finish_time = finish_time - - @property - def finish_as(self): - """Gets the finish_as of this OptionsOrder. # noqa: E501 - - Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 - - :return: The finish_as of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._finish_as - - @finish_as.setter - def finish_as(self, finish_as): - """Sets the finish_as of this OptionsOrder. - - Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 - - :param finish_as: The finish_as of this OptionsOrder. # noqa: E501 - :type: str - """ - allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "mmp_cancelled"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 - .format(finish_as, allowed_values) - ) - - self._finish_as = finish_as - - @property - def status(self): - """Gets the status of this OptionsOrder. # noqa: E501 - - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 - - :return: The status of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this OptionsOrder. - - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 - - :param status: The status of this OptionsOrder. # noqa: E501 - :type: str - """ - allowed_values = ["open", "finished"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def contract(self): - """Gets the contract of this OptionsOrder. # noqa: E501 - - Contract name # noqa: E501 - - :return: The contract of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this OptionsOrder. - - Contract name # noqa: E501 - - :param contract: The contract of this OptionsOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 - raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 - - self._contract = contract - - @property - def size(self): - """Gets the size of this OptionsOrder. # noqa: E501 - - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 - - :return: The size of this OptionsOrder. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this OptionsOrder. - - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 - - :param size: The size of this OptionsOrder. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - @property - def iceberg(self): - """Gets the iceberg of this OptionsOrder. # noqa: E501 - - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 - - :return: The iceberg of this OptionsOrder. # noqa: E501 - :rtype: int - """ - return self._iceberg - - @iceberg.setter - def iceberg(self, iceberg): - """Sets the iceberg of this OptionsOrder. - - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 - - :param iceberg: The iceberg of this OptionsOrder. # noqa: E501 - :type: int - """ - - self._iceberg = iceberg - - @property - def price(self): - """Gets the price of this OptionsOrder. # noqa: E501 - - Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501 - - :return: The price of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this OptionsOrder. - - Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501 - - :param price: The price of this OptionsOrder. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def close(self): - """Gets the close of this OptionsOrder. # noqa: E501 - - Set as `true` to close the position, with `size` set to 0 # noqa: E501 - - :return: The close of this OptionsOrder. # noqa: E501 - :rtype: bool - """ - return self._close - - @close.setter - def close(self, close): - """Sets the close of this OptionsOrder. - - Set as `true` to close the position, with `size` set to 0 # noqa: E501 - - :param close: The close of this OptionsOrder. # noqa: E501 - :type: bool - """ - - self._close = close - - @property - def is_close(self): - """Gets the is_close of this OptionsOrder. # noqa: E501 - - Is the order to close position # noqa: E501 - - :return: The is_close of this OptionsOrder. # noqa: E501 - :rtype: bool - """ - return self._is_close - - @is_close.setter - def is_close(self, is_close): - """Sets the is_close of this OptionsOrder. - - Is the order to close position # noqa: E501 - - :param is_close: The is_close of this OptionsOrder. # noqa: E501 - :type: bool - """ - - self._is_close = is_close - - @property - def reduce_only(self): - """Gets the reduce_only of this OptionsOrder. # noqa: E501 - - Set as `true` to be reduce-only order # noqa: E501 - - :return: The reduce_only of this OptionsOrder. # noqa: E501 - :rtype: bool - """ - return self._reduce_only - - @reduce_only.setter - def reduce_only(self, reduce_only): - """Sets the reduce_only of this OptionsOrder. - - Set as `true` to be reduce-only order # noqa: E501 - - :param reduce_only: The reduce_only of this OptionsOrder. # noqa: E501 - :type: bool - """ - - self._reduce_only = reduce_only - - @property - def is_reduce_only(self): - """Gets the is_reduce_only of this OptionsOrder. # noqa: E501 - - Is the order reduce-only # noqa: E501 - - :return: The is_reduce_only of this OptionsOrder. # noqa: E501 - :rtype: bool - """ - return self._is_reduce_only - - @is_reduce_only.setter - def is_reduce_only(self, is_reduce_only): - """Sets the is_reduce_only of this OptionsOrder. - - Is the order reduce-only # noqa: E501 - - :param is_reduce_only: The is_reduce_only of this OptionsOrder. # noqa: E501 - :type: bool - """ - - self._is_reduce_only = is_reduce_only - - @property - def is_liq(self): - """Gets the is_liq of this OptionsOrder. # noqa: E501 - - Is the order for liquidation # noqa: E501 - - :return: The is_liq of this OptionsOrder. # noqa: E501 - :rtype: bool - """ - return self._is_liq - - @is_liq.setter - def is_liq(self, is_liq): - """Sets the is_liq of this OptionsOrder. - - Is the order for liquidation # noqa: E501 - - :param is_liq: The is_liq of this OptionsOrder. # noqa: E501 - :type: bool - """ - - self._is_liq = is_liq - - @property - def mmp(self): - """Gets the mmp of this OptionsOrder. # noqa: E501 - - When set to true, delegate to MMP # noqa: E501 - - :return: The mmp of this OptionsOrder. # noqa: E501 - :rtype: bool - """ - return self._mmp - - @mmp.setter - def mmp(self, mmp): - """Sets the mmp of this OptionsOrder. - - When set to true, delegate to MMP # noqa: E501 - - :param mmp: The mmp of this OptionsOrder. # noqa: E501 - :type: bool - """ - - self._mmp = mmp - - @property - def is_mmp(self): - """Gets the is_mmp of this OptionsOrder. # noqa: E501 - - Whether it is MMP delegation. Corresponds to `mmp` in the request. # noqa: E501 - - :return: The is_mmp of this OptionsOrder. # noqa: E501 - :rtype: bool - """ - return self._is_mmp - - @is_mmp.setter - def is_mmp(self, is_mmp): - """Sets the is_mmp of this OptionsOrder. - - Whether it is MMP delegation. Corresponds to `mmp` in the request. # noqa: E501 - - :param is_mmp: The is_mmp of this OptionsOrder. # noqa: E501 - :type: bool - """ - - self._is_mmp = is_mmp - - @property - def tif(self): - """Gets the tif of this OptionsOrder. # noqa: E501 - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501 - - :return: The tif of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._tif - - @tif.setter - def tif(self, tif): - """Sets the tif of this OptionsOrder. - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501 - - :param tif: The tif of this OptionsOrder. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc", "poc"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 - .format(tif, allowed_values) - ) - - self._tif = tif - - @property - def left(self): - """Gets the left of this OptionsOrder. # noqa: E501 - - Size left to be traded # noqa: E501 - - :return: The left of this OptionsOrder. # noqa: E501 - :rtype: int - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this OptionsOrder. - - Size left to be traded # noqa: E501 - - :param left: The left of this OptionsOrder. # noqa: E501 - :type: int - """ - - self._left = left - - @property - def fill_price(self): - """Gets the fill_price of this OptionsOrder. # noqa: E501 - - Fill price of the order # noqa: E501 - - :return: The fill_price of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this OptionsOrder. - - Fill price of the order # noqa: E501 - - :param fill_price: The fill_price of this OptionsOrder. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def text(self): - """Gets the text of this OptionsOrder. # noqa: E501 - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 - - :return: The text of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this OptionsOrder. - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 - - :param text: The text of this OptionsOrder. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def tkfr(self): - """Gets the tkfr of this OptionsOrder. # noqa: E501 - - Taker fee # noqa: E501 - - :return: The tkfr of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._tkfr - - @tkfr.setter - def tkfr(self, tkfr): - """Sets the tkfr of this OptionsOrder. - - Taker fee # noqa: E501 - - :param tkfr: The tkfr of this OptionsOrder. # noqa: E501 - :type: str - """ - - self._tkfr = tkfr - - @property - def mkfr(self): - """Gets the mkfr of this OptionsOrder. # noqa: E501 - - Maker fee # noqa: E501 - - :return: The mkfr of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._mkfr - - @mkfr.setter - def mkfr(self, mkfr): - """Sets the mkfr of this OptionsOrder. - - Maker fee # noqa: E501 - - :param mkfr: The mkfr of this OptionsOrder. # noqa: E501 - :type: str - """ - - self._mkfr = mkfr - - @property - def refu(self): - """Gets the refu of this OptionsOrder. # noqa: E501 - - Reference user ID # noqa: E501 - - :return: The refu of this OptionsOrder. # noqa: E501 - :rtype: int - """ - return self._refu - - @refu.setter - def refu(self, refu): - """Sets the refu of this OptionsOrder. - - Reference user ID # noqa: E501 - - :param refu: The refu of this OptionsOrder. # noqa: E501 - :type: int - """ - - self._refu = refu - - @property - def refr(self): - """Gets the refr of this OptionsOrder. # noqa: E501 - - Referrer rebate # noqa: E501 - - :return: The refr of this OptionsOrder. # noqa: E501 - :rtype: str - """ - return self._refr - - @refr.setter - def refr(self, refr): - """Sets the refr of this OptionsOrder. - - Referrer rebate # noqa: E501 - - :param refr: The refr of this OptionsOrder. # noqa: E501 - :type: str - """ - - self._refr = refr - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py deleted file mode 100644 index b1465be..0000000 --- a/gate_api/models/options_position.py +++ /dev/null @@ -1,540 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsPosition(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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': 'int', - 'underlying': 'str', - 'underlying_price': 'str', - 'contract': 'str', - 'size': 'int', - 'entry_price': 'str', - 'mark_price': 'str', - 'mark_iv': 'str', - 'realised_pnl': 'str', - 'unrealised_pnl': 'str', - 'pending_orders': 'int', - 'close_order': 'OptionsPositionCloseOrder', - 'delta': 'str', - 'gamma': 'str', - 'vega': 'str', - 'theta': 'str' - } - - attribute_map = { - 'user': 'user', - 'underlying': 'underlying', - 'underlying_price': 'underlying_price', - 'contract': 'contract', - 'size': 'size', - 'entry_price': 'entry_price', - 'mark_price': 'mark_price', - 'mark_iv': 'mark_iv', - 'realised_pnl': 'realised_pnl', - 'unrealised_pnl': 'unrealised_pnl', - 'pending_orders': 'pending_orders', - 'close_order': 'close_order', - 'delta': 'delta', - 'gamma': 'gamma', - 'vega': 'vega', - 'theta': 'theta' - } - - def __init__(self, user=None, underlying=None, underlying_price=None, contract=None, size=None, entry_price=None, mark_price=None, mark_iv=None, realised_pnl=None, unrealised_pnl=None, pending_orders=None, close_order=None, delta=None, gamma=None, vega=None, theta=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, int, str, str, str, str, str, int, OptionsPositionCloseOrder, str, str, str, str, Configuration) -> None - """OptionsPosition - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user = None - self._underlying = None - self._underlying_price = None - self._contract = None - self._size = None - self._entry_price = None - self._mark_price = None - self._mark_iv = None - self._realised_pnl = None - self._unrealised_pnl = None - self._pending_orders = None - self._close_order = None - self._delta = None - self._gamma = None - self._vega = None - self._theta = None - self.discriminator = None - - if user is not None: - self.user = user - if underlying is not None: - self.underlying = underlying - if underlying_price is not None: - self.underlying_price = underlying_price - if contract is not None: - self.contract = contract - if size is not None: - self.size = size - if entry_price is not None: - self.entry_price = entry_price - if mark_price is not None: - self.mark_price = mark_price - if mark_iv is not None: - self.mark_iv = mark_iv - if realised_pnl is not None: - self.realised_pnl = realised_pnl - if unrealised_pnl is not None: - self.unrealised_pnl = unrealised_pnl - if pending_orders is not None: - self.pending_orders = pending_orders - self.close_order = close_order - if delta is not None: - self.delta = delta - if gamma is not None: - self.gamma = gamma - if vega is not None: - self.vega = vega - if theta is not None: - self.theta = theta - - @property - def user(self): - """Gets the user of this OptionsPosition. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this OptionsPosition. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this OptionsPosition. - - User ID # noqa: E501 - - :param user: The user of this OptionsPosition. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def underlying(self): - """Gets the underlying of this OptionsPosition. # noqa: E501 - - Underlying # noqa: E501 - - :return: The underlying of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._underlying - - @underlying.setter - def underlying(self, underlying): - """Sets the underlying of this OptionsPosition. - - Underlying # noqa: E501 - - :param underlying: The underlying of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._underlying = underlying - - @property - def underlying_price(self): - """Gets the underlying_price of this OptionsPosition. # noqa: E501 - - Underlying price (quote currency) # noqa: E501 - - :return: The underlying_price of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._underlying_price - - @underlying_price.setter - def underlying_price(self, underlying_price): - """Sets the underlying_price of this OptionsPosition. - - Underlying price (quote currency) # noqa: E501 - - :param underlying_price: The underlying_price of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._underlying_price = underlying_price - - @property - def contract(self): - """Gets the contract of this OptionsPosition. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The contract of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this OptionsPosition. - - Options contract name # noqa: E501 - - :param contract: The contract of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def size(self): - """Gets the size of this OptionsPosition. # noqa: E501 - - Position size (contract size) # noqa: E501 - - :return: The size of this OptionsPosition. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this OptionsPosition. - - Position size (contract size) # noqa: E501 - - :param size: The size of this OptionsPosition. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def entry_price(self): - """Gets the entry_price of this OptionsPosition. # noqa: E501 - - Entry size (quote currency) # noqa: E501 - - :return: The entry_price of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._entry_price - - @entry_price.setter - def entry_price(self, entry_price): - """Sets the entry_price of this OptionsPosition. - - Entry size (quote currency) # noqa: E501 - - :param entry_price: The entry_price of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._entry_price = entry_price - - @property - def mark_price(self): - """Gets the mark_price of this OptionsPosition. # noqa: E501 - - Current mark price (quote currency) # noqa: E501 - - :return: The mark_price of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this OptionsPosition. - - Current mark price (quote currency) # noqa: E501 - - :param mark_price: The mark_price of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def mark_iv(self): - """Gets the mark_iv of this OptionsPosition. # noqa: E501 - - Implied volatility # noqa: E501 - - :return: The mark_iv of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._mark_iv - - @mark_iv.setter - def mark_iv(self, mark_iv): - """Sets the mark_iv of this OptionsPosition. - - Implied volatility # noqa: E501 - - :param mark_iv: The mark_iv of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._mark_iv = mark_iv - - @property - def realised_pnl(self): - """Gets the realised_pnl of this OptionsPosition. # noqa: E501 - - Realized PNL # noqa: E501 - - :return: The realised_pnl of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._realised_pnl - - @realised_pnl.setter - def realised_pnl(self, realised_pnl): - """Sets the realised_pnl of this OptionsPosition. - - Realized PNL # noqa: E501 - - :param realised_pnl: The realised_pnl of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._realised_pnl = realised_pnl - - @property - def unrealised_pnl(self): - """Gets the unrealised_pnl of this OptionsPosition. # noqa: E501 - - Unrealized PNL # noqa: E501 - - :return: The unrealised_pnl of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._unrealised_pnl - - @unrealised_pnl.setter - def unrealised_pnl(self, unrealised_pnl): - """Sets the unrealised_pnl of this OptionsPosition. - - Unrealized PNL # noqa: E501 - - :param unrealised_pnl: The unrealised_pnl of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._unrealised_pnl = unrealised_pnl - - @property - def pending_orders(self): - """Gets the pending_orders of this OptionsPosition. # noqa: E501 - - Current open orders # noqa: E501 - - :return: The pending_orders of this OptionsPosition. # noqa: E501 - :rtype: int - """ - return self._pending_orders - - @pending_orders.setter - def pending_orders(self, pending_orders): - """Sets the pending_orders of this OptionsPosition. - - Current open orders # noqa: E501 - - :param pending_orders: The pending_orders of this OptionsPosition. # noqa: E501 - :type: int - """ - - self._pending_orders = pending_orders - - @property - def close_order(self): - """Gets the close_order of this OptionsPosition. # noqa: E501 - - - :return: The close_order of this OptionsPosition. # noqa: E501 - :rtype: OptionsPositionCloseOrder - """ - return self._close_order - - @close_order.setter - def close_order(self, close_order): - """Sets the close_order of this OptionsPosition. - - - :param close_order: The close_order of this OptionsPosition. # noqa: E501 - :type: OptionsPositionCloseOrder - """ - - self._close_order = close_order - - @property - def delta(self): - """Gets the delta of this OptionsPosition. # noqa: E501 - - Delta # noqa: E501 - - :return: The delta of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._delta - - @delta.setter - def delta(self, delta): - """Sets the delta of this OptionsPosition. - - Delta # noqa: E501 - - :param delta: The delta of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._delta = delta - - @property - def gamma(self): - """Gets the gamma of this OptionsPosition. # noqa: E501 - - Gamma # noqa: E501 - - :return: The gamma of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._gamma - - @gamma.setter - def gamma(self, gamma): - """Sets the gamma of this OptionsPosition. - - Gamma # noqa: E501 - - :param gamma: The gamma of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._gamma = gamma - - @property - def vega(self): - """Gets the vega of this OptionsPosition. # noqa: E501 - - Vega # noqa: E501 - - :return: The vega of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._vega - - @vega.setter - def vega(self, vega): - """Sets the vega of this OptionsPosition. - - Vega # noqa: E501 - - :param vega: The vega of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._vega = vega - - @property - def theta(self): - """Gets the theta of this OptionsPosition. # noqa: E501 - - Theta # noqa: E501 - - :return: The theta of this OptionsPosition. # noqa: E501 - :rtype: str - """ - return self._theta - - @theta.setter - def theta(self, theta): - """Sets the theta of this OptionsPosition. - - Theta # noqa: E501 - - :param theta: The theta of this OptionsPosition. # noqa: E501 - :type: str - """ - - self._theta = theta - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsPosition): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsPosition): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py deleted file mode 100644 index be9d2eb..0000000 --- a/gate_api/models/options_position_close.py +++ /dev/null @@ -1,269 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsPositionClose(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'float', - 'contract': 'str', - 'side': 'str', - 'pnl': 'str', - 'text': 'str', - 'settle_size': 'str' - } - - attribute_map = { - 'time': 'time', - 'contract': 'contract', - 'side': 'side', - 'pnl': 'pnl', - 'text': 'text', - 'settle_size': 'settle_size' - } - - def __init__(self, time=None, contract=None, side=None, pnl=None, text=None, settle_size=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, str, str, str, str, Configuration) -> None - """OptionsPositionClose - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._contract = None - self._side = None - self._pnl = None - self._text = None - self._settle_size = None - self.discriminator = None - - if time is not None: - self.time = time - if contract is not None: - self.contract = contract - if side is not None: - self.side = side - if pnl is not None: - self.pnl = pnl - if text is not None: - self.text = text - if settle_size is not None: - self.settle_size = settle_size - - @property - def time(self): - """Gets the time of this OptionsPositionClose. # noqa: E501 - - Position close time # noqa: E501 - - :return: The time of this OptionsPositionClose. # noqa: E501 - :rtype: float - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this OptionsPositionClose. - - Position close time # noqa: E501 - - :param time: The time of this OptionsPositionClose. # noqa: E501 - :type: float - """ - - self._time = time - - @property - def contract(self): - """Gets the contract of this OptionsPositionClose. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The contract of this OptionsPositionClose. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this OptionsPositionClose. - - Options contract name # noqa: E501 - - :param contract: The contract of this OptionsPositionClose. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def side(self): - """Gets the side of this OptionsPositionClose. # noqa: E501 - - Position side, long or short # noqa: E501 - - :return: The side of this OptionsPositionClose. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this OptionsPositionClose. - - Position side, long or short # noqa: E501 - - :param side: The side of this OptionsPositionClose. # noqa: E501 - :type: str - """ - allowed_values = ["long", "short"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501 - .format(side, allowed_values) - ) - - self._side = side - - @property - def pnl(self): - """Gets the pnl of this OptionsPositionClose. # noqa: E501 - - PNL # noqa: E501 - - :return: The pnl of this OptionsPositionClose. # noqa: E501 - :rtype: str - """ - return self._pnl - - @pnl.setter - def pnl(self, pnl): - """Sets the pnl of this OptionsPositionClose. - - PNL # noqa: E501 - - :param pnl: The pnl of this OptionsPositionClose. # noqa: E501 - :type: str - """ - - self._pnl = pnl - - @property - def text(self): - """Gets the text of this OptionsPositionClose. # noqa: E501 - - Text of close order # noqa: E501 - - :return: The text of this OptionsPositionClose. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this OptionsPositionClose. - - Text of close order # noqa: E501 - - :param text: The text of this OptionsPositionClose. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def settle_size(self): - """Gets the settle_size of this OptionsPositionClose. # noqa: E501 - - settlement size # noqa: E501 - - :return: The settle_size of this OptionsPositionClose. # noqa: E501 - :rtype: str - """ - return self._settle_size - - @settle_size.setter - def settle_size(self, settle_size): - """Sets the settle_size of this OptionsPositionClose. - - settlement size # noqa: E501 - - :param settle_size: The settle_size of this OptionsPositionClose. # noqa: E501 - :type: str - """ - - self._settle_size = settle_size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsPositionClose): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsPositionClose): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py deleted file mode 100644 index 01f5dc7..0000000 --- a/gate_api/models/options_position_close_order.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsPositionCloseOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'price': 'str', - 'is_liq': 'bool' - } - - attribute_map = { - 'id': 'id', - 'price': 'price', - 'is_liq': 'is_liq' - } - - def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, bool, Configuration) -> None - """OptionsPositionCloseOrder - a 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._price = None - self._is_liq = None - self.discriminator = None - - if id is not None: - self.id = id - if price is not None: - self.price = price - if is_liq is not None: - self.is_liq = is_liq - - @property - def id(self): - """Gets the id of this OptionsPositionCloseOrder. # noqa: E501 - - Close order ID # noqa: E501 - - :return: The id of this OptionsPositionCloseOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OptionsPositionCloseOrder. - - Close order ID # noqa: E501 - - :param id: The id of this OptionsPositionCloseOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def price(self): - """Gets the price of this OptionsPositionCloseOrder. # noqa: E501 - - Close order price (quote currency) # noqa: E501 - - :return: The price of this OptionsPositionCloseOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this OptionsPositionCloseOrder. - - Close order price (quote currency) # noqa: E501 - - :param price: The price of this OptionsPositionCloseOrder. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def is_liq(self): - """Gets the is_liq of this OptionsPositionCloseOrder. # noqa: E501 - - Is the close order from liquidation # noqa: E501 - - :return: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 - :rtype: bool - """ - return self._is_liq - - @is_liq.setter - def is_liq(self, is_liq): - """Sets the is_liq of this OptionsPositionCloseOrder. - - Is the close order from liquidation # noqa: E501 - - :param is_liq: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 - :type: bool - """ - - self._is_liq = is_liq - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsPositionCloseOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsPositionCloseOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py deleted file mode 100644 index c82e5d6..0000000 --- a/gate_api/models/options_settlement.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsSettlement(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'float', - 'contract': 'str', - 'profit': 'str', - 'fee': 'str', - 'strike_price': 'str', - 'settle_price': 'str' - } - - attribute_map = { - 'time': 'time', - 'contract': 'contract', - 'profit': 'profit', - 'fee': 'fee', - 'strike_price': 'strike_price', - 'settle_price': 'settle_price' - } - - def __init__(self, time=None, contract=None, profit=None, fee=None, strike_price=None, settle_price=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, str, str, str, str, Configuration) -> None - """OptionsSettlement - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._contract = None - self._profit = None - self._fee = None - self._strike_price = None - self._settle_price = None - self.discriminator = None - - if time is not None: - self.time = time - if contract is not None: - self.contract = contract - if profit is not None: - self.profit = profit - if fee is not None: - self.fee = fee - if strike_price is not None: - self.strike_price = strike_price - if settle_price is not None: - self.settle_price = settle_price - - @property - def time(self): - """Gets the time of this OptionsSettlement. # noqa: E501 - - Last changed time of configuration # noqa: E501 - - :return: The time of this OptionsSettlement. # noqa: E501 - :rtype: float - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this OptionsSettlement. - - Last changed time of configuration # noqa: E501 - - :param time: The time of this OptionsSettlement. # noqa: E501 - :type: float - """ - - self._time = time - - @property - def contract(self): - """Gets the contract of this OptionsSettlement. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The contract of this OptionsSettlement. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this OptionsSettlement. - - Options contract name # noqa: E501 - - :param contract: The contract of this OptionsSettlement. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def profit(self): - """Gets the profit of this OptionsSettlement. # noqa: E501 - - Settlement profit per size (quote currency) # noqa: E501 - - :return: The profit of this OptionsSettlement. # noqa: E501 - :rtype: str - """ - return self._profit - - @profit.setter - def profit(self, profit): - """Sets the profit of this OptionsSettlement. - - Settlement profit per size (quote currency) # noqa: E501 - - :param profit: The profit of this OptionsSettlement. # noqa: E501 - :type: str - """ - - self._profit = profit - - @property - def fee(self): - """Gets the fee of this OptionsSettlement. # noqa: E501 - - Settlement fee per size (quote currency) # noqa: E501 - - :return: The fee of this OptionsSettlement. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this OptionsSettlement. - - Settlement fee per size (quote currency) # noqa: E501 - - :param fee: The fee of this OptionsSettlement. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def strike_price(self): - """Gets the strike_price of this OptionsSettlement. # noqa: E501 - - Strike price (quote currency) # noqa: E501 - - :return: The strike_price of this OptionsSettlement. # noqa: E501 - :rtype: str - """ - return self._strike_price - - @strike_price.setter - def strike_price(self, strike_price): - """Sets the strike_price of this OptionsSettlement. - - Strike price (quote currency) # noqa: E501 - - :param strike_price: The strike_price of this OptionsSettlement. # noqa: E501 - :type: str - """ - - self._strike_price = strike_price - - @property - def settle_price(self): - """Gets the settle_price of this OptionsSettlement. # noqa: E501 - - Settlement price (quote currency) # noqa: E501 - - :return: The settle_price of this OptionsSettlement. # noqa: E501 - :rtype: str - """ - return self._settle_price - - @settle_price.setter - def settle_price(self, settle_price): - """Sets the settle_price of this OptionsSettlement. - - Settlement price (quote currency) # noqa: E501 - - :param settle_price: The settle_price of this OptionsSettlement. # noqa: E501 - :type: str - """ - - self._settle_price = settle_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, OptionsSettlement): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsSettlement): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py deleted file mode 100644 index 2369175..0000000 --- a/gate_api/models/options_ticker.py +++ /dev/null @@ -1,599 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsTicker(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'last_price': 'str', - 'mark_price': 'str', - 'index_price': 'str', - 'ask1_size': 'int', - 'ask1_price': 'str', - 'bid1_size': 'int', - 'bid1_price': 'str', - 'position_size': 'int', - 'mark_iv': 'str', - 'bid_iv': 'str', - 'ask_iv': 'str', - 'leverage': 'str', - 'delta': 'str', - 'gamma': 'str', - 'vega': 'str', - 'theta': 'str', - 'rho': 'str' - } - - attribute_map = { - 'name': 'name', - 'last_price': 'last_price', - 'mark_price': 'mark_price', - 'index_price': 'index_price', - 'ask1_size': 'ask1_size', - 'ask1_price': 'ask1_price', - 'bid1_size': 'bid1_size', - 'bid1_price': 'bid1_price', - 'position_size': 'position_size', - 'mark_iv': 'mark_iv', - 'bid_iv': 'bid_iv', - 'ask_iv': 'ask_iv', - 'leverage': 'leverage', - 'delta': 'delta', - 'gamma': 'gamma', - 'vega': 'vega', - 'theta': 'theta', - 'rho': 'rho' - } - - def __init__(self, name=None, last_price=None, mark_price=None, index_price=None, ask1_size=None, ask1_price=None, bid1_size=None, bid1_price=None, position_size=None, mark_iv=None, bid_iv=None, ask_iv=None, leverage=None, delta=None, gamma=None, vega=None, theta=None, rho=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, str, int, str, int, str, str, str, str, str, str, str, str, str, Configuration) -> None - """OptionsTicker - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._last_price = None - self._mark_price = None - self._index_price = None - self._ask1_size = None - self._ask1_price = None - self._bid1_size = None - self._bid1_price = None - self._position_size = None - self._mark_iv = None - self._bid_iv = None - self._ask_iv = None - self._leverage = None - self._delta = None - self._gamma = None - self._vega = None - self._theta = None - self._rho = None - self.discriminator = None - - if name is not None: - self.name = name - if last_price is not None: - self.last_price = last_price - if mark_price is not None: - self.mark_price = mark_price - if index_price is not None: - self.index_price = index_price - if ask1_size is not None: - self.ask1_size = ask1_size - if ask1_price is not None: - self.ask1_price = ask1_price - if bid1_size is not None: - self.bid1_size = bid1_size - if bid1_price is not None: - self.bid1_price = bid1_price - if position_size is not None: - self.position_size = position_size - if mark_iv is not None: - self.mark_iv = mark_iv - if bid_iv is not None: - self.bid_iv = bid_iv - if ask_iv is not None: - self.ask_iv = ask_iv - if leverage is not None: - self.leverage = leverage - if delta is not None: - self.delta = delta - if gamma is not None: - self.gamma = gamma - if vega is not None: - self.vega = vega - if theta is not None: - self.theta = theta - if rho is not None: - self.rho = rho - - @property - def name(self): - """Gets the name of this OptionsTicker. # noqa: E501 - - Options contract name # noqa: E501 - - :return: The name of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this OptionsTicker. - - Options contract name # noqa: E501 - - :param name: The name of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def last_price(self): - """Gets the last_price of this OptionsTicker. # noqa: E501 - - Last trading price (quote currency) # noqa: E501 - - :return: The last_price of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._last_price - - @last_price.setter - def last_price(self, last_price): - """Sets the last_price of this OptionsTicker. - - Last trading price (quote currency) # noqa: E501 - - :param last_price: The last_price of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._last_price = last_price - - @property - def mark_price(self): - """Gets the mark_price of this OptionsTicker. # noqa: E501 - - Current mark price (quote currency) # noqa: E501 - - :return: The mark_price of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this OptionsTicker. - - Current mark price (quote currency) # noqa: E501 - - :param mark_price: The mark_price of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def index_price(self): - """Gets the index_price of this OptionsTicker. # noqa: E501 - - Current index price (quote currency) # noqa: E501 - - :return: The index_price of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this OptionsTicker. - - Current index price (quote currency) # noqa: E501 - - :param index_price: The index_price of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def ask1_size(self): - """Gets the ask1_size of this OptionsTicker. # noqa: E501 - - Best ask size # noqa: E501 - - :return: The ask1_size of this OptionsTicker. # noqa: E501 - :rtype: int - """ - return self._ask1_size - - @ask1_size.setter - def ask1_size(self, ask1_size): - """Sets the ask1_size of this OptionsTicker. - - Best ask size # noqa: E501 - - :param ask1_size: The ask1_size of this OptionsTicker. # noqa: E501 - :type: int - """ - - self._ask1_size = ask1_size - - @property - def ask1_price(self): - """Gets the ask1_price of this OptionsTicker. # noqa: E501 - - Best ask price # noqa: E501 - - :return: The ask1_price of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._ask1_price - - @ask1_price.setter - def ask1_price(self, ask1_price): - """Sets the ask1_price of this OptionsTicker. - - Best ask price # noqa: E501 - - :param ask1_price: The ask1_price of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._ask1_price = ask1_price - - @property - def bid1_size(self): - """Gets the bid1_size of this OptionsTicker. # noqa: E501 - - Best bid size # noqa: E501 - - :return: The bid1_size of this OptionsTicker. # noqa: E501 - :rtype: int - """ - return self._bid1_size - - @bid1_size.setter - def bid1_size(self, bid1_size): - """Sets the bid1_size of this OptionsTicker. - - Best bid size # noqa: E501 - - :param bid1_size: The bid1_size of this OptionsTicker. # noqa: E501 - :type: int - """ - - self._bid1_size = bid1_size - - @property - def bid1_price(self): - """Gets the bid1_price of this OptionsTicker. # noqa: E501 - - Best bid price # noqa: E501 - - :return: The bid1_price of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._bid1_price - - @bid1_price.setter - def bid1_price(self, bid1_price): - """Sets the bid1_price of this OptionsTicker. - - Best bid price # noqa: E501 - - :param bid1_price: The bid1_price of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._bid1_price = bid1_price - - @property - def position_size(self): - """Gets the position_size of this OptionsTicker. # noqa: E501 - - Current total long position size # noqa: E501 - - :return: The position_size of this OptionsTicker. # noqa: E501 - :rtype: int - """ - return self._position_size - - @position_size.setter - def position_size(self, position_size): - """Sets the position_size of this OptionsTicker. - - Current total long position size # noqa: E501 - - :param position_size: The position_size of this OptionsTicker. # noqa: E501 - :type: int - """ - - self._position_size = position_size - - @property - def mark_iv(self): - """Gets the mark_iv of this OptionsTicker. # noqa: E501 - - Implied volatility # noqa: E501 - - :return: The mark_iv of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._mark_iv - - @mark_iv.setter - def mark_iv(self, mark_iv): - """Sets the mark_iv of this OptionsTicker. - - Implied volatility # noqa: E501 - - :param mark_iv: The mark_iv of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._mark_iv = mark_iv - - @property - def bid_iv(self): - """Gets the bid_iv of this OptionsTicker. # noqa: E501 - - Bid side implied volatility # noqa: E501 - - :return: The bid_iv of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._bid_iv - - @bid_iv.setter - def bid_iv(self, bid_iv): - """Sets the bid_iv of this OptionsTicker. - - Bid side implied volatility # noqa: E501 - - :param bid_iv: The bid_iv of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._bid_iv = bid_iv - - @property - def ask_iv(self): - """Gets the ask_iv of this OptionsTicker. # noqa: E501 - - Ask side implied volatility # noqa: E501 - - :return: The ask_iv of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._ask_iv - - @ask_iv.setter - def ask_iv(self, ask_iv): - """Sets the ask_iv of this OptionsTicker. - - Ask side implied volatility # noqa: E501 - - :param ask_iv: The ask_iv of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._ask_iv = ask_iv - - @property - def leverage(self): - """Gets the leverage of this OptionsTicker. # noqa: E501 - - Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 - - :return: The leverage of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this OptionsTicker. - - Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 - - :param leverage: The leverage of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def delta(self): - """Gets the delta of this OptionsTicker. # noqa: E501 - - Delta # noqa: E501 - - :return: The delta of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._delta - - @delta.setter - def delta(self, delta): - """Sets the delta of this OptionsTicker. - - Delta # noqa: E501 - - :param delta: The delta of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._delta = delta - - @property - def gamma(self): - """Gets the gamma of this OptionsTicker. # noqa: E501 - - Gamma # noqa: E501 - - :return: The gamma of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._gamma - - @gamma.setter - def gamma(self, gamma): - """Sets the gamma of this OptionsTicker. - - Gamma # noqa: E501 - - :param gamma: The gamma of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._gamma = gamma - - @property - def vega(self): - """Gets the vega of this OptionsTicker. # noqa: E501 - - Vega # noqa: E501 - - :return: The vega of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._vega - - @vega.setter - def vega(self, vega): - """Sets the vega of this OptionsTicker. - - Vega # noqa: E501 - - :param vega: The vega of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._vega = vega - - @property - def theta(self): - """Gets the theta of this OptionsTicker. # noqa: E501 - - Theta # noqa: E501 - - :return: The theta of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._theta - - @theta.setter - def theta(self, theta): - """Sets the theta of this OptionsTicker. - - Theta # noqa: E501 - - :param theta: The theta of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._theta = theta - - @property - def rho(self): - """Gets the rho of this OptionsTicker. # noqa: E501 - - Rho # noqa: E501 - - :return: The rho of this OptionsTicker. # noqa: E501 - :rtype: str - """ - return self._rho - - @rho.setter - def rho(self, rho): - """Sets the rho of this OptionsTicker. - - Rho # noqa: E501 - - :param rho: The rho of this OptionsTicker. # noqa: E501 - :type: str - """ - - self._rho = rho - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OptionsTicker): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsTicker): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py deleted file mode 100644 index f150247..0000000 --- a/gate_api/models/options_underlying.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsUnderlying(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'index_price': 'str' - } - - attribute_map = { - 'name': 'name', - 'index_price': 'index_price' - } - - def __init__(self, name=None, index_price=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """OptionsUnderlying - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._index_price = None - self.discriminator = None - - if name is not None: - self.name = name - if index_price is not None: - self.index_price = index_price - - @property - def name(self): - """Gets the name of this OptionsUnderlying. # noqa: E501 - - Underlying name # noqa: E501 - - :return: The name of this OptionsUnderlying. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this OptionsUnderlying. - - Underlying name # noqa: E501 - - :param name: The name of this OptionsUnderlying. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def index_price(self): - """Gets the index_price of this OptionsUnderlying. # noqa: E501 - - Spot index price (quote currency) # noqa: E501 - - :return: The index_price of this OptionsUnderlying. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this OptionsUnderlying. - - Spot index price (quote currency) # noqa: E501 - - :param index_price: The index_price of this OptionsUnderlying. # noqa: E501 - :type: str - """ - - self._index_price = index_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, OptionsUnderlying): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsUnderlying): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py deleted file mode 100644 index df43bcb..0000000 --- a/gate_api/models/options_underlying_ticker.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OptionsUnderlyingTicker(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'trade_put': 'int', - 'trade_call': 'int', - 'index_price': 'str' - } - - attribute_map = { - 'trade_put': 'trade_put', - 'trade_call': 'trade_call', - 'index_price': 'index_price' - } - - def __init__(self, trade_put=None, trade_call=None, index_price=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, Configuration) -> None - """OptionsUnderlyingTicker - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._trade_put = None - self._trade_call = None - self._index_price = None - self.discriminator = None - - if trade_put is not None: - self.trade_put = trade_put - if trade_call is not None: - self.trade_call = trade_call - if index_price is not None: - self.index_price = index_price - - @property - def trade_put(self): - """Gets the trade_put of this OptionsUnderlyingTicker. # noqa: E501 - - Total put options trades amount in last 24h # noqa: E501 - - :return: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 - :rtype: int - """ - return self._trade_put - - @trade_put.setter - def trade_put(self, trade_put): - """Sets the trade_put of this OptionsUnderlyingTicker. - - Total put options trades amount in last 24h # noqa: E501 - - :param trade_put: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 - :type: int - """ - - self._trade_put = trade_put - - @property - def trade_call(self): - """Gets the trade_call of this OptionsUnderlyingTicker. # noqa: E501 - - Total call options trades amount in last 24h # noqa: E501 - - :return: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 - :rtype: int - """ - return self._trade_call - - @trade_call.setter - def trade_call(self, trade_call): - """Sets the trade_call of this OptionsUnderlyingTicker. - - Total call options trades amount in last 24h # noqa: E501 - - :param trade_call: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 - :type: int - """ - - self._trade_call = trade_call - - @property - def index_price(self): - """Gets the index_price of this OptionsUnderlyingTicker. # noqa: E501 - - Index price (quote currency) # noqa: E501 - - :return: The index_price of this OptionsUnderlyingTicker. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this OptionsUnderlyingTicker. - - Index price (quote currency) # noqa: E501 - - :param index_price: The index_price of this OptionsUnderlyingTicker. # noqa: E501 - :type: str - """ - - self._index_price = index_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, OptionsUnderlyingTicker): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OptionsUnderlyingTicker): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order.py b/gate_api/models/order.py deleted file mode 100644 index 0f7bfd8..0000000 --- a/gate_api/models/order.py +++ /dev/null @@ -1,1142 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Order(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'amend_text': 'str', - 'create_time': 'str', - 'update_time': 'str', - 'create_time_ms': 'int', - 'update_time_ms': 'int', - 'status': 'str', - 'currency_pair': 'str', - 'type': 'str', - 'account': 'str', - 'side': 'str', - 'amount': 'str', - 'price': 'str', - 'time_in_force': 'str', - 'iceberg': 'str', - 'auto_borrow': 'bool', - 'auto_repay': 'bool', - 'left': 'str', - 'filled_amount': 'str', - 'fill_price': 'str', - 'filled_total': 'str', - 'avg_deal_price': 'str', - 'fee': 'str', - 'fee_currency': 'str', - 'point_fee': 'str', - 'gt_fee': 'str', - 'gt_maker_fee': 'str', - 'gt_taker_fee': 'str', - 'gt_discount': 'bool', - 'rebated_fee': 'str', - 'rebated_fee_currency': 'str', - 'stp_id': 'int', - 'stp_act': 'str', - 'finish_as': 'str', - 'action_mode': 'str' - } - - attribute_map = { - 'id': 'id', - 'text': 'text', - 'amend_text': 'amend_text', - 'create_time': 'create_time', - 'update_time': 'update_time', - 'create_time_ms': 'create_time_ms', - 'update_time_ms': 'update_time_ms', - 'status': 'status', - 'currency_pair': 'currency_pair', - 'type': 'type', - 'account': 'account', - 'side': 'side', - 'amount': 'amount', - 'price': 'price', - 'time_in_force': 'time_in_force', - 'iceberg': 'iceberg', - 'auto_borrow': 'auto_borrow', - 'auto_repay': 'auto_repay', - 'left': 'left', - 'filled_amount': 'filled_amount', - 'fill_price': 'fill_price', - 'filled_total': 'filled_total', - 'avg_deal_price': 'avg_deal_price', - 'fee': 'fee', - 'fee_currency': 'fee_currency', - 'point_fee': 'point_fee', - 'gt_fee': 'gt_fee', - 'gt_maker_fee': 'gt_maker_fee', - 'gt_taker_fee': 'gt_taker_fee', - 'gt_discount': 'gt_discount', - 'rebated_fee': 'rebated_fee', - 'rebated_fee_currency': 'rebated_fee_currency', - 'stp_id': 'stp_id', - 'stp_act': 'stp_act', - 'finish_as': 'finish_as', - 'action_mode': 'action_mode' - } - - def __init__(self, id=None, text=None, amend_text=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_maker_fee=None, gt_taker_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, action_mode=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, str, Configuration) -> None - """Order - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._text = None - self._amend_text = None - self._create_time = None - self._update_time = None - self._create_time_ms = None - self._update_time_ms = None - self._status = None - self._currency_pair = None - self._type = None - self._account = None - self._side = None - self._amount = None - self._price = None - self._time_in_force = None - self._iceberg = None - self._auto_borrow = None - self._auto_repay = None - self._left = None - self._filled_amount = None - self._fill_price = None - self._filled_total = None - self._avg_deal_price = None - self._fee = None - self._fee_currency = None - self._point_fee = None - self._gt_fee = None - self._gt_maker_fee = None - self._gt_taker_fee = None - self._gt_discount = None - self._rebated_fee = None - self._rebated_fee_currency = None - self._stp_id = None - self._stp_act = None - self._finish_as = None - self._action_mode = None - self.discriminator = None - - if id is not None: - self.id = id - if text is not None: - self.text = text - if amend_text is not None: - self.amend_text = amend_text - if create_time is not None: - self.create_time = create_time - if update_time is not None: - self.update_time = update_time - if create_time_ms is not None: - self.create_time_ms = create_time_ms - if update_time_ms is not None: - self.update_time_ms = update_time_ms - if status is not None: - self.status = status - self.currency_pair = currency_pair - if type is not None: - self.type = type - if account is not None: - self.account = account - self.side = side - self.amount = amount - if price is not None: - self.price = price - if time_in_force is not None: - self.time_in_force = time_in_force - if iceberg is not None: - self.iceberg = iceberg - if auto_borrow is not None: - self.auto_borrow = auto_borrow - if auto_repay is not None: - self.auto_repay = auto_repay - if left is not None: - self.left = left - if filled_amount is not None: - self.filled_amount = filled_amount - if fill_price is not None: - self.fill_price = fill_price - if filled_total is not None: - self.filled_total = filled_total - if avg_deal_price is not None: - self.avg_deal_price = avg_deal_price - if fee is not None: - self.fee = fee - if fee_currency is not None: - self.fee_currency = fee_currency - if point_fee is not None: - self.point_fee = point_fee - if gt_fee is not None: - self.gt_fee = gt_fee - if gt_maker_fee is not None: - self.gt_maker_fee = gt_maker_fee - if gt_taker_fee is not None: - self.gt_taker_fee = gt_taker_fee - if gt_discount is not None: - self.gt_discount = gt_discount - if rebated_fee is not None: - self.rebated_fee = rebated_fee - if rebated_fee_currency is not None: - self.rebated_fee_currency = rebated_fee_currency - if stp_id is not None: - self.stp_id = stp_id - if stp_act is not None: - self.stp_act = stp_act - if finish_as is not None: - self.finish_as = finish_as - if action_mode is not None: - self.action_mode = action_mode - - @property - def id(self): - """Gets the id of this Order. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this Order. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Order. - - Order ID # noqa: E501 - - :param id: The id of this Order. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def text(self): - """Gets the text of this Order. # noqa: E501 - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 - - :return: The text of this Order. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this Order. - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 - - :param text: The text of this Order. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def amend_text(self): - """Gets the amend_text of this Order. # noqa: E501 - - The custom data that the user remarked when amending the order # noqa: E501 - - :return: The amend_text of this Order. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this Order. - - The custom data that the user remarked when amending the order # noqa: E501 - - :param amend_text: The amend_text of this Order. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - @property - def create_time(self): - """Gets the create_time of this Order. # noqa: E501 - - Creation time of order # noqa: E501 - - :return: The create_time of this Order. # noqa: E501 - :rtype: str - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this Order. - - Creation time of order # noqa: E501 - - :param create_time: The create_time of this Order. # noqa: E501 - :type: str - """ - - self._create_time = create_time - - @property - def update_time(self): - """Gets the update_time of this Order. # noqa: E501 - - Last modification time of order # noqa: E501 - - :return: The update_time of this Order. # noqa: E501 - :rtype: str - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this Order. - - Last modification time of order # noqa: E501 - - :param update_time: The update_time of this Order. # noqa: E501 - :type: str - """ - - self._update_time = update_time - - @property - def create_time_ms(self): - """Gets the create_time_ms of this Order. # noqa: E501 - - Creation time of order (in milliseconds) # noqa: E501 - - :return: The create_time_ms of this Order. # 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 Order. - - Creation time of order (in milliseconds) # noqa: E501 - - :param create_time_ms: The create_time_ms of this Order. # noqa: E501 - :type: int - """ - - self._create_time_ms = create_time_ms - - @property - def update_time_ms(self): - """Gets the update_time_ms of this Order. # noqa: E501 - - Last modification time of order (in milliseconds) # noqa: E501 - - :return: The update_time_ms of this Order. # 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 Order. - - Last modification time of order (in milliseconds) # noqa: E501 - - :param update_time_ms: The update_time_ms of this Order. # noqa: E501 - :type: int - """ - - self._update_time_ms = update_time_ms - - @property - def status(self): - """Gets the status of this Order. # noqa: E501 - - Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 - - :return: The status of this Order. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Order. - - Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 - - :param status: The status of this Order. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed", "cancelled"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def currency_pair(self): - """Gets the currency_pair of this Order. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this Order. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this Order. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this Order. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 - raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 - - self._currency_pair = currency_pair - - @property - def type(self): - """Gets the type of this Order. # noqa: E501 - - Order Type - limit : Limit Order - market : Market Order # noqa: E501 - - :return: The type of this Order. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Order. - - Order Type - limit : Limit Order - market : Market Order # noqa: E501 - - :param type: The type of this Order. # noqa: E501 - :type: str - """ - allowed_values = ["limit", "market"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def account(self): - """Gets the account of this Order. # noqa: E501 - - Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 - - :return: The account of this Order. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this Order. - - Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 - - :param account: The account of this Order. # noqa: E501 - :type: str - """ - - self._account = account - - @property - def side(self): - """Gets the side of this Order. # noqa: E501 - - Order side # noqa: E501 - - :return: The side of this Order. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this Order. - - Order side # noqa: E501 - - :param side: The side of this Order. # 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 Order. # noqa: E501 - - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 - - :return: The amount of this Order. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this Order. - - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 - - :param amount: The amount of this Order. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def price(self): - """Gets the price of this Order. # noqa: E501 - - Price can't be empty when `type`= `limit` # noqa: E501 - - :return: The price of this Order. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this Order. - - Price can't be empty when `type`= `limit` # noqa: E501 - - :param price: The price of this Order. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def time_in_force(self): - """Gets the time_in_force of this Order. # noqa: E501 - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 - - :return: The time_in_force of this Order. # 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 Order. - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 - - :param time_in_force: The time_in_force of this Order. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 - .format(time_in_force, allowed_values) - ) - - self._time_in_force = time_in_force - - @property - def iceberg(self): - """Gets the iceberg of this Order. # noqa: E501 - - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 - - :return: The iceberg of this Order. # noqa: E501 - :rtype: str - """ - return self._iceberg - - @iceberg.setter - def iceberg(self, iceberg): - """Sets the iceberg of this Order. - - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 - - :param iceberg: The iceberg of this Order. # noqa: E501 - :type: str - """ - - self._iceberg = iceberg - - @property - def auto_borrow(self): - """Gets the auto_borrow of this Order. # noqa: E501 - - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 - - :return: The auto_borrow of this Order. # noqa: E501 - :rtype: bool - """ - return self._auto_borrow - - @auto_borrow.setter - def auto_borrow(self, auto_borrow): - """Sets the auto_borrow of this Order. - - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 - - :param auto_borrow: The auto_borrow of this Order. # noqa: E501 - :type: bool - """ - - self._auto_borrow = auto_borrow - - @property - def auto_repay(self): - """Gets the auto_repay of this Order. # noqa: E501 - - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 - - :return: The auto_repay of this Order. # noqa: E501 - :rtype: bool - """ - return self._auto_repay - - @auto_repay.setter - def auto_repay(self, auto_repay): - """Sets the auto_repay of this Order. - - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 - - :param auto_repay: The auto_repay of this Order. # noqa: E501 - :type: bool - """ - - self._auto_repay = auto_repay - - @property - def left(self): - """Gets the left of this Order. # noqa: E501 - - Amount left to fill # noqa: E501 - - :return: The left of this Order. # noqa: E501 - :rtype: str - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this Order. - - Amount left to fill # noqa: E501 - - :param left: The left of this Order. # noqa: E501 - :type: str - """ - - self._left = left - - @property - def filled_amount(self): - """Gets the filled_amount of this Order. # noqa: E501 - - Amount traded to fill # noqa: E501 - - :return: The filled_amount of this Order. # noqa: E501 - :rtype: str - """ - return self._filled_amount - - @filled_amount.setter - def filled_amount(self, filled_amount): - """Sets the filled_amount of this Order. - - Amount traded to fill # noqa: E501 - - :param filled_amount: The filled_amount of this Order. # noqa: E501 - :type: str - """ - - self._filled_amount = filled_amount - - @property - def fill_price(self): - """Gets the fill_price of this Order. # noqa: E501 - - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 - - :return: The fill_price of this Order. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this Order. - - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 - - :param fill_price: The fill_price of this Order. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def filled_total(self): - """Gets the filled_total of this Order. # noqa: E501 - - Total filled in quote currency # noqa: E501 - - :return: The filled_total of this Order. # noqa: E501 - :rtype: str - """ - return self._filled_total - - @filled_total.setter - def filled_total(self, filled_total): - """Sets the filled_total of this Order. - - Total filled in quote currency # noqa: E501 - - :param filled_total: The filled_total of this Order. # noqa: E501 - :type: str - """ - - self._filled_total = filled_total - - @property - def avg_deal_price(self): - """Gets the avg_deal_price of this Order. # noqa: E501 - - Average fill price # noqa: E501 - - :return: The avg_deal_price of this Order. # noqa: E501 - :rtype: str - """ - return self._avg_deal_price - - @avg_deal_price.setter - def avg_deal_price(self, avg_deal_price): - """Sets the avg_deal_price of this Order. - - Average fill price # noqa: E501 - - :param avg_deal_price: The avg_deal_price of this Order. # noqa: E501 - :type: str - """ - - self._avg_deal_price = avg_deal_price - - @property - def fee(self): - """Gets the fee of this Order. # noqa: E501 - - Fee deducted # noqa: E501 - - :return: The fee of this Order. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this Order. - - Fee deducted # noqa: E501 - - :param fee: The fee of this Order. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def fee_currency(self): - """Gets the fee_currency of this Order. # noqa: E501 - - Fee currency unit # noqa: E501 - - :return: The fee_currency of this Order. # noqa: E501 - :rtype: str - """ - return self._fee_currency - - @fee_currency.setter - def fee_currency(self, fee_currency): - """Sets the fee_currency of this Order. - - Fee currency unit # noqa: E501 - - :param fee_currency: The fee_currency of this Order. # noqa: E501 - :type: str - """ - - self._fee_currency = fee_currency - - @property - def point_fee(self): - """Gets the point_fee of this Order. # noqa: E501 - - Points used to deduct fee # noqa: E501 - - :return: The point_fee of this Order. # noqa: E501 - :rtype: str - """ - return self._point_fee - - @point_fee.setter - def point_fee(self, point_fee): - """Sets the point_fee of this Order. - - Points used to deduct fee # noqa: E501 - - :param point_fee: The point_fee of this Order. # noqa: E501 - :type: str - """ - - self._point_fee = point_fee - - @property - def gt_fee(self): - """Gets the gt_fee of this Order. # noqa: E501 - - GT used to deduct fee # noqa: E501 - - :return: The gt_fee of this Order. # noqa: E501 - :rtype: str - """ - return self._gt_fee - - @gt_fee.setter - def gt_fee(self, gt_fee): - """Sets the gt_fee of this Order. - - GT used to deduct fee # noqa: E501 - - :param gt_fee: The gt_fee of this Order. # noqa: E501 - :type: str - """ - - self._gt_fee = gt_fee - - @property - def gt_maker_fee(self): - """Gets the gt_maker_fee of this Order. # noqa: E501 - - GT used to deduct maker fee # noqa: E501 - - :return: The gt_maker_fee of this Order. # noqa: E501 - :rtype: str - """ - return self._gt_maker_fee - - @gt_maker_fee.setter - def gt_maker_fee(self, gt_maker_fee): - """Sets the gt_maker_fee of this Order. - - GT used to deduct maker fee # noqa: E501 - - :param gt_maker_fee: The gt_maker_fee of this Order. # noqa: E501 - :type: str - """ - - self._gt_maker_fee = gt_maker_fee - - @property - def gt_taker_fee(self): - """Gets the gt_taker_fee of this Order. # noqa: E501 - - GT used to deduct taker fee # noqa: E501 - - :return: The gt_taker_fee of this Order. # noqa: E501 - :rtype: str - """ - return self._gt_taker_fee - - @gt_taker_fee.setter - def gt_taker_fee(self, gt_taker_fee): - """Sets the gt_taker_fee of this Order. - - GT used to deduct taker fee # noqa: E501 - - :param gt_taker_fee: The gt_taker_fee of this Order. # noqa: E501 - :type: str - """ - - self._gt_taker_fee = gt_taker_fee - - @property - def gt_discount(self): - """Gets the gt_discount of this Order. # noqa: E501 - - Whether GT fee discount is used # noqa: E501 - - :return: The gt_discount of this Order. # noqa: E501 - :rtype: bool - """ - return self._gt_discount - - @gt_discount.setter - def gt_discount(self, gt_discount): - """Sets the gt_discount of this Order. - - Whether GT fee discount is used # noqa: E501 - - :param gt_discount: The gt_discount of this Order. # noqa: E501 - :type: bool - """ - - self._gt_discount = gt_discount - - @property - def rebated_fee(self): - """Gets the rebated_fee of this Order. # noqa: E501 - - Rebated fee # noqa: E501 - - :return: The rebated_fee of this Order. # noqa: E501 - :rtype: str - """ - return self._rebated_fee - - @rebated_fee.setter - def rebated_fee(self, rebated_fee): - """Sets the rebated_fee of this Order. - - Rebated fee # noqa: E501 - - :param rebated_fee: The rebated_fee of this Order. # noqa: E501 - :type: str - """ - - self._rebated_fee = rebated_fee - - @property - def rebated_fee_currency(self): - """Gets the rebated_fee_currency of this Order. # noqa: E501 - - Rebated fee currency unit # noqa: E501 - - :return: The rebated_fee_currency of this Order. # noqa: E501 - :rtype: str - """ - return self._rebated_fee_currency - - @rebated_fee_currency.setter - def rebated_fee_currency(self, rebated_fee_currency): - """Sets the rebated_fee_currency of this Order. - - Rebated fee currency unit # noqa: E501 - - :param rebated_fee_currency: The rebated_fee_currency of this Order. # noqa: E501 - :type: str - """ - - self._rebated_fee_currency = rebated_fee_currency - - @property - def stp_id(self): - """Gets the stp_id of this Order. # noqa: E501 - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :return: The stp_id of this Order. # noqa: E501 - :rtype: int - """ - return self._stp_id - - @stp_id.setter - def stp_id(self, stp_id): - """Sets the stp_id of this Order. - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :param stp_id: The stp_id of this Order. # noqa: E501 - :type: int - """ - - self._stp_id = stp_id - - @property - def stp_act(self): - """Gets the stp_act of this Order. # noqa: E501 - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :return: The stp_act of this Order. # noqa: E501 - :rtype: str - """ - return self._stp_act - - @stp_act.setter - def stp_act(self, stp_act): - """Sets the stp_act of this Order. - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :param stp_act: The stp_act of this Order. # noqa: E501 - :type: str - """ - allowed_values = ["cn", "co", "cb", "-"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 - .format(stp_act, allowed_values) - ) - - self._stp_act = stp_act - - @property - def finish_as(self): - """Gets the finish_as of this Order. # noqa: E501 - - Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 - - :return: The finish_as of this Order. # noqa: E501 - :rtype: str - """ - return self._finish_as - - @finish_as.setter - def finish_as(self, finish_as): - """Sets the finish_as of this Order. - - Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 - - :param finish_as: The finish_as of this Order. # noqa: E501 - :type: str - """ - allowed_values = ["open", "filled", "cancelled", "liquidate_cancelled", "depth_not_enough", "trader_not_enough", "small", "ioc", "poc", "fok", "stp", "unknown"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 - .format(finish_as, allowed_values) - ) - - self._finish_as = finish_as - - @property - def action_mode(self): - """Gets the action_mode of this Order. # noqa: E501 - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :return: The action_mode of this Order. # noqa: E501 - :rtype: str - """ - return self._action_mode - - @action_mode.setter - def action_mode(self, action_mode): - """Sets the action_mode of this Order. - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :param action_mode: The action_mode of this Order. # noqa: E501 - :type: str - """ - - self._action_mode = action_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Order): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Order): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py deleted file mode 100644 index c554292..0000000 --- a/gate_api/models/order_book.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OrderBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'current': 'int', - 'update': 'int', - 'asks': 'list[list[str]]', - 'bids': 'list[list[str]]' - } - - attribute_map = { - 'id': 'id', - 'current': 'current', - 'update': 'update', - 'asks': 'asks', - 'bids': 'bids' - } - - def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, list[list[str]], list[list[str]], Configuration) -> None - """OrderBook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._current = None - self._update = None - self._asks = None - self._bids = None - self.discriminator = None - - if id is not None: - self.id = id - if current is not None: - self.current = current - if update is not None: - self.update = update - self.asks = asks - self.bids = bids - - @property - def id(self): - """Gets the id of this OrderBook. # noqa: E501 - - Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` # noqa: E501 - - :return: The id of this OrderBook. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OrderBook. - - Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` # noqa: E501 - - :param id: The id of this OrderBook. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def current(self): - """Gets the current of this OrderBook. # noqa: E501 - - The timestamp of the response data being generated (in milliseconds) # noqa: E501 - - :return: The current of this OrderBook. # noqa: E501 - :rtype: int - """ - return self._current - - @current.setter - def current(self, current): - """Sets the current of this OrderBook. - - The timestamp of the response data being generated (in milliseconds) # noqa: E501 - - :param current: The current of this OrderBook. # noqa: E501 - :type: int - """ - - self._current = current - - @property - def update(self): - """Gets the update of this OrderBook. # noqa: E501 - - The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 - - :return: The update of this OrderBook. # noqa: E501 - :rtype: int - """ - return self._update - - @update.setter - def update(self, update): - """Sets the update of this OrderBook. - - The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 - - :param update: The update of this OrderBook. # noqa: E501 - :type: int - """ - - self._update = update - - @property - def asks(self): - """Gets the asks of this OrderBook. # noqa: E501 - - Asks order depth # noqa: E501 - - :return: The asks of this OrderBook. # noqa: E501 - :rtype: list[list[str]] - """ - return self._asks - - @asks.setter - def asks(self, asks): - """Sets the asks of this OrderBook. - - Asks order depth # noqa: E501 - - :param asks: The asks of this OrderBook. # noqa: E501 - :type: list[list[str]] - """ - if self.local_vars_configuration.client_side_validation and asks is None: # noqa: E501 - raise ValueError("Invalid value for `asks`, must not be `None`") # noqa: E501 - - self._asks = asks - - @property - def bids(self): - """Gets the bids of this OrderBook. # noqa: E501 - - Bids order depth # noqa: E501 - - :return: The bids of this OrderBook. # noqa: E501 - :rtype: list[list[str]] - """ - return self._bids - - @bids.setter - def bids(self, bids): - """Sets the bids of this OrderBook. - - Bids order depth # noqa: E501 - - :param bids: The bids of this OrderBook. # noqa: E501 - :type: list[list[str]] - """ - if self.local_vars_configuration.client_side_validation and bids is None: # noqa: E501 - raise ValueError("Invalid value for `bids`, must not be `None`") # noqa: E501 - - self._bids = bids - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrderBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrderBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py deleted file mode 100644 index 53343cd..0000000 --- a/gate_api/models/order_cancel.py +++ /dev/null @@ -1,1226 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OrderCancel(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'amend_text': 'str', - 'succeeded': 'bool', - 'label': 'str', - 'message': 'str', - 'create_time': 'str', - 'update_time': 'str', - 'create_time_ms': 'int', - 'update_time_ms': 'int', - 'status': 'str', - 'currency_pair': 'str', - 'type': 'str', - 'account': 'str', - 'side': 'str', - 'amount': 'str', - 'price': 'str', - 'time_in_force': 'str', - 'iceberg': 'str', - 'auto_borrow': 'bool', - 'auto_repay': 'bool', - 'left': 'str', - 'filled_amount': 'str', - 'fill_price': 'str', - 'filled_total': 'str', - 'avg_deal_price': 'str', - 'fee': 'str', - 'fee_currency': 'str', - 'point_fee': 'str', - 'gt_fee': 'str', - 'gt_maker_fee': 'str', - 'gt_taker_fee': 'str', - 'gt_discount': 'bool', - 'rebated_fee': 'str', - 'rebated_fee_currency': 'str', - 'stp_id': 'int', - 'stp_act': 'str', - 'finish_as': 'str', - 'action_mode': 'str' - } - - attribute_map = { - 'id': 'id', - 'text': 'text', - 'amend_text': 'amend_text', - 'succeeded': 'succeeded', - 'label': 'label', - 'message': 'message', - 'create_time': 'create_time', - 'update_time': 'update_time', - 'create_time_ms': 'create_time_ms', - 'update_time_ms': 'update_time_ms', - 'status': 'status', - 'currency_pair': 'currency_pair', - 'type': 'type', - 'account': 'account', - 'side': 'side', - 'amount': 'amount', - 'price': 'price', - 'time_in_force': 'time_in_force', - 'iceberg': 'iceberg', - 'auto_borrow': 'auto_borrow', - 'auto_repay': 'auto_repay', - 'left': 'left', - 'filled_amount': 'filled_amount', - 'fill_price': 'fill_price', - 'filled_total': 'filled_total', - 'avg_deal_price': 'avg_deal_price', - 'fee': 'fee', - 'fee_currency': 'fee_currency', - 'point_fee': 'point_fee', - 'gt_fee': 'gt_fee', - 'gt_maker_fee': 'gt_maker_fee', - 'gt_taker_fee': 'gt_taker_fee', - 'gt_discount': 'gt_discount', - 'rebated_fee': 'rebated_fee', - 'rebated_fee_currency': 'rebated_fee_currency', - 'stp_id': 'stp_id', - 'stp_act': 'stp_act', - 'finish_as': 'finish_as', - 'action_mode': 'action_mode' - } - - def __init__(self, id=None, text=None, amend_text=None, succeeded=None, label=None, message=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_maker_fee=None, gt_taker_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, action_mode=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, bool, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, str, Configuration) -> None - """OrderCancel - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._text = None - self._amend_text = None - self._succeeded = None - self._label = None - self._message = None - self._create_time = None - self._update_time = None - self._create_time_ms = None - self._update_time_ms = None - self._status = None - self._currency_pair = None - self._type = None - self._account = None - self._side = None - self._amount = None - self._price = None - self._time_in_force = None - self._iceberg = None - self._auto_borrow = None - self._auto_repay = None - self._left = None - self._filled_amount = None - self._fill_price = None - self._filled_total = None - self._avg_deal_price = None - self._fee = None - self._fee_currency = None - self._point_fee = None - self._gt_fee = None - self._gt_maker_fee = None - self._gt_taker_fee = None - self._gt_discount = None - self._rebated_fee = None - self._rebated_fee_currency = None - self._stp_id = None - self._stp_act = None - self._finish_as = None - self._action_mode = None - self.discriminator = None - - if id is not None: - self.id = id - if text is not None: - self.text = text - if amend_text is not None: - self.amend_text = amend_text - if succeeded is not None: - self.succeeded = succeeded - if label is not None: - self.label = label - if message is not None: - self.message = message - if create_time is not None: - self.create_time = create_time - if update_time is not None: - self.update_time = update_time - if create_time_ms is not None: - self.create_time_ms = create_time_ms - if update_time_ms is not None: - self.update_time_ms = update_time_ms - if status is not None: - self.status = status - self.currency_pair = currency_pair - if type is not None: - self.type = type - if account is not None: - self.account = account - self.side = side - self.amount = amount - if price is not None: - self.price = price - if time_in_force is not None: - self.time_in_force = time_in_force - if iceberg is not None: - self.iceberg = iceberg - if auto_borrow is not None: - self.auto_borrow = auto_borrow - if auto_repay is not None: - self.auto_repay = auto_repay - if left is not None: - self.left = left - if filled_amount is not None: - self.filled_amount = filled_amount - if fill_price is not None: - self.fill_price = fill_price - if filled_total is not None: - self.filled_total = filled_total - if avg_deal_price is not None: - self.avg_deal_price = avg_deal_price - if fee is not None: - self.fee = fee - if fee_currency is not None: - self.fee_currency = fee_currency - if point_fee is not None: - self.point_fee = point_fee - if gt_fee is not None: - self.gt_fee = gt_fee - if gt_maker_fee is not None: - self.gt_maker_fee = gt_maker_fee - if gt_taker_fee is not None: - self.gt_taker_fee = gt_taker_fee - if gt_discount is not None: - self.gt_discount = gt_discount - if rebated_fee is not None: - self.rebated_fee = rebated_fee - if rebated_fee_currency is not None: - self.rebated_fee_currency = rebated_fee_currency - if stp_id is not None: - self.stp_id = stp_id - if stp_act is not None: - self.stp_act = stp_act - if finish_as is not None: - self.finish_as = finish_as - if action_mode is not None: - self.action_mode = action_mode - - @property - def id(self): - """Gets the id of this OrderCancel. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OrderCancel. - - Order ID # noqa: E501 - - :param id: The id of this OrderCancel. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def text(self): - """Gets the text of this OrderCancel. # noqa: E501 - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 - - :return: The text of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this OrderCancel. - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 - - :param text: The text of this OrderCancel. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def amend_text(self): - """Gets the amend_text of this OrderCancel. # noqa: E501 - - The custom data that the user remarked when amending the order # noqa: E501 - - :return: The amend_text of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this OrderCancel. - - The custom data that the user remarked when amending the order # noqa: E501 - - :param amend_text: The amend_text of this OrderCancel. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - @property - def succeeded(self): - """Gets the succeeded of this OrderCancel. # noqa: E501 - - Whether the batch of orders succeeded # noqa: E501 - - :return: The succeeded of this OrderCancel. # noqa: E501 - :rtype: bool - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this OrderCancel. - - Whether the batch of orders succeeded # noqa: E501 - - :param succeeded: The succeeded of this OrderCancel. # noqa: E501 - :type: bool - """ - - self._succeeded = succeeded - - @property - def label(self): - """Gets the label of this OrderCancel. # noqa: E501 - - Error label, if any, otherwise an empty string # noqa: E501 - - :return: The label of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this OrderCancel. - - Error label, if any, otherwise an empty string # noqa: E501 - - :param label: The label of this OrderCancel. # noqa: E501 - :type: str - """ - - self._label = label - - @property - def message(self): - """Gets the message of this OrderCancel. # noqa: E501 - - Detailed error message, if any, otherwise an empty string # noqa: E501 - - :return: The message of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this OrderCancel. - - Detailed error message, if any, otherwise an empty string # noqa: E501 - - :param message: The message of this OrderCancel. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def create_time(self): - """Gets the create_time of this OrderCancel. # noqa: E501 - - Creation time of order # noqa: E501 - - :return: The create_time of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this OrderCancel. - - Creation time of order # noqa: E501 - - :param create_time: The create_time of this OrderCancel. # noqa: E501 - :type: str - """ - - self._create_time = create_time - - @property - def update_time(self): - """Gets the update_time of this OrderCancel. # noqa: E501 - - Last modification time of order # noqa: E501 - - :return: The update_time of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this OrderCancel. - - Last modification time of order # noqa: E501 - - :param update_time: The update_time of this OrderCancel. # noqa: E501 - :type: str - """ - - self._update_time = update_time - - @property - def create_time_ms(self): - """Gets the create_time_ms of this OrderCancel. # noqa: E501 - - Creation time of order (in milliseconds) # noqa: E501 - - :return: The create_time_ms of this OrderCancel. # noqa: E501 - :rtype: int - """ - return self._create_time_ms - - @create_time_ms.setter - def create_time_ms(self, create_time_ms): - """Sets the create_time_ms of this OrderCancel. - - Creation time of order (in milliseconds) # noqa: E501 - - :param create_time_ms: The create_time_ms of this OrderCancel. # noqa: E501 - :type: int - """ - - self._create_time_ms = create_time_ms - - @property - def update_time_ms(self): - """Gets the update_time_ms of this OrderCancel. # noqa: E501 - - Last modification time of order (in milliseconds) # noqa: E501 - - :return: The update_time_ms of this OrderCancel. # noqa: E501 - :rtype: int - """ - return self._update_time_ms - - @update_time_ms.setter - def update_time_ms(self, update_time_ms): - """Sets the update_time_ms of this OrderCancel. - - Last modification time of order (in milliseconds) # noqa: E501 - - :param update_time_ms: The update_time_ms of this OrderCancel. # noqa: E501 - :type: int - """ - - self._update_time_ms = update_time_ms - - @property - def status(self): - """Gets the status of this OrderCancel. # noqa: E501 - - Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 - - :return: The status of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this OrderCancel. - - Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 - - :param status: The status of this OrderCancel. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed", "cancelled"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def currency_pair(self): - """Gets the currency_pair of this OrderCancel. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this OrderCancel. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this OrderCancel. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 - raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 - - self._currency_pair = currency_pair - - @property - def type(self): - """Gets the type of this OrderCancel. # noqa: E501 - - Order Type - limit : Limit Order - market : Market Order # noqa: E501 - - :return: The type of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this OrderCancel. - - Order Type - limit : Limit Order - market : Market Order # noqa: E501 - - :param type: The type of this OrderCancel. # noqa: E501 - :type: str - """ - allowed_values = ["limit", "market"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def account(self): - """Gets the account of this OrderCancel. # noqa: E501 - - Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 - - :return: The account of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this OrderCancel. - - Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 - - :param account: The account of this OrderCancel. # noqa: E501 - :type: str - """ - - self._account = account - - @property - def side(self): - """Gets the side of this OrderCancel. # noqa: E501 - - Order side # noqa: E501 - - :return: The side of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this OrderCancel. - - Order side # noqa: E501 - - :param side: The side of this OrderCancel. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 - 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 OrderCancel. # noqa: E501 - - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 - - :return: The amount of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this OrderCancel. - - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 - - :param amount: The amount of this OrderCancel. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def price(self): - """Gets the price of this OrderCancel. # noqa: E501 - - Price can't be empty when `type`= `limit` # noqa: E501 - - :return: The price of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this OrderCancel. - - Price can't be empty when `type`= `limit` # noqa: E501 - - :param price: The price of this OrderCancel. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def time_in_force(self): - """Gets the time_in_force of this OrderCancel. # noqa: E501 - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 - - :return: The time_in_force of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._time_in_force - - @time_in_force.setter - def time_in_force(self, time_in_force): - """Sets the time_in_force of this OrderCancel. - - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 - - :param time_in_force: The time_in_force of this OrderCancel. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 - .format(time_in_force, allowed_values) - ) - - self._time_in_force = time_in_force - - @property - def iceberg(self): - """Gets the iceberg of this OrderCancel. # noqa: E501 - - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 - - :return: The iceberg of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._iceberg - - @iceberg.setter - def iceberg(self, iceberg): - """Sets the iceberg of this OrderCancel. - - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 - - :param iceberg: The iceberg of this OrderCancel. # noqa: E501 - :type: str - """ - - self._iceberg = iceberg - - @property - def auto_borrow(self): - """Gets the auto_borrow of this OrderCancel. # noqa: E501 - - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 - - :return: The auto_borrow of this OrderCancel. # noqa: E501 - :rtype: bool - """ - return self._auto_borrow - - @auto_borrow.setter - def auto_borrow(self, auto_borrow): - """Sets the auto_borrow of this OrderCancel. - - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 - - :param auto_borrow: The auto_borrow of this OrderCancel. # noqa: E501 - :type: bool - """ - - self._auto_borrow = auto_borrow - - @property - def auto_repay(self): - """Gets the auto_repay of this OrderCancel. # noqa: E501 - - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 - - :return: The auto_repay of this OrderCancel. # noqa: E501 - :rtype: bool - """ - return self._auto_repay - - @auto_repay.setter - def auto_repay(self, auto_repay): - """Sets the auto_repay of this OrderCancel. - - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 - - :param auto_repay: The auto_repay of this OrderCancel. # noqa: E501 - :type: bool - """ - - self._auto_repay = auto_repay - - @property - def left(self): - """Gets the left of this OrderCancel. # noqa: E501 - - Amount left to fill # noqa: E501 - - :return: The left of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._left - - @left.setter - def left(self, left): - """Sets the left of this OrderCancel. - - Amount left to fill # noqa: E501 - - :param left: The left of this OrderCancel. # noqa: E501 - :type: str - """ - - self._left = left - - @property - def filled_amount(self): - """Gets the filled_amount of this OrderCancel. # noqa: E501 - - Amount traded to fill # noqa: E501 - - :return: The filled_amount of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._filled_amount - - @filled_amount.setter - def filled_amount(self, filled_amount): - """Sets the filled_amount of this OrderCancel. - - Amount traded to fill # noqa: E501 - - :param filled_amount: The filled_amount of this OrderCancel. # noqa: E501 - :type: str - """ - - self._filled_amount = filled_amount - - @property - def fill_price(self): - """Gets the fill_price of this OrderCancel. # noqa: E501 - - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 - - :return: The fill_price of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._fill_price - - @fill_price.setter - def fill_price(self, fill_price): - """Sets the fill_price of this OrderCancel. - - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 - - :param fill_price: The fill_price of this OrderCancel. # noqa: E501 - :type: str - """ - - self._fill_price = fill_price - - @property - def filled_total(self): - """Gets the filled_total of this OrderCancel. # noqa: E501 - - Total filled in quote currency # noqa: E501 - - :return: The filled_total of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._filled_total - - @filled_total.setter - def filled_total(self, filled_total): - """Sets the filled_total of this OrderCancel. - - Total filled in quote currency # noqa: E501 - - :param filled_total: The filled_total of this OrderCancel. # noqa: E501 - :type: str - """ - - self._filled_total = filled_total - - @property - def avg_deal_price(self): - """Gets the avg_deal_price of this OrderCancel. # noqa: E501 - - Average fill price # noqa: E501 - - :return: The avg_deal_price of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._avg_deal_price - - @avg_deal_price.setter - def avg_deal_price(self, avg_deal_price): - """Sets the avg_deal_price of this OrderCancel. - - Average fill price # noqa: E501 - - :param avg_deal_price: The avg_deal_price of this OrderCancel. # noqa: E501 - :type: str - """ - - self._avg_deal_price = avg_deal_price - - @property - def fee(self): - """Gets the fee of this OrderCancel. # noqa: E501 - - Fee deducted # noqa: E501 - - :return: The fee of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this OrderCancel. - - Fee deducted # noqa: E501 - - :param fee: The fee of this OrderCancel. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def fee_currency(self): - """Gets the fee_currency of this OrderCancel. # noqa: E501 - - Fee currency unit # noqa: E501 - - :return: The fee_currency of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._fee_currency - - @fee_currency.setter - def fee_currency(self, fee_currency): - """Sets the fee_currency of this OrderCancel. - - Fee currency unit # noqa: E501 - - :param fee_currency: The fee_currency of this OrderCancel. # noqa: E501 - :type: str - """ - - self._fee_currency = fee_currency - - @property - def point_fee(self): - """Gets the point_fee of this OrderCancel. # noqa: E501 - - Points used to deduct fee # noqa: E501 - - :return: The point_fee of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._point_fee - - @point_fee.setter - def point_fee(self, point_fee): - """Sets the point_fee of this OrderCancel. - - Points used to deduct fee # noqa: E501 - - :param point_fee: The point_fee of this OrderCancel. # noqa: E501 - :type: str - """ - - self._point_fee = point_fee - - @property - def gt_fee(self): - """Gets the gt_fee of this OrderCancel. # noqa: E501 - - GT used to deduct fee # noqa: E501 - - :return: The gt_fee of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._gt_fee - - @gt_fee.setter - def gt_fee(self, gt_fee): - """Sets the gt_fee of this OrderCancel. - - GT used to deduct fee # noqa: E501 - - :param gt_fee: The gt_fee of this OrderCancel. # noqa: E501 - :type: str - """ - - self._gt_fee = gt_fee - - @property - def gt_maker_fee(self): - """Gets the gt_maker_fee of this OrderCancel. # noqa: E501 - - GT used to deduct maker fee # noqa: E501 - - :return: The gt_maker_fee of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._gt_maker_fee - - @gt_maker_fee.setter - def gt_maker_fee(self, gt_maker_fee): - """Sets the gt_maker_fee of this OrderCancel. - - GT used to deduct maker fee # noqa: E501 - - :param gt_maker_fee: The gt_maker_fee of this OrderCancel. # noqa: E501 - :type: str - """ - - self._gt_maker_fee = gt_maker_fee - - @property - def gt_taker_fee(self): - """Gets the gt_taker_fee of this OrderCancel. # noqa: E501 - - GT used to deduct taker fee # noqa: E501 - - :return: The gt_taker_fee of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._gt_taker_fee - - @gt_taker_fee.setter - def gt_taker_fee(self, gt_taker_fee): - """Sets the gt_taker_fee of this OrderCancel. - - GT used to deduct taker fee # noqa: E501 - - :param gt_taker_fee: The gt_taker_fee of this OrderCancel. # noqa: E501 - :type: str - """ - - self._gt_taker_fee = gt_taker_fee - - @property - def gt_discount(self): - """Gets the gt_discount of this OrderCancel. # noqa: E501 - - Whether GT fee discount is used # noqa: E501 - - :return: The gt_discount of this OrderCancel. # noqa: E501 - :rtype: bool - """ - return self._gt_discount - - @gt_discount.setter - def gt_discount(self, gt_discount): - """Sets the gt_discount of this OrderCancel. - - Whether GT fee discount is used # noqa: E501 - - :param gt_discount: The gt_discount of this OrderCancel. # noqa: E501 - :type: bool - """ - - self._gt_discount = gt_discount - - @property - def rebated_fee(self): - """Gets the rebated_fee of this OrderCancel. # noqa: E501 - - Rebated fee # noqa: E501 - - :return: The rebated_fee of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._rebated_fee - - @rebated_fee.setter - def rebated_fee(self, rebated_fee): - """Sets the rebated_fee of this OrderCancel. - - Rebated fee # noqa: E501 - - :param rebated_fee: The rebated_fee of this OrderCancel. # noqa: E501 - :type: str - """ - - self._rebated_fee = rebated_fee - - @property - def rebated_fee_currency(self): - """Gets the rebated_fee_currency of this OrderCancel. # noqa: E501 - - Rebated fee currency unit # noqa: E501 - - :return: The rebated_fee_currency of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._rebated_fee_currency - - @rebated_fee_currency.setter - def rebated_fee_currency(self, rebated_fee_currency): - """Sets the rebated_fee_currency of this OrderCancel. - - Rebated fee currency unit # noqa: E501 - - :param rebated_fee_currency: The rebated_fee_currency of this OrderCancel. # noqa: E501 - :type: str - """ - - self._rebated_fee_currency = rebated_fee_currency - - @property - def stp_id(self): - """Gets the stp_id of this OrderCancel. # noqa: E501 - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :return: The stp_id of this OrderCancel. # noqa: E501 - :rtype: int - """ - return self._stp_id - - @stp_id.setter - def stp_id(self, stp_id): - """Sets the stp_id of this OrderCancel. - - Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 - - :param stp_id: The stp_id of this OrderCancel. # noqa: E501 - :type: int - """ - - self._stp_id = stp_id - - @property - def stp_act(self): - """Gets the stp_act of this OrderCancel. # noqa: E501 - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :return: The stp_act of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._stp_act - - @stp_act.setter - def stp_act(self, stp_act): - """Sets the stp_act of this OrderCancel. - - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 - - :param stp_act: The stp_act of this OrderCancel. # noqa: E501 - :type: str - """ - allowed_values = ["cn", "co", "cb", "-"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 - .format(stp_act, allowed_values) - ) - - self._stp_act = stp_act - - @property - def finish_as(self): - """Gets the finish_as of this OrderCancel. # noqa: E501 - - How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 - - :return: The finish_as of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._finish_as - - @finish_as.setter - def finish_as(self, finish_as): - """Sets the finish_as of this OrderCancel. - - How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 - - :param finish_as: The finish_as of this OrderCancel. # noqa: E501 - :type: str - """ - allowed_values = ["open", "filled", "cancelled", "ioc", "stp"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 - .format(finish_as, allowed_values) - ) - - self._finish_as = finish_as - - @property - def action_mode(self): - """Gets the action_mode of this OrderCancel. # noqa: E501 - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :return: The action_mode of this OrderCancel. # noqa: E501 - :rtype: str - """ - return self._action_mode - - @action_mode.setter - def action_mode(self, action_mode): - """Sets the action_mode of this OrderCancel. - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :param action_mode: The action_mode of this OrderCancel. # noqa: E501 - :type: str - """ - - self._action_mode = action_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrderCancel): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrderCancel): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py deleted file mode 100644 index 098f7eb..0000000 --- a/gate_api/models/order_patch.py +++ /dev/null @@ -1,266 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OrderPatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'account': 'str', - 'amount': 'str', - 'price': 'str', - 'amend_text': 'str', - 'action_mode': 'str' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'account': 'account', - 'amount': 'amount', - 'price': 'price', - 'amend_text': 'amend_text', - 'action_mode': 'action_mode' - } - - def __init__(self, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """OrderPatch - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pair = None - self._account = None - self._amount = None - self._price = None - self._amend_text = None - self._action_mode = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if account is not None: - self.account = account - if amount is not None: - self.amount = amount - if price is not None: - self.price = price - if amend_text is not None: - self.amend_text = amend_text - if action_mode is not None: - self.action_mode = action_mode - - @property - def currency_pair(self): - """Gets the currency_pair of this OrderPatch. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this OrderPatch. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this OrderPatch. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this OrderPatch. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def account(self): - """Gets the account of this OrderPatch. # noqa: E501 - - Specify query account. # noqa: E501 - - :return: The account of this OrderPatch. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this OrderPatch. - - Specify query account. # noqa: E501 - - :param account: The account of this OrderPatch. # noqa: E501 - :type: str - """ - - self._account = account - - @property - def amount(self): - """Gets the amount of this OrderPatch. # noqa: E501 - - New order amount. `amount` and `price` must specify one of them # noqa: E501 - - :return: The amount of this OrderPatch. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this OrderPatch. - - New order amount. `amount` and `price` must specify one of them # noqa: E501 - - :param amount: The amount of this OrderPatch. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def price(self): - """Gets the price of this OrderPatch. # noqa: E501 - - New order price. `amount` and `Price` must specify one of them\" # noqa: E501 - - :return: The price of this OrderPatch. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this OrderPatch. - - New order price. `amount` and `Price` must specify one of them\" # noqa: E501 - - :param price: The price of this OrderPatch. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def amend_text(self): - """Gets the amend_text of this OrderPatch. # noqa: E501 - - Custom info during amending order # noqa: E501 - - :return: The amend_text of this OrderPatch. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this OrderPatch. - - Custom info during amending order # noqa: E501 - - :param amend_text: The amend_text of this OrderPatch. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - amend_text is not None and len(amend_text) > 31): - raise ValueError("Invalid value for `amend_text`, length must be less than or equal to `31`") # noqa: E501 - - self._amend_text = amend_text - - @property - def action_mode(self): - """Gets the action_mode of this OrderPatch. # noqa: E501 - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :return: The action_mode of this OrderPatch. # noqa: E501 - :rtype: str - """ - return self._action_mode - - @action_mode.setter - def action_mode(self, action_mode): - """Sets the action_mode of this OrderPatch. - - Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 - - :param action_mode: The action_mode of this OrderPatch. # noqa: E501 - :type: str - """ - - self._action_mode = action_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrderPatch): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrderPatch): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py deleted file mode 100644 index 73a0d80..0000000 --- a/gate_api/models/order_resp.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OrderResp(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int' - } - - attribute_map = { - 'order_id': 'order_id' - } - - def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """OrderResp - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - - @property - def order_id(self): - """Gets the order_id of this OrderResp. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this OrderResp. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this OrderResp. - - Order ID # noqa: E501 - - :param order_id: The order_id of this OrderResp. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrderResp): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrderResp): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py deleted file mode 100644 index 2a39879..0000000 --- a/gate_api/models/partner_commission_history.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PartnerCommissionHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'int', - 'list': 'list[AgencyCommission]' - } - - attribute_map = { - 'total': 'total', - 'list': 'list' - } - - def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[AgencyCommission], Configuration) -> None - """PartnerCommissionHistory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._list = None - self.discriminator = None - - if total is not None: - self.total = total - if list is not None: - self.list = list - - @property - def total(self): - """Gets the total of this PartnerCommissionHistory. # noqa: E501 - - Total # noqa: E501 - - :return: The total of this PartnerCommissionHistory. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this PartnerCommissionHistory. - - Total # noqa: E501 - - :param total: The total of this PartnerCommissionHistory. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def list(self): - """Gets the list of this PartnerCommissionHistory. # noqa: E501 - - List of comission history # noqa: E501 - - :return: The list of this PartnerCommissionHistory. # noqa: E501 - :rtype: list[AgencyCommission] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this PartnerCommissionHistory. - - List of comission history # noqa: E501 - - :param list: The list of this PartnerCommissionHistory. # noqa: E501 - :type: list[AgencyCommission] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PartnerCommissionHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PartnerCommissionHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py deleted file mode 100644 index e908461..0000000 --- a/gate_api/models/partner_sub.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PartnerSub(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'user_join_time': 'int', - 'type': 'int' - } - - attribute_map = { - 'user_id': 'user_id', - 'user_join_time': 'user_join_time', - 'type': 'type' - } - - def __init__(self, user_id=None, user_join_time=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, Configuration) -> None - """PartnerSub - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._user_join_time = None - self._type = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if user_join_time is not None: - self.user_join_time = user_join_time - if type is not None: - self.type = type - - @property - def user_id(self): - """Gets the user_id of this PartnerSub. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this PartnerSub. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this PartnerSub. - - User ID # noqa: E501 - - :param user_id: The user_id of this PartnerSub. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def user_join_time(self): - """Gets the user_join_time of this PartnerSub. # noqa: E501 - - The time when the user joined the system, in seconds Unix timestamp # noqa: E501 - - :return: The user_join_time of this PartnerSub. # noqa: E501 - :rtype: int - """ - return self._user_join_time - - @user_join_time.setter - def user_join_time(self, user_join_time): - """Sets the user_join_time of this PartnerSub. - - The time when the user joined the system, in seconds Unix timestamp # noqa: E501 - - :param user_join_time: The user_join_time of this PartnerSub. # noqa: E501 - :type: int - """ - - self._user_join_time = user_join_time - - @property - def type(self): - """Gets the type of this PartnerSub. # noqa: E501 - - Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) # noqa: E501 - - :return: The type of this PartnerSub. # noqa: E501 - :rtype: int - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this PartnerSub. - - Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) # noqa: E501 - - :param type: The type of this PartnerSub. # noqa: E501 - :type: int - """ - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PartnerSub): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PartnerSub): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py deleted file mode 100644 index 735084d..0000000 --- a/gate_api/models/partner_sub_list.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PartnerSubList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'int', - 'list': 'list[PartnerSub]' - } - - attribute_map = { - 'total': 'total', - 'list': 'list' - } - - def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[PartnerSub], Configuration) -> None - """PartnerSubList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._list = None - self.discriminator = None - - if total is not None: - self.total = total - if list is not None: - self.list = list - - @property - def total(self): - """Gets the total of this PartnerSubList. # noqa: E501 - - Total # noqa: E501 - - :return: The total of this PartnerSubList. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this PartnerSubList. - - Total # noqa: E501 - - :param total: The total of this PartnerSubList. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def list(self): - """Gets the list of this PartnerSubList. # noqa: E501 - - Subordinate list # noqa: E501 - - :return: The list of this PartnerSubList. # noqa: E501 - :rtype: list[PartnerSub] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this PartnerSubList. - - Subordinate list # noqa: E501 - - :param list: The list of this PartnerSubList. # noqa: E501 - :type: list[PartnerSub] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PartnerSubList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PartnerSubList): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py deleted file mode 100644 index 50cc3c8..0000000 --- a/gate_api/models/partner_transaction_history.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PartnerTransactionHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'int', - 'list': 'list[AgencyTransaction]' - } - - attribute_map = { - 'total': 'total', - 'list': 'list' - } - - def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[AgencyTransaction], Configuration) -> None - """PartnerTransactionHistory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._list = None - self.discriminator = None - - if total is not None: - self.total = total - if list is not None: - self.list = list - - @property - def total(self): - """Gets the total of this PartnerTransactionHistory. # noqa: E501 - - Total # noqa: E501 - - :return: The total of this PartnerTransactionHistory. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this PartnerTransactionHistory. - - Total # noqa: E501 - - :param total: The total of this PartnerTransactionHistory. # noqa: E501 - :type: int - """ - - self._total = total - - @property - def list(self): - """Gets the list of this PartnerTransactionHistory. # noqa: E501 - - List of transaction history # noqa: E501 - - :return: The list of this PartnerTransactionHistory. # noqa: E501 - :rtype: list[AgencyTransaction] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this PartnerTransactionHistory. - - List of transaction history # noqa: E501 - - :param list: The list of this PartnerTransactionHistory. # noqa: E501 - :type: list[AgencyTransaction] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PartnerTransactionHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PartnerTransactionHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py deleted file mode 100644 index dba7451..0000000 --- a/gate_api/models/patch_uni_lend.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PatchUniLend(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'min_rate': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'min_rate': 'min_rate' - } - - def __init__(self, currency=None, min_rate=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """PatchUniLend - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._min_rate = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if min_rate is not None: - self.min_rate = min_rate - - @property - def currency(self): - """Gets the currency of this PatchUniLend. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this PatchUniLend. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this PatchUniLend. - - Currency name # noqa: E501 - - :param currency: The currency of this PatchUniLend. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def min_rate(self): - """Gets the min_rate of this PatchUniLend. # noqa: E501 - - Minimum interest rate # noqa: E501 - - :return: The min_rate of this PatchUniLend. # noqa: E501 - :rtype: str - """ - return self._min_rate - - @min_rate.setter - def min_rate(self, min_rate): - """Sets the min_rate of this PatchUniLend. - - Minimum interest rate # noqa: E501 - - :param min_rate: The min_rate of this PatchUniLend. # noqa: E501 - :type: str - """ - - self._min_rate = min_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, PatchUniLend): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PatchUniLend): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py deleted file mode 100644 index 24968d5..0000000 --- a/gate_api/models/place_dual_investment_order.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PlaceDualInvestmentOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'plan_id': 'str', - 'copies': 'str', - 'is_max': 'int', - 'amount': 'str', - 'text': 'str' - } - - attribute_map = { - 'plan_id': 'plan_id', - 'copies': 'copies', - 'is_max': 'is_max', - 'amount': 'amount', - 'text': 'text' - } - - def __init__(self, plan_id=None, copies=None, is_max=None, amount=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, int, str, str, Configuration) -> None - """PlaceDualInvestmentOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._plan_id = None - self._copies = None - self._is_max = None - self._amount = None - self._text = None - self.discriminator = None - - self.plan_id = plan_id - if copies is not None: - self.copies = copies - if is_max is not None: - self.is_max = is_max - self.amount = amount - if text is not None: - self.text = text - - @property - def plan_id(self): - """Gets the plan_id of this PlaceDualInvestmentOrder. # noqa: E501 - - Plan ID # noqa: E501 - - :return: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 - :rtype: str - """ - return self._plan_id - - @plan_id.setter - def plan_id(self, plan_id): - """Sets the plan_id of this PlaceDualInvestmentOrder. - - Plan ID # noqa: E501 - - :param plan_id: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and plan_id is None: # noqa: E501 - raise ValueError("Invalid value for `plan_id`, must not be `None`") # noqa: E501 - - self._plan_id = plan_id - - @property - def copies(self): - """Gets the copies of this PlaceDualInvestmentOrder. # noqa: E501 - - The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. # 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. - - The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 - - :param copies: The copies of this PlaceDualInvestmentOrder. # noqa: E501 - :type: str - """ - - self._copies = copies - - @property - def is_max(self): - """Gets the is_max of this PlaceDualInvestmentOrder. # noqa: E501 - - Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 - - :return: The is_max of this PlaceDualInvestmentOrder. # noqa: E501 - :rtype: int - """ - return self._is_max - - @is_max.setter - def is_max(self, is_max): - """Sets the is_max of this PlaceDualInvestmentOrder. - - Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 - - :param is_max: The is_max of this PlaceDualInvestmentOrder. # noqa: E501 - :type: int - """ - - self._is_max = is_max - - @property - def amount(self): - """Gets the amount of this PlaceDualInvestmentOrder. # noqa: E501 - - Subscription amount, mutually exclusive with the copies field # noqa: E501 - - :return: The amount of this PlaceDualInvestmentOrder. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this PlaceDualInvestmentOrder. - - Subscription amount, mutually exclusive with the copies field # noqa: E501 - - :param amount: The amount of this PlaceDualInvestmentOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def text(self): - """Gets the text of this PlaceDualInvestmentOrder. # noqa: E501 - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :return: The text of this PlaceDualInvestmentOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this PlaceDualInvestmentOrder. - - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :param text: The text of this PlaceDualInvestmentOrder. # noqa: E501 - :type: str - """ - - self._text = text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PlaceDualInvestmentOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PlaceDualInvestmentOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position.py b/gate_api/models/position.py deleted file mode 100644 index 0c4d905..0000000 --- a/gate_api/models/position.py +++ /dev/null @@ -1,966 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Position(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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': 'int', - 'contract': 'str', - 'size': 'int', - 'leverage': 'str', - 'risk_limit': 'str', - 'leverage_max': 'str', - 'maintenance_rate': 'str', - 'value': 'str', - 'margin': 'str', - 'entry_price': 'str', - 'liq_price': 'str', - 'mark_price': 'str', - 'initial_margin': 'str', - 'maintenance_margin': 'str', - 'unrealised_pnl': 'str', - 'realised_pnl': 'str', - 'pnl_pnl': 'str', - 'pnl_fund': 'str', - 'pnl_fee': 'str', - 'history_pnl': 'str', - 'last_close_pnl': 'str', - 'realised_point': 'str', - 'history_point': 'str', - 'adl_ranking': 'int', - 'pending_orders': 'int', - 'close_order': 'PositionCloseOrder', - 'mode': 'str', - 'cross_leverage_limit': 'str', - 'update_time': 'int', - 'update_id': 'int', - 'open_time': 'int' - } - - attribute_map = { - 'user': 'user', - 'contract': 'contract', - 'size': 'size', - 'leverage': 'leverage', - 'risk_limit': 'risk_limit', - 'leverage_max': 'leverage_max', - 'maintenance_rate': 'maintenance_rate', - 'value': 'value', - 'margin': 'margin', - 'entry_price': 'entry_price', - 'liq_price': 'liq_price', - 'mark_price': 'mark_price', - 'initial_margin': 'initial_margin', - 'maintenance_margin': 'maintenance_margin', - 'unrealised_pnl': 'unrealised_pnl', - 'realised_pnl': 'realised_pnl', - 'pnl_pnl': 'pnl_pnl', - 'pnl_fund': 'pnl_fund', - 'pnl_fee': 'pnl_fee', - 'history_pnl': 'history_pnl', - 'last_close_pnl': 'last_close_pnl', - 'realised_point': 'realised_point', - 'history_point': 'history_point', - 'adl_ranking': 'adl_ranking', - 'pending_orders': 'pending_orders', - 'close_order': 'close_order', - 'mode': 'mode', - 'cross_leverage_limit': 'cross_leverage_limit', - 'update_time': 'update_time', - 'update_id': 'update_id', - 'open_time': 'open_time' - } - - 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, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, int, int, Configuration) -> None - """Position - a 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 = None - self._contract = None - self._size = None - self._leverage = None - self._risk_limit = None - self._leverage_max = None - self._maintenance_rate = None - self._value = None - self._margin = None - self._entry_price = None - self._liq_price = None - self._mark_price = None - self._initial_margin = None - self._maintenance_margin = None - self._unrealised_pnl = None - self._realised_pnl = None - self._pnl_pnl = None - self._pnl_fund = None - self._pnl_fee = None - self._history_pnl = None - self._last_close_pnl = None - self._realised_point = None - self._history_point = None - self._adl_ranking = None - self._pending_orders = None - self._close_order = None - self._mode = None - self._cross_leverage_limit = None - self._update_time = None - self._update_id = None - self._open_time = None - self.discriminator = None - - if user is not None: - self.user = user - if contract is not None: - self.contract = contract - if size is not None: - self.size = size - if leverage is not None: - self.leverage = leverage - if risk_limit is not None: - self.risk_limit = risk_limit - if leverage_max is not None: - self.leverage_max = leverage_max - if maintenance_rate is not None: - self.maintenance_rate = maintenance_rate - if value is not None: - self.value = value - if margin is not None: - self.margin = margin - 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 initial_margin is not None: - self.initial_margin = initial_margin - if maintenance_margin is not None: - self.maintenance_margin = maintenance_margin - if unrealised_pnl is not None: - self.unrealised_pnl = unrealised_pnl - if realised_pnl is not None: - self.realised_pnl = realised_pnl - if pnl_pnl is not None: - self.pnl_pnl = pnl_pnl - if pnl_fund is not None: - self.pnl_fund = pnl_fund - if pnl_fee is not None: - self.pnl_fee = pnl_fee - if history_pnl is not None: - self.history_pnl = history_pnl - if last_close_pnl is not None: - self.last_close_pnl = last_close_pnl - if realised_point is not None: - self.realised_point = realised_point - if history_point is not None: - self.history_point = history_point - if adl_ranking is not None: - self.adl_ranking = adl_ranking - if pending_orders is not None: - self.pending_orders = pending_orders - self.close_order = close_order - if mode is not None: - self.mode = mode - if cross_leverage_limit is not None: - self.cross_leverage_limit = cross_leverage_limit - if update_time is not None: - self.update_time = update_time - if update_id is not None: - self.update_id = update_id - if open_time is not None: - self.open_time = open_time - - @property - def user(self): - """Gets the user of this Position. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this Position. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this Position. - - User ID # noqa: E501 - - :param user: The user of this Position. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def contract(self): - """Gets the contract of this Position. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this Position. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this Position. - - Futures contract # noqa: E501 - - :param contract: The contract of this Position. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def size(self): - """Gets the size of this Position. # noqa: E501 - - Position size # noqa: E501 - - :return: The size of this Position. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this Position. - - Position size # noqa: E501 - - :param size: The size of this Position. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def leverage(self): - """Gets the leverage of this Position. # noqa: E501 - - Position leverage. 0 means cross margin; positive number means isolated margin # noqa: E501 - - :return: The leverage of this Position. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this Position. - - Position leverage. 0 means cross margin; positive number means isolated margin # noqa: E501 - - :param leverage: The leverage of this Position. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def risk_limit(self): - """Gets the risk_limit of this Position. # noqa: E501 - - Position risk limit # noqa: E501 - - :return: The risk_limit of this Position. # noqa: E501 - :rtype: str - """ - return self._risk_limit - - @risk_limit.setter - def risk_limit(self, risk_limit): - """Sets the risk_limit of this Position. - - Position risk limit # noqa: E501 - - :param risk_limit: The risk_limit of this Position. # noqa: E501 - :type: str - """ - - self._risk_limit = risk_limit - - @property - def leverage_max(self): - """Gets the leverage_max of this Position. # noqa: E501 - - Maximum leverage under current risk limit # noqa: E501 - - :return: The leverage_max of this Position. # noqa: E501 - :rtype: str - """ - return self._leverage_max - - @leverage_max.setter - def leverage_max(self, leverage_max): - """Sets the leverage_max of this Position. - - Maximum leverage under current risk limit # noqa: E501 - - :param leverage_max: The leverage_max of this Position. # noqa: E501 - :type: str - """ - - self._leverage_max = leverage_max - - @property - def maintenance_rate(self): - """Gets the maintenance_rate of this Position. # noqa: E501 - - Maintenance rate under current risk limit # noqa: E501 - - :return: The maintenance_rate of this Position. # noqa: E501 - :rtype: str - """ - return self._maintenance_rate - - @maintenance_rate.setter - def maintenance_rate(self, maintenance_rate): - """Sets the maintenance_rate of this Position. - - Maintenance rate under current risk limit # noqa: E501 - - :param maintenance_rate: The maintenance_rate of this Position. # noqa: E501 - :type: str - """ - - self._maintenance_rate = maintenance_rate - - @property - def value(self): - """Gets the value of this Position. # noqa: E501 - - Position value calculated in settlement currency # noqa: E501 - - :return: The value of this Position. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this Position. - - Position value calculated in settlement currency # noqa: E501 - - :param value: The value of this Position. # noqa: E501 - :type: str - """ - - self._value = value - - @property - def margin(self): - """Gets the margin of this Position. # noqa: E501 - - Position margin # noqa: E501 - - :return: The margin of this Position. # noqa: E501 - :rtype: str - """ - return self._margin - - @margin.setter - def margin(self, margin): - """Sets the margin of this Position. - - Position margin # noqa: E501 - - :param margin: The margin of this Position. # noqa: E501 - :type: str - """ - - self._margin = margin - - @property - def entry_price(self): - """Gets the entry_price of this Position. # noqa: E501 - - Entry price # noqa: E501 - - :return: The entry_price of this Position. # noqa: E501 - :rtype: str - """ - return self._entry_price - - @entry_price.setter - def entry_price(self, entry_price): - """Sets the entry_price of this Position. - - Entry price # noqa: E501 - - :param entry_price: The entry_price of this Position. # noqa: E501 - :type: str - """ - - self._entry_price = entry_price - - @property - def liq_price(self): - """Gets the liq_price of this Position. # noqa: E501 - - Liquidation price # noqa: E501 - - :return: The liq_price of this Position. # noqa: E501 - :rtype: str - """ - return self._liq_price - - @liq_price.setter - def liq_price(self, liq_price): - """Sets the liq_price of this Position. - - Liquidation price # noqa: E501 - - :param liq_price: The liq_price of this Position. # noqa: E501 - :type: str - """ - - self._liq_price = liq_price - - @property - def mark_price(self): - """Gets the mark_price of this Position. # noqa: E501 - - Current mark price # noqa: E501 - - :return: The mark_price of this Position. # noqa: E501 - :rtype: str - """ - return self._mark_price - - @mark_price.setter - def mark_price(self, mark_price): - """Sets the mark_price of this Position. - - Current mark price # noqa: E501 - - :param mark_price: The mark_price of this Position. # noqa: E501 - :type: str - """ - - self._mark_price = mark_price - - @property - def initial_margin(self): - """Gets the initial_margin of this Position. # noqa: E501 - - The initial margin occupied by the position, applicable to the portfolio margin account # noqa: E501 - - :return: The initial_margin of this Position. # noqa: E501 - :rtype: str - """ - return self._initial_margin - - @initial_margin.setter - def initial_margin(self, initial_margin): - """Sets the initial_margin of this Position. - - The initial margin occupied by the position, applicable to the portfolio margin account # noqa: E501 - - :param initial_margin: The initial_margin of this Position. # noqa: E501 - :type: str - """ - - self._initial_margin = initial_margin - - @property - def maintenance_margin(self): - """Gets the maintenance_margin of this Position. # noqa: E501 - - Maintenance margin required for the position, applicable to portfolio margin account # noqa: E501 - - :return: The maintenance_margin of this Position. # noqa: E501 - :rtype: str - """ - return self._maintenance_margin - - @maintenance_margin.setter - def maintenance_margin(self, maintenance_margin): - """Sets the maintenance_margin of this Position. - - Maintenance margin required for the position, applicable to portfolio margin account # noqa: E501 - - :param maintenance_margin: The maintenance_margin of this Position. # noqa: E501 - :type: str - """ - - self._maintenance_margin = maintenance_margin - - @property - def unrealised_pnl(self): - """Gets the unrealised_pnl of this Position. # noqa: E501 - - Unrealized PNL # noqa: E501 - - :return: The unrealised_pnl of this Position. # noqa: E501 - :rtype: str - """ - return self._unrealised_pnl - - @unrealised_pnl.setter - def unrealised_pnl(self, unrealised_pnl): - """Sets the unrealised_pnl of this Position. - - Unrealized PNL # noqa: E501 - - :param unrealised_pnl: The unrealised_pnl of this Position. # noqa: E501 - :type: str - """ - - self._unrealised_pnl = unrealised_pnl - - @property - def realised_pnl(self): - """Gets the realised_pnl of this Position. # noqa: E501 - - Realized PNL # noqa: E501 - - :return: The realised_pnl of this Position. # noqa: E501 - :rtype: str - """ - return self._realised_pnl - - @realised_pnl.setter - def realised_pnl(self, realised_pnl): - """Sets the realised_pnl of this Position. - - Realized PNL # noqa: E501 - - :param realised_pnl: The realised_pnl of this Position. # noqa: E501 - :type: str - """ - - self._realised_pnl = realised_pnl - - @property - def pnl_pnl(self): - """Gets the pnl_pnl of this Position. # noqa: E501 - - Realized PNL - Position P/L # noqa: E501 - - :return: The pnl_pnl of this Position. # noqa: E501 - :rtype: str - """ - return self._pnl_pnl - - @pnl_pnl.setter - def pnl_pnl(self, pnl_pnl): - """Sets the pnl_pnl of this Position. - - Realized PNL - Position P/L # noqa: E501 - - :param pnl_pnl: The pnl_pnl of this Position. # noqa: E501 - :type: str - """ - - self._pnl_pnl = pnl_pnl - - @property - def pnl_fund(self): - """Gets the pnl_fund of this Position. # noqa: E501 - - Realized PNL - Funding Fees # noqa: E501 - - :return: The pnl_fund of this Position. # noqa: E501 - :rtype: str - """ - return self._pnl_fund - - @pnl_fund.setter - def pnl_fund(self, pnl_fund): - """Sets the pnl_fund of this Position. - - Realized PNL - Funding Fees # noqa: E501 - - :param pnl_fund: The pnl_fund of this Position. # noqa: E501 - :type: str - """ - - self._pnl_fund = pnl_fund - - @property - def pnl_fee(self): - """Gets the pnl_fee of this Position. # noqa: E501 - - Realized PNL - Transaction Fees # noqa: E501 - - :return: The pnl_fee of this Position. # noqa: E501 - :rtype: str - """ - return self._pnl_fee - - @pnl_fee.setter - def pnl_fee(self, pnl_fee): - """Sets the pnl_fee of this Position. - - Realized PNL - Transaction Fees # noqa: E501 - - :param pnl_fee: The pnl_fee of this Position. # noqa: E501 - :type: str - """ - - self._pnl_fee = pnl_fee - - @property - def history_pnl(self): - """Gets the history_pnl of this Position. # noqa: E501 - - History realized PNL # noqa: E501 - - :return: The history_pnl of this Position. # noqa: E501 - :rtype: str - """ - return self._history_pnl - - @history_pnl.setter - def history_pnl(self, history_pnl): - """Sets the history_pnl of this Position. - - History realized PNL # noqa: E501 - - :param history_pnl: The history_pnl of this Position. # noqa: E501 - :type: str - """ - - self._history_pnl = history_pnl - - @property - def last_close_pnl(self): - """Gets the last_close_pnl of this Position. # noqa: E501 - - PNL of last position close # noqa: E501 - - :return: The last_close_pnl of this Position. # noqa: E501 - :rtype: str - """ - return self._last_close_pnl - - @last_close_pnl.setter - def last_close_pnl(self, last_close_pnl): - """Sets the last_close_pnl of this Position. - - PNL of last position close # noqa: E501 - - :param last_close_pnl: The last_close_pnl of this Position. # noqa: E501 - :type: str - """ - - self._last_close_pnl = last_close_pnl - - @property - def realised_point(self): - """Gets the realised_point of this Position. # noqa: E501 - - Realized POINT PNL # noqa: E501 - - :return: The realised_point of this Position. # noqa: E501 - :rtype: str - """ - return self._realised_point - - @realised_point.setter - def realised_point(self, realised_point): - """Sets the realised_point of this Position. - - Realized POINT PNL # noqa: E501 - - :param realised_point: The realised_point of this Position. # noqa: E501 - :type: str - """ - - self._realised_point = realised_point - - @property - def history_point(self): - """Gets the history_point of this Position. # noqa: E501 - - History realized POINT PNL # noqa: E501 - - :return: The history_point of this Position. # noqa: E501 - :rtype: str - """ - return self._history_point - - @history_point.setter - def history_point(self, history_point): - """Sets the history_point of this Position. - - History realized POINT PNL # noqa: E501 - - :param history_point: The history_point of this Position. # noqa: E501 - :type: str - """ - - self._history_point = history_point - - @property - def adl_ranking(self): - """Gets the adl_ranking of this Position. # noqa: E501 - - Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation # noqa: E501 - - :return: The adl_ranking of this Position. # noqa: E501 - :rtype: int - """ - return self._adl_ranking - - @adl_ranking.setter - def adl_ranking(self, adl_ranking): - """Sets the adl_ranking of this Position. - - Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation # noqa: E501 - - :param adl_ranking: The adl_ranking of this Position. # noqa: E501 - :type: int - """ - - self._adl_ranking = adl_ranking - - @property - def pending_orders(self): - """Gets the pending_orders of this Position. # noqa: E501 - - Current open orders # noqa: E501 - - :return: The pending_orders of this Position. # noqa: E501 - :rtype: int - """ - return self._pending_orders - - @pending_orders.setter - def pending_orders(self, pending_orders): - """Sets the pending_orders of this Position. - - Current open orders # noqa: E501 - - :param pending_orders: The pending_orders of this Position. # noqa: E501 - :type: int - """ - - self._pending_orders = pending_orders - - @property - def close_order(self): - """Gets the close_order of this Position. # noqa: E501 - - - :return: The close_order of this Position. # noqa: E501 - :rtype: PositionCloseOrder - """ - return self._close_order - - @close_order.setter - def close_order(self, close_order): - """Sets the close_order of this Position. - - - :param close_order: The close_order of this Position. # noqa: E501 - :type: PositionCloseOrder - """ - - self._close_order = close_order - - @property - def mode(self): - """Gets the mode of this Position. # noqa: E501 - - Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501 - - :return: The mode of this Position. # noqa: E501 - :rtype: str - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this Position. - - Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501 - - :param mode: The mode of this Position. # noqa: E501 - :type: str - """ - allowed_values = ["single", "dual_long", "dual_short"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and mode not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `mode` ({0}), must be one of {1}" # noqa: E501 - .format(mode, allowed_values) - ) - - self._mode = mode - - @property - def cross_leverage_limit(self): - """Gets the cross_leverage_limit of this Position. # noqa: E501 - - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 - - :return: The cross_leverage_limit of this Position. # noqa: E501 - :rtype: str - """ - return self._cross_leverage_limit - - @cross_leverage_limit.setter - def cross_leverage_limit(self, cross_leverage_limit): - """Sets the cross_leverage_limit of this Position. - - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 - - :param cross_leverage_limit: The cross_leverage_limit of this Position. # noqa: E501 - :type: str - """ - - self._cross_leverage_limit = cross_leverage_limit - - @property - def update_time(self): - """Gets the update_time of this Position. # noqa: E501 - - Last update time # noqa: E501 - - :return: The update_time of this Position. # noqa: E501 - :rtype: int - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this Position. - - Last update time # noqa: E501 - - :param update_time: The update_time of this Position. # noqa: E501 - :type: int - """ - - self._update_time = update_time - - @property - def update_id(self): - """Gets the update_id of this Position. # noqa: E501 - - Update id. Each time the position is updated, the value will be +1. # noqa: E501 - - :return: The update_id of this Position. # noqa: E501 - :rtype: int - """ - return self._update_id - - @update_id.setter - def update_id(self, update_id): - """Sets the update_id of this Position. - - Update id. Each time the position is updated, the value will be +1. # noqa: E501 - - :param update_id: The update_id of this Position. # noqa: E501 - :type: int - """ - - self._update_id = update_id - - @property - def open_time(self): - """Gets the open_time of this Position. # noqa: E501 - - First Open Time # noqa: E501 - - :return: The open_time of this Position. # noqa: E501 - :rtype: int - """ - return self._open_time - - @open_time.setter - def open_time(self, open_time): - """Sets the open_time of this Position. - - First Open Time # noqa: E501 - - :param open_time: The open_time of this Position. # noqa: E501 - :type: int - """ - - self._open_time = open_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Position): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Position): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py deleted file mode 100644 index cdca838..0000000 --- a/gate_api/models/position_close.py +++ /dev/null @@ -1,465 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PositionClose(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'float', - 'contract': 'str', - 'side': 'str', - 'pnl': 'str', - 'pnl_pnl': 'str', - 'pnl_fund': 'str', - 'pnl_fee': 'str', - 'text': 'str', - 'max_size': 'str', - 'accum_size': 'str', - 'first_open_time': 'int', - 'long_price': 'str', - 'short_price': 'str' - } - - attribute_map = { - 'time': 'time', - 'contract': 'contract', - 'side': 'side', - 'pnl': 'pnl', - 'pnl_pnl': 'pnl_pnl', - 'pnl_fund': 'pnl_fund', - 'pnl_fee': 'pnl_fee', - 'text': 'text', - 'max_size': 'max_size', - 'accum_size': 'accum_size', - 'first_open_time': 'first_open_time', - 'long_price': 'long_price', - 'short_price': 'short_price' - } - - def __init__(self, time=None, contract=None, side=None, pnl=None, pnl_pnl=None, pnl_fund=None, pnl_fee=None, text=None, max_size=None, accum_size=None, first_open_time=None, long_price=None, short_price=None, local_vars_configuration=None): # noqa: E501 - # type: (float, str, str, str, str, str, str, str, str, str, int, str, str, Configuration) -> None - """PositionClose - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._contract = None - self._side = None - self._pnl = None - self._pnl_pnl = None - self._pnl_fund = None - self._pnl_fee = None - self._text = None - self._max_size = None - self._accum_size = None - self._first_open_time = None - self._long_price = None - self._short_price = None - self.discriminator = None - - if time is not None: - self.time = time - if contract is not None: - self.contract = contract - if side is not None: - self.side = side - if pnl is not None: - self.pnl = pnl - if pnl_pnl is not None: - self.pnl_pnl = pnl_pnl - if pnl_fund is not None: - self.pnl_fund = pnl_fund - if pnl_fee is not None: - self.pnl_fee = pnl_fee - if text is not None: - self.text = text - if max_size is not None: - self.max_size = max_size - if accum_size is not None: - self.accum_size = accum_size - if first_open_time is not None: - self.first_open_time = first_open_time - if long_price is not None: - self.long_price = long_price - if short_price is not None: - self.short_price = short_price - - @property - def time(self): - """Gets the time of this PositionClose. # noqa: E501 - - Position close time # noqa: E501 - - :return: The time of this PositionClose. # noqa: E501 - :rtype: float - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this PositionClose. - - Position close time # noqa: E501 - - :param time: The time of this PositionClose. # noqa: E501 - :type: float - """ - - self._time = time - - @property - def contract(self): - """Gets the contract of this PositionClose. # noqa: E501 - - Futures contract # noqa: E501 - - :return: The contract of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._contract - - @contract.setter - def contract(self, contract): - """Sets the contract of this PositionClose. - - Futures contract # noqa: E501 - - :param contract: The contract of this PositionClose. # noqa: E501 - :type: str - """ - - self._contract = contract - - @property - def side(self): - """Gets the side of this PositionClose. # noqa: E501 - - Position side, long or short # noqa: E501 - - :return: The side of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this PositionClose. - - Position side, long or short # noqa: E501 - - :param side: The side of this PositionClose. # noqa: E501 - :type: str - """ - allowed_values = ["long", "short"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501 - .format(side, allowed_values) - ) - - self._side = side - - @property - def pnl(self): - """Gets the pnl of this PositionClose. # noqa: E501 - - PNL # noqa: E501 - - :return: The pnl of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._pnl - - @pnl.setter - def pnl(self, pnl): - """Sets the pnl of this PositionClose. - - PNL # noqa: E501 - - :param pnl: The pnl of this PositionClose. # noqa: E501 - :type: str - """ - - self._pnl = pnl - - @property - def pnl_pnl(self): - """Gets the pnl_pnl of this PositionClose. # noqa: E501 - - PNL - Position P/L # noqa: E501 - - :return: The pnl_pnl of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._pnl_pnl - - @pnl_pnl.setter - def pnl_pnl(self, pnl_pnl): - """Sets the pnl_pnl of this PositionClose. - - PNL - Position P/L # noqa: E501 - - :param pnl_pnl: The pnl_pnl of this PositionClose. # noqa: E501 - :type: str - """ - - self._pnl_pnl = pnl_pnl - - @property - def pnl_fund(self): - """Gets the pnl_fund of this PositionClose. # noqa: E501 - - PNL - Funding Fees # noqa: E501 - - :return: The pnl_fund of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._pnl_fund - - @pnl_fund.setter - def pnl_fund(self, pnl_fund): - """Sets the pnl_fund of this PositionClose. - - PNL - Funding Fees # noqa: E501 - - :param pnl_fund: The pnl_fund of this PositionClose. # noqa: E501 - :type: str - """ - - self._pnl_fund = pnl_fund - - @property - def pnl_fee(self): - """Gets the pnl_fee of this PositionClose. # noqa: E501 - - PNL - Transaction Fees # noqa: E501 - - :return: The pnl_fee of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._pnl_fee - - @pnl_fee.setter - def pnl_fee(self, pnl_fee): - """Sets the pnl_fee of this PositionClose. - - PNL - Transaction Fees # noqa: E501 - - :param pnl_fee: The pnl_fee of this PositionClose. # noqa: E501 - :type: str - """ - - self._pnl_fee = pnl_fee - - @property - def text(self): - """Gets the text of this PositionClose. # noqa: E501 - - Text of close order # noqa: E501 - - :return: The text of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this PositionClose. - - Text of close order # noqa: E501 - - :param text: The text of this PositionClose. # noqa: E501 - :type: str - """ - - self._text = text - - @property - def max_size(self): - """Gets the max_size of this PositionClose. # noqa: E501 - - Max Trade Size # noqa: E501 - - :return: The max_size of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._max_size - - @max_size.setter - def max_size(self, max_size): - """Sets the max_size of this PositionClose. - - Max Trade Size # noqa: E501 - - :param max_size: The max_size of this PositionClose. # noqa: E501 - :type: str - """ - - self._max_size = max_size - - @property - def accum_size(self): - """Gets the accum_size of this PositionClose. # noqa: E501 - - Cumulative closed position volume # noqa: E501 - - :return: The accum_size of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._accum_size - - @accum_size.setter - def accum_size(self, accum_size): - """Sets the accum_size of this PositionClose. - - Cumulative closed position volume # noqa: E501 - - :param accum_size: The accum_size of this PositionClose. # noqa: E501 - :type: str - """ - - self._accum_size = accum_size - - @property - def first_open_time(self): - """Gets the first_open_time of this PositionClose. # noqa: E501 - - First Open Time # noqa: E501 - - :return: The first_open_time of this PositionClose. # noqa: E501 - :rtype: int - """ - return self._first_open_time - - @first_open_time.setter - def first_open_time(self, first_open_time): - """Sets the first_open_time of this PositionClose. - - First Open Time # noqa: E501 - - :param first_open_time: The first_open_time of this PositionClose. # noqa: E501 - :type: int - """ - - self._first_open_time = first_open_time - - @property - def long_price(self): - """Gets the long_price of this PositionClose. # noqa: E501 - - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. # noqa: E501 - - :return: The long_price of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._long_price - - @long_price.setter - def long_price(self, long_price): - """Sets the long_price of this PositionClose. - - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. # noqa: E501 - - :param long_price: The long_price of this PositionClose. # noqa: E501 - :type: str - """ - - self._long_price = long_price - - @property - def short_price(self): - """Gets the short_price of this PositionClose. # noqa: E501 - - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price # noqa: E501 - - :return: The short_price of this PositionClose. # noqa: E501 - :rtype: str - """ - return self._short_price - - @short_price.setter - def short_price(self, short_price): - """Sets the short_price of this PositionClose. - - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price # noqa: E501 - - :param short_price: The short_price of this PositionClose. # noqa: E501 - :type: str - """ - - self._short_price = short_price - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PositionClose): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PositionClose): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py deleted file mode 100644 index c4a4bd3..0000000 --- a/gate_api/models/position_close_order.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PositionCloseOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'price': 'str', - 'is_liq': 'bool' - } - - attribute_map = { - 'id': 'id', - 'price': 'price', - 'is_liq': 'is_liq' - } - - def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, bool, Configuration) -> None - """PositionCloseOrder - a 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._price = None - self._is_liq = None - self.discriminator = None - - if id is not None: - self.id = id - if price is not None: - self.price = price - if is_liq is not None: - self.is_liq = is_liq - - @property - def id(self): - """Gets the id of this PositionCloseOrder. # noqa: E501 - - Close order ID # noqa: E501 - - :return: The id of this PositionCloseOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this PositionCloseOrder. - - Close order ID # noqa: E501 - - :param id: The id of this PositionCloseOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def price(self): - """Gets the price of this PositionCloseOrder. # noqa: E501 - - Close order price # noqa: E501 - - :return: The price of this PositionCloseOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this PositionCloseOrder. - - Close order price # noqa: E501 - - :param price: The price of this PositionCloseOrder. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def is_liq(self): - """Gets the is_liq of this PositionCloseOrder. # noqa: E501 - - Is the close order from liquidation # noqa: E501 - - :return: The is_liq of this PositionCloseOrder. # noqa: E501 - :rtype: bool - """ - return self._is_liq - - @is_liq.setter - def is_liq(self, is_liq): - """Sets the is_liq of this PositionCloseOrder. - - Is the close order from liquidation # noqa: E501 - - :param is_liq: The is_liq of this PositionCloseOrder. # noqa: E501 - :type: bool - """ - - self._is_liq = is_liq - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PositionCloseOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PositionCloseOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py deleted file mode 100644 index d433429..0000000 --- a/gate_api/models/profit_loss_range.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class ProfitLossRange(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'price_percentage': 'str', - 'implied_volatility_percentage': 'str', - 'profit_loss': 'str' - } - - attribute_map = { - 'price_percentage': 'price_percentage', - 'implied_volatility_percentage': 'implied_volatility_percentage', - 'profit_loss': 'profit_loss' - } - - def __init__(self, price_percentage=None, implied_volatility_percentage=None, profit_loss=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, Configuration) -> None - """ProfitLossRange - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._price_percentage = None - self._implied_volatility_percentage = None - self._profit_loss = None - self.discriminator = None - - if price_percentage is not None: - self.price_percentage = price_percentage - if implied_volatility_percentage is not None: - self.implied_volatility_percentage = implied_volatility_percentage - if profit_loss is not None: - self.profit_loss = profit_loss - - @property - def price_percentage(self): - """Gets the price_percentage of this ProfitLossRange. # noqa: E501 - - Percentage change in price # noqa: E501 - - :return: The price_percentage of this ProfitLossRange. # noqa: E501 - :rtype: str - """ - return self._price_percentage - - @price_percentage.setter - def price_percentage(self, price_percentage): - """Sets the price_percentage of this ProfitLossRange. - - Percentage change in price # noqa: E501 - - :param price_percentage: The price_percentage of this ProfitLossRange. # noqa: E501 - :type: str - """ - - self._price_percentage = price_percentage - - @property - def implied_volatility_percentage(self): - """Gets the implied_volatility_percentage of this ProfitLossRange. # noqa: E501 - - Percentage change in implied volatility # noqa: E501 - - :return: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 - :rtype: str - """ - return self._implied_volatility_percentage - - @implied_volatility_percentage.setter - def implied_volatility_percentage(self, implied_volatility_percentage): - """Sets the implied_volatility_percentage of this ProfitLossRange. - - Percentage change in implied volatility # noqa: E501 - - :param implied_volatility_percentage: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 - :type: str - """ - - self._implied_volatility_percentage = implied_volatility_percentage - - @property - def profit_loss(self): - """Gets the profit_loss of this ProfitLossRange. # noqa: E501 - - PNL # noqa: E501 - - :return: The profit_loss of this ProfitLossRange. # noqa: E501 - :rtype: str - """ - return self._profit_loss - - @profit_loss.setter - def profit_loss(self, profit_loss): - """Sets the profit_loss of this ProfitLossRange. - - PNL # noqa: E501 - - :param profit_loss: The profit_loss of this ProfitLossRange. # noqa: E501 - :type: str - """ - - self._profit_loss = profit_loss - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ProfitLossRange): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ProfitLossRange): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py deleted file mode 100644 index 44680a5..0000000 --- a/gate_api/models/rebate_user_info.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RebateUserInfo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'invite_uid': 'int' - } - - attribute_map = { - 'invite_uid': 'invite_uid' - } - - def __init__(self, invite_uid=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """RebateUserInfo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._invite_uid = None - self.discriminator = None - - if invite_uid is not None: - self.invite_uid = invite_uid - - @property - def invite_uid(self): - """Gets the invite_uid of this RebateUserInfo. # noqa: E501 - - My inviter's UID # noqa: E501 - - :return: The invite_uid of this RebateUserInfo. # noqa: E501 - :rtype: int - """ - return self._invite_uid - - @invite_uid.setter - def invite_uid(self, invite_uid): - """Sets the invite_uid of this RebateUserInfo. - - My inviter's UID # noqa: E501 - - :param invite_uid: The invite_uid of this RebateUserInfo. # noqa: E501 - :type: int - """ - - self._invite_uid = invite_uid - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RebateUserInfo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RebateUserInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py deleted file mode 100644 index e1d0c9d..0000000 --- a/gate_api/models/repay_currency_res.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayCurrencyRes(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'succeeded': 'bool', - 'label': 'str', - 'message': 'str', - 'currency': 'str', - 'repaid_principal': 'str', - 'repaid_interest': 'str' - } - - attribute_map = { - 'succeeded': 'succeeded', - 'label': 'label', - 'message': 'message', - 'currency': 'currency', - 'repaid_principal': 'repaid_principal', - 'repaid_interest': 'repaid_interest' - } - - def __init__(self, succeeded=None, label=None, message=None, currency=None, repaid_principal=None, repaid_interest=None, local_vars_configuration=None): # noqa: E501 - # type: (bool, str, str, str, str, str, Configuration) -> None - """RepayCurrencyRes - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._succeeded = None - self._label = None - self._message = None - self._currency = None - self._repaid_principal = None - self._repaid_interest = None - self.discriminator = None - - if succeeded is not None: - self.succeeded = succeeded - if label is not None: - self.label = label - if message is not None: - self.message = message - if currency is not None: - self.currency = currency - if repaid_principal is not None: - self.repaid_principal = repaid_principal - if repaid_interest is not None: - self.repaid_interest = repaid_interest - - @property - def succeeded(self): - """Gets the succeeded of this RepayCurrencyRes. # noqa: E501 - - Has the repayment been successful # noqa: E501 - - :return: The succeeded of this RepayCurrencyRes. # noqa: E501 - :rtype: bool - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this RepayCurrencyRes. - - Has the repayment been successful # noqa: E501 - - :param succeeded: The succeeded of this RepayCurrencyRes. # noqa: E501 - :type: bool - """ - - self._succeeded = succeeded - - @property - def label(self): - """Gets the label of this RepayCurrencyRes. # noqa: E501 - - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 - - :return: The label of this RepayCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this RepayCurrencyRes. - - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 - - :param label: The label of this RepayCurrencyRes. # noqa: E501 - :type: str - """ - - self._label = label - - @property - def message(self): - """Gets the message of this RepayCurrencyRes. # noqa: E501 - - Error description in case of operation failure; empty when successful. # noqa: E501 - - :return: The message of this RepayCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this RepayCurrencyRes. - - Error description in case of operation failure; empty when successful. # noqa: E501 - - :param message: The message of this RepayCurrencyRes. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def currency(self): - """Gets the currency of this RepayCurrencyRes. # noqa: E501 - - Repayment currency # noqa: E501 - - :return: The currency of this RepayCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this RepayCurrencyRes. - - Repayment currency # noqa: E501 - - :param currency: The currency of this RepayCurrencyRes. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def repaid_principal(self): - """Gets the repaid_principal of this RepayCurrencyRes. # noqa: E501 - - Principal # noqa: E501 - - :return: The repaid_principal of this RepayCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._repaid_principal - - @repaid_principal.setter - def repaid_principal(self, repaid_principal): - """Sets the repaid_principal of this RepayCurrencyRes. - - Principal # noqa: E501 - - :param repaid_principal: The repaid_principal of this RepayCurrencyRes. # noqa: E501 - :type: str - """ - - self._repaid_principal = repaid_principal - - @property - def repaid_interest(self): - """Gets the repaid_interest of this RepayCurrencyRes. # noqa: E501 - - Principal # noqa: E501 - - :return: The repaid_interest of this RepayCurrencyRes. # noqa: E501 - :rtype: str - """ - return self._repaid_interest - - @repaid_interest.setter - def repaid_interest(self, repaid_interest): - """Sets the repaid_interest of this RepayCurrencyRes. - - Principal # noqa: E501 - - :param repaid_interest: The repaid_interest of this RepayCurrencyRes. # noqa: E501 - :type: str - """ - - self._repaid_interest = repaid_interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayCurrencyRes): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayCurrencyRes): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py deleted file mode 100644 index b60f41e..0000000 --- a/gate_api/models/repay_loan.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayLoan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'repay_amount': 'str', - 'repaid_all': 'bool' - } - - attribute_map = { - 'order_id': 'order_id', - 'repay_amount': 'repay_amount', - 'repaid_all': 'repaid_all' - } - - def __init__(self, order_id=None, repay_amount=None, repaid_all=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, bool, Configuration) -> None - """RepayLoan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._repay_amount = None - self._repaid_all = None - self.discriminator = None - - self.order_id = order_id - self.repay_amount = repay_amount - self.repaid_all = repaid_all - - @property - def order_id(self): - """Gets the order_id of this RepayLoan. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this RepayLoan. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this RepayLoan. - - Order ID # noqa: E501 - - :param order_id: The order_id of this RepayLoan. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 - raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 - - self._order_id = order_id - - @property - def repay_amount(self): - """Gets the repay_amount of this RepayLoan. # noqa: E501 - - Repayment amount, it is mandatory when making partial repayments # noqa: E501 - - :return: The repay_amount of this RepayLoan. # noqa: E501 - :rtype: str - """ - return self._repay_amount - - @repay_amount.setter - def repay_amount(self, repay_amount): - """Sets the repay_amount of this RepayLoan. - - Repayment amount, it is mandatory when making partial repayments # noqa: E501 - - :param repay_amount: The repay_amount of this RepayLoan. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and repay_amount is None: # noqa: E501 - raise ValueError("Invalid value for `repay_amount`, must not be `None`") # noqa: E501 - - self._repay_amount = repay_amount - - @property - def repaid_all(self): - """Gets the repaid_all of this RepayLoan. # noqa: E501 - - Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 - - :return: The repaid_all of this RepayLoan. # noqa: E501 - :rtype: bool - """ - return self._repaid_all - - @repaid_all.setter - def repaid_all(self, repaid_all): - """Sets the repaid_all of this RepayLoan. - - Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 - - :param repaid_all: The repaid_all of this RepayLoan. # noqa: E501 - :type: bool - """ - if self.local_vars_configuration.client_side_validation and repaid_all is None: # noqa: E501 - raise ValueError("Invalid value for `repaid_all`, must not be `None`") # noqa: E501 - - self._repaid_all = repaid_all - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayLoan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayLoan): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py deleted file mode 100644 index 086aee9..0000000 --- a/gate_api/models/repay_multi_loan.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayMultiLoan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'repay_items': 'list[MultiLoanRepayItem]' - } - - attribute_map = { - 'order_id': 'order_id', - 'repay_items': 'repay_items' - } - - def __init__(self, order_id=None, repay_items=None, local_vars_configuration=None): # noqa: E501 - # type: (int, list[MultiLoanRepayItem], Configuration) -> None - """RepayMultiLoan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._repay_items = None - self.discriminator = None - - self.order_id = order_id - self.repay_items = repay_items - - @property - def order_id(self): - """Gets the order_id of this RepayMultiLoan. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this RepayMultiLoan. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this RepayMultiLoan. - - Order ID # noqa: E501 - - :param order_id: The order_id of this RepayMultiLoan. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 - raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 - - self._order_id = order_id - - @property - def repay_items(self): - """Gets the repay_items of this RepayMultiLoan. # noqa: E501 - - Repay Currency Item # noqa: E501 - - :return: The repay_items of this RepayMultiLoan. # noqa: E501 - :rtype: list[MultiLoanRepayItem] - """ - return self._repay_items - - @repay_items.setter - def repay_items(self, repay_items): - """Sets the repay_items of this RepayMultiLoan. - - Repay Currency Item # noqa: E501 - - :param repay_items: The repay_items of this RepayMultiLoan. # noqa: E501 - :type: list[MultiLoanRepayItem] - """ - if self.local_vars_configuration.client_side_validation and repay_items is None: # noqa: E501 - raise ValueError("Invalid value for `repay_items`, must not be `None`") # noqa: E501 - - self._repay_items = repay_items - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayMultiLoan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayMultiLoan): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py deleted file mode 100644 index 048d0e8..0000000 --- a/gate_api/models/repay_record.py +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'int', - 'record_id': 'int', - 'repaid_amount': 'str', - 'borrow_currency': 'str', - 'collateral_currency': 'str', - 'init_ltv': 'str', - 'borrow_time': 'int', - 'repay_time': 'int', - 'total_interest': 'str', - 'before_left_principal': 'str', - 'after_left_principal': 'str', - 'before_left_collateral': 'str', - 'after_left_collateral': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'record_id': 'record_id', - 'repaid_amount': 'repaid_amount', - 'borrow_currency': 'borrow_currency', - 'collateral_currency': 'collateral_currency', - 'init_ltv': 'init_ltv', - 'borrow_time': 'borrow_time', - 'repay_time': 'repay_time', - 'total_interest': 'total_interest', - 'before_left_principal': 'before_left_principal', - 'after_left_principal': 'after_left_principal', - 'before_left_collateral': 'before_left_collateral', - 'after_left_collateral': 'after_left_collateral' - } - - def __init__(self, order_id=None, record_id=None, repaid_amount=None, borrow_currency=None, collateral_currency=None, init_ltv=None, borrow_time=None, repay_time=None, total_interest=None, before_left_principal=None, after_left_principal=None, before_left_collateral=None, after_left_collateral=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, int, int, str, str, str, str, str, Configuration) -> None - """RepayRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._record_id = None - self._repaid_amount = None - self._borrow_currency = None - self._collateral_currency = None - self._init_ltv = None - self._borrow_time = None - self._repay_time = None - self._total_interest = None - self._before_left_principal = None - self._after_left_principal = None - self._before_left_collateral = None - self._after_left_collateral = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if record_id is not None: - self.record_id = record_id - if repaid_amount is not None: - self.repaid_amount = repaid_amount - if borrow_currency is not None: - self.borrow_currency = borrow_currency - if collateral_currency is not None: - self.collateral_currency = collateral_currency - if init_ltv is not None: - self.init_ltv = init_ltv - if borrow_time is not None: - self.borrow_time = borrow_time - if repay_time is not None: - self.repay_time = repay_time - if total_interest is not None: - self.total_interest = total_interest - if before_left_principal is not None: - self.before_left_principal = before_left_principal - if after_left_principal is not None: - self.after_left_principal = after_left_principal - if before_left_collateral is not None: - self.before_left_collateral = before_left_collateral - if after_left_collateral is not None: - self.after_left_collateral = after_left_collateral - - @property - def order_id(self): - """Gets the order_id of this RepayRecord. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this RepayRecord. # noqa: E501 - :rtype: int - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this RepayRecord. - - Order ID # noqa: E501 - - :param order_id: The order_id of this RepayRecord. # noqa: E501 - :type: int - """ - - self._order_id = order_id - - @property - def record_id(self): - """Gets the record_id of this RepayRecord. # noqa: E501 - - Repayment record ID # noqa: E501 - - :return: The record_id of this RepayRecord. # noqa: E501 - :rtype: int - """ - return self._record_id - - @record_id.setter - def record_id(self, record_id): - """Sets the record_id of this RepayRecord. - - Repayment record ID # noqa: E501 - - :param record_id: The record_id of this RepayRecord. # noqa: E501 - :type: int - """ - - self._record_id = record_id - - @property - def repaid_amount(self): - """Gets the repaid_amount of this RepayRecord. # noqa: E501 - - Repayment amount # noqa: E501 - - :return: The repaid_amount of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._repaid_amount - - @repaid_amount.setter - def repaid_amount(self, repaid_amount): - """Sets the repaid_amount of this RepayRecord. - - Repayment amount # noqa: E501 - - :param repaid_amount: The repaid_amount of this RepayRecord. # noqa: E501 - :type: str - """ - - self._repaid_amount = repaid_amount - - @property - def borrow_currency(self): - """Gets the borrow_currency of this RepayRecord. # noqa: E501 - - Borrowed currency # noqa: E501 - - :return: The borrow_currency of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._borrow_currency - - @borrow_currency.setter - def borrow_currency(self, borrow_currency): - """Sets the borrow_currency of this RepayRecord. - - Borrowed currency # noqa: E501 - - :param borrow_currency: The borrow_currency of this RepayRecord. # noqa: E501 - :type: str - """ - - self._borrow_currency = borrow_currency - - @property - def collateral_currency(self): - """Gets the collateral_currency of this RepayRecord. # noqa: E501 - - Collateral # noqa: E501 - - :return: The collateral_currency of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._collateral_currency - - @collateral_currency.setter - def collateral_currency(self, collateral_currency): - """Sets the collateral_currency of this RepayRecord. - - Collateral # noqa: E501 - - :param collateral_currency: The collateral_currency of this RepayRecord. # noqa: E501 - :type: str - """ - - self._collateral_currency = collateral_currency - - @property - def init_ltv(self): - """Gets the init_ltv of this RepayRecord. # noqa: E501 - - The initial collateralization rate # noqa: E501 - - :return: The init_ltv of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._init_ltv - - @init_ltv.setter - def init_ltv(self, init_ltv): - """Sets the init_ltv of this RepayRecord. - - The initial collateralization rate # noqa: E501 - - :param init_ltv: The init_ltv of this RepayRecord. # noqa: E501 - :type: str - """ - - self._init_ltv = init_ltv - - @property - def borrow_time(self): - """Gets the borrow_time of this RepayRecord. # noqa: E501 - - Borrowing time, timestamp # noqa: E501 - - :return: The borrow_time of this RepayRecord. # noqa: E501 - :rtype: int - """ - return self._borrow_time - - @borrow_time.setter - def borrow_time(self, borrow_time): - """Sets the borrow_time of this RepayRecord. - - Borrowing time, timestamp # noqa: E501 - - :param borrow_time: The borrow_time of this RepayRecord. # noqa: E501 - :type: int - """ - - self._borrow_time = borrow_time - - @property - def repay_time(self): - """Gets the repay_time of this RepayRecord. # noqa: E501 - - Repayment time, timestamp # noqa: E501 - - :return: The repay_time of this RepayRecord. # noqa: E501 - :rtype: int - """ - return self._repay_time - - @repay_time.setter - def repay_time(self, repay_time): - """Sets the repay_time of this RepayRecord. - - Repayment time, timestamp # noqa: E501 - - :param repay_time: The repay_time of this RepayRecord. # noqa: E501 - :type: int - """ - - self._repay_time = repay_time - - @property - def total_interest(self): - """Gets the total_interest of this RepayRecord. # noqa: E501 - - Total interest # noqa: E501 - - :return: The total_interest of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._total_interest - - @total_interest.setter - def total_interest(self, total_interest): - """Sets the total_interest of this RepayRecord. - - Total interest # noqa: E501 - - :param total_interest: The total_interest of this RepayRecord. # noqa: E501 - :type: str - """ - - self._total_interest = total_interest - - @property - def before_left_principal(self): - """Gets the before_left_principal of this RepayRecord. # noqa: E501 - - Principal to be repaid before repayment # noqa: E501 - - :return: The before_left_principal of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._before_left_principal - - @before_left_principal.setter - def before_left_principal(self, before_left_principal): - """Sets the before_left_principal of this RepayRecord. - - Principal to be repaid before repayment # noqa: E501 - - :param before_left_principal: The before_left_principal of this RepayRecord. # noqa: E501 - :type: str - """ - - self._before_left_principal = before_left_principal - - @property - def after_left_principal(self): - """Gets the after_left_principal of this RepayRecord. # noqa: E501 - - Principal to be repaid after repayment # noqa: E501 - - :return: The after_left_principal of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._after_left_principal - - @after_left_principal.setter - def after_left_principal(self, after_left_principal): - """Sets the after_left_principal of this RepayRecord. - - Principal to be repaid after repayment # noqa: E501 - - :param after_left_principal: The after_left_principal of this RepayRecord. # noqa: E501 - :type: str - """ - - self._after_left_principal = after_left_principal - - @property - def before_left_collateral(self): - """Gets the before_left_collateral of this RepayRecord. # noqa: E501 - - Collateral quantity before repayment # noqa: E501 - - :return: The before_left_collateral of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._before_left_collateral - - @before_left_collateral.setter - def before_left_collateral(self, before_left_collateral): - """Sets the before_left_collateral of this RepayRecord. - - Collateral quantity before repayment # noqa: E501 - - :param before_left_collateral: The before_left_collateral of this RepayRecord. # noqa: E501 - :type: str - """ - - self._before_left_collateral = before_left_collateral - - @property - def after_left_collateral(self): - """Gets the after_left_collateral of this RepayRecord. # noqa: E501 - - Collateral quantity after repayment # noqa: E501 - - :return: The after_left_collateral of this RepayRecord. # noqa: E501 - :rtype: str - """ - return self._after_left_collateral - - @after_left_collateral.setter - def after_left_collateral(self, after_left_collateral): - """Sets the after_left_collateral of this RepayRecord. - - Collateral quantity after repayment # noqa: E501 - - :param after_left_collateral: The after_left_collateral of this RepayRecord. # noqa: E501 - :type: str - """ - - self._after_left_collateral = after_left_collateral - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py deleted file mode 100644 index 7e78118..0000000 --- a/gate_api/models/repay_record_currency.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayRecordCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'before_amount': 'str', - 'before_amount_usdt': 'str', - 'after_amount': 'str', - 'after_amount_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'before_amount': 'before_amount', - 'before_amount_usdt': 'before_amount_usdt', - 'after_amount': 'after_amount', - 'after_amount_usdt': 'after_amount_usdt' - } - - def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """RepayRecordCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._before_amount = None - self._before_amount_usdt = None - self._after_amount = None - self._after_amount_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if before_amount is not None: - self.before_amount = before_amount - if before_amount_usdt is not None: - self.before_amount_usdt = before_amount_usdt - if after_amount is not None: - self.after_amount = after_amount - if after_amount_usdt is not None: - self.after_amount_usdt = after_amount_usdt - - @property - def currency(self): - """Gets the currency of this RepayRecordCurrency. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this RepayRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this RepayRecordCurrency. - - Currency # noqa: E501 - - :param currency: The currency of this RepayRecordCurrency. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this RepayRecordCurrency. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this RepayRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this RepayRecordCurrency. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this RepayRecordCurrency. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def before_amount(self): - """Gets the before_amount of this RepayRecordCurrency. # noqa: E501 - - Amount before the operation # noqa: E501 - - :return: The before_amount of this RepayRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._before_amount - - @before_amount.setter - def before_amount(self, before_amount): - """Sets the before_amount of this RepayRecordCurrency. - - Amount before the operation # noqa: E501 - - :param before_amount: The before_amount of this RepayRecordCurrency. # noqa: E501 - :type: str - """ - - self._before_amount = before_amount - - @property - def before_amount_usdt(self): - """Gets the before_amount_usdt of this RepayRecordCurrency. # noqa: E501 - - USDT Amount before the operation. # noqa: E501 - - :return: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._before_amount_usdt - - @before_amount_usdt.setter - def before_amount_usdt(self, before_amount_usdt): - """Sets the before_amount_usdt of this RepayRecordCurrency. - - USDT Amount before the operation. # noqa: E501 - - :param before_amount_usdt: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501 - :type: str - """ - - self._before_amount_usdt = before_amount_usdt - - @property - def after_amount(self): - """Gets the after_amount of this RepayRecordCurrency. # noqa: E501 - - Amount after the operation. # noqa: E501 - - :return: The after_amount of this RepayRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._after_amount - - @after_amount.setter - def after_amount(self, after_amount): - """Sets the after_amount of this RepayRecordCurrency. - - Amount after the operation. # noqa: E501 - - :param after_amount: The after_amount of this RepayRecordCurrency. # noqa: E501 - :type: str - """ - - self._after_amount = after_amount - - @property - def after_amount_usdt(self): - """Gets the after_amount_usdt of this RepayRecordCurrency. # noqa: E501 - - USDT Amount after the operation. # noqa: E501 - - :return: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501 - :rtype: str - """ - return self._after_amount_usdt - - @after_amount_usdt.setter - def after_amount_usdt(self, after_amount_usdt): - """Sets the after_amount_usdt of this RepayRecordCurrency. - - USDT Amount after the operation. # noqa: E501 - - :param after_amount_usdt: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501 - :type: str - """ - - self._after_amount_usdt = after_amount_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayRecordCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayRecordCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py deleted file mode 100644 index ee3603e..0000000 --- a/gate_api/models/repay_record_left_interest.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayRecordLeftInterest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'before_amount': 'str', - 'before_amount_usdt': 'str', - 'after_amount': 'str', - 'after_amount_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'before_amount': 'before_amount', - 'before_amount_usdt': 'before_amount_usdt', - 'after_amount': 'after_amount', - 'after_amount_usdt': 'after_amount_usdt' - } - - def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """RepayRecordLeftInterest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._before_amount = None - self._before_amount_usdt = None - self._after_amount = None - self._after_amount_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if before_amount is not None: - self.before_amount = before_amount - if before_amount_usdt is not None: - self.before_amount_usdt = before_amount_usdt - if after_amount is not None: - self.after_amount = after_amount - if after_amount_usdt is not None: - self.after_amount_usdt = after_amount_usdt - - @property - def currency(self): - """Gets the currency of this RepayRecordLeftInterest. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this RepayRecordLeftInterest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this RepayRecordLeftInterest. - - Currency # noqa: E501 - - :param currency: The currency of this RepayRecordLeftInterest. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this RepayRecordLeftInterest. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this RepayRecordLeftInterest. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this RepayRecordLeftInterest. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this RepayRecordLeftInterest. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def before_amount(self): - """Gets the before_amount of this RepayRecordLeftInterest. # noqa: E501 - - Interest amount before repayment # noqa: E501 - - :return: The before_amount of this RepayRecordLeftInterest. # noqa: E501 - :rtype: str - """ - return self._before_amount - - @before_amount.setter - def before_amount(self, before_amount): - """Sets the before_amount of this RepayRecordLeftInterest. - - Interest amount before repayment # noqa: E501 - - :param before_amount: The before_amount of this RepayRecordLeftInterest. # noqa: E501 - :type: str - """ - - self._before_amount = before_amount - - @property - def before_amount_usdt(self): - """Gets the before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - - Converted value of interest before repayment in USDT # noqa: E501 - - :return: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - :rtype: str - """ - return self._before_amount_usdt - - @before_amount_usdt.setter - def before_amount_usdt(self, before_amount_usdt): - """Sets the before_amount_usdt of this RepayRecordLeftInterest. - - Converted value of interest before repayment in USDT # noqa: E501 - - :param before_amount_usdt: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - :type: str - """ - - self._before_amount_usdt = before_amount_usdt - - @property - def after_amount(self): - """Gets the after_amount of this RepayRecordLeftInterest. # noqa: E501 - - Interest amount after repayment # noqa: E501 - - :return: The after_amount of this RepayRecordLeftInterest. # noqa: E501 - :rtype: str - """ - return self._after_amount - - @after_amount.setter - def after_amount(self, after_amount): - """Sets the after_amount of this RepayRecordLeftInterest. - - Interest amount after repayment # noqa: E501 - - :param after_amount: The after_amount of this RepayRecordLeftInterest. # noqa: E501 - :type: str - """ - - self._after_amount = after_amount - - @property - def after_amount_usdt(self): - """Gets the after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - - Converted value of interest after repayment in USDT # noqa: E501 - - :return: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - :rtype: str - """ - return self._after_amount_usdt - - @after_amount_usdt.setter - def after_amount_usdt(self, after_amount_usdt): - """Sets the after_amount_usdt of this RepayRecordLeftInterest. - - Converted value of interest after repayment in USDT # noqa: E501 - - :param after_amount_usdt: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - :type: str - """ - - self._after_amount_usdt = after_amount_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayRecordLeftInterest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayRecordLeftInterest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py deleted file mode 100644 index e9283cb..0000000 --- a/gate_api/models/repay_record_repaid_currency.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayRecordRepaidCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'repaid_amount': 'str', - 'repaid_principal': 'str', - 'repaid_interest': 'str', - 'repaid_amount_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'repaid_amount': 'repaid_amount', - 'repaid_principal': 'repaid_principal', - 'repaid_interest': 'repaid_interest', - 'repaid_amount_usdt': 'repaid_amount_usdt' - } - - def __init__(self, currency=None, index_price=None, repaid_amount=None, repaid_principal=None, repaid_interest=None, repaid_amount_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """RepayRecordRepaidCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._repaid_amount = None - self._repaid_principal = None - self._repaid_interest = None - self._repaid_amount_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if repaid_amount is not None: - self.repaid_amount = repaid_amount - if repaid_principal is not None: - self.repaid_principal = repaid_principal - if repaid_interest is not None: - self.repaid_interest = repaid_interest - if repaid_amount_usdt is not None: - self.repaid_amount_usdt = repaid_amount_usdt - - @property - def currency(self): - """Gets the currency of this RepayRecordRepaidCurrency. # noqa: E501 - - Repayment currency # noqa: E501 - - :return: The currency of this RepayRecordRepaidCurrency. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this RepayRecordRepaidCurrency. - - Repayment currency # noqa: E501 - - :param currency: The currency of this RepayRecordRepaidCurrency. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this RepayRecordRepaidCurrency. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this RepayRecordRepaidCurrency. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def repaid_amount(self): - """Gets the repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 - - Repayment amount # noqa: E501 - - :return: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 - :rtype: str - """ - return self._repaid_amount - - @repaid_amount.setter - def repaid_amount(self, repaid_amount): - """Sets the repaid_amount of this RepayRecordRepaidCurrency. - - Repayment amount # noqa: E501 - - :param repaid_amount: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 - :type: str - """ - - self._repaid_amount = repaid_amount - - @property - def repaid_principal(self): - """Gets the repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 - - Principal # noqa: E501 - - :return: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 - :rtype: str - """ - return self._repaid_principal - - @repaid_principal.setter - def repaid_principal(self, repaid_principal): - """Sets the repaid_principal of this RepayRecordRepaidCurrency. - - Principal # noqa: E501 - - :param repaid_principal: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 - :type: str - """ - - self._repaid_principal = repaid_principal - - @property - def repaid_interest(self): - """Gets the repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 - - Interest # noqa: E501 - - :return: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 - :rtype: str - """ - return self._repaid_interest - - @repaid_interest.setter - def repaid_interest(self, repaid_interest): - """Sets the repaid_interest of this RepayRecordRepaidCurrency. - - Interest # noqa: E501 - - :param repaid_interest: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 - :type: str - """ - - self._repaid_interest = repaid_interest - - @property - def repaid_amount_usdt(self): - """Gets the repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 - - Value of the repayment amount in USDT # noqa: E501 - - :return: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 - :rtype: str - """ - return self._repaid_amount_usdt - - @repaid_amount_usdt.setter - def repaid_amount_usdt(self, repaid_amount_usdt): - """Sets the repaid_amount_usdt of this RepayRecordRepaidCurrency. - - Value of the repayment amount in USDT # noqa: E501 - - :param repaid_amount_usdt: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 - :type: str - """ - - self._repaid_amount_usdt = repaid_amount_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayRecordRepaidCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayRecordRepaidCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py deleted file mode 100644 index 96e8c21..0000000 --- a/gate_api/models/repay_record_total_interest.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayRecordTotalInterest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'index_price': 'str', - 'amount': 'str', - 'amount_usdt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'index_price': 'index_price', - 'amount': 'amount', - 'amount_usdt': 'amount_usdt' - } - - def __init__(self, currency=None, index_price=None, amount=None, amount_usdt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """RepayRecordTotalInterest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._index_price = None - self._amount = None - self._amount_usdt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if index_price is not None: - self.index_price = index_price - if amount is not None: - self.amount = amount - if amount_usdt is not None: - self.amount_usdt = amount_usdt - - @property - def currency(self): - """Gets the currency of this RepayRecordTotalInterest. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this RepayRecordTotalInterest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this RepayRecordTotalInterest. - - Currency # noqa: E501 - - :param currency: The currency of this RepayRecordTotalInterest. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def index_price(self): - """Gets the index_price of this RepayRecordTotalInterest. # noqa: E501 - - Currency Index Price # noqa: E501 - - :return: The index_price of this RepayRecordTotalInterest. # noqa: E501 - :rtype: str - """ - return self._index_price - - @index_price.setter - def index_price(self, index_price): - """Sets the index_price of this RepayRecordTotalInterest. - - Currency Index Price # noqa: E501 - - :param index_price: The index_price of this RepayRecordTotalInterest. # noqa: E501 - :type: str - """ - - self._index_price = index_price - - @property - def amount(self): - """Gets the amount of this RepayRecordTotalInterest. # noqa: E501 - - Interest Amount # noqa: E501 - - :return: The amount of this RepayRecordTotalInterest. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this RepayRecordTotalInterest. - - Interest Amount # noqa: E501 - - :param amount: The amount of this RepayRecordTotalInterest. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def amount_usdt(self): - """Gets the amount_usdt of this RepayRecordTotalInterest. # noqa: E501 - - Interest amount converted to USDT # noqa: E501 - - :return: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 - :rtype: str - """ - return self._amount_usdt - - @amount_usdt.setter - def amount_usdt(self, amount_usdt): - """Sets the amount_usdt of this RepayRecordTotalInterest. - - Interest amount converted to USDT # noqa: E501 - - :param amount_usdt: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 - :type: str - """ - - self._amount_usdt = amount_usdt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayRecordTotalInterest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayRecordTotalInterest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py deleted file mode 100644 index 498e604..0000000 --- a/gate_api/models/repay_resp.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RepayResp(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'repaid_principal': 'str', - 'repaid_interest': 'str' - } - - attribute_map = { - 'repaid_principal': 'repaid_principal', - 'repaid_interest': 'repaid_interest' - } - - def __init__(self, repaid_principal=None, repaid_interest=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """RepayResp - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._repaid_principal = None - self._repaid_interest = None - self.discriminator = None - - if repaid_principal is not None: - self.repaid_principal = repaid_principal - if repaid_interest is not None: - self.repaid_interest = repaid_interest - - @property - def repaid_principal(self): - """Gets the repaid_principal of this RepayResp. # noqa: E501 - - Principal # noqa: E501 - - :return: The repaid_principal of this RepayResp. # noqa: E501 - :rtype: str - """ - return self._repaid_principal - - @repaid_principal.setter - def repaid_principal(self, repaid_principal): - """Sets the repaid_principal of this RepayResp. - - Principal # noqa: E501 - - :param repaid_principal: The repaid_principal of this RepayResp. # noqa: E501 - :type: str - """ - - self._repaid_principal = repaid_principal - - @property - def repaid_interest(self): - """Gets the repaid_interest of this RepayResp. # noqa: E501 - - Interest # noqa: E501 - - :return: The repaid_interest of this RepayResp. # noqa: E501 - :rtype: str - """ - return self._repaid_interest - - @repaid_interest.setter - def repaid_interest(self, repaid_interest): - """Sets the repaid_interest of this RepayResp. - - Interest # noqa: E501 - - :param repaid_interest: The repaid_interest of this RepayResp. # noqa: E501 - :type: str - """ - - self._repaid_interest = repaid_interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RepayResp): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RepayResp): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py deleted file mode 100644 index 041184a..0000000 --- a/gate_api/models/risk_units.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class RiskUnits(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'symbol': 'str', - 'spot_in_use': 'str', - 'maintain_margin': 'str', - 'initial_margin': 'str', - 'delta': 'str', - 'gamma': 'str', - 'theta': 'str', - 'vega': 'str' - } - - attribute_map = { - 'symbol': 'symbol', - 'spot_in_use': 'spot_in_use', - 'maintain_margin': 'maintain_margin', - 'initial_margin': 'initial_margin', - 'delta': 'delta', - 'gamma': 'gamma', - 'theta': 'theta', - 'vega': 'vega' - } - - def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_margin=None, delta=None, gamma=None, theta=None, vega=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, Configuration) -> None - """RiskUnits - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._symbol = None - self._spot_in_use = None - self._maintain_margin = None - self._initial_margin = None - self._delta = None - self._gamma = None - self._theta = None - self._vega = None - self.discriminator = None - - if symbol is not None: - self.symbol = symbol - if spot_in_use is not None: - self.spot_in_use = spot_in_use - if maintain_margin is not None: - self.maintain_margin = maintain_margin - if initial_margin is not None: - self.initial_margin = initial_margin - if delta is not None: - self.delta = delta - if gamma is not None: - self.gamma = gamma - if theta is not None: - self.theta = theta - if vega is not None: - self.vega = vega - - @property - def symbol(self): - """Gets the symbol of this RiskUnits. # noqa: E501 - - Risk unit flag # noqa: E501 - - :return: The symbol of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._symbol - - @symbol.setter - def symbol(self, symbol): - """Sets the symbol of this RiskUnits. - - Risk unit flag # noqa: E501 - - :param symbol: The symbol of this RiskUnits. # noqa: E501 - :type: str - """ - - self._symbol = symbol - - @property - def spot_in_use(self): - """Gets the spot_in_use of this RiskUnits. # noqa: E501 - - Spot hedging utilization # noqa: E501 - - :return: The spot_in_use of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._spot_in_use - - @spot_in_use.setter - def spot_in_use(self, spot_in_use): - """Sets the spot_in_use of this RiskUnits. - - Spot hedging utilization # noqa: E501 - - :param spot_in_use: The spot_in_use of this RiskUnits. # noqa: E501 - :type: str - """ - - self._spot_in_use = spot_in_use - - @property - def maintain_margin(self): - """Gets the maintain_margin of this RiskUnits. # noqa: E501 - - Maintenance margin for risk unit # noqa: E501 - - :return: The maintain_margin of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._maintain_margin - - @maintain_margin.setter - def maintain_margin(self, maintain_margin): - """Sets the maintain_margin of this RiskUnits. - - Maintenance margin for risk unit # noqa: E501 - - :param maintain_margin: The maintain_margin of this RiskUnits. # noqa: E501 - :type: str - """ - - self._maintain_margin = maintain_margin - - @property - def initial_margin(self): - """Gets the initial_margin of this RiskUnits. # noqa: E501 - - Initial margin for risk unit # noqa: E501 - - :return: The initial_margin of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._initial_margin - - @initial_margin.setter - def initial_margin(self, initial_margin): - """Sets the initial_margin of this RiskUnits. - - Initial margin for risk unit # noqa: E501 - - :param initial_margin: The initial_margin of this RiskUnits. # noqa: E501 - :type: str - """ - - self._initial_margin = initial_margin - - @property - def delta(self): - """Gets the delta of this RiskUnits. # noqa: E501 - - Total Delta of risk unit # noqa: E501 - - :return: The delta of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._delta - - @delta.setter - def delta(self, delta): - """Sets the delta of this RiskUnits. - - Total Delta of risk unit # noqa: E501 - - :param delta: The delta of this RiskUnits. # noqa: E501 - :type: str - """ - - self._delta = delta - - @property - def gamma(self): - """Gets the gamma of this RiskUnits. # noqa: E501 - - Total Gamma of risk unit # noqa: E501 - - :return: The gamma of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._gamma - - @gamma.setter - def gamma(self, gamma): - """Sets the gamma of this RiskUnits. - - Total Gamma of risk unit # noqa: E501 - - :param gamma: The gamma of this RiskUnits. # noqa: E501 - :type: str - """ - - self._gamma = gamma - - @property - def theta(self): - """Gets the theta of this RiskUnits. # noqa: E501 - - Total Theta of risk unit # noqa: E501 - - :return: The theta of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._theta - - @theta.setter - def theta(self, theta): - """Sets the theta of this RiskUnits. - - Total Theta of risk unit # noqa: E501 - - :param theta: The theta of this RiskUnits. # noqa: E501 - :type: str - """ - - self._theta = theta - - @property - def vega(self): - """Gets the vega of this RiskUnits. # noqa: E501 - - Total Vega of risk unit # noqa: E501 - - :return: The vega of this RiskUnits. # noqa: E501 - :rtype: str - """ - return self._vega - - @vega.setter - def vega(self, vega): - """Sets the vega of this RiskUnits. - - Total Vega of risk unit # noqa: E501 - - :param vega: The vega of this RiskUnits. # noqa: E501 - :type: str - """ - - self._vega = vega - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RiskUnits): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RiskUnits): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py deleted file mode 100644 index e5abe91..0000000 --- a/gate_api/models/saved_address.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SavedAddress(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'chain': 'str', - 'address': 'str', - 'name': 'str', - 'tag': 'str', - 'verified': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'chain': 'chain', - 'address': 'address', - 'name': 'name', - 'tag': 'tag', - 'verified': 'verified' - } - - def __init__(self, currency=None, chain=None, address=None, name=None, tag=None, verified=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """SavedAddress - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._chain = None - self._address = None - self._name = None - self._tag = None - self._verified = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if chain is not None: - self.chain = chain - if address is not None: - self.address = address - if name is not None: - self.name = name - if tag is not None: - self.tag = tag - if verified is not None: - self.verified = verified - - @property - def currency(self): - """Gets the currency of this SavedAddress. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this SavedAddress. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SavedAddress. - - Currency # noqa: E501 - - :param currency: The currency of this SavedAddress. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def chain(self): - """Gets the chain of this SavedAddress. # noqa: E501 - - Chain name # noqa: E501 - - :return: The chain of this SavedAddress. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this SavedAddress. - - Chain name # noqa: E501 - - :param chain: The chain of this SavedAddress. # noqa: E501 - :type: str - """ - - self._chain = chain - - @property - def address(self): - """Gets the address of this SavedAddress. # noqa: E501 - - Address # noqa: E501 - - :return: The address of this SavedAddress. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this SavedAddress. - - Address # noqa: E501 - - :param address: The address of this SavedAddress. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def name(self): - """Gets the name of this SavedAddress. # noqa: E501 - - Name # noqa: E501 - - :return: The name of this SavedAddress. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SavedAddress. - - Name # noqa: E501 - - :param name: The name of this SavedAddress. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def tag(self): - """Gets the tag of this SavedAddress. # noqa: E501 - - Tag # noqa: E501 - - :return: The tag of this SavedAddress. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this SavedAddress. - - Tag # noqa: E501 - - :param tag: The tag of this SavedAddress. # noqa: E501 - :type: str - """ - - self._tag = tag - - @property - def verified(self): - """Gets the verified of this SavedAddress. # noqa: E501 - - Whether to pass the verification 0-unverified, 1-verified # noqa: E501 - - :return: The verified of this SavedAddress. # noqa: E501 - :rtype: str - """ - return self._verified - - @verified.setter - def verified(self, verified): - """Sets the verified of this SavedAddress. - - Whether to pass the verification 0-unverified, 1-verified # noqa: E501 - - :param verified: The verified of this SavedAddress. # noqa: E501 - :type: str - """ - - self._verified = verified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SavedAddress): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SavedAddress): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py deleted file mode 100644 index 3aa0ec8..0000000 --- a/gate_api/models/small_balance.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SmallBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'available_balance': 'str', - 'estimated_as_btc': 'str', - 'convertible_to_gt': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'available_balance': 'available_balance', - 'estimated_as_btc': 'estimated_as_btc', - 'convertible_to_gt': 'convertible_to_gt' - } - - def __init__(self, currency=None, available_balance=None, estimated_as_btc=None, convertible_to_gt=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """SmallBalance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._available_balance = None - self._estimated_as_btc = None - self._convertible_to_gt = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if available_balance is not None: - self.available_balance = available_balance - if estimated_as_btc is not None: - self.estimated_as_btc = estimated_as_btc - if convertible_to_gt is not None: - self.convertible_to_gt = convertible_to_gt - - @property - def currency(self): - """Gets the currency of this SmallBalance. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this SmallBalance. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SmallBalance. - - Currency # noqa: E501 - - :param currency: The currency of this SmallBalance. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def available_balance(self): - """Gets the available_balance of this SmallBalance. # noqa: E501 - - Available balance # noqa: E501 - - :return: The available_balance of this SmallBalance. # noqa: E501 - :rtype: str - """ - return self._available_balance - - @available_balance.setter - def available_balance(self, available_balance): - """Sets the available_balance of this SmallBalance. - - Available balance # noqa: E501 - - :param available_balance: The available_balance of this SmallBalance. # noqa: E501 - :type: str - """ - - self._available_balance = available_balance - - @property - def estimated_as_btc(self): - """Gets the estimated_as_btc of this SmallBalance. # noqa: E501 - - Estimated as BTC # noqa: E501 - - :return: The estimated_as_btc of this SmallBalance. # noqa: E501 - :rtype: str - """ - return self._estimated_as_btc - - @estimated_as_btc.setter - def estimated_as_btc(self, estimated_as_btc): - """Sets the estimated_as_btc of this SmallBalance. - - Estimated as BTC # noqa: E501 - - :param estimated_as_btc: The estimated_as_btc of this SmallBalance. # noqa: E501 - :type: str - """ - - self._estimated_as_btc = estimated_as_btc - - @property - def convertible_to_gt(self): - """Gets the convertible_to_gt of this SmallBalance. # noqa: E501 - - Estimated conversion to GT # noqa: E501 - - :return: The convertible_to_gt of this SmallBalance. # noqa: E501 - :rtype: str - """ - return self._convertible_to_gt - - @convertible_to_gt.setter - def convertible_to_gt(self, convertible_to_gt): - """Sets the convertible_to_gt of this SmallBalance. - - Estimated conversion to GT # noqa: E501 - - :param convertible_to_gt: The convertible_to_gt of this SmallBalance. # noqa: E501 - :type: str - """ - - self._convertible_to_gt = convertible_to_gt - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SmallBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SmallBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py deleted file mode 100644 index d770b75..0000000 --- a/gate_api/models/small_balance_history.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SmallBalanceHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'currency': 'str', - 'amount': 'str', - 'gt_amount': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'id': 'id', - 'currency': 'currency', - 'amount': 'amount', - 'gt_amount': 'gt_amount', - 'create_time': 'create_time' - } - - def __init__(self, id=None, currency=None, amount=None, gt_amount=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, Configuration) -> None - """SmallBalanceHistory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._currency = None - self._amount = None - self._gt_amount = None - self._create_time = None - self.discriminator = None - - if id is not None: - self.id = id - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - if gt_amount is not None: - self.gt_amount = gt_amount - if create_time is not None: - self.create_time = create_time - - @property - def id(self): - """Gets the id of this SmallBalanceHistory. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this SmallBalanceHistory. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SmallBalanceHistory. - - Order ID # noqa: E501 - - :param id: The id of this SmallBalanceHistory. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def currency(self): - """Gets the currency of this SmallBalanceHistory. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this SmallBalanceHistory. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SmallBalanceHistory. - - Currency # noqa: E501 - - :param currency: The currency of this SmallBalanceHistory. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this SmallBalanceHistory. # noqa: E501 - - amount # noqa: E501 - - :return: The amount of this SmallBalanceHistory. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this SmallBalanceHistory. - - amount # noqa: E501 - - :param amount: The amount of this SmallBalanceHistory. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def gt_amount(self): - """Gets the gt_amount of this SmallBalanceHistory. # noqa: E501 - - GT amount # noqa: E501 - - :return: The gt_amount of this SmallBalanceHistory. # noqa: E501 - :rtype: str - """ - return self._gt_amount - - @gt_amount.setter - def gt_amount(self, gt_amount): - """Sets the gt_amount of this SmallBalanceHistory. - - GT amount # noqa: E501 - - :param gt_amount: The gt_amount of this SmallBalanceHistory. # noqa: E501 - :type: str - """ - - self._gt_amount = gt_amount - - @property - def create_time(self): - """Gets the create_time of this SmallBalanceHistory. # noqa: E501 - - Exchange time (in seconds) # noqa: E501 - - :return: The create_time of this SmallBalanceHistory. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this SmallBalanceHistory. - - Exchange time (in seconds) # noqa: E501 - - :param create_time: The create_time of this SmallBalanceHistory. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SmallBalanceHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SmallBalanceHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py deleted file mode 100644 index 0c86114..0000000 --- a/gate_api/models/spot_account.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class 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_account_book.py b/gate_api/models/spot_account_book.py deleted file mode 100644 index 4dea7cd..0000000 --- a/gate_api/models/spot_account_book.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SpotAccountBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'time': 'int', - 'currency': 'str', - 'change': 'str', - 'balance': 'str', - 'type': 'str', - 'code': 'str', - 'text': 'str' - } - - attribute_map = { - 'id': 'id', - 'time': 'time', - 'currency': 'currency', - 'change': 'change', - 'balance': 'balance', - 'type': 'type', - 'code': 'code', - 'text': 'text' - } - - def __init__(self, id=None, time=None, currency=None, change=None, balance=None, type=None, code=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, str, str, str, str, str, Configuration) -> None - """SpotAccountBook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._time = None - self._currency = None - self._change = None - self._balance = None - self._type = None - self._code = None - self._text = None - self.discriminator = None - - if id is not None: - self.id = id - if time is not None: - self.time = time - if currency is not None: - self.currency = currency - if change is not None: - self.change = change - if balance is not None: - self.balance = balance - if type is not None: - self.type = type - if code is not None: - self.code = code - if text is not None: - self.text = text - - @property - def id(self): - """Gets the id of this SpotAccountBook. # noqa: E501 - - Balance change record ID # noqa: E501 - - :return: The id of this SpotAccountBook. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SpotAccountBook. - - Balance change record ID # noqa: E501 - - :param id: The id of this SpotAccountBook. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def time(self): - """Gets the time of this SpotAccountBook. # noqa: E501 - - The timestamp of the change (in milliseconds) # noqa: E501 - - :return: The time of this SpotAccountBook. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this SpotAccountBook. - - The timestamp of the change (in milliseconds) # noqa: E501 - - :param time: The time of this SpotAccountBook. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def currency(self): - """Gets the currency of this SpotAccountBook. # noqa: E501 - - Currency changed # noqa: E501 - - :return: The currency of this SpotAccountBook. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SpotAccountBook. - - Currency changed # noqa: E501 - - :param currency: The currency of this SpotAccountBook. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def change(self): - """Gets the change of this SpotAccountBook. # noqa: E501 - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :return: The change of this SpotAccountBook. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this SpotAccountBook. - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :param change: The change of this SpotAccountBook. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def balance(self): - """Gets the balance of this SpotAccountBook. # noqa: E501 - - Balance after change # noqa: E501 - - :return: The balance of this SpotAccountBook. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this SpotAccountBook. - - Balance after change # noqa: E501 - - :param balance: The balance of this SpotAccountBook. # noqa: E501 - :type: str - """ - - self._balance = balance - - @property - def type(self): - """Gets the type of this SpotAccountBook. # noqa: E501 - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :return: The type of this SpotAccountBook. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this SpotAccountBook. - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :param type: The type of this SpotAccountBook. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def code(self): - """Gets the code of this SpotAccountBook. # noqa: E501 - - Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 - - :return: The code of this SpotAccountBook. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this SpotAccountBook. - - Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 - - :param code: The code of this SpotAccountBook. # noqa: E501 - :type: str - """ - - self._code = code - - @property - def text(self): - """Gets the text of this SpotAccountBook. # noqa: E501 - - Additional information # noqa: E501 - - :return: The text of this SpotAccountBook. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this SpotAccountBook. - - Additional information # noqa: E501 - - :param text: The text of this SpotAccountBook. # noqa: E501 - :type: str - """ - - self._text = text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotAccountBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotAccountBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py deleted file mode 100644 index 7e9773b..0000000 --- a/gate_api/models/spot_currency_chain.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SpotCurrencyChain(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'addr': 'str', - 'withdraw_disabled': 'bool', - 'withdraw_delayed': 'bool', - 'deposit_disabled': 'bool' - } - - attribute_map = { - 'name': 'name', - 'addr': 'addr', - 'withdraw_disabled': 'withdraw_disabled', - 'withdraw_delayed': 'withdraw_delayed', - 'deposit_disabled': 'deposit_disabled' - } - - def __init__(self, name=None, addr=None, withdraw_disabled=None, withdraw_delayed=None, deposit_disabled=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, bool, bool, bool, Configuration) -> None - """SpotCurrencyChain - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._addr = None - self._withdraw_disabled = None - self._withdraw_delayed = None - self._deposit_disabled = None - self.discriminator = None - - if name is not None: - self.name = name - if addr is not None: - self.addr = addr - if withdraw_disabled is not None: - self.withdraw_disabled = withdraw_disabled - if withdraw_delayed is not None: - self.withdraw_delayed = withdraw_delayed - if deposit_disabled is not None: - self.deposit_disabled = deposit_disabled - - @property - def name(self): - """Gets the name of this SpotCurrencyChain. # noqa: E501 - - Chain name # noqa: E501 - - :return: The name of this SpotCurrencyChain. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SpotCurrencyChain. - - Chain name # noqa: E501 - - :param name: The name of this SpotCurrencyChain. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def addr(self): - """Gets the addr of this SpotCurrencyChain. # noqa: E501 - - token address # noqa: E501 - - :return: The addr of this SpotCurrencyChain. # noqa: E501 - :rtype: str - """ - return self._addr - - @addr.setter - def addr(self, addr): - """Sets the addr of this SpotCurrencyChain. - - token address # noqa: E501 - - :param addr: The addr of this SpotCurrencyChain. # noqa: E501 - :type: str - """ - - self._addr = addr - - @property - def withdraw_disabled(self): - """Gets the withdraw_disabled of this SpotCurrencyChain. # noqa: E501 - - Whether currency's withdrawal is disabled # noqa: E501 - - :return: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 - :rtype: bool - """ - return self._withdraw_disabled - - @withdraw_disabled.setter - def withdraw_disabled(self, withdraw_disabled): - """Sets the withdraw_disabled of this SpotCurrencyChain. - - Whether currency's withdrawal is disabled # noqa: E501 - - :param withdraw_disabled: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 - :type: bool - """ - - self._withdraw_disabled = withdraw_disabled - - @property - def withdraw_delayed(self): - """Gets the withdraw_delayed of this SpotCurrencyChain. # noqa: E501 - - Whether currency's withdrawal is delayed # noqa: E501 - - :return: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 - :rtype: bool - """ - return self._withdraw_delayed - - @withdraw_delayed.setter - def withdraw_delayed(self, withdraw_delayed): - """Sets the withdraw_delayed of this SpotCurrencyChain. - - Whether currency's withdrawal is delayed # noqa: E501 - - :param withdraw_delayed: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 - :type: bool - """ - - self._withdraw_delayed = withdraw_delayed - - @property - def deposit_disabled(self): - """Gets the deposit_disabled of this SpotCurrencyChain. # noqa: E501 - - Whether currency's deposit is disabled # noqa: E501 - - :return: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 - :rtype: bool - """ - return self._deposit_disabled - - @deposit_disabled.setter - def deposit_disabled(self, deposit_disabled): - """Sets the deposit_disabled of this SpotCurrencyChain. - - Whether currency's deposit is disabled # noqa: E501 - - :param deposit_disabled: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 - :type: bool - """ - - self._deposit_disabled = deposit_disabled - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotCurrencyChain): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotCurrencyChain): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py deleted file mode 100644 index 9f0308b..0000000 --- a/gate_api/models/spot_fee.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SpotFee(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'taker_fee': 'str', - 'maker_fee': 'str', - 'gt_discount': 'bool', - 'gt_taker_fee': 'str', - 'gt_maker_fee': 'str', - 'loan_fee': 'str', - 'point_type': 'str', - 'currency_pair': 'str', - 'debit_fee': 'int' - } - - attribute_map = { - 'user_id': 'user_id', - 'taker_fee': 'taker_fee', - 'maker_fee': 'maker_fee', - 'gt_discount': 'gt_discount', - 'gt_taker_fee': 'gt_taker_fee', - 'gt_maker_fee': 'gt_maker_fee', - 'loan_fee': 'loan_fee', - 'point_type': 'point_type', - 'currency_pair': 'currency_pair', - 'debit_fee': 'debit_fee' - } - - def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=None, gt_taker_fee=None, gt_maker_fee=None, loan_fee=None, point_type=None, currency_pair=None, debit_fee=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, bool, str, str, str, str, str, int, Configuration) -> None - """SpotFee - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._taker_fee = None - self._maker_fee = None - self._gt_discount = None - self._gt_taker_fee = None - self._gt_maker_fee = None - self._loan_fee = None - self._point_type = None - self._currency_pair = None - self._debit_fee = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if taker_fee is not None: - self.taker_fee = taker_fee - if maker_fee is not None: - self.maker_fee = maker_fee - if gt_discount is not None: - self.gt_discount = gt_discount - if gt_taker_fee is not None: - self.gt_taker_fee = gt_taker_fee - if gt_maker_fee is not None: - self.gt_maker_fee = gt_maker_fee - if loan_fee is not None: - self.loan_fee = loan_fee - if point_type is not None: - self.point_type = point_type - if currency_pair is not None: - self.currency_pair = currency_pair - if debit_fee is not None: - self.debit_fee = debit_fee - - @property - def user_id(self): - """Gets the user_id of this SpotFee. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this SpotFee. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this SpotFee. - - User ID # noqa: E501 - - :param user_id: The user_id of this SpotFee. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def taker_fee(self): - """Gets the taker_fee of this SpotFee. # noqa: E501 - - taker fee rate # noqa: E501 - - :return: The taker_fee of this SpotFee. # noqa: E501 - :rtype: str - """ - return self._taker_fee - - @taker_fee.setter - def taker_fee(self, taker_fee): - """Sets the taker_fee of this SpotFee. - - taker fee rate # noqa: E501 - - :param taker_fee: The taker_fee of this SpotFee. # noqa: E501 - :type: str - """ - - self._taker_fee = taker_fee - - @property - def maker_fee(self): - """Gets the maker_fee of this SpotFee. # noqa: E501 - - maker fee rate # noqa: E501 - - :return: The maker_fee of this SpotFee. # noqa: E501 - :rtype: str - """ - return self._maker_fee - - @maker_fee.setter - def maker_fee(self, maker_fee): - """Sets the maker_fee of this SpotFee. - - maker fee rate # noqa: E501 - - :param maker_fee: The maker_fee of this SpotFee. # noqa: E501 - :type: str - """ - - self._maker_fee = maker_fee - - @property - def gt_discount(self): - """Gets the gt_discount of this SpotFee. # noqa: E501 - - If GT deduction is enabled # noqa: E501 - - :return: The gt_discount of this SpotFee. # noqa: E501 - :rtype: bool - """ - return self._gt_discount - - @gt_discount.setter - def gt_discount(self, gt_discount): - """Sets the gt_discount of this SpotFee. - - If GT deduction is enabled # noqa: E501 - - :param gt_discount: The gt_discount of this SpotFee. # noqa: E501 - :type: bool - """ - - self._gt_discount = gt_discount - - @property - def gt_taker_fee(self): - """Gets the gt_taker_fee of this SpotFee. # noqa: E501 - - Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :return: The gt_taker_fee of this SpotFee. # noqa: E501 - :rtype: str - """ - return self._gt_taker_fee - - @gt_taker_fee.setter - def gt_taker_fee(self, gt_taker_fee): - """Sets the gt_taker_fee of this SpotFee. - - Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :param gt_taker_fee: The gt_taker_fee of this SpotFee. # noqa: E501 - :type: str - """ - - self._gt_taker_fee = gt_taker_fee - - @property - def gt_maker_fee(self): - """Gets the gt_maker_fee of this SpotFee. # noqa: E501 - - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :return: The gt_maker_fee of this SpotFee. # noqa: E501 - :rtype: str - """ - return self._gt_maker_fee - - @gt_maker_fee.setter - def gt_maker_fee(self, gt_maker_fee): - """Sets the gt_maker_fee of this SpotFee. - - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :param gt_maker_fee: The gt_maker_fee of this SpotFee. # noqa: E501 - :type: str - """ - - self._gt_maker_fee = gt_maker_fee - - @property - def loan_fee(self): - """Gets the loan_fee of this SpotFee. # noqa: E501 - - Loan fee rate of margin lending # noqa: E501 - - :return: The loan_fee of this SpotFee. # noqa: E501 - :rtype: str - """ - return self._loan_fee - - @loan_fee.setter - def loan_fee(self, loan_fee): - """Sets the loan_fee of this SpotFee. - - Loan fee rate of margin lending # noqa: E501 - - :param loan_fee: The loan_fee of this SpotFee. # noqa: E501 - :type: str - """ - - self._loan_fee = loan_fee - - @property - def point_type(self): - """Gets the point_type of this SpotFee. # noqa: E501 - - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 - - :return: The point_type of this SpotFee. # noqa: E501 - :rtype: str - """ - return self._point_type - - @point_type.setter - def point_type(self, point_type): - """Sets the point_type of this SpotFee. - - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 - - :param point_type: The point_type of this SpotFee. # noqa: E501 - :type: str - """ - - self._point_type = point_type - - @property - def currency_pair(self): - """Gets the currency_pair of this SpotFee. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this SpotFee. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this SpotFee. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this SpotFee. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def debit_fee(self): - """Gets the debit_fee of this SpotFee. # noqa: E501 - - Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 - - :return: The debit_fee of this SpotFee. # noqa: E501 - :rtype: int - """ - return self._debit_fee - - @debit_fee.setter - def debit_fee(self, debit_fee): - """Sets the debit_fee of this SpotFee. - - Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 - - :param debit_fee: The debit_fee of this SpotFee. # noqa: E501 - :type: int - """ - - self._debit_fee = debit_fee - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotFee): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotFee): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py deleted file mode 100644 index 8f6d141..0000000 --- a/gate_api/models/spot_insurance_history.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SpotInsuranceHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'balance': 'str', - 'time': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'balance': 'balance', - 'time': 'time' - } - - def __init__(self, currency=None, balance=None, time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, int, Configuration) -> None - """SpotInsuranceHistory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._balance = None - self._time = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if balance is not None: - self.balance = balance - if time is not None: - self.time = time - - @property - def currency(self): - """Gets the currency of this SpotInsuranceHistory. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this SpotInsuranceHistory. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SpotInsuranceHistory. - - Currency # noqa: E501 - - :param currency: The currency of this SpotInsuranceHistory. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def balance(self): - """Gets the balance of this SpotInsuranceHistory. # noqa: E501 - - balance # noqa: E501 - - :return: The balance of this SpotInsuranceHistory. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this SpotInsuranceHistory. - - balance # noqa: E501 - - :param balance: The balance of this SpotInsuranceHistory. # noqa: E501 - :type: str - """ - - self._balance = balance - - @property - def time(self): - """Gets the time of this SpotInsuranceHistory. # noqa: E501 - - Creation time, timestamp, milliseconds # noqa: E501 - - :return: The time of this SpotInsuranceHistory. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this SpotInsuranceHistory. - - Creation time, timestamp, milliseconds # noqa: E501 - - :param time: The time of this SpotInsuranceHistory. # noqa: E501 - :type: int - """ - - self._time = time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotInsuranceHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotInsuranceHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py deleted file mode 100644 index ba0deed..0000000 --- a/gate_api/models/spot_price_put_order.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SpotPricePutOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'side': 'str', - 'price': 'str', - 'amount': 'str', - 'account': 'str', - 'time_in_force': 'str', - 'auto_borrow': 'bool', - 'auto_repay': 'bool', - 'text': 'str' - } - - attribute_map = { - 'type': 'type', - 'side': 'side', - 'price': 'price', - 'amount': 'amount', - 'account': 'account', - 'time_in_force': 'time_in_force', - 'auto_borrow': 'auto_borrow', - 'auto_repay': 'auto_repay', - 'text': 'text' - } - - def __init__(self, type='limit', side=None, price=None, amount=None, account='normal', time_in_force='gtc', auto_borrow=False, auto_repay=False, text=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, bool, bool, str, Configuration) -> None - """SpotPricePutOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._side = None - self._price = None - self._amount = None - self._account = None - self._time_in_force = None - self._auto_borrow = None - self._auto_repay = None - self._text = None - self.discriminator = None - - if type is not None: - self.type = type - self.side = side - self.price = price - self.amount = amount - self.account = account - if time_in_force is not None: - self.time_in_force = time_in_force - if auto_borrow is not None: - self.auto_borrow = auto_borrow - if auto_repay is not None: - self.auto_repay = auto_repay - if text is not None: - self.text = text - - @property - def type(self): - """Gets the type of this SpotPricePutOrder. # noqa: E501 - - Order type,default to `limit` - limit : Limit Order - market : Market Order # noqa: E501 - - :return: The type of this SpotPricePutOrder. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this SpotPricePutOrder. - - Order type,default to `limit` - limit : Limit Order - market : Market Order # noqa: E501 - - :param type: The type of this SpotPricePutOrder. # noqa: E501 - :type: str - """ - allowed_values = ["limit", "market"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def side(self): - """Gets the side of this SpotPricePutOrder. # noqa: E501 - - Order side - buy: buy side - sell: sell side # noqa: E501 - - :return: The side of this SpotPricePutOrder. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this SpotPricePutOrder. - - Order side - buy: buy side - sell: sell side # noqa: E501 - - :param side: The side of this SpotPricePutOrder. # 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 price(self): - """Gets the price of this SpotPricePutOrder. # noqa: E501 - - Order price # noqa: E501 - - :return: The price of this SpotPricePutOrder. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this SpotPricePutOrder. - - Order price # noqa: E501 - - :param price: The price of this SpotPricePutOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 - raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 - - self._price = price - - @property - def amount(self): - """Gets the amount of this SpotPricePutOrder. # noqa: E501 - - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 - - :return: The amount of this SpotPricePutOrder. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this SpotPricePutOrder. - - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 - - :param amount: The amount of this SpotPricePutOrder. # 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 account(self): - """Gets the account of this SpotPricePutOrder. # noqa: E501 - - Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 - - :return: The account of this SpotPricePutOrder. # noqa: E501 - :rtype: str - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this SpotPricePutOrder. - - Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 - - :param account: The account of this SpotPricePutOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and account is None: # noqa: E501 - raise ValueError("Invalid value for `account`, must not be `None`") # noqa: E501 - allowed_values = ["normal", "margin", "unified"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `account` ({0}), must be one of {1}" # noqa: E501 - .format(account, allowed_values) - ) - - self._account = account - - @property - def time_in_force(self): - """Gets the time_in_force of this SpotPricePutOrder. # noqa: E501 - - time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only # noqa: E501 - - :return: The time_in_force of this SpotPricePutOrder. # 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 SpotPricePutOrder. - - time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only # noqa: E501 - - :param time_in_force: The time_in_force of this SpotPricePutOrder. # noqa: E501 - :type: str - """ - allowed_values = ["gtc", "ioc"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 - .format(time_in_force, allowed_values) - ) - - self._time_in_force = time_in_force - - @property - def auto_borrow(self): - """Gets the auto_borrow of this SpotPricePutOrder. # noqa: E501 - - Whether to borrow coins automatically # noqa: E501 - - :return: The auto_borrow of this SpotPricePutOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_borrow - - @auto_borrow.setter - def auto_borrow(self, auto_borrow): - """Sets the auto_borrow of this SpotPricePutOrder. - - Whether to borrow coins automatically # noqa: E501 - - :param auto_borrow: The auto_borrow of this SpotPricePutOrder. # noqa: E501 - :type: bool - """ - - self._auto_borrow = auto_borrow - - @property - def auto_repay(self): - """Gets the auto_repay of this SpotPricePutOrder. # noqa: E501 - - Whether to repay the loan automatically # noqa: E501 - - :return: The auto_repay of this SpotPricePutOrder. # noqa: E501 - :rtype: bool - """ - return self._auto_repay - - @auto_repay.setter - def auto_repay(self, auto_repay): - """Sets the auto_repay of this SpotPricePutOrder. - - Whether to repay the loan automatically # noqa: E501 - - :param auto_repay: The auto_repay of this SpotPricePutOrder. # noqa: E501 - :type: bool - """ - - self._auto_repay = auto_repay - - @property - def text(self): - """Gets the text of this SpotPricePutOrder. # noqa: E501 - - The source of the order, including: - web: web - api: api - app: app # noqa: E501 - - :return: The text of this SpotPricePutOrder. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this SpotPricePutOrder. - - The source of the order, including: - web: web - api: api - app: app # noqa: E501 - - :param text: The text of this SpotPricePutOrder. # noqa: E501 - :type: str - """ - - self._text = text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotPricePutOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotPricePutOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py deleted file mode 100644 index 41f2447..0000000 --- a/gate_api/models/spot_price_trigger.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SpotPriceTrigger(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'price': 'str', - 'rule': 'str', - 'expiration': 'int' - } - - attribute_map = { - 'price': 'price', - 'rule': 'rule', - 'expiration': 'expiration' - } - - def __init__(self, price=None, rule=None, expiration=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, int, Configuration) -> None - """SpotPriceTrigger - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._price = None - self._rule = None - self._expiration = None - self.discriminator = None - - self.price = price - self.rule = rule - self.expiration = expiration - - @property - def price(self): - """Gets the price of this SpotPriceTrigger. # noqa: E501 - - Trigger price # noqa: E501 - - :return: The price of this SpotPriceTrigger. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this SpotPriceTrigger. - - Trigger price # noqa: E501 - - :param price: The price of this SpotPriceTrigger. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 - raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 - - self._price = price - - @property - def rule(self): - """Gets the rule of this SpotPriceTrigger. # noqa: E501 - - Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501 - - :return: The rule of this SpotPriceTrigger. # noqa: E501 - :rtype: str - """ - return self._rule - - @rule.setter - def rule(self, rule): - """Sets the rule of this SpotPriceTrigger. - - Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501 - - :param rule: The rule of this SpotPriceTrigger. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and rule is None: # noqa: E501 - raise ValueError("Invalid value for `rule`, must not be `None`") # noqa: E501 - allowed_values = [">=", "<="] # noqa: E501 - if self.local_vars_configuration.client_side_validation and rule not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `rule` ({0}), must be one of {1}" # noqa: E501 - .format(rule, allowed_values) - ) - - self._rule = rule - - @property - def expiration(self): - """Gets the expiration of this SpotPriceTrigger. # noqa: E501 - - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 - - :return: The expiration of this SpotPriceTrigger. # noqa: E501 - :rtype: int - """ - return self._expiration - - @expiration.setter - def expiration(self, expiration): - """Sets the expiration of this SpotPriceTrigger. - - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 - - :param expiration: The expiration of this SpotPriceTrigger. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and expiration is None: # noqa: E501 - raise ValueError("Invalid value for `expiration`, must not be `None`") # noqa: E501 - - self._expiration = expiration - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotPriceTrigger): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotPriceTrigger): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py deleted file mode 100644 index 36d9bfe..0000000 --- a/gate_api/models/spot_price_triggered_order.py +++ /dev/null @@ -1,374 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SpotPriceTriggeredOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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': 'SpotPriceTrigger', - 'put': 'SpotPricePutOrder', - 'id': 'int', - 'user': 'int', - 'market': 'str', - 'ctime': 'int', - 'ftime': 'int', - 'fired_order_id': 'int', - 'status': 'str', - 'reason': 'str' - } - - attribute_map = { - 'trigger': 'trigger', - 'put': 'put', - 'id': 'id', - 'user': 'user', - 'market': 'market', - 'ctime': 'ctime', - 'ftime': 'ftime', - 'fired_order_id': 'fired_order_id', - 'status': 'status', - 'reason': 'reason' - } - - def __init__(self, trigger=None, put=None, id=None, user=None, market=None, ctime=None, ftime=None, fired_order_id=None, status=None, reason=None, local_vars_configuration=None): # noqa: E501 - # type: (SpotPriceTrigger, SpotPricePutOrder, int, int, str, int, int, int, str, str, Configuration) -> None - """SpotPriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._trigger = None - self._put = None - self._id = None - self._user = None - self._market = None - self._ctime = None - self._ftime = None - self._fired_order_id = None - self._status = None - self._reason = None - self.discriminator = None - - self.trigger = trigger - self.put = put - if id is not None: - self.id = id - if user is not None: - self.user = user - self.market = market - if ctime is not None: - self.ctime = ctime - if ftime is not None: - self.ftime = ftime - if fired_order_id is not None: - self.fired_order_id = fired_order_id - if status is not None: - self.status = status - if reason is not None: - self.reason = reason - - @property - def trigger(self): - """Gets the trigger of this SpotPriceTriggeredOrder. # noqa: E501 - - - :return: The trigger of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: SpotPriceTrigger - """ - return self._trigger - - @trigger.setter - def trigger(self, trigger): - """Sets the trigger of this SpotPriceTriggeredOrder. - - - :param trigger: The trigger of this SpotPriceTriggeredOrder. # noqa: E501 - :type: SpotPriceTrigger - """ - if self.local_vars_configuration.client_side_validation and trigger is None: # noqa: E501 - raise ValueError("Invalid value for `trigger`, must not be `None`") # noqa: E501 - - self._trigger = trigger - - @property - def put(self): - """Gets the put of this SpotPriceTriggeredOrder. # noqa: E501 - - - :return: The put of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: SpotPricePutOrder - """ - return self._put - - @put.setter - def put(self, put): - """Sets the put of this SpotPriceTriggeredOrder. - - - :param put: The put of this SpotPriceTriggeredOrder. # noqa: E501 - :type: SpotPricePutOrder - """ - if self.local_vars_configuration.client_side_validation and put is None: # noqa: E501 - raise ValueError("Invalid value for `put`, must not be `None`") # noqa: E501 - - self._put = put - - @property - def id(self): - """Gets the id of this SpotPriceTriggeredOrder. # noqa: E501 - - Auto order ID # noqa: E501 - - :return: The id of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SpotPriceTriggeredOrder. - - Auto order ID # noqa: E501 - - :param id: The id of this SpotPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def user(self): - """Gets the user of this SpotPriceTriggeredOrder. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this SpotPriceTriggeredOrder. - - User ID # noqa: E501 - - :param user: The user of this SpotPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._user = user - - @property - def market(self): - """Gets the market of this SpotPriceTriggeredOrder. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The market of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: str - """ - return self._market - - @market.setter - def market(self, market): - """Sets the market of this SpotPriceTriggeredOrder. - - Currency pair # noqa: E501 - - :param market: The market of this SpotPriceTriggeredOrder. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 - raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 - - self._market = market - - @property - def ctime(self): - """Gets the ctime of this SpotPriceTriggeredOrder. # noqa: E501 - - Creation time # noqa: E501 - - :return: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._ctime - - @ctime.setter - def ctime(self, ctime): - """Sets the ctime of this SpotPriceTriggeredOrder. - - Creation time # noqa: E501 - - :param ctime: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._ctime = ctime - - @property - def ftime(self): - """Gets the ftime of this SpotPriceTriggeredOrder. # noqa: E501 - - Finished time # noqa: E501 - - :return: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._ftime - - @ftime.setter - def ftime(self, ftime): - """Sets the ftime of this SpotPriceTriggeredOrder. - - Finished time # noqa: E501 - - :param ftime: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._ftime = ftime - - @property - def fired_order_id(self): - """Gets the fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 - - ID of the newly created order on condition triggered # noqa: E501 - - :return: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: int - """ - return self._fired_order_id - - @fired_order_id.setter - def fired_order_id(self, fired_order_id): - """Sets the fired_order_id of this SpotPriceTriggeredOrder. - - ID of the newly created order on condition triggered # noqa: E501 - - :param fired_order_id: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 - :type: int - """ - - self._fired_order_id = fired_order_id - - @property - def status(self): - """Gets the status of this SpotPriceTriggeredOrder. # noqa: E501 - - Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501 - - :return: The status of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this SpotPriceTriggeredOrder. - - Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501 - - :param status: The status of this SpotPriceTriggeredOrder. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def reason(self): - """Gets the reason of this SpotPriceTriggeredOrder. # noqa: E501 - - Additional remarks on how the order was finished # noqa: E501 - - :return: The reason of this SpotPriceTriggeredOrder. # noqa: E501 - :rtype: str - """ - return self._reason - - @reason.setter - def reason(self, reason): - """Sets the reason of this SpotPriceTriggeredOrder. - - Additional remarks on how the order was finished # noqa: E501 - - :param reason: The reason of this SpotPriceTriggeredOrder. # noqa: E501 - :type: str - """ - - self._reason = reason - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SpotPriceTriggeredOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SpotPriceTriggeredOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py deleted file mode 100644 index 70da380..0000000 --- a/gate_api/models/stp_group.py +++ /dev/null @@ -1,208 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class StpGroup(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'name': 'str', - 'creator_id': 'int', - 'create_time': 'int' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'creator_id': 'creator_id', - 'create_time': 'create_time' - } - - def __init__(self, id=None, name=None, creator_id=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, int, Configuration) -> None - """StpGroup - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._creator_id = None - self._create_time = None - self.discriminator = None - - if id is not None: - self.id = id - self.name = name - if creator_id is not None: - self.creator_id = creator_id - if create_time is not None: - self.create_time = create_time - - @property - def id(self): - """Gets the id of this StpGroup. # noqa: E501 - - STP Group ID # noqa: E501 - - :return: The id of this StpGroup. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this StpGroup. - - STP Group ID # noqa: E501 - - :param id: The id of this StpGroup. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def name(self): - """Gets the name of this StpGroup. # noqa: E501 - - STP Group name # noqa: E501 - - :return: The name of this StpGroup. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this StpGroup. - - STP Group name # noqa: E501 - - :param name: The name of this StpGroup. # 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 creator_id(self): - """Gets the creator_id of this StpGroup. # noqa: E501 - - Creator ID # noqa: E501 - - :return: The creator_id of this StpGroup. # noqa: E501 - :rtype: int - """ - return self._creator_id - - @creator_id.setter - def creator_id(self, creator_id): - """Sets the creator_id of this StpGroup. - - Creator ID # noqa: E501 - - :param creator_id: The creator_id of this StpGroup. # noqa: E501 - :type: int - """ - - self._creator_id = creator_id - - @property - def create_time(self): - """Gets the create_time of this StpGroup. # noqa: E501 - - Creation time # noqa: E501 - - :return: The create_time of this StpGroup. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this StpGroup. - - Creation time # noqa: E501 - - :param create_time: The create_time of this StpGroup. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StpGroup): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, StpGroup): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py deleted file mode 100644 index 776f7b2..0000000 --- a/gate_api/models/stp_group_user.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class StpGroupUser(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'stp_id': 'int', - 'create_time': 'int' - } - - attribute_map = { - 'user_id': 'user_id', - 'stp_id': 'stp_id', - 'create_time': 'create_time' - } - - def __init__(self, user_id=None, stp_id=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, Configuration) -> None - """StpGroupUser - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._stp_id = None - self._create_time = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if stp_id is not None: - self.stp_id = stp_id - if create_time is not None: - self.create_time = create_time - - @property - def user_id(self): - """Gets the user_id of this StpGroupUser. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this StpGroupUser. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this StpGroupUser. - - User ID # noqa: E501 - - :param user_id: The user_id of this StpGroupUser. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def stp_id(self): - """Gets the stp_id of this StpGroupUser. # noqa: E501 - - STP Group ID # noqa: E501 - - :return: The stp_id of this StpGroupUser. # noqa: E501 - :rtype: int - """ - return self._stp_id - - @stp_id.setter - def stp_id(self, stp_id): - """Sets the stp_id of this StpGroupUser. - - STP Group ID # noqa: E501 - - :param stp_id: The stp_id of this StpGroupUser. # noqa: E501 - :type: int - """ - - self._stp_id = stp_id - - @property - def create_time(self): - """Gets the create_time of this StpGroupUser. # noqa: E501 - - Creation time # noqa: E501 - - :return: The create_time of this StpGroupUser. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this StpGroupUser. - - Creation time # noqa: E501 - - :param create_time: The create_time of this StpGroupUser. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StpGroupUser): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, StpGroupUser): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py deleted file mode 100644 index 4c495b1..0000000 --- a/gate_api/models/structured_buy.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class StructuredBuy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'pid': 'str', - 'amount': 'str' - } - - attribute_map = { - 'pid': 'pid', - 'amount': 'amount' - } - - def __init__(self, pid=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """StructuredBuy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._pid = None - self._amount = None - self.discriminator = None - - if pid is not None: - self.pid = pid - if amount is not None: - self.amount = amount - - @property - def pid(self): - """Gets the pid of this StructuredBuy. # noqa: E501 - - Plan ID # noqa: E501 - - :return: The pid of this StructuredBuy. # noqa: E501 - :rtype: str - """ - return self._pid - - @pid.setter - def pid(self, pid): - """Sets the pid of this StructuredBuy. - - Plan ID # noqa: E501 - - :param pid: The pid of this StructuredBuy. # noqa: E501 - :type: str - """ - - self._pid = pid - - @property - def amount(self): - """Gets the amount of this StructuredBuy. # noqa: E501 - - Purchase Amount # noqa: E501 - - :return: The amount of this StructuredBuy. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this StructuredBuy. - - Purchase Amount # noqa: E501 - - :param amount: The amount of this StructuredBuy. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StructuredBuy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, StructuredBuy): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py deleted file mode 100644 index a051a06..0000000 --- a/gate_api/models/structured_get_project_list.py +++ /dev/null @@ -1,431 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class StructuredGetProjectList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'type': 'str', - 'name_en': 'str', - 'investment_coin': 'str', - 'investment_period': 'str', - 'min_annual_rate': 'str', - 'mid_annual_rate': 'str', - 'max_annual_rate': 'str', - 'watch_market': 'str', - 'start_time': 'int', - 'end_time': 'int', - 'status': 'str' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'name_en': 'name_en', - 'investment_coin': 'investment_coin', - 'investment_period': 'investment_period', - 'min_annual_rate': 'min_annual_rate', - 'mid_annual_rate': 'mid_annual_rate', - 'max_annual_rate': 'max_annual_rate', - 'watch_market': 'watch_market', - 'start_time': 'start_time', - 'end_time': 'end_time', - 'status': 'status' - } - - def __init__(self, id=None, type=None, name_en=None, investment_coin=None, investment_period=None, min_annual_rate=None, mid_annual_rate=None, max_annual_rate=None, watch_market=None, start_time=None, end_time=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, str, str, str, str, int, int, str, Configuration) -> None - """StructuredGetProjectList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._type = None - self._name_en = None - self._investment_coin = None - self._investment_period = None - self._min_annual_rate = None - self._mid_annual_rate = None - self._max_annual_rate = None - self._watch_market = None - self._start_time = None - self._end_time = None - self._status = None - self.discriminator = None - - if id is not None: - self.id = id - if type is not None: - self.type = type - if name_en is not None: - self.name_en = name_en - if investment_coin is not None: - self.investment_coin = investment_coin - if investment_period is not None: - self.investment_period = investment_period - if min_annual_rate is not None: - self.min_annual_rate = min_annual_rate - if mid_annual_rate is not None: - self.mid_annual_rate = mid_annual_rate - if max_annual_rate is not None: - self.max_annual_rate = max_annual_rate - if watch_market is not None: - self.watch_market = watch_market - if start_time is not None: - self.start_time = start_time - if end_time is not None: - self.end_time = end_time - if status is not None: - self.status = status - - @property - def id(self): - """Gets the id of this StructuredGetProjectList. # noqa: E501 - - Plan ID # noqa: E501 - - :return: The id of this StructuredGetProjectList. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this StructuredGetProjectList. - - Plan ID # noqa: E501 - - :param id: The id of this StructuredGetProjectList. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this StructuredGetProjectList. # noqa: E501 - - product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 - - :return: The type of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this StructuredGetProjectList. - - product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 - - :param type: The type of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def name_en(self): - """Gets the name_en of this StructuredGetProjectList. # noqa: E501 - - name # noqa: E501 - - :return: The name_en of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._name_en - - @name_en.setter - def name_en(self, name_en): - """Sets the name_en of this StructuredGetProjectList. - - name # noqa: E501 - - :param name_en: The name_en of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._name_en = name_en - - @property - def investment_coin(self): - """Gets the investment_coin of this StructuredGetProjectList. # noqa: E501 - - Investment Currency # noqa: E501 - - :return: The investment_coin of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._investment_coin - - @investment_coin.setter - def investment_coin(self, investment_coin): - """Sets the investment_coin of this StructuredGetProjectList. - - Investment Currency # noqa: E501 - - :param investment_coin: The investment_coin of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._investment_coin = investment_coin - - @property - def investment_period(self): - """Gets the investment_period of this StructuredGetProjectList. # noqa: E501 - - Investment term # noqa: E501 - - :return: The investment_period of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._investment_period - - @investment_period.setter - def investment_period(self, investment_period): - """Sets the investment_period of this StructuredGetProjectList. - - Investment term # noqa: E501 - - :param investment_period: The investment_period of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._investment_period = investment_period - - @property - def min_annual_rate(self): - """Gets the min_annual_rate of this StructuredGetProjectList. # noqa: E501 - - Minimum annual rate # noqa: E501 - - :return: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._min_annual_rate - - @min_annual_rate.setter - def min_annual_rate(self, min_annual_rate): - """Sets the min_annual_rate of this StructuredGetProjectList. - - Minimum annual rate # noqa: E501 - - :param min_annual_rate: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._min_annual_rate = min_annual_rate - - @property - def mid_annual_rate(self): - """Gets the mid_annual_rate of this StructuredGetProjectList. # noqa: E501 - - Intermediate annual rate # noqa: E501 - - :return: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._mid_annual_rate - - @mid_annual_rate.setter - def mid_annual_rate(self, mid_annual_rate): - """Sets the mid_annual_rate of this StructuredGetProjectList. - - Intermediate annual rate # noqa: E501 - - :param mid_annual_rate: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._mid_annual_rate = mid_annual_rate - - @property - def max_annual_rate(self): - """Gets the max_annual_rate of this StructuredGetProjectList. # noqa: E501 - - Maximum annual rate # noqa: E501 - - :return: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._max_annual_rate - - @max_annual_rate.setter - def max_annual_rate(self, max_annual_rate): - """Sets the max_annual_rate of this StructuredGetProjectList. - - Maximum annual rate # noqa: E501 - - :param max_annual_rate: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._max_annual_rate = max_annual_rate - - @property - def watch_market(self): - """Gets the watch_market of this StructuredGetProjectList. # noqa: E501 - - Watch market # noqa: E501 - - :return: The watch_market of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._watch_market - - @watch_market.setter - def watch_market(self, watch_market): - """Sets the watch_market of this StructuredGetProjectList. - - Watch market # noqa: E501 - - :param watch_market: The watch_market of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._watch_market = watch_market - - @property - def start_time(self): - """Gets the start_time of this StructuredGetProjectList. # noqa: E501 - - start time # noqa: E501 - - :return: The start_time of this StructuredGetProjectList. # noqa: E501 - :rtype: int - """ - return self._start_time - - @start_time.setter - def start_time(self, start_time): - """Sets the start_time of this StructuredGetProjectList. - - start time # noqa: E501 - - :param start_time: The start_time of this StructuredGetProjectList. # noqa: E501 - :type: int - """ - - self._start_time = start_time - - @property - def end_time(self): - """Gets the end_time of this StructuredGetProjectList. # noqa: E501 - - Finished time # noqa: E501 - - :return: The end_time of this StructuredGetProjectList. # noqa: E501 - :rtype: int - """ - return self._end_time - - @end_time.setter - def end_time(self, end_time): - """Sets the end_time of this StructuredGetProjectList. - - Finished time # noqa: E501 - - :param end_time: The end_time of this StructuredGetProjectList. # noqa: E501 - :type: int - """ - - self._end_time = end_time - - @property - def status(self): - """Gets the status of this StructuredGetProjectList. # noqa: E501 - - Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done # noqa: E501 - - :return: The status of this StructuredGetProjectList. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this StructuredGetProjectList. - - Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done # noqa: E501 - - :param status: The status of this StructuredGetProjectList. # noqa: E501 - :type: str - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StructuredGetProjectList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, StructuredGetProjectList): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py deleted file mode 100644 index 43911a9..0000000 --- a/gate_api/models/structured_order_list.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class StructuredOrderList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'pid': 'str', - 'lock_coin': 'str', - 'amount': 'str', - 'status': 'str', - 'income': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'id': 'id', - 'pid': 'pid', - 'lock_coin': 'lock_coin', - 'amount': 'amount', - 'status': 'status', - 'income': 'income', - 'create_time': 'create_time' - } - - def __init__(self, id=None, pid=None, lock_coin=None, amount=None, status=None, income=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, str, int, Configuration) -> None - """StructuredOrderList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._pid = None - self._lock_coin = None - self._amount = None - self._status = None - self._income = None - self._create_time = None - self.discriminator = None - - if id is not None: - self.id = id - if pid is not None: - self.pid = pid - if lock_coin is not None: - self.lock_coin = lock_coin - if amount is not None: - self.amount = amount - if status is not None: - self.status = status - if income is not None: - self.income = income - if create_time is not None: - self.create_time = create_time - - @property - def id(self): - """Gets the id of this StructuredOrderList. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this StructuredOrderList. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this StructuredOrderList. - - Order ID # noqa: E501 - - :param id: The id of this StructuredOrderList. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def pid(self): - """Gets the pid of this StructuredOrderList. # noqa: E501 - - Plan ID # noqa: E501 - - :return: The pid of this StructuredOrderList. # noqa: E501 - :rtype: str - """ - return self._pid - - @pid.setter - def pid(self, pid): - """Sets the pid of this StructuredOrderList. - - Plan ID # noqa: E501 - - :param pid: The pid of this StructuredOrderList. # noqa: E501 - :type: str - """ - - self._pid = pid - - @property - def lock_coin(self): - """Gets the lock_coin of this StructuredOrderList. # noqa: E501 - - Locked coin # noqa: E501 - - :return: The lock_coin of this StructuredOrderList. # noqa: E501 - :rtype: str - """ - return self._lock_coin - - @lock_coin.setter - def lock_coin(self, lock_coin): - """Sets the lock_coin of this StructuredOrderList. - - Locked coin # noqa: E501 - - :param lock_coin: The lock_coin of this StructuredOrderList. # noqa: E501 - :type: str - """ - - self._lock_coin = lock_coin - - @property - def amount(self): - """Gets the amount of this StructuredOrderList. # noqa: E501 - - Locked amount # noqa: E501 - - :return: The amount of this StructuredOrderList. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this StructuredOrderList. - - Locked amount # noqa: E501 - - :param amount: The amount of this StructuredOrderList. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def status(self): - """Gets the status of this StructuredOrderList. # noqa: E501 - - Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE # noqa: E501 - - :return: The status of this StructuredOrderList. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this StructuredOrderList. - - Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE # noqa: E501 - - :param status: The status of this StructuredOrderList. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def income(self): - """Gets the income of this StructuredOrderList. # noqa: E501 - - Income # noqa: E501 - - :return: The income of this StructuredOrderList. # noqa: E501 - :rtype: str - """ - return self._income - - @income.setter - def income(self, income): - """Sets the income of this StructuredOrderList. - - Income # noqa: E501 - - :param income: The income of this StructuredOrderList. # noqa: E501 - :type: str - """ - - self._income = income - - @property - def create_time(self): - """Gets the create_time of this StructuredOrderList. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this StructuredOrderList. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this StructuredOrderList. - - Created time # noqa: E501 - - :param create_time: The create_time of this StructuredOrderList. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StructuredOrderList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, StructuredOrderList): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py deleted file mode 100644 index f94b684..0000000 --- a/gate_api/models/sub_account.py +++ /dev/null @@ -1,320 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'remark': 'str', - 'login_name': 'str', - 'password': 'str', - 'email': 'str', - 'state': 'int', - 'type': 'int', - 'user_id': 'int', - 'create_time': 'int' - } - - attribute_map = { - 'remark': 'remark', - 'login_name': 'login_name', - 'password': 'password', - 'email': 'email', - 'state': 'state', - 'type': 'type', - 'user_id': 'user_id', - 'create_time': 'create_time' - } - - def __init__(self, remark=None, login_name=None, password=None, email=None, state=None, type=None, user_id=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, int, int, int, Configuration) -> None - """SubAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._remark = None - self._login_name = None - self._password = None - self._email = None - self._state = None - self._type = None - self._user_id = None - self._create_time = None - self.discriminator = None - - if remark is not None: - self.remark = remark - self.login_name = login_name - if password is not None: - self.password = password - if email is not None: - self.email = email - if state is not None: - self.state = state - if type is not None: - self.type = type - if user_id is not None: - self.user_id = user_id - if create_time is not None: - self.create_time = create_time - - @property - def remark(self): - """Gets the remark of this SubAccount. # noqa: E501 - - custom text # noqa: E501 - - :return: The remark of this SubAccount. # noqa: E501 - :rtype: str - """ - return self._remark - - @remark.setter - def remark(self, remark): - """Sets the remark of this SubAccount. - - custom text # noqa: E501 - - :param remark: The remark of this SubAccount. # noqa: E501 - :type: str - """ - - self._remark = remark - - @property - def login_name(self): - """Gets the login_name of this SubAccount. # noqa: E501 - - Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501 - - :return: The login_name of this SubAccount. # noqa: E501 - :rtype: str - """ - return self._login_name - - @login_name.setter - def login_name(self, login_name): - """Sets the login_name of this SubAccount. - - Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501 - - :param login_name: The login_name of this SubAccount. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and login_name is None: # noqa: E501 - raise ValueError("Invalid value for `login_name`, must not be `None`") # noqa: E501 - - self._login_name = login_name - - @property - def password(self): - """Gets the password of this SubAccount. # noqa: E501 - - The sub-account's password. (Default: the same as main account's password) # noqa: E501 - - :return: The password of this SubAccount. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this SubAccount. - - The sub-account's password. (Default: the same as main account's password) # noqa: E501 - - :param password: The password of this SubAccount. # noqa: E501 - :type: str - """ - - self._password = password - - @property - def email(self): - """Gets the email of this SubAccount. # noqa: E501 - - The sub-account's email address. (Default: the same as main account's email address) # noqa: E501 - - :return: The email of this SubAccount. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this SubAccount. - - The sub-account's email address. (Default: the same as main account's email address) # noqa: E501 - - :param email: The email of this SubAccount. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def state(self): - """Gets the state of this SubAccount. # noqa: E501 - - State: 1-normal, 2-locked\" # noqa: E501 - - :return: The state of this SubAccount. # noqa: E501 - :rtype: int - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this SubAccount. - - State: 1-normal, 2-locked\" # noqa: E501 - - :param state: The state of this SubAccount. # noqa: E501 - :type: int - """ - - self._state = state - - @property - def type(self): - """Gets the type of this SubAccount. # noqa: E501 - - \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501 - - :return: The type of this SubAccount. # noqa: E501 - :rtype: int - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this SubAccount. - - \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501 - - :param type: The type of this SubAccount. # noqa: E501 - :type: int - """ - - self._type = type - - @property - def user_id(self): - """Gets the user_id of this SubAccount. # noqa: E501 - - The user id of the sub-account # noqa: E501 - - :return: The user_id of this SubAccount. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this SubAccount. - - The user id of the sub-account # noqa: E501 - - :param user_id: The user_id of this SubAccount. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def create_time(self): - """Gets the create_time of this SubAccount. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this SubAccount. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this SubAccount. - - Created time # noqa: E501 - - :param create_time: The create_time of this SubAccount. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py deleted file mode 100644 index 4f321cc..0000000 --- a/gate_api/models/sub_account_balance.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'available': 'dict(str, str)' - } - - attribute_map = { - 'uid': 'uid', - 'available': 'available' - } - - def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 - # type: (str, dict(str, str), Configuration) -> None - """SubAccountBalance - a 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._available = None - self.discriminator = None - - if uid is not None: - self.uid = uid - if available is not None: - self.available = available - - @property - def uid(self): - """Gets the uid of this SubAccountBalance. # noqa: E501 - - User ID # noqa: E501 - - :return: The uid of this SubAccountBalance. # noqa: E501 - :rtype: str - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this SubAccountBalance. - - User ID # noqa: E501 - - :param uid: The uid of this SubAccountBalance. # noqa: E501 - :type: str - """ - - self._uid = uid - - @property - def available(self): - """Gets the available of this SubAccountBalance. # noqa: E501 - - Available balances of currencies # noqa: E501 - - :return: The available of this SubAccountBalance. # noqa: E501 - :rtype: dict(str, str) - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this SubAccountBalance. - - Available balances of currencies # noqa: E501 - - :param available: The available of this SubAccountBalance. # noqa: E501 - :type: dict(str, str) - """ - - self._available = available - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubAccountBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py deleted file mode 100644 index cfb4539..0000000 --- a/gate_api/models/sub_account_cross_margin_balance.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountCrossMarginBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'available': 'SubCrossMarginAccount' - } - - attribute_map = { - 'uid': 'uid', - 'available': 'available' - } - - def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 - # type: (str, SubCrossMarginAccount, Configuration) -> None - """SubAccountCrossMarginBalance - a 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._available = None - self.discriminator = None - - if uid is not None: - self.uid = uid - if available is not None: - self.available = available - - @property - def uid(self): - """Gets the uid of this SubAccountCrossMarginBalance. # noqa: E501 - - User ID # noqa: E501 - - :return: The uid of this SubAccountCrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this SubAccountCrossMarginBalance. - - User ID # noqa: E501 - - :param uid: The uid of this SubAccountCrossMarginBalance. # noqa: E501 - :type: str - """ - - self._uid = uid - - @property - def available(self): - """Gets the available of this SubAccountCrossMarginBalance. # noqa: E501 - - 账户余额信息 # noqa: E501 - - :return: The available of this SubAccountCrossMarginBalance. # noqa: E501 - :rtype: SubCrossMarginAccount - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this SubAccountCrossMarginBalance. - - 账户余额信息 # noqa: E501 - - :param available: The available of this SubAccountCrossMarginBalance. # noqa: E501 - :type: SubCrossMarginAccount - """ - - self._available = available - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubAccountCrossMarginBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountCrossMarginBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py deleted file mode 100644 index 24b1e2b..0000000 --- a/gate_api/models/sub_account_futures_balance.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountFuturesBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'available': 'dict(str, FuturesAccount)' - } - - attribute_map = { - 'uid': 'uid', - 'available': 'available' - } - - def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 - # type: (str, dict(str, FuturesAccount), Configuration) -> None - """SubAccountFuturesBalance - a 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._available = None - self.discriminator = None - - if uid is not None: - self.uid = uid - if available is not None: - self.available = available - - @property - def uid(self): - """Gets the uid of this SubAccountFuturesBalance. # noqa: E501 - - User ID # noqa: E501 - - :return: The uid of this SubAccountFuturesBalance. # noqa: E501 - :rtype: str - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this SubAccountFuturesBalance. - - User ID # noqa: E501 - - :param uid: The uid of this SubAccountFuturesBalance. # noqa: E501 - :type: str - """ - - self._uid = uid - - @property - def available(self): - """Gets the available of this SubAccountFuturesBalance. # noqa: E501 - - Futures account balances # noqa: E501 - - :return: The available of this SubAccountFuturesBalance. # noqa: E501 - :rtype: dict(str, FuturesAccount) - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this SubAccountFuturesBalance. - - Futures account balances # noqa: E501 - - :param available: The available of this SubAccountFuturesBalance. # noqa: E501 - :type: dict(str, FuturesAccount) - """ - - self._available = available - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubAccountFuturesBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountFuturesBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py deleted file mode 100644 index b2b2bae..0000000 --- a/gate_api/models/sub_account_key.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountKey(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'str', - 'mode': 'int', - 'name': 'str', - 'perms': 'list[SubAccountKeyPerms]', - 'ip_whitelist': 'list[str]', - 'key': 'str', - 'state': 'int', - 'created_at': 'int', - 'updated_at': 'int', - 'last_access': 'int' - } - - attribute_map = { - 'user_id': 'user_id', - 'mode': 'mode', - 'name': 'name', - 'perms': 'perms', - 'ip_whitelist': 'ip_whitelist', - 'key': 'key', - 'state': 'state', - 'created_at': 'created_at', - 'updated_at': 'updated_at', - 'last_access': 'last_access' - } - - def __init__(self, user_id=None, mode=None, name=None, perms=None, ip_whitelist=None, key=None, state=None, created_at=None, updated_at=None, last_access=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, list[SubAccountKeyPerms], list[str], str, int, int, int, int, Configuration) -> None - """SubAccountKey - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._mode = None - self._name = None - self._perms = None - self._ip_whitelist = None - self._key = None - self._state = None - self._created_at = None - self._updated_at = None - self._last_access = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if mode is not None: - self.mode = mode - if name is not None: - self.name = name - if perms is not None: - self.perms = perms - if ip_whitelist is not None: - self.ip_whitelist = ip_whitelist - if key is not None: - self.key = key - if state is not None: - self.state = state - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - if last_access is not None: - self.last_access = last_access - - @property - def user_id(self): - """Gets the user_id of this SubAccountKey. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this SubAccountKey. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this SubAccountKey. - - User ID # noqa: E501 - - :param user_id: The user_id of this SubAccountKey. # noqa: E501 - :type: str - """ - - self._user_id = user_id - - @property - def mode(self): - """Gets the mode of this SubAccountKey. # noqa: E501 - - Mode: 1 - classic 2 - portfolio account # noqa: E501 - - :return: The mode of this SubAccountKey. # noqa: E501 - :rtype: int - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this SubAccountKey. - - Mode: 1 - classic 2 - portfolio account # noqa: E501 - - :param mode: The mode of this SubAccountKey. # noqa: E501 - :type: int - """ - - self._mode = mode - - @property - def name(self): - """Gets the name of this SubAccountKey. # noqa: E501 - - API key name # noqa: E501 - - :return: The name of this SubAccountKey. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SubAccountKey. - - API key name # noqa: E501 - - :param name: The name of this SubAccountKey. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def perms(self): - """Gets the perms of this SubAccountKey. # noqa: E501 - - - :return: The perms of this SubAccountKey. # noqa: E501 - :rtype: list[SubAccountKeyPerms] - """ - return self._perms - - @perms.setter - def perms(self, perms): - """Sets the perms of this SubAccountKey. - - - :param perms: The perms of this SubAccountKey. # noqa: E501 - :type: list[SubAccountKeyPerms] - """ - - self._perms = perms - - @property - def ip_whitelist(self): - """Gets the ip_whitelist of this SubAccountKey. # noqa: E501 - - ip white list (list will be removed if no value is passed) # noqa: E501 - - :return: The ip_whitelist of this SubAccountKey. # noqa: E501 - :rtype: list[str] - """ - return self._ip_whitelist - - @ip_whitelist.setter - def ip_whitelist(self, ip_whitelist): - """Sets the ip_whitelist of this SubAccountKey. - - ip white list (list will be removed if no value is passed) # noqa: E501 - - :param ip_whitelist: The ip_whitelist of this SubAccountKey. # noqa: E501 - :type: list[str] - """ - - self._ip_whitelist = ip_whitelist - - @property - def key(self): - """Gets the key of this SubAccountKey. # noqa: E501 - - API Key # noqa: E501 - - :return: The key of this SubAccountKey. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this SubAccountKey. - - API Key # noqa: E501 - - :param key: The key of this SubAccountKey. # noqa: E501 - :type: str - """ - - self._key = key - - @property - def state(self): - """Gets the state of this SubAccountKey. # noqa: E501 - - State 1 - normal 2 - locked 3 - frozen # noqa: E501 - - :return: The state of this SubAccountKey. # noqa: E501 - :rtype: int - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this SubAccountKey. - - State 1 - normal 2 - locked 3 - frozen # noqa: E501 - - :param state: The state of this SubAccountKey. # noqa: E501 - :type: int - """ - - self._state = state - - @property - def created_at(self): - """Gets the created_at of this SubAccountKey. # noqa: E501 - - Creation time # noqa: E501 - - :return: The created_at of this SubAccountKey. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this SubAccountKey. - - Creation time # noqa: E501 - - :param created_at: The created_at of this SubAccountKey. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this SubAccountKey. # noqa: E501 - - Last update time # noqa: E501 - - :return: The updated_at of this SubAccountKey. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this SubAccountKey. - - Last update time # noqa: E501 - - :param updated_at: The updated_at of this SubAccountKey. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - @property - def last_access(self): - """Gets the last_access of this SubAccountKey. # noqa: E501 - - Last access time # noqa: E501 - - :return: The last_access of this SubAccountKey. # noqa: E501 - :rtype: int - """ - return self._last_access - - @last_access.setter - def last_access(self, last_access): - """Sets the last_access of this SubAccountKey. - - Last access time # noqa: E501 - - :param last_access: The last_access of this SubAccountKey. # noqa: E501 - :type: int - """ - - self._last_access = last_access - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubAccountKey): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountKey): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py deleted file mode 100644 index f989ba7..0000000 --- a/gate_api/models/sub_account_key_perms.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountKeyPerms(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'read_only': 'bool' - } - - attribute_map = { - 'name': 'name', - 'read_only': 'read_only' - } - - def __init__(self, name=None, read_only=None, local_vars_configuration=None): # noqa: E501 - # type: (str, bool, Configuration) -> None - """SubAccountKeyPerms - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._read_only = None - self.discriminator = None - - if name is not None: - self.name = name - if read_only is not None: - self.read_only = read_only - - @property - def name(self): - """Gets the name of this SubAccountKeyPerms. # noqa: E501 - - Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy # noqa: E501 - - :return: The name of this SubAccountKeyPerms. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SubAccountKeyPerms. - - Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy # noqa: E501 - - :param name: The name of this SubAccountKeyPerms. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def read_only(self): - """Gets the read_only of this SubAccountKeyPerms. # noqa: E501 - - read only # noqa: E501 - - :return: The read_only of this SubAccountKeyPerms. # noqa: E501 - :rtype: bool - """ - return self._read_only - - @read_only.setter - def read_only(self, read_only): - """Sets the read_only of this SubAccountKeyPerms. - - read only # noqa: E501 - - :param read_only: The read_only of this SubAccountKeyPerms. # noqa: E501 - :type: bool - """ - - self._read_only = read_only - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubAccountKeyPerms): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountKeyPerms): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py deleted file mode 100644 index bb0edf3..0000000 --- a/gate_api/models/sub_account_margin_balance.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountMarginBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'available': 'list[MarginAccount]' - } - - attribute_map = { - 'uid': 'uid', - 'available': 'available' - } - - def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[MarginAccount], Configuration) -> None - """SubAccountMarginBalance - a 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._available = None - self.discriminator = None - - if uid is not None: - self.uid = uid - if available is not None: - self.available = available - - @property - def uid(self): - """Gets the uid of this SubAccountMarginBalance. # noqa: E501 - - User ID # noqa: E501 - - :return: The uid of this SubAccountMarginBalance. # noqa: E501 - :rtype: str - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this SubAccountMarginBalance. - - User ID # noqa: E501 - - :param uid: The uid of this SubAccountMarginBalance. # noqa: E501 - :type: str - """ - - self._uid = uid - - @property - def available(self): - """Gets the available of this SubAccountMarginBalance. # noqa: E501 - - Margin account balances # noqa: E501 - - :return: The available of this SubAccountMarginBalance. # noqa: E501 - :rtype: list[MarginAccount] - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this SubAccountMarginBalance. - - Margin account balances # noqa: E501 - - :param available: The available of this SubAccountMarginBalance. # noqa: E501 - :type: list[MarginAccount] - """ - - self._available = available - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubAccountMarginBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountMarginBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py deleted file mode 100644 index 3880810..0000000 --- a/gate_api/models/sub_account_to_sub_account.py +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountToSubAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'sub_account_type': 'str', - 'sub_account_from': 'str', - 'sub_account_from_type': 'str', - 'sub_account_to': 'str', - 'sub_account_to_type': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'sub_account_type': 'sub_account_type', - 'sub_account_from': 'sub_account_from', - 'sub_account_from_type': 'sub_account_from_type', - 'sub_account_to': 'sub_account_to', - 'sub_account_to_type': 'sub_account_to_type', - 'amount': 'amount' - } - - def __init__(self, currency=None, sub_account_type=None, sub_account_from=None, sub_account_from_type=None, sub_account_to=None, sub_account_to_type=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, Configuration) -> None - """SubAccountToSubAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._sub_account_type = None - self._sub_account_from = None - self._sub_account_from_type = None - self._sub_account_to = None - self._sub_account_to_type = None - self._amount = None - self.discriminator = None - - self.currency = currency - if sub_account_type is not None: - self.sub_account_type = sub_account_type - self.sub_account_from = sub_account_from - self.sub_account_from_type = sub_account_from_type - self.sub_account_to = sub_account_to - self.sub_account_to_type = sub_account_to_type - self.amount = amount - - @property - def currency(self): - """Gets the currency of this SubAccountToSubAccount. # noqa: E501 - - Transfer currency name # noqa: E501 - - :return: The currency of this SubAccountToSubAccount. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SubAccountToSubAccount. - - Transfer currency name # noqa: E501 - - :param currency: The currency of this SubAccountToSubAccount. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def sub_account_type(self): - """Gets the sub_account_type of this SubAccountToSubAccount. # noqa: E501 - - Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 - - :return: The sub_account_type of this SubAccountToSubAccount. # noqa: E501 - :rtype: str - """ - return self._sub_account_type - - @sub_account_type.setter - def sub_account_type(self, sub_account_type): - """Sets the sub_account_type of this SubAccountToSubAccount. - - Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 - - :param sub_account_type: The sub_account_type of this SubAccountToSubAccount. # noqa: E501 - :type: str - """ - - self._sub_account_type = sub_account_type - - @property - def sub_account_from(self): - """Gets the sub_account_from of this SubAccountToSubAccount. # noqa: E501 - - Transfer from the user id of the sub-account # noqa: E501 - - :return: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 - :rtype: str - """ - return self._sub_account_from - - @sub_account_from.setter - def sub_account_from(self, sub_account_from): - """Sets the sub_account_from of this SubAccountToSubAccount. - - Transfer from the user id of the sub-account # noqa: E501 - - :param sub_account_from: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sub_account_from is None: # noqa: E501 - raise ValueError("Invalid value for `sub_account_from`, must not be `None`") # noqa: E501 - - self._sub_account_from = sub_account_from - - @property - def sub_account_from_type(self): - """Gets the sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 - - The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. # noqa: E501 - - :return: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 - :rtype: str - """ - return self._sub_account_from_type - - @sub_account_from_type.setter - def sub_account_from_type(self, sub_account_from_type): - """Sets the sub_account_from_type of this SubAccountToSubAccount. - - The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. # noqa: E501 - - :param sub_account_from_type: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sub_account_from_type is None: # noqa: E501 - raise ValueError("Invalid value for `sub_account_from_type`, must not be `None`") # noqa: E501 - - self._sub_account_from_type = sub_account_from_type - - @property - def sub_account_to(self): - """Gets the sub_account_to of this SubAccountToSubAccount. # noqa: E501 - - Transfer to the user id of the sub-account # noqa: E501 - - :return: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 - :rtype: str - """ - return self._sub_account_to - - @sub_account_to.setter - def sub_account_to(self, sub_account_to): - """Sets the sub_account_to of this SubAccountToSubAccount. - - Transfer to the user id of the sub-account # noqa: E501 - - :param sub_account_to: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sub_account_to is None: # noqa: E501 - raise ValueError("Invalid value for `sub_account_to`, must not be `None`") # noqa: E501 - - self._sub_account_to = sub_account_to - - @property - def sub_account_to_type(self): - """Gets the sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 - - The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 - - :return: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 - :rtype: str - """ - return self._sub_account_to_type - - @sub_account_to_type.setter - def sub_account_to_type(self, sub_account_to_type): - """Sets the sub_account_to_type of this SubAccountToSubAccount. - - The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 - - :param sub_account_to_type: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sub_account_to_type is None: # noqa: E501 - raise ValueError("Invalid value for `sub_account_to_type`, must not be `None`") # noqa: E501 - - self._sub_account_to_type = sub_account_to_type - - @property - def amount(self): - """Gets the amount of this SubAccountToSubAccount. # noqa: E501 - - Transfer amount # noqa: E501 - - :return: The amount of this SubAccountToSubAccount. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this SubAccountToSubAccount. - - Transfer amount # noqa: E501 - - :param amount: The amount of this SubAccountToSubAccount. # 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, SubAccountToSubAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountToSubAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py deleted file mode 100644 index 0497ece..0000000 --- a/gate_api/models/sub_account_transfer.py +++ /dev/null @@ -1,351 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubAccountTransfer(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'sub_account': 'str', - 'direction': 'str', - 'amount': 'str', - 'uid': 'str', - 'client_order_id': 'str', - 'timest': 'str', - 'source': 'str', - 'sub_account_type': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'sub_account': 'sub_account', - 'direction': 'direction', - 'amount': 'amount', - 'uid': 'uid', - 'client_order_id': 'client_order_id', - 'timest': 'timest', - 'source': 'source', - 'sub_account_type': 'sub_account_type' - } - - def __init__(self, currency=None, sub_account=None, direction=None, amount=None, uid=None, client_order_id=None, timest=None, source=None, sub_account_type='spot', local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None - """SubAccountTransfer - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._sub_account = None - self._direction = None - self._amount = None - self._uid = None - self._client_order_id = None - self._timest = None - self._source = None - self._sub_account_type = None - self.discriminator = None - - self.currency = currency - self.sub_account = sub_account - self.direction = direction - self.amount = amount - if uid is not None: - self.uid = uid - if client_order_id is not None: - self.client_order_id = client_order_id - if timest is not None: - self.timest = timest - if source is not None: - self.source = source - if sub_account_type is not None: - self.sub_account_type = sub_account_type - - @property - def currency(self): - """Gets the currency of this SubAccountTransfer. # noqa: E501 - - Transfer currency name # noqa: E501 - - :return: The currency of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this SubAccountTransfer. - - Transfer currency name # noqa: E501 - - :param currency: The currency of this SubAccountTransfer. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def sub_account(self): - """Gets the sub_account of this SubAccountTransfer. # noqa: E501 - - Sub account user ID # noqa: E501 - - :return: The sub_account of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._sub_account - - @sub_account.setter - def sub_account(self, sub_account): - """Sets the sub_account of this SubAccountTransfer. - - Sub account user ID # noqa: E501 - - :param sub_account: The sub_account of this SubAccountTransfer. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and sub_account is None: # noqa: E501 - raise ValueError("Invalid value for `sub_account`, must not be `None`") # noqa: E501 - - self._sub_account = sub_account - - @property - def direction(self): - """Gets the direction of this SubAccountTransfer. # noqa: E501 - - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 - - :return: The direction of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._direction - - @direction.setter - def direction(self, direction): - """Sets the direction of this SubAccountTransfer. - - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 - - :param direction: The direction of this SubAccountTransfer. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 - raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 - - self._direction = direction - - @property - def amount(self): - """Gets the amount of this SubAccountTransfer. # noqa: E501 - - Transfer amount # noqa: E501 - - :return: The amount of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this SubAccountTransfer. - - Transfer amount # noqa: E501 - - :param amount: The amount of this SubAccountTransfer. # 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 uid(self): - """Gets the uid of this SubAccountTransfer. # noqa: E501 - - Main account user ID # noqa: E501 - - :return: The uid of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this SubAccountTransfer. - - Main account user ID # noqa: E501 - - :param uid: The uid of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._uid = uid - - @property - def client_order_id(self): - """Gets the client_order_id of this SubAccountTransfer. # noqa: E501 - - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 - - :return: The client_order_id of this SubAccountTransfer. # 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 SubAccountTransfer. - - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 - - :param client_order_id: The client_order_id of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._client_order_id = client_order_id - - @property - def timest(self): - """Gets the timest of this SubAccountTransfer. # noqa: E501 - - Transfer timestamp # noqa: E501 - - :return: The timest of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._timest - - @timest.setter - def timest(self, timest): - """Sets the timest of this SubAccountTransfer. - - Transfer timestamp # noqa: E501 - - :param timest: The timest of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._timest = timest - - @property - def source(self): - """Gets the source of this SubAccountTransfer. # noqa: E501 - - Where the operation is initiated from # noqa: E501 - - :return: The source of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this SubAccountTransfer. - - Where the operation is initiated from # noqa: E501 - - :param source: The source of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._source = source - - @property - def sub_account_type(self): - """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501 - - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 - - :return: The sub_account_type of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._sub_account_type - - @sub_account_type.setter - def sub_account_type(self, sub_account_type): - """Sets the sub_account_type of this SubAccountTransfer. - - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 - - :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._sub_account_type = sub_account_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, SubAccountTransfer): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubAccountTransfer): - 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 deleted file mode 100644 index 4678b68..0000000 --- a/gate_api/models/sub_cross_margin_account.py +++ /dev/null @@ -1,541 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubCrossMarginAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'locked': 'bool', - 'balances': 'dict(str, CrossMarginBalance1)', - 'total': 'str', - 'borrowed': 'str', - 'borrowed_net': 'str', - 'net': 'str', - 'leverage': 'str', - 'interest': 'str', - 'risk': 'str', - 'total_initial_margin': 'str', - 'total_margin_balance': 'str', - 'total_maintenance_margin': 'str', - 'total_initial_margin_rate': 'str', - 'total_maintenance_margin_rate': 'str', - 'total_available_margin': 'str' - } - - attribute_map = { - 'user_id': 'user_id', - 'locked': 'locked', - 'balances': 'balances', - 'total': 'total', - 'borrowed': 'borrowed', - 'borrowed_net': 'borrowed_net', - 'net': 'net', - 'leverage': 'leverage', - 'interest': 'interest', - 'risk': 'risk', - 'total_initial_margin': 'total_initial_margin', - 'total_margin_balance': 'total_margin_balance', - 'total_maintenance_margin': 'total_maintenance_margin', - 'total_initial_margin_rate': 'total_initial_margin_rate', - 'total_maintenance_margin_rate': 'total_maintenance_margin_rate', - 'total_available_margin': 'total_available_margin' - } - - def __init__(self, user_id=None, locked=None, balances=None, total=None, borrowed=None, borrowed_net=None, net=None, leverage=None, interest=None, risk=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, local_vars_configuration=None): # noqa: E501 - # type: (int, bool, dict(str, CrossMarginBalance1), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """SubCrossMarginAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._locked = None - self._balances = None - self._total = None - self._borrowed = None - self._borrowed_net = None - self._net = None - self._leverage = None - self._interest = None - self._risk = None - self._total_initial_margin = None - self._total_margin_balance = None - self._total_maintenance_margin = None - self._total_initial_margin_rate = None - self._total_maintenance_margin_rate = None - self._total_available_margin = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if locked is not None: - self.locked = locked - if balances is not None: - self.balances = balances - if total is not None: - self.total = total - if borrowed is not None: - self.borrowed = borrowed - if borrowed_net is not None: - self.borrowed_net = borrowed_net - if net is not None: - self.net = net - if leverage is not None: - self.leverage = leverage - if interest is not None: - self.interest = interest - if risk is not None: - self.risk = risk - if total_initial_margin is not None: - self.total_initial_margin = total_initial_margin - if total_margin_balance is not None: - self.total_margin_balance = total_margin_balance - if total_maintenance_margin is not None: - self.total_maintenance_margin = total_maintenance_margin - if total_initial_margin_rate is not None: - self.total_initial_margin_rate = total_initial_margin_rate - if total_maintenance_margin_rate is not None: - self.total_maintenance_margin_rate = total_maintenance_margin_rate - if total_available_margin is not None: - self.total_available_margin = total_available_margin - - @property - def user_id(self): - """Gets the user_id of this SubCrossMarginAccount. # noqa: E501 - - User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501 - - :return: The user_id of this SubCrossMarginAccount. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this SubCrossMarginAccount. - - User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501 - - :param user_id: The user_id of this SubCrossMarginAccount. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def locked(self): - """Gets the locked of this SubCrossMarginAccount. # noqa: E501 - - Whether account is locked # noqa: E501 - - :return: The locked of this SubCrossMarginAccount. # noqa: E501 - :rtype: bool - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this SubCrossMarginAccount. - - Whether account is locked # noqa: E501 - - :param locked: The locked of this SubCrossMarginAccount. # noqa: E501 - :type: bool - """ - - self._locked = locked - - @property - def balances(self): - """Gets the balances of this SubCrossMarginAccount. # noqa: E501 - - - :return: The balances of this SubCrossMarginAccount. # noqa: E501 - :rtype: dict(str, CrossMarginBalance1) - """ - return self._balances - - @balances.setter - def balances(self, balances): - """Sets the balances of this SubCrossMarginAccount. - - - :param balances: The balances of this SubCrossMarginAccount. # noqa: E501 - :type: dict(str, CrossMarginBalance1) - """ - - self._balances = balances - - @property - def total(self): - """Gets the total of this SubCrossMarginAccount. # noqa: E501 - - Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 - - :return: The total of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this SubCrossMarginAccount. - - Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 - - :param total: The total of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def borrowed(self): - """Gets the borrowed of this SubCrossMarginAccount. # noqa: E501 - - Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 - - :return: The borrowed of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this SubCrossMarginAccount. - - Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 - - :param borrowed: The borrowed of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def borrowed_net(self): - """Gets the borrowed_net of this SubCrossMarginAccount. # noqa: E501 - - Total borrowed value in USDT * borrowed factor # noqa: E501 - - :return: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._borrowed_net - - @borrowed_net.setter - def borrowed_net(self, borrowed_net): - """Sets the borrowed_net of this SubCrossMarginAccount. - - Total borrowed value in USDT * borrowed factor # noqa: E501 - - :param borrowed_net: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._borrowed_net = borrowed_net - - @property - def net(self): - """Gets the net of this SubCrossMarginAccount. # noqa: E501 - - Total net assets in USDT # noqa: E501 - - :return: The net of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._net - - @net.setter - def net(self, net): - """Sets the net of this SubCrossMarginAccount. - - Total net assets in USDT # noqa: E501 - - :param net: The net of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._net = net - - @property - def leverage(self): - """Gets the leverage of this SubCrossMarginAccount. # noqa: E501 - - Position leverage # noqa: E501 - - :return: The leverage of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this SubCrossMarginAccount. - - Position leverage # noqa: E501 - - :param leverage: The leverage of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def interest(self): - """Gets the interest of this SubCrossMarginAccount. # noqa: E501 - - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 - - :return: The interest of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this SubCrossMarginAccount. - - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 - - :param interest: The interest of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._interest = interest - - @property - def risk(self): - """Gets the risk of this SubCrossMarginAccount. # noqa: E501 - - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 - - :return: The risk of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._risk - - @risk.setter - def risk(self, risk): - """Sets the risk of this SubCrossMarginAccount. - - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 - - :param risk: The risk of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._risk = risk - - @property - def total_initial_margin(self): - """Gets the total_initial_margin of this SubCrossMarginAccount. # noqa: E501 - - Total initial margin # noqa: E501 - - :return: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin - - @total_initial_margin.setter - def total_initial_margin(self, total_initial_margin): - """Sets the total_initial_margin of this SubCrossMarginAccount. - - Total initial margin # noqa: E501 - - :param total_initial_margin: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin = total_initial_margin - - @property - def total_margin_balance(self): - """Gets the total_margin_balance of this SubCrossMarginAccount. # noqa: E501 - - Total margin balance # noqa: E501 - - :return: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_margin_balance - - @total_margin_balance.setter - def total_margin_balance(self, total_margin_balance): - """Sets the total_margin_balance of this SubCrossMarginAccount. - - Total margin balance # noqa: E501 - - :param total_margin_balance: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_margin_balance = total_margin_balance - - @property - def total_maintenance_margin(self): - """Gets the total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 - - Total maintenance margin # noqa: E501 - - :return: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin - - @total_maintenance_margin.setter - def total_maintenance_margin(self, total_maintenance_margin): - """Sets the total_maintenance_margin of this SubCrossMarginAccount. - - Total maintenance margin # noqa: E501 - - :param total_maintenance_margin: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin = total_maintenance_margin - - @property - def total_initial_margin_rate(self): - """Gets the total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 - - Total initial margin rate # noqa: E501 - - :return: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin_rate - - @total_initial_margin_rate.setter - def total_initial_margin_rate(self, total_initial_margin_rate): - """Sets the total_initial_margin_rate of this SubCrossMarginAccount. - - Total initial margin rate # noqa: E501 - - :param total_initial_margin_rate: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin_rate = total_initial_margin_rate - - @property - def total_maintenance_margin_rate(self): - """Gets the total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 - - Total maintenance margin rate # noqa: E501 - - :return: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin_rate - - @total_maintenance_margin_rate.setter - def total_maintenance_margin_rate(self, total_maintenance_margin_rate): - """Sets the total_maintenance_margin_rate of this SubCrossMarginAccount. - - Total maintenance margin rate # noqa: E501 - - :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin_rate = total_maintenance_margin_rate - - @property - def total_available_margin(self): - """Gets the total_available_margin of this SubCrossMarginAccount. # noqa: E501 - - Total available margin # noqa: E501 - - :return: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_available_margin - - @total_available_margin.setter - def total_available_margin(self, total_available_margin): - """Sets the total_available_margin of this SubCrossMarginAccount. - - Total available margin # noqa: E501 - - :param total_available_margin: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_available_margin = total_available_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, SubCrossMarginAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubCrossMarginAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py deleted file mode 100644 index 8253743..0000000 --- a/gate_api/models/sub_user_mode.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SubUserMode(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'is_unified': 'bool', - 'mode': 'str' - } - - attribute_map = { - 'user_id': 'user_id', - 'is_unified': 'is_unified', - 'mode': 'mode' - } - - def __init__(self, user_id=None, is_unified=None, mode=None, local_vars_configuration=None): # noqa: E501 - # type: (int, bool, str, Configuration) -> None - """SubUserMode - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._is_unified = None - self._mode = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if is_unified is not None: - self.is_unified = is_unified - if mode is not None: - self.mode = mode - - @property - def user_id(self): - """Gets the user_id of this SubUserMode. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this SubUserMode. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this SubUserMode. - - User ID # noqa: E501 - - :param user_id: The user_id of this SubUserMode. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def is_unified(self): - """Gets the is_unified of this SubUserMode. # noqa: E501 - - Is it a unified account? # noqa: E501 - - :return: The is_unified of this SubUserMode. # noqa: E501 - :rtype: bool - """ - return self._is_unified - - @is_unified.setter - def is_unified(self, is_unified): - """Sets the is_unified of this SubUserMode. - - Is it a unified account? # noqa: E501 - - :param is_unified: The is_unified of this SubUserMode. # noqa: E501 - :type: bool - """ - - self._is_unified = is_unified - - @property - def mode(self): - """Gets the mode of this SubUserMode. # noqa: E501 - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 - - :return: The mode of this SubUserMode. # noqa: E501 - :rtype: str - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this SubUserMode. - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 - - :param mode: The mode of this SubUserMode. # noqa: E501 - :type: str - """ - - self._mode = mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubUserMode): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubUserMode): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py deleted file mode 100644 index 570a069..0000000 --- a/gate_api/models/system_time.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class SystemTime(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'server_time': 'int' - } - - attribute_map = { - 'server_time': 'server_time' - } - - def __init__(self, server_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """SystemTime - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._server_time = None - self.discriminator = None - - if server_time is not None: - self.server_time = server_time - - @property - def server_time(self): - """Gets the server_time of this SystemTime. # noqa: E501 - - Server current time(ms) # noqa: E501 - - :return: The server_time of this SystemTime. # noqa: E501 - :rtype: int - """ - return self._server_time - - @server_time.setter - def server_time(self, server_time): - """Sets the server_time of this SystemTime. - - Server current time(ms) # noqa: E501 - - :param server_time: The server_time of this SystemTime. # noqa: E501 - :type: int - """ - - self._server_time = server_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, SystemTime): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SystemTime): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py deleted file mode 100644 index 32a0666..0000000 --- a/gate_api/models/ticker.py +++ /dev/null @@ -1,568 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Ticker(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'last': 'str', - 'lowest_ask': 'str', - 'lowest_size': 'str', - 'highest_bid': 'str', - 'highest_size': 'str', - 'change_percentage': 'str', - 'change_utc0': 'str', - 'change_utc8': 'str', - 'base_volume': 'str', - 'quote_volume': 'str', - 'high_24h': 'str', - 'low_24h': 'str', - 'etf_net_value': 'str', - 'etf_pre_net_value': 'str', - 'etf_pre_timestamp': 'int', - 'etf_leverage': 'str' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'last': 'last', - 'lowest_ask': 'lowest_ask', - 'lowest_size': 'lowest_size', - 'highest_bid': 'highest_bid', - 'highest_size': 'highest_size', - 'change_percentage': 'change_percentage', - 'change_utc0': 'change_utc0', - 'change_utc8': 'change_utc8', - 'base_volume': 'base_volume', - 'quote_volume': 'quote_volume', - 'high_24h': 'high_24h', - 'low_24h': 'low_24h', - 'etf_net_value': 'etf_net_value', - 'etf_pre_net_value': 'etf_pre_net_value', - 'etf_pre_timestamp': 'etf_pre_timestamp', - 'etf_leverage': 'etf_leverage' - } - - def __init__(self, currency_pair=None, last=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, change_percentage=None, change_utc0=None, change_utc8=None, base_volume=None, quote_volume=None, high_24h=None, low_24h=None, etf_net_value=None, etf_pre_net_value=None, etf_pre_timestamp=None, etf_leverage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, str, Configuration) -> None - """Ticker - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pair = None - self._last = None - self._lowest_ask = None - self._lowest_size = None - self._highest_bid = None - self._highest_size = None - self._change_percentage = None - self._change_utc0 = None - self._change_utc8 = None - self._base_volume = None - self._quote_volume = None - self._high_24h = None - self._low_24h = None - self._etf_net_value = None - self._etf_pre_net_value = None - self._etf_pre_timestamp = None - self._etf_leverage = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if last is not None: - self.last = last - if lowest_ask is not None: - self.lowest_ask = lowest_ask - if lowest_size is not None: - self.lowest_size = lowest_size - if highest_bid is not None: - self.highest_bid = highest_bid - if highest_size is not None: - self.highest_size = highest_size - if change_percentage is not None: - self.change_percentage = change_percentage - if change_utc0 is not None: - self.change_utc0 = change_utc0 - if change_utc8 is not None: - self.change_utc8 = change_utc8 - if base_volume is not None: - self.base_volume = base_volume - if quote_volume is not None: - self.quote_volume = quote_volume - if high_24h is not None: - self.high_24h = high_24h - if low_24h is not None: - self.low_24h = low_24h - if etf_net_value is not None: - self.etf_net_value = etf_net_value - self.etf_pre_net_value = etf_pre_net_value - self.etf_pre_timestamp = etf_pre_timestamp - self.etf_leverage = etf_leverage - - @property - def currency_pair(self): - """Gets the currency_pair of this Ticker. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this Ticker. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this Ticker. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this Ticker. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def last(self): - """Gets the last of this Ticker. # noqa: E501 - - Last trading price # noqa: E501 - - :return: The last of this Ticker. # noqa: E501 - :rtype: str - """ - return self._last - - @last.setter - def last(self, last): - """Sets the last of this Ticker. - - Last trading price # noqa: E501 - - :param last: The last of this Ticker. # noqa: E501 - :type: str - """ - - self._last = last - - @property - def lowest_ask(self): - """Gets the lowest_ask of this Ticker. # noqa: E501 - - Recent lowest ask # noqa: E501 - - :return: The lowest_ask of this Ticker. # noqa: E501 - :rtype: str - """ - return self._lowest_ask - - @lowest_ask.setter - def lowest_ask(self, lowest_ask): - """Sets the lowest_ask of this Ticker. - - Recent lowest ask # noqa: E501 - - :param lowest_ask: The lowest_ask of this Ticker. # noqa: E501 - :type: str - """ - - self._lowest_ask = lowest_ask - - @property - def lowest_size(self): - """Gets the lowest_size of this Ticker. # noqa: E501 - - The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 - - :return: The lowest_size of this Ticker. # noqa: E501 - :rtype: str - """ - return self._lowest_size - - @lowest_size.setter - def lowest_size(self, lowest_size): - """Sets the lowest_size of this Ticker. - - The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 - - :param lowest_size: The lowest_size of this Ticker. # noqa: E501 - :type: str - """ - - self._lowest_size = lowest_size - - @property - def highest_bid(self): - """Gets the highest_bid of this Ticker. # noqa: E501 - - Recent highest bid # noqa: E501 - - :return: The highest_bid of this Ticker. # noqa: E501 - :rtype: str - """ - return self._highest_bid - - @highest_bid.setter - def highest_bid(self, highest_bid): - """Sets the highest_bid of this Ticker. - - Recent highest bid # noqa: E501 - - :param highest_bid: The highest_bid of this Ticker. # noqa: E501 - :type: str - """ - - self._highest_bid = highest_bid - - @property - def highest_size(self): - """Gets the highest_size of this Ticker. # noqa: E501 - - The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 - - :return: The highest_size of this Ticker. # noqa: E501 - :rtype: str - """ - return self._highest_size - - @highest_size.setter - def highest_size(self, highest_size): - """Sets the highest_size of this Ticker. - - The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 - - :param highest_size: The highest_size of this Ticker. # noqa: E501 - :type: str - """ - - self._highest_size = highest_size - - @property - def change_percentage(self): - """Gets the change_percentage of this Ticker. # noqa: E501 - - Change percentage in the last 24h # noqa: E501 - - :return: The change_percentage of this Ticker. # noqa: E501 - :rtype: str - """ - return self._change_percentage - - @change_percentage.setter - def change_percentage(self, change_percentage): - """Sets the change_percentage of this Ticker. - - Change percentage in the last 24h # noqa: E501 - - :param change_percentage: The change_percentage of this Ticker. # noqa: E501 - :type: str - """ - - self._change_percentage = change_percentage - - @property - def change_utc0(self): - """Gets the change_utc0 of this Ticker. # noqa: E501 - - utc0 timezone, the percentage change in the last 24 hours # noqa: E501 - - :return: The change_utc0 of this Ticker. # noqa: E501 - :rtype: str - """ - return self._change_utc0 - - @change_utc0.setter - def change_utc0(self, change_utc0): - """Sets the change_utc0 of this Ticker. - - utc0 timezone, the percentage change in the last 24 hours # noqa: E501 - - :param change_utc0: The change_utc0 of this Ticker. # noqa: E501 - :type: str - """ - - self._change_utc0 = change_utc0 - - @property - def change_utc8(self): - """Gets the change_utc8 of this Ticker. # noqa: E501 - - utc8 timezone, the percentage change in the last 24 hours # noqa: E501 - - :return: The change_utc8 of this Ticker. # noqa: E501 - :rtype: str - """ - return self._change_utc8 - - @change_utc8.setter - def change_utc8(self, change_utc8): - """Sets the change_utc8 of this Ticker. - - utc8 timezone, the percentage change in the last 24 hours # noqa: E501 - - :param change_utc8: The change_utc8 of this Ticker. # noqa: E501 - :type: str - """ - - self._change_utc8 = change_utc8 - - @property - def base_volume(self): - """Gets the base_volume of this Ticker. # noqa: E501 - - Base currency trade volume in the last 24h # noqa: E501 - - :return: The base_volume of this Ticker. # noqa: E501 - :rtype: str - """ - return self._base_volume - - @base_volume.setter - def base_volume(self, base_volume): - """Sets the base_volume of this Ticker. - - Base currency trade volume in the last 24h # noqa: E501 - - :param base_volume: The base_volume of this Ticker. # noqa: E501 - :type: str - """ - - self._base_volume = base_volume - - @property - def quote_volume(self): - """Gets the quote_volume of this Ticker. # noqa: E501 - - Quote currency trade volume in the last 24h # noqa: E501 - - :return: The quote_volume of this Ticker. # noqa: E501 - :rtype: str - """ - return self._quote_volume - - @quote_volume.setter - def quote_volume(self, quote_volume): - """Sets the quote_volume of this Ticker. - - Quote currency trade volume in the last 24h # noqa: E501 - - :param quote_volume: The quote_volume of this Ticker. # noqa: E501 - :type: str - """ - - self._quote_volume = quote_volume - - @property - def high_24h(self): - """Gets the high_24h of this Ticker. # noqa: E501 - - Highest price in 24h # noqa: E501 - - :return: The high_24h of this Ticker. # noqa: E501 - :rtype: str - """ - return self._high_24h - - @high_24h.setter - def high_24h(self, high_24h): - """Sets the high_24h of this Ticker. - - Highest price in 24h # noqa: E501 - - :param high_24h: The high_24h of this Ticker. # noqa: E501 - :type: str - """ - - self._high_24h = high_24h - - @property - def low_24h(self): - """Gets the low_24h of this Ticker. # noqa: E501 - - Lowest price in 24h # noqa: E501 - - :return: The low_24h of this Ticker. # noqa: E501 - :rtype: str - """ - return self._low_24h - - @low_24h.setter - def low_24h(self, low_24h): - """Sets the low_24h of this Ticker. - - Lowest price in 24h # noqa: E501 - - :param low_24h: The low_24h of this Ticker. # noqa: E501 - :type: str - """ - - self._low_24h = low_24h - - @property - def etf_net_value(self): - """Gets the etf_net_value of this Ticker. # noqa: E501 - - ETF net value # noqa: E501 - - :return: The etf_net_value of this Ticker. # noqa: E501 - :rtype: str - """ - return self._etf_net_value - - @etf_net_value.setter - def etf_net_value(self, etf_net_value): - """Sets the etf_net_value of this Ticker. - - ETF net value # noqa: E501 - - :param etf_net_value: The etf_net_value of this Ticker. # noqa: E501 - :type: str - """ - - self._etf_net_value = etf_net_value - - @property - def etf_pre_net_value(self): - """Gets the etf_pre_net_value of this Ticker. # noqa: E501 - - ETF previous net value at re-balancing time # noqa: E501 - - :return: The etf_pre_net_value of this Ticker. # noqa: E501 - :rtype: str - """ - return self._etf_pre_net_value - - @etf_pre_net_value.setter - def etf_pre_net_value(self, etf_pre_net_value): - """Sets the etf_pre_net_value of this Ticker. - - ETF previous net value at re-balancing time # noqa: E501 - - :param etf_pre_net_value: The etf_pre_net_value of this Ticker. # noqa: E501 - :type: str - """ - - self._etf_pre_net_value = etf_pre_net_value - - @property - def etf_pre_timestamp(self): - """Gets the etf_pre_timestamp of this Ticker. # noqa: E501 - - ETF previous re-balancing time # noqa: E501 - - :return: The etf_pre_timestamp of this Ticker. # noqa: E501 - :rtype: int - """ - return self._etf_pre_timestamp - - @etf_pre_timestamp.setter - def etf_pre_timestamp(self, etf_pre_timestamp): - """Sets the etf_pre_timestamp of this Ticker. - - ETF previous re-balancing time # noqa: E501 - - :param etf_pre_timestamp: The etf_pre_timestamp of this Ticker. # noqa: E501 - :type: int - """ - - self._etf_pre_timestamp = etf_pre_timestamp - - @property - def etf_leverage(self): - """Gets the etf_leverage of this Ticker. # noqa: E501 - - ETF current leverage # noqa: E501 - - :return: The etf_leverage of this Ticker. # noqa: E501 - :rtype: str - """ - return self._etf_leverage - - @etf_leverage.setter - def etf_leverage(self, etf_leverage): - """Sets the etf_leverage of this Ticker. - - ETF current leverage # noqa: E501 - - :param etf_leverage: The etf_leverage of this Ticker. # noqa: E501 - :type: str - """ - - self._etf_leverage = etf_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, Ticker): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Ticker): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py deleted file mode 100644 index 0adc29b..0000000 --- a/gate_api/models/total_balance.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class TotalBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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': 'AccountBalance', - 'details': 'dict(str, AccountBalance)' - } - - attribute_map = { - 'total': 'total', - 'details': 'details' - } - - def __init__(self, total=None, details=None, local_vars_configuration=None): # noqa: E501 - # type: (AccountBalance, dict(str, AccountBalance), Configuration) -> None - """TotalBalance - a 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._details = None - self.discriminator = None - - if total is not None: - self.total = total - if details is not None: - self.details = details - - @property - def total(self): - """Gets the total of this TotalBalance. # noqa: E501 - - - :return: The total of this TotalBalance. # noqa: E501 - :rtype: AccountBalance - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this TotalBalance. - - - :param total: The total of this TotalBalance. # noqa: E501 - :type: AccountBalance - """ - - self._total = total - - @property - def details(self): - """Gets the details of this TotalBalance. # noqa: E501 - - Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501 - - :return: The details of this TotalBalance. # noqa: E501 - :rtype: dict(str, AccountBalance) - """ - return self._details - - @details.setter - def details(self, details): - """Sets the details of this TotalBalance. - - Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501 - - :param details: The details of this TotalBalance. # noqa: E501 - :type: dict(str, AccountBalance) - """ - - self._details = details - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TotalBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TotalBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py deleted file mode 100644 index cffe9a0..0000000 --- a/gate_api/models/trade.py +++ /dev/null @@ -1,555 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Trade(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'create_time': 'str', - 'create_time_ms': 'str', - 'currency_pair': 'str', - 'side': 'str', - 'role': 'str', - 'amount': 'str', - 'price': 'str', - 'order_id': 'str', - 'fee': 'str', - 'fee_currency': 'str', - 'point_fee': 'str', - 'gt_fee': 'str', - 'amend_text': 'str', - 'sequence_id': 'str', - 'text': 'str' - } - - attribute_map = { - 'id': 'id', - 'create_time': 'create_time', - 'create_time_ms': 'create_time_ms', - 'currency_pair': 'currency_pair', - 'side': 'side', - 'role': 'role', - 'amount': 'amount', - 'price': 'price', - 'order_id': 'order_id', - 'fee': 'fee', - 'fee_currency': 'fee_currency', - 'point_fee': 'point_fee', - 'gt_fee': 'gt_fee', - 'amend_text': 'amend_text', - 'sequence_id': 'sequence_id', - 'text': 'text' - } - - def __init__(self, id=None, create_time=None, create_time_ms=None, currency_pair=None, side=None, role=None, amount=None, price=None, order_id=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, amend_text=None, sequence_id=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """Trade - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._create_time = None - self._create_time_ms = None - self._currency_pair = None - self._side = None - self._role = None - self._amount = None - self._price = None - self._order_id = None - self._fee = None - self._fee_currency = None - self._point_fee = None - self._gt_fee = None - self._amend_text = None - self._sequence_id = None - self._text = None - self.discriminator = None - - if id is not None: - self.id = id - if create_time is not None: - self.create_time = create_time - if create_time_ms is not None: - self.create_time_ms = create_time_ms - if currency_pair is not None: - self.currency_pair = currency_pair - if side is not None: - self.side = side - if role is not None: - self.role = role - if amount is not None: - self.amount = amount - if price is not None: - self.price = price - if order_id is not None: - self.order_id = order_id - if fee is not None: - self.fee = fee - if fee_currency is not None: - self.fee_currency = fee_currency - if point_fee is not None: - self.point_fee = point_fee - if gt_fee is not None: - self.gt_fee = gt_fee - if amend_text is not None: - self.amend_text = amend_text - if sequence_id is not None: - self.sequence_id = sequence_id - if text is not None: - self.text = text - - @property - def id(self): - """Gets the id of this Trade. # noqa: E501 - - Trade ID # noqa: E501 - - :return: The id of this Trade. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Trade. - - Trade ID # noqa: E501 - - :param id: The id of this Trade. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def create_time(self): - """Gets the create_time of this Trade. # noqa: E501 - - Trading time # noqa: E501 - - :return: The create_time of this Trade. # noqa: E501 - :rtype: str - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this Trade. - - Trading time # noqa: E501 - - :param create_time: The create_time of this Trade. # noqa: E501 - :type: str - """ - - self._create_time = create_time - - @property - def create_time_ms(self): - """Gets the create_time_ms of this Trade. # noqa: E501 - - Trading time, with millisecond precision # noqa: E501 - - :return: The create_time_ms of this Trade. # noqa: E501 - :rtype: str - """ - return self._create_time_ms - - @create_time_ms.setter - def create_time_ms(self, create_time_ms): - """Sets the create_time_ms of this Trade. - - Trading time, with millisecond precision # noqa: E501 - - :param create_time_ms: The create_time_ms of this Trade. # noqa: E501 - :type: str - """ - - self._create_time_ms = create_time_ms - - @property - def currency_pair(self): - """Gets the currency_pair of this Trade. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this Trade. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this Trade. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this Trade. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def side(self): - """Gets the side of this Trade. # noqa: E501 - - Order side # noqa: E501 - - :return: The side of this Trade. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this Trade. - - Order side # noqa: E501 - - :param side: The side of this Trade. # noqa: E501 - :type: str - """ - 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 role(self): - """Gets the role of this Trade. # noqa: E501 - - Trade role. No value in public endpoints # noqa: E501 - - :return: The role of this Trade. # noqa: E501 - :rtype: str - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this Trade. - - Trade role. No value in public endpoints # noqa: E501 - - :param role: The role of this Trade. # noqa: E501 - :type: str - """ - allowed_values = ["taker", "maker"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 - .format(role, allowed_values) - ) - - self._role = role - - @property - def amount(self): - """Gets the amount of this Trade. # noqa: E501 - - Trade amount # noqa: E501 - - :return: The amount of this Trade. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this Trade. - - Trade amount # noqa: E501 - - :param amount: The amount of this Trade. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def price(self): - """Gets the price of this Trade. # noqa: E501 - - Order price # noqa: E501 - - :return: The price of this Trade. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this Trade. - - Order price # noqa: E501 - - :param price: The price of this Trade. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def order_id(self): - """Gets the order_id of this Trade. # noqa: E501 - - Related order ID. No value in public endpoints # noqa: E501 - - :return: The order_id of this Trade. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this Trade. - - Related order ID. No value in public endpoints # noqa: E501 - - :param order_id: The order_id of this Trade. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def fee(self): - """Gets the fee of this Trade. # noqa: E501 - - Fee deducted. No value in public endpoints # noqa: E501 - - :return: The fee of this Trade. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this Trade. - - Fee deducted. No value in public endpoints # noqa: E501 - - :param fee: The fee of this Trade. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def fee_currency(self): - """Gets the fee_currency of this Trade. # noqa: E501 - - Fee currency unit. No value in public endpoints # noqa: E501 - - :return: The fee_currency of this Trade. # noqa: E501 - :rtype: str - """ - return self._fee_currency - - @fee_currency.setter - def fee_currency(self, fee_currency): - """Sets the fee_currency of this Trade. - - Fee currency unit. No value in public endpoints # noqa: E501 - - :param fee_currency: The fee_currency of this Trade. # noqa: E501 - :type: str - """ - - self._fee_currency = fee_currency - - @property - def point_fee(self): - """Gets the point_fee of this Trade. # noqa: E501 - - Points used to deduct fee. No value in public endpoints # noqa: E501 - - :return: The point_fee of this Trade. # noqa: E501 - :rtype: str - """ - return self._point_fee - - @point_fee.setter - def point_fee(self, point_fee): - """Sets the point_fee of this Trade. - - Points used to deduct fee. No value in public endpoints # noqa: E501 - - :param point_fee: The point_fee of this Trade. # noqa: E501 - :type: str - """ - - self._point_fee = point_fee - - @property - def gt_fee(self): - """Gets the gt_fee of this Trade. # noqa: E501 - - GT used to deduct fee. No value in public endpoints # noqa: E501 - - :return: The gt_fee of this Trade. # noqa: E501 - :rtype: str - """ - return self._gt_fee - - @gt_fee.setter - def gt_fee(self, gt_fee): - """Sets the gt_fee of this Trade. - - GT used to deduct fee. No value in public endpoints # noqa: E501 - - :param gt_fee: The gt_fee of this Trade. # noqa: E501 - :type: str - """ - - self._gt_fee = gt_fee - - @property - def amend_text(self): - """Gets the amend_text of this Trade. # noqa: E501 - - The custom data that the user remarked when amending the order # noqa: E501 - - :return: The amend_text of this Trade. # noqa: E501 - :rtype: str - """ - return self._amend_text - - @amend_text.setter - def amend_text(self, amend_text): - """Sets the amend_text of this Trade. - - The custom data that the user remarked when amending the order # noqa: E501 - - :param amend_text: The amend_text of this Trade. # noqa: E501 - :type: str - """ - - self._amend_text = amend_text - - @property - def sequence_id(self): - """Gets the sequence_id of this Trade. # noqa: E501 - - Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market # noqa: E501 - - :return: The sequence_id of this Trade. # noqa: E501 - :rtype: str - """ - return self._sequence_id - - @sequence_id.setter - def sequence_id(self, sequence_id): - """Sets the sequence_id of this Trade. - - Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market # noqa: E501 - - :param sequence_id: The sequence_id of this Trade. # noqa: E501 - :type: str - """ - - self._sequence_id = sequence_id - - @property - def text(self): - """Gets the text of this Trade. # noqa: E501 - - User defined information. No value in public endpoints # noqa: E501 - - :return: The text of this Trade. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this Trade. - - User defined information. No value in public endpoints # noqa: E501 - - :param text: The text of this Trade. # noqa: E501 - :type: str - """ - - self._text = text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Trade): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Trade): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py deleted file mode 100644 index 47b0c08..0000000 --- a/gate_api/models/trade_fee.py +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class TradeFee(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'taker_fee': 'str', - 'maker_fee': 'str', - 'gt_discount': 'bool', - 'gt_taker_fee': 'str', - 'gt_maker_fee': 'str', - 'loan_fee': 'str', - 'point_type': 'str', - 'futures_taker_fee': 'str', - 'futures_maker_fee': 'str', - 'delivery_taker_fee': 'str', - 'delivery_maker_fee': 'str', - 'debit_fee': 'int' - } - - attribute_map = { - 'user_id': 'user_id', - 'taker_fee': 'taker_fee', - 'maker_fee': 'maker_fee', - 'gt_discount': 'gt_discount', - 'gt_taker_fee': 'gt_taker_fee', - 'gt_maker_fee': 'gt_maker_fee', - 'loan_fee': 'loan_fee', - 'point_type': 'point_type', - 'futures_taker_fee': 'futures_taker_fee', - 'futures_maker_fee': 'futures_maker_fee', - 'delivery_taker_fee': 'delivery_taker_fee', - 'delivery_maker_fee': 'delivery_maker_fee', - 'debit_fee': 'debit_fee' - } - - def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=None, gt_taker_fee=None, gt_maker_fee=None, loan_fee=None, point_type=None, futures_taker_fee=None, futures_maker_fee=None, delivery_taker_fee=None, delivery_maker_fee=None, debit_fee=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, bool, str, str, str, str, str, str, str, str, int, Configuration) -> None - """TradeFee - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._taker_fee = None - self._maker_fee = None - self._gt_discount = None - self._gt_taker_fee = None - self._gt_maker_fee = None - self._loan_fee = None - self._point_type = None - self._futures_taker_fee = None - self._futures_maker_fee = None - self._delivery_taker_fee = None - self._delivery_maker_fee = None - self._debit_fee = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if taker_fee is not None: - self.taker_fee = taker_fee - if maker_fee is not None: - self.maker_fee = maker_fee - if gt_discount is not None: - self.gt_discount = gt_discount - if gt_taker_fee is not None: - self.gt_taker_fee = gt_taker_fee - if gt_maker_fee is not None: - self.gt_maker_fee = gt_maker_fee - if loan_fee is not None: - self.loan_fee = loan_fee - if point_type is not None: - self.point_type = point_type - if futures_taker_fee is not None: - self.futures_taker_fee = futures_taker_fee - if futures_maker_fee is not None: - self.futures_maker_fee = futures_maker_fee - if delivery_taker_fee is not None: - self.delivery_taker_fee = delivery_taker_fee - if delivery_maker_fee is not None: - self.delivery_maker_fee = delivery_maker_fee - if debit_fee is not None: - self.debit_fee = debit_fee - - @property - def user_id(self): - """Gets the user_id of this TradeFee. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this TradeFee. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this TradeFee. - - User ID # noqa: E501 - - :param user_id: The user_id of this TradeFee. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def taker_fee(self): - """Gets the taker_fee of this TradeFee. # noqa: E501 - - taker fee rate # noqa: E501 - - :return: The taker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._taker_fee - - @taker_fee.setter - def taker_fee(self, taker_fee): - """Sets the taker_fee of this TradeFee. - - taker fee rate # noqa: E501 - - :param taker_fee: The taker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._taker_fee = taker_fee - - @property - def maker_fee(self): - """Gets the maker_fee of this TradeFee. # noqa: E501 - - maker fee rate # noqa: E501 - - :return: The maker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._maker_fee - - @maker_fee.setter - def maker_fee(self, maker_fee): - """Sets the maker_fee of this TradeFee. - - maker fee rate # noqa: E501 - - :param maker_fee: The maker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._maker_fee = maker_fee - - @property - def gt_discount(self): - """Gets the gt_discount of this TradeFee. # noqa: E501 - - If GT deduction is enabled # noqa: E501 - - :return: The gt_discount of this TradeFee. # noqa: E501 - :rtype: bool - """ - return self._gt_discount - - @gt_discount.setter - def gt_discount(self, gt_discount): - """Sets the gt_discount of this TradeFee. - - If GT deduction is enabled # noqa: E501 - - :param gt_discount: The gt_discount of this TradeFee. # noqa: E501 - :type: bool - """ - - self._gt_discount = gt_discount - - @property - def gt_taker_fee(self): - """Gets the gt_taker_fee of this TradeFee. # noqa: E501 - - Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :return: The gt_taker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._gt_taker_fee - - @gt_taker_fee.setter - def gt_taker_fee(self, gt_taker_fee): - """Sets the gt_taker_fee of this TradeFee. - - Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :param gt_taker_fee: The gt_taker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._gt_taker_fee = gt_taker_fee - - @property - def gt_maker_fee(self): - """Gets the gt_maker_fee of this TradeFee. # noqa: E501 - - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :return: The gt_maker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._gt_maker_fee - - @gt_maker_fee.setter - def gt_maker_fee(self, gt_maker_fee): - """Sets the gt_maker_fee of this TradeFee. - - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 - - :param gt_maker_fee: The gt_maker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._gt_maker_fee = gt_maker_fee - - @property - def loan_fee(self): - """Gets the loan_fee of this TradeFee. # noqa: E501 - - Loan fee rate of margin lending # noqa: E501 - - :return: The loan_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._loan_fee - - @loan_fee.setter - def loan_fee(self, loan_fee): - """Sets the loan_fee of this TradeFee. - - Loan fee rate of margin lending # noqa: E501 - - :param loan_fee: The loan_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._loan_fee = loan_fee - - @property - def point_type(self): - """Gets the point_type of this TradeFee. # noqa: E501 - - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 - - :return: The point_type of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._point_type - - @point_type.setter - def point_type(self, point_type): - """Sets the point_type of this TradeFee. - - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 - - :param point_type: The point_type of this TradeFee. # noqa: E501 - :type: str - """ - - self._point_type = point_type - - @property - def futures_taker_fee(self): - """Gets the futures_taker_fee of this TradeFee. # noqa: E501 - - Futures trading taker fee # noqa: E501 - - :return: The futures_taker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._futures_taker_fee - - @futures_taker_fee.setter - def futures_taker_fee(self, futures_taker_fee): - """Sets the futures_taker_fee of this TradeFee. - - Futures trading taker fee # noqa: E501 - - :param futures_taker_fee: The futures_taker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._futures_taker_fee = futures_taker_fee - - @property - def futures_maker_fee(self): - """Gets the futures_maker_fee of this TradeFee. # noqa: E501 - - Future trading maker fee # noqa: E501 - - :return: The futures_maker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._futures_maker_fee - - @futures_maker_fee.setter - def futures_maker_fee(self, futures_maker_fee): - """Sets the futures_maker_fee of this TradeFee. - - Future trading maker fee # noqa: E501 - - :param futures_maker_fee: The futures_maker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._futures_maker_fee = futures_maker_fee - - @property - def delivery_taker_fee(self): - """Gets the delivery_taker_fee of this TradeFee. # noqa: E501 - - Delivery trading taker fee # noqa: E501 - - :return: The delivery_taker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._delivery_taker_fee - - @delivery_taker_fee.setter - def delivery_taker_fee(self, delivery_taker_fee): - """Sets the delivery_taker_fee of this TradeFee. - - Delivery trading taker fee # noqa: E501 - - :param delivery_taker_fee: The delivery_taker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._delivery_taker_fee = delivery_taker_fee - - @property - def delivery_maker_fee(self): - """Gets the delivery_maker_fee of this TradeFee. # noqa: E501 - - Delivery trading maker fee # noqa: E501 - - :return: The delivery_maker_fee of this TradeFee. # noqa: E501 - :rtype: str - """ - return self._delivery_maker_fee - - @delivery_maker_fee.setter - def delivery_maker_fee(self, delivery_maker_fee): - """Sets the delivery_maker_fee of this TradeFee. - - Delivery trading maker fee # noqa: E501 - - :param delivery_maker_fee: The delivery_maker_fee of this TradeFee. # noqa: E501 - :type: str - """ - - self._delivery_maker_fee = delivery_maker_fee - - @property - def debit_fee(self): - """Gets the debit_fee of this TradeFee. # noqa: E501 - - Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 - - :return: The debit_fee of this TradeFee. # noqa: E501 - :rtype: int - """ - return self._debit_fee - - @debit_fee.setter - def debit_fee(self, debit_fee): - """Sets the debit_fee of this TradeFee. - - Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 - - :param debit_fee: The debit_fee of this TradeFee. # noqa: E501 - :type: int - """ - - self._debit_fee = debit_fee - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TradeFee): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TradeFee): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py deleted file mode 100644 index 8b3da4d..0000000 --- a/gate_api/models/transaction_id.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class TransactionID(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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': 'int' - } - - attribute_map = { - 'tx_id': 'tx_id' - } - - def __init__(self, tx_id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """TransactionID - a 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.discriminator = None - - if tx_id is not None: - self.tx_id = tx_id - - @property - def tx_id(self): - """Gets the tx_id of this TransactionID. # noqa: E501 - - Order id # noqa: E501 - - :return: The tx_id of this TransactionID. # noqa: E501 - :rtype: int - """ - return self._tx_id - - @tx_id.setter - def tx_id(self, tx_id): - """Sets the tx_id of this TransactionID. - - Order id # noqa: E501 - - :param tx_id: The tx_id of this TransactionID. # noqa: E501 - :type: int - """ - - self._tx_id = tx_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, TransactionID): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TransactionID): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py deleted file mode 100644 index 0e49717..0000000 --- a/gate_api/models/transfer.py +++ /dev/null @@ -1,279 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Transfer(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - '_from': 'str', - 'to': 'str', - 'amount': 'str', - 'currency_pair': 'str', - 'settle': 'str' - } - - attribute_map = { - 'currency': 'currency', - '_from': 'from', - 'to': 'to', - 'amount': 'amount', - 'currency_pair': 'currency_pair', - 'settle': 'settle' - } - - def __init__(self, currency=None, _from=None, to=None, amount=None, currency_pair=None, settle=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """Transfer - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self.__from = None - self._to = None - self._amount = None - self._currency_pair = None - self._settle = None - self.discriminator = None - - self.currency = currency - self._from = _from - self.to = to - self.amount = amount - if currency_pair is not None: - self.currency_pair = currency_pair - if settle is not None: - self.settle = settle - - @property - def currency(self): - """Gets the currency of this Transfer. # noqa: E501 - - Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501 - - :return: The currency of this Transfer. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this Transfer. - - Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501 - - :param currency: The currency of this Transfer. # 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 _from(self): - """Gets the _from of this Transfer. # noqa: E501 - - Account to transfer from # noqa: E501 - - :return: The _from of this Transfer. # noqa: E501 - :rtype: str - """ - return self.__from - - @_from.setter - def _from(self, _from): - """Sets the _from of this Transfer. - - Account to transfer from # noqa: E501 - - :param _from: The _from of this Transfer. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and _from is None: # noqa: E501 - raise ValueError("Invalid value for `_from`, must not be `None`") # noqa: E501 - allowed_values = ["spot", "margin", "futures", "delivery", "options"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and _from not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `_from` ({0}), must be one of {1}" # noqa: E501 - .format(_from, allowed_values) - ) - - self.__from = _from - - @property - def to(self): - """Gets the to of this Transfer. # noqa: E501 - - Account to transfer to # noqa: E501 - - :return: The to of this Transfer. # noqa: E501 - :rtype: str - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this Transfer. - - Account to transfer to # noqa: E501 - - :param to: The to of this Transfer. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 - raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 - allowed_values = ["spot", "margin", "futures", "delivery", "options"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and to not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `to` ({0}), must be one of {1}" # noqa: E501 - .format(to, allowed_values) - ) - - self._to = to - - @property - def amount(self): - """Gets the amount of this Transfer. # noqa: E501 - - Transfer amount # noqa: E501 - - :return: The amount of this Transfer. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this Transfer. - - Transfer amount # noqa: E501 - - :param amount: The amount of this Transfer. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def currency_pair(self): - """Gets the currency_pair of this Transfer. # noqa: E501 - - Margin currency pair. Required if transfer from or to margin account # noqa: E501 - - :return: The currency_pair of this Transfer. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this Transfer. - - Margin currency pair. Required if transfer from or to margin account # noqa: E501 - - :param currency_pair: The currency_pair of this Transfer. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def settle(self): - """Gets the settle of this Transfer. # noqa: E501 - - Futures settle currency. Required if transferring from or to futures account # noqa: E501 - - :return: The settle of this Transfer. # noqa: E501 - :rtype: str - """ - return self._settle - - @settle.setter - def settle(self, settle): - """Sets the settle of this Transfer. - - Futures settle currency. Required if transferring from or to futures account # noqa: E501 - - :param settle: The settle of this Transfer. # 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, Transfer): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Transfer): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py deleted file mode 100644 index e086de6..0000000 --- a/gate_api/models/transfer_order_status.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class TransferOrderStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'tx_id': 'str', - 'status': 'str' - } - - attribute_map = { - 'tx_id': 'tx_id', - 'status': 'status' - } - - def __init__(self, tx_id=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """TransferOrderStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._tx_id = None - self._status = None - self.discriminator = None - - if tx_id is not None: - self.tx_id = tx_id - if status is not None: - self.status = status - - @property - def tx_id(self): - """Gets the tx_id of this TransferOrderStatus. # noqa: E501 - - Order id # noqa: E501 - - :return: The tx_id of this TransferOrderStatus. # noqa: E501 - :rtype: str - """ - return self._tx_id - - @tx_id.setter - def tx_id(self, tx_id): - """Sets the tx_id of this TransferOrderStatus. - - Order id # noqa: E501 - - :param tx_id: The tx_id of this TransferOrderStatus. # noqa: E501 - :type: str - """ - - self._tx_id = tx_id - - @property - def status(self): - """Gets the status of this TransferOrderStatus. # noqa: E501 - - Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) # noqa: E501 - - :return: The status of this TransferOrderStatus. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this TransferOrderStatus. - - Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) # noqa: E501 - - :param status: The status of this TransferOrderStatus. # noqa: E501 - :type: str - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TransferOrderStatus): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TransferOrderStatus): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py deleted file mode 100644 index 4676e0f..0000000 --- a/gate_api/models/transferables_result.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class TransferablesResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """TransferablesResult - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - - @property - def currency(self): - """Gets the currency of this TransferablesResult. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this TransferablesResult. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this TransferablesResult. - - Currency detail # noqa: E501 - - :param currency: The currency of this TransferablesResult. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this TransferablesResult. # noqa: E501 - - The maximum amount that can be transferred out # noqa: E501 - - :return: The amount of this TransferablesResult. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this TransferablesResult. - - The maximum amount that can be transferred out # noqa: E501 - - :param amount: The amount of this TransferablesResult. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TransferablesResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TransferablesResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py deleted file mode 100644 index 4681081..0000000 --- a/gate_api/models/trigger_order_response.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class TriggerOrderResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int' - } - - attribute_map = { - 'id': 'id' - } - - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """TriggerOrderResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self.discriminator = None - - if id is not None: - self.id = id - - @property - def id(self): - """Gets the id of this TriggerOrderResponse. # noqa: E501 - - Auto order ID # noqa: E501 - - :return: The id of this TriggerOrderResponse. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TriggerOrderResponse. - - Auto order ID # noqa: E501 - - :param id: The id of this TriggerOrderResponse. # noqa: E501 - :type: int - """ - - self._id = id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TriggerOrderResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TriggerOrderResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py deleted file mode 100644 index d8d64f3..0000000 --- a/gate_api/models/trigger_time.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class TriggerTime(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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_time': 'int' - } - - attribute_map = { - 'trigger_time': 'triggerTime' - } - - def __init__(self, trigger_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """TriggerTime - a 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_time = None - self.discriminator = None - - if trigger_time is not None: - self.trigger_time = trigger_time - - @property - def trigger_time(self): - """Gets the trigger_time of this TriggerTime. # noqa: E501 - - Timestamp of the end of the countdown, in milliseconds # noqa: E501 - - :return: The trigger_time of this TriggerTime. # noqa: E501 - :rtype: int - """ - return self._trigger_time - - @trigger_time.setter - def trigger_time(self, trigger_time): - """Sets the trigger_time of this TriggerTime. - - Timestamp of the end of the countdown, in milliseconds # noqa: E501 - - :param trigger_time: The trigger_time of this TriggerTime. # noqa: E501 - :type: int - """ - - self._trigger_time = trigger_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, TriggerTime): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TriggerTime): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py deleted file mode 100644 index ff523de..0000000 --- a/gate_api/models/uid_push_order.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UidPushOrder(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'push_uid': 'int', - 'receive_uid': 'int', - 'currency': 'str', - 'amount': 'str', - 'create_time': 'int', - 'status': 'str', - 'message': 'str', - 'transaction_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'push_uid': 'push_uid', - 'receive_uid': 'receive_uid', - 'currency': 'currency', - 'amount': 'amount', - 'create_time': 'create_time', - 'status': 'status', - 'message': 'message', - 'transaction_type': 'transaction_type' - } - - def __init__(self, id=None, push_uid=None, receive_uid=None, currency=None, amount=None, create_time=None, status=None, message=None, transaction_type=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, int, str, str, int, str, str, str, Configuration) -> None - """UidPushOrder - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._push_uid = None - self._receive_uid = None - self._currency = None - self._amount = None - self._create_time = None - self._status = None - self._message = None - self._transaction_type = None - self.discriminator = None - - if id is not None: - self.id = id - if push_uid is not None: - self.push_uid = push_uid - if receive_uid is not None: - self.receive_uid = receive_uid - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - if create_time is not None: - self.create_time = create_time - if status is not None: - self.status = status - if message is not None: - self.message = message - if transaction_type is not None: - self.transaction_type = transaction_type - - @property - def id(self): - """Gets the id of this UidPushOrder. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this UidPushOrder. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UidPushOrder. - - Order ID # noqa: E501 - - :param id: The id of this UidPushOrder. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def push_uid(self): - """Gets the push_uid of this UidPushOrder. # noqa: E501 - - Initiator User ID # noqa: E501 - - :return: The push_uid of this UidPushOrder. # noqa: E501 - :rtype: int - """ - return self._push_uid - - @push_uid.setter - def push_uid(self, push_uid): - """Sets the push_uid of this UidPushOrder. - - Initiator User ID # noqa: E501 - - :param push_uid: The push_uid of this UidPushOrder. # noqa: E501 - :type: int - """ - - self._push_uid = push_uid - - @property - def receive_uid(self): - """Gets the receive_uid of this UidPushOrder. # noqa: E501 - - Recipient User ID # noqa: E501 - - :return: The receive_uid of this UidPushOrder. # noqa: E501 - :rtype: int - """ - return self._receive_uid - - @receive_uid.setter - def receive_uid(self, receive_uid): - """Sets the receive_uid of this UidPushOrder. - - Recipient User ID # noqa: E501 - - :param receive_uid: The receive_uid of this UidPushOrder. # noqa: E501 - :type: int - """ - - self._receive_uid = receive_uid - - @property - def currency(self): - """Gets the currency of this UidPushOrder. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UidPushOrder. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UidPushOrder. - - Currency name # noqa: E501 - - :param currency: The currency of this UidPushOrder. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this UidPushOrder. # noqa: E501 - - Transfer amount # noqa: E501 - - :return: The amount of this UidPushOrder. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UidPushOrder. - - Transfer amount # noqa: E501 - - :param amount: The amount of this UidPushOrder. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def create_time(self): - """Gets the create_time of this UidPushOrder. # noqa: E501 - - Creation time # noqa: E501 - - :return: The create_time of this UidPushOrder. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UidPushOrder. - - Creation time # noqa: E501 - - :param create_time: The create_time of this UidPushOrder. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def status(self): - """Gets the status of this UidPushOrder. # noqa: E501 - - Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 - - :return: The status of this UidPushOrder. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this UidPushOrder. - - Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 - - :param status: The status of this UidPushOrder. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def message(self): - """Gets the message of this UidPushOrder. # noqa: E501 - - PENDING Reason Tips # noqa: E501 - - :return: The message of this UidPushOrder. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this UidPushOrder. - - PENDING Reason Tips # noqa: E501 - - :param message: The message of this UidPushOrder. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def transaction_type(self): - """Gets the transaction_type of this UidPushOrder. # noqa: E501 - - Order Type # noqa: E501 - - :return: The transaction_type of this UidPushOrder. # noqa: E501 - :rtype: str - """ - return self._transaction_type - - @transaction_type.setter - def transaction_type(self, transaction_type): - """Sets the transaction_type of this UidPushOrder. - - Order Type # noqa: E501 - - :param transaction_type: The transaction_type of this UidPushOrder. # noqa: E501 - :type: str - """ - - self._transaction_type = transaction_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UidPushOrder): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UidPushOrder): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py deleted file mode 100644 index 20cc498..0000000 --- a/gate_api/models/uid_push_withdrawal.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UidPushWithdrawal(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'receive_uid': 'int', - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'receive_uid': 'receive_uid', - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, receive_uid=None, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, Configuration) -> None - """UidPushWithdrawal - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._receive_uid = None - self._currency = None - self._amount = None - self.discriminator = None - - self.receive_uid = receive_uid - self.currency = currency - self.amount = amount - - @property - def receive_uid(self): - """Gets the receive_uid of this UidPushWithdrawal. # noqa: E501 - - Recipient UID # noqa: E501 - - :return: The receive_uid of this UidPushWithdrawal. # noqa: E501 - :rtype: int - """ - return self._receive_uid - - @receive_uid.setter - def receive_uid(self, receive_uid): - """Sets the receive_uid of this UidPushWithdrawal. - - Recipient UID # noqa: E501 - - :param receive_uid: The receive_uid of this UidPushWithdrawal. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and receive_uid is None: # noqa: E501 - raise ValueError("Invalid value for `receive_uid`, must not be `None`") # noqa: E501 - - self._receive_uid = receive_uid - - @property - def currency(self): - """Gets the currency of this UidPushWithdrawal. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UidPushWithdrawal. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UidPushWithdrawal. - - Currency name # noqa: E501 - - :param currency: The currency of this UidPushWithdrawal. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this UidPushWithdrawal. # noqa: E501 - - Transfer amount # noqa: E501 - - :return: The amount of this UidPushWithdrawal. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UidPushWithdrawal. - - Transfer amount # noqa: E501 - - :param amount: The amount of this UidPushWithdrawal. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UidPushWithdrawal): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UidPushWithdrawal): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py deleted file mode 100644 index 8ca17ee..0000000 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UidPushWithdrawalResp(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int' - } - - attribute_map = { - 'id': 'id' - } - - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """UidPushWithdrawalResp - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self.discriminator = None - - if id is not None: - self.id = id - - @property - def id(self): - """Gets the id of this UidPushWithdrawalResp. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this UidPushWithdrawalResp. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UidPushWithdrawalResp. - - Order ID # noqa: E501 - - :param id: The id of this UidPushWithdrawalResp. # noqa: E501 - :type: int - """ - - self._id = id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UidPushWithdrawalResp): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UidPushWithdrawalResp): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py deleted file mode 100644 index df2d2b5..0000000 --- a/gate_api/models/uni_currency.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'min_lend_amount': 'str', - 'max_lend_amount': 'str', - 'max_rate': 'str', - 'min_rate': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'min_lend_amount': 'min_lend_amount', - 'max_lend_amount': 'max_lend_amount', - 'max_rate': 'max_rate', - 'min_rate': 'min_rate' - } - - def __init__(self, currency=None, min_lend_amount=None, max_lend_amount=None, max_rate=None, min_rate=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """UniCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._min_lend_amount = None - self._max_lend_amount = None - self._max_rate = None - self._min_rate = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if min_lend_amount is not None: - self.min_lend_amount = min_lend_amount - if max_lend_amount is not None: - self.max_lend_amount = max_lend_amount - if max_rate is not None: - self.max_rate = max_rate - if min_rate is not None: - self.min_rate = min_rate - - @property - def currency(self): - """Gets the currency of this UniCurrency. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UniCurrency. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniCurrency. - - Currency name # noqa: E501 - - :param currency: The currency of this UniCurrency. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def min_lend_amount(self): - """Gets the min_lend_amount of this UniCurrency. # noqa: E501 - - The minimum lending amount, in the unit of the currency. # noqa: E501 - - :return: The min_lend_amount of this UniCurrency. # noqa: E501 - :rtype: str - """ - return self._min_lend_amount - - @min_lend_amount.setter - def min_lend_amount(self, min_lend_amount): - """Sets the min_lend_amount of this UniCurrency. - - The minimum lending amount, in the unit of the currency. # noqa: E501 - - :param min_lend_amount: The min_lend_amount of this UniCurrency. # noqa: E501 - :type: str - """ - - self._min_lend_amount = min_lend_amount - - @property - def max_lend_amount(self): - """Gets the max_lend_amount of this UniCurrency. # noqa: E501 - - The total maximum lending amount, in USDT # noqa: E501 - - :return: The max_lend_amount of this UniCurrency. # noqa: E501 - :rtype: str - """ - return self._max_lend_amount - - @max_lend_amount.setter - def max_lend_amount(self, max_lend_amount): - """Sets the max_lend_amount of this UniCurrency. - - The total maximum lending amount, in USDT # noqa: E501 - - :param max_lend_amount: The max_lend_amount of this UniCurrency. # noqa: E501 - :type: str - """ - - self._max_lend_amount = max_lend_amount - - @property - def max_rate(self): - """Gets the max_rate of this UniCurrency. # noqa: E501 - - Maximum rate (Hourly) # noqa: E501 - - :return: The max_rate of this UniCurrency. # noqa: E501 - :rtype: str - """ - return self._max_rate - - @max_rate.setter - def max_rate(self, max_rate): - """Sets the max_rate of this UniCurrency. - - Maximum rate (Hourly) # noqa: E501 - - :param max_rate: The max_rate of this UniCurrency. # noqa: E501 - :type: str - """ - - self._max_rate = max_rate - - @property - def min_rate(self): - """Gets the min_rate of this UniCurrency. # noqa: E501 - - Minimum rate (Hourly) # noqa: E501 - - :return: The min_rate of this UniCurrency. # noqa: E501 - :rtype: str - """ - return self._min_rate - - @min_rate.setter - def min_rate(self, min_rate): - """Sets the min_rate of this UniCurrency. - - Minimum rate (Hourly) # noqa: E501 - - :param min_rate: The min_rate of this UniCurrency. # noqa: E501 - :type: str - """ - - self._min_rate = min_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, UniCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py deleted file mode 100644 index fc5b64b..0000000 --- a/gate_api/models/uni_currency_interest.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniCurrencyInterest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'interest_status': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'interest_status': 'interest_status' - } - - def __init__(self, currency=None, interest_status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """UniCurrencyInterest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._interest_status = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if interest_status is not None: - self.interest_status = interest_status - - @property - def currency(self): - """Gets the currency of this UniCurrencyInterest. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniCurrencyInterest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniCurrencyInterest. - - Currency # noqa: E501 - - :param currency: The currency of this UniCurrencyInterest. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def interest_status(self): - """Gets the interest_status of this UniCurrencyInterest. # noqa: E501 - - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 - - :return: The interest_status of this UniCurrencyInterest. # noqa: E501 - :rtype: str - """ - return self._interest_status - - @interest_status.setter - def interest_status(self, interest_status): - """Sets the interest_status of this UniCurrencyInterest. - - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 - - :param interest_status: The interest_status of this UniCurrencyInterest. # noqa: E501 - :type: str - """ - - self._interest_status = interest_status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniCurrencyInterest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniCurrencyInterest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py deleted file mode 100644 index 226fa8e..0000000 --- a/gate_api/models/uni_currency_pair.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniCurrencyPair(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'base_min_borrow_amount': 'str', - 'quote_min_borrow_amount': 'str', - 'leverage': 'str' - } - - attribute_map = { - 'currency_pair': 'currency_pair', - 'base_min_borrow_amount': 'base_min_borrow_amount', - 'quote_min_borrow_amount': 'quote_min_borrow_amount', - 'leverage': 'leverage' - } - - def __init__(self, currency_pair=None, base_min_borrow_amount=None, quote_min_borrow_amount=None, leverage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """UniCurrencyPair - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency_pair = None - self._base_min_borrow_amount = None - self._quote_min_borrow_amount = None - self._leverage = None - self.discriminator = None - - if currency_pair is not None: - self.currency_pair = currency_pair - if base_min_borrow_amount is not None: - self.base_min_borrow_amount = base_min_borrow_amount - if quote_min_borrow_amount is not None: - self.quote_min_borrow_amount = quote_min_borrow_amount - if leverage is not None: - self.leverage = leverage - - @property - def currency_pair(self): - """Gets the currency_pair of this UniCurrencyPair. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this UniCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this UniCurrencyPair. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this UniCurrencyPair. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def base_min_borrow_amount(self): - """Gets the base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - - Minimum borrow amount of base currency # noqa: E501 - - :return: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._base_min_borrow_amount - - @base_min_borrow_amount.setter - def base_min_borrow_amount(self, base_min_borrow_amount): - """Sets the base_min_borrow_amount of this UniCurrencyPair. - - Minimum borrow amount of base currency # noqa: E501 - - :param base_min_borrow_amount: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - :type: str - """ - - self._base_min_borrow_amount = base_min_borrow_amount - - @property - def quote_min_borrow_amount(self): - """Gets the quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - - Minimum borrow amount of quote currency # noqa: E501 - - :return: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._quote_min_borrow_amount - - @quote_min_borrow_amount.setter - def quote_min_borrow_amount(self, quote_min_borrow_amount): - """Sets the quote_min_borrow_amount of this UniCurrencyPair. - - Minimum borrow amount of quote currency # noqa: E501 - - :param quote_min_borrow_amount: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - :type: str - """ - - self._quote_min_borrow_amount = quote_min_borrow_amount - - @property - def leverage(self): - """Gets the leverage of this UniCurrencyPair. # noqa: E501 - - Position leverage # noqa: E501 - - :return: The leverage of this UniCurrencyPair. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this UniCurrencyPair. - - Position leverage # noqa: E501 - - :param leverage: The leverage of this UniCurrencyPair. # 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, UniCurrencyPair): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniCurrencyPair): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_interest_mode.py b/gate_api/models/uni_interest_mode.py deleted file mode 100644 index 56ec36f..0000000 --- a/gate_api/models/uni_interest_mode.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniInterestMode(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'status': 'bool' - } - - attribute_map = { - 'currency': 'currency', - 'status': 'status' - } - - def __init__(self, currency=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, bool, Configuration) -> None - """UniInterestMode - a 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._status = None - self.discriminator = None - - self.currency = currency - self.status = status - - @property - def currency(self): - """Gets the currency of this UniInterestMode. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniInterestMode. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniInterestMode. - - Currency # noqa: E501 - - :param currency: The currency of this UniInterestMode. # 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 status(self): - """Gets the status of this UniInterestMode. # noqa: E501 - - Interest toggle settings, true - interest reinvestment, false - regular dividend # noqa: E501 - - :return: The status of this UniInterestMode. # noqa: E501 - :rtype: bool - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this UniInterestMode. - - Interest toggle settings, true - interest reinvestment, false - regular dividend # noqa: E501 - - :param status: The status of this UniInterestMode. # noqa: E501 - :type: bool - """ - 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, UniInterestMode): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniInterestMode): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py deleted file mode 100644 index 1fcf11e..0000000 --- a/gate_api/models/uni_interest_record.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniInterestRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'status': 'int', - 'currency': 'str', - 'actual_rate': 'str', - 'interest': 'str', - 'interest_status': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'status': 'status', - 'currency': 'currency', - 'actual_rate': 'actual_rate', - 'interest': 'interest', - 'interest_status': 'interest_status', - 'create_time': 'create_time' - } - - def __init__(self, status=None, currency=None, actual_rate=None, interest=None, interest_status=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, int, Configuration) -> None - """UniInterestRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._status = None - self._currency = None - self._actual_rate = None - self._interest = None - self._interest_status = None - self._create_time = None - self.discriminator = None - - if status is not None: - self.status = status - if currency is not None: - self.currency = currency - if actual_rate is not None: - self.actual_rate = actual_rate - if interest is not None: - self.interest = interest - if interest_status is not None: - self.interest_status = interest_status - if create_time is not None: - self.create_time = create_time - - @property - def status(self): - """Gets the status of this UniInterestRecord. # noqa: E501 - - Status: 0 - fail, 1 - success # noqa: E501 - - :return: The status of this UniInterestRecord. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this UniInterestRecord. - - Status: 0 - fail, 1 - success # noqa: E501 - - :param status: The status of this UniInterestRecord. # noqa: E501 - :type: int - """ - - self._status = status - - @property - def currency(self): - """Gets the currency of this UniInterestRecord. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniInterestRecord. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniInterestRecord. - - Currency # noqa: E501 - - :param currency: The currency of this UniInterestRecord. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def actual_rate(self): - """Gets the actual_rate of this UniInterestRecord. # noqa: E501 - - Actual Rate # noqa: E501 - - :return: The actual_rate of this UniInterestRecord. # noqa: E501 - :rtype: str - """ - return self._actual_rate - - @actual_rate.setter - def actual_rate(self, actual_rate): - """Sets the actual_rate of this UniInterestRecord. - - Actual Rate # noqa: E501 - - :param actual_rate: The actual_rate of this UniInterestRecord. # noqa: E501 - :type: str - """ - - self._actual_rate = actual_rate - - @property - def interest(self): - """Gets the interest of this UniInterestRecord. # noqa: E501 - - Interest # noqa: E501 - - :return: The interest of this UniInterestRecord. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this UniInterestRecord. - - Interest # noqa: E501 - - :param interest: The interest of this UniInterestRecord. # noqa: E501 - :type: str - """ - - self._interest = interest - - @property - def interest_status(self): - """Gets the interest_status of this UniInterestRecord. # noqa: E501 - - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 - - :return: The interest_status of this UniInterestRecord. # noqa: E501 - :rtype: str - """ - return self._interest_status - - @interest_status.setter - def interest_status(self, interest_status): - """Sets the interest_status of this UniInterestRecord. - - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 - - :param interest_status: The interest_status of this UniInterestRecord. # noqa: E501 - :type: str - """ - - self._interest_status = interest_status - - @property - def create_time(self): - """Gets the create_time of this UniInterestRecord. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this UniInterestRecord. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UniInterestRecord. - - Created time # noqa: E501 - - :param create_time: The create_time of this UniInterestRecord. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniInterestRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniInterestRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py deleted file mode 100644 index 0e2be68..0000000 --- a/gate_api/models/uni_lend.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniLend(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'current_amount': 'str', - 'amount': 'str', - 'lent_amount': 'str', - 'frozen_amount': 'str', - 'min_rate': 'str', - 'interest_status': 'str', - 'reinvest_left_amount': 'str', - 'create_time': 'int', - 'update_time': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'current_amount': 'current_amount', - 'amount': 'amount', - 'lent_amount': 'lent_amount', - 'frozen_amount': 'frozen_amount', - 'min_rate': 'min_rate', - 'interest_status': 'interest_status', - 'reinvest_left_amount': 'reinvest_left_amount', - 'create_time': 'create_time', - 'update_time': 'update_time' - } - - def __init__(self, currency=None, current_amount=None, amount=None, lent_amount=None, frozen_amount=None, min_rate=None, interest_status=None, reinvest_left_amount=None, create_time=None, update_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, int, int, Configuration) -> None - """UniLend - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._current_amount = None - self._amount = None - self._lent_amount = None - self._frozen_amount = None - self._min_rate = None - self._interest_status = None - self._reinvest_left_amount = None - self._create_time = None - self._update_time = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if current_amount is not None: - self.current_amount = current_amount - if amount is not None: - self.amount = amount - if lent_amount is not None: - self.lent_amount = lent_amount - if frozen_amount is not None: - self.frozen_amount = frozen_amount - if min_rate is not None: - self.min_rate = min_rate - if interest_status is not None: - self.interest_status = interest_status - if reinvest_left_amount is not None: - self.reinvest_left_amount = reinvest_left_amount - if create_time is not None: - self.create_time = create_time - if update_time is not None: - self.update_time = update_time - - @property - def currency(self): - """Gets the currency of this UniLend. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniLend. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniLend. - - Currency # noqa: E501 - - :param currency: The currency of this UniLend. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def current_amount(self): - """Gets the current_amount of this UniLend. # noqa: E501 - - Current amount # noqa: E501 - - :return: The current_amount of this UniLend. # noqa: E501 - :rtype: str - """ - return self._current_amount - - @current_amount.setter - def current_amount(self, current_amount): - """Sets the current_amount of this UniLend. - - Current amount # noqa: E501 - - :param current_amount: The current_amount of this UniLend. # noqa: E501 - :type: str - """ - - self._current_amount = current_amount - - @property - def amount(self): - """Gets the amount of this UniLend. # noqa: E501 - - Total amount # noqa: E501 - - :return: The amount of this UniLend. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UniLend. - - Total amount # noqa: E501 - - :param amount: The amount of this UniLend. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def lent_amount(self): - """Gets the lent_amount of this UniLend. # noqa: E501 - - Lent amount # noqa: E501 - - :return: The lent_amount of this UniLend. # noqa: E501 - :rtype: str - """ - return self._lent_amount - - @lent_amount.setter - def lent_amount(self, lent_amount): - """Sets the lent_amount of this UniLend. - - Lent amount # noqa: E501 - - :param lent_amount: The lent_amount of this UniLend. # noqa: E501 - :type: str - """ - - self._lent_amount = lent_amount - - @property - def frozen_amount(self): - """Gets the frozen_amount of this UniLend. # noqa: E501 - - Frozen amount # noqa: E501 - - :return: The frozen_amount of this UniLend. # noqa: E501 - :rtype: str - """ - return self._frozen_amount - - @frozen_amount.setter - def frozen_amount(self, frozen_amount): - """Sets the frozen_amount of this UniLend. - - Frozen amount # noqa: E501 - - :param frozen_amount: The frozen_amount of this UniLend. # noqa: E501 - :type: str - """ - - self._frozen_amount = frozen_amount - - @property - def min_rate(self): - """Gets the min_rate of this UniLend. # noqa: E501 - - Minimum interest rate # noqa: E501 - - :return: The min_rate of this UniLend. # noqa: E501 - :rtype: str - """ - return self._min_rate - - @min_rate.setter - def min_rate(self, min_rate): - """Sets the min_rate of this UniLend. - - Minimum interest rate # noqa: E501 - - :param min_rate: The min_rate of this UniLend. # noqa: E501 - :type: str - """ - - self._min_rate = min_rate - - @property - def interest_status(self): - """Gets the interest_status of this UniLend. # noqa: E501 - - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 - - :return: The interest_status of this UniLend. # noqa: E501 - :rtype: str - """ - return self._interest_status - - @interest_status.setter - def interest_status(self, interest_status): - """Sets the interest_status of this UniLend. - - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 - - :param interest_status: The interest_status of this UniLend. # noqa: E501 - :type: str - """ - - self._interest_status = interest_status - - @property - def reinvest_left_amount(self): - """Gets the reinvest_left_amount of this UniLend. # noqa: E501 - - Amount not reinvested # noqa: E501 - - :return: The reinvest_left_amount of this UniLend. # noqa: E501 - :rtype: str - """ - return self._reinvest_left_amount - - @reinvest_left_amount.setter - def reinvest_left_amount(self, reinvest_left_amount): - """Sets the reinvest_left_amount of this UniLend. - - Amount not reinvested # noqa: E501 - - :param reinvest_left_amount: The reinvest_left_amount of this UniLend. # noqa: E501 - :type: str - """ - - self._reinvest_left_amount = reinvest_left_amount - - @property - def create_time(self): - """Gets the create_time of this UniLend. # noqa: E501 - - Created time of the lending order # noqa: E501 - - :return: The create_time of this UniLend. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UniLend. - - Created time of the lending order # noqa: E501 - - :param create_time: The create_time of this UniLend. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def update_time(self): - """Gets the update_time of this UniLend. # noqa: E501 - - Upated time of the lending order # noqa: E501 - - :return: The update_time of this UniLend. # noqa: E501 - :rtype: int - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this UniLend. - - Upated time of the lending order # noqa: E501 - - :param update_time: The update_time of this UniLend. # noqa: E501 - :type: int - """ - - self._update_time = update_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniLend): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniLend): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py deleted file mode 100644 index ccbfa43..0000000 --- a/gate_api/models/uni_lend_interest.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniLendInterest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'interest': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'interest': 'interest' - } - - def __init__(self, currency=None, interest=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """UniLendInterest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._interest = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if interest is not None: - self.interest = interest - - @property - def currency(self): - """Gets the currency of this UniLendInterest. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniLendInterest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniLendInterest. - - Currency # noqa: E501 - - :param currency: The currency of this UniLendInterest. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def interest(self): - """Gets the interest of this UniLendInterest. # noqa: E501 - - Interest # noqa: E501 - - :return: The interest of this UniLendInterest. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this UniLendInterest. - - Interest # noqa: E501 - - :param interest: The interest of this UniLendInterest. # noqa: E501 - :type: str - """ - - self._interest = interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniLendInterest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniLendInterest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py deleted file mode 100644 index 14095af..0000000 --- a/gate_api/models/uni_lend_record.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniLendRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str', - 'last_wallet_amount': 'str', - 'last_lent_amount': 'str', - 'last_frozen_amount': 'str', - 'type': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount', - 'last_wallet_amount': 'last_wallet_amount', - 'last_lent_amount': 'last_lent_amount', - 'last_frozen_amount': 'last_frozen_amount', - 'type': 'type', - 'create_time': 'create_time' - } - - def __init__(self, currency=None, amount=None, last_wallet_amount=None, last_lent_amount=None, last_frozen_amount=None, type=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, int, Configuration) -> None - """UniLendRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self._last_wallet_amount = None - self._last_lent_amount = None - self._last_frozen_amount = None - self._type = None - self._create_time = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - if last_wallet_amount is not None: - self.last_wallet_amount = last_wallet_amount - if last_lent_amount is not None: - self.last_lent_amount = last_lent_amount - if last_frozen_amount is not None: - self.last_frozen_amount = last_frozen_amount - if type is not None: - self.type = type - if create_time is not None: - self.create_time = create_time - - @property - def currency(self): - """Gets the currency of this UniLendRecord. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UniLendRecord. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniLendRecord. - - Currency name # noqa: E501 - - :param currency: The currency of this UniLendRecord. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this UniLendRecord. # noqa: E501 - - current amount # noqa: E501 - - :return: The amount of this UniLendRecord. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UniLendRecord. - - current amount # noqa: E501 - - :param amount: The amount of this UniLendRecord. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def last_wallet_amount(self): - """Gets the last_wallet_amount of this UniLendRecord. # noqa: E501 - - Last wallet amount # noqa: E501 - - :return: The last_wallet_amount of this UniLendRecord. # noqa: E501 - :rtype: str - """ - return self._last_wallet_amount - - @last_wallet_amount.setter - def last_wallet_amount(self, last_wallet_amount): - """Sets the last_wallet_amount of this UniLendRecord. - - Last wallet amount # noqa: E501 - - :param last_wallet_amount: The last_wallet_amount of this UniLendRecord. # noqa: E501 - :type: str - """ - - self._last_wallet_amount = last_wallet_amount - - @property - def last_lent_amount(self): - """Gets the last_lent_amount of this UniLendRecord. # noqa: E501 - - Last lent amount # noqa: E501 - - :return: The last_lent_amount of this UniLendRecord. # noqa: E501 - :rtype: str - """ - return self._last_lent_amount - - @last_lent_amount.setter - def last_lent_amount(self, last_lent_amount): - """Sets the last_lent_amount of this UniLendRecord. - - Last lent amount # noqa: E501 - - :param last_lent_amount: The last_lent_amount of this UniLendRecord. # noqa: E501 - :type: str - """ - - self._last_lent_amount = last_lent_amount - - @property - def last_frozen_amount(self): - """Gets the last_frozen_amount of this UniLendRecord. # noqa: E501 - - Last frozen amount # noqa: E501 - - :return: The last_frozen_amount of this UniLendRecord. # noqa: E501 - :rtype: str - """ - return self._last_frozen_amount - - @last_frozen_amount.setter - def last_frozen_amount(self, last_frozen_amount): - """Sets the last_frozen_amount of this UniLendRecord. - - Last frozen amount # noqa: E501 - - :param last_frozen_amount: The last_frozen_amount of this UniLendRecord. # noqa: E501 - :type: str - """ - - self._last_frozen_amount = last_frozen_amount - - @property - def type(self): - """Gets the type of this UniLendRecord. # noqa: E501 - - Record type: lend - lend, redeem - redeem # noqa: E501 - - :return: The type of this UniLendRecord. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UniLendRecord. - - Record type: lend - lend, redeem - redeem # noqa: E501 - - :param type: The type of this UniLendRecord. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def create_time(self): - """Gets the create_time of this UniLendRecord. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this UniLendRecord. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UniLendRecord. - - Created time # noqa: E501 - - :param create_time: The create_time of this UniLendRecord. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniLendRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniLendRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py deleted file mode 100644 index 0ae80fd..0000000 --- a/gate_api/models/uni_loan.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniLoan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'currency_pair': 'str', - 'amount': 'str', - 'type': 'str', - 'create_time': 'int', - 'update_time': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'currency_pair': 'currency_pair', - 'amount': 'amount', - 'type': 'type', - 'create_time': 'create_time', - 'update_time': 'update_time' - } - - def __init__(self, currency=None, currency_pair=None, amount=None, type=None, create_time=None, update_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, int, Configuration) -> None - """UniLoan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._currency_pair = None - self._amount = None - self._type = None - self._create_time = None - self._update_time = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if currency_pair is not None: - self.currency_pair = currency_pair - if amount is not None: - self.amount = amount - if type is not None: - self.type = type - if create_time is not None: - self.create_time = create_time - if update_time is not None: - self.update_time = update_time - - @property - def currency(self): - """Gets the currency of this UniLoan. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniLoan. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniLoan. - - Currency # noqa: E501 - - :param currency: The currency of this UniLoan. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def currency_pair(self): - """Gets the currency_pair of this UniLoan. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this UniLoan. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this UniLoan. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this UniLoan. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def amount(self): - """Gets the amount of this UniLoan. # noqa: E501 - - amount # noqa: E501 - - :return: The amount of this UniLoan. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UniLoan. - - amount # noqa: E501 - - :param amount: The amount of this UniLoan. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def type(self): - """Gets the type of this UniLoan. # noqa: E501 - - Loan type, platform - platform, margin - margin # noqa: E501 - - :return: The type of this UniLoan. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UniLoan. - - Loan type, platform - platform, margin - margin # noqa: E501 - - :param type: The type of this UniLoan. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def create_time(self): - """Gets the create_time of this UniLoan. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this UniLoan. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UniLoan. - - Created time # noqa: E501 - - :param create_time: The create_time of this UniLoan. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def update_time(self): - """Gets the update_time of this UniLoan. # noqa: E501 - - Updated time # noqa: E501 - - :return: The update_time of this UniLoan. # noqa: E501 - :rtype: int - """ - return self._update_time - - @update_time.setter - def update_time(self, update_time): - """Sets the update_time of this UniLoan. - - Updated time # noqa: E501 - - :param update_time: The update_time of this UniLoan. # noqa: E501 - :type: int - """ - - self._update_time = update_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniLoan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniLoan): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py deleted file mode 100644 index 2327f01..0000000 --- a/gate_api/models/uni_loan_interest_record.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniLoanInterestRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'currency_pair': 'str', - 'actual_rate': 'str', - 'interest': 'str', - 'status': 'int', - 'type': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'currency_pair': 'currency_pair', - 'actual_rate': 'actual_rate', - 'interest': 'interest', - 'status': 'status', - 'type': 'type', - 'create_time': 'create_time' - } - - def __init__(self, currency=None, currency_pair=None, actual_rate=None, interest=None, status=None, type=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, str, int, Configuration) -> None - """UniLoanInterestRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._currency_pair = None - self._actual_rate = None - self._interest = None - self._status = None - self._type = None - self._create_time = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if currency_pair is not None: - self.currency_pair = currency_pair - if actual_rate is not None: - self.actual_rate = actual_rate - if interest is not None: - self.interest = interest - if status is not None: - self.status = status - if type is not None: - self.type = type - if create_time is not None: - self.create_time = create_time - - @property - def currency(self): - """Gets the currency of this UniLoanInterestRecord. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UniLoanInterestRecord. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniLoanInterestRecord. - - Currency name # noqa: E501 - - :param currency: The currency of this UniLoanInterestRecord. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def currency_pair(self): - """Gets the currency_pair of this UniLoanInterestRecord. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this UniLoanInterestRecord. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this UniLoanInterestRecord. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this UniLoanInterestRecord. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def actual_rate(self): - """Gets the actual_rate of this UniLoanInterestRecord. # noqa: E501 - - Actual rate # noqa: E501 - - :return: The actual_rate of this UniLoanInterestRecord. # noqa: E501 - :rtype: str - """ - return self._actual_rate - - @actual_rate.setter - def actual_rate(self, actual_rate): - """Sets the actual_rate of this UniLoanInterestRecord. - - Actual rate # noqa: E501 - - :param actual_rate: The actual_rate of this UniLoanInterestRecord. # noqa: E501 - :type: str - """ - - self._actual_rate = actual_rate - - @property - def interest(self): - """Gets the interest of this UniLoanInterestRecord. # noqa: E501 - - Interest # noqa: E501 - - :return: The interest of this UniLoanInterestRecord. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this UniLoanInterestRecord. - - Interest # noqa: E501 - - :param interest: The interest of this UniLoanInterestRecord. # noqa: E501 - :type: str - """ - - self._interest = interest - - @property - def status(self): - """Gets the status of this UniLoanInterestRecord. # noqa: E501 - - Status: 0 - fail, 1 - success # noqa: E501 - - :return: The status of this UniLoanInterestRecord. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this UniLoanInterestRecord. - - Status: 0 - fail, 1 - success # noqa: E501 - - :param status: The status of this UniLoanInterestRecord. # noqa: E501 - :type: int - """ - - self._status = status - - @property - def type(self): - """Gets the type of this UniLoanInterestRecord. # noqa: E501 - - Type, platform - platform,margin - margin # noqa: E501 - - :return: The type of this UniLoanInterestRecord. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UniLoanInterestRecord. - - Type, platform - platform,margin - margin # noqa: E501 - - :param type: The type of this UniLoanInterestRecord. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def create_time(self): - """Gets the create_time of this UniLoanInterestRecord. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this UniLoanInterestRecord. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UniLoanInterestRecord. - - Created time # noqa: E501 - - :param create_time: The create_time of this UniLoanInterestRecord. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniLoanInterestRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniLoanInterestRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py deleted file mode 100644 index 900a247..0000000 --- a/gate_api/models/uni_loan_record.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniLoanRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'currency_pair': 'str', - 'currency': 'str', - 'amount': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'type': 'type', - 'currency_pair': 'currency_pair', - 'currency': 'currency', - 'amount': 'amount', - 'create_time': 'create_time' - } - - def __init__(self, type=None, currency_pair=None, currency=None, amount=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, Configuration) -> None - """UniLoanRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._currency_pair = None - self._currency = None - self._amount = None - self._create_time = None - self.discriminator = None - - if type is not None: - self.type = type - if currency_pair is not None: - self.currency_pair = currency_pair - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - if create_time is not None: - self.create_time = create_time - - @property - def type(self): - """Gets the type of this UniLoanRecord. # noqa: E501 - - type: borrow - borrow, repay - repay # noqa: E501 - - :return: The type of this UniLoanRecord. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UniLoanRecord. - - type: borrow - borrow, repay - repay # noqa: E501 - - :param type: The type of this UniLoanRecord. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def currency_pair(self): - """Gets the currency_pair of this UniLoanRecord. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this UniLoanRecord. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this UniLoanRecord. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this UniLoanRecord. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def currency(self): - """Gets the currency of this UniLoanRecord. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniLoanRecord. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniLoanRecord. - - Currency # noqa: E501 - - :param currency: The currency of this UniLoanRecord. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this UniLoanRecord. # noqa: E501 - - The amount of lending or repaying # noqa: E501 - - :return: The amount of this UniLoanRecord. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UniLoanRecord. - - The amount of lending or repaying # noqa: E501 - - :param amount: The amount of this UniLoanRecord. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def create_time(self): - """Gets the create_time of this UniLoanRecord. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this UniLoanRecord. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UniLoanRecord. - - Created time # noqa: E501 - - :param create_time: The create_time of this UniLoanRecord. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniLoanRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniLoanRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py deleted file mode 100644 index 3ae2673..0000000 --- a/gate_api/models/unified_account.py +++ /dev/null @@ -1,625 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'refresh_time': 'int', - 'locked': 'bool', - 'balances': 'dict(str, UnifiedBalance)', - 'total': 'str', - 'borrowed': 'str', - 'total_initial_margin': 'str', - 'total_margin_balance': 'str', - 'total_maintenance_margin': 'str', - 'total_initial_margin_rate': 'str', - 'total_maintenance_margin_rate': 'str', - 'total_available_margin': 'str', - 'unified_account_total': 'str', - 'unified_account_total_liab': 'str', - 'unified_account_total_equity': 'str', - 'leverage': 'str', - 'spot_order_loss': 'str', - 'spot_hedge': 'bool', - 'use_funding': 'bool' - } - - attribute_map = { - 'user_id': 'user_id', - 'refresh_time': 'refresh_time', - 'locked': 'locked', - 'balances': 'balances', - 'total': 'total', - 'borrowed': 'borrowed', - 'total_initial_margin': 'total_initial_margin', - 'total_margin_balance': 'total_margin_balance', - 'total_maintenance_margin': 'total_maintenance_margin', - 'total_initial_margin_rate': 'total_initial_margin_rate', - 'total_maintenance_margin_rate': 'total_maintenance_margin_rate', - 'total_available_margin': 'total_available_margin', - 'unified_account_total': 'unified_account_total', - 'unified_account_total_liab': 'unified_account_total_liab', - 'unified_account_total_equity': 'unified_account_total_equity', - 'leverage': 'leverage', - 'spot_order_loss': 'spot_order_loss', - 'spot_hedge': 'spot_hedge', - 'use_funding': 'use_funding' - } - - def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, unified_account_total=None, unified_account_total_liab=None, unified_account_total_equity=None, leverage=None, spot_order_loss=None, spot_hedge=None, use_funding=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, bool, dict(str, UnifiedBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, bool, bool, Configuration) -> None - """UnifiedAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._refresh_time = None - self._locked = None - self._balances = None - self._total = None - self._borrowed = None - self._total_initial_margin = None - self._total_margin_balance = None - self._total_maintenance_margin = None - self._total_initial_margin_rate = None - self._total_maintenance_margin_rate = None - self._total_available_margin = None - self._unified_account_total = None - self._unified_account_total_liab = None - self._unified_account_total_equity = None - self._leverage = None - self._spot_order_loss = None - self._spot_hedge = None - self._use_funding = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if refresh_time is not None: - self.refresh_time = refresh_time - if locked is not None: - self.locked = locked - if balances is not None: - self.balances = balances - if total is not None: - self.total = total - if borrowed is not None: - self.borrowed = borrowed - if total_initial_margin is not None: - self.total_initial_margin = total_initial_margin - if total_margin_balance is not None: - self.total_margin_balance = total_margin_balance - if total_maintenance_margin is not None: - self.total_maintenance_margin = total_maintenance_margin - if total_initial_margin_rate is not None: - self.total_initial_margin_rate = total_initial_margin_rate - if total_maintenance_margin_rate is not None: - self.total_maintenance_margin_rate = total_maintenance_margin_rate - if total_available_margin is not None: - self.total_available_margin = total_available_margin - if unified_account_total is not None: - self.unified_account_total = unified_account_total - if unified_account_total_liab is not None: - self.unified_account_total_liab = unified_account_total_liab - if unified_account_total_equity is not None: - self.unified_account_total_equity = unified_account_total_equity - if leverage is not None: - self.leverage = leverage - if spot_order_loss is not None: - self.spot_order_loss = spot_order_loss - if spot_hedge is not None: - self.spot_hedge = spot_hedge - if use_funding is not None: - self.use_funding = use_funding - - @property - def user_id(self): - """Gets the user_id of this UnifiedAccount. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this UnifiedAccount. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this UnifiedAccount. - - User ID # noqa: E501 - - :param user_id: The user_id of this UnifiedAccount. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def refresh_time(self): - """Gets the refresh_time of this UnifiedAccount. # noqa: E501 - - Time of the most recent refresh # noqa: E501 - - :return: The refresh_time of this UnifiedAccount. # noqa: E501 - :rtype: int - """ - return self._refresh_time - - @refresh_time.setter - def refresh_time(self, refresh_time): - """Sets the refresh_time of this UnifiedAccount. - - Time of the most recent refresh # noqa: E501 - - :param refresh_time: The refresh_time of this UnifiedAccount. # noqa: E501 - :type: int - """ - - self._refresh_time = refresh_time - - @property - def locked(self): - """Gets the locked of this UnifiedAccount. # noqa: E501 - - Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode # noqa: E501 - - :return: The locked of this UnifiedAccount. # noqa: E501 - :rtype: bool - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this UnifiedAccount. - - Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode # noqa: E501 - - :param locked: The locked of this UnifiedAccount. # noqa: E501 - :type: bool - """ - - self._locked = locked - - @property - def balances(self): - """Gets the balances of this UnifiedAccount. # noqa: E501 - - - :return: The balances of this UnifiedAccount. # noqa: E501 - :rtype: dict(str, UnifiedBalance) - """ - return self._balances - - @balances.setter - def balances(self, balances): - """Sets the balances of this UnifiedAccount. - - - :param balances: The balances of this UnifiedAccount. # noqa: E501 - :type: dict(str, UnifiedBalance) - """ - - self._balances = balances - - @property - def total(self): - """Gets the total of this UnifiedAccount. # noqa: E501 - - Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 - - :return: The total of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this UnifiedAccount. - - Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 - - :param total: The total of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def borrowed(self): - """Gets the borrowed of this UnifiedAccount. # noqa: E501 - - The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. # noqa: E501 - - :return: The borrowed of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this UnifiedAccount. - - The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. # noqa: E501 - - :param borrowed: The borrowed of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def total_initial_margin(self): - """Gets the total_initial_margin of this UnifiedAccount. # noqa: E501 - - Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The total_initial_margin of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin - - @total_initial_margin.setter - def total_initial_margin(self, total_initial_margin): - """Sets the total_initial_margin of this UnifiedAccount. - - Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param total_initial_margin: The total_initial_margin of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin = total_initial_margin - - @property - def total_margin_balance(self): - """Gets the total_margin_balance of this UnifiedAccount. # noqa: E501 - - Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The total_margin_balance of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._total_margin_balance - - @total_margin_balance.setter - def total_margin_balance(self, total_margin_balance): - """Sets the total_margin_balance of this UnifiedAccount. - - Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param total_margin_balance: The total_margin_balance of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._total_margin_balance = total_margin_balance - - @property - def total_maintenance_margin(self): - """Gets the total_maintenance_margin of this UnifiedAccount. # noqa: E501 - - Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The total_maintenance_margin of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin - - @total_maintenance_margin.setter - def total_maintenance_margin(self, total_maintenance_margin): - """Sets the total_maintenance_margin of this UnifiedAccount. - - Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 - - :param total_maintenance_margin: The total_maintenance_margin of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin = total_maintenance_margin - - @property - def total_initial_margin_rate(self): - """Gets the total_initial_margin_rate of this UnifiedAccount. # noqa: E501 - - Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin_rate - - @total_initial_margin_rate.setter - def total_initial_margin_rate(self, total_initial_margin_rate): - """Sets the total_initial_margin_rate of this UnifiedAccount. - - Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param total_initial_margin_rate: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin_rate = total_initial_margin_rate - - @property - def total_maintenance_margin_rate(self): - """Gets the total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 - - Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin_rate - - @total_maintenance_margin_rate.setter - def total_maintenance_margin_rate(self, total_maintenance_margin_rate): - """Sets the total_maintenance_margin_rate of this UnifiedAccount. - - Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin_rate = total_maintenance_margin_rate - - @property - def total_available_margin(self): - """Gets the total_available_margin of this UnifiedAccount. # noqa: E501 - - Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The total_available_margin of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._total_available_margin - - @total_available_margin.setter - def total_available_margin(self, total_available_margin): - """Sets the total_available_margin of this UnifiedAccount. - - Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param total_available_margin: The total_available_margin of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._total_available_margin = total_available_margin - - @property - def unified_account_total(self): - """Gets the unified_account_total of this UnifiedAccount. # noqa: E501 - - Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 - - :return: The unified_account_total of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._unified_account_total - - @unified_account_total.setter - def unified_account_total(self, unified_account_total): - """Sets the unified_account_total of this UnifiedAccount. - - Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 - - :param unified_account_total: The unified_account_total of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._unified_account_total = unified_account_total - - @property - def unified_account_total_liab(self): - """Gets the unified_account_total_liab of this UnifiedAccount. # noqa: E501 - - Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._unified_account_total_liab - - @unified_account_total_liab.setter - def unified_account_total_liab(self, unified_account_total_liab): - """Sets the unified_account_total_liab of this UnifiedAccount. - - Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode # noqa: E501 - - :param unified_account_total_liab: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._unified_account_total_liab = unified_account_total_liab - - @property - def unified_account_total_equity(self): - """Gets the unified_account_total_equity of this UnifiedAccount. # noqa: E501 - - Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 - - :return: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._unified_account_total_equity - - @unified_account_total_equity.setter - def unified_account_total_equity(self, unified_account_total_equity): - """Sets the unified_account_total_equity of this UnifiedAccount. - - Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 - - :param unified_account_total_equity: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._unified_account_total_equity = unified_account_total_equity - - @property - def leverage(self): - """Gets the leverage of this UnifiedAccount. # noqa: E501 - - Actual leverage, valid in cross-currency margin/combined margin mode # noqa: E501 - - :return: The leverage of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this UnifiedAccount. - - Actual leverage, valid in cross-currency margin/combined margin mode # noqa: E501 - - :param leverage: The leverage of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - @property - def spot_order_loss(self): - """Gets the spot_order_loss of this UnifiedAccount. # noqa: E501 - - Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The spot_order_loss of this UnifiedAccount. # noqa: E501 - :rtype: str - """ - return self._spot_order_loss - - @spot_order_loss.setter - def spot_order_loss(self, spot_order_loss): - """Sets the spot_order_loss of this UnifiedAccount. - - Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param spot_order_loss: The spot_order_loss of this UnifiedAccount. # noqa: E501 - :type: str - """ - - self._spot_order_loss = spot_order_loss - - @property - def spot_hedge(self): - """Gets the spot_hedge of this UnifiedAccount. # noqa: E501 - - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 - - :return: The spot_hedge of this UnifiedAccount. # noqa: E501 - :rtype: bool - """ - return self._spot_hedge - - @spot_hedge.setter - def spot_hedge(self, spot_hedge): - """Sets the spot_hedge of this UnifiedAccount. - - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 - - :param spot_hedge: The spot_hedge of this UnifiedAccount. # noqa: E501 - :type: bool - """ - - self._spot_hedge = spot_hedge - - @property - def use_funding(self): - """Gets the use_funding of this UnifiedAccount. # noqa: E501 - - Whether to use funds as margin # noqa: E501 - - :return: The use_funding of this UnifiedAccount. # noqa: E501 - :rtype: bool - """ - return self._use_funding - - @use_funding.setter - def use_funding(self, use_funding): - """Sets the use_funding of this UnifiedAccount. - - Whether to use funds as margin # noqa: E501 - - :param use_funding: The use_funding of this UnifiedAccount. # noqa: E501 - :type: bool - """ - - self._use_funding = use_funding - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py deleted file mode 100644 index e92f393..0000000 --- a/gate_api/models/unified_balance.py +++ /dev/null @@ -1,627 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedBalance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'available': 'str', - 'freeze': 'str', - 'borrowed': 'str', - 'negative_liab': 'str', - 'futures_pos_liab': 'str', - 'equity': 'str', - 'total_freeze': 'str', - 'total_liab': 'str', - 'spot_in_use': 'str', - 'funding': 'str', - 'funding_version': 'str', - 'cross_balance': 'str', - 'iso_balance': 'str', - 'im': 'str', - 'mm': 'str', - 'imr': 'str', - 'mmr': 'str', - 'margin_balance': 'str', - 'available_margin': 'str' - } - - attribute_map = { - 'available': 'available', - 'freeze': 'freeze', - 'borrowed': 'borrowed', - 'negative_liab': 'negative_liab', - 'futures_pos_liab': 'futures_pos_liab', - 'equity': 'equity', - 'total_freeze': 'total_freeze', - 'total_liab': 'total_liab', - 'spot_in_use': 'spot_in_use', - 'funding': 'funding', - 'funding_version': 'funding_version', - 'cross_balance': 'cross_balance', - 'iso_balance': 'iso_balance', - 'im': 'im', - 'mm': 'mm', - 'imr': 'imr', - 'mmr': 'mmr', - 'margin_balance': 'margin_balance', - 'available_margin': 'available_margin' - } - - def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, spot_in_use=None, funding=None, funding_version=None, cross_balance=None, iso_balance=None, im=None, mm=None, imr=None, mmr=None, margin_balance=None, available_margin=None, 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, Configuration) -> None - """UnifiedBalance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._available = None - self._freeze = None - self._borrowed = None - self._negative_liab = None - self._futures_pos_liab = None - self._equity = None - self._total_freeze = None - self._total_liab = None - self._spot_in_use = None - self._funding = None - self._funding_version = None - self._cross_balance = None - self._iso_balance = None - self._im = None - self._mm = None - self._imr = None - self._mmr = None - self._margin_balance = None - self._available_margin = None - self.discriminator = None - - if available is not None: - self.available = available - if freeze is not None: - self.freeze = freeze - if borrowed is not None: - self.borrowed = borrowed - if negative_liab is not None: - self.negative_liab = negative_liab - if futures_pos_liab is not None: - self.futures_pos_liab = futures_pos_liab - if equity is not None: - self.equity = equity - if total_freeze is not None: - self.total_freeze = total_freeze - if total_liab is not None: - self.total_liab = total_liab - if spot_in_use is not None: - self.spot_in_use = spot_in_use - if funding is not None: - self.funding = funding - if funding_version is not None: - self.funding_version = funding_version - if cross_balance is not None: - self.cross_balance = cross_balance - if iso_balance is not None: - self.iso_balance = iso_balance - if im is not None: - self.im = im - if mm is not None: - self.mm = mm - if imr is not None: - self.imr = imr - if mmr is not None: - self.mmr = mmr - if margin_balance is not None: - self.margin_balance = margin_balance - if available_margin is not None: - self.available_margin = available_margin - - @property - def available(self): - """Gets the available of this UnifiedBalance. # noqa: E501 - - Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes # noqa: E501 - - :return: The available of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this UnifiedBalance. - - Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes # noqa: E501 - - :param available: The available of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def freeze(self): - """Gets the freeze of this UnifiedBalance. # noqa: E501 - - The locked amount is valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 - - :return: The freeze of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._freeze - - @freeze.setter - def freeze(self, freeze): - """Sets the freeze of this UnifiedBalance. - - The locked amount is valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 - - :param freeze: The freeze of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._freeze = freeze - - @property - def borrowed(self): - """Gets the borrowed of this UnifiedBalance. # noqa: E501 - - Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The borrowed of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this UnifiedBalance. - - Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param borrowed: The borrowed of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def negative_liab(self): - """Gets the negative_liab of this UnifiedBalance. # noqa: E501 - - Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The negative_liab of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._negative_liab - - @negative_liab.setter - def negative_liab(self, negative_liab): - """Sets the negative_liab of this UnifiedBalance. - - Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 - - :param negative_liab: The negative_liab of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._negative_liab = negative_liab - - @property - def futures_pos_liab(self): - """Gets the futures_pos_liab of this UnifiedBalance. # noqa: E501 - - Contract opening position borrowing currency (abandoned, to be offline field) # noqa: E501 - - :return: The futures_pos_liab of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._futures_pos_liab - - @futures_pos_liab.setter - def futures_pos_liab(self, futures_pos_liab): - """Sets the futures_pos_liab of this UnifiedBalance. - - Contract opening position borrowing currency (abandoned, to be offline field) # noqa: E501 - - :param futures_pos_liab: The futures_pos_liab of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._futures_pos_liab = futures_pos_liab - - @property - def equity(self): - """Gets the equity of this UnifiedBalance. # noqa: E501 - - Equity, valid in single currency margin/cross currency margin/combined margin mode # noqa: E501 - - :return: The equity of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._equity - - @equity.setter - def equity(self, equity): - """Sets the equity of this UnifiedBalance. - - Equity, valid in single currency margin/cross currency margin/combined margin mode # noqa: E501 - - :param equity: The equity of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._equity = equity - - @property - def total_freeze(self): - """Gets the total_freeze of this UnifiedBalance. # noqa: E501 - - Total occupancy (discarded, to be offline field) # noqa: E501 - - :return: The total_freeze of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._total_freeze - - @total_freeze.setter - def total_freeze(self, total_freeze): - """Sets the total_freeze of this UnifiedBalance. - - Total occupancy (discarded, to be offline field) # noqa: E501 - - :param total_freeze: The total_freeze of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._total_freeze = total_freeze - - @property - def total_liab(self): - """Gets the total_liab of this UnifiedBalance. # noqa: E501 - - Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :return: The total_liab of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._total_liab - - @total_liab.setter - def total_liab(self, total_liab): - """Sets the total_liab of this UnifiedBalance. - - Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 - - :param total_liab: The total_liab of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._total_liab = total_liab - - @property - def spot_in_use(self): - """Gets the spot_in_use of this UnifiedBalance. # noqa: E501 - - The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes # noqa: E501 - - :return: The spot_in_use of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._spot_in_use - - @spot_in_use.setter - def spot_in_use(self, spot_in_use): - """Sets the spot_in_use of this UnifiedBalance. - - The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes # noqa: E501 - - :param spot_in_use: The spot_in_use of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._spot_in_use = spot_in_use - - @property - def funding(self): - """Gets the funding of this UnifiedBalance. # noqa: E501 - - Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch # noqa: E501 - - :return: The funding of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._funding - - @funding.setter - def funding(self, funding): - """Sets the funding of this UnifiedBalance. - - Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch # noqa: E501 - - :param funding: The funding of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._funding = funding - - @property - def funding_version(self): - """Gets the funding_version of this UnifiedBalance. # noqa: E501 - - Funding version # noqa: E501 - - :return: The funding_version of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._funding_version - - @funding_version.setter - def funding_version(self, funding_version): - """Sets the funding_version of this UnifiedBalance. - - Funding version # noqa: E501 - - :param funding_version: The funding_version of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._funding_version = funding_version - - @property - def cross_balance(self): - """Gets the cross_balance of this UnifiedBalance. # noqa: E501 - - Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 - - :return: The cross_balance of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._cross_balance - - @cross_balance.setter - def cross_balance(self, cross_balance): - """Sets the cross_balance of this UnifiedBalance. - - Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 - - :param cross_balance: The cross_balance of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._cross_balance = cross_balance - - @property - def iso_balance(self): - """Gets the iso_balance of this UnifiedBalance. # noqa: E501 - - Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :return: The iso_balance of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._iso_balance - - @iso_balance.setter - def iso_balance(self, iso_balance): - """Sets the iso_balance of this UnifiedBalance. - - Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :param iso_balance: The iso_balance of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._iso_balance = iso_balance - - @property - def im(self): - """Gets the im of this UnifiedBalance. # noqa: E501 - - Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :return: The im of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._im - - @im.setter - def im(self, im): - """Sets the im of this UnifiedBalance. - - Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :param im: The im of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._im = im - - @property - def mm(self): - """Gets the mm of this UnifiedBalance. # noqa: E501 - - The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. # noqa: E501 - - :return: The mm of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._mm - - @mm.setter - def mm(self, mm): - """Sets the mm of this UnifiedBalance. - - The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. # noqa: E501 - - :param mm: The mm of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._mm = mm - - @property - def imr(self): - """Gets the imr of this UnifiedBalance. # noqa: E501 - - Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :return: The imr of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._imr - - @imr.setter - def imr(self, imr): - """Sets the imr of this UnifiedBalance. - - Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :param imr: The imr of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._imr = imr - - @property - def mmr(self): - """Gets the mmr of this UnifiedBalance. # noqa: E501 - - Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :return: The mmr of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._mmr - - @mmr.setter - def mmr(self, mmr): - """Sets the mmr of this UnifiedBalance. - - Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :param mmr: The mmr of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._mmr = mmr - - @property - def margin_balance(self): - """Gets the margin_balance of this UnifiedBalance. # noqa: E501 - - Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 - - :return: The margin_balance of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._margin_balance - - @margin_balance.setter - def margin_balance(self, margin_balance): - """Sets the margin_balance of this UnifiedBalance. - - Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 - - :param margin_balance: The margin_balance of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._margin_balance = margin_balance - - @property - def available_margin(self): - """Gets the available_margin of this UnifiedBalance. # noqa: E501 - - Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :return: The available_margin of this UnifiedBalance. # noqa: E501 - :rtype: str - """ - return self._available_margin - - @available_margin.setter - def available_margin(self, available_margin): - """Sets the available_margin of this UnifiedBalance. - - Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 - - :param available_margin: The available_margin of this UnifiedBalance. # noqa: E501 - :type: str - """ - - self._available_margin = available_margin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedBalance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedBalance): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py deleted file mode 100644 index d61ad46..0000000 --- a/gate_api/models/unified_borrowable.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedBorrowable(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """UnifiedBorrowable - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - - @property - def currency(self): - """Gets the currency of this UnifiedBorrowable. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this UnifiedBorrowable. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedBorrowable. - - Currency detail # noqa: E501 - - :param currency: The currency of this UnifiedBorrowable. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this UnifiedBorrowable. # noqa: E501 - - Max borrowable amount # noqa: E501 - - :return: The amount of this UnifiedBorrowable. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UnifiedBorrowable. - - Max borrowable amount # noqa: E501 - - :param amount: The amount of this UnifiedBorrowable. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedBorrowable): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedBorrowable): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py deleted file mode 100644 index c32a202..0000000 --- a/gate_api/models/unified_currency.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'prec': 'str', - 'min_borrow_amount': 'str', - 'user_max_borrow_amount': 'str', - 'total_max_borrow_amount': 'str', - 'loan_status': 'str' - } - - attribute_map = { - 'name': 'name', - 'prec': 'prec', - 'min_borrow_amount': 'min_borrow_amount', - 'user_max_borrow_amount': 'user_max_borrow_amount', - 'total_max_borrow_amount': 'total_max_borrow_amount', - 'loan_status': 'loan_status' - } - - def __init__(self, name=None, prec=None, min_borrow_amount=None, user_max_borrow_amount=None, total_max_borrow_amount=None, loan_status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """UnifiedCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._prec = None - self._min_borrow_amount = None - self._user_max_borrow_amount = None - self._total_max_borrow_amount = None - self._loan_status = None - self.discriminator = None - - if name is not None: - self.name = name - if prec is not None: - self.prec = prec - if min_borrow_amount is not None: - self.min_borrow_amount = min_borrow_amount - if user_max_borrow_amount is not None: - self.user_max_borrow_amount = user_max_borrow_amount - if total_max_borrow_amount is not None: - self.total_max_borrow_amount = total_max_borrow_amount - if loan_status is not None: - self.loan_status = loan_status - - @property - def name(self): - """Gets the name of this UnifiedCurrency. # noqa: E501 - - Currency name # noqa: E501 - - :return: The name of this UnifiedCurrency. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UnifiedCurrency. - - Currency name # noqa: E501 - - :param name: The name of this UnifiedCurrency. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def prec(self): - """Gets the prec of this UnifiedCurrency. # noqa: E501 - - Currency precision # noqa: E501 - - :return: The prec of this UnifiedCurrency. # noqa: E501 - :rtype: str - """ - return self._prec - - @prec.setter - def prec(self, prec): - """Sets the prec of this UnifiedCurrency. - - Currency precision # noqa: E501 - - :param prec: The prec of this UnifiedCurrency. # noqa: E501 - :type: str - """ - - self._prec = prec - - @property - def min_borrow_amount(self): - """Gets the min_borrow_amount of this UnifiedCurrency. # noqa: E501 - - The minimum debit limit is the unit of currency # noqa: E501 - - :return: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 - :rtype: str - """ - return self._min_borrow_amount - - @min_borrow_amount.setter - def min_borrow_amount(self, min_borrow_amount): - """Sets the min_borrow_amount of this UnifiedCurrency. - - The minimum debit limit is the unit of currency # noqa: E501 - - :param min_borrow_amount: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 - :type: str - """ - - self._min_borrow_amount = min_borrow_amount - - @property - def user_max_borrow_amount(self): - """Gets the user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - - The minimum debit limit is the unit of currency # noqa: E501 - - :return: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - :rtype: str - """ - return self._user_max_borrow_amount - - @user_max_borrow_amount.setter - def user_max_borrow_amount(self, user_max_borrow_amount): - """Sets the user_max_borrow_amount of this UnifiedCurrency. - - The minimum debit limit is the unit of currency # noqa: E501 - - :param user_max_borrow_amount: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - :type: str - """ - - self._user_max_borrow_amount = user_max_borrow_amount - - @property - def total_max_borrow_amount(self): - """Gets the total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - - The maximum debit limit for the platform is USDT # noqa: E501 - - :return: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - :rtype: str - """ - return self._total_max_borrow_amount - - @total_max_borrow_amount.setter - def total_max_borrow_amount(self, total_max_borrow_amount): - """Sets the total_max_borrow_amount of this UnifiedCurrency. - - The maximum debit limit for the platform is USDT # noqa: E501 - - :param total_max_borrow_amount: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - :type: str - """ - - self._total_max_borrow_amount = total_max_borrow_amount - - @property - def loan_status(self): - """Gets the loan_status of this UnifiedCurrency. # noqa: E501 - - Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending # noqa: E501 - - :return: The loan_status of this UnifiedCurrency. # noqa: E501 - :rtype: str - """ - return self._loan_status - - @loan_status.setter - def loan_status(self, loan_status): - """Sets the loan_status of this UnifiedCurrency. - - Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending # noqa: E501 - - :param loan_status: The loan_status of this UnifiedCurrency. # noqa: E501 - :type: str - """ - - self._loan_status = loan_status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py deleted file mode 100644 index 4c608ee..0000000 --- a/gate_api/models/unified_discount.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedDiscount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'discount_tiers': 'list[UnifiedDiscountTiers]' - } - - attribute_map = { - 'currency': 'currency', - 'discount_tiers': 'discount_tiers' - } - - def __init__(self, currency=None, discount_tiers=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[UnifiedDiscountTiers], Configuration) -> None - """UnifiedDiscount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._discount_tiers = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if discount_tiers is not None: - self.discount_tiers = discount_tiers - - @property - def currency(self): - """Gets the currency of this UnifiedDiscount. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UnifiedDiscount. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedDiscount. - - Currency name # noqa: E501 - - :param currency: The currency of this UnifiedDiscount. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def discount_tiers(self): - """Gets the discount_tiers of this UnifiedDiscount. # noqa: E501 - - Tiered discount # noqa: E501 - - :return: The discount_tiers of this UnifiedDiscount. # noqa: E501 - :rtype: list[UnifiedDiscountTiers] - """ - return self._discount_tiers - - @discount_tiers.setter - def discount_tiers(self, discount_tiers): - """Sets the discount_tiers of this UnifiedDiscount. - - Tiered discount # noqa: E501 - - :param discount_tiers: The discount_tiers of this UnifiedDiscount. # noqa: E501 - :type: list[UnifiedDiscountTiers] - """ - - self._discount_tiers = discount_tiers - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedDiscount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedDiscount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py deleted file mode 100644 index 524f165..0000000 --- a/gate_api/models/unified_discount_tiers.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedDiscountTiers(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'tier': 'str', - 'discount': 'str', - 'lower_limit': 'str', - 'upper_limit': 'str', - 'leverage': 'str' - } - - attribute_map = { - 'tier': 'tier', - 'discount': 'discount', - 'lower_limit': 'lower_limit', - 'upper_limit': 'upper_limit', - 'leverage': 'leverage' - } - - def __init__(self, tier=None, discount=None, lower_limit=None, upper_limit=None, leverage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """UnifiedDiscountTiers - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._tier = None - self._discount = None - self._lower_limit = None - self._upper_limit = None - self._leverage = None - self.discriminator = None - - if tier is not None: - self.tier = tier - if discount is not None: - self.discount = discount - if lower_limit is not None: - self.lower_limit = lower_limit - if upper_limit is not None: - self.upper_limit = upper_limit - if leverage is not None: - self.leverage = leverage - - @property - def tier(self): - """Gets the tier of this UnifiedDiscountTiers. # noqa: E501 - - Tier # noqa: E501 - - :return: The tier of this UnifiedDiscountTiers. # noqa: E501 - :rtype: str - """ - return self._tier - - @tier.setter - def tier(self, tier): - """Sets the tier of this UnifiedDiscountTiers. - - Tier # noqa: E501 - - :param tier: The tier of this UnifiedDiscountTiers. # noqa: E501 - :type: str - """ - - self._tier = tier - - @property - def discount(self): - """Gets the discount of this UnifiedDiscountTiers. # noqa: E501 - - Discount # noqa: E501 - - :return: The discount of this UnifiedDiscountTiers. # noqa: E501 - :rtype: str - """ - return self._discount - - @discount.setter - def discount(self, discount): - """Sets the discount of this UnifiedDiscountTiers. - - Discount # noqa: E501 - - :param discount: The discount of this UnifiedDiscountTiers. # noqa: E501 - :type: str - """ - - self._discount = discount - - @property - def lower_limit(self): - """Gets the lower_limit of this UnifiedDiscountTiers. # noqa: E501 - - Lower limit # noqa: E501 - - :return: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 - :rtype: str - """ - return self._lower_limit - - @lower_limit.setter - def lower_limit(self, lower_limit): - """Sets the lower_limit of this UnifiedDiscountTiers. - - Lower limit # noqa: E501 - - :param lower_limit: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 - :type: str - """ - - self._lower_limit = lower_limit - - @property - def upper_limit(self): - """Gets the upper_limit of this UnifiedDiscountTiers. # noqa: E501 - - Upper limit,+ indicates positive infinity # noqa: E501 - - :return: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 - :rtype: str - """ - return self._upper_limit - - @upper_limit.setter - def upper_limit(self, upper_limit): - """Sets the upper_limit of this UnifiedDiscountTiers. - - Upper limit,+ indicates positive infinity # noqa: E501 - - :param upper_limit: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 - :type: str - """ - - self._upper_limit = upper_limit - - @property - def leverage(self): - """Gets the leverage of this UnifiedDiscountTiers. # noqa: E501 - - Position leverage # noqa: E501 - - :return: The leverage of this UnifiedDiscountTiers. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this UnifiedDiscountTiers. - - Position leverage # noqa: E501 - - :param leverage: The leverage of this UnifiedDiscountTiers. # noqa: E501 - :type: str - """ - - self._leverage = leverage - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedDiscountTiers): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedDiscountTiers): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py deleted file mode 100644 index 70b0100..0000000 --- a/gate_api/models/unified_history_loan_rate.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedHistoryLoanRate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'tier': 'str', - 'tier_up_rate': 'str', - 'rates': 'list[UnifiedHistoryLoanRateRates]' - } - - attribute_map = { - 'currency': 'currency', - 'tier': 'tier', - 'tier_up_rate': 'tier_up_rate', - 'rates': 'rates' - } - - def __init__(self, currency=None, tier=None, tier_up_rate=None, rates=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, list[UnifiedHistoryLoanRateRates], Configuration) -> None - """UnifiedHistoryLoanRate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._tier = None - self._tier_up_rate = None - self._rates = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if tier is not None: - self.tier = tier - if tier_up_rate is not None: - self.tier_up_rate = tier_up_rate - if rates is not None: - self.rates = rates - - @property - def currency(self): - """Gets the currency of this UnifiedHistoryLoanRate. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UnifiedHistoryLoanRate. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedHistoryLoanRate. - - Currency name # noqa: E501 - - :param currency: The currency of this UnifiedHistoryLoanRate. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def tier(self): - """Gets the tier of this UnifiedHistoryLoanRate. # noqa: E501 - - The VIP level of the floating rate required # noqa: E501 - - :return: The tier of this UnifiedHistoryLoanRate. # noqa: E501 - :rtype: str - """ - return self._tier - - @tier.setter - def tier(self, tier): - """Sets the tier of this UnifiedHistoryLoanRate. - - The VIP level of the floating rate required # noqa: E501 - - :param tier: The tier of this UnifiedHistoryLoanRate. # noqa: E501 - :type: str - """ - - self._tier = tier - - @property - def tier_up_rate(self): - """Gets the tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 - - VIP level corresponding floating rate # noqa: E501 - - :return: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 - :rtype: str - """ - return self._tier_up_rate - - @tier_up_rate.setter - def tier_up_rate(self, tier_up_rate): - """Sets the tier_up_rate of this UnifiedHistoryLoanRate. - - VIP level corresponding floating rate # noqa: E501 - - :param tier_up_rate: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 - :type: str - """ - - self._tier_up_rate = tier_up_rate - - @property - def rates(self): - """Gets the rates of this UnifiedHistoryLoanRate. # noqa: E501 - - Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in time # noqa: E501 - - :return: The rates of this UnifiedHistoryLoanRate. # noqa: E501 - :rtype: list[UnifiedHistoryLoanRateRates] - """ - return self._rates - - @rates.setter - def rates(self, rates): - """Sets the rates of this UnifiedHistoryLoanRate. - - Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in time # noqa: E501 - - :param rates: The rates of this UnifiedHistoryLoanRate. # noqa: E501 - :type: list[UnifiedHistoryLoanRateRates] - """ - - self._rates = rates - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedHistoryLoanRate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedHistoryLoanRate): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py deleted file mode 100644 index 4099a31..0000000 --- a/gate_api/models/unified_history_loan_rate_rates.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedHistoryLoanRateRates(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'time': 'int', - 'rate': 'str' - } - - attribute_map = { - 'time': 'time', - 'rate': 'rate' - } - - def __init__(self, time=None, rate=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, Configuration) -> None - """UnifiedHistoryLoanRateRates - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._time = None - self._rate = None - self.discriminator = None - - if time is not None: - self.time = time - if rate is not None: - self.rate = rate - - @property - def time(self): - """Gets the time of this UnifiedHistoryLoanRateRates. # noqa: E501 - - The hourly timestamp corresponding to the interest rate, in milliseconds # noqa: E501 - - :return: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this UnifiedHistoryLoanRateRates. - - The hourly timestamp corresponding to the interest rate, in milliseconds # noqa: E501 - - :param time: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def rate(self): - """Gets the rate of this UnifiedHistoryLoanRateRates. # noqa: E501 - - Historical interest rates for this hour # noqa: E501 - - :return: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 - :rtype: str - """ - return self._rate - - @rate.setter - def rate(self, rate): - """Sets the rate of this UnifiedHistoryLoanRateRates. - - Historical interest rates for this hour # noqa: E501 - - :param rate: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 - :type: str - """ - - self._rate = rate - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedHistoryLoanRateRates): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedHistoryLoanRateRates): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py deleted file mode 100644 index ce1c491..0000000 --- a/gate_api/models/unified_leverage_config.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedLeverageConfig(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'current_leverage': 'str', - 'min_leverage': 'str', - 'max_leverage': 'str', - 'debit': 'str', - 'available_margin': 'str', - 'borrowable': 'str', - 'except_leverage_borrowable': 'str' - } - - attribute_map = { - 'current_leverage': 'current_leverage', - 'min_leverage': 'min_leverage', - 'max_leverage': 'max_leverage', - 'debit': 'debit', - 'available_margin': 'available_margin', - 'borrowable': 'borrowable', - 'except_leverage_borrowable': 'except_leverage_borrowable' - } - - def __init__(self, current_leverage=None, min_leverage=None, max_leverage=None, debit=None, available_margin=None, borrowable=None, except_leverage_borrowable=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, Configuration) -> None - """UnifiedLeverageConfig - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._current_leverage = None - self._min_leverage = None - self._max_leverage = None - self._debit = None - self._available_margin = None - self._borrowable = None - self._except_leverage_borrowable = None - self.discriminator = None - - if current_leverage is not None: - self.current_leverage = current_leverage - if min_leverage is not None: - self.min_leverage = min_leverage - if max_leverage is not None: - self.max_leverage = max_leverage - if debit is not None: - self.debit = debit - if available_margin is not None: - self.available_margin = available_margin - if borrowable is not None: - self.borrowable = borrowable - if except_leverage_borrowable is not None: - self.except_leverage_borrowable = except_leverage_borrowable - - @property - def current_leverage(self): - """Gets the current_leverage of this UnifiedLeverageConfig. # noqa: E501 - - Current leverage ratio # noqa: E501 - - :return: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 - :rtype: str - """ - return self._current_leverage - - @current_leverage.setter - def current_leverage(self, current_leverage): - """Sets the current_leverage of this UnifiedLeverageConfig. - - Current leverage ratio # noqa: E501 - - :param current_leverage: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 - :type: str - """ - - self._current_leverage = current_leverage - - @property - def min_leverage(self): - """Gets the min_leverage of this UnifiedLeverageConfig. # noqa: E501 - - Minimum adjustable leverage ratio # noqa: E501 - - :return: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 - :rtype: str - """ - return self._min_leverage - - @min_leverage.setter - def min_leverage(self, min_leverage): - """Sets the min_leverage of this UnifiedLeverageConfig. - - Minimum adjustable leverage ratio # noqa: E501 - - :param min_leverage: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 - :type: str - """ - - self._min_leverage = min_leverage - - @property - def max_leverage(self): - """Gets the max_leverage of this UnifiedLeverageConfig. # noqa: E501 - - Maximum adjustable leverage ratio # noqa: E501 - - :return: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 - :rtype: str - """ - return self._max_leverage - - @max_leverage.setter - def max_leverage(self, max_leverage): - """Sets the max_leverage of this UnifiedLeverageConfig. - - Maximum adjustable leverage ratio # noqa: E501 - - :param max_leverage: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 - :type: str - """ - - self._max_leverage = max_leverage - - @property - def debit(self): - """Gets the debit of this UnifiedLeverageConfig. # noqa: E501 - - Current liabilities # noqa: E501 - - :return: The debit of this UnifiedLeverageConfig. # noqa: E501 - :rtype: str - """ - return self._debit - - @debit.setter - def debit(self, debit): - """Sets the debit of this UnifiedLeverageConfig. - - Current liabilities # noqa: E501 - - :param debit: The debit of this UnifiedLeverageConfig. # noqa: E501 - :type: str - """ - - self._debit = debit - - @property - def available_margin(self): - """Gets the available_margin of this UnifiedLeverageConfig. # noqa: E501 - - Available Margin # noqa: E501 - - :return: The available_margin of this UnifiedLeverageConfig. # noqa: E501 - :rtype: str - """ - return self._available_margin - - @available_margin.setter - def available_margin(self, available_margin): - """Sets the available_margin of this UnifiedLeverageConfig. - - Available Margin # noqa: E501 - - :param available_margin: The available_margin of this UnifiedLeverageConfig. # noqa: E501 - :type: str - """ - - self._available_margin = available_margin - - @property - def borrowable(self): - """Gets the borrowable of this UnifiedLeverageConfig. # noqa: E501 - - The current leverage you can choose is # noqa: E501 - - :return: The borrowable of this UnifiedLeverageConfig. # noqa: E501 - :rtype: str - """ - return self._borrowable - - @borrowable.setter - def borrowable(self, borrowable): - """Sets the borrowable of this UnifiedLeverageConfig. - - The current leverage you can choose is # noqa: E501 - - :param borrowable: The borrowable of this UnifiedLeverageConfig. # noqa: E501 - :type: str - """ - - self._borrowable = borrowable - - @property - def except_leverage_borrowable(self): - """Gets the except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 - - The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller # noqa: E501 - - :return: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 - :rtype: str - """ - return self._except_leverage_borrowable - - @except_leverage_borrowable.setter - def except_leverage_borrowable(self, except_leverage_borrowable): - """Sets the except_leverage_borrowable of this UnifiedLeverageConfig. - - The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller # noqa: E501 - - :param except_leverage_borrowable: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 - :type: str - """ - - self._except_leverage_borrowable = except_leverage_borrowable - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedLeverageConfig): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedLeverageConfig): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py deleted file mode 100644 index 849e7b2..0000000 --- a/gate_api/models/unified_leverage_setting.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedLeverageSetting(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'leverage': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'leverage': 'leverage' - } - - def __init__(self, currency=None, leverage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """UnifiedLeverageSetting - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._leverage = None - self.discriminator = None - - self.currency = currency - self.leverage = leverage - - @property - def currency(self): - """Gets the currency of this UnifiedLeverageSetting. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UnifiedLeverageSetting. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedLeverageSetting. - - Currency name # noqa: E501 - - :param currency: The currency of this UnifiedLeverageSetting. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def leverage(self): - """Gets the leverage of this UnifiedLeverageSetting. # noqa: E501 - - multiple # noqa: E501 - - :return: The leverage of this UnifiedLeverageSetting. # noqa: E501 - :rtype: str - """ - return self._leverage - - @leverage.setter - def leverage(self, leverage): - """Sets the leverage of this UnifiedLeverageSetting. - - multiple # noqa: E501 - - :param leverage: The leverage of this UnifiedLeverageSetting. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501 - raise ValueError("Invalid value for `leverage`, must not be `None`") # noqa: E501 - - self._leverage = leverage - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedLeverageSetting): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedLeverageSetting): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py deleted file mode 100644 index c7a9e03..0000000 --- a/gate_api/models/unified_loan.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedLoan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'type': 'str', - 'amount': 'str', - 'repaid_all': 'bool', - 'text': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'type': 'type', - 'amount': 'amount', - 'repaid_all': 'repaid_all', - 'text': 'text' - } - - def __init__(self, currency=None, type=None, amount=None, repaid_all=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, bool, str, Configuration) -> None - """UnifiedLoan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._type = None - self._amount = None - self._repaid_all = None - self._text = None - self.discriminator = None - - self.currency = currency - self.type = type - self.amount = amount - if repaid_all is not None: - self.repaid_all = repaid_all - if text is not None: - self.text = text - - @property - def currency(self): - """Gets the currency of this UnifiedLoan. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UnifiedLoan. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedLoan. - - Currency # noqa: E501 - - :param currency: The currency of this UnifiedLoan. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def type(self): - """Gets the type of this UnifiedLoan. # noqa: E501 - - type: borrow - borrow, repay - repay # noqa: E501 - - :return: The type of this UnifiedLoan. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UnifiedLoan. - - type: borrow - borrow, repay - repay # noqa: E501 - - :param type: The type of this UnifiedLoan. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["borrow", "repay"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def amount(self): - """Gets the amount of this UnifiedLoan. # noqa: E501 - - The amount of lending or repaying # noqa: E501 - - :return: The amount of this UnifiedLoan. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UnifiedLoan. - - The amount of lending or repaying # noqa: E501 - - :param amount: The amount of this UnifiedLoan. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def repaid_all(self): - """Gets the repaid_all of this UnifiedLoan. # noqa: E501 - - Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. # noqa: E501 - - :return: The repaid_all of this UnifiedLoan. # noqa: E501 - :rtype: bool - """ - return self._repaid_all - - @repaid_all.setter - def repaid_all(self, repaid_all): - """Sets the repaid_all of this UnifiedLoan. - - Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. # noqa: E501 - - :param repaid_all: The repaid_all of this UnifiedLoan. # noqa: E501 - :type: bool - """ - - self._repaid_all = repaid_all - - @property - def text(self): - """Gets the text of this UnifiedLoan. # noqa: E501 - - User defined custom ID # noqa: E501 - - :return: The text of this UnifiedLoan. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this UnifiedLoan. - - User defined custom ID # noqa: E501 - - :param text: The text of this UnifiedLoan. # 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, UnifiedLoan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedLoan): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py deleted file mode 100644 index d3b1ef8..0000000 --- a/gate_api/models/unified_loan_record.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedLoanRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'int', - 'type': 'str', - 'repayment_type': 'str', - 'borrow_type': 'str', - 'currency_pair': 'str', - 'currency': 'str', - 'amount': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'repayment_type': 'repayment_type', - 'borrow_type': 'borrow_type', - 'currency_pair': 'currency_pair', - 'currency': 'currency', - 'amount': 'amount', - 'create_time': 'create_time' - } - - def __init__(self, id=None, type=None, repayment_type=None, borrow_type=None, currency_pair=None, currency=None, amount=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, str, str, int, Configuration) -> None - """UnifiedLoanRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._type = None - self._repayment_type = None - self._borrow_type = None - self._currency_pair = None - self._currency = None - self._amount = None - self._create_time = None - self.discriminator = None - - if id is not None: - self.id = id - if type is not None: - self.type = type - if repayment_type is not None: - self.repayment_type = repayment_type - if borrow_type is not None: - self.borrow_type = borrow_type - if currency_pair is not None: - self.currency_pair = currency_pair - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - if create_time is not None: - self.create_time = create_time - - @property - def id(self): - """Gets the id of this UnifiedLoanRecord. # noqa: E501 - - id # noqa: E501 - - :return: The id of this UnifiedLoanRecord. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UnifiedLoanRecord. - - id # noqa: E501 - - :param id: The id of this UnifiedLoanRecord. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this UnifiedLoanRecord. # noqa: E501 - - type: borrow - borrow, repay - repay # noqa: E501 - - :return: The type of this UnifiedLoanRecord. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UnifiedLoanRecord. - - type: borrow - borrow, repay - repay # noqa: E501 - - :param type: The type of this UnifiedLoanRecord. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def repayment_type(self): - """Gets the repayment_type of this UnifiedLoanRecord. # noqa: E501 - - Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 - - :return: The repayment_type of this UnifiedLoanRecord. # noqa: E501 - :rtype: str - """ - return self._repayment_type - - @repayment_type.setter - def repayment_type(self, repayment_type): - """Sets the repayment_type of this UnifiedLoanRecord. - - Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 - - :param repayment_type: The repayment_type of this UnifiedLoanRecord. # noqa: E501 - :type: str - """ - - self._repayment_type = repayment_type - - @property - def borrow_type(self): - """Gets the borrow_type of this UnifiedLoanRecord. # noqa: E501 - - Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment # noqa: E501 - - :return: The borrow_type of this UnifiedLoanRecord. # noqa: E501 - :rtype: str - """ - return self._borrow_type - - @borrow_type.setter - def borrow_type(self, borrow_type): - """Sets the borrow_type of this UnifiedLoanRecord. - - Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment # noqa: E501 - - :param borrow_type: The borrow_type of this UnifiedLoanRecord. # noqa: E501 - :type: str - """ - - self._borrow_type = borrow_type - - @property - def currency_pair(self): - """Gets the currency_pair of this UnifiedLoanRecord. # noqa: E501 - - Currency pair # noqa: E501 - - :return: The currency_pair of this UnifiedLoanRecord. # noqa: E501 - :rtype: str - """ - return self._currency_pair - - @currency_pair.setter - def currency_pair(self, currency_pair): - """Sets the currency_pair of this UnifiedLoanRecord. - - Currency pair # noqa: E501 - - :param currency_pair: The currency_pair of this UnifiedLoanRecord. # noqa: E501 - :type: str - """ - - self._currency_pair = currency_pair - - @property - def currency(self): - """Gets the currency of this UnifiedLoanRecord. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UnifiedLoanRecord. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedLoanRecord. - - Currency # noqa: E501 - - :param currency: The currency of this UnifiedLoanRecord. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this UnifiedLoanRecord. # noqa: E501 - - The amount of lending or repaying # noqa: E501 - - :return: The amount of this UnifiedLoanRecord. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UnifiedLoanRecord. - - The amount of lending or repaying # noqa: E501 - - :param amount: The amount of this UnifiedLoanRecord. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def create_time(self): - """Gets the create_time of this UnifiedLoanRecord. # noqa: E501 - - Created time # noqa: E501 - - :return: The create_time of this UnifiedLoanRecord. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this UnifiedLoanRecord. - - Created time # noqa: E501 - - :param create_time: The create_time of this UnifiedLoanRecord. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedLoanRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedLoanRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py deleted file mode 100644 index 7ecabfe..0000000 --- a/gate_api/models/unified_loan_result.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedLoanResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'tran_id': 'int' - } - - attribute_map = { - 'tran_id': 'tran_id' - } - - def __init__(self, tran_id=None, local_vars_configuration=None): # noqa: E501 - # type: (int, Configuration) -> None - """UnifiedLoanResult - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._tran_id = None - self.discriminator = None - - if tran_id is not None: - self.tran_id = tran_id - - @property - def tran_id(self): - """Gets the tran_id of this UnifiedLoanResult. # noqa: E501 - - Transaction id # noqa: E501 - - :return: The tran_id of this UnifiedLoanResult. # noqa: E501 - :rtype: int - """ - return self._tran_id - - @tran_id.setter - def tran_id(self, tran_id): - """Sets the tran_id of this UnifiedLoanResult. - - Transaction id # noqa: E501 - - :param tran_id: The tran_id of this UnifiedLoanResult. # noqa: E501 - :type: int - """ - - self._tran_id = tran_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedLoanResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedLoanResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py deleted file mode 100644 index 2cf4e6d..0000000 --- a/gate_api/models/unified_margin_tiers.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedMarginTiers(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'margin_tiers': 'list[MarginTiers]' - } - - attribute_map = { - 'currency': 'currency', - 'margin_tiers': 'margin_tiers' - } - - def __init__(self, currency=None, margin_tiers=None, local_vars_configuration=None): # noqa: E501 - # type: (str, list[MarginTiers], Configuration) -> None - """UnifiedMarginTiers - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._margin_tiers = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if margin_tiers is not None: - self.margin_tiers = margin_tiers - - @property - def currency(self): - """Gets the currency of this UnifiedMarginTiers. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this UnifiedMarginTiers. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedMarginTiers. - - Currency name # noqa: E501 - - :param currency: The currency of this UnifiedMarginTiers. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def margin_tiers(self): - """Gets the margin_tiers of this UnifiedMarginTiers. # noqa: E501 - - Margin tiers # noqa: E501 - - :return: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 - :rtype: list[MarginTiers] - """ - return self._margin_tiers - - @margin_tiers.setter - def margin_tiers(self, margin_tiers): - """Sets the margin_tiers of this UnifiedMarginTiers. - - Margin tiers # noqa: E501 - - :param margin_tiers: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 - :type: list[MarginTiers] - """ - - self._margin_tiers = margin_tiers - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedMarginTiers): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedMarginTiers): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py deleted file mode 100644 index 41f6476..0000000 --- a/gate_api/models/unified_mode_set.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedModeSet(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'mode': 'str', - 'settings': 'UnifiedSettings' - } - - attribute_map = { - 'mode': 'mode', - 'settings': 'settings' - } - - def __init__(self, mode=None, settings=None, local_vars_configuration=None): # noqa: E501 - # type: (str, UnifiedSettings, Configuration) -> None - """UnifiedModeSet - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._mode = None - self._settings = None - self.discriminator = None - - self.mode = mode - if settings is not None: - self.settings = settings - - @property - def mode(self): - """Gets the mode of this UnifiedModeSet. # noqa: E501 - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model # noqa: E501 - - :return: The mode of this UnifiedModeSet. # noqa: E501 - :rtype: str - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this UnifiedModeSet. - - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model # noqa: E501 - - :param mode: The mode of this UnifiedModeSet. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501 - raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501 - - self._mode = mode - - @property - def settings(self): - """Gets the settings of this UnifiedModeSet. # noqa: E501 - - - :return: The settings of this UnifiedModeSet. # noqa: E501 - :rtype: UnifiedSettings - """ - return self._settings - - @settings.setter - def settings(self, settings): - """Sets the settings of this UnifiedModeSet. - - - :param settings: The settings of this UnifiedModeSet. # noqa: E501 - :type: UnifiedSettings - """ - - self._settings = settings - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedModeSet): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedModeSet): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py deleted file mode 100644 index 2cb0816..0000000 --- a/gate_api/models/unified_portfolio_input.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedPortfolioInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'spot_balances': 'list[MockSpotBalance]', - 'spot_orders': 'list[MockSpotOrder]', - 'futures_positions': 'list[MockFuturesPosition]', - 'futures_orders': 'list[MockFuturesOrder]', - 'options_positions': 'list[MockOptionsPosition]', - 'options_orders': 'list[MockOptionsOrder]', - 'spot_hedge': 'bool' - } - - attribute_map = { - 'spot_balances': 'spot_balances', - 'spot_orders': 'spot_orders', - 'futures_positions': 'futures_positions', - 'futures_orders': 'futures_orders', - 'options_positions': 'options_positions', - 'options_orders': 'options_orders', - 'spot_hedge': 'spot_hedge' - } - - def __init__(self, spot_balances=None, spot_orders=None, futures_positions=None, futures_orders=None, options_positions=None, options_orders=None, spot_hedge=None, local_vars_configuration=None): # noqa: E501 - # type: (list[MockSpotBalance], list[MockSpotOrder], list[MockFuturesPosition], list[MockFuturesOrder], list[MockOptionsPosition], list[MockOptionsOrder], bool, Configuration) -> None - """UnifiedPortfolioInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._spot_balances = None - self._spot_orders = None - self._futures_positions = None - self._futures_orders = None - self._options_positions = None - self._options_orders = None - self._spot_hedge = None - self.discriminator = None - - if spot_balances is not None: - self.spot_balances = spot_balances - if spot_orders is not None: - self.spot_orders = spot_orders - if futures_positions is not None: - self.futures_positions = futures_positions - if futures_orders is not None: - self.futures_orders = futures_orders - if options_positions is not None: - self.options_positions = options_positions - if options_orders is not None: - self.options_orders = options_orders - if spot_hedge is not None: - self.spot_hedge = spot_hedge - - @property - def spot_balances(self): - """Gets the spot_balances of this UnifiedPortfolioInput. # noqa: E501 - - Spot # noqa: E501 - - :return: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 - :rtype: list[MockSpotBalance] - """ - return self._spot_balances - - @spot_balances.setter - def spot_balances(self, spot_balances): - """Sets the spot_balances of this UnifiedPortfolioInput. - - Spot # noqa: E501 - - :param spot_balances: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 - :type: list[MockSpotBalance] - """ - - self._spot_balances = spot_balances - - @property - def spot_orders(self): - """Gets the spot_orders of this UnifiedPortfolioInput. # noqa: E501 - - Spot orders # noqa: E501 - - :return: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 - :rtype: list[MockSpotOrder] - """ - return self._spot_orders - - @spot_orders.setter - def spot_orders(self, spot_orders): - """Sets the spot_orders of this UnifiedPortfolioInput. - - Spot orders # noqa: E501 - - :param spot_orders: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 - :type: list[MockSpotOrder] - """ - - self._spot_orders = spot_orders - - @property - def futures_positions(self): - """Gets the futures_positions of this UnifiedPortfolioInput. # noqa: E501 - - Futures positions # noqa: E501 - - :return: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 - :rtype: list[MockFuturesPosition] - """ - return self._futures_positions - - @futures_positions.setter - def futures_positions(self, futures_positions): - """Sets the futures_positions of this UnifiedPortfolioInput. - - Futures positions # noqa: E501 - - :param futures_positions: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 - :type: list[MockFuturesPosition] - """ - - self._futures_positions = futures_positions - - @property - def futures_orders(self): - """Gets the futures_orders of this UnifiedPortfolioInput. # noqa: E501 - - Futures order # noqa: E501 - - :return: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 - :rtype: list[MockFuturesOrder] - """ - return self._futures_orders - - @futures_orders.setter - def futures_orders(self, futures_orders): - """Sets the futures_orders of this UnifiedPortfolioInput. - - Futures order # noqa: E501 - - :param futures_orders: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 - :type: list[MockFuturesOrder] - """ - - self._futures_orders = futures_orders - - @property - def options_positions(self): - """Gets the options_positions of this UnifiedPortfolioInput. # noqa: E501 - - Options positions # noqa: E501 - - :return: The options_positions of this UnifiedPortfolioInput. # noqa: E501 - :rtype: list[MockOptionsPosition] - """ - return self._options_positions - - @options_positions.setter - def options_positions(self, options_positions): - """Sets the options_positions of this UnifiedPortfolioInput. - - Options positions # noqa: E501 - - :param options_positions: The options_positions of this UnifiedPortfolioInput. # noqa: E501 - :type: list[MockOptionsPosition] - """ - - self._options_positions = options_positions - - @property - def options_orders(self): - """Gets the options_orders of this UnifiedPortfolioInput. # noqa: E501 - - Option orders # noqa: E501 - - :return: The options_orders of this UnifiedPortfolioInput. # noqa: E501 - :rtype: list[MockOptionsOrder] - """ - return self._options_orders - - @options_orders.setter - def options_orders(self, options_orders): - """Sets the options_orders of this UnifiedPortfolioInput. - - Option orders # noqa: E501 - - :param options_orders: The options_orders of this UnifiedPortfolioInput. # noqa: E501 - :type: list[MockOptionsOrder] - """ - - self._options_orders = options_orders - - @property - def spot_hedge(self): - """Gets the spot_hedge of this UnifiedPortfolioInput. # noqa: E501 - - Whether to enable spot hedging. # noqa: E501 - - :return: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501 - :rtype: bool - """ - return self._spot_hedge - - @spot_hedge.setter - def spot_hedge(self, spot_hedge): - """Sets the spot_hedge of this UnifiedPortfolioInput. - - Whether to enable spot hedging. # noqa: E501 - - :param spot_hedge: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501 - :type: bool - """ - - self._spot_hedge = spot_hedge - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedPortfolioInput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedPortfolioInput): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py deleted file mode 100644 index cf656e4..0000000 --- a/gate_api/models/unified_portfolio_output.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedPortfolioOutput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'maintain_margin_total': 'str', - 'initial_margin_total': 'str', - 'calculate_time': 'int', - 'risk_unit': 'list[MockRiskUnit]' - } - - attribute_map = { - 'maintain_margin_total': 'maintain_margin_total', - 'initial_margin_total': 'initial_margin_total', - 'calculate_time': 'calculate_time', - 'risk_unit': 'risk_unit' - } - - def __init__(self, maintain_margin_total=None, initial_margin_total=None, calculate_time=None, risk_unit=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, int, list[MockRiskUnit], Configuration) -> None - """UnifiedPortfolioOutput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._maintain_margin_total = None - self._initial_margin_total = None - self._calculate_time = None - self._risk_unit = None - self.discriminator = None - - if maintain_margin_total is not None: - self.maintain_margin_total = maintain_margin_total - if initial_margin_total is not None: - self.initial_margin_total = initial_margin_total - if calculate_time is not None: - self.calculate_time = calculate_time - if risk_unit is not None: - self.risk_unit = risk_unit - - @property - def maintain_margin_total(self): - """Gets the maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - - Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. # noqa: E501 - - :return: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - :rtype: str - """ - return self._maintain_margin_total - - @maintain_margin_total.setter - def maintain_margin_total(self, maintain_margin_total): - """Sets the maintain_margin_total of this UnifiedPortfolioOutput. - - Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. # noqa: E501 - - :param maintain_margin_total: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - :type: str - """ - - self._maintain_margin_total = maintain_margin_total - - @property - def initial_margin_total(self): - """Gets the initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - - Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. # noqa: E501 - - :return: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - :rtype: str - """ - return self._initial_margin_total - - @initial_margin_total.setter - def initial_margin_total(self, initial_margin_total): - """Sets the initial_margin_total of this UnifiedPortfolioOutput. - - Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. # noqa: E501 - - :param initial_margin_total: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - :type: str - """ - - self._initial_margin_total = initial_margin_total - - @property - def calculate_time(self): - """Gets the calculate_time of this UnifiedPortfolioOutput. # noqa: E501 - - Calculate time # noqa: E501 - - :return: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 - :rtype: int - """ - return self._calculate_time - - @calculate_time.setter - def calculate_time(self, calculate_time): - """Sets the calculate_time of this UnifiedPortfolioOutput. - - Calculate time # noqa: E501 - - :param calculate_time: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 - :type: int - """ - - self._calculate_time = calculate_time - - @property - def risk_unit(self): - """Gets the risk_unit of this UnifiedPortfolioOutput. # noqa: E501 - - Risk unit # noqa: E501 - - :return: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 - :rtype: list[MockRiskUnit] - """ - return self._risk_unit - - @risk_unit.setter - def risk_unit(self, risk_unit): - """Sets the risk_unit of this UnifiedPortfolioOutput. - - Risk unit # noqa: E501 - - :param risk_unit: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 - :type: list[MockRiskUnit] - """ - - self._risk_unit = risk_unit - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedPortfolioOutput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedPortfolioOutput): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py deleted file mode 100644 index df9d67c..0000000 --- a/gate_api/models/unified_risk_units.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedRiskUnits(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'spot_hedge': 'bool', - 'risk_units': 'list[RiskUnits]' - } - - attribute_map = { - 'user_id': 'user_id', - 'spot_hedge': 'spot_hedge', - 'risk_units': 'risk_units' - } - - def __init__(self, user_id=None, spot_hedge=None, risk_units=None, local_vars_configuration=None): # noqa: E501 - # type: (int, bool, list[RiskUnits], Configuration) -> None - """UnifiedRiskUnits - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._spot_hedge = None - self._risk_units = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if spot_hedge is not None: - self.spot_hedge = spot_hedge - if risk_units is not None: - self.risk_units = risk_units - - @property - def user_id(self): - """Gets the user_id of this UnifiedRiskUnits. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this UnifiedRiskUnits. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this UnifiedRiskUnits. - - User ID # noqa: E501 - - :param user_id: The user_id of this UnifiedRiskUnits. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def spot_hedge(self): - """Gets the spot_hedge of this UnifiedRiskUnits. # noqa: E501 - - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 - - :return: The spot_hedge of this UnifiedRiskUnits. # noqa: E501 - :rtype: bool - """ - return self._spot_hedge - - @spot_hedge.setter - def spot_hedge(self, spot_hedge): - """Sets the spot_hedge of this UnifiedRiskUnits. - - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 - - :param spot_hedge: The spot_hedge of this UnifiedRiskUnits. # noqa: E501 - :type: bool - """ - - self._spot_hedge = spot_hedge - - @property - def risk_units(self): - """Gets the risk_units of this UnifiedRiskUnits. # noqa: E501 - - Risk unit # noqa: E501 - - :return: The risk_units of this UnifiedRiskUnits. # noqa: E501 - :rtype: list[RiskUnits] - """ - return self._risk_units - - @risk_units.setter - def risk_units(self, risk_units): - """Sets the risk_units of this UnifiedRiskUnits. - - Risk unit # noqa: E501 - - :param risk_units: The risk_units of this UnifiedRiskUnits. # noqa: E501 - :type: list[RiskUnits] - """ - - self._risk_units = risk_units - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedRiskUnits): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedRiskUnits): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py deleted file mode 100644 index a70dec2..0000000 --- a/gate_api/models/unified_settings.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedSettings(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'usdt_futures': 'bool', - 'spot_hedge': 'bool', - 'use_funding': 'bool', - 'options': 'bool' - } - - attribute_map = { - 'usdt_futures': 'usdt_futures', - 'spot_hedge': 'spot_hedge', - 'use_funding': 'use_funding', - 'options': 'options' - } - - def __init__(self, usdt_futures=None, spot_hedge=None, use_funding=None, options=None, local_vars_configuration=None): # noqa: E501 - # type: (bool, bool, bool, bool, Configuration) -> None - """UnifiedSettings - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._usdt_futures = None - self._spot_hedge = None - self._use_funding = None - self._options = None - self.discriminator = None - - if usdt_futures is not None: - self.usdt_futures = usdt_futures - if spot_hedge is not None: - self.spot_hedge = spot_hedge - if use_funding is not None: - self.use_funding = use_funding - if options is not None: - self.options = options - - @property - def usdt_futures(self): - """Gets the usdt_futures of this UnifiedSettings. # noqa: E501 - - USDT contract switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 - - :return: The usdt_futures of this UnifiedSettings. # noqa: E501 - :rtype: bool - """ - return self._usdt_futures - - @usdt_futures.setter - def usdt_futures(self, usdt_futures): - """Sets the usdt_futures of this UnifiedSettings. - - USDT contract switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 - - :param usdt_futures: The usdt_futures of this UnifiedSettings. # noqa: E501 - :type: bool - """ - - self._usdt_futures = usdt_futures - - @property - def spot_hedge(self): - """Gets the spot_hedge of this UnifiedSettings. # noqa: E501 - - Spot hedging switch. # noqa: E501 - - :return: The spot_hedge of this UnifiedSettings. # noqa: E501 - :rtype: bool - """ - return self._spot_hedge - - @spot_hedge.setter - def spot_hedge(self, spot_hedge): - """Sets the spot_hedge of this UnifiedSettings. - - Spot hedging switch. # noqa: E501 - - :param spot_hedge: The spot_hedge of this UnifiedSettings. # noqa: E501 - :type: bool - """ - - self._spot_hedge = spot_hedge - - @property - def use_funding(self): - """Gets the use_funding of this UnifiedSettings. # noqa: E501 - - switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin # noqa: E501 - - :return: The use_funding of this UnifiedSettings. # noqa: E501 - :rtype: bool - """ - return self._use_funding - - @use_funding.setter - def use_funding(self, use_funding): - """Sets the use_funding of this UnifiedSettings. - - switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin # noqa: E501 - - :param use_funding: The use_funding of this UnifiedSettings. # noqa: E501 - :type: bool - """ - - self._use_funding = use_funding - - @property - def options(self): - """Gets the options of this UnifiedSettings. # noqa: E501 - - Option switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 - - :return: The options of this UnifiedSettings. # noqa: E501 - :rtype: bool - """ - return self._options - - @options.setter - def options(self, options): - """Sets the options of this UnifiedSettings. - - Option switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 - - :param options: The options of this UnifiedSettings. # noqa: E501 - :type: bool - """ - - self._options = options - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedSettings): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedSettings): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py deleted file mode 100644 index cfdb6ce..0000000 --- a/gate_api/models/unified_transferable.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UnifiedTransferable(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """UnifiedTransferable - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - - @property - def currency(self): - """Gets the currency of this UnifiedTransferable. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this UnifiedTransferable. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UnifiedTransferable. - - Currency detail # noqa: E501 - - :param currency: The currency of this UnifiedTransferable. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this UnifiedTransferable. # noqa: E501 - - The maximum amount that can be transferred out # noqa: E501 - - :return: The amount of this UnifiedTransferable. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UnifiedTransferable. - - The maximum amount that can be transferred out # noqa: E501 - - :param amount: The amount of this UnifiedTransferable. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnifiedTransferable): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UnifiedTransferable): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py deleted file mode 100644 index 579ed3d..0000000 --- a/gate_api/models/user_ltv_info.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UserLtvInfo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'collateral_currency': 'str', - 'borrow_currency': 'str', - 'init_ltv': 'str', - 'alert_ltv': 'str', - 'liquidate_ltv': 'str', - 'min_borrow_amount': 'str', - 'left_borrowable_amount': 'str' - } - - attribute_map = { - 'collateral_currency': 'collateral_currency', - 'borrow_currency': 'borrow_currency', - 'init_ltv': 'init_ltv', - 'alert_ltv': 'alert_ltv', - 'liquidate_ltv': 'liquidate_ltv', - 'min_borrow_amount': 'min_borrow_amount', - 'left_borrowable_amount': 'left_borrowable_amount' - } - - def __init__(self, collateral_currency=None, borrow_currency=None, init_ltv=None, alert_ltv=None, liquidate_ltv=None, min_borrow_amount=None, left_borrowable_amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, Configuration) -> None - """UserLtvInfo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._collateral_currency = None - self._borrow_currency = None - self._init_ltv = None - self._alert_ltv = None - self._liquidate_ltv = None - self._min_borrow_amount = None - self._left_borrowable_amount = None - self.discriminator = None - - if collateral_currency is not None: - self.collateral_currency = collateral_currency - if borrow_currency is not None: - self.borrow_currency = borrow_currency - if init_ltv is not None: - self.init_ltv = init_ltv - if alert_ltv is not None: - self.alert_ltv = alert_ltv - if liquidate_ltv is not None: - self.liquidate_ltv = liquidate_ltv - if min_borrow_amount is not None: - self.min_borrow_amount = min_borrow_amount - if left_borrowable_amount is not None: - self.left_borrowable_amount = left_borrowable_amount - - @property - def collateral_currency(self): - """Gets the collateral_currency of this UserLtvInfo. # noqa: E501 - - Collateral # noqa: E501 - - :return: The collateral_currency of this UserLtvInfo. # noqa: E501 - :rtype: str - """ - return self._collateral_currency - - @collateral_currency.setter - def collateral_currency(self, collateral_currency): - """Sets the collateral_currency of this UserLtvInfo. - - Collateral # noqa: E501 - - :param collateral_currency: The collateral_currency of this UserLtvInfo. # noqa: E501 - :type: str - """ - - self._collateral_currency = collateral_currency - - @property - def borrow_currency(self): - """Gets the borrow_currency of this UserLtvInfo. # noqa: E501 - - Borrowed currency # noqa: E501 - - :return: The borrow_currency of this UserLtvInfo. # noqa: E501 - :rtype: str - """ - return self._borrow_currency - - @borrow_currency.setter - def borrow_currency(self, borrow_currency): - """Sets the borrow_currency of this UserLtvInfo. - - Borrowed currency # noqa: E501 - - :param borrow_currency: The borrow_currency of this UserLtvInfo. # noqa: E501 - :type: str - """ - - self._borrow_currency = borrow_currency - - @property - def init_ltv(self): - """Gets the init_ltv of this UserLtvInfo. # noqa: E501 - - The initial collateralization rate # noqa: E501 - - :return: The init_ltv of this UserLtvInfo. # noqa: E501 - :rtype: str - """ - return self._init_ltv - - @init_ltv.setter - def init_ltv(self, init_ltv): - """Sets the init_ltv of this UserLtvInfo. - - The initial collateralization rate # noqa: E501 - - :param init_ltv: The init_ltv of this UserLtvInfo. # noqa: E501 - :type: str - """ - - self._init_ltv = init_ltv - - @property - def alert_ltv(self): - """Gets the alert_ltv of this UserLtvInfo. # noqa: E501 - - Warning collateralization ratio # noqa: E501 - - :return: The alert_ltv of this UserLtvInfo. # noqa: E501 - :rtype: str - """ - return self._alert_ltv - - @alert_ltv.setter - def alert_ltv(self, alert_ltv): - """Sets the alert_ltv of this UserLtvInfo. - - Warning collateralization ratio # noqa: E501 - - :param alert_ltv: The alert_ltv of this UserLtvInfo. # noqa: E501 - :type: str - """ - - self._alert_ltv = alert_ltv - - @property - def liquidate_ltv(self): - """Gets the liquidate_ltv of this UserLtvInfo. # noqa: E501 - - The liquidation collateralization rate # noqa: E501 - - :return: The liquidate_ltv of this UserLtvInfo. # noqa: E501 - :rtype: str - """ - return self._liquidate_ltv - - @liquidate_ltv.setter - def liquidate_ltv(self, liquidate_ltv): - """Sets the liquidate_ltv of this UserLtvInfo. - - The liquidation collateralization rate # noqa: E501 - - :param liquidate_ltv: The liquidate_ltv of this UserLtvInfo. # noqa: E501 - :type: str - """ - - self._liquidate_ltv = liquidate_ltv - - @property - def min_borrow_amount(self): - """Gets the min_borrow_amount of this UserLtvInfo. # noqa: E501 - - Minimum borrowable amount for the loan currency # noqa: E501 - - :return: The min_borrow_amount of this UserLtvInfo. # noqa: E501 - :rtype: str - """ - return self._min_borrow_amount - - @min_borrow_amount.setter - def min_borrow_amount(self, min_borrow_amount): - """Sets the min_borrow_amount of this UserLtvInfo. - - Minimum borrowable amount for the loan currency # noqa: E501 - - :param min_borrow_amount: The min_borrow_amount of this UserLtvInfo. # noqa: E501 - :type: str - """ - - self._min_borrow_amount = min_borrow_amount - - @property - def left_borrowable_amount(self): - """Gets the left_borrowable_amount of this UserLtvInfo. # noqa: E501 - - Remaining borrowable amount for the loan currency # noqa: E501 - - :return: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 - :rtype: str - """ - return self._left_borrowable_amount - - @left_borrowable_amount.setter - def left_borrowable_amount(self, left_borrowable_amount): - """Sets the left_borrowable_amount of this UserLtvInfo. - - Remaining borrowable amount for the loan currency # noqa: E501 - - :param left_borrowable_amount: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 - :type: str - """ - - self._left_borrowable_amount = left_borrowable_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, UserLtvInfo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserLtvInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py deleted file mode 100644 index a43517d..0000000 --- a/gate_api/models/user_sub.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UserSub(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'uid': 'int', - 'belong': 'str', - 'type': 'int', - 'ref_uid': 'int' - } - - attribute_map = { - 'uid': 'uid', - 'belong': 'belong', - 'type': 'type', - 'ref_uid': 'ref_uid' - } - - def __init__(self, uid=None, belong=None, type=None, ref_uid=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, int, Configuration) -> None - """UserSub - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._uid = None - self._belong = None - self._type = None - self._ref_uid = None - self.discriminator = None - - if uid is not None: - self.uid = uid - if belong is not None: - self.belong = belong - if type is not None: - self.type = type - if ref_uid is not None: - self.ref_uid = ref_uid - - @property - def uid(self): - """Gets the uid of this UserSub. # noqa: E501 - - User ID # noqa: E501 - - :return: The uid of this UserSub. # noqa: E501 - :rtype: int - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this UserSub. - - User ID # noqa: E501 - - :param uid: The uid of this UserSub. # noqa: E501 - :type: int - """ - - self._uid = uid - - @property - def belong(self): - """Gets the belong of this UserSub. # noqa: E501 - - The system to which the user belongs (partner referral). If empty, it means not belonging to any system. # noqa: E501 - - :return: The belong of this UserSub. # noqa: E501 - :rtype: str - """ - return self._belong - - @belong.setter - def belong(self, belong): - """Sets the belong of this UserSub. - - The system to which the user belongs (partner referral). If empty, it means not belonging to any system. # noqa: E501 - - :param belong: The belong of this UserSub. # noqa: E501 - :type: str - """ - - self._belong = belong - - @property - def type(self): - """Gets the type of this UserSub. # noqa: E501 - - Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 - - :return: The type of this UserSub. # noqa: E501 - :rtype: int - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UserSub. - - Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 - - :param type: The type of this UserSub. # noqa: E501 - :type: int - """ - - self._type = type - - @property - def ref_uid(self): - """Gets the ref_uid of this UserSub. # noqa: E501 - - Inviter user ID # noqa: E501 - - :return: The ref_uid of this UserSub. # noqa: E501 - :rtype: int - """ - return self._ref_uid - - @ref_uid.setter - def ref_uid(self, ref_uid): - """Sets the ref_uid of this UserSub. - - Inviter user ID # noqa: E501 - - :param ref_uid: The ref_uid of this UserSub. # noqa: E501 - :type: int - """ - - self._ref_uid = ref_uid - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserSub): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserSub): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py deleted file mode 100644 index 6f85275..0000000 --- a/gate_api/models/user_sub_relation.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UserSubRelation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'list': 'list[UserSub]' - } - - attribute_map = { - 'list': 'list' - } - - def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 - # type: (list[UserSub], Configuration) -> None - """UserSubRelation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._list = None - self.discriminator = None - - if list is not None: - self.list = list - - @property - def list(self): - """Gets the list of this UserSubRelation. # noqa: E501 - - Subordinate relationship list # noqa: E501 - - :return: The list of this UserSubRelation. # noqa: E501 - :rtype: list[UserSub] - """ - return self._list - - @list.setter - def list(self, list): - """Sets the list of this UserSubRelation. - - Subordinate relationship list # noqa: E501 - - :param list: The list of this UserSubRelation. # noqa: E501 - :type: list[UserSub] - """ - - self._list = list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserSubRelation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserSubRelation): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py deleted file mode 100644 index 26a1bb3..0000000 --- a/gate_api/models/user_total_amount.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UserTotalAmount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'borrow_amount': 'str', - 'collateral_amount': 'str' - } - - attribute_map = { - 'borrow_amount': 'borrow_amount', - 'collateral_amount': 'collateral_amount' - } - - def __init__(self, borrow_amount=None, collateral_amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """UserTotalAmount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._borrow_amount = None - self._collateral_amount = None - self.discriminator = None - - if borrow_amount is not None: - self.borrow_amount = borrow_amount - if collateral_amount is not None: - self.collateral_amount = collateral_amount - - @property - def borrow_amount(self): - """Gets the borrow_amount of this UserTotalAmount. # noqa: E501 - - Total borrowing amount, calculated in USDT # noqa: E501 - - :return: The borrow_amount of this UserTotalAmount. # noqa: E501 - :rtype: str - """ - return self._borrow_amount - - @borrow_amount.setter - def borrow_amount(self, borrow_amount): - """Sets the borrow_amount of this UserTotalAmount. - - Total borrowing amount, calculated in USDT # noqa: E501 - - :param borrow_amount: The borrow_amount of this UserTotalAmount. # noqa: E501 - :type: str - """ - - self._borrow_amount = borrow_amount - - @property - def collateral_amount(self): - """Gets the collateral_amount of this UserTotalAmount. # noqa: E501 - - Total collateral amount, calculated in USDT # noqa: E501 - - :return: The collateral_amount of this UserTotalAmount. # noqa: E501 - :rtype: str - """ - return self._collateral_amount - - @collateral_amount.setter - def collateral_amount(self, collateral_amount): - """Sets the collateral_amount of this UserTotalAmount. - - Total collateral amount, calculated in USDT # noqa: E501 - - :param collateral_amount: The collateral_amount of this UserTotalAmount. # noqa: E501 - :type: str - """ - - self._collateral_amount = collateral_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, UserTotalAmount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserTotalAmount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py deleted file mode 100644 index b91f1ba..0000000 --- a/gate_api/models/withdraw_status.py +++ /dev/null @@ -1,431 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class WithdrawStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'name': 'str', - 'name_cn': 'str', - 'deposit': 'str', - 'withdraw_percent': 'str', - 'withdraw_fix': 'str', - 'withdraw_day_limit': 'str', - 'withdraw_amount_mini': 'str', - 'withdraw_day_limit_remain': 'str', - 'withdraw_eachtime_limit': 'str', - 'withdraw_fix_on_chains': 'dict(str, str)', - 'withdraw_percent_on_chains': 'dict(str, str)' - } - - attribute_map = { - 'currency': 'currency', - 'name': 'name', - 'name_cn': 'name_cn', - 'deposit': 'deposit', - 'withdraw_percent': 'withdraw_percent', - 'withdraw_fix': 'withdraw_fix', - 'withdraw_day_limit': 'withdraw_day_limit', - 'withdraw_amount_mini': 'withdraw_amount_mini', - 'withdraw_day_limit_remain': 'withdraw_day_limit_remain', - 'withdraw_eachtime_limit': 'withdraw_eachtime_limit', - 'withdraw_fix_on_chains': 'withdraw_fix_on_chains', - 'withdraw_percent_on_chains': 'withdraw_percent_on_chains' - } - - def __init__(self, currency=None, name=None, name_cn=None, deposit=None, withdraw_percent=None, withdraw_fix=None, withdraw_day_limit=None, withdraw_amount_mini=None, withdraw_day_limit_remain=None, withdraw_eachtime_limit=None, withdraw_fix_on_chains=None, withdraw_percent_on_chains=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, dict(str, str), dict(str, str), Configuration) -> None - """WithdrawStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._name = None - self._name_cn = None - self._deposit = None - self._withdraw_percent = None - self._withdraw_fix = None - self._withdraw_day_limit = None - self._withdraw_amount_mini = None - self._withdraw_day_limit_remain = None - self._withdraw_eachtime_limit = None - self._withdraw_fix_on_chains = None - self._withdraw_percent_on_chains = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if name is not None: - self.name = name - if name_cn is not None: - self.name_cn = name_cn - if deposit is not None: - self.deposit = deposit - if withdraw_percent is not None: - self.withdraw_percent = withdraw_percent - if withdraw_fix is not None: - self.withdraw_fix = withdraw_fix - if withdraw_day_limit is not None: - self.withdraw_day_limit = withdraw_day_limit - if withdraw_amount_mini is not None: - self.withdraw_amount_mini = withdraw_amount_mini - if withdraw_day_limit_remain is not None: - self.withdraw_day_limit_remain = withdraw_day_limit_remain - if withdraw_eachtime_limit is not None: - self.withdraw_eachtime_limit = withdraw_eachtime_limit - if withdraw_fix_on_chains is not None: - self.withdraw_fix_on_chains = withdraw_fix_on_chains - if withdraw_percent_on_chains is not None: - self.withdraw_percent_on_chains = withdraw_percent_on_chains - - @property - def currency(self): - """Gets the currency of this WithdrawStatus. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this WithdrawStatus. - - Currency # noqa: E501 - - :param currency: The currency of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def name(self): - """Gets the name of this WithdrawStatus. # noqa: E501 - - Currency name # noqa: E501 - - :return: The name of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this WithdrawStatus. - - Currency name # noqa: E501 - - :param name: The name of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def name_cn(self): - """Gets the name_cn of this WithdrawStatus. # noqa: E501 - - Currency Chinese name # noqa: E501 - - :return: The name_cn of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._name_cn - - @name_cn.setter - def name_cn(self, name_cn): - """Sets the name_cn of this WithdrawStatus. - - Currency Chinese name # noqa: E501 - - :param name_cn: The name_cn of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._name_cn = name_cn - - @property - def deposit(self): - """Gets the deposit of this WithdrawStatus. # noqa: E501 - - Deposits fee # noqa: E501 - - :return: The deposit of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._deposit - - @deposit.setter - def deposit(self, deposit): - """Sets the deposit of this WithdrawStatus. - - Deposits fee # noqa: E501 - - :param deposit: The deposit of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._deposit = deposit - - @property - def withdraw_percent(self): - """Gets the withdraw_percent of this WithdrawStatus. # noqa: E501 - - Withdrawal fee rate percentage # noqa: E501 - - :return: The withdraw_percent of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._withdraw_percent - - @withdraw_percent.setter - def withdraw_percent(self, withdraw_percent): - """Sets the withdraw_percent of this WithdrawStatus. - - Withdrawal fee rate percentage # noqa: E501 - - :param withdraw_percent: The withdraw_percent of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._withdraw_percent = withdraw_percent - - @property - def withdraw_fix(self): - """Gets the withdraw_fix of this WithdrawStatus. # noqa: E501 - - Fixed withdrawal fee # noqa: E501 - - :return: The withdraw_fix of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._withdraw_fix - - @withdraw_fix.setter - def withdraw_fix(self, withdraw_fix): - """Sets the withdraw_fix of this WithdrawStatus. - - Fixed withdrawal fee # noqa: E501 - - :param withdraw_fix: The withdraw_fix of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._withdraw_fix = withdraw_fix - - @property - def withdraw_day_limit(self): - """Gets the withdraw_day_limit of this WithdrawStatus. # noqa: E501 - - Daily allowed withdrawal amount # noqa: E501 - - :return: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._withdraw_day_limit - - @withdraw_day_limit.setter - def withdraw_day_limit(self, withdraw_day_limit): - """Sets the withdraw_day_limit of this WithdrawStatus. - - Daily allowed withdrawal amount # noqa: E501 - - :param withdraw_day_limit: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._withdraw_day_limit = withdraw_day_limit - - @property - def withdraw_amount_mini(self): - """Gets the withdraw_amount_mini of this WithdrawStatus. # noqa: E501 - - Minimum withdrawal amount # noqa: E501 - - :return: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._withdraw_amount_mini - - @withdraw_amount_mini.setter - def withdraw_amount_mini(self, withdraw_amount_mini): - """Sets the withdraw_amount_mini of this WithdrawStatus. - - Minimum withdrawal amount # noqa: E501 - - :param withdraw_amount_mini: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._withdraw_amount_mini = withdraw_amount_mini - - @property - def withdraw_day_limit_remain(self): - """Gets the withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 - - Daily withdrawal amount left # noqa: E501 - - :return: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._withdraw_day_limit_remain - - @withdraw_day_limit_remain.setter - def withdraw_day_limit_remain(self, withdraw_day_limit_remain): - """Sets the withdraw_day_limit_remain of this WithdrawStatus. - - Daily withdrawal amount left # noqa: E501 - - :param withdraw_day_limit_remain: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._withdraw_day_limit_remain = withdraw_day_limit_remain - - @property - def withdraw_eachtime_limit(self): - """Gets the withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 - - Maximum amount for each withdrawal # noqa: E501 - - :return: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 - :rtype: str - """ - return self._withdraw_eachtime_limit - - @withdraw_eachtime_limit.setter - def withdraw_eachtime_limit(self, withdraw_eachtime_limit): - """Sets the withdraw_eachtime_limit of this WithdrawStatus. - - Maximum amount for each withdrawal # noqa: E501 - - :param withdraw_eachtime_limit: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 - :type: str - """ - - self._withdraw_eachtime_limit = withdraw_eachtime_limit - - @property - def withdraw_fix_on_chains(self): - """Gets the withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 - - Fixed withdrawal fee on multiple chains # noqa: E501 - - :return: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 - :rtype: dict(str, str) - """ - return self._withdraw_fix_on_chains - - @withdraw_fix_on_chains.setter - def withdraw_fix_on_chains(self, withdraw_fix_on_chains): - """Sets the withdraw_fix_on_chains of this WithdrawStatus. - - Fixed withdrawal fee on multiple chains # noqa: E501 - - :param withdraw_fix_on_chains: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 - :type: dict(str, str) - """ - - self._withdraw_fix_on_chains = withdraw_fix_on_chains - - @property - def withdraw_percent_on_chains(self): - """Gets the withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 - - Percentage withdrawal fee on multiple chains # noqa: E501 - - :return: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 - :rtype: dict(str, str) - """ - return self._withdraw_percent_on_chains - - @withdraw_percent_on_chains.setter - def withdraw_percent_on_chains(self, withdraw_percent_on_chains): - """Sets the withdraw_percent_on_chains of this WithdrawStatus. - - Percentage withdrawal fee on multiple chains # noqa: E501 - - :param withdraw_percent_on_chains: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 - :type: dict(str, str) - """ - - self._withdraw_percent_on_chains = withdraw_percent_on_chains - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WithdrawStatus): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, WithdrawStatus): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py deleted file mode 100644 index 1ac6d0e..0000000 --- a/gate_api/models/withdrawal_record.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class WithdrawalRecord(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'txid': 'str', - 'block_number': 'str', - 'withdraw_order_id': 'str', - 'timestamp': 'str', - 'amount': 'str', - 'fee': 'str', - 'currency': 'str', - 'address': 'str', - 'memo': 'str', - 'status': 'str', - 'chain': 'str' - } - - attribute_map = { - 'id': 'id', - 'txid': 'txid', - 'block_number': 'block_number', - 'withdraw_order_id': 'withdraw_order_id', - 'timestamp': 'timestamp', - 'amount': 'amount', - 'fee': 'fee', - 'currency': 'currency', - 'address': 'address', - 'memo': 'memo', - 'status': 'status', - 'chain': 'chain' - } - - def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None, timestamp=None, amount=None, fee=None, currency=None, address=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """WithdrawalRecord - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._txid = None - self._block_number = None - self._withdraw_order_id = None - self._timestamp = None - self._amount = None - self._fee = None - self._currency = None - self._address = None - self._memo = None - self._status = None - self._chain = None - self.discriminator = None - - if id is not None: - self.id = id - if txid is not None: - self.txid = txid - if block_number is not None: - self.block_number = block_number - if withdraw_order_id is not None: - self.withdraw_order_id = withdraw_order_id - if timestamp is not None: - self.timestamp = timestamp - self.amount = amount - if fee is not None: - self.fee = fee - self.currency = currency - if address is not None: - self.address = address - if memo is not None: - self.memo = memo - if status is not None: - self.status = status - self.chain = chain - - @property - def id(self): - """Gets the id of this WithdrawalRecord. # noqa: E501 - - Record ID # noqa: E501 - - :return: The id of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this WithdrawalRecord. - - Record ID # noqa: E501 - - :param id: The id of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def txid(self): - """Gets the txid of this WithdrawalRecord. # noqa: E501 - - Hash record of the withdrawal # noqa: E501 - - :return: The txid of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._txid - - @txid.setter - def txid(self, txid): - """Sets the txid of this WithdrawalRecord. - - Hash record of the withdrawal # noqa: E501 - - :param txid: The txid of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._txid = txid - - @property - def block_number(self): - """Gets the block_number of this WithdrawalRecord. # noqa: E501 - - 区块编号 # noqa: E501 - - :return: The block_number of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._block_number - - @block_number.setter - def block_number(self, block_number): - """Sets the block_number of this WithdrawalRecord. - - 区块编号 # noqa: E501 - - :param block_number: The block_number of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._block_number = block_number - - @property - def withdraw_order_id(self): - """Gets the withdraw_order_id of this WithdrawalRecord. # noqa: E501 - - Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :return: The withdraw_order_id of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._withdraw_order_id - - @withdraw_order_id.setter - def withdraw_order_id(self, withdraw_order_id): - """Sets the withdraw_order_id of this WithdrawalRecord. - - Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 - - :param withdraw_order_id: The withdraw_order_id of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._withdraw_order_id = withdraw_order_id - - @property - def timestamp(self): - """Gets the timestamp of this WithdrawalRecord. # noqa: E501 - - Operation time # noqa: E501 - - :return: The timestamp of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this WithdrawalRecord. - - Operation time # noqa: E501 - - :param timestamp: The timestamp of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._timestamp = timestamp - - @property - def amount(self): - """Gets the amount of this WithdrawalRecord. # noqa: E501 - - Currency amount # noqa: E501 - - :return: The amount of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this WithdrawalRecord. - - Currency amount # noqa: E501 - - :param amount: The amount of this WithdrawalRecord. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def fee(self): - """Gets the fee of this WithdrawalRecord. # noqa: E501 - - fee # noqa: E501 - - :return: The fee of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._fee - - @fee.setter - def fee(self, fee): - """Sets the fee of this WithdrawalRecord. - - fee # noqa: E501 - - :param fee: The fee of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._fee = fee - - @property - def currency(self): - """Gets the currency of this WithdrawalRecord. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this WithdrawalRecord. - - Currency name # noqa: E501 - - :param currency: The currency of this WithdrawalRecord. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def address(self): - """Gets the address of this WithdrawalRecord. # noqa: E501 - - Withdrawal address. Required for withdrawals # noqa: E501 - - :return: The address of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this WithdrawalRecord. - - Withdrawal address. Required for withdrawals # noqa: E501 - - :param address: The address of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def memo(self): - """Gets the memo of this WithdrawalRecord. # noqa: E501 - - Additional remarks with regards to the withdrawal # noqa: E501 - - :return: The memo of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._memo - - @memo.setter - def memo(self, memo): - """Sets the memo of this WithdrawalRecord. - - Additional remarks with regards to the withdrawal # noqa: E501 - - :param memo: The memo of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._memo = memo - - @property - def status(self): - """Gets the status of this WithdrawalRecord. # noqa: E501 - - Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review # noqa: E501 - - :return: The status of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this WithdrawalRecord. - - Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review # noqa: E501 - - :param status: The status of this WithdrawalRecord. # noqa: E501 - :type: str - """ - - self._status = status - - @property - def chain(self): - """Gets the chain of this WithdrawalRecord. # noqa: E501 - - Name of the chain used in withdrawals # noqa: E501 - - :return: The chain of this WithdrawalRecord. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this WithdrawalRecord. - - Name of the chain used in withdrawals # noqa: E501 - - :param chain: The chain of this WithdrawalRecord. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and chain is None: # noqa: E501 - raise ValueError("Invalid value for `chain`, must not be `None`") # noqa: E501 - - self._chain = chain - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WithdrawalRecord): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, WithdrawalRecord): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/rest.py b/gate_api/rest.py deleted file mode 100644 index 66d4dfc..0000000 --- a/gate_api/rest.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode -import urllib3 - -from gate_api.exceptions import ApiException, ApiValueError - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) diff --git a/git_push.sh b/git_push.sh deleted file mode 100644 index 2bad2b3..0000000 --- a/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="gateio" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="gateapi-python" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index eb358ef..0000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -certifi >= 14.05.14 -future; python_version<="2.7" -six >= 1.10 -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.15.1 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 4d8daf3..0000000 --- a/setup.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[metadata] -long_description = file: README.md -long_description_content_type = text/markdown -classifiers: - License :: OSI Approved :: Apache Software License - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 -maintainer = gateio -maintainer_email = dev@mail.gate.io - -[flake8] -max-line-length=99 diff --git a/setup.py b/setup.py deleted file mode 100644 index 50bb2d8..0000000 --- a/setup.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "gate-api" -VERSION = "6.96.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] - -setup( - name=NAME, - version=VERSION, - description="Gate API v4", - author="Gate API support", - author_email="support@mail.gate.io", - url="https://github.com/gateio/gateapi-python", - keywords=["OpenAPI", "OpenAPI-Generator", "Gate API v4"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - license="Apache License 2.0" -) diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 4ed3991..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 2be77d1..0000000 --- a/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py27, py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=gate_api From 8e066999cd2581c3f6fd540359803b19fd944ec1 Mon Sep 17 00:00:00 2001 From: gateio Date: Thu, 8 May 2025 09:23:12 +0000 Subject: [PATCH 02/20] update to v6.97.0 --- .gitignore | 66 + .gitlab-ci.yml | 33 + .travis.yml | 17 + README.md | 668 ++ docs/AccountApi.md | 625 ++ docs/AccountBalance.md | 14 + docs/AccountDetail.md | 16 + docs/AccountDetailKey.md | 11 + docs/AccountRateLimit.md | 13 + docs/AgencyCommission.md | 15 + docs/AgencyCommissionHistory.md | 12 + docs/AgencyTransaction.md | 18 + docs/AgencyTransactionHistory.md | 12 + docs/AutoRepaySetting.md | 10 + docs/BatchAmendItem.md | 17 + docs/BatchAmendOrderReq.md | 15 + docs/BatchFuturesOrder.md | 38 + docs/BatchOrder.md | 47 + docs/BorrowCurrencyInfo.md | 14 + docs/BrokerCommission.md | 11 + docs/BrokerCommission1.md | 18 + docs/BrokerTransaction.md | 11 + docs/BrokerTransaction1.md | 17 + docs/CancelBatchOrder.md | 14 + docs/CancelOrderResult.md | 17 + docs/CollateralAdjust.md | 12 + docs/CollateralAdjustRes.md | 12 + docs/CollateralAlign.md | 13 + docs/CollateralCurrency.md | 11 + docs/CollateralCurrencyInfo.md | 13 + docs/CollateralCurrencyRes.md | 14 + docs/CollateralCurrentRate.md | 12 + docs/CollateralFixRate.md | 14 + docs/CollateralLoanApi.md | 704 ++ docs/CollateralLoanCurrency.md | 12 + docs/CollateralLtv.md | 13 + docs/CollateralOrder.md | 26 + docs/CollateralRecord.md | 20 + docs/Contract.md | 46 + docs/ContractStat.md | 22 + docs/ConvertSmallBalance.md | 12 + docs/CountdownCancelAllFuturesTask.md | 12 + docs/CountdownCancelAllOptionsTask.md | 13 + docs/CountdownCancelAllSpotTask.md | 12 + docs/CreateCollateralOrder.md | 13 + docs/CreateMultiCollateralOrder.md | 18 + docs/CreateUniLend.md | 14 + docs/CreateUniLoan.md | 15 + docs/CrossMarginAccount.md | 26 + docs/CrossMarginAccountBook.md | 15 + docs/CrossMarginBalance.md | 18 + docs/CrossMarginBalance1.md | 13 + docs/CrossMarginCurrency.md | 19 + docs/CrossMarginLoan.md | 19 + docs/CrossMarginRepayRequest.md | 11 + docs/CrossMarginRepayment.md | 16 + docs/CrossMarginTransferable.md | 11 + docs/Currency.md | 19 + docs/CurrencyChain.md | 17 + docs/CurrencyPair.md | 26 + docs/CurrencyQuota.md | 15 + docs/DebitFee.md | 10 + docs/DeliveryApi.md | 2050 ++++++ docs/DeliveryCandlestick.md | 16 + docs/DeliveryContract.md | 48 + docs/DeliverySettlement.md | 18 + docs/DepositAddress.md | 12 + docs/DepositRecord.md | 19 + docs/DualGetOrders.md | 26 + docs/DualGetPlans.md | 22 + docs/EarnApi.md | 547 ++ docs/EarnUniApi.md | 763 ++ docs/Eth2RateList.md | 12 + docs/Eth2Swap.md | 12 + docs/FlashSwapApi.md | 357 + docs/FlashSwapCurrencyPair.md | 17 + docs/FlashSwapOrder.md | 19 + docs/FlashSwapOrderPreview.md | 16 + docs/FlashSwapOrderRequest.md | 15 + docs/FlashSwapPreviewRequest.md | 14 + docs/FundingAccount.md | 14 + docs/FundingRateRecord.md | 11 + docs/FutureCancelOrderResult.md | 14 + docs/FuturesAccount.md | 34 + docs/FuturesAccountBook.md | 17 + docs/FuturesAccountHistory.md | 20 + docs/FuturesApi.md | 3447 +++++++++ docs/FuturesAutoDeleverage.md | 19 + docs/FuturesBatchAmendOrderRequest.md | 15 + docs/FuturesCandlestick.md | 17 + docs/FuturesFee.md | 12 + docs/FuturesIndexConstituents.md | 11 + docs/FuturesInitialOrder.md | 19 + docs/FuturesLimitRiskTiers.md | 16 + docs/FuturesLiqOrder.md | 16 + docs/FuturesLiquidate.md | 21 + docs/FuturesOrder.md | 37 + docs/FuturesOrderAmendment.md | 14 + docs/FuturesOrderBook.md | 14 + docs/FuturesOrderBookItem.md | 11 + docs/FuturesPremiumIndex.md | 15 + docs/FuturesPriceTrigger.md | 14 + docs/FuturesPriceTriggeredOrder.md | 22 + docs/FuturesTicker.md | 32 + docs/FuturesTrade.md | 16 + docs/IndexConstituent.md | 11 + docs/InlineObject.md | 11 + docs/InlineResponse200.md | 11 + docs/InsuranceRecord.md | 11 + docs/LedgerRecord.md | 21 + docs/LiquidateOrder.md | 15 + docs/MarginAccount.md | 18 + docs/MarginAccountBook.md | 17 + docs/MarginAccountCurrency.md | 15 + docs/MarginApi.md | 1596 ++++ docs/MarginLeverageTier.md | 13 + docs/MarginMarketLeverage.md | 12 + docs/MarginTiers.md | 14 + docs/MarginTransferable.md | 12 + docs/MarginUniApi.md | 557 ++ docs/MaxUniBorrowable.md | 12 + docs/MockFuturesOrder.md | 13 + docs/MockFuturesPosition.md | 12 + docs/MockMarginResult.md | 17 + docs/MockOptionsOrder.md | 13 + docs/MockOptionsPosition.md | 12 + docs/MockRiskUnit.md | 19 + docs/MockSpotBalance.md | 12 + docs/MockSpotOrder.md | 15 + docs/MultiChainAddressItem.md | 14 + docs/MultiCollateralCurrency.md | 12 + docs/MultiCollateralItem.md | 12 + docs/MultiCollateralLoanApi.md | 808 +++ docs/MultiCollateralOrder.md | 24 + docs/MultiCollateralRecord.md | 17 + docs/MultiCollateralRecordCurrency.md | 15 + docs/MultiLoanItem.md | 11 + docs/MultiLoanRepayItem.md | 12 + docs/MultiRepayRecord.md | 22 + docs/MultiRepayResp.md | 12 + docs/MyFuturesTrade.md | 20 + docs/MyFuturesTradeTimeRange.md | 20 + docs/OpenOrders.md | 12 + docs/OptionsAccount.md | 28 + docs/OptionsAccountBook.md | 14 + docs/OptionsApi.md | 1892 +++++ docs/OptionsCandlestick.md | 16 + docs/OptionsContract.md | 35 + docs/OptionsMMP.md | 17 + docs/OptionsMMPReset.md | 17 + docs/OptionsMySettlements.md | 18 + docs/OptionsMyTrade.md | 17 + docs/OptionsOrder.md | 35 + docs/OptionsPosition.md | 26 + docs/OptionsPositionClose.md | 15 + docs/OptionsPositionCloseOrder.md | 13 + docs/OptionsSettlement.md | 15 + docs/OptionsTicker.md | 28 + docs/OptionsUnderlying.md | 11 + docs/OptionsUnderlyingTicker.md | 13 + docs/Order.md | 46 + docs/OrderBook.md | 14 + docs/OrderCancel.md | 49 + docs/OrderPatch.md | 16 + docs/OrderResp.md | 10 + docs/PartnerCommissionHistory.md | 11 + docs/PartnerSub.md | 12 + docs/PartnerSubList.md | 11 + docs/PartnerTransactionHistory.md | 11 + docs/PatchUniLend.md | 11 + docs/PlaceDualInvestmentOrder.md | 15 + docs/Position.md | 41 + docs/PositionClose.md | 22 + docs/PositionCloseOrder.md | 13 + docs/ProfitLossRange.md | 13 + docs/RebateApi.md | 692 ++ docs/RebateUserInfo.md | 11 + docs/RepayCurrencyRes.md | 15 + docs/RepayLoan.md | 13 + docs/RepayMultiLoan.md | 12 + docs/RepayRecord.md | 23 + docs/RepayRecordCurrency.md | 15 + docs/RepayRecordLeftInterest.md | 15 + docs/RepayRecordRepaidCurrency.md | 15 + docs/RepayRecordTotalInterest.md | 13 + docs/RepayResp.md | 12 + docs/RiskUnits.md | 17 + docs/SavedAddress.md | 15 + docs/SmallBalance.md | 14 + docs/SmallBalanceHistory.md | 15 + docs/SpotAccount.md | 14 + docs/SpotAccountBook.md | 17 + docs/SpotApi.md | 2248 ++++++ docs/SpotCurrencyChain.md | 14 + docs/SpotFee.md | 19 + docs/SpotInsuranceHistory.md | 12 + docs/SpotPricePutOrder.md | 18 + docs/SpotPriceTrigger.md | 12 + docs/SpotPriceTriggeredOrder.md | 20 + docs/StpGroup.md | 13 + docs/StpGroupUser.md | 12 + docs/StructuredBuy.md | 12 + docs/StructuredGetProjectList.md | 22 + docs/StructuredOrderList.md | 17 + docs/SubAccount.md | 17 + docs/SubAccountApi.md | 760 ++ docs/SubAccountBalance.md | 11 + docs/SubAccountCrossMarginBalance.md | 11 + docs/SubAccountFuturesBalance.md | 11 + docs/SubAccountKey.md | 19 + docs/SubAccountKeyPerms.md | 11 + docs/SubAccountMarginBalance.md | 11 + docs/SubAccountToSubAccount.md | 16 + docs/SubAccountTransfer.md | 18 + docs/SubCrossMarginAccount.md | 25 + docs/SubUserMode.md | 12 + docs/SystemTime.md | 10 + docs/Ticker.md | 26 + docs/TotalBalance.md | 12 + docs/Trade.md | 25 + docs/TradeFee.md | 22 + docs/TransactionID.md | 10 + docs/Transfer.md | 16 + docs/TransferOrderStatus.md | 11 + docs/TransferablesResult.md | 12 + docs/TriggerOrderResponse.md | 10 + docs/TriggerTime.md | 10 + docs/UidPushOrder.md | 18 + docs/UidPushWithdrawal.md | 12 + docs/UidPushWithdrawalResp.md | 10 + docs/UniCurrency.md | 15 + docs/UniCurrencyInterest.md | 11 + docs/UniCurrencyPair.md | 14 + docs/UniInterestMode.md | 12 + docs/UniInterestRecord.md | 16 + docs/UniLend.md | 20 + docs/UniLendInterest.md | 11 + docs/UniLendRecord.md | 17 + docs/UniLoan.md | 16 + docs/UniLoanInterestRecord.md | 17 + docs/UniLoanRecord.md | 15 + docs/UnifiedAccount.md | 28 + docs/UnifiedApi.md | 1428 ++++ docs/UnifiedBalance.md | 28 + docs/UnifiedBorrowable.md | 11 + docs/UnifiedBorrowable1.md | 12 + docs/UnifiedCurrency.md | 15 + docs/UnifiedDiscount.md | 12 + docs/UnifiedDiscountTiers.md | 14 + docs/UnifiedHistoryLoanRate.md | 13 + docs/UnifiedHistoryLoanRateRates.md | 11 + docs/UnifiedLeverageConfig.md | 16 + docs/UnifiedLeverageSetting.md | 12 + docs/UnifiedLoan.md | 15 + docs/UnifiedLoanRecord.md | 18 + docs/UnifiedLoanResult.md | 11 + docs/UnifiedMarginTiers.md | 12 + docs/UnifiedModeSet.md | 11 + docs/UnifiedPortfolioInput.md | 17 + docs/UnifiedPortfolioOutput.md | 14 + docs/UnifiedRiskUnits.md | 12 + docs/UnifiedSettings.md | 13 + docs/UnifiedTransferable.md | 11 + docs/UserLtvInfo.md | 17 + docs/UserSub.md | 13 + docs/UserSubRelation.md | 10 + docs/UserTotalAmount.md | 12 + docs/WalletApi.md | 1494 ++++ docs/WithdrawStatus.md | 21 + docs/WithdrawalApi.md | 216 + docs/WithdrawalRecord.md | 22 + gate_api/__init__.py | 297 + gate_api/api/__init__.py | 22 + gate_api/api/account_api.py | 1054 +++ gate_api/api/collateral_loan_api.py | 1241 ++++ gate_api/api/delivery_api.py | 3765 ++++++++++ gate_api/api/earn_api.py | 977 +++ gate_api/api/earn_uni_api.py | 1345 ++++ gate_api/api/flash_swap_api.py | 648 ++ gate_api/api/futures_api.py | 6385 +++++++++++++++++ gate_api/api/margin_api.py | 2739 +++++++ gate_api/api/margin_uni_api.py | 1008 +++ gate_api/api/multi_collateral_loan_api.py | 1461 ++++ gate_api/api/options_api.py | 3441 +++++++++ gate_api/api/rebate_api.py | 1216 ++++ gate_api/api/spot_api.py | 4023 +++++++++++ gate_api/api/sub_account_api.py | 1299 ++++ gate_api/api/unified_api.py | 2466 +++++++ gate_api/api/wallet_api.py | 2526 +++++++ gate_api/api/withdrawal_api.py | 385 + gate_api/api_client.py | 707 ++ gate_api/configuration.py | 369 + gate_api/exceptions.py | 137 + gate_api/models/__init__.py | 266 + gate_api/models/account_balance.py | 213 + gate_api/models/account_detail.py | 261 + gate_api/models/account_detail_key.py | 123 + gate_api/models/account_rate_limit.py | 207 + gate_api/models/agency_commission.py | 263 + gate_api/models/agency_commission_history.py | 179 + gate_api/models/agency_transaction.py | 347 + gate_api/models/agency_transaction_history.py | 179 + gate_api/models/auto_repay_setting.py | 129 + gate_api/models/batch_amend_item.py | 296 + gate_api/models/batch_amend_order_req.py | 235 + gate_api/models/batch_futures_order.py | 909 +++ gate_api/models/batch_order.py | 1173 +++ gate_api/models/borrow_currency_info.py | 235 + gate_api/models/broker_commission.py | 151 + gate_api/models/broker_commission1.py | 347 + gate_api/models/broker_transaction.py | 151 + gate_api/models/broker_transaction1.py | 319 + gate_api/models/cancel_batch_order.py | 209 + gate_api/models/cancel_order_result.py | 291 + gate_api/models/collateral_adjust.py | 181 + gate_api/models/collateral_adjust_res.py | 151 + gate_api/models/collateral_align.py | 211 + gate_api/models/collateral_currency.py | 151 + gate_api/models/collateral_currency_info.py | 207 + gate_api/models/collateral_currency_res.py | 235 + gate_api/models/collateral_current_rate.py | 151 + gate_api/models/collateral_fix_rate.py | 207 + gate_api/models/collateral_loan_currency.py | 151 + gate_api/models/collateral_ltv.py | 179 + gate_api/models/collateral_order.py | 543 ++ gate_api/models/collateral_record.py | 375 + gate_api/models/contract.py | 1115 +++ gate_api/models/contract_stat.py | 459 ++ gate_api/models/convert_small_balance.py | 151 + .../countdown_cancel_all_futures_task.py | 152 + .../countdown_cancel_all_options_task.py | 180 + .../models/countdown_cancel_all_spot_task.py | 152 + gate_api/models/create_collateral_order.py | 211 + .../models/create_multi_collateral_order.py | 349 + gate_api/models/create_uni_lend.py | 216 + gate_api/models/create_uni_loan.py | 245 + gate_api/models/cross_margin_account.py | 569 ++ gate_api/models/cross_margin_account_book.py | 263 + gate_api/models/cross_margin_balance.py | 347 + gate_api/models/cross_margin_balance1.py | 207 + gate_api/models/cross_margin_currency.py | 375 + gate_api/models/cross_margin_loan.py | 383 + gate_api/models/cross_margin_repay_request.py | 153 + gate_api/models/cross_margin_repayment.py | 291 + gate_api/models/cross_margin_transferable.py | 151 + gate_api/models/currency.py | 375 + gate_api/models/currency_chain.py | 319 + gate_api/models/currency_pair.py | 549 ++ gate_api/models/currency_quota.py | 235 + gate_api/models/debit_fee.py | 124 + gate_api/models/delivery_candlestick.py | 263 + gate_api/models/delivery_contract.py | 1177 +++ gate_api/models/delivery_settlement.py | 347 + gate_api/models/deposit_address.py | 179 + gate_api/models/deposit_record.py | 378 + gate_api/models/dual_get_orders.py | 571 ++ gate_api/models/dual_get_plans.py | 459 ++ gate_api/models/eth2_rate_list.py | 179 + gate_api/models/eth2_swap.py | 153 + gate_api/models/flash_swap_currency_pair.py | 291 + gate_api/models/flash_swap_order.py | 347 + gate_api/models/flash_swap_order_preview.py | 263 + gate_api/models/flash_swap_order_request.py | 240 + gate_api/models/flash_swap_preview_request.py | 209 + gate_api/models/funding_account.py | 235 + gate_api/models/funding_rate_record.py | 151 + gate_api/models/future_cancel_order_result.py | 207 + gate_api/models/futures_account.py | 793 ++ gate_api/models/futures_account_book.py | 325 + gate_api/models/futures_account_history.py | 375 + gate_api/models/futures_auto_deleverage.py | 375 + .../futures_batch_amend_order_request.py | 235 + gate_api/models/futures_candlestick.py | 291 + gate_api/models/futures_fee.py | 151 + gate_api/models/futures_index_constituents.py | 151 + gate_api/models/futures_initial_order.py | 383 + gate_api/models/futures_limit_risk_tiers.py | 263 + gate_api/models/futures_liq_order.py | 291 + gate_api/models/futures_liquidate.py | 431 ++ gate_api/models/futures_order.py | 883 +++ gate_api/models/futures_order_amendment.py | 235 + gate_api/models/futures_order_book.py | 237 + gate_api/models/futures_order_book_item.py | 151 + gate_api/models/futures_premium_index.py | 235 + gate_api/models/futures_price_trigger.py | 253 + .../models/futures_price_triggered_order.py | 441 ++ gate_api/models/futures_ticker.py | 739 ++ gate_api/models/futures_trade.py | 291 + gate_api/models/index_constituent.py | 151 + gate_api/models/inline_object.py | 153 + gate_api/models/inline_response200.py | 147 + gate_api/models/insurance_record.py | 151 + gate_api/models/ledger_record.py | 434 ++ gate_api/models/liquidate_order.py | 238 + gate_api/models/margin_account.py | 315 + gate_api/models/margin_account_book.py | 319 + gate_api/models/margin_account_currency.py | 235 + gate_api/models/margin_leverage_tier.py | 179 + gate_api/models/margin_market_leverage.py | 152 + gate_api/models/margin_tiers.py | 235 + gate_api/models/margin_transferable.py | 179 + gate_api/models/max_uni_borrowable.py | 181 + gate_api/models/mock_futures_order.py | 182 + gate_api/models/mock_futures_position.py | 153 + gate_api/models/mock_margin_result.py | 291 + gate_api/models/mock_options_order.py | 182 + gate_api/models/mock_options_position.py | 153 + gate_api/models/mock_risk_unit.py | 347 + gate_api/models/mock_spot_balance.py | 153 + gate_api/models/mock_spot_order.py | 239 + gate_api/models/multi_chain_address_item.py | 235 + gate_api/models/multi_collateral_currency.py | 151 + gate_api/models/multi_collateral_item.py | 179 + gate_api/models/multi_collateral_order.py | 487 ++ gate_api/models/multi_collateral_record.py | 291 + .../multi_collateral_record_currency.py | 263 + gate_api/models/multi_loan_item.py | 151 + gate_api/models/multi_loan_repay_item.py | 179 + gate_api/models/multi_repay_record.py | 431 ++ gate_api/models/multi_repay_resp.py | 151 + gate_api/models/my_futures_trade.py | 409 ++ .../models/my_futures_trade_time_range.py | 409 ++ gate_api/models/open_orders.py | 177 + gate_api/models/options_account.py | 633 ++ gate_api/models/options_account_book.py | 235 + gate_api/models/options_candlestick.py | 263 + gate_api/models/options_contract.py | 795 ++ gate_api/models/options_mmp.py | 296 + gate_api/models/options_mmp_reset.py | 292 + gate_api/models/options_my_settlements.py | 347 + gate_api/models/options_my_trade.py | 325 + gate_api/models/options_order.py | 815 +++ gate_api/models/options_position.py | 540 ++ gate_api/models/options_position_close.py | 269 + .../models/options_position_close_order.py | 179 + gate_api/models/options_settlement.py | 263 + gate_api/models/options_ticker.py | 599 ++ gate_api/models/options_underlying.py | 151 + gate_api/models/options_underlying_ticker.py | 179 + gate_api/models/order.py | 1142 +++ gate_api/models/order_book.py | 237 + gate_api/models/order_cancel.py | 1226 ++++ gate_api/models/order_patch.py | 266 + gate_api/models/order_resp.py | 123 + gate_api/models/partner_commission_history.py | 151 + gate_api/models/partner_sub.py | 179 + gate_api/models/partner_sub_list.py | 151 + .../models/partner_transaction_history.py | 151 + gate_api/models/patch_uni_lend.py | 151 + .../models/place_dual_investment_order.py | 237 + gate_api/models/position.py | 966 +++ gate_api/models/position_close.py | 465 ++ gate_api/models/position_close_order.py | 179 + gate_api/models/profit_loss_range.py | 179 + gate_api/models/rebate_user_info.py | 123 + gate_api/models/repay_currency_res.py | 263 + gate_api/models/repay_loan.py | 182 + gate_api/models/repay_multi_loan.py | 153 + gate_api/models/repay_record.py | 459 ++ gate_api/models/repay_record_currency.py | 263 + gate_api/models/repay_record_left_interest.py | 263 + .../models/repay_record_repaid_currency.py | 263 + .../models/repay_record_total_interest.py | 207 + gate_api/models/repay_resp.py | 151 + gate_api/models/risk_units.py | 319 + gate_api/models/saved_address.py | 263 + gate_api/models/small_balance.py | 207 + gate_api/models/small_balance_history.py | 235 + gate_api/models/spot_account.py | 235 + gate_api/models/spot_account_book.py | 319 + gate_api/models/spot_currency_chain.py | 235 + gate_api/models/spot_fee.py | 375 + gate_api/models/spot_insurance_history.py | 179 + gate_api/models/spot_price_put_order.py | 375 + gate_api/models/spot_price_trigger.py | 188 + gate_api/models/spot_price_triggered_order.py | 374 + gate_api/models/stp_group.py | 208 + gate_api/models/stp_group_user.py | 179 + gate_api/models/structured_buy.py | 151 + .../models/structured_get_project_list.py | 431 ++ gate_api/models/structured_order_list.py | 291 + gate_api/models/sub_account.py | 320 + gate_api/models/sub_account_balance.py | 151 + .../sub_account_cross_margin_balance.py | 151 + .../models/sub_account_futures_balance.py | 151 + gate_api/models/sub_account_key.py | 373 + gate_api/models/sub_account_key_perms.py | 151 + gate_api/models/sub_account_margin_balance.py | 151 + gate_api/models/sub_account_to_sub_account.py | 297 + gate_api/models/sub_account_transfer.py | 351 + gate_api/models/sub_cross_margin_account.py | 541 ++ gate_api/models/sub_user_mode.py | 179 + gate_api/models/system_time.py | 123 + gate_api/models/ticker.py | 568 ++ gate_api/models/total_balance.py | 149 + gate_api/models/trade.py | 555 ++ gate_api/models/trade_fee.py | 459 ++ gate_api/models/transaction_id.py | 123 + gate_api/models/transfer.py | 279 + gate_api/models/transfer_order_status.py | 151 + gate_api/models/transferables_result.py | 151 + gate_api/models/trigger_order_response.py | 123 + gate_api/models/trigger_time.py | 123 + gate_api/models/uid_push_order.py | 347 + gate_api/models/uid_push_withdrawal.py | 182 + gate_api/models/uid_push_withdrawal_resp.py | 123 + gate_api/models/uni_currency.py | 235 + gate_api/models/uni_currency_interest.py | 151 + gate_api/models/uni_currency_pair.py | 207 + gate_api/models/uni_interest_mode.py | 153 + gate_api/models/uni_interest_record.py | 263 + gate_api/models/uni_lend.py | 375 + gate_api/models/uni_lend_interest.py | 151 + gate_api/models/uni_lend_record.py | 291 + gate_api/models/uni_loan.py | 263 + gate_api/models/uni_loan_interest_record.py | 291 + gate_api/models/uni_loan_record.py | 235 + gate_api/models/unified_account.py | 625 ++ gate_api/models/unified_balance.py | 627 ++ gate_api/models/unified_borrowable.py | 151 + gate_api/models/unified_borrowable1.py | 151 + gate_api/models/unified_currency.py | 263 + gate_api/models/unified_discount.py | 151 + gate_api/models/unified_discount_tiers.py | 235 + gate_api/models/unified_history_loan_rate.py | 207 + .../models/unified_history_loan_rate_rates.py | 151 + gate_api/models/unified_leverage_config.py | 291 + gate_api/models/unified_leverage_setting.py | 153 + gate_api/models/unified_loan.py | 244 + gate_api/models/unified_loan_record.py | 319 + gate_api/models/unified_loan_result.py | 123 + gate_api/models/unified_margin_tiers.py | 151 + gate_api/models/unified_mode_set.py | 150 + gate_api/models/unified_portfolio_input.py | 291 + gate_api/models/unified_portfolio_output.py | 207 + gate_api/models/unified_risk_units.py | 179 + gate_api/models/unified_settings.py | 207 + gate_api/models/unified_transferable.py | 151 + gate_api/models/user_ltv_info.py | 291 + gate_api/models/user_sub.py | 207 + gate_api/models/user_sub_relation.py | 123 + gate_api/models/user_total_amount.py | 151 + gate_api/models/withdraw_status.py | 431 ++ gate_api/models/withdrawal_record.py | 462 ++ gate_api/rest.py | 291 + git_push.sh | 58 + requirements.txt | 6 + setup.cfg | 13 + setup.py | 38 + test-requirements.txt | 3 + tox.ini | 9 + 551 files changed, 135688 insertions(+) create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml create mode 100644 .travis.yml create mode 100644 README.md create mode 100644 docs/AccountApi.md create mode 100644 docs/AccountBalance.md create mode 100644 docs/AccountDetail.md create mode 100644 docs/AccountDetailKey.md create mode 100644 docs/AccountRateLimit.md create mode 100644 docs/AgencyCommission.md create mode 100644 docs/AgencyCommissionHistory.md create mode 100644 docs/AgencyTransaction.md create mode 100644 docs/AgencyTransactionHistory.md create mode 100644 docs/AutoRepaySetting.md create mode 100644 docs/BatchAmendItem.md create mode 100644 docs/BatchAmendOrderReq.md create mode 100644 docs/BatchFuturesOrder.md create mode 100644 docs/BatchOrder.md create mode 100644 docs/BorrowCurrencyInfo.md create mode 100644 docs/BrokerCommission.md create mode 100644 docs/BrokerCommission1.md create mode 100644 docs/BrokerTransaction.md create mode 100644 docs/BrokerTransaction1.md create mode 100644 docs/CancelBatchOrder.md create mode 100644 docs/CancelOrderResult.md create mode 100644 docs/CollateralAdjust.md create mode 100644 docs/CollateralAdjustRes.md create mode 100644 docs/CollateralAlign.md create mode 100644 docs/CollateralCurrency.md create mode 100644 docs/CollateralCurrencyInfo.md create mode 100644 docs/CollateralCurrencyRes.md create mode 100644 docs/CollateralCurrentRate.md create mode 100644 docs/CollateralFixRate.md create mode 100644 docs/CollateralLoanApi.md create mode 100644 docs/CollateralLoanCurrency.md create mode 100644 docs/CollateralLtv.md create mode 100644 docs/CollateralOrder.md create mode 100644 docs/CollateralRecord.md create mode 100644 docs/Contract.md create mode 100644 docs/ContractStat.md create mode 100644 docs/ConvertSmallBalance.md create mode 100644 docs/CountdownCancelAllFuturesTask.md create mode 100644 docs/CountdownCancelAllOptionsTask.md create mode 100644 docs/CountdownCancelAllSpotTask.md create mode 100644 docs/CreateCollateralOrder.md create mode 100644 docs/CreateMultiCollateralOrder.md create mode 100644 docs/CreateUniLend.md create mode 100644 docs/CreateUniLoan.md create mode 100644 docs/CrossMarginAccount.md create mode 100644 docs/CrossMarginAccountBook.md create mode 100644 docs/CrossMarginBalance.md create mode 100644 docs/CrossMarginBalance1.md create mode 100644 docs/CrossMarginCurrency.md create mode 100644 docs/CrossMarginLoan.md create mode 100644 docs/CrossMarginRepayRequest.md create mode 100644 docs/CrossMarginRepayment.md create mode 100644 docs/CrossMarginTransferable.md create mode 100644 docs/Currency.md create mode 100644 docs/CurrencyChain.md create mode 100644 docs/CurrencyPair.md create mode 100644 docs/CurrencyQuota.md create mode 100644 docs/DebitFee.md create mode 100644 docs/DeliveryApi.md create mode 100644 docs/DeliveryCandlestick.md create mode 100644 docs/DeliveryContract.md create mode 100644 docs/DeliverySettlement.md create mode 100644 docs/DepositAddress.md create mode 100644 docs/DepositRecord.md create mode 100644 docs/DualGetOrders.md create mode 100644 docs/DualGetPlans.md create mode 100644 docs/EarnApi.md create mode 100644 docs/EarnUniApi.md create mode 100644 docs/Eth2RateList.md create mode 100644 docs/Eth2Swap.md create mode 100644 docs/FlashSwapApi.md create mode 100644 docs/FlashSwapCurrencyPair.md create mode 100644 docs/FlashSwapOrder.md create mode 100644 docs/FlashSwapOrderPreview.md create mode 100644 docs/FlashSwapOrderRequest.md create mode 100644 docs/FlashSwapPreviewRequest.md create mode 100644 docs/FundingAccount.md create mode 100644 docs/FundingRateRecord.md create mode 100644 docs/FutureCancelOrderResult.md create mode 100644 docs/FuturesAccount.md create mode 100644 docs/FuturesAccountBook.md create mode 100644 docs/FuturesAccountHistory.md create mode 100644 docs/FuturesApi.md create mode 100644 docs/FuturesAutoDeleverage.md create mode 100644 docs/FuturesBatchAmendOrderRequest.md create mode 100644 docs/FuturesCandlestick.md create mode 100644 docs/FuturesFee.md create mode 100644 docs/FuturesIndexConstituents.md create mode 100644 docs/FuturesInitialOrder.md create mode 100644 docs/FuturesLimitRiskTiers.md create mode 100644 docs/FuturesLiqOrder.md create mode 100644 docs/FuturesLiquidate.md create mode 100644 docs/FuturesOrder.md create mode 100644 docs/FuturesOrderAmendment.md create mode 100644 docs/FuturesOrderBook.md create mode 100644 docs/FuturesOrderBookItem.md create mode 100644 docs/FuturesPremiumIndex.md create mode 100644 docs/FuturesPriceTrigger.md create mode 100644 docs/FuturesPriceTriggeredOrder.md create mode 100644 docs/FuturesTicker.md create mode 100644 docs/FuturesTrade.md create mode 100644 docs/IndexConstituent.md create mode 100644 docs/InlineObject.md create mode 100644 docs/InlineResponse200.md create mode 100644 docs/InsuranceRecord.md create mode 100644 docs/LedgerRecord.md create mode 100644 docs/LiquidateOrder.md create mode 100644 docs/MarginAccount.md create mode 100644 docs/MarginAccountBook.md create mode 100644 docs/MarginAccountCurrency.md create mode 100644 docs/MarginApi.md create mode 100644 docs/MarginLeverageTier.md create mode 100644 docs/MarginMarketLeverage.md create mode 100644 docs/MarginTiers.md create mode 100644 docs/MarginTransferable.md create mode 100644 docs/MarginUniApi.md create mode 100644 docs/MaxUniBorrowable.md create mode 100644 docs/MockFuturesOrder.md create mode 100644 docs/MockFuturesPosition.md create mode 100644 docs/MockMarginResult.md create mode 100644 docs/MockOptionsOrder.md create mode 100644 docs/MockOptionsPosition.md create mode 100644 docs/MockRiskUnit.md create mode 100644 docs/MockSpotBalance.md create mode 100644 docs/MockSpotOrder.md create mode 100644 docs/MultiChainAddressItem.md create mode 100644 docs/MultiCollateralCurrency.md create mode 100644 docs/MultiCollateralItem.md create mode 100644 docs/MultiCollateralLoanApi.md create mode 100644 docs/MultiCollateralOrder.md create mode 100644 docs/MultiCollateralRecord.md create mode 100644 docs/MultiCollateralRecordCurrency.md create mode 100644 docs/MultiLoanItem.md create mode 100644 docs/MultiLoanRepayItem.md create mode 100644 docs/MultiRepayRecord.md create mode 100644 docs/MultiRepayResp.md create mode 100644 docs/MyFuturesTrade.md create mode 100644 docs/MyFuturesTradeTimeRange.md create mode 100644 docs/OpenOrders.md create mode 100644 docs/OptionsAccount.md create mode 100644 docs/OptionsAccountBook.md create mode 100644 docs/OptionsApi.md create mode 100644 docs/OptionsCandlestick.md create mode 100644 docs/OptionsContract.md create mode 100644 docs/OptionsMMP.md create mode 100644 docs/OptionsMMPReset.md create mode 100644 docs/OptionsMySettlements.md create mode 100644 docs/OptionsMyTrade.md create mode 100644 docs/OptionsOrder.md create mode 100644 docs/OptionsPosition.md create mode 100644 docs/OptionsPositionClose.md create mode 100644 docs/OptionsPositionCloseOrder.md create mode 100644 docs/OptionsSettlement.md create mode 100644 docs/OptionsTicker.md create mode 100644 docs/OptionsUnderlying.md create mode 100644 docs/OptionsUnderlyingTicker.md create mode 100644 docs/Order.md create mode 100644 docs/OrderBook.md create mode 100644 docs/OrderCancel.md create mode 100644 docs/OrderPatch.md create mode 100644 docs/OrderResp.md create mode 100644 docs/PartnerCommissionHistory.md create mode 100644 docs/PartnerSub.md create mode 100644 docs/PartnerSubList.md create mode 100644 docs/PartnerTransactionHistory.md create mode 100644 docs/PatchUniLend.md create mode 100644 docs/PlaceDualInvestmentOrder.md create mode 100644 docs/Position.md create mode 100644 docs/PositionClose.md create mode 100644 docs/PositionCloseOrder.md create mode 100644 docs/ProfitLossRange.md create mode 100644 docs/RebateApi.md create mode 100644 docs/RebateUserInfo.md create mode 100644 docs/RepayCurrencyRes.md create mode 100644 docs/RepayLoan.md create mode 100644 docs/RepayMultiLoan.md create mode 100644 docs/RepayRecord.md create mode 100644 docs/RepayRecordCurrency.md create mode 100644 docs/RepayRecordLeftInterest.md create mode 100644 docs/RepayRecordRepaidCurrency.md create mode 100644 docs/RepayRecordTotalInterest.md create mode 100644 docs/RepayResp.md create mode 100644 docs/RiskUnits.md create mode 100644 docs/SavedAddress.md create mode 100644 docs/SmallBalance.md create mode 100644 docs/SmallBalanceHistory.md create mode 100644 docs/SpotAccount.md create mode 100644 docs/SpotAccountBook.md create mode 100644 docs/SpotApi.md create mode 100644 docs/SpotCurrencyChain.md create mode 100644 docs/SpotFee.md create mode 100644 docs/SpotInsuranceHistory.md create mode 100644 docs/SpotPricePutOrder.md create mode 100644 docs/SpotPriceTrigger.md create mode 100644 docs/SpotPriceTriggeredOrder.md create mode 100644 docs/StpGroup.md create mode 100644 docs/StpGroupUser.md create mode 100644 docs/StructuredBuy.md create mode 100644 docs/StructuredGetProjectList.md create mode 100644 docs/StructuredOrderList.md create mode 100644 docs/SubAccount.md create mode 100644 docs/SubAccountApi.md create mode 100644 docs/SubAccountBalance.md create mode 100644 docs/SubAccountCrossMarginBalance.md create mode 100644 docs/SubAccountFuturesBalance.md create mode 100644 docs/SubAccountKey.md create mode 100644 docs/SubAccountKeyPerms.md create mode 100644 docs/SubAccountMarginBalance.md create mode 100644 docs/SubAccountToSubAccount.md create mode 100644 docs/SubAccountTransfer.md create mode 100644 docs/SubCrossMarginAccount.md create mode 100644 docs/SubUserMode.md create mode 100644 docs/SystemTime.md create mode 100644 docs/Ticker.md create mode 100644 docs/TotalBalance.md create mode 100644 docs/Trade.md create mode 100644 docs/TradeFee.md create mode 100644 docs/TransactionID.md create mode 100644 docs/Transfer.md create mode 100644 docs/TransferOrderStatus.md create mode 100644 docs/TransferablesResult.md create mode 100644 docs/TriggerOrderResponse.md create mode 100644 docs/TriggerTime.md create mode 100644 docs/UidPushOrder.md create mode 100644 docs/UidPushWithdrawal.md create mode 100644 docs/UidPushWithdrawalResp.md create mode 100644 docs/UniCurrency.md create mode 100644 docs/UniCurrencyInterest.md create mode 100644 docs/UniCurrencyPair.md create mode 100644 docs/UniInterestMode.md create mode 100644 docs/UniInterestRecord.md create mode 100644 docs/UniLend.md create mode 100644 docs/UniLendInterest.md create mode 100644 docs/UniLendRecord.md create mode 100644 docs/UniLoan.md create mode 100644 docs/UniLoanInterestRecord.md create mode 100644 docs/UniLoanRecord.md create mode 100644 docs/UnifiedAccount.md create mode 100644 docs/UnifiedApi.md create mode 100644 docs/UnifiedBalance.md create mode 100644 docs/UnifiedBorrowable.md create mode 100644 docs/UnifiedBorrowable1.md create mode 100644 docs/UnifiedCurrency.md create mode 100644 docs/UnifiedDiscount.md create mode 100644 docs/UnifiedDiscountTiers.md create mode 100644 docs/UnifiedHistoryLoanRate.md create mode 100644 docs/UnifiedHistoryLoanRateRates.md create mode 100644 docs/UnifiedLeverageConfig.md create mode 100644 docs/UnifiedLeverageSetting.md create mode 100644 docs/UnifiedLoan.md create mode 100644 docs/UnifiedLoanRecord.md create mode 100644 docs/UnifiedLoanResult.md create mode 100644 docs/UnifiedMarginTiers.md create mode 100644 docs/UnifiedModeSet.md create mode 100644 docs/UnifiedPortfolioInput.md create mode 100644 docs/UnifiedPortfolioOutput.md create mode 100644 docs/UnifiedRiskUnits.md create mode 100644 docs/UnifiedSettings.md create mode 100644 docs/UnifiedTransferable.md create mode 100644 docs/UserLtvInfo.md create mode 100644 docs/UserSub.md create mode 100644 docs/UserSubRelation.md create mode 100644 docs/UserTotalAmount.md create mode 100644 docs/WalletApi.md create mode 100644 docs/WithdrawStatus.md create mode 100644 docs/WithdrawalApi.md create mode 100644 docs/WithdrawalRecord.md create mode 100644 gate_api/__init__.py create mode 100644 gate_api/api/__init__.py create mode 100644 gate_api/api/account_api.py create mode 100644 gate_api/api/collateral_loan_api.py create mode 100644 gate_api/api/delivery_api.py create mode 100644 gate_api/api/earn_api.py create mode 100644 gate_api/api/earn_uni_api.py create mode 100644 gate_api/api/flash_swap_api.py create mode 100644 gate_api/api/futures_api.py create mode 100644 gate_api/api/margin_api.py create mode 100644 gate_api/api/margin_uni_api.py create mode 100644 gate_api/api/multi_collateral_loan_api.py create mode 100644 gate_api/api/options_api.py create mode 100644 gate_api/api/rebate_api.py create mode 100644 gate_api/api/spot_api.py create mode 100644 gate_api/api/sub_account_api.py create mode 100644 gate_api/api/unified_api.py create mode 100644 gate_api/api/wallet_api.py create mode 100644 gate_api/api/withdrawal_api.py create mode 100644 gate_api/api_client.py create mode 100644 gate_api/configuration.py create mode 100644 gate_api/exceptions.py create mode 100644 gate_api/models/__init__.py create mode 100644 gate_api/models/account_balance.py create mode 100644 gate_api/models/account_detail.py create mode 100644 gate_api/models/account_detail_key.py create mode 100644 gate_api/models/account_rate_limit.py create mode 100644 gate_api/models/agency_commission.py create mode 100644 gate_api/models/agency_commission_history.py create mode 100644 gate_api/models/agency_transaction.py create mode 100644 gate_api/models/agency_transaction_history.py create mode 100644 gate_api/models/auto_repay_setting.py create mode 100644 gate_api/models/batch_amend_item.py create mode 100644 gate_api/models/batch_amend_order_req.py create mode 100644 gate_api/models/batch_futures_order.py create mode 100644 gate_api/models/batch_order.py create mode 100644 gate_api/models/borrow_currency_info.py create mode 100644 gate_api/models/broker_commission.py create mode 100644 gate_api/models/broker_commission1.py create mode 100644 gate_api/models/broker_transaction.py create mode 100644 gate_api/models/broker_transaction1.py create mode 100644 gate_api/models/cancel_batch_order.py create mode 100644 gate_api/models/cancel_order_result.py create mode 100644 gate_api/models/collateral_adjust.py create mode 100644 gate_api/models/collateral_adjust_res.py create mode 100644 gate_api/models/collateral_align.py create mode 100644 gate_api/models/collateral_currency.py create mode 100644 gate_api/models/collateral_currency_info.py create mode 100644 gate_api/models/collateral_currency_res.py create mode 100644 gate_api/models/collateral_current_rate.py create mode 100644 gate_api/models/collateral_fix_rate.py create mode 100644 gate_api/models/collateral_loan_currency.py create mode 100644 gate_api/models/collateral_ltv.py create mode 100644 gate_api/models/collateral_order.py create mode 100644 gate_api/models/collateral_record.py create mode 100644 gate_api/models/contract.py create mode 100644 gate_api/models/contract_stat.py create mode 100644 gate_api/models/convert_small_balance.py create mode 100644 gate_api/models/countdown_cancel_all_futures_task.py create mode 100644 gate_api/models/countdown_cancel_all_options_task.py create mode 100644 gate_api/models/countdown_cancel_all_spot_task.py create mode 100644 gate_api/models/create_collateral_order.py create mode 100644 gate_api/models/create_multi_collateral_order.py create mode 100644 gate_api/models/create_uni_lend.py create mode 100644 gate_api/models/create_uni_loan.py create mode 100644 gate_api/models/cross_margin_account.py create mode 100644 gate_api/models/cross_margin_account_book.py create mode 100644 gate_api/models/cross_margin_balance.py create mode 100644 gate_api/models/cross_margin_balance1.py create mode 100644 gate_api/models/cross_margin_currency.py create mode 100644 gate_api/models/cross_margin_loan.py create mode 100644 gate_api/models/cross_margin_repay_request.py create mode 100644 gate_api/models/cross_margin_repayment.py create mode 100644 gate_api/models/cross_margin_transferable.py create mode 100644 gate_api/models/currency.py create mode 100644 gate_api/models/currency_chain.py create mode 100644 gate_api/models/currency_pair.py create mode 100644 gate_api/models/currency_quota.py create mode 100644 gate_api/models/debit_fee.py create mode 100644 gate_api/models/delivery_candlestick.py create mode 100644 gate_api/models/delivery_contract.py create mode 100644 gate_api/models/delivery_settlement.py create mode 100644 gate_api/models/deposit_address.py create mode 100644 gate_api/models/deposit_record.py create mode 100644 gate_api/models/dual_get_orders.py create mode 100644 gate_api/models/dual_get_plans.py create mode 100644 gate_api/models/eth2_rate_list.py create mode 100644 gate_api/models/eth2_swap.py create mode 100644 gate_api/models/flash_swap_currency_pair.py create mode 100644 gate_api/models/flash_swap_order.py create mode 100644 gate_api/models/flash_swap_order_preview.py create mode 100644 gate_api/models/flash_swap_order_request.py create mode 100644 gate_api/models/flash_swap_preview_request.py create mode 100644 gate_api/models/funding_account.py create mode 100644 gate_api/models/funding_rate_record.py create mode 100644 gate_api/models/future_cancel_order_result.py create mode 100644 gate_api/models/futures_account.py create mode 100644 gate_api/models/futures_account_book.py create mode 100644 gate_api/models/futures_account_history.py create mode 100644 gate_api/models/futures_auto_deleverage.py create mode 100644 gate_api/models/futures_batch_amend_order_request.py create mode 100644 gate_api/models/futures_candlestick.py create mode 100644 gate_api/models/futures_fee.py create mode 100644 gate_api/models/futures_index_constituents.py create mode 100644 gate_api/models/futures_initial_order.py create mode 100644 gate_api/models/futures_limit_risk_tiers.py create mode 100644 gate_api/models/futures_liq_order.py create mode 100644 gate_api/models/futures_liquidate.py create mode 100644 gate_api/models/futures_order.py create mode 100644 gate_api/models/futures_order_amendment.py create mode 100644 gate_api/models/futures_order_book.py create mode 100644 gate_api/models/futures_order_book_item.py create mode 100644 gate_api/models/futures_premium_index.py create mode 100644 gate_api/models/futures_price_trigger.py create mode 100644 gate_api/models/futures_price_triggered_order.py create mode 100644 gate_api/models/futures_ticker.py create mode 100644 gate_api/models/futures_trade.py create mode 100644 gate_api/models/index_constituent.py create mode 100644 gate_api/models/inline_object.py create mode 100644 gate_api/models/inline_response200.py create mode 100644 gate_api/models/insurance_record.py create mode 100644 gate_api/models/ledger_record.py create mode 100644 gate_api/models/liquidate_order.py create mode 100644 gate_api/models/margin_account.py create mode 100644 gate_api/models/margin_account_book.py create mode 100644 gate_api/models/margin_account_currency.py create mode 100644 gate_api/models/margin_leverage_tier.py create mode 100644 gate_api/models/margin_market_leverage.py create mode 100644 gate_api/models/margin_tiers.py create mode 100644 gate_api/models/margin_transferable.py create mode 100644 gate_api/models/max_uni_borrowable.py create mode 100644 gate_api/models/mock_futures_order.py create mode 100644 gate_api/models/mock_futures_position.py create mode 100644 gate_api/models/mock_margin_result.py create mode 100644 gate_api/models/mock_options_order.py create mode 100644 gate_api/models/mock_options_position.py create mode 100644 gate_api/models/mock_risk_unit.py create mode 100644 gate_api/models/mock_spot_balance.py create mode 100644 gate_api/models/mock_spot_order.py create mode 100644 gate_api/models/multi_chain_address_item.py create mode 100644 gate_api/models/multi_collateral_currency.py create mode 100644 gate_api/models/multi_collateral_item.py create mode 100644 gate_api/models/multi_collateral_order.py create mode 100644 gate_api/models/multi_collateral_record.py create mode 100644 gate_api/models/multi_collateral_record_currency.py create mode 100644 gate_api/models/multi_loan_item.py create mode 100644 gate_api/models/multi_loan_repay_item.py create mode 100644 gate_api/models/multi_repay_record.py create mode 100644 gate_api/models/multi_repay_resp.py create mode 100644 gate_api/models/my_futures_trade.py create mode 100644 gate_api/models/my_futures_trade_time_range.py create mode 100644 gate_api/models/open_orders.py create mode 100644 gate_api/models/options_account.py create mode 100644 gate_api/models/options_account_book.py create mode 100644 gate_api/models/options_candlestick.py create mode 100644 gate_api/models/options_contract.py create mode 100644 gate_api/models/options_mmp.py create mode 100644 gate_api/models/options_mmp_reset.py create mode 100644 gate_api/models/options_my_settlements.py create mode 100644 gate_api/models/options_my_trade.py create mode 100644 gate_api/models/options_order.py create mode 100644 gate_api/models/options_position.py create mode 100644 gate_api/models/options_position_close.py create mode 100644 gate_api/models/options_position_close_order.py create mode 100644 gate_api/models/options_settlement.py create mode 100644 gate_api/models/options_ticker.py create mode 100644 gate_api/models/options_underlying.py create mode 100644 gate_api/models/options_underlying_ticker.py create mode 100644 gate_api/models/order.py create mode 100644 gate_api/models/order_book.py create mode 100644 gate_api/models/order_cancel.py create mode 100644 gate_api/models/order_patch.py create mode 100644 gate_api/models/order_resp.py create mode 100644 gate_api/models/partner_commission_history.py create mode 100644 gate_api/models/partner_sub.py create mode 100644 gate_api/models/partner_sub_list.py create mode 100644 gate_api/models/partner_transaction_history.py create mode 100644 gate_api/models/patch_uni_lend.py create mode 100644 gate_api/models/place_dual_investment_order.py create mode 100644 gate_api/models/position.py create mode 100644 gate_api/models/position_close.py create mode 100644 gate_api/models/position_close_order.py create mode 100644 gate_api/models/profit_loss_range.py create mode 100644 gate_api/models/rebate_user_info.py create mode 100644 gate_api/models/repay_currency_res.py create mode 100644 gate_api/models/repay_loan.py create mode 100644 gate_api/models/repay_multi_loan.py create mode 100644 gate_api/models/repay_record.py create mode 100644 gate_api/models/repay_record_currency.py create mode 100644 gate_api/models/repay_record_left_interest.py create mode 100644 gate_api/models/repay_record_repaid_currency.py create mode 100644 gate_api/models/repay_record_total_interest.py create mode 100644 gate_api/models/repay_resp.py create mode 100644 gate_api/models/risk_units.py create mode 100644 gate_api/models/saved_address.py create mode 100644 gate_api/models/small_balance.py create mode 100644 gate_api/models/small_balance_history.py create mode 100644 gate_api/models/spot_account.py create mode 100644 gate_api/models/spot_account_book.py create mode 100644 gate_api/models/spot_currency_chain.py create mode 100644 gate_api/models/spot_fee.py create mode 100644 gate_api/models/spot_insurance_history.py create mode 100644 gate_api/models/spot_price_put_order.py create mode 100644 gate_api/models/spot_price_trigger.py create mode 100644 gate_api/models/spot_price_triggered_order.py create mode 100644 gate_api/models/stp_group.py create mode 100644 gate_api/models/stp_group_user.py create mode 100644 gate_api/models/structured_buy.py create mode 100644 gate_api/models/structured_get_project_list.py create mode 100644 gate_api/models/structured_order_list.py create mode 100644 gate_api/models/sub_account.py create mode 100644 gate_api/models/sub_account_balance.py create mode 100644 gate_api/models/sub_account_cross_margin_balance.py create mode 100644 gate_api/models/sub_account_futures_balance.py create mode 100644 gate_api/models/sub_account_key.py create mode 100644 gate_api/models/sub_account_key_perms.py create mode 100644 gate_api/models/sub_account_margin_balance.py create mode 100644 gate_api/models/sub_account_to_sub_account.py create mode 100644 gate_api/models/sub_account_transfer.py create mode 100644 gate_api/models/sub_cross_margin_account.py create mode 100644 gate_api/models/sub_user_mode.py create mode 100644 gate_api/models/system_time.py create mode 100644 gate_api/models/ticker.py create mode 100644 gate_api/models/total_balance.py create mode 100644 gate_api/models/trade.py create mode 100644 gate_api/models/trade_fee.py create mode 100644 gate_api/models/transaction_id.py create mode 100644 gate_api/models/transfer.py create mode 100644 gate_api/models/transfer_order_status.py create mode 100644 gate_api/models/transferables_result.py create mode 100644 gate_api/models/trigger_order_response.py create mode 100644 gate_api/models/trigger_time.py create mode 100644 gate_api/models/uid_push_order.py create mode 100644 gate_api/models/uid_push_withdrawal.py create mode 100644 gate_api/models/uid_push_withdrawal_resp.py create mode 100644 gate_api/models/uni_currency.py create mode 100644 gate_api/models/uni_currency_interest.py create mode 100644 gate_api/models/uni_currency_pair.py create mode 100644 gate_api/models/uni_interest_mode.py create mode 100644 gate_api/models/uni_interest_record.py create mode 100644 gate_api/models/uni_lend.py create mode 100644 gate_api/models/uni_lend_interest.py create mode 100644 gate_api/models/uni_lend_record.py create mode 100644 gate_api/models/uni_loan.py create mode 100644 gate_api/models/uni_loan_interest_record.py create mode 100644 gate_api/models/uni_loan_record.py create mode 100644 gate_api/models/unified_account.py create mode 100644 gate_api/models/unified_balance.py create mode 100644 gate_api/models/unified_borrowable.py create mode 100644 gate_api/models/unified_borrowable1.py create mode 100644 gate_api/models/unified_currency.py create mode 100644 gate_api/models/unified_discount.py create mode 100644 gate_api/models/unified_discount_tiers.py create mode 100644 gate_api/models/unified_history_loan_rate.py create mode 100644 gate_api/models/unified_history_loan_rate_rates.py create mode 100644 gate_api/models/unified_leverage_config.py create mode 100644 gate_api/models/unified_leverage_setting.py create mode 100644 gate_api/models/unified_loan.py create mode 100644 gate_api/models/unified_loan_record.py create mode 100644 gate_api/models/unified_loan_result.py create mode 100644 gate_api/models/unified_margin_tiers.py create mode 100644 gate_api/models/unified_mode_set.py create mode 100644 gate_api/models/unified_portfolio_input.py create mode 100644 gate_api/models/unified_portfolio_output.py create mode 100644 gate_api/models/unified_risk_units.py create mode 100644 gate_api/models/unified_settings.py create mode 100644 gate_api/models/unified_transferable.py create mode 100644 gate_api/models/user_ltv_info.py create mode 100644 gate_api/models/user_sub.py create mode 100644 gate_api/models/user_sub_relation.py create mode 100644 gate_api/models/user_total_amount.py create mode 100644 gate_api/models/withdraw_status.py create mode 100644 gate_api/models/withdrawal_record.py create mode 100644 gate_api/rest.py create mode 100644 git_push.sh create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 test-requirements.txt create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43995bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a086da0 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.nosetest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=gate_api + +nosetest-2.7: + extends: .nosetest + image: python:2.7-alpine +nosetest-3.3: + extends: .nosetest + image: python:3.3-alpine +nosetest-3.4: + extends: .nosetest + image: python:3.4-alpine +nosetest-3.5: + extends: .nosetest + image: python:3.5-alpine +nosetest-3.6: + extends: .nosetest + image: python:3.6-alpine +nosetest-3.7: + extends: .nosetest + image: python:3.7-alpine +nosetest-3.8: + extends: .nosetest + image: python:3.8-alpine diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4e32d1c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + - "3.6" + - "3.7" + - "3.8" +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +script: pytest --cov=gate_api diff --git a/README.md b/README.md new file mode 100644 index 0000000..56dc3b4 --- /dev/null +++ b/README.md @@ -0,0 +1,668 @@ +# gate-api +Welcome to Gate.io API + +APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 4.97.0 +- Package version: 6.97.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen +For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) + +## Versioning + +Trying our best to follow the [semantic versioning](https://semver.org/), while enjoying recent features +provided by programming language and libraries, from 4.15.2, one major versioning difference will be +introduced: + +If extra code rewrite is required when you upgrade the SDK, such as: + +- some outdated programming language version support is dropped +- API method signature has breaking changes. + +**the MAJOR version will be incremented, but the MINOR and PATCH version are still following REST API's +instead of resetting to 0**, so that you can recognize it has some breaking changes, but still getting +the idea of from which REST API version the change is introduced. + +For example, the previous REST API and SDK version are both 4.14.0. But if we decide to introduce +some breaking changes in SDK along with REST API 4.15.2 upgrade, then the version of next SDK release +will be 5.15.2(the MAJOR version is incremented to denote breaking changes, but the MINOR and PATCH +version are identical to REST API's instead of resetting them to 0) + +If MAJOR version is incremented, make sure you read the release note on +[Releases](https://github.com/gateio/gateapi-python/releases) +page + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +You can install directly using: + +```sh +pip install --user gate-api +``` + +Then import the package: +```python +import gate_api +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import gate_api +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```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.EarnUniApi(api_client) + +try: + # List currencies for lending + api_response = api_instance.list_uni_currencies() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->list_uni_currencies: %s\n" % e) + +``` + +For a more complete API usage example, refer to the demo application in [example](example) directory + +## Documentation for API Endpoints + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending +*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending +*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders +*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem +*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order +*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending +*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency +*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records +*EarnUniApi* | [**switch_interest_reinvest**](docs/EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle +*EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status +*EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart +*MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets +*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market +*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate +*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans +*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay +*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records +*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records +*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable +*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts +*SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account +*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account +*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account +*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account +*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account +*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account +*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account +*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account +*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account +*SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode +*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information +*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account +*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account +*UnifiedApi* | [**get_unified_transferables**](docs/UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. +*UnifiedApi* | [**get_unified_borrowable_list**](docs/UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum +*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans +*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay +*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records +*UnifiedApi* | [**list_unified_loan_interest_records**](docs/UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records +*UnifiedApi* | [**get_unified_risk_units**](docs/UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details +*UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account +*UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account +*UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate +*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers +*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers +*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency +*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage +*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account +*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates +*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail +*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information +*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups +*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group +*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group +*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group +*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group +*AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. +*AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. +*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders +*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order +*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order +*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment +*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history +*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records +*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral +*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user +*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio +*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies +*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts +*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract +*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book +*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history +*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks +*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers +*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history +*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account +*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book +*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user +*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position +*DeliveryApi* | [**update_delivery_position_margin**](docs/DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin +*DeliveryApi* | [**update_delivery_position_leverage**](docs/DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage +*DeliveryApi* | [**update_delivery_position_risk_limit**](docs/DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit +*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders +*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order +*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched +*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order +*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order +*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history +*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history +*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history +*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history +*DeliveryApi* | [**list_delivery_risk_limit_tiers**](docs/DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers +*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders +*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order +*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders +*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order +*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order +*EarnApi* | [**swap_eth2**](docs/EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap +*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query +*EarnApi* | [**list_dual_investment_plans**](docs/EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list +*EarnApi* | [**list_dual_orders**](docs/EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list +*EarnApi* | [**place_dual_order**](docs/EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order +*EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List +*EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List +*EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order +*FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap +*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders +*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order +*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail +*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview +*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts +*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract +*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book +*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history +*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks +*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line +*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers +*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history +*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history +*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats +*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents +*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history +*FuturesApi* | [**list_futures_risk_limit_tiers**](docs/FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers +*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account +*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book +*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user +*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position +*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin +*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage +*FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode +*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit +*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode +*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode +*FuturesApi* | [**update_dual_mode_position_margin**](docs/FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode +*FuturesApi* | [**update_dual_mode_position_leverage**](docs/FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode +*FuturesApi* | [**update_dual_mode_position_risk_limit**](docs/FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode +*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders +*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order +*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched +*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range +*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders +*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order +*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order +*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order +*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history +*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range +*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history +*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history +*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History +*FuturesApi* | [**countdown_cancel_all_futures**](docs/FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders +*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates +*FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list +*FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs +*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders +*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order +*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders +*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order +*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order +*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list +*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history +*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list +*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting +*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting +*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency +*MarginApi* | [**list_cross_margin_currencies**](docs/MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) +*MarginApi* | [**get_cross_margin_currency**](docs/MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) +*MarginApi* | [**get_cross_margin_account**](docs/MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) +*MarginApi* | [**list_cross_margin_account_book**](docs/MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) +*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) +*MarginApi* | [**create_cross_margin_loan**](docs/MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) +*MarginApi* | [**get_cross_margin_loan**](docs/MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) +*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) +*MarginApi* | [**repay_cross_margin_loan**](docs/MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) +*MarginApi* | [**get_cross_margin_interest_records**](docs/MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) +*MarginApi* | [**get_cross_margin_transferable**](docs/MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) +*MarginApi* | [**get_cross_margin_estimate_rate**](docs/MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) +*MarginApi* | [**get_cross_margin_borrowable**](docs/MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) +*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market +*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient +*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple +*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list +*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders +*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order +*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail +*MultiCollateralLoanApi* | [**list_multi_repay_records**](docs/MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records +*MultiCollateralLoanApi* | [**repay_multi_collateral_loan**](docs/MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan +*MultiCollateralLoanApi* | [**list_multi_collateral_records**](docs/MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records +*MultiCollateralLoanApi* | [**operate_multi_collateral**](docs/MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral +*MultiCollateralLoanApi* | [**list_user_currency_quota**](docs/MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota +*MultiCollateralLoanApi* | [**list_multi_collateral_currencies**](docs/MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral +*MultiCollateralLoanApi* | [**get_multi_collateral_ltv**](docs/MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio +*MultiCollateralLoanApi* | [**get_multi_collateral_fix_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days +*MultiCollateralLoanApi* | [**get_multi_collateral_current_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency +*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings +*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times +*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time +*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail +*OptionsApi* | [**list_options_settlements**](docs/OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history +*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement +*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements +*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book +*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts +*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker +*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks +*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying +*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history +*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account +*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history +*OptionsApi* | [**list_options_positions**](docs/OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying +*OptionsApi* | [**get_options_position**](docs/OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position +*OptionsApi* | [**list_options_position_close**](docs/OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying +*OptionsApi* | [**list_options_orders**](docs/OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders +*OptionsApi* | [**create_options_order**](docs/OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order +*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched +*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order +*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order +*OptionsApi* | [**countdown_cancel_all_options**](docs/OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders +*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history +*OptionsApi* | [**get_options_mmp**](docs/OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query +*OptionsApi* | [**set_options_mmp**](docs/OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings +*OptionsApi* | [**reset_options_mmp**](docs/OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset +*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user +*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user +*RebateApi* | [**partner_transaction_history**](docs/RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users +*RebateApi* | [**partner_commissions_history**](docs/RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users +*RebateApi* | [**partner_sub_list**](docs/RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list +*RebateApi* | [**rebate_broker_commission_history**](docs/RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records +*RebateApi* | [**rebate_broker_transaction_history**](docs/RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history +*RebateApi* | [**rebate_user_info**](docs/RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information +*RebateApi* | [**user_sub_relation**](docs/RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship +*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details +*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency +*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported +*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair +*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information +*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book +*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades +*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks +*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates +*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates +*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts +*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book +*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders +*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* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair +*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list +*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order +*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order +*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order +*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history +*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time +*SpotApi* | [**countdown_cancel_all_spot**](docs/SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders +*SpotApi* | [**amend_batch_orders**](docs/SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders +*SpotApi* | [**get_spot_insurance_history**](docs/SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data +*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list +*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order +*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders +*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order +*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order +*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency +*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address +*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records +*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records +*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts +*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts +*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts +*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account +*WalletApi* | [**get_transfer_order_status**](docs/WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query +*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status +*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances +*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances +*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances +*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info +*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address +*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee +*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances +*WalletApi* | [**list_small_balance**](docs/WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance +*WalletApi* | [**convert_small_balance**](docs/WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance +*WalletApi* | [**list_small_balance_history**](docs/WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history +*WalletApi* | [**list_push_orders**](docs/WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history +*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw +*WithdrawalApi* | [**withdraw_push_order**](docs/WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer +*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID + + +## Documentation For Models + + - [AccountBalance](docs/AccountBalance.md) + - [AccountDetail](docs/AccountDetail.md) + - [AccountDetailKey](docs/AccountDetailKey.md) + - [AccountRateLimit](docs/AccountRateLimit.md) + - [AgencyCommission](docs/AgencyCommission.md) + - [AgencyCommissionHistory](docs/AgencyCommissionHistory.md) + - [AgencyTransaction](docs/AgencyTransaction.md) + - [AgencyTransactionHistory](docs/AgencyTransactionHistory.md) + - [AutoRepaySetting](docs/AutoRepaySetting.md) + - [BatchAmendItem](docs/BatchAmendItem.md) + - [BatchAmendOrderReq](docs/BatchAmendOrderReq.md) + - [BatchFuturesOrder](docs/BatchFuturesOrder.md) + - [BatchOrder](docs/BatchOrder.md) + - [BorrowCurrencyInfo](docs/BorrowCurrencyInfo.md) + - [BrokerCommission](docs/BrokerCommission.md) + - [BrokerCommission1](docs/BrokerCommission1.md) + - [BrokerTransaction](docs/BrokerTransaction.md) + - [BrokerTransaction1](docs/BrokerTransaction1.md) + - [CancelBatchOrder](docs/CancelBatchOrder.md) + - [CancelOrderResult](docs/CancelOrderResult.md) + - [CollateralAdjust](docs/CollateralAdjust.md) + - [CollateralAdjustRes](docs/CollateralAdjustRes.md) + - [CollateralAlign](docs/CollateralAlign.md) + - [CollateralCurrency](docs/CollateralCurrency.md) + - [CollateralCurrencyInfo](docs/CollateralCurrencyInfo.md) + - [CollateralCurrencyRes](docs/CollateralCurrencyRes.md) + - [CollateralCurrentRate](docs/CollateralCurrentRate.md) + - [CollateralFixRate](docs/CollateralFixRate.md) + - [CollateralLoanCurrency](docs/CollateralLoanCurrency.md) + - [CollateralLtv](docs/CollateralLtv.md) + - [CollateralOrder](docs/CollateralOrder.md) + - [CollateralRecord](docs/CollateralRecord.md) + - [Contract](docs/Contract.md) + - [ContractStat](docs/ContractStat.md) + - [ConvertSmallBalance](docs/ConvertSmallBalance.md) + - [CountdownCancelAllFuturesTask](docs/CountdownCancelAllFuturesTask.md) + - [CountdownCancelAllOptionsTask](docs/CountdownCancelAllOptionsTask.md) + - [CountdownCancelAllSpotTask](docs/CountdownCancelAllSpotTask.md) + - [CreateCollateralOrder](docs/CreateCollateralOrder.md) + - [CreateMultiCollateralOrder](docs/CreateMultiCollateralOrder.md) + - [CreateUniLend](docs/CreateUniLend.md) + - [CreateUniLoan](docs/CreateUniLoan.md) + - [CrossMarginAccount](docs/CrossMarginAccount.md) + - [CrossMarginAccountBook](docs/CrossMarginAccountBook.md) + - [CrossMarginBalance](docs/CrossMarginBalance.md) + - [CrossMarginBalance1](docs/CrossMarginBalance1.md) + - [CrossMarginCurrency](docs/CrossMarginCurrency.md) + - [CrossMarginLoan](docs/CrossMarginLoan.md) + - [CrossMarginRepayRequest](docs/CrossMarginRepayRequest.md) + - [CrossMarginRepayment](docs/CrossMarginRepayment.md) + - [CrossMarginTransferable](docs/CrossMarginTransferable.md) + - [Currency](docs/Currency.md) + - [CurrencyChain](docs/CurrencyChain.md) + - [CurrencyPair](docs/CurrencyPair.md) + - [CurrencyQuota](docs/CurrencyQuota.md) + - [DebitFee](docs/DebitFee.md) + - [DeliveryCandlestick](docs/DeliveryCandlestick.md) + - [DeliveryContract](docs/DeliveryContract.md) + - [DeliverySettlement](docs/DeliverySettlement.md) + - [DepositAddress](docs/DepositAddress.md) + - [DepositRecord](docs/DepositRecord.md) + - [DualGetOrders](docs/DualGetOrders.md) + - [DualGetPlans](docs/DualGetPlans.md) + - [Eth2RateList](docs/Eth2RateList.md) + - [Eth2Swap](docs/Eth2Swap.md) + - [FlashSwapCurrencyPair](docs/FlashSwapCurrencyPair.md) + - [FlashSwapOrder](docs/FlashSwapOrder.md) + - [FlashSwapOrderPreview](docs/FlashSwapOrderPreview.md) + - [FlashSwapOrderRequest](docs/FlashSwapOrderRequest.md) + - [FlashSwapPreviewRequest](docs/FlashSwapPreviewRequest.md) + - [FundingAccount](docs/FundingAccount.md) + - [FundingRateRecord](docs/FundingRateRecord.md) + - [FutureCancelOrderResult](docs/FutureCancelOrderResult.md) + - [FuturesAccount](docs/FuturesAccount.md) + - [FuturesAccountBook](docs/FuturesAccountBook.md) + - [FuturesAccountHistory](docs/FuturesAccountHistory.md) + - [FuturesAutoDeleverage](docs/FuturesAutoDeleverage.md) + - [FuturesBatchAmendOrderRequest](docs/FuturesBatchAmendOrderRequest.md) + - [FuturesCandlestick](docs/FuturesCandlestick.md) + - [FuturesFee](docs/FuturesFee.md) + - [FuturesIndexConstituents](docs/FuturesIndexConstituents.md) + - [FuturesInitialOrder](docs/FuturesInitialOrder.md) + - [FuturesLimitRiskTiers](docs/FuturesLimitRiskTiers.md) + - [FuturesLiqOrder](docs/FuturesLiqOrder.md) + - [FuturesLiquidate](docs/FuturesLiquidate.md) + - [FuturesOrder](docs/FuturesOrder.md) + - [FuturesOrderAmendment](docs/FuturesOrderAmendment.md) + - [FuturesOrderBook](docs/FuturesOrderBook.md) + - [FuturesOrderBookItem](docs/FuturesOrderBookItem.md) + - [FuturesPremiumIndex](docs/FuturesPremiumIndex.md) + - [FuturesPriceTrigger](docs/FuturesPriceTrigger.md) + - [FuturesPriceTriggeredOrder](docs/FuturesPriceTriggeredOrder.md) + - [FuturesTicker](docs/FuturesTicker.md) + - [FuturesTrade](docs/FuturesTrade.md) + - [IndexConstituent](docs/IndexConstituent.md) + - [InlineObject](docs/InlineObject.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InsuranceRecord](docs/InsuranceRecord.md) + - [LedgerRecord](docs/LedgerRecord.md) + - [LiquidateOrder](docs/LiquidateOrder.md) + - [MarginAccount](docs/MarginAccount.md) + - [MarginAccountBook](docs/MarginAccountBook.md) + - [MarginAccountCurrency](docs/MarginAccountCurrency.md) + - [MarginLeverageTier](docs/MarginLeverageTier.md) + - [MarginMarketLeverage](docs/MarginMarketLeverage.md) + - [MarginTiers](docs/MarginTiers.md) + - [MarginTransferable](docs/MarginTransferable.md) + - [MaxUniBorrowable](docs/MaxUniBorrowable.md) + - [MockFuturesOrder](docs/MockFuturesOrder.md) + - [MockFuturesPosition](docs/MockFuturesPosition.md) + - [MockMarginResult](docs/MockMarginResult.md) + - [MockOptionsOrder](docs/MockOptionsOrder.md) + - [MockOptionsPosition](docs/MockOptionsPosition.md) + - [MockRiskUnit](docs/MockRiskUnit.md) + - [MockSpotBalance](docs/MockSpotBalance.md) + - [MockSpotOrder](docs/MockSpotOrder.md) + - [MultiChainAddressItem](docs/MultiChainAddressItem.md) + - [MultiCollateralCurrency](docs/MultiCollateralCurrency.md) + - [MultiCollateralItem](docs/MultiCollateralItem.md) + - [MultiCollateralOrder](docs/MultiCollateralOrder.md) + - [MultiCollateralRecord](docs/MultiCollateralRecord.md) + - [MultiCollateralRecordCurrency](docs/MultiCollateralRecordCurrency.md) + - [MultiLoanItem](docs/MultiLoanItem.md) + - [MultiLoanRepayItem](docs/MultiLoanRepayItem.md) + - [MultiRepayRecord](docs/MultiRepayRecord.md) + - [MultiRepayResp](docs/MultiRepayResp.md) + - [MyFuturesTrade](docs/MyFuturesTrade.md) + - [MyFuturesTradeTimeRange](docs/MyFuturesTradeTimeRange.md) + - [OpenOrders](docs/OpenOrders.md) + - [OptionsAccount](docs/OptionsAccount.md) + - [OptionsAccountBook](docs/OptionsAccountBook.md) + - [OptionsCandlestick](docs/OptionsCandlestick.md) + - [OptionsContract](docs/OptionsContract.md) + - [OptionsMMP](docs/OptionsMMP.md) + - [OptionsMMPReset](docs/OptionsMMPReset.md) + - [OptionsMySettlements](docs/OptionsMySettlements.md) + - [OptionsMyTrade](docs/OptionsMyTrade.md) + - [OptionsOrder](docs/OptionsOrder.md) + - [OptionsPosition](docs/OptionsPosition.md) + - [OptionsPositionClose](docs/OptionsPositionClose.md) + - [OptionsPositionCloseOrder](docs/OptionsPositionCloseOrder.md) + - [OptionsSettlement](docs/OptionsSettlement.md) + - [OptionsTicker](docs/OptionsTicker.md) + - [OptionsUnderlying](docs/OptionsUnderlying.md) + - [OptionsUnderlyingTicker](docs/OptionsUnderlyingTicker.md) + - [Order](docs/Order.md) + - [OrderBook](docs/OrderBook.md) + - [OrderCancel](docs/OrderCancel.md) + - [OrderPatch](docs/OrderPatch.md) + - [OrderResp](docs/OrderResp.md) + - [PartnerCommissionHistory](docs/PartnerCommissionHistory.md) + - [PartnerSub](docs/PartnerSub.md) + - [PartnerSubList](docs/PartnerSubList.md) + - [PartnerTransactionHistory](docs/PartnerTransactionHistory.md) + - [PatchUniLend](docs/PatchUniLend.md) + - [PlaceDualInvestmentOrder](docs/PlaceDualInvestmentOrder.md) + - [Position](docs/Position.md) + - [PositionClose](docs/PositionClose.md) + - [PositionCloseOrder](docs/PositionCloseOrder.md) + - [ProfitLossRange](docs/ProfitLossRange.md) + - [RebateUserInfo](docs/RebateUserInfo.md) + - [RepayCurrencyRes](docs/RepayCurrencyRes.md) + - [RepayLoan](docs/RepayLoan.md) + - [RepayMultiLoan](docs/RepayMultiLoan.md) + - [RepayRecord](docs/RepayRecord.md) + - [RepayRecordCurrency](docs/RepayRecordCurrency.md) + - [RepayRecordLeftInterest](docs/RepayRecordLeftInterest.md) + - [RepayRecordRepaidCurrency](docs/RepayRecordRepaidCurrency.md) + - [RepayRecordTotalInterest](docs/RepayRecordTotalInterest.md) + - [RepayResp](docs/RepayResp.md) + - [RiskUnits](docs/RiskUnits.md) + - [SavedAddress](docs/SavedAddress.md) + - [SmallBalance](docs/SmallBalance.md) + - [SmallBalanceHistory](docs/SmallBalanceHistory.md) + - [SpotAccount](docs/SpotAccount.md) + - [SpotAccountBook](docs/SpotAccountBook.md) + - [SpotCurrencyChain](docs/SpotCurrencyChain.md) + - [SpotFee](docs/SpotFee.md) + - [SpotInsuranceHistory](docs/SpotInsuranceHistory.md) + - [SpotPricePutOrder](docs/SpotPricePutOrder.md) + - [SpotPriceTrigger](docs/SpotPriceTrigger.md) + - [SpotPriceTriggeredOrder](docs/SpotPriceTriggeredOrder.md) + - [StpGroup](docs/StpGroup.md) + - [StpGroupUser](docs/StpGroupUser.md) + - [StructuredBuy](docs/StructuredBuy.md) + - [StructuredGetProjectList](docs/StructuredGetProjectList.md) + - [StructuredOrderList](docs/StructuredOrderList.md) + - [SubAccount](docs/SubAccount.md) + - [SubAccountBalance](docs/SubAccountBalance.md) + - [SubAccountCrossMarginBalance](docs/SubAccountCrossMarginBalance.md) + - [SubAccountFuturesBalance](docs/SubAccountFuturesBalance.md) + - [SubAccountKey](docs/SubAccountKey.md) + - [SubAccountKeyPerms](docs/SubAccountKeyPerms.md) + - [SubAccountMarginBalance](docs/SubAccountMarginBalance.md) + - [SubAccountToSubAccount](docs/SubAccountToSubAccount.md) + - [SubAccountTransfer](docs/SubAccountTransfer.md) + - [SubCrossMarginAccount](docs/SubCrossMarginAccount.md) + - [SubUserMode](docs/SubUserMode.md) + - [SystemTime](docs/SystemTime.md) + - [Ticker](docs/Ticker.md) + - [TotalBalance](docs/TotalBalance.md) + - [Trade](docs/Trade.md) + - [TradeFee](docs/TradeFee.md) + - [TransactionID](docs/TransactionID.md) + - [Transfer](docs/Transfer.md) + - [TransferOrderStatus](docs/TransferOrderStatus.md) + - [TransferablesResult](docs/TransferablesResult.md) + - [TriggerOrderResponse](docs/TriggerOrderResponse.md) + - [TriggerTime](docs/TriggerTime.md) + - [UidPushOrder](docs/UidPushOrder.md) + - [UidPushWithdrawal](docs/UidPushWithdrawal.md) + - [UidPushWithdrawalResp](docs/UidPushWithdrawalResp.md) + - [UniCurrency](docs/UniCurrency.md) + - [UniCurrencyInterest](docs/UniCurrencyInterest.md) + - [UniCurrencyPair](docs/UniCurrencyPair.md) + - [UniInterestMode](docs/UniInterestMode.md) + - [UniInterestRecord](docs/UniInterestRecord.md) + - [UniLend](docs/UniLend.md) + - [UniLendInterest](docs/UniLendInterest.md) + - [UniLendRecord](docs/UniLendRecord.md) + - [UniLoan](docs/UniLoan.md) + - [UniLoanInterestRecord](docs/UniLoanInterestRecord.md) + - [UniLoanRecord](docs/UniLoanRecord.md) + - [UnifiedAccount](docs/UnifiedAccount.md) + - [UnifiedBalance](docs/UnifiedBalance.md) + - [UnifiedBorrowable](docs/UnifiedBorrowable.md) + - [UnifiedBorrowable1](docs/UnifiedBorrowable1.md) + - [UnifiedCurrency](docs/UnifiedCurrency.md) + - [UnifiedDiscount](docs/UnifiedDiscount.md) + - [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md) + - [UnifiedHistoryLoanRate](docs/UnifiedHistoryLoanRate.md) + - [UnifiedHistoryLoanRateRates](docs/UnifiedHistoryLoanRateRates.md) + - [UnifiedLeverageConfig](docs/UnifiedLeverageConfig.md) + - [UnifiedLeverageSetting](docs/UnifiedLeverageSetting.md) + - [UnifiedLoan](docs/UnifiedLoan.md) + - [UnifiedLoanRecord](docs/UnifiedLoanRecord.md) + - [UnifiedLoanResult](docs/UnifiedLoanResult.md) + - [UnifiedMarginTiers](docs/UnifiedMarginTiers.md) + - [UnifiedModeSet](docs/UnifiedModeSet.md) + - [UnifiedPortfolioInput](docs/UnifiedPortfolioInput.md) + - [UnifiedPortfolioOutput](docs/UnifiedPortfolioOutput.md) + - [UnifiedRiskUnits](docs/UnifiedRiskUnits.md) + - [UnifiedSettings](docs/UnifiedSettings.md) + - [UnifiedTransferable](docs/UnifiedTransferable.md) + - [UserLtvInfo](docs/UserLtvInfo.md) + - [UserSub](docs/UserSub.md) + - [UserSubRelation](docs/UserSubRelation.md) + - [UserTotalAmount](docs/UserTotalAmount.md) + - [WithdrawStatus](docs/WithdrawStatus.md) + - [WithdrawalRecord](docs/WithdrawalRecord.md) + + +## Documentation For Authorization + + +## apiv4 + +Authentication with APIv4 key and secret + +For details, refer to: +[APIv4 signed request requirements](https://www.gate.io/docs/apiv4/en/index.html#apiv4-signed-request-requirements) + + +## Author + +support@mail.gate.io + + diff --git a/docs/AccountApi.md b/docs/AccountApi.md new file mode 100644 index 0000000..2c13efa --- /dev/null +++ b/docs/AccountApi.md @@ -0,0 +1,625 @@ +# gate_api.AccountApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail +[**get_account_rate_limit**](AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information +[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups +[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group +[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group +[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group +[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group +[**get_debit_fee**](AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. +[**set_debit_fee**](AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. + + +# **get_account_detail** +> AccountDetail get_account_detail() + +Get account 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.AccountApi(api_client) + +try: + # Get account detail + api_response = api_instance.get_account_detail() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->get_account_detail: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AccountDetail**](AccountDetail.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_account_rate_limit** +> list[AccountRateLimit] get_account_rate_limit() + +Get user transaction rate limit information + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) + +try: + # Get user transaction rate limit information + api_response = api_instance.get_account_rate_limit() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->get_account_rate_limit: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[AccountRateLimit]**](AccountRateLimit.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_stp_groups** +> list[StpGroup] list_stp_groups(name=name) + +List STP Groups + +Retrieve the list of STP groups created by the main account user only + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) +name = 'group' # str | Perform a fuzzy search based on the name (optional) + +try: + # List STP Groups + api_response = api_instance.list_stp_groups(name=name) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->list_stp_groups: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| Perform a fuzzy search based on the name | [optional] + +### Return type + +[**list[StpGroup]**](StpGroup.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_stp_group** +> StpGroup create_stp_group(stp_group) + +Create STP Group + +Only the main account is allowed to create a new STP user group + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) +stp_group = gate_api.StpGroup() # StpGroup | + +try: + # Create STP Group + api_response = api_instance.create_stp_group(stp_group) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->create_stp_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stp_group** | [**StpGroup**](StpGroup.md)| | + +### Return type + +[**StpGroup**](StpGroup.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** | User added successfully. Returning the current users within the STP group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_stp_groups_users** +> list[StpGroupUser] list_stp_groups_users(stp_id) + +List users of the STP group + +Only the main account that created this STP group is allowed to list the user ID of the STP group + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) +stp_id = 1 # int | STP Group ID + +try: + # List users of the STP group + api_response = api_instance.list_stp_groups_users(stp_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 AccountApi->list_stp_groups_users: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stp_id** | **int**| STP Group ID | + +### Return type + +[**list[StpGroupUser]**](StpGroupUser.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **add_stp_group_users** +> list[StpGroupUser] add_stp_group_users(stp_id, request_body) + +Add users to the STP group + +- Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) +stp_id = 1 # int | STP Group ID +request_body = [[1,2,3]] # list[int] | User ID + +try: + # Add users to the STP group + api_response = api_instance.add_stp_group_users(stp_id, request_body) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->add_stp_group_users: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stp_id** | **int**| STP Group ID | + **request_body** | [**list[int]**](int.md)| User ID | + +### Return type + +[**list[StpGroupUser]**](StpGroupUser.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** | User added successfully. Returning the current users within the STP group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_stp_group_users** +> list[StpGroupUser] delete_stp_group_users(stp_id, user_id) + +Delete the user in the STP group + +- Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) +stp_id = 1 # int | STP Group ID +user_id = 1 # int | STP user ID, multiple can be separated by commas + +try: + # Delete the user in the STP group + api_response = api_instance.delete_stp_group_users(stp_id, user_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->delete_stp_group_users: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stp_id** | **int**| STP Group ID | + **user_id** | **int**| STP user ID, multiple can be separated by commas | + +### Return type + +[**list[StpGroupUser]**](StpGroupUser.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_debit_fee** +> DebitFee get_debit_fee() + +Query GT deduction configuration. + +Query the current GT deduction configuration for the account. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) + +try: + # Query GT deduction configuration. + api_response = api_instance.get_debit_fee() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->get_debit_fee: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DebitFee**](DebitFee.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_debit_fee** +> set_debit_fee(debit_fee) + +Set GT deduction. + +Enable or disable GT deduction for the current account. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.AccountApi(api_client) +debit_fee = gate_api.DebitFee() # DebitFee | + +try: + # Set GT deduction. + api_instance.set_debit_fee(debit_fee) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AccountApi->set_debit_fee: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **debit_fee** | [**DebitFee**](DebitFee.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AccountBalance.md b/docs/AccountBalance.md new file mode 100644 index 0000000..6e31613 --- /dev/null +++ b/docs/AccountBalance.md @@ -0,0 +1,14 @@ +# AccountBalance + +Total balances calculated with specified currency unit +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | Account total balance amount | [optional] +**currency** | **str** | Currency | [optional] +**unrealised_pnl** | **str** | Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts | [optional] +**borrowed** | **str** | Borrowed,this field will only appear in margin and cross_margin accounts | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md new file mode 100644 index 0000000..c88e63d --- /dev/null +++ b/docs/AccountDetail.md @@ -0,0 +1,16 @@ +# AccountDetail + +Account detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_whitelist** | **list[str]** | IP whitelist | [optional] +**currency_pairs** | **list[str]** | CurrencyPair whitelisting | [optional] +**user_id** | **int** | User ID | [optional] +**tier** | **int** | User VIP level | [optional] +**key** | [**AccountDetailKey**](AccountDetailKey.md) | | [optional] +**copy_trading_role** | **int** | User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccountDetailKey.md b/docs/AccountDetailKey.md new file mode 100644 index 0000000..e86955d --- /dev/null +++ b/docs/AccountDetailKey.md @@ -0,0 +1,11 @@ +# AccountDetailKey + +API Key detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **int** | mode: 1 - classic account 2 - portfolio margin account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccountRateLimit.md b/docs/AccountRateLimit.md new file mode 100644 index 0000000..2d86be1 --- /dev/null +++ b/docs/AccountRateLimit.md @@ -0,0 +1,13 @@ +# AccountRateLimit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tier** | **str** | Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) | [optional] +**ratio** | **str** | Transaction rate | [optional] +**main_ratio** | **str** | Total transaction ratio of main account | [optional] +**updated_at** | **str** | Update time | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgencyCommission.md b/docs/AgencyCommission.md new file mode 100644 index 0000000..85d5907 --- /dev/null +++ b/docs/AgencyCommission.md @@ -0,0 +1,15 @@ +# AgencyCommission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commission_time** | **int** | Commission Time. (unix timestamp) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**commission_amount** | **str** | Commission Amount | [optional] +**commission_asset** | **str** | Commission Asset | [optional] +**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgencyCommissionHistory.md b/docs/AgencyCommissionHistory.md new file mode 100644 index 0000000..e3558c1 --- /dev/null +++ b/docs/AgencyCommissionHistory.md @@ -0,0 +1,12 @@ +# AgencyCommissionHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgencyTransaction.md b/docs/AgencyTransaction.md new file mode 100644 index 0000000..e54646f --- /dev/null +++ b/docs/AgencyTransaction.md @@ -0,0 +1,18 @@ +# AgencyTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**fee** | **str** | Fee | [optional] +**fee_asset** | **str** | Fee currency | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**amount** | **str** | Commission Amount | [optional] +**amount_asset** | **str** | Commission Asset | [optional] +**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgencyTransactionHistory.md b/docs/AgencyTransactionHistory.md new file mode 100644 index 0000000..a79d13c --- /dev/null +++ b/docs/AgencyTransactionHistory.md @@ -0,0 +1,12 @@ +# AgencyTransactionHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AutoRepaySetting.md b/docs/AutoRepaySetting.md new file mode 100644 index 0000000..14d2c7e --- /dev/null +++ b/docs/AutoRepaySetting.md @@ -0,0 +1,10 @@ +# AutoRepaySetting + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Auto repayment status. `on` - enabled, `off` - disabled | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BatchAmendItem.md b/docs/BatchAmendItem.md new file mode 100644 index 0000000..2193da6 --- /dev/null +++ b/docs/BatchAmendItem.md @@ -0,0 +1,17 @@ +# BatchAmendItem + +Order information that needs to be modified +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). | +**currency_pair** | **str** | Currency pair | +**account** | **str** | Default spot, unified account and warehouse-by-store leverage account. | [optional] +**amount** | **str** | trade amount, only one of amount and price can be specified | [optional] +**price** | **str** | trade price, only one of amount and price can be specified | [optional] +**amend_text** | **str** | Custom info during amending order | [optional] +**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BatchAmendOrderReq.md b/docs/BatchAmendOrderReq.md new file mode 100644 index 0000000..121b66c --- /dev/null +++ b/docs/BatchAmendOrderReq.md @@ -0,0 +1,15 @@ +# BatchAmendOrderReq + +Modify contract order parameters +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] +**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] +**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] +**price** | **str** | New order price. | [optional] +**amend_text** | **str** | Custom info during amending 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/BatchFuturesOrder.md b/docs/BatchFuturesOrder.md new file mode 100644 index 0000000..538f820 --- /dev/null +++ b/docs/BatchFuturesOrder.md @@ -0,0 +1,38 @@ +# BatchFuturesOrder + +Futures order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] +**label** | **str** | Error label, only exists if execution fails | [optional] +**detail** | **str** | Error detail, only present if execution failed and details need to be given | [optional] +**id** | **int** | Futures order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Creation time of order | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] +**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] +**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] +**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | [optional] +**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] +**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] +**is_close** | **bool** | Is the order to close position | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] +**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] +**left** | **int** | Size left to be traded | [optional] [readonly] +**fill_price** | **str** | Fill price of the order | [optional] [readonly] +**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] +**tkfr** | **str** | Taker fee | [optional] [readonly] +**mkfr** | **str** | Maker fee | [optional] [readonly] +**refu** | **int** | Reference user ID | [optional] [readonly] +**auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BatchOrder.md b/docs/BatchOrder.md new file mode 100644 index 0000000..f1b326d --- /dev/null +++ b/docs/BatchOrder.md @@ -0,0 +1,47 @@ +# BatchOrder + +Batch order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] +**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] +**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] +**label** | **str** | Error label, if any, otherwise an empty string | [optional] +**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] +**id** | **str** | Order ID | [optional] [readonly] +**create_time** | **str** | Creation time of order | [optional] [readonly] +**update_time** | **str** | Last modification time of order | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] +**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] +**currency_pair** | **str** | Currency pair | [optional] +**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] +**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] +**side** | **str** | Order side | [optional] +**amount** | **str** | Trade amount | [optional] +**price** | **str** | Order price | [optional] +**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] +**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] +**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] +**left** | **str** | Amount left to fill | [optional] [readonly] +**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price | [optional] [readonly] +**fee** | **str** | Fee deducted | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] +**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BorrowCurrencyInfo.md b/docs/BorrowCurrencyInfo.md new file mode 100644 index 0000000..c627a30 --- /dev/null +++ b/docs/BorrowCurrencyInfo.md @@ -0,0 +1,14 @@ +# BorrowCurrencyInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**left_repay_principal** | **str** | outstanding principal | [optional] +**left_repay_interest** | **str** | outstanding interest | [optional] +**left_repay_usdt** | **str** | Value of left total repayments amount in USDT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BrokerCommission.md b/docs/BrokerCommission.md new file mode 100644 index 0000000..4c722fa --- /dev/null +++ b/docs/BrokerCommission.md @@ -0,0 +1,11 @@ +# BrokerCommission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total | [optional] +**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of comission history | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BrokerCommission1.md b/docs/BrokerCommission1.md new file mode 100644 index 0000000..c515dea --- /dev/null +++ b/docs/BrokerCommission1.md @@ -0,0 +1,18 @@ +# BrokerCommission1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commission_time** | **int** | Commission Time. (unix timestamp) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**amount** | **str** | The amount of commission rebates | [optional] +**fee** | **str** | Fee | [optional] +**fee_asset** | **str** | Fee currency | [optional] +**rebate_fee** | **str** | The income from rebates, converted to USDT | [optional] +**source** | **str** | Rebate Type: Spot、Futures、Options | [optional] +**currency_pair** | **str** | Currency pair | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BrokerTransaction.md b/docs/BrokerTransaction.md new file mode 100644 index 0000000..c450894 --- /dev/null +++ b/docs/BrokerTransaction.md @@ -0,0 +1,11 @@ +# BrokerTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total | [optional] +**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BrokerTransaction1.md b/docs/BrokerTransaction1.md new file mode 100644 index 0000000..299b892 --- /dev/null +++ b/docs/BrokerTransaction1.md @@ -0,0 +1,17 @@ +# BrokerTransaction1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**fee** | **str** | fee (usdt) | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**amount** | **str** | Commission Amount | [optional] +**fee_asset** | **str** | Fee currency | [optional] +**source** | **str** | Rebate Type: Spot、Futures、Options | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CancelBatchOrder.md b/docs/CancelBatchOrder.md new file mode 100644 index 0000000..4d2953b --- /dev/null +++ b/docs/CancelBatchOrder.md @@ -0,0 +1,14 @@ +# CancelBatchOrder + +Info of order to be cancelled +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Order currency pair | +**id** | **str** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation | +**account** | **str** | If the canceled order is a unified account apikey, this field must be specified and set to `unified` | [optional] +**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CancelOrderResult.md b/docs/CancelOrderResult.md new file mode 100644 index 0000000..af56f5e --- /dev/null +++ b/docs/CancelOrderResult.md @@ -0,0 +1,17 @@ +# CancelOrderResult + +Order cancellation result +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Order currency pair | [optional] +**id** | **str** | Order ID | [optional] +**text** | **str** | Custom order information | [optional] +**succeeded** | **bool** | Whether cancellation succeeded | [optional] +**label** | **str** | Error label when failed to cancel the order; emtpy if succeeded | [optional] +**message** | **str** | Error message when failed to cancel the order; empty if succeeded | [optional] +**account** | **str** | Default is empty (deprecated) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralAdjust.md b/docs/CollateralAdjust.md new file mode 100644 index 0000000..8392662 --- /dev/null +++ b/docs/CollateralAdjust.md @@ -0,0 +1,12 @@ +# CollateralAdjust + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | +**type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | +**collaterals** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral Currency List | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralAdjustRes.md b/docs/CollateralAdjustRes.md new file mode 100644 index 0000000..05bd46a --- /dev/null +++ b/docs/CollateralAdjustRes.md @@ -0,0 +1,12 @@ +# CollateralAdjustRes + +Result of multi-collateral adjustment +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**collateral_currencies** | [**list[CollateralCurrencyRes]**](CollateralCurrencyRes.md) | Collateral Currency Information | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralAlign.md b/docs/CollateralAlign.md new file mode 100644 index 0000000..52cc64f --- /dev/null +++ b/docs/CollateralAlign.md @@ -0,0 +1,13 @@ +# CollateralAlign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | +**collateral_currency** | **str** | Collateral | +**collateral_amount** | **str** | Collateral amount | +**type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralCurrency.md b/docs/CollateralCurrency.md new file mode 100644 index 0000000..016d704 --- /dev/null +++ b/docs/CollateralCurrency.md @@ -0,0 +1,11 @@ +# CollateralCurrency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**amount** | **str** | Size | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralCurrencyInfo.md b/docs/CollateralCurrencyInfo.md new file mode 100644 index 0000000..222b2fc --- /dev/null +++ b/docs/CollateralCurrencyInfo.md @@ -0,0 +1,13 @@ +# CollateralCurrencyInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**left_collateral** | **str** | Left Collateral Amount | [optional] +**left_collateral_usdt** | **str** | Value of left collateral amount in USDT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralCurrencyRes.md b/docs/CollateralCurrencyRes.md new file mode 100644 index 0000000..9dcfeb8 --- /dev/null +++ b/docs/CollateralCurrencyRes.md @@ -0,0 +1,14 @@ +# CollateralCurrencyRes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**succeeded** | **bool** | Update success status | [optional] +**label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] +**message** | **str** | Error description in case of operation failure; empty when successful. | [optional] +**currency** | **str** | Currency | [optional] +**amount** | **str** | Quantity of successful collateral operation; 0 if the operation fails. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralCurrentRate.md b/docs/CollateralCurrentRate.md new file mode 100644 index 0000000..73ba5c8 --- /dev/null +++ b/docs/CollateralCurrentRate.md @@ -0,0 +1,12 @@ +# CollateralCurrentRate + +Multi-currency pledge current interest rate +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**current_rate** | **str** | Currency current interest rate | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralFixRate.md b/docs/CollateralFixRate.md new file mode 100644 index 0000000..f6e37f8 --- /dev/null +++ b/docs/CollateralFixRate.md @@ -0,0 +1,14 @@ +# CollateralFixRate + +Multi-collateral fixed interest rate +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**rate_7d** | **str** | Fixed interest rate for a lending period of 7 days | [optional] +**rate_30d** | **str** | Fixed interest rate for a lending period of 30 days | [optional] +**update_time** | **int** | Update time, timestamp, unit in seconds | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralLoanApi.md b/docs/CollateralLoanApi.md new file mode 100644 index 0000000..5b55826 --- /dev/null +++ b/docs/CollateralLoanApi.md @@ -0,0 +1,704 @@ +# gate_api.CollateralLoanApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders +[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order +[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order +[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment +[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history +[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records +[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral +[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user +[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio +[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies + + +# **list_collateral_loan_orders** +> list[CollateralOrder] list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) + +List 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.CollateralLoanApi(api_client) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +collateral_currency = 'BTC' # str | Collateral (optional) +borrow_currency = 'USDT' # str | Borrowed currency (optional) + +try: + # List Orders + api_response = api_instance.list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->list_collateral_loan_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **collateral_currency** | **str**| Collateral | [optional] + **borrow_currency** | **str**| Borrowed currency | [optional] + +### Return type + +[**list[CollateralOrder]**](CollateralOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_collateral_loan** +> OrderResp create_collateral_loan(create_collateral_order) + +Place 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.CollateralLoanApi(api_client) +create_collateral_order = gate_api.CreateCollateralOrder() # CreateCollateralOrder | + +try: + # Place order + api_response = api_instance.create_collateral_loan(create_collateral_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->create_collateral_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_collateral_order** | [**CreateCollateralOrder**](CreateCollateralOrder.md)| | + +### Return type + +[**OrderResp**](OrderResp.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 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_collateral_loan_order_detail** +> CollateralOrder get_collateral_loan_order_detail(order_id) + +Get a single 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.CollateralLoanApi(api_client) +order_id = 100001 # int | Order ID returned on successful order creation + +try: + # Get a single order + api_response = api_instance.get_collateral_loan_order_detail(order_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->get_collateral_loan_order_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Order ID returned on successful order creation | + +### Return type + +[**CollateralOrder**](CollateralOrder.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) + +# **repay_collateral_loan** +> RepayResp repay_collateral_loan(repay_loan) + +Repayment + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.CollateralLoanApi(api_client) +repay_loan = gate_api.RepayLoan() # RepayLoan | + +try: + # Repayment + api_response = api_instance.repay_collateral_loan(repay_loan) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->repay_collateral_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repay_loan** | [**RepayLoan**](RepayLoan.md)| | + +### Return type + +[**RepayResp**](RepayResp.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** | Operated 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_repay_records** +> list[RepayRecord] list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) + +Repayment history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.CollateralLoanApi(api_client) +source = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation +borrow_currency = 'USDT' # str | Borrowed currency (optional) +collateral_currency = 'BTC' # str | Collateral (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1609459200 # int | Start timestamp of the query (optional) +to = 1609459200 # int | Time range ending, default to current time (optional) + +try: + # Repayment history + api_response = api_instance.list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->list_repay_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **source** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | + **borrow_currency** | **str**| Borrowed currency | [optional] + **collateral_currency** | **str**| Collateral | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + +### Return type + +[**list[RepayRecord]**](RepayRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_collateral_records** +> list[CollateralRecord] list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) + +Query collateral adjustment records + +### Example + +* 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.CollateralLoanApi(api_client) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1609459200 # int | Start timestamp of the query (optional) +to = 1609459200 # int | Time range ending, default to current time (optional) +borrow_currency = 'USDT' # str | Borrowed currency (optional) +collateral_currency = 'BTC' # str | Collateral (optional) + +try: + # Query collateral adjustment records + api_response = api_instance.list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->list_collateral_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **borrow_currency** | **str**| Borrowed currency | [optional] + **collateral_currency** | **str**| Collateral | [optional] + +### Return type + +[**list[CollateralRecord]**](CollateralRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **operate_collateral** +> operate_collateral(collateral_align) + +Increase or redeem collateral + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.CollateralLoanApi(api_client) +collateral_align = gate_api.CollateralAlign() # CollateralAlign | + +try: + # Increase or redeem collateral + api_instance.operate_collateral(collateral_align) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->operate_collateral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collateral_align** | [**CollateralAlign**](CollateralAlign.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Operated 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_total_amount** +> UserTotalAmount get_user_total_amount() + +Query the total borrowing and collateral amount for the user + +### 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.CollateralLoanApi(api_client) + +try: + # Query the total borrowing and collateral amount for the user + api_response = api_instance.get_user_total_amount() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->get_user_total_amount: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserTotalAmount**](UserTotalAmount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user_ltv_info** +> UserLtvInfo get_user_ltv_info(collateral_currency, borrow_currency) + +Query user's collateralization ratio + +### 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.CollateralLoanApi(api_client) +collateral_currency = 'BTC' # str | Collateral +borrow_currency = 'USDT' # str | Borrowed currency + +try: + # Query user's collateralization ratio + api_response = api_instance.get_user_ltv_info(collateral_currency, borrow_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 CollateralLoanApi->get_user_ltv_info: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collateral_currency** | **str**| Collateral | + **borrow_currency** | **str**| Borrowed currency | + +### Return type + +[**UserLtvInfo**](UserLtvInfo.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_collateral_currencies** +> list[CollateralLoanCurrency] list_collateral_currencies(loan_currency=loan_currency) + +Query supported borrowing and collateral currencies + +### 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.CollateralLoanApi(api_client) +loan_currency = 'BTC' # str | The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. (optional) + +try: + # Query supported borrowing and collateral currencies + api_response = api_instance.list_collateral_currencies(loan_currency=loan_currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling CollateralLoanApi->list_collateral_currencies: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loan_currency** | **str**| The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. | [optional] + +### Return type + +[**list[CollateralLoanCurrency]**](CollateralLoanCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CollateralLoanCurrency.md b/docs/CollateralLoanCurrency.md new file mode 100644 index 0000000..fc4151a --- /dev/null +++ b/docs/CollateralLoanCurrency.md @@ -0,0 +1,12 @@ +# CollateralLoanCurrency + +Supported borrowing and collateral currencies +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_currency** | **str** | Borrowed currency | [optional] +**collateral_currency** | **list[str]** | List of supported collateral currencies | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralLtv.md b/docs/CollateralLtv.md new file mode 100644 index 0000000..3e79d8b --- /dev/null +++ b/docs/CollateralLtv.md @@ -0,0 +1,13 @@ +# CollateralLtv + +Collateral Ratio +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**init_ltv** | **str** | The initial collateralization rate | [optional] +**alert_ltv** | **str** | Warning collateralization ratio | [optional] +**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralOrder.md b/docs/CollateralOrder.md new file mode 100644 index 0000000..32216b9 --- /dev/null +++ b/docs/CollateralOrder.md @@ -0,0 +1,26 @@ +# CollateralOrder + +Collateral Order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**collateral_currency** | **str** | Collateral | [optional] +**collateral_amount** | **str** | Collateral amount | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**borrow_amount** | **str** | Borrowing amount | [optional] +**repaid_amount** | **str** | Repaid amount | [optional] +**repaid_principal** | **str** | Repaid principal | [optional] +**repaid_interest** | **str** | Repaid interest | [optional] +**init_ltv** | **str** | The initial collateralization rate | [optional] +**current_ltv** | **str** | The current collateralization rate | [optional] +**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] +**status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] +**left_repay_total** | **str** | Outstanding principal and interest (outstanding principal + outstanding interest) | [optional] +**left_repay_principal** | **str** | outstanding principal | [optional] +**left_repay_interest** | **str** | outstanding interest | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollateralRecord.md b/docs/CollateralRecord.md new file mode 100644 index 0000000..5a290c8 --- /dev/null +++ b/docs/CollateralRecord.md @@ -0,0 +1,20 @@ +# CollateralRecord + +Collateral record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Collateral record ID | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**borrow_amount** | **str** | Borrowing amount | [optional] +**collateral_currency** | **str** | Collateral | [optional] +**before_collateral** | **str** | The collateral amount before adjustment | [optional] +**after_collateral** | **str** | The collateral amount after adjustment | [optional] +**before_ltv** | **str** | The collateral ratio before adjustment | [optional] +**after_ltv** | **str** | The collateral ratio after adjustment | [optional] +**operate_time** | **int** | Timestamp of the operation, in seconds | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Contract.md b/docs/Contract.md new file mode 100644 index 0000000..d4bce26 --- /dev/null +++ b/docs/Contract.md @@ -0,0 +1,46 @@ +# Contract + +Futures contract details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Futures contract | [optional] +**type** | **str** | Futures contract type | [optional] +**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] +**leverage_min** | **str** | Minimum leverage | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**maintenance_rate** | **str** | Maintenance rate of margin | [optional] +**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional] +**mark_price** | **str** | Current mark price | [optional] +**index_price** | **str** | Current index price | [optional] +**last_price** | **str** | Last trading price | [optional] +**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] +**taker_fee_rate** | **str** | Taker fee rate | [optional] +**order_price_round** | **str** | Minimum order price increment | [optional] +**mark_price_round** | **str** | Minimum mark price increment | [optional] +**funding_rate** | **str** | Current funding rate | [optional] +**funding_interval** | **int** | Funding application interval, unit in seconds | [optional] +**funding_next_apply** | **float** | Next funding time | [optional] +**risk_limit_base** | **str** | Risk limit base,deprecated | [optional] +**risk_limit_step** | **str** | Step of adjusting risk limit,deprecated | [optional] +**risk_limit_max** | **str** | Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. | [optional] +**order_size_min** | **int** | Minimum order size the contract allowed | [optional] +**order_size_max** | **int** | Maximum order size the contract allowed | [optional] +**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] +**ref_discount_rate** | **str** | Referral fee rate discount | [optional] +**ref_rebate_rate** | **str** | Referrer commission rate | [optional] +**orderbook_id** | **int** | Current orderbook ID | [optional] +**trade_id** | **int** | Current trade ID | [optional] +**trade_size** | **int** | Historical accumulated trade size | [optional] +**position_size** | **int** | Current total long position size | [optional] +**config_change_time** | **float** | Last changed time of configuration | [optional] +**in_delisting** | **bool** | `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline | [optional] +**orders_limit** | **int** | Maximum number of open orders | [optional] +**enable_bonus** | **bool** | Whether bouns is enabled | [optional] +**enable_credit** | **bool** | Whether portfolio margin account is enabled | [optional] +**create_time** | **float** | Created time of the contract | [optional] +**funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional] + +[[Back to Model list]](../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 new file mode 100644 index 0000000..c66586e --- /dev/null +++ b/docs/ContractStat.md @@ -0,0 +1,22 @@ +# ContractStat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | Stat timestamp | [optional] +**lsr_taker** | **float** | Long/short account number ratio | [optional] +**lsr_account** | **float** | Long/short taker size ratio | [optional] +**long_liq_size** | **int** | Long liquidation size | [optional] +**long_liq_amount** | **float** | Long liquidation amount(base currency) | [optional] +**long_liq_usd** | **float** | Long liquidation volume(quote currency) | [optional] +**short_liq_size** | **int** | Short liquidation size | [optional] +**short_liq_amount** | **float** | Short liquidation amount(base currency) | [optional] +**short_liq_usd** | **float** | Short liquidation volume(quote currency) | [optional] +**open_interest** | **int** | Open interest size | [optional] +**open_interest_usd** | **float** | Open interest volume(quote currency) | [optional] +**top_lsr_account** | **float** | Top trader long/short account ratio | [optional] +**top_lsr_size** | **float** | Top trader long/short position ratio | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConvertSmallBalance.md b/docs/ConvertSmallBalance.md new file mode 100644 index 0000000..3265b4c --- /dev/null +++ b/docs/ConvertSmallBalance.md @@ -0,0 +1,12 @@ +# ConvertSmallBalance + +Convert Small Balance +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **list[str]** | Currency | [optional] +**is_all** | **bool** | Whether to exchange all | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CountdownCancelAllFuturesTask.md b/docs/CountdownCancelAllFuturesTask.md new file mode 100644 index 0000000..9e05e8e --- /dev/null +++ b/docs/CountdownCancelAllFuturesTask.md @@ -0,0 +1,12 @@ +# CountdownCancelAllFuturesTask + +Countdown cancel task detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | +**contract** | **str** | Futures contract | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CountdownCancelAllOptionsTask.md b/docs/CountdownCancelAllOptionsTask.md new file mode 100644 index 0000000..b768516 --- /dev/null +++ b/docs/CountdownCancelAllOptionsTask.md @@ -0,0 +1,13 @@ +# CountdownCancelAllOptionsTask + +Countdown cancel task detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | +**contract** | **str** | Options contract name | [optional] +**underlying** | **str** | Underlying | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CountdownCancelAllSpotTask.md b/docs/CountdownCancelAllSpotTask.md new file mode 100644 index 0000000..aaab8f8 --- /dev/null +++ b/docs/CountdownCancelAllSpotTask.md @@ -0,0 +1,12 @@ +# CountdownCancelAllSpotTask + +Countdown cancel task detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | +**currency_pair** | **str** | Currency pair | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateCollateralOrder.md b/docs/CreateCollateralOrder.md new file mode 100644 index 0000000..d160b3a --- /dev/null +++ b/docs/CreateCollateralOrder.md @@ -0,0 +1,13 @@ +# CreateCollateralOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collateral_amount** | **str** | Collateral amount | +**collateral_currency** | **str** | Collateral | +**borrow_amount** | **str** | Borrowing amount | +**borrow_currency** | **str** | Borrowed currency | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateMultiCollateralOrder.md b/docs/CreateMultiCollateralOrder.md new file mode 100644 index 0000000..c98e244 --- /dev/null +++ b/docs/CreateMultiCollateralOrder.md @@ -0,0 +1,18 @@ +# CreateMultiCollateralOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | [optional] +**order_type** | **str** | current - current, fixed - fixed, if not specified, default to current | [optional] +**fixed_type** | **str** | Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed | [optional] +**fixed_rate** | **str** | Fixed interest rate, must be specified for fixed | [optional] +**auto_renew** | **bool** | Fixed interest rate, automatic renewal | [optional] +**auto_repay** | **bool** | Fixed interest rate, automatic repayment | [optional] +**borrow_currency** | **str** | Borrowed currency | +**borrow_amount** | **str** | Borrowing amount | +**collateral_currencies** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency and amount | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUniLend.md b/docs/CreateUniLend.md new file mode 100644 index 0000000..c17fc8e --- /dev/null +++ b/docs/CreateUniLend.md @@ -0,0 +1,14 @@ +# CreateUniLend + +Lend or redeem +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | +**amount** | **str** | The amount of currency could be lent | +**type** | **str** | type: lend - lend, redeem - redeem | +**min_rate** | **str** | The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUniLoan.md b/docs/CreateUniLoan.md new file mode 100644 index 0000000..a8f30e1 --- /dev/null +++ b/docs/CreateUniLoan.md @@ -0,0 +1,15 @@ +# CreateUniLoan + +Borrow or repay +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | +**type** | **str** | type: borrow - borrow, repay - repay | +**amount** | **str** | The amount of lending or repaying | +**repaid_all** | **bool** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. | [optional] +**currency_pair** | **str** | Currency pair | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginAccount.md b/docs/CrossMarginAccount.md new file mode 100644 index 0000000..64dc282 --- /dev/null +++ b/docs/CrossMarginAccount.md @@ -0,0 +1,26 @@ +# CrossMarginAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**refresh_time** | **int** | Time of the most recent refresh | [optional] +**locked** | **bool** | Whether account is locked | [optional] +**balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional] +**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] +**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] +**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] +**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] +**total_initial_margin** | **str** | Total initial margin | [optional] +**total_margin_balance** | **str** | Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) | [optional] +**total_maintenance_margin** | **str** | Total maintenance margin | [optional] +**total_initial_margin_rate** | **str** | Total initial margin rate | [optional] +**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional] +**total_available_margin** | **str** | Total available margin | [optional] +**portfolio_margin_total** | **str** | Total amount of the portfolio margin account | [optional] +**portfolio_margin_total_liab** | **str** | Total liabilities of the portfolio margin account | [optional] +**portfolio_margin_total_equity** | **str** | Total equity of the portfolio margin account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginAccountBook.md b/docs/CrossMarginAccountBook.md new file mode 100644 index 0000000..d02b52f --- /dev/null +++ b/docs/CrossMarginAccountBook.md @@ -0,0 +1,15 @@ +# CrossMarginAccountBook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Balance change record ID | [optional] +**time** | **int** | The timestamp of the change (in milliseconds) | [optional] +**currency** | **str** | Currency changed | [optional] +**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] +**balance** | **str** | Balance after change | [optional] +**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginBalance.md b/docs/CrossMarginBalance.md new file mode 100644 index 0000000..275fa85 --- /dev/null +++ b/docs/CrossMarginBalance.md @@ -0,0 +1,18 @@ +# CrossMarginBalance + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **str** | Available amount | [optional] +**freeze** | **str** | Locked amount | [optional] +**borrowed** | **str** | Borrowed amount | [optional] +**interest** | **str** | Unpaid interests | [optional] +**negative_liab** | **str** | Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] | [optional] +**futures_pos_liab** | **str** | Borrowing to Open Positions in Futures | [optional] +**equity** | **str** | Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl | [optional] +**total_freeze** | **str** | Total freeze. Formula: freeze + position_initial_margin + order_margin | [optional] +**total_liab** | **str** | Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginBalance1.md b/docs/CrossMarginBalance1.md new file mode 100644 index 0000000..2db2a14 --- /dev/null +++ b/docs/CrossMarginBalance1.md @@ -0,0 +1,13 @@ +# CrossMarginBalance1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **str** | Available amount | [optional] +**freeze** | **str** | Locked amount | [optional] +**borrowed** | **str** | Borrowed amount | [optional] +**interest** | **str** | Unpaid interests | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginCurrency.md b/docs/CrossMarginCurrency.md new file mode 100644 index 0000000..0e3038a --- /dev/null +++ b/docs/CrossMarginCurrency.md @@ -0,0 +1,19 @@ +# CrossMarginCurrency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Currency name | [optional] +**rate** | **str** | Minimum lending rate (hourly rate) | [optional] +**prec** | **str** | Currency precision | [optional] +**discount** | **str** | Currency value discount, which is used in total value calculation | [optional] +**min_borrow_amount** | **str** | Minimum currency borrow amount. Unit is currency itself | [optional] +**user_max_borrow_amount** | **str** | Maximum borrow value allowed per user, in USDT | [optional] +**total_max_borrow_amount** | **str** | Maximum borrow value allowed for this currency, in USDT | [optional] +**price** | **str** | Price change between this currency and USDT | [optional] +**loanable** | **bool** | Whether currency is borrowed | [optional] +**status** | **int** | status - `0` : disable - `1` : enable | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginLoan.md b/docs/CrossMarginLoan.md new file mode 100644 index 0000000..f3f8012 --- /dev/null +++ b/docs/CrossMarginLoan.md @@ -0,0 +1,19 @@ +# CrossMarginLoan + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Loan record ID | [optional] [readonly] +**create_time** | **int** | Creation timestamp, in milliseconds | [optional] [readonly] +**update_time** | **int** | Update timestamp, in milliseconds | [optional] [readonly] +**currency** | **str** | Currency name | +**amount** | **str** | Borrowed amount | +**text** | **str** | User defined custom ID | [optional] +**status** | **int** | Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete | [optional] [readonly] +**repaid** | **str** | Repaid amount | [optional] [readonly] +**repaid_interest** | **str** | Repaid interest | [optional] [readonly] +**unpaid_interest** | **str** | Outstanding interest yet to be paid | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginRepayRequest.md b/docs/CrossMarginRepayRequest.md new file mode 100644 index 0000000..9c1ca05 --- /dev/null +++ b/docs/CrossMarginRepayRequest.md @@ -0,0 +1,11 @@ +# CrossMarginRepayRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Repayment currency | +**amount** | **str** | Repayment 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/CrossMarginRepayment.md b/docs/CrossMarginRepayment.md new file mode 100644 index 0000000..147ccbc --- /dev/null +++ b/docs/CrossMarginRepayment.md @@ -0,0 +1,16 @@ +# CrossMarginRepayment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Loan record ID | [optional] +**create_time** | **int** | Repayment time | [optional] +**loan_id** | **str** | Loan record ID | [optional] +**currency** | **str** | Currency name | [optional] +**principal** | **str** | Repaid principal | [optional] +**interest** | **str** | Repaid interest | [optional] +**repayment_type** | **str** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CrossMarginTransferable.md b/docs/CrossMarginTransferable.md new file mode 100644 index 0000000..4e2b0d6 --- /dev/null +++ b/docs/CrossMarginTransferable.md @@ -0,0 +1,11 @@ +# CrossMarginTransferable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | Max transferable amount | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Currency.md b/docs/Currency.md new file mode 100644 index 0000000..27e0400 --- /dev/null +++ b/docs/Currency.md @@ -0,0 +1,19 @@ +# Currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency symbol | [optional] +**name** | **str** | Currency name | [optional] +**delisted** | **bool** | Whether currency is de-listed | [optional] +**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled (deprecated) | [optional] +**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed (deprecated) | [optional] +**deposit_disabled** | **bool** | Whether currency's deposit is disabled (deprecated) | [optional] +**trade_disabled** | **bool** | Whether currency's trading is disabled | [optional] +**fixed_rate** | **str** | Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies | [optional] +**chain** | **str** | The main chain corresponding to the coin | [optional] +**chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CurrencyChain.md b/docs/CurrencyChain.md new file mode 100644 index 0000000..e45d973 --- /dev/null +++ b/docs/CurrencyChain.md @@ -0,0 +1,17 @@ +# CurrencyChain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chain** | **str** | Chain name | [optional] +**name_cn** | **str** | Chain name in Chinese | [optional] +**name_en** | **str** | Chain name in English | [optional] +**contract_address** | **str** | Smart contract address for the currency; if no address is available, it will be an empty string | [optional] +**is_disabled** | **int** | If it is disabled. 0 means NOT being disabled | [optional] +**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not | [optional] +**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not | [optional] +**decimal** | **str** | Withdrawal precision | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md new file mode 100644 index 0000000..10cea9c --- /dev/null +++ b/docs/CurrencyPair.md @@ -0,0 +1,26 @@ +# CurrencyPair + +Spot currency pair +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Currency pair | [optional] +**base** | **str** | Base currency | [optional] +**base_name** | **str** | Transaction currency name | [optional] +**quote** | **str** | Quote currency | [optional] +**quote_name** | **str** | Name of the denominated currency | [optional] +**fee** | **str** | Trading fee | [optional] +**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit | [optional] +**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit | [optional] +**max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit | [optional] +**max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit | [optional] +**amount_precision** | **int** | Amount scale | [optional] +**precision** | **int** | Price scale | [optional] +**trade_status** | **str** | How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold | [optional] +**sell_start** | **int** | Sell start unix timestamp in seconds | [optional] +**buy_start** | **int** | Buy start unix timestamp in seconds | [optional] +**type** | **str** | Trading pair type, normal: normal, premarket: pre-market | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CurrencyQuota.md b/docs/CurrencyQuota.md new file mode 100644 index 0000000..f563b08 --- /dev/null +++ b/docs/CurrencyQuota.md @@ -0,0 +1,15 @@ +# CurrencyQuota + +Currency Quota +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**min_quota** | **str** | Minimum borrowing/collateral quota for the currency | [optional] +**left_quota** | **str** | Remaining borrowing/collateral limit for the currency | [optional] +**left_quote_usdt** | **str** | Remaining currency limit converted to USDT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DebitFee.md b/docs/DebitFee.md new file mode 100644 index 0000000..dde6e6a --- /dev/null +++ b/docs/DebitFee.md @@ -0,0 +1,10 @@ +# DebitFee + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether GT fee discount is used | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md new file mode 100644 index 0000000..53808de --- /dev/null +++ b/docs/DeliveryApi.md @@ -0,0 +1,2050 @@ +# gate_api.DeliveryApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts +[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract +[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book +[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history +[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks +[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers +[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history +[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account +[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book +[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user +[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position +[**update_delivery_position_margin**](DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin +[**update_delivery_position_leverage**](DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage +[**update_delivery_position_risk_limit**](DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit +[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders +[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order +[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched +[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order +[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order +[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history +[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history +[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history +[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history +[**list_delivery_risk_limit_tiers**](DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers +[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders +[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order +[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders +[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order +[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order + + +# **list_delivery_contracts** +> list[DeliveryContract] list_delivery_contracts(settle) + +List all futures contracts + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency + +try: + # List all futures contracts + api_response = api_instance.list_delivery_contracts(settle) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_contracts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + +### Return type + +[**list[DeliveryContract]**](DeliveryContract.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_delivery_contract** +> DeliveryContract get_delivery_contract(settle, contract) + +Get a single contract + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract + +try: + # Get a single contract + api_response = api_instance.get_delivery_contract(settle, contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->get_delivery_contract: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + +### Return type + +[**DeliveryContract**](DeliveryContract.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Contract information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_order_book** +> FuturesOrderBook list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) + +Futures order book + +Bids will be sorted by price from high to low, while asks sorted reversely + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) +with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) + +try: + # Futures order book + api_response = api_instance.list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_order_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] + **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] + +### Return type + +[**FuturesOrderBook**](FuturesOrderBook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order book retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_trades** +> list[FuturesTrade] list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) + +Futures trading history + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional) +_from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) +to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional) + +try: + # Futures trading history + api_response = api_instance.list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional] + **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] + **to** | **int**| Specify end time in Unix seconds, default to current time | [optional] + +### Return type + +[**list[FuturesTrade]**](FuturesTrade.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_candlesticks** +> list[DeliveryCandlestick] list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) + +Get futures candlesticks + +Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) +to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 (optional) (default to '5m') + +try: + # Get futures candlesticks + api_response = api_instance.list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_candlesticks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] + **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 | [optional] [default to '5m'] + +### Return type + +[**list[DeliveryCandlestick]**](DeliveryCandlestick.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_tickers** +> list[FuturesTicker] list_delivery_tickers(settle, contract=contract) + +List futures tickers + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) + +try: + # List futures tickers + api_response = api_instance.list_delivery_tickers(settle, contract=contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_tickers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + +### Return type + +[**list[FuturesTicker]**](FuturesTicker.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_insurance_ledger** +> list[InsuranceRecord] list_delivery_insurance_ledger(settle, limit=limit) + +Futures insurance balance history + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) + +try: + # Futures insurance balance history + api_response = api_instance.list_delivery_insurance_ledger(settle, 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 DeliveryApi->list_delivery_insurance_ledger: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[InsuranceRecord]**](InsuranceRecord.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_accounts** +> FuturesAccount list_delivery_accounts(settle) + +Query futures account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency + +try: + # Query futures account + api_response = api_instance.list_delivery_accounts(settle) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + +### Return type + +[**FuturesAccount**](FuturesAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_account_book** +> list[FuturesAccountBook] list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) + +Query account book + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional) + +try: + # Query account book + api_response = api_instance.list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_account_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] + +### Return type + +[**list[FuturesAccountBook]**](FuturesAccountBook.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_positions** +> list[Position] list_delivery_positions(settle) + +List all positions of a user + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency + +try: + # List all positions of a user + api_response = api_instance.list_delivery_positions(settle) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_positions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + +### Return type + +[**list[Position]**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_delivery_position** +> Position get_delivery_position(settle, contract) + +Get single position + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract + +try: + # Get single position + api_response = api_instance.get_delivery_position(settle, contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->get_delivery_position: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_delivery_position_margin** +> Position update_delivery_position_margin(settle, contract, change) + +Update position 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. + +try: + # Update position margin + api_response = api_instance.update_delivery_position_margin(settle, contract, change) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->update_delivery_position_margin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_delivery_position_leverage** +> Position update_delivery_position_leverage(settle, contract, leverage) + +Update position leverage + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +leverage = '10' # str | New position leverage + +try: + # Update position leverage + api_response = api_instance.update_delivery_position_leverage(settle, contract, leverage) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->update_delivery_position_leverage: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **leverage** | **str**| New position leverage | + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_delivery_position_risk_limit** +> Position update_delivery_position_risk_limit(settle, contract, risk_limit) + +Update position risk limit + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +risk_limit = '10' # str | New position risk limit + +try: + # Update position risk limit + api_response = api_instance.update_delivery_position_risk_limit(settle, contract, risk_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 DeliveryApi->update_delivery_position_risk_limit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **risk_limit** | **str**| New position risk limit | + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_orders** +> list[FuturesOrder] list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) + +List futures orders + +Zero-filled order cannot be retrieved 10 minutes after order cancellation + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +status = 'open' # str | Only list the orders with this status +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) +count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) + +try: + # List futures orders + api_response = api_instance.list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **status** | **str**| Only list the orders with this status | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] + +### Return type + +[**list[FuturesOrder]**](FuturesOrder.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_delivery_order** +> FuturesOrder create_delivery_order(settle, futures_order) + +Create a futures order + +Zero-filled order cannot be retrieved 10 minutes after order cancellation + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +futures_order = gate_api.FuturesOrder() # FuturesOrder | + +try: + # Create a futures order + api_response = api_instance.create_delivery_order(settle, futures_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->create_delivery_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | + +### Return type + +[**FuturesOrder**](FuturesOrder.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 details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_delivery_orders** +> list[FuturesOrder] cancel_delivery_orders(settle, contract, side=side) + +Cancel all `open` orders matched + +Zero-filled order cannot be retrieved 10 minutes after order cancellation + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +side = 'ask' # str | All bids or asks. Both included if not specified (optional) + +try: + # Cancel all `open` orders matched + api_response = api_instance.cancel_delivery_orders(settle, contract, 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 DeliveryApi->cancel_delivery_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **side** | **str**| All bids or asks. Both included if not specified | [optional] + +### Return type + +[**list[FuturesOrder]**](FuturesOrder.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** | All orders matched 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) + +# **get_delivery_order** +> FuturesOrder get_delivery_order(settle, order_id) + +Get a single order + +Zero-filled order cannot be retrieved 10 minutes after order cancellation + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +order_id = '12345' # str | Retrieve the data of the order with the specified ID + +try: + # Get a single order + api_response = api_instance.get_delivery_order(settle, 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 DeliveryApi->get_delivery_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**FuturesOrder**](FuturesOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order details | - | + +[[Back to top]](#) [[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_delivery_order** +> FuturesOrder cancel_delivery_order(settle, order_id) + +Cancel a single 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +order_id = '12345' # str | Retrieve the data of the order with the specified ID + +try: + # Cancel a single order + api_response = api_instance.cancel_delivery_order(settle, 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 DeliveryApi->cancel_delivery_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**FuturesOrder**](FuturesOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_delivery_trades** +> list[MyFuturesTrade] get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) + +List personal trading history + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +order = 12345 # int | Futures order ID, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) +count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) + +try: + # List personal trading history + api_response = api_instance.get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->get_my_delivery_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **order** | **int**| Futures order ID, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] + +### Return type + +[**list[MyFuturesTrade]**](MyFuturesTrade.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_position_close** +> list[PositionClose] list_delivery_position_close(settle, contract=contract, limit=limit) + +List position close history + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) + +try: + # List position close history + api_response = api_instance.list_delivery_position_close(settle, contract=contract, 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 DeliveryApi->list_delivery_position_close: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[PositionClose]**](PositionClose.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_liquidates** +> list[FuturesLiquidate] list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) + +List liquidation history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +at = 0 # int | Specify a liquidation timestamp (optional) (default to 0) + +try: + # List liquidation history + api_response = api_instance.list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_liquidates: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0] + +### Return type + +[**list[FuturesLiquidate]**](FuturesLiquidate.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_settlements** +> list[DeliverySettlement] list_delivery_settlements(settle, contract=contract, limit=limit, at=at) + +List settlement history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +at = 0 # int | Specify a settlement timestamp (optional) (default to 0) + +try: + # List settlement history + api_response = api_instance.list_delivery_settlements(settle, contract=contract, limit=limit, at=at) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_settlements: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **at** | **int**| Specify a settlement timestamp | [optional] [default to 0] + +### Return type + +[**list[DeliverySettlement]**](DeliverySettlement.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_delivery_risk_limit_tiers** +> list[FuturesLimitRiskTiers] list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) + +List risk limit tiers + +When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # List risk limit tiers + api_response = api_instance.list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_delivery_risk_limit_tiers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[FuturesLimitRiskTiers]**](FuturesLimitRiskTiers.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_price_triggered_delivery_orders** +> list[FuturesPriceTriggeredOrder] list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) + +List All Price-triggered 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +status = 'status_example' # str | Only list the orders with this status +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # List All Price-triggered Orders + api_response = api_instance.list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->list_price_triggered_delivery_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **status** | **str**| Only list the orders with this status | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_price_triggered_delivery_order** +> TriggerOrderResponse create_price_triggered_delivery_order(settle, futures_price_triggered_order) + +Create a price-triggered 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | + +try: + # Create a price-triggered order + api_response = api_instance.create_price_triggered_delivery_order(settle, futures_price_triggered_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->create_price_triggered_delivery_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | + +### Return type + +[**TriggerOrderResponse**](TriggerOrderResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_price_triggered_delivery_order_list** +> list[FuturesPriceTriggeredOrder] cancel_price_triggered_delivery_order_list(settle, contract) + +Cancel All Price-triggered 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract + +try: + # Cancel All Price-triggered Orders + api_response = api_instance.cancel_price_triggered_delivery_order_list(settle, contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling DeliveryApi->cancel_price_triggered_delivery_order_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + +### Return type + +[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.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 cancellation request accepted. Query order status by listing orders | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_price_triggered_delivery_order** +> FuturesPriceTriggeredOrder get_price_triggered_delivery_order(settle, order_id) + +Get a price-triggered order + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID + +try: + # Get a price-triggered order + api_response = api_instance.get_price_triggered_delivery_order(settle, 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 DeliveryApi->get_price_triggered_delivery_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_price_triggered_delivery_order** +> FuturesPriceTriggeredOrder cancel_price_triggered_delivery_order(settle, order_id) + +cancel a price-triggered order + +### 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.DeliveryApi(api_client) +settle = 'usdt' # str | Settle currency +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID + +try: + # cancel a price-triggered order + api_response = api_instance.cancel_price_triggered_delivery_order(settle, 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 DeliveryApi->cancel_price_triggered_delivery_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | + +[[Back to top]](#) [[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/DeliveryCandlestick.md b/docs/DeliveryCandlestick.md new file mode 100644 index 0000000..16cbd49 --- /dev/null +++ b/docs/DeliveryCandlestick.md @@ -0,0 +1,16 @@ +# DeliveryCandlestick + +data point in every timestamp +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**t** | **float** | Unix timestamp in seconds | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] +**c** | **str** | Close price (quote currency) | [optional] +**h** | **str** | Highest price (quote currency) | [optional] +**l** | **str** | Lowest price (quote currency) | [optional] +**o** | **str** | Open price (quote currency) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeliveryContract.md b/docs/DeliveryContract.md new file mode 100644 index 0000000..069eb7b --- /dev/null +++ b/docs/DeliveryContract.md @@ -0,0 +1,48 @@ +# DeliveryContract + +Futures contract details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Futures contract | [optional] +**underlying** | **str** | Underlying | [optional] +**cycle** | **str** | Cycle type, e.g. WEEKLY, QUARTERLY | [optional] +**type** | **str** | Futures contract type | [optional] +**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] +**leverage_min** | **str** | Minimum leverage | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**maintenance_rate** | **str** | Maintenance rate of margin | [optional] +**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional] +**mark_price** | **str** | Current mark price | [optional] +**index_price** | **str** | Current index price | [optional] +**last_price** | **str** | Last trading price | [optional] +**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] +**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] +**basis_rate** | **str** | Fair basis rate | [optional] +**basis_value** | **str** | Fair basis value | [optional] +**basis_impact_value** | **str** | Funding used for calculating impact bid, ask price | [optional] +**settle_price** | **str** | Settle price | [optional] +**settle_price_interval** | **int** | Settle price update interval | [optional] +**settle_price_duration** | **int** | Settle price update duration in seconds | [optional] +**expire_time** | **int** | Contract expiry timestamp | [optional] +**risk_limit_base** | **str** | Risk limit base | [optional] +**risk_limit_step** | **str** | Step of adjusting risk limit | [optional] +**risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional] +**order_size_min** | **int** | Minimum order size the contract allowed | [optional] +**order_size_max** | **int** | Maximum order size the contract allowed | [optional] +**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] +**ref_discount_rate** | **str** | Referral fee rate discount | [optional] +**ref_rebate_rate** | **str** | Referrer commission rate | [optional] +**orderbook_id** | **int** | Current orderbook ID | [optional] +**trade_id** | **int** | Current trade ID | [optional] +**trade_size** | **int** | Historical accumulated trade size | [optional] +**position_size** | **int** | Current total long position size | [optional] +**config_change_time** | **float** | Last changed time of configuration | [optional] +**in_delisting** | **bool** | Contract is delisting | [optional] +**orders_limit** | **int** | Maximum number of open orders | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeliverySettlement.md b/docs/DeliverySettlement.md new file mode 100644 index 0000000..06a479a --- /dev/null +++ b/docs/DeliverySettlement.md @@ -0,0 +1,18 @@ +# DeliverySettlement + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | Liquidation time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**leverage** | **str** | Position leverage | [optional] [readonly] +**size** | **int** | Position size | [optional] [readonly] +**margin** | **str** | Position margin | [optional] [readonly] +**entry_price** | **str** | Average entry price | [optional] [readonly] +**settle_price** | **str** | Settled price | [optional] [readonly] +**profit** | **str** | Profit | [optional] [readonly] +**fee** | **str** | Fee deducted | [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/DepositAddress.md b/docs/DepositAddress.md new file mode 100644 index 0000000..b28d7ec --- /dev/null +++ b/docs/DepositAddress.md @@ -0,0 +1,12 @@ +# DepositAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency detail | +**address** | **str** | Deposit address | +**multichain_addresses** | [**list[MultiChainAddressItem]**](MultiChainAddressItem.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/DepositRecord.md b/docs/DepositRecord.md new file mode 100644 index 0000000..7271b03 --- /dev/null +++ b/docs/DepositRecord.md @@ -0,0 +1,19 @@ +# DepositRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Record ID | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] +**withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] +**timestamp** | **str** | Operation time | [optional] [readonly] +**amount** | **str** | Currency amount | +**currency** | **str** | Currency name | +**address** | **str** | Withdrawal address. Required for withdrawals | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] +**status** | **str** | Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked | [optional] [readonly] +**chain** | **str** | Name of the chain used in withdrawals | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DualGetOrders.md b/docs/DualGetOrders.md new file mode 100644 index 0000000..881c960 --- /dev/null +++ b/docs/DualGetOrders.md @@ -0,0 +1,26 @@ +# DualGetOrders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] +**plan_id** | **int** | Plan ID | [optional] +**copies** | **str** | Copies | [optional] +**invest_amount** | **str** | Investment Amount | [optional] +**settlement_amount** | **str** | Settlement Amount | [optional] +**create_time** | **int** | Creation time | [optional] +**complete_time** | **int** | Completion Time | [optional] +**status** | **str** | Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed | [optional] +**invest_currency** | **str** | Investment Currency | [optional] +**exercise_currency** | **str** | Strike Currency | [optional] +**exercise_price** | **str** | Strike price | [optional] +**settlement_price** | **str** | settlement price | [optional] +**settlement_currency** | **str** | Settle currency | [optional] +**apy_display** | **str** | APY | [optional] +**apy_settlement** | **str** | Settlement APY | [optional] +**delivery_time** | **int** | Settlement time | [optional] +**text** | **str** | Custom order information | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DualGetPlans.md b/docs/DualGetPlans.md new file mode 100644 index 0000000..4bd3850 --- /dev/null +++ b/docs/DualGetPlans.md @@ -0,0 +1,22 @@ +# DualGetPlans + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Plan ID | [optional] +**instrument_name** | **str** | Instrument Name | [optional] +**invest_currency** | **str** | Investment Currency | [optional] +**exercise_currency** | **str** | Strike Currency | [optional] +**exercise_price** | **float** | Strike price | [optional] +**delivery_time** | **int** | Settlement time | [optional] +**min_copies** | **int** | Minimum Copies | [optional] +**max_copies** | **int** | Maximum Copies | [optional] +**per_value** | **str** | Per Unit Value | [optional] +**apy_display** | **str** | APY | [optional] +**start_time** | **int** | start time | [optional] +**end_time** | **int** | Finished time | [optional] +**status** | **str** | Status: `NOTSTARTED`-not started `ONGOING`-ongoing `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/EarnApi.md b/docs/EarnApi.md new file mode 100644 index 0000000..ccd605f --- /dev/null +++ b/docs/EarnApi.md @@ -0,0 +1,547 @@ +# gate_api.EarnApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap +[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query +[**list_dual_investment_plans**](EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list +[**list_dual_orders**](EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list +[**place_dual_order**](EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order +[**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List +[**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List +[**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order + + +# **swap_eth2** +> swap_eth2(eth2_swap) + +ETH2 swap + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) +eth2_swap = gate_api.Eth2Swap() # Eth2Swap | + +try: + # ETH2 swap + api_instance.swap_eth2(eth2_swap) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->swap_eth2: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **eth2_swap** | [**Eth2Swap**](Eth2Swap.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | swap 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) + +# **rate_list_eth2** +> list[Eth2RateList] rate_list_eth2() + +ETH2 historical rate of return query + +Check the ETH earnings rate record for the last 31 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) + +try: + # ETH2 historical rate of return query + api_response = api_instance.rate_list_eth2() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->rate_list_eth2: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Eth2RateList]**](Eth2RateList.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_dual_investment_plans** +> list[DualGetPlans] list_dual_investment_plans(plan_id=plan_id) + +Dual Investment product list + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) +plan_id = 1 # int | Financial project id (optional) + +try: + # Dual Investment product list + api_response = api_instance.list_dual_investment_plans(plan_id=plan_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->list_dual_investment_plans: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **int**| Financial project id | [optional] + +### Return type + +[**list[DualGetPlans]**](DualGetPlans.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_dual_orders** +> list[DualGetOrders] list_dual_orders(_from=_from, to=to, page=page, limit=limit) + +Dual Investment order list + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) +_from = 1740727000 # int | Start checkout time (optional) +to = 1740729000 # int | End settlement time (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) + +try: + # Dual Investment order list + api_response = api_instance.list_dual_orders(_from=_from, to=to, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->list_dual_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_from** | **int**| Start checkout time | [optional] + **to** | **int**| End settlement time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[DualGetOrders]**](DualGetOrders.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **place_dual_order** +> place_dual_order(place_dual_investment_order) + +Place Dual Investment 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.EarnApi(api_client) +place_dual_investment_order = gate_api.PlaceDualInvestmentOrder() # PlaceDualInvestmentOrder | + +try: + # Place Dual Investment order + api_instance.place_dual_order(place_dual_investment_order) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->place_dual_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **place_dual_investment_order** | [**PlaceDualInvestmentOrder**](PlaceDualInvestmentOrder.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_structured_products** +> list[StructuredGetProjectList] list_structured_products(status, type=type, page=page, limit=limit) + +Structured Product List + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) +status = 'in_process' # str | Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish +type = 'BullishSharkFin' # str | Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) + +try: + # Structured Product List + api_response = api_instance.list_structured_products(status, type=type, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->list_structured_products: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish | + **type** | **str**| Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[StructuredGetProjectList]**](StructuredGetProjectList.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_structured_orders** +> list[StructuredOrderList] list_structured_orders(_from=_from, to=to, page=page, limit=limit) + +Structured Product Order List + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) + +try: + # Structured Product Order List + api_response = api_instance.list_structured_orders(_from=_from, to=to, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->list_structured_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[StructuredOrderList]**](StructuredOrderList.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **place_structured_order** +> place_structured_order(structured_buy) + +Place Structured Product 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.EarnApi(api_client) +structured_buy = gate_api.StructuredBuy() # StructuredBuy | + +try: + # Place Structured Product Order + api_instance.place_structured_order(structured_buy) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->place_structured_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **structured_buy** | [**StructuredBuy**](StructuredBuy.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md new file mode 100644 index 0000000..b2f546d --- /dev/null +++ b/docs/EarnUniApi.md @@ -0,0 +1,763 @@ +# gate_api.EarnUniApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending +[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending +[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders +[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem +[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order +[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending +[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency +[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records +[**switch_interest_reinvest**](EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle +[**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status +[**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart + + +# **list_uni_currencies** +> list[UniCurrency] list_uni_currencies() + +List currencies for lending + +### 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.EarnUniApi(api_client) + +try: + # List currencies for lending + api_response = api_instance.list_uni_currencies() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->list_uni_currencies: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[UniCurrency]**](UniCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_uni_currency** +> UniCurrency get_uni_currency(currency) + +Get currency detail for lending + +### 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.EarnUniApi(api_client) +currency = 'btc' # str | Currency + +try: + # Get currency detail for lending + api_response = api_instance.get_uni_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 EarnUniApi->get_uni_currency: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | + +### Return type + +[**UniCurrency**](UniCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_user_uni_lends** +> list[UniLend] list_user_uni_lends(currency=currency, page=page, limit=limit) + +List user's lending 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.EarnUniApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) + +try: + # List user's lending orders + api_response = api_instance.list_user_uni_lends(currency=currency, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->list_user_uni_lends: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +[**list[UniLend]**](UniLend.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_uni_lend** +> create_uni_lend(create_uni_lend) + +Lend or redeem + +`Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +create_uni_lend = gate_api.CreateUniLend() # CreateUniLend | + +try: + # Lend or redeem + api_instance.create_uni_lend(create_uni_lend) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->create_uni_lend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_uni_lend** | [**CreateUniLend**](CreateUniLend.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Operated 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) + +# **change_uni_lend** +> change_uni_lend(patch_uni_lend) + +Amend lending order + +Currently only supports amending the minimum interest rate (hour) + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +patch_uni_lend = gate_api.PatchUniLend() # PatchUniLend | + +try: + # Amend lending order + api_instance.change_uni_lend(patch_uni_lend) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->change_uni_lend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patch_uni_lend** | [**PatchUniLend**](PatchUniLend.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Updated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_uni_lend_records** +> list[UniLendRecord] list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) + +List records of lending + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +type = 'lend' # str | type: lend - lend, redeem - redeem (optional) + +try: + # List records of lending + api_response = api_instance.list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->list_uni_lend_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **type** | **str**| type: lend - lend, redeem - redeem | [optional] + +### Return type + +[**list[UniLendRecord]**](UniLendRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_uni_interest** +> UniLendInterest get_uni_interest(currency) + +Get the user's total interest income of specified currency + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +currency = 'btc' # str | Currency + +try: + # Get the user's total interest income of specified currency + api_response = api_instance.get_uni_interest(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->get_uni_interest: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | + +### Return type + +[**UniLendInterest**](UniLendInterest.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_uni_interest_records** +> list[UniInterestRecord] list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) + +List interest records + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # List interest records + api_response = api_instance.list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->list_uni_interest_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[UniInterestRecord]**](UniInterestRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **switch_interest_reinvest** +> switch_interest_reinvest(uni_interest_mode) + +Set interest reinvestment toggle + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +uni_interest_mode = gate_api.UniInterestMode() # UniInterestMode | + +try: + # Set interest reinvestment toggle + api_instance.switch_interest_reinvest(uni_interest_mode) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->switch_interest_reinvest: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uni_interest_mode** | [**UniInterestMode**](UniInterestMode.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 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_uni_interest_status** +> UniCurrencyInterest get_uni_interest_status(currency) + +query currency interest compounding status + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +currency = 'btc' # str | Currency + +try: + # query currency interest compounding status + api_response = api_instance.get_uni_interest_status(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->get_uni_interest_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | + +### Return type + +[**UniCurrencyInterest**](UniCurrencyInterest.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_uni_chart** +> list[InlineResponse200] list_uni_chart(_from, to, asset) + +UniLoan currency annualized trend chart + +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:22+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) +_from = 1719763200 # int | Start timestamp, unit s, maximum span of 30 days +to = 1722441600 # int | End timestamp, unit s, maximum span of 30 days +asset = 'BTC' # str | Currency name + +try: + # UniLoan currency annualized trend chart + api_response = api_instance.list_uni_chart(_from, to, asset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->list_uni_chart: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_from** | **int**| Start timestamp, unit s, maximum span of 30 days | + **to** | **int**| End timestamp, unit s, maximum span of 30 days | + **asset** | **str**| Currency name | + +### Return type + +[**list[InlineResponse200]**](InlineResponse200.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:22+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@li.org> Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Eth2RateList.md b/docs/Eth2RateList.md new file mode 100644 index 0000000..707cf68 --- /dev/null +++ b/docs/Eth2RateList.md @@ -0,0 +1,12 @@ +# Eth2RateList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_time** | **int** | Date and Time Stamp | [optional] +**date** | **str** | Date | [optional] +**rate** | **str** | percentage | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Eth2Swap.md b/docs/Eth2Swap.md new file mode 100644 index 0000000..a5ede25 --- /dev/null +++ b/docs/Eth2Swap.md @@ -0,0 +1,12 @@ +# Eth2Swap + +ETH2 Staking +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**side** | **str** | 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) | +**amount** | **str** | amount | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlashSwapApi.md b/docs/FlashSwapApi.md new file mode 100644 index 0000000..b31ff16 --- /dev/null +++ b/docs/FlashSwapApi.md @@ -0,0 +1,357 @@ +# gate_api.FlashSwapApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_flash_swap_currency_pair**](FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap +[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders +[**create_flash_swap_order**](FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order +[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail +[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview + + +# **list_flash_swap_currency_pair** +> list[FlashSwapCurrencyPair] list_flash_swap_currency_pair(currency=currency, page=page, limit=limit) + +List All Supported Currency Pairs In Flash Swap + +`BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FlashSwapApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 1000 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 1000 (optional) (default to 1000) + +try: + # List All Supported Currency Pairs In Flash Swap + api_response = api_instance.list_flash_swap_currency_pair(currency=currency, 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 FlashSwapApi->list_flash_swap_currency_pair: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 1000 | [optional] [default to 1000] + +### Return type + +[**list[FlashSwapCurrencyPair]**](FlashSwapCurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_flash_swap_orders** +> list[FlashSwapOrder] list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) + +List all flash swap orders + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FlashSwapApi(api_client) +status = 1 # int | Flash swap order status `1` - success `2` - failure (optional) +sell_currency = 'BTC' # str | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) +buy_currency = 'BTC' # str | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) +reverse = true # bool | If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) + +try: + # List all flash swap orders + api_response = api_instance.list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FlashSwapApi->list_flash_swap_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **int**| Flash swap order status `1` - success `2` - failure | [optional] + **sell_currency** | **str**| Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] + **buy_currency** | **str**| Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] + **reverse** | **bool**| If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] + +### Return type + +[**list[FlashSwapOrder]**](FlashSwapOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_flash_swap_order** +> FlashSwapOrder create_flash_swap_order(flash_swap_order_request) + +Create a flash swap order + +Initiate a flash swap preview in advance because order creation requires a preview result + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FlashSwapApi(api_client) +flash_swap_order_request = gate_api.FlashSwapOrderRequest() # FlashSwapOrderRequest | + +try: + # Create a flash swap order + api_response = api_instance.create_flash_swap_order(flash_swap_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 FlashSwapApi->create_flash_swap_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flash_swap_order_request** | [**FlashSwapOrderRequest**](FlashSwapOrderRequest.md)| | + +### Return type + +[**FlashSwapOrder**](FlashSwapOrder.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** | The flash swap order is created successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_flash_swap_order** +> FlashSwapOrder get_flash_swap_order(order_id) + +Get a single flash swap order's detail + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FlashSwapApi(api_client) +order_id = 1 # int | Flash swap order ID + +try: + # Get a single flash swap order's detail + api_response = api_instance.get_flash_swap_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 FlashSwapApi->get_flash_swap_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Flash swap order ID | + +### Return type + +[**FlashSwapOrder**](FlashSwapOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **preview_flash_swap_order** +> FlashSwapOrderPreview preview_flash_swap_order(flash_swap_preview_request) + +Initiate a flash swap order preview + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FlashSwapApi(api_client) +flash_swap_preview_request = gate_api.FlashSwapPreviewRequest() # FlashSwapPreviewRequest | + +try: + # Initiate a flash swap order preview + api_response = api_instance.preview_flash_swap_order(flash_swap_preview_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 FlashSwapApi->preview_flash_swap_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flash_swap_preview_request** | [**FlashSwapPreviewRequest**](FlashSwapPreviewRequest.md)| | + +### Return type + +[**FlashSwapOrderPreview**](FlashSwapOrderPreview.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The flash swap order successfully previewed | - | + +[[Back to top]](#) [[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/FlashSwapCurrencyPair.md b/docs/FlashSwapCurrencyPair.md new file mode 100644 index 0000000..586c0a3 --- /dev/null +++ b/docs/FlashSwapCurrencyPair.md @@ -0,0 +1,17 @@ +# FlashSwapCurrencyPair + +List all supported currencies in flash swap +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). | [optional] [readonly] +**sell_currency** | **str** | The currency to be sold | [optional] [readonly] +**buy_currency** | **str** | The currency to be bought | [optional] [readonly] +**sell_min_amount** | **str** | The minimum quantity required for selling | [optional] [readonly] +**sell_max_amount** | **str** | The maximum quantity allowed for selling | [optional] [readonly] +**buy_min_amount** | **str** | The minimum quantity required for buying | [optional] [readonly] +**buy_max_amount** | **str** | The maximum quantity allowed for buying | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlashSwapOrder.md b/docs/FlashSwapOrder.md new file mode 100644 index 0000000..bde41a4 --- /dev/null +++ b/docs/FlashSwapOrder.md @@ -0,0 +1,19 @@ +# FlashSwapOrder + +Flash swap order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Flash swap order ID | [optional] [readonly] +**create_time** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**user_id** | **int** | User ID | [optional] [readonly] +**sell_currency** | **str** | Currency to sell | [optional] [readonly] +**sell_amount** | **str** | Amount to sell | [optional] [readonly] +**buy_currency** | **str** | Currency to buy | [optional] [readonly] +**buy_amount** | **str** | Amount to buy | [optional] [readonly] +**price** | **str** | Price | [optional] [readonly] +**status** | **int** | Flash swap order status `1` - success `2` - failure | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlashSwapOrderPreview.md b/docs/FlashSwapOrderPreview.md new file mode 100644 index 0000000..578ba75 --- /dev/null +++ b/docs/FlashSwapOrderPreview.md @@ -0,0 +1,16 @@ +# FlashSwapOrderPreview + +Initiate a flash swap order preview +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**preview_id** | **str** | Preview result ID | [optional] +**sell_currency** | **str** | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] +**sell_amount** | **str** | Amount to sell | [optional] +**buy_currency** | **str** | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] +**buy_amount** | **str** | Amount to buy | [optional] +**price** | **str** | 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/FlashSwapOrderRequest.md b/docs/FlashSwapOrderRequest.md new file mode 100644 index 0000000..a3e6f8f --- /dev/null +++ b/docs/FlashSwapOrderRequest.md @@ -0,0 +1,15 @@ +# FlashSwapOrderRequest + +Parameters of flash swap order creation +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**preview_id** | **str** | Preview result ID | +**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. | +**sell_amount** | **str** | Amount to sell (based on the preview result) | +**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. | +**buy_amount** | **str** | Amount to buy (based on the preview result) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlashSwapPreviewRequest.md b/docs/FlashSwapPreviewRequest.md new file mode 100644 index 0000000..ea14e67 --- /dev/null +++ b/docs/FlashSwapPreviewRequest.md @@ -0,0 +1,14 @@ +# FlashSwapPreviewRequest + +Parameters of flash swap order creation +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. | +**sell_amount** | **str** | Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] +**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. | +**buy_amount** | **str** | Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FundingAccount.md b/docs/FundingAccount.md new file mode 100644 index 0000000..f84f8fe --- /dev/null +++ b/docs/FundingAccount.md @@ -0,0 +1,14 @@ +# FundingAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**available** | **str** | Available assets to lend, which is identical to spot account `available` | [optional] +**locked** | **str** | Locked amount. i.e. amount in `open` loans | [optional] +**lent** | **str** | Outstanding loan amount yet to be repaid | [optional] +**total_lent** | **str** | Amount used for lending. total_lent = lent + locked | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FundingRateRecord.md b/docs/FundingRateRecord.md new file mode 100644 index 0000000..add60cd --- /dev/null +++ b/docs/FundingRateRecord.md @@ -0,0 +1,11 @@ +# FundingRateRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**t** | **int** | Unix timestamp in seconds | [optional] +**r** | **str** | Funding 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/FutureCancelOrderResult.md b/docs/FutureCancelOrderResult.md new file mode 100644 index 0000000..a27e9e6 --- /dev/null +++ b/docs/FutureCancelOrderResult.md @@ -0,0 +1,14 @@ +# FutureCancelOrderResult + +Order cancellation result +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Order ID | [optional] +**user_id** | **int** | User ID | [optional] +**succeeded** | **bool** | Whether cancellation succeeded | [optional] +**message** | **str** | Error message when failed to cancel the order; empty if succeeded | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md new file mode 100644 index 0000000..9641bf8 --- /dev/null +++ b/docs/FuturesAccount.md @@ -0,0 +1,34 @@ +# FuturesAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **str** | total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) | [optional] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] +**position_margin** | **str** | Position margin | [optional] +**order_margin** | **str** | Order margin of unfinished orders | [optional] +**available** | **str** | The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) | [optional] +**point** | **str** | POINT amount | [optional] +**currency** | **str** | Settle currency | [optional] +**in_dual_mode** | **bool** | Whether dual mode is enabled | [optional] +**enable_credit** | **bool** | Whether portfolio margin account mode is enabled | [optional] +**position_initial_margin** | **str** | Initial margin position, applicable to the portfolio margin account model | [optional] +**maintenance_margin** | **str** | The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model | [optional] +**bonus** | **str** | Perpetual Contract Bonus | [optional] +**enable_evolved_classic** | **bool** | Classic account margin mode, true-new mode, false-old mode | [optional] +**cross_order_margin** | **str** | Full -warehouse hanging order deposit, suitable for the new classic account margin model | [optional] +**cross_initial_margin** | **str** | The initial security deposit of the full warehouse is suitable for the new classic account margin model | [optional] +**cross_maintenance_margin** | **str** | Maintain deposit in full warehouse, suitable for new classic account margin models | [optional] +**cross_unrealised_pnl** | **str** | The full warehouse does not achieve profit and loss, suitable for the new classic account margin model | [optional] +**cross_available** | **str** | Full warehouse available amount, suitable for the new classic account margin model | [optional] +**cross_margin_balance** | **str** | Full margin balance, suitable for the new classic account margin model | [optional] +**cross_mmr** | **str** | Maintain margin ratio for the full position, suitable for the new classic account margin model | [optional] +**cross_imr** | **str** | The initial margin rate of the full position is suitable for the new classic account margin model | [optional] +**isolated_position_margin** | **str** | Ware -position margin, suitable for the new classic account margin model | [optional] +**enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode | [optional] +**margin_mode** | **int** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional] +**history** | [**FuturesAccountHistory**](FuturesAccountHistory.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesAccountBook.md b/docs/FuturesAccountBook.md new file mode 100644 index 0000000..eebf328 --- /dev/null +++ b/docs/FuturesAccountBook.md @@ -0,0 +1,17 @@ +# FuturesAccountBook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **float** | Change time | [optional] +**change** | **str** | Change amount | [optional] +**balance** | **str** | Balance after change | [optional] +**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] +**text** | **str** | Comment | [optional] +**contract** | **str** | Futures contract, the field is only available for data after 2023-10-30. | [optional] +**trade_id** | **str** | trade id | [optional] +**id** | **str** | 账户变更记录 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/FuturesAccountHistory.md b/docs/FuturesAccountHistory.md new file mode 100644 index 0000000..202fdc6 --- /dev/null +++ b/docs/FuturesAccountHistory.md @@ -0,0 +1,20 @@ +# FuturesAccountHistory + +Statistical data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dnw** | **str** | total amount of deposit and withdraw | [optional] +**pnl** | **str** | total amount of trading profit and loss | [optional] +**fee** | **str** | total amount of fee | [optional] +**refr** | **str** | total amount of referrer rebates | [optional] +**fund** | **str** | total amount of funding costs | [optional] +**point_dnw** | **str** | total amount of point deposit and withdraw | [optional] +**point_fee** | **str** | total amount of point fee | [optional] +**point_refr** | **str** | total amount of referrer rebates of point fee | [optional] +**bonus_dnw** | **str** | total amount of perpetual contract bonus transfer | [optional] +**bonus_offset** | **str** | total amount of perpetual contract bonus deduction | [optional] + +[[Back to Model list]](../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 new file mode 100644 index 0000000..6021286 --- /dev/null +++ b/docs/FuturesApi.md @@ -0,0 +1,3447 @@ +# gate_api.FuturesApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts +[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract +[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book +[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history +[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks +[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line +[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers +[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history +[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history +[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats +[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents +[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history +[**list_futures_risk_limit_tiers**](FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers +[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account +[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book +[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user +[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position +[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin +[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage +[**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode +[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit +[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode +[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode +[**update_dual_mode_position_margin**](FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode +[**update_dual_mode_position_leverage**](FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode +[**update_dual_mode_position_risk_limit**](FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode +[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders +[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order +[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched +[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range +[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders +[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order +[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order +[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order +[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history +[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range +[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history +[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history +[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History +[**countdown_cancel_all_futures**](FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders +[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates +[**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list +[**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs +[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders +[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order +[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders +[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order +[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order + + +# **list_futures_contracts** +> list[Contract] list_futures_contracts(settle, limit=limit, offset=offset) + +List all futures contracts + +### 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 to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # List all futures contracts + api_response = api_instance.list_futures_contracts(settle, 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: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_futures_contract** +> Contract get_futures_contract(settle, contract) + +Get a single contract + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract + +try: + # Get a single contract + api_response = api_instance.get_futures_contract(settle, contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->get_futures_contract: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + +### Return type + +[**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** | Contract information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_order_book** +> FuturesOrderBook list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) + +Futures order book + +Bids will be sorted by price from high to low, while asks sorted reversely + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) +with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) + +try: + # Futures order book + api_response = api_instance.list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_order_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] + **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] + +### Return type + +[**FuturesOrderBook**](FuturesOrderBook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order book retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_trades** +> list[FuturesTrade] list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) + +Futures trading history + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional) +_from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) +to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional) + +try: + # Futures trading history + api_response = api_instance.list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional] + **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] + **to** | **int**| Specify end time in Unix seconds, default to current time | [optional] + +### Return type + +[**list[FuturesTrade]**](FuturesTrade.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_candlesticks** +> list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) + +Get futures candlesticks + +Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) +to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days (optional) (default to '5m') + +try: + # Get futures candlesticks + api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) + 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_candlesticks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] + **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days | [optional] [default to '5m'] + +### Return type + +[**list[FuturesCandlestick]**](FuturesCandlestick.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_premium_index** +> list[FuturesPremiumIndex] list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) + +Premium Index K-Line + +Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) +to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +interval = '5m' # str | Interval time between data points (optional) (default to '5m') + +try: + # Premium Index K-Line + api_response = api_instance.list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_premium_index: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] + **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **interval** | **str**| Interval time between data points | [optional] [default to '5m'] + +### Return type + +[**list[FuturesPremiumIndex]**](FuturesPremiumIndex.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_tickers** +> list[FuturesTicker] list_futures_tickers(settle, contract=contract) + +List futures tickers + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) + +try: + # List futures tickers + api_response = api_instance.list_futures_tickers(settle, contract=contract) + 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_tickers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + +### Return type + +[**list[FuturesTicker]**](FuturesTicker.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_funding_rate_history** +> list[FundingRateRecord] list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) + +Funding rate history + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # Funding rate history + api_response = api_instance.list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_funding_rate_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[FundingRateRecord]**](FundingRateRecord.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | History retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_insurance_ledger** +> list[InsuranceRecord] list_futures_insurance_ledger(settle, limit=limit) + +Futures insurance balance history + +### 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 to be returned in a single list (optional) (default to 100) + +try: + # Futures insurance balance history + api_response = api_instance.list_futures_insurance_ledger(settle, 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 FuturesApi->list_futures_insurance_ledger: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[InsuranceRecord]**](InsuranceRecord.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_contract_stats** +> list[ContractStat] list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit) + +Futures stats + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +_from = 1604561000 # int | Start timestamp (optional) +interval = '5m' # str | (optional) (default to '5m') +limit = 30 # int | (optional) (default to 30) + +try: + # Futures stats + api_response = api_instance.list_contract_stats(settle, contract, _from=_from, interval=interval, 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 FuturesApi->list_contract_stats: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **_from** | **int**| Start timestamp | [optional] + **interval** | **str**| | [optional] [default to '5m'] + **limit** | **int**| | [optional] [default to 30] + +### Return type + +[**list[ContractStat]**](ContractStat.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_index_constituents** +> FuturesIndexConstituents get_index_constituents(settle, index) + +Get index constituents + +### 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 +index = 'BTC_USDT' # str | Index name + +try: + # Get index constituents + api_response = api_instance.get_index_constituents(settle, index) + 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_index_constituents: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **index** | **str**| Index name | + +### Return type + +[**FuturesIndexConstituents**](FuturesIndexConstituents.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_liquidated_orders** +> list[FuturesLiqOrder] list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit) + +Retrieve liquidation history + +Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) + +try: + # Retrieve liquidation history + api_response = api_instance.list_liquidated_orders(settle, contract=contract, _from=_from, to=to, 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 FuturesApi->list_liquidated_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[FuturesLiqOrder]**](FuturesLiqOrder.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_risk_limit_tiers** +> list[FuturesLimitRiskTiers] list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) + +List risk limit tiers + +When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # List risk limit tiers + api_response = api_instance.list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_risk_limit_tiers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[FuturesLimitRiskTiers]**](FuturesLimitRiskTiers.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_accounts** +> FuturesAccount list_futures_accounts(settle) + +Query futures account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency + +try: + # Query futures account + api_response = api_instance.list_futures_accounts(settle) + 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_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + +### Return type + +[**FuturesAccount**](FuturesAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_account_book** +> list[FuturesAccountBook] list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) + +Query account book + +If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. + +### 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 +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction (optional) + +try: + # Query account book + api_response = api_instance.list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_account_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] + +### Return type + +[**list[FuturesAccountBook]**](FuturesAccountBook.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_positions** +> list[Position] list_positions(settle, holding=holding, limit=limit, offset=offset) + +List all positions of a user + +### 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 +holding = true # bool | Return only real positions - true, return all - false. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # List all positions of a user + api_response = api_instance.list_positions(settle, holding=holding, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_positions: %s\n" % e) +``` + +### Parameters + +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 to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[Position]**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_position** +> Position get_position(settle, contract) + +Get single position + +### 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 +contract = 'BTC_USDT' # str | Futures contract + +try: + # Get single position + api_response = api_instance.get_position(settle, contract) + 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_position: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_position_margin** +> Position update_position_margin(settle, contract, change) + +Update position 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.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. + +try: + # Update position margin + api_response = api_instance.update_position_margin(settle, contract, change) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->update_position_margin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_position_leverage** +> Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) + +Update position leverage + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +leverage = '10' # str | New position leverage +cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional) + +try: + # Update position leverage + api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_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 FuturesApi->update_position_leverage: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **leverage** | **str**| New position leverage | + **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional] + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_position_cross_mode** +> Position update_position_cross_mode(settle, inline_object) + +Switch to the full position-by-store mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +inline_object = gate_api.InlineObject() # InlineObject | + +try: + # Switch to the full position-by-store mode + api_response = api_instance.update_position_cross_mode(settle, inline_object) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->update_position_cross_mode: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **inline_object** | [**InlineObject**](InlineObject.md)| | + +### Return type + +[**Position**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_position_risk_limit** +> Position update_position_risk_limit(settle, contract, risk_limit) + +Update position risk limit + +### 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 +contract = 'BTC_USDT' # str | Futures contract +risk_limit = '1000000' # str | New Risk Limit Value + +try: + # Update position risk limit + api_response = api_instance.update_position_risk_limit(settle, contract, risk_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 FuturesApi->update_position_risk_limit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **risk_limit** | **str**| New Risk Limit Value | + +### Return type + +[**Position**](Position.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** | Position information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_dual_mode** +> FuturesAccount set_dual_mode(settle, dual_mode) + +Enable or disable dual mode + +Before setting dual mode, make sure all positions are closed and no orders are open + +### 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 +dual_mode = true # bool | Whether to enable dual mode + +try: + # Enable or disable dual mode + api_response = api_instance.set_dual_mode(settle, dual_mode) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->set_dual_mode: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **dual_mode** | **bool**| Whether to enable dual mode | + +### Return type + +[**FuturesAccount**](FuturesAccount.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** | Updated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_dual_mode_position** +> list[Position] get_dual_mode_position(settle, contract) + +Retrieve position detail in dual mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract + +try: + # Retrieve position detail in dual mode + api_response = api_instance.get_dual_mode_position(settle, contract) + 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_dual_mode_position: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + +### Return type + +[**list[Position]**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_dual_mode_position_margin** +> list[Position] update_dual_mode_position_margin(settle, contract, change, dual_side) + +Update position margin in dual mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. +dual_side = 'dual_long' # str | Long or short position + +try: + # Update position margin in dual mode + api_response = api_instance.update_dual_mode_position_margin(settle, contract, change, dual_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->update_dual_mode_position_margin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | + **dual_side** | **str**| Long or short position | + +### Return type + +[**list[Position]**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_dual_mode_position_leverage** +> list[Position] update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) + +Update position leverage in dual mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +leverage = '10' # str | New position leverage +cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional) + +try: + # Update position leverage in dual mode + api_response = api_instance.update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_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 FuturesApi->update_dual_mode_position_leverage: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **leverage** | **str**| New position leverage | + **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional] + +### Return type + +[**list[Position]**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_dual_mode_position_risk_limit** +> list[Position] update_dual_mode_position_risk_limit(settle, contract, risk_limit) + +Update position risk limit in dual mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +risk_limit = '1000000' # str | New Risk Limit Value + +try: + # Update position risk limit in dual mode + api_response = api_instance.update_dual_mode_position_risk_limit(settle, contract, risk_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 FuturesApi->update_dual_mode_position_risk_limit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **risk_limit** | **str**| New Risk Limit Value | + +### Return type + +[**list[Position]**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_futures_orders** +> list[FuturesOrder] list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) + +List futures orders + +- Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. + +### Example + +* 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 +status = 'open' # str | Only list the orders with this status +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) + +try: + # List futures orders + api_response = api_instance.list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_futures_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **status** | **str**| Only list the orders with this status | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + +### Return type + +[**list[FuturesOrder]**](FuturesOrder.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_futures_order** +> FuturesOrder create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) + +Create a futures order + +- When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +futures_order = gate_api.FuturesOrder() # FuturesOrder | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Create a futures order + api_response = api_instance.create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->create_futures_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**FuturesOrder**](FuturesOrder.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 details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_futures_orders** +> list[FuturesOrder] cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side) + +Cancel all `open` orders matched + +Zero-filled order cannot be retrieved 10 minutes after order cancellation + +### 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 +contract = 'BTC_USDT' # str | Futures contract +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) +side = 'ask' # str | Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask (optional) + +try: + # Cancel all `open` orders matched + api_response = api_instance.cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, 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->cancel_futures_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + **side** | **str**| Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask | [optional] + +### Return type + +[**list[FuturesOrder]**](FuturesOrder.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** | All orders matched 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) + +# **get_orders_with_time_range** +> list[FuturesOrder] get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) + +List Futures Orders By Time Range + +### 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 +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # List Futures Orders By Time Range + api_response = api_instance.get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->get_orders_with_time_range: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[FuturesOrder]**](FuturesOrder.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_batch_futures_order** +> list[BatchFuturesOrder] create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) + +Create a batch of futures orders + +- Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +futures_order = [gate_api.FuturesOrder()] # list[FuturesOrder] | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Create a batch of futures orders + api_response = api_instance.create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->create_batch_futures_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **futures_order** | [**list[FuturesOrder]**](FuturesOrder.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**list[BatchFuturesOrder]**](BatchFuturesOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request is completed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_futures_order** +> FuturesOrder get_futures_order(settle, order_id) + +Get a single order + +- Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. + +### Example + +* 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 +order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. + +try: + # Get a single order + api_response = api_instance.get_futures_order(settle, 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 FuturesApi->get_futures_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + +### Return type + +[**FuturesOrder**](FuturesOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **amend_futures_order** +> FuturesOrder amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) + +Amend an 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 +order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. +futures_order_amendment = gate_api.FuturesOrderAmendment() # FuturesOrderAmendment | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Amend an order + api_response = api_instance.amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->amend_futures_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **futures_order_amendment** | [**FuturesOrderAmendment**](FuturesOrderAmendment.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**FuturesOrder**](FuturesOrder.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 details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_futures_order** +> FuturesOrder cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) + +Cancel a single 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 +order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Cancel a single order + api_response = api_instance.cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->cancel_futures_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**FuturesOrder**](FuturesOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_trades** +> list[MyFuturesTrade] get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) + +List personal trading history + +By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. + +### Example + +* 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 +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +order = 12345 # int | Futures order ID, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. (optional) + +try: + # List personal trading history + api_response = api_instance.get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->get_my_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **order** | **int**| Futures order ID, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. | [optional] + +### Return type + +[**list[MyFuturesTrade]**](MyFuturesTrade.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_trades_with_time_range** +> list[MyFuturesTradeTimeRange] get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) + +List personal trading history by time range + +### 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 +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +role = 'maker' # str | Query role, maker or taker. (optional) + +try: + # List personal trading history by time range + api_response = api_instance.get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->get_my_trades_with_time_range: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **role** | **str**| Query role, maker or taker. | [optional] + +### Return type + +[**list[MyFuturesTradeTimeRange]**](MyFuturesTradeTimeRange.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 | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_position_close** +> list[PositionClose] list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) + +List position close history + +### 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 +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +side = 'short' # str | Query side. long or shot (optional) +pnl = 'profit' # str | Query profit or loss (optional) + +try: + # List position close history + api_response = api_instance.list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_position_close: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **side** | **str**| Query side. long or shot | [optional] + **pnl** | **str**| Query profit or loss | [optional] + +### Return type + +[**list[PositionClose]**](PositionClose.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_liquidates** +> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, at=at) + +List liquidation history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +at = 0 # int | Specify a liquidation timestamp (optional) (default to 0) + +try: + # List liquidation history + api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, at=at) + 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_liquidates: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0] + +### Return type + +[**list[FuturesLiquidate]**](FuturesLiquidate.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_auto_deleverages** +> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, at=at) + +List Auto-Deleveraging History + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +at = 0 # int | Specify an auto-deleveraging timestamp (optional) (default to 0) + +try: + # List Auto-Deleveraging History + api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, at=at) + 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_auto_deleverages: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **at** | **int**| Specify an auto-deleveraging timestamp | [optional] [default to 0] + +### Return type + +[**list[FuturesAutoDeleverage]**](FuturesAutoDeleverage.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **countdown_cancel_all_futures** +> TriggerTime countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) + +Countdown cancel orders + +When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. + +### 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 +countdown_cancel_all_futures_task = gate_api.CountdownCancelAllFuturesTask() # CountdownCancelAllFuturesTask | + +try: + # Countdown cancel orders + api_response = api_instance.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->countdown_cancel_all_futures: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **countdown_cancel_all_futures_task** | [**CountdownCancelAllFuturesTask**](CountdownCancelAllFuturesTask.md)| | + +### Return type + +[**TriggerTime**](TriggerTime.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Set countdown successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_futures_fee** +> dict(str, FuturesFee) get_futures_fee(settle, contract=contract) + +Query user trading fee rates + +### 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 +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) + +try: + # Query user trading fee rates + api_response = api_instance.get_futures_fee(settle, contract=contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->get_futures_fee: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + +### Return type + +[**dict(str, FuturesFee)**](FuturesFee.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_batch_future_orders** +> list[FutureCancelOrderResult] cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) + +Cancel a batch of orders with an ID list + +Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +request_body = ['request_body_example'] # list[str] | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Cancel a batch of orders with an ID list + api_response = api_instance.cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->cancel_batch_future_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **request_body** | [**list[str]**](str.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**list[FutureCancelOrderResult]**](FutureCancelOrderResult.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order cancellation operation completed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **amend_batch_future_orders** +> list[BatchFuturesOrder] amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) + +Batch modify orders with specified IDs + +You can specify multiple different order IDs. You can only modify up to 10 orders in one request. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +batch_amend_order_req = [gate_api.BatchAmendOrderReq()] # list[BatchAmendOrderReq] | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Batch modify orders with specified IDs + api_response = api_instance.amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->amend_batch_future_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **batch_amend_order_req** | [**list[BatchAmendOrderReq]**](BatchAmendOrderReq.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**list[BatchFuturesOrder]**](BatchFuturesOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request is completed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_price_triggered_orders** +> list[FuturesPriceTriggeredOrder] list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) + +List All Price-triggered 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 +status = 'status_example' # str | Only list the orders with this status +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # List All Price-triggered Orders + api_response = api_instance.list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->list_price_triggered_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **status** | **str**| Only list the orders with this status | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_price_triggered_order** +> TriggerOrderResponse create_price_triggered_order(settle, futures_price_triggered_order) + +Create a price-triggered 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 +futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | + +try: + # Create a price-triggered order + api_response = api_instance.create_price_triggered_order(settle, futures_price_triggered_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->create_price_triggered_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | + +### Return type + +[**TriggerOrderResponse**](TriggerOrderResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_price_triggered_order_list** +> list[FuturesPriceTriggeredOrder] cancel_price_triggered_order_list(settle, contract=contract) + +Cancel All Price-triggered 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 +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) + +try: + # Cancel All Price-triggered Orders + api_response = api_instance.cancel_price_triggered_order_list(settle, contract=contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->cancel_price_triggered_order_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + +### Return type + +[**list[FuturesPriceTriggeredOrder]**](FuturesPriceTriggeredOrder.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 cancellation request accepted. Query order status by listing orders | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_price_triggered_order** +> FuturesPriceTriggeredOrder get_price_triggered_order(settle, order_id) + +Get a price-triggered order + +### 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 +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID + +try: + # Get a price-triggered order + api_response = api_instance.get_price_triggered_order(settle, 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 FuturesApi->get_price_triggered_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_price_triggered_order** +> FuturesPriceTriggeredOrder cancel_price_triggered_order(settle, order_id) + +cancel a price-triggered order + +### 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 +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID + +try: + # cancel a price-triggered order + api_response = api_instance.cancel_price_triggered_order(settle, 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 FuturesApi->cancel_price_triggered_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.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** | Auto order detail | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FuturesAutoDeleverage.md b/docs/FuturesAutoDeleverage.md new file mode 100644 index 0000000..ae4759c --- /dev/null +++ b/docs/FuturesAutoDeleverage.md @@ -0,0 +1,19 @@ +# FuturesAutoDeleverage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | Automatic deleveraging time | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**order_id** | **int** | Order ID. Order IDs before 2023-02-20 are null | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**leverage** | **str** | Position leverage | [optional] [readonly] +**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional] [readonly] +**entry_price** | **str** | Average entry price | [optional] [readonly] +**fill_price** | **str** | Average fill price | [optional] [readonly] +**trade_size** | **int** | Trading size | [optional] [readonly] +**position_size** | **int** | Positions after auto-deleveraging | [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/FuturesBatchAmendOrderRequest.md b/docs/FuturesBatchAmendOrderRequest.md new file mode 100644 index 0000000..69bc53f --- /dev/null +++ b/docs/FuturesBatchAmendOrderRequest.md @@ -0,0 +1,15 @@ +# FuturesBatchAmendOrderRequest + +Modify contract order parameters +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] +**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] +**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] +**price** | **str** | New order price. | [optional] +**amend_text** | **str** | Custom info during amending 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/FuturesCandlestick.md b/docs/FuturesCandlestick.md new file mode 100644 index 0000000..202685d --- /dev/null +++ b/docs/FuturesCandlestick.md @@ -0,0 +1,17 @@ +# FuturesCandlestick + +data point in every timestamp +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**t** | **float** | Unix timestamp in seconds | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] +**c** | **str** | Close price (quote currency) | [optional] +**h** | **str** | Highest price (quote currency) | [optional] +**l** | **str** | Lowest price (quote currency) | [optional] +**o** | **str** | Open price (quote currency) | [optional] +**sum** | **str** | Trading volume (unit: Quote currency) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesFee.md b/docs/FuturesFee.md new file mode 100644 index 0000000..383ec9e --- /dev/null +++ b/docs/FuturesFee.md @@ -0,0 +1,12 @@ +# FuturesFee + +The returned result is a map type, where the key represents the market and the value represents the taker and maker fee rates. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**taker_fee** | **str** | Taker fee | [optional] [readonly] +**maker_fee** | **str** | maker fee | [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/FuturesIndexConstituents.md b/docs/FuturesIndexConstituents.md new file mode 100644 index 0000000..7564bbe --- /dev/null +++ b/docs/FuturesIndexConstituents.md @@ -0,0 +1,11 @@ +# FuturesIndexConstituents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **str** | Index name | [optional] [readonly] +**constituents** | [**list[IndexConstituent]**](IndexConstituent.md) | Constituents | [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/FuturesInitialOrder.md b/docs/FuturesInitialOrder.md new file mode 100644 index 0000000..ff000b1 --- /dev/null +++ b/docs/FuturesInitialOrder.md @@ -0,0 +1,19 @@ +# FuturesInitialOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contract** | **str** | Futures contract | +**size** | **int** | Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 | [optional] +**price** | **str** | Order price. Set to 0 to use market price | +**close** | **bool** | When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false | [optional] [default to False] +**tif** | **str** | Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc'] +**text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] +**reduce_only** | **bool** | When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions | [optional] [default to False] +**auto_size** | **str** | Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size | [optional] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_close** | **bool** | Is the order to close position | [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/FuturesLimitRiskTiers.md b/docs/FuturesLimitRiskTiers.md new file mode 100644 index 0000000..fec6e52 --- /dev/null +++ b/docs/FuturesLimitRiskTiers.md @@ -0,0 +1,16 @@ +# FuturesLimitRiskTiers + +Retrieve risk limit configurations for different tiers under a specified contract. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tier** | **int** | Tier | [optional] +**risk_limit** | **str** | Position risk limit | [optional] +**initial_rate** | **str** | Initial margin rate | [optional] +**maintenance_rate** | **str** | Maintenance margin rate | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**contract** | **str** | Markets, visible only during market pagination requests | [optional] + +[[Back to Model list]](../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 new file mode 100644 index 0000000..daf3c5e --- /dev/null +++ b/docs/FuturesLiqOrder.md @@ -0,0 +1,16 @@ +# FuturesLiqOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | Liquidation time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**size** | **int** | User position size | [optional] [readonly] +**order_size** | **int** | Number of forced liquidation orders | [optional] [readonly] +**order_price** | **str** | Liquidation order price | [optional] [readonly] +**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] +**left** | **int** | System liquidation order maker size | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesLiquidate.md b/docs/FuturesLiquidate.md new file mode 100644 index 0000000..c8575b9 --- /dev/null +++ b/docs/FuturesLiquidate.md @@ -0,0 +1,21 @@ +# FuturesLiquidate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | Liquidation time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**leverage** | **str** | Position leverage. Not returned in public endpoints. | [optional] [readonly] +**size** | **int** | Position size | [optional] [readonly] +**margin** | **str** | Position margin. Not returned in public endpoints. | [optional] [readonly] +**entry_price** | **str** | Average entry price. Not returned in public endpoints. | [optional] [readonly] +**liq_price** | **str** | Liquidation price. Not returned in public endpoints. | [optional] [readonly] +**mark_price** | **str** | Mark price. Not returned in public endpoints. | [optional] [readonly] +**order_id** | **int** | Liquidation order ID. Not returned in public endpoints. | [optional] [readonly] +**order_price** | **str** | Liquidation order price | [optional] [readonly] +**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] +**left** | **int** | Liquidation order maker size | [optional] [readonly] + +[[Back to Model list]](../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 new file mode 100644 index 0000000..66b4eeb --- /dev/null +++ b/docs/FuturesOrder.md @@ -0,0 +1,37 @@ +# FuturesOrder + +Futures order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Futures order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Creation time of order | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] +**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] +**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] +**contract** | **str** | Futures contract | +**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | +**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] +**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] +**is_close** | **bool** | Is the order to close position | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] +**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] +**left** | **int** | Size left to be traded | [optional] [readonly] +**fill_price** | **str** | Fill price of the order | [optional] [readonly] +**text** | **str** | Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance | [optional] +**tkfr** | **str** | Taker fee | [optional] [readonly] +**mkfr** | **str** | Maker fee | [optional] [readonly] +**refu** | **int** | Reference user ID | [optional] [readonly] +**auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] +**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] +**biz_info** | **str** | Additional information | [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/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md new file mode 100644 index 0000000..72ff6ca --- /dev/null +++ b/docs/FuturesOrderAmendment.md @@ -0,0 +1,14 @@ +# FuturesOrderAmendment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **int** | New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. | [optional] +**price** | **str** | New order price. | [optional] +**amend_text** | **str** | Custom info during amending order | [optional] +**biz_info** | **str** | Users can annotate this modification with information. | [optional] +**bbo** | **str** | Users are able to modify the offer price manually. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesOrderBook.md b/docs/FuturesOrderBook.md new file mode 100644 index 0000000..f8ed364 --- /dev/null +++ b/docs/FuturesOrderBook.md @@ -0,0 +1,14 @@ +# FuturesOrderBook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response | [optional] +**current** | **float** | Response data generation timestamp | [optional] +**update** | **float** | Order book changed timestamp | [optional] +**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Asks order depth | +**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bids order depth | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesOrderBookItem.md b/docs/FuturesOrderBookItem.md new file mode 100644 index 0000000..9f3356e --- /dev/null +++ b/docs/FuturesOrderBookItem.md @@ -0,0 +1,11 @@ +# FuturesOrderBookItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**p** | **str** | Price (quote currency) | [optional] +**s** | **int** | Size | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesPremiumIndex.md b/docs/FuturesPremiumIndex.md new file mode 100644 index 0000000..73effc0 --- /dev/null +++ b/docs/FuturesPremiumIndex.md @@ -0,0 +1,15 @@ +# FuturesPremiumIndex + +data point in every timestamp +## Properties +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] +**o** | **str** | Open price | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesPriceTrigger.md b/docs/FuturesPriceTrigger.md new file mode 100644 index 0000000..c970e01 --- /dev/null +++ b/docs/FuturesPriceTrigger.md @@ -0,0 +1,14 @@ +# FuturesPriceTrigger + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strategy_type** | **int** | Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price | [optional] +**price_type** | **int** | Price type. 0 - latest deal price, 1 - mark price, 2 - index price | [optional] +**price** | **str** | Value of price on price triggered, or price gap on price gap triggered | [optional] +**rule** | **int** | Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price | [optional] +**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the 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/FuturesPriceTriggeredOrder.md b/docs/FuturesPriceTriggeredOrder.md new file mode 100644 index 0000000..e0e2727 --- /dev/null +++ b/docs/FuturesPriceTriggeredOrder.md @@ -0,0 +1,22 @@ +# FuturesPriceTriggeredOrder + +Futures order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**initial** | [**FuturesInitialOrder**](FuturesInitialOrder.md) | | +**trigger** | [**FuturesPriceTrigger**](FuturesPriceTrigger.md) | | +**id** | **int** | Auto order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Creation time | [optional] [readonly] +**finish_time** | **float** | Finished time | [optional] [readonly] +**trade_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly] +**status** | **str** | Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order | [optional] [readonly] +**finish_as** | **str** | How order is finished | [optional] [readonly] +**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly] +**order_type** | **str** | Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests | [optional] +**me_order_id** | **int** | Corresponding order ID of order take-profit/stop-loss. | [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/FuturesTicker.md b/docs/FuturesTicker.md new file mode 100644 index 0000000..d6683a1 --- /dev/null +++ b/docs/FuturesTicker.md @@ -0,0 +1,32 @@ +# FuturesTicker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contract** | **str** | Futures contract | [optional] +**last** | **str** | Last trading price | [optional] +**change_percentage** | **str** | Change percentage. | [optional] +**total_size** | **str** | Contract total size | [optional] +**low_24h** | **str** | Lowest trading price in recent 24h | [optional] +**high_24h** | **str** | Highest trading price in recent 24h | [optional] +**volume_24h** | **str** | Trade size in recent 24h | [optional] +**volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency | [optional] +**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency | [optional] +**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency | [optional] +**mark_price** | **str** | Recent mark price | [optional] +**funding_rate** | **str** | Funding rate | [optional] +**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] +**index_price** | **str** | Index price | [optional] +**quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] +**basis_rate** | **str** | Basis rate | [optional] +**basis_value** | **str** | Basis value | [optional] +**lowest_ask** | **str** | Recent lowest ask | [optional] +**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] +**highest_bid** | **str** | Recent highest bid | [optional] +**highest_size** | **str** | The latest buyer's highest price order volume | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FuturesTrade.md b/docs/FuturesTrade.md new file mode 100644 index 0000000..57e99c6 --- /dev/null +++ b/docs/FuturesTrade.md @@ -0,0 +1,16 @@ +# FuturesTrade + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Trade ID | [optional] +**create_time** | **float** | Trading time | [optional] +**create_time_ms** | **float** | Trading time, with milliseconds set to 3 decimal places. | [optional] +**contract** | **str** | Futures contract | [optional] +**size** | **int** | Trading size | [optional] +**price** | **str** | Trading price (quote currency) | [optional] +**is_internal** | **bool** | Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndexConstituent.md b/docs/IndexConstituent.md new file mode 100644 index 0000000..a80703f --- /dev/null +++ b/docs/IndexConstituent.md @@ -0,0 +1,11 @@ +# IndexConstituent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exchange** | **str** | Exchange | [optional] +**symbols** | **list[str]** | 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/InlineObject.md b/docs/InlineObject.md new file mode 100644 index 0000000..269f136 --- /dev/null +++ b/docs/InlineObject.md @@ -0,0 +1,11 @@ +# InlineObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | Full position-by-position model, ISOLATED-by-position, CROSS-full position | +**contract** | **str** | Contract Market | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..3ac1603 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,11 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | [optional] +**vaule** | **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/InsuranceRecord.md b/docs/InsuranceRecord.md new file mode 100644 index 0000000..cc34afc --- /dev/null +++ b/docs/InsuranceRecord.md @@ -0,0 +1,11 @@ +# InsuranceRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**t** | **int** | Unix timestamp in seconds | [optional] +**b** | **str** | Insurance 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/LedgerRecord.md b/docs/LedgerRecord.md new file mode 100644 index 0000000..e0ec9fc --- /dev/null +++ b/docs/LedgerRecord.md @@ -0,0 +1,21 @@ +# LedgerRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Record ID | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] +**withdraw_order_id** | **str** | User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] +**timestamp** | **str** | Operation time | [optional] [readonly] +**amount** | **str** | Currency amount | +**currency** | **str** | Currency name | +**address** | **str** | Withdrawal address. Required for withdrawals | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] +**withdraw_id** | **str** | The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time | [optional] +**asset_class** | **str** | The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] +**status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - REVIEW: Under review | [optional] [readonly] +**chain** | **str** | Name of the chain used in withdrawals | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LiquidateOrder.md b/docs/LiquidateOrder.md new file mode 100644 index 0000000..cc2d78e --- /dev/null +++ b/docs/LiquidateOrder.md @@ -0,0 +1,15 @@ +# LiquidateOrder + +Liquidate Order detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] +**currency_pair** | **str** | Currency pair | +**amount** | **str** | Trade amount | +**price** | **str** | Order price | +**action_mode** | **str** | Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginAccount.md b/docs/MarginAccount.md new file mode 100644 index 0000000..b54725d --- /dev/null +++ b/docs/MarginAccount.md @@ -0,0 +1,18 @@ +# MarginAccount + +Margin account detail. `base` refers to base currency, while `quotes to quote currency +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | [optional] +**account_type** | **str** | Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated | [optional] +**leverage** | **str** | User current market leverage multiple | [optional] +**locked** | **bool** | Whether account is locked | [optional] +**risk** | **str** | Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) | [optional] +**mmr** | **str** | Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) | [optional] +**base** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional] +**quote** | [**MarginAccountCurrency**](MarginAccountCurrency.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/MarginAccountBook.md b/docs/MarginAccountBook.md new file mode 100644 index 0000000..9c62f12 --- /dev/null +++ b/docs/MarginAccountBook.md @@ -0,0 +1,17 @@ +# MarginAccountBook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Balance change record ID | [optional] +**time** | **str** | Balance changed timestamp | [optional] +**time_ms** | **int** | The timestamp of the change (in milliseconds) | [optional] +**currency** | **str** | Currency changed | [optional] +**currency_pair** | **str** | Account currency pair | [optional] +**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] +**balance** | **str** | Balance after change | [optional] +**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginAccountCurrency.md b/docs/MarginAccountCurrency.md new file mode 100644 index 0000000..01f80ab --- /dev/null +++ b/docs/MarginAccountCurrency.md @@ -0,0 +1,15 @@ +# MarginAccountCurrency + +Account currency details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**available** | **str** | Amount suitable for margin trading. | [optional] +**locked** | **str** | Locked amount, used in margin trading | [optional] +**borrowed** | **str** | Borrowed amount | [optional] +**interest** | **str** | Unpaid interests | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginApi.md b/docs/MarginApi.md new file mode 100644 index 0000000..8dc54de --- /dev/null +++ b/docs/MarginApi.md @@ -0,0 +1,1596 @@ +# gate_api.MarginApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list +[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history +[**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list +[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting +[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting +[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency +[**list_cross_margin_currencies**](MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) +[**get_cross_margin_currency**](MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) +[**get_cross_margin_account**](MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) +[**list_cross_margin_account_book**](MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) +[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) +[**create_cross_margin_loan**](MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) +[**get_cross_margin_loan**](MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) +[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) +[**repay_cross_margin_loan**](MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) +[**get_cross_margin_interest_records**](MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) +[**get_cross_margin_transferable**](MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) +[**get_cross_margin_estimate_rate**](MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) +[**get_cross_margin_borrowable**](MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) +[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market +[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient +[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple +[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list + + +# **list_margin_accounts** +> list[MarginAccount] list_margin_accounts(currency_pair=currency_pair) + +Margin account list + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) + +try: + # Margin account list + api_response = api_instance.list_margin_accounts(currency_pair=currency_pair) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->list_margin_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | [optional] + +### Return type + +[**list[MarginAccount]**](MarginAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_margin_account_book** +> list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) + +List margin account balance change history + +Only transferals from and to margin account are provided for now. Time range allows 30 days at most + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) +currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) +type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) + +try: + # List margin account balance change history + api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->list_margin_account_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] + **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] + **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + +### Return type + +[**list[MarginAccountBook]**](MarginAccountBook.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_funding_accounts** +> list[FundingAccount] list_funding_accounts(currency=currency) + +Funding account list + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) + +try: + # Funding account list + api_response = api_instance.list_funding_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 MarginApi->list_funding_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + +### Return type + +[**list[FundingAccount]**](FundingAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_auto_repay_status** +> AutoRepaySetting get_auto_repay_status() + +Retrieve user auto repayment 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.MarginApi(api_client) + +try: + # Retrieve user auto repayment setting + api_response = api_instance.get_auto_repay_status() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_auto_repay_status: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AutoRepaySetting**](AutoRepaySetting.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** | Current auto repayment setting | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_auto_repay** +> AutoRepaySetting set_auto_repay(status) + +Update user's auto repayment setting + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled + +try: + # Update user's auto repayment setting + api_response = api_instance.set_auto_repay(status) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->set_auto_repay: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled | + +### Return type + +[**AutoRepaySetting**](AutoRepaySetting.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** | Current auto repayment setting | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_margin_transferable** +> MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) + +Get the max transferable amount for a specific margin currency + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency +currency_pair = 'BTC_USDT' # str | Currency pair (optional) + +try: + # Get the max transferable amount for a specific margin currency + api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_margin_transferable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | + **currency_pair** | **str**| Currency pair | [optional] + +### Return type + +[**MarginTransferable**](MarginTransferable.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_cross_margin_currencies** +> list[CrossMarginCurrency] list_cross_margin_currencies() + +Currencies supported by cross margin.(deprecated) + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) + +try: + # Currencies supported by cross margin.(deprecated) + api_response = api_instance.list_cross_margin_currencies() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->list_cross_margin_currencies: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[CrossMarginCurrency]**](CrossMarginCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cross_margin_currency** +> CrossMarginCurrency get_cross_margin_currency(currency) + +Retrieve detail of one single currency supported by cross margin. (deprecated) + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | Currency name + +try: + # Retrieve detail of one single currency supported by cross margin. (deprecated) + api_response = api_instance.get_cross_margin_currency(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_cross_margin_currency: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency name | + +### Return type + +[**CrossMarginCurrency**](CrossMarginCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cross_margin_account** +> CrossMarginAccount get_cross_margin_account() + +Retrieve cross margin account. (deprecated) + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) + +try: + # Retrieve cross margin account. (deprecated) + api_response = api_instance.get_cross_margin_account() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_cross_margin_account: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CrossMarginAccount**](CrossMarginAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_cross_margin_account_book** +> list[CrossMarginAccountBook] list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type) + +Retrieve cross margin account change history. (deprecated) + +The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'currency_example' # str | Filter by currency (optional) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +type = 'borrow' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) + +try: + # Retrieve cross margin account change history. (deprecated) + api_response = api_instance.list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->list_cross_margin_account_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Filter by currency | [optional] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] + +### Return type + +[**list[CrossMarginAccountBook]**](CrossMarginAccountBook.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_cross_margin_loans** +> list[CrossMarginLoan] list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) + +List cross margin borrow history. (deprecated) + +Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.) +currency = 'currency_example' # str | Filter by currency (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) + +try: + # List cross margin borrow history. (deprecated) + api_response = api_instance.list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->list_cross_margin_loans: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.) | + **currency** | **str**| Filter by currency | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] + +### Return type + +[**list[CrossMarginLoan]**](CrossMarginLoan.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_cross_margin_loan** +> CrossMarginLoan create_cross_margin_loan(cross_margin_loan) + +Create a cross margin borrow loan. (deprecated) + +Borrow amount cannot be less than currency minimum borrow amount + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +cross_margin_loan = gate_api.CrossMarginLoan() # CrossMarginLoan | + +try: + # Create a cross margin borrow loan. (deprecated) + api_response = api_instance.create_cross_margin_loan(cross_margin_loan) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->create_cross_margin_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cross_margin_loan** | [**CrossMarginLoan**](CrossMarginLoan.md)| | + +### Return type + +[**CrossMarginLoan**](CrossMarginLoan.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully borrowed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cross_margin_loan** +> CrossMarginLoan get_cross_margin_loan(loan_id) + +Retrieve single borrow loan detail. (deprecated) + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +loan_id = '12345' # str | Borrow loan ID + +try: + # Retrieve single borrow loan detail. (deprecated) + api_response = api_instance.get_cross_margin_loan(loan_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_cross_margin_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loan_id** | **str**| Borrow loan ID | + +### Return type + +[**CrossMarginLoan**](CrossMarginLoan.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_cross_margin_repayments** +> list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) + +Retrieve cross margin repayments. (deprecated) + +Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | (optional) +loan_id = '12345' # str | (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) + +try: + # Retrieve cross margin repayments. (deprecated) + api_response = api_instance.list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->list_cross_margin_repayments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| | [optional] + **loan_id** | **str**| | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] + +### Return type + +[**list[CrossMarginRepayment]**](CrossMarginRepayment.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repay_cross_margin_loan** +> list[CrossMarginLoan] repay_cross_margin_loan(cross_margin_repay_request) + +Cross margin repayments. (deprecated) + +When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +cross_margin_repay_request = gate_api.CrossMarginRepayRequest() # CrossMarginRepayRequest | + +try: + # Cross margin repayments. (deprecated) + api_response = api_instance.repay_cross_margin_loan(cross_margin_repay_request) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->repay_cross_margin_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cross_margin_repay_request** | [**CrossMarginRepayRequest**](CrossMarginRepayRequest.md)| | + +### Return type + +[**list[CrossMarginLoan]**](CrossMarginLoan.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan repaid | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cross_margin_interest_records** +> list[UniLoanInterestRecord] get_cross_margin_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) + +Interest records for the cross margin account. (deprecated) + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # Interest records for the cross margin account. (deprecated) + api_response = api_instance.get_cross_margin_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_cross_margin_interest_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cross_margin_transferable** +> CrossMarginTransferable get_cross_margin_transferable(currency) + +Get the max transferable amount for a specific cross margin currency. (deprecated) + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency + +try: + # Get the max transferable amount for a specific cross margin currency. (deprecated) + api_response = api_instance.get_cross_margin_transferable(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_cross_margin_transferable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | + +### Return type + +[**CrossMarginTransferable**](CrossMarginTransferable.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cross_margin_estimate_rate** +> dict(str, str) get_cross_margin_estimate_rate(currencies) + +Estimated interest rates. (deprecated) + +Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name + +try: + # Estimated interest rates. (deprecated) + api_response = api_instance.get_cross_margin_estimate_rate(currencies) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_cross_margin_estimate_rate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | + +### Return type + +**dict(str, str)** + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_cross_margin_borrowable** +> UnifiedBorrowable get_cross_margin_borrowable(currency) + +Get the max borrowable amount for a specific cross margin currency. (deprecated) + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency + +try: + # Get the max borrowable amount for a specific cross margin currency. (deprecated) + api_response = api_instance.get_cross_margin_borrowable(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_cross_margin_borrowable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | + +### Return type + +[**UnifiedBorrowable**](UnifiedBorrowable.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user_margin_tier** +> list[MarginLeverageTier] get_user_margin_tier(currency_pair) + +Check the user's own leverage lending gradient in the current market + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair + +try: + # Check the user's own leverage lending gradient in the current market + api_response = api_instance.get_user_margin_tier(currency_pair) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | + +### Return type + +[**list[MarginLeverageTier]**](MarginLeverageTier.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_market_margin_tier** +> list[MarginLeverageTier] get_market_margin_tier(currency_pair) + +Query the current market leverage lending gradient + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair + +try: + # Query the current market leverage lending gradient + api_response = api_instance.get_market_margin_tier(currency_pair) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->get_market_margin_tier: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | + +### Return type + +[**list[MarginLeverageTier]**](MarginLeverageTier.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_user_market_leverage** +> set_user_market_leverage(margin_market_leverage) + +Set the user market leverage multiple + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | + +try: + # Set the user market leverage multiple + api_instance.set_user_market_leverage(margin_market_leverage) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 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_margin_user_account** +> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) + +Query the user's leverage account list + +Support querying risk rate per position account and margin rate per position account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) + +try: + # Query the user's leverage account list + api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | [optional] + +### Return type + +[**list[MarginAccount]**](MarginAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MarginLeverageTier.md b/docs/MarginLeverageTier.md new file mode 100644 index 0000000..0a36030 --- /dev/null +++ b/docs/MarginLeverageTier.md @@ -0,0 +1,13 @@ +# MarginLeverageTier + +Market gradient information +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_limit** | **str** | Maximum loan limit | [optional] +**mmr** | **str** | Maintenance margin rate | [optional] +**leverage** | **str** | Maximum leverage multiple | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginMarketLeverage.md b/docs/MarginMarketLeverage.md new file mode 100644 index 0000000..a136ef8 --- /dev/null +++ b/docs/MarginMarketLeverage.md @@ -0,0 +1,12 @@ +# MarginMarketLeverage + +Market leverage settings +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | [optional] +**leverage** | **str** | Position leverage | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginTiers.md b/docs/MarginTiers.md new file mode 100644 index 0000000..455092c --- /dev/null +++ b/docs/MarginTiers.md @@ -0,0 +1,14 @@ +# MarginTiers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tier** | **str** | Tier | [optional] +**margin_rate** | **str** | Discount | [optional] +**lower_limit** | **str** | Lower limit | [optional] +**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier) | [optional] +**leverage** | **str** | Position leverage | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginTransferable.md b/docs/MarginTransferable.md new file mode 100644 index 0000000..af64207 --- /dev/null +++ b/docs/MarginTransferable.md @@ -0,0 +1,12 @@ +# MarginTransferable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency detail | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**amount** | **str** | Max transferable amount | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md new file mode 100644 index 0000000..355a750 --- /dev/null +++ b/docs/MarginUniApi.md @@ -0,0 +1,557 @@ +# gate_api.MarginUniApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets +[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market +[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate +[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans +[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay +[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records +[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records +[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable + + +# **list_uni_currency_pairs** +> list[UniCurrencyPair] list_uni_currency_pairs() + +List lending markets + +### 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.MarginUniApi(api_client) + +try: + # List lending markets + api_response = api_instance.list_uni_currency_pairs() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginUniApi->list_uni_currency_pairs: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[UniCurrencyPair]**](UniCurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_uni_currency_pair** +> UniCurrencyPair get_uni_currency_pair(currency_pair) + +Get detail of lending market + +### 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.MarginUniApi(api_client) +currency_pair = 'AE_USDT' # str | Currency pair + +try: + # Get detail of lending market + api_response = api_instance.get_uni_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 MarginUniApi->get_uni_currency_pair: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | + +### Return type + +[**UniCurrencyPair**](UniCurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_margin_uni_estimate_rate** +> dict(str, str) get_margin_uni_estimate_rate(currencies) + +Estimate interest Rate + +Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. + +### 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.MarginUniApi(api_client) +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name + +try: + # Estimate interest Rate + api_response = api_instance.get_margin_uni_estimate_rate(currencies) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginUniApi->get_margin_uni_estimate_rate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | + +### Return type + +**dict(str, str)** + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_uni_loans** +> list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) + +List loans + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginUniApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) + +try: + # List loans + api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginUniApi->list_uni_loans: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +[**list[UniLoan]**](UniLoan.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_uni_loan** +> create_uni_loan(create_uni_loan) + +Borrow or repay + +### 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.MarginUniApi(api_client) +create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | + +try: + # Borrow or repay + api_instance.create_uni_loan(create_uni_loan) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginUniApi->create_uni_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_uni_loan** | [**CreateUniLoan**](CreateUniLoan.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Operated successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_uni_loan_records** +> list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) + +Get load records + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginUniApi(api_client) +type = 'type_example' # str | type: borrow - borrow, repay - repay (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) + +try: + # Get load records + api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginUniApi->list_uni_loan_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| type: borrow - borrow, repay - repay | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency_pair** | **str**| Currency pair | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +[**list[UniLoanRecord]**](UniLoanRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_uni_loan_interest_records** +> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) + +List interest records + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MarginUniApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # List interest records + api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MarginUniApi->list_uni_loan_interest_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_uni_borrowable** +> MaxUniBorrowable get_uni_borrowable(currency, currency_pair) + +Get maximum borrowable + +### 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.MarginUniApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency +currency_pair = 'BTC_USDT' # str | Currency pair + +try: + # Get maximum borrowable + api_response = api_instance.get_uni_borrowable(currency, 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 MarginUniApi->get_uni_borrowable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | + **currency_pair** | **str**| Currency pair | + +### Return type + +[**MaxUniBorrowable**](MaxUniBorrowable.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MaxUniBorrowable.md b/docs/MaxUniBorrowable.md new file mode 100644 index 0000000..107dbab --- /dev/null +++ b/docs/MaxUniBorrowable.md @@ -0,0 +1,12 @@ +# MaxUniBorrowable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**borrowable** | **str** | Maximum borrowable | [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/MockFuturesOrder.md b/docs/MockFuturesOrder.md new file mode 100644 index 0000000..74f0821 --- /dev/null +++ b/docs/MockFuturesOrder.md @@ -0,0 +1,13 @@ +# MockFuturesOrder + +Futures order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contract** | **str** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | +**size** | **str** | Futures quantity, representing the initial order quantity, not involved in actual settlement. | +**left** | **str** | Unfilled contract quantity, involved in actual calculation | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MockFuturesPosition.md b/docs/MockFuturesPosition.md new file mode 100644 index 0000000..67f559d --- /dev/null +++ b/docs/MockFuturesPosition.md @@ -0,0 +1,12 @@ +# MockFuturesPosition + +Futures positions +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contract** | **str** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | +**size** | **str** | Position size, measured in contract units. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MockMarginResult.md b/docs/MockMarginResult.md new file mode 100644 index 0000000..087826b --- /dev/null +++ b/docs/MockMarginResult.md @@ -0,0 +1,17 @@ +# MockMarginResult + +Margin result +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position | [optional] +**profit_loss_ranges** | [**list[ProfitLossRange]**](ProfitLossRange.md) | The results of 33 pressure scenarios for MR1 | [optional] +**max_loss** | [**ProfitLossRange**](.md) | 最大损失 | [optional] +**mr1** | **str** | Stress testing | [optional] +**mr2** | **str** | Basis spread risk | [optional] +**mr3** | **str** | Volatility spread risk | [optional] +**mr4** | **str** | Option short risk | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MockOptionsOrder.md b/docs/MockOptionsOrder.md new file mode 100644 index 0000000..4748585 --- /dev/null +++ b/docs/MockOptionsOrder.md @@ -0,0 +1,13 @@ +# MockOptionsOrder + +Option orders +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**options_name** | **str** | Option name, currently only supports options for BTC and ETH with USDT. | +**size** | **str** | Initial order quantity, not involved in actual calculation | +**left** | **str** | Unfilled contract quantity, involved in actual calculation | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MockOptionsPosition.md b/docs/MockOptionsPosition.md new file mode 100644 index 0000000..ebecb3c --- /dev/null +++ b/docs/MockOptionsPosition.md @@ -0,0 +1,12 @@ +# MockOptionsPosition + +Options positions +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**options_name** | **str** | Option name, currently only supports options for BTC and ETH with USDT. | +**size** | **str** | Position size, measured in contract units. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MockRiskUnit.md b/docs/MockRiskUnit.md new file mode 100644 index 0000000..d2e5c3c --- /dev/null +++ b/docs/MockRiskUnit.md @@ -0,0 +1,19 @@ +# MockRiskUnit + +Risk unit +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Risk unit name | [optional] +**spot_in_use** | **str** | Spot usage | [optional] +**maintain_margin** | **str** | Maintenance margin | [optional] +**initial_margin** | **str** | Initial margin | [optional] +**margin_result** | [**list[MockMarginResult]**](MockMarginResult.md) | Margin result | [optional] +**delta** | **str** | Total Delta of risk unit | [optional] +**gamma** | **str** | Total Gamma of risk unit | [optional] +**theta** | **str** | Total Theta of risk unit | [optional] +**vega** | **str** | Total Vega of risk unit | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MockSpotBalance.md b/docs/MockSpotBalance.md new file mode 100644 index 0000000..c9181a0 --- /dev/null +++ b/docs/MockSpotBalance.md @@ -0,0 +1,12 @@ +# MockSpotBalance + +Spot +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | +**equity** | **str** | Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MockSpotOrder.md b/docs/MockSpotOrder.md new file mode 100644 index 0000000..4327a99 --- /dev/null +++ b/docs/MockSpotOrder.md @@ -0,0 +1,15 @@ +# MockSpotOrder + +Spot orders +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pairs** | **str** | Currency pair | +**order_price** | **str** | Price | +**count** | **str** | Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. | [optional] +**left** | **str** | Unfilled quantity, involved in actual calculation. | +**type** | **str** | Order type, sell - sell order, buy - buy order. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiChainAddressItem.md b/docs/MultiChainAddressItem.md new file mode 100644 index 0000000..5309ff3 --- /dev/null +++ b/docs/MultiChainAddressItem.md @@ -0,0 +1,14 @@ +# MultiChainAddressItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chain** | **str** | Name of the chain | [optional] +**address** | **str** | Deposit address | [optional] +**payment_id** | **str** | Notes that some currencies required(e.g., Tag, Memo) when depositing | [optional] +**payment_name** | **str** | Note type, `Tag` or `Memo` | [optional] +**obtain_failed** | **int** | The obtain failed status- 0: address successfully obtained- 1: failed to obtain address | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiCollateralCurrency.md b/docs/MultiCollateralCurrency.md new file mode 100644 index 0000000..872dc36 --- /dev/null +++ b/docs/MultiCollateralCurrency.md @@ -0,0 +1,12 @@ +# MultiCollateralCurrency + +Borrowing and collateral currencies supported for Multi-Collateral. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_currencies** | [**list[MultiLoanItem]**](MultiLoanItem.md) | List of supported borrowing currencies | [optional] +**collateral_currencies** | [**list[MultiCollateralItem]**](MultiCollateralItem.md) | List of supported collateral currencies | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiCollateralItem.md b/docs/MultiCollateralItem.md new file mode 100644 index 0000000..3e9ba07 --- /dev/null +++ b/docs/MultiCollateralItem.md @@ -0,0 +1,12 @@ +# MultiCollateralItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**discount** | **str** | Discount | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md new file mode 100644 index 0000000..28b5587 --- /dev/null +++ b/docs/MultiCollateralLoanApi.md @@ -0,0 +1,808 @@ +# gate_api.MultiCollateralLoanApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_multi_collateral_orders**](MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders +[**create_multi_collateral**](MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order +[**get_multi_collateral_order_detail**](MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail +[**list_multi_repay_records**](MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records +[**repay_multi_collateral_loan**](MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan +[**list_multi_collateral_records**](MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records +[**operate_multi_collateral**](MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral +[**list_user_currency_quota**](MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota +[**list_multi_collateral_currencies**](MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral +[**get_multi_collateral_ltv**](MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio +[**get_multi_collateral_fix_rate**](MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days +[**get_multi_collateral_current_rate**](MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency + + +# **list_multi_collateral_orders** +> list[MultiCollateralOrder] list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) + +List Multi-Collateral 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.MultiCollateralLoanApi(api_client) +page = 1 # int | Page number (optional) (default to 1) +limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) +sort = 'ltv_asc' # str | Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. (optional) +order_type = 'current' # str | Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders (optional) + +try: + # List Multi-Collateral Orders + api_response = api_instance.list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] + **sort** | **str**| Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. | [optional] + **order_type** | **str**| Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders | [optional] + +### Return type + +[**list[MultiCollateralOrder]**](MultiCollateralOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_multi_collateral** +> OrderResp create_multi_collateral(create_multi_collateral_order) + +Create Multi-Collateral Order + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) +create_multi_collateral_order = gate_api.CreateMultiCollateralOrder() # CreateMultiCollateralOrder | + +try: + # Create Multi-Collateral Order + api_response = api_instance.create_multi_collateral(create_multi_collateral_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->create_multi_collateral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_multi_collateral_order** | [**CreateMultiCollateralOrder**](CreateMultiCollateralOrder.md)| | + +### Return type + +[**OrderResp**](OrderResp.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 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_multi_collateral_order_detail** +> MultiCollateralOrder get_multi_collateral_order_detail(order_id) + +Get Multi-Collateral 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.MultiCollateralLoanApi(api_client) +order_id = '12345' # str | Order ID returned on successful order creation + +try: + # Get Multi-Collateral Order Detail + api_response = api_instance.get_multi_collateral_order_detail(order_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_order_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| Order ID returned on successful order creation | + +### Return type + +[**MultiCollateralOrder**](MultiCollateralOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 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_multi_repay_records** +> list[MultiRepayRecord] list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) + +List Multi-Collateral Repay Records + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) +type = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation +borrow_currency = 'USDT' # str | Borrowed currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) +_from = 1609459200 # int | Start timestamp of the query (optional) +to = 1609459200 # int | Time range ending, default to current time (optional) + +try: + # List Multi-Collateral Repay Records + api_response = api_instance.list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->list_multi_repay_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | + **borrow_currency** | **str**| Borrowed currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + +### Return type + +[**list[MultiRepayRecord]**](MultiRepayRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repay_multi_collateral_loan** +> MultiRepayResp repay_multi_collateral_loan(repay_multi_loan) + +Repay Multi-Collateral Loan + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) +repay_multi_loan = gate_api.RepayMultiLoan() # RepayMultiLoan | + +try: + # Repay Multi-Collateral Loan + api_response = api_instance.repay_multi_collateral_loan(repay_multi_loan) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->repay_multi_collateral_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repay_multi_loan** | [**RepayMultiLoan**](RepayMultiLoan.md)| | + +### Return type + +[**MultiRepayResp**](MultiRepayResp.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Operated successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_multi_collateral_records** +> list[MultiCollateralRecord] list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) + +Query collateral adjustment records + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) +page = 1 # int | Page number (optional) (default to 1) +limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) +_from = 1609459200 # int | Start timestamp of the query (optional) +to = 1609459200 # int | Time range ending, default to current time (optional) +collateral_currency = 'BTC' # str | Collateral (optional) + +try: + # Query collateral adjustment records + api_response = api_instance.list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **collateral_currency** | **str**| Collateral | [optional] + +### Return type + +[**list[MultiCollateralRecord]**](MultiCollateralRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **operate_multi_collateral** +> CollateralAdjustRes operate_multi_collateral(collateral_adjust) + +Operate Multi-Collateral + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) +collateral_adjust = gate_api.CollateralAdjust() # CollateralAdjust | + +try: + # Operate Multi-Collateral + api_response = api_instance.operate_multi_collateral(collateral_adjust) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->operate_multi_collateral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collateral_adjust** | [**CollateralAdjust**](CollateralAdjust.md)| | + +### Return type + +[**CollateralAdjustRes**](CollateralAdjustRes.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Operated 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_user_currency_quota** +> list[CurrencyQuota] list_user_currency_quota(type, currency) + +List User Currency Quota + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) +type = 'collateral' # str | Currency types: collateral - collateral currency, borrow - borrowing currency. +currency = 'BTC' # str | When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. + +try: + # List User Currency Quota + api_response = api_instance.list_user_currency_quota(type, currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->list_user_currency_quota: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| Currency types: collateral - collateral currency, borrow - borrowing currency. | + **currency** | **str**| When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. | + +### Return type + +[**list[CurrencyQuota]**](CurrencyQuota.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_multi_collateral_currencies** +> MultiCollateralCurrency list_multi_collateral_currencies() + +Query supported borrowing and collateral currencies in Multi-Collateral + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) + +try: + # Query supported borrowing and collateral currencies in Multi-Collateral + api_response = api_instance.list_multi_collateral_currencies() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->list_multi_collateral_currencies: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MultiCollateralCurrency**](MultiCollateralCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_multi_collateral_ltv** +> CollateralLtv get_multi_collateral_ltv() + +Get Multi-Collateral ratio + +The Multi-Collateral ratio is fixed, irrespective of the currency. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) + +try: + # Get Multi-Collateral ratio + api_response = api_instance.get_multi_collateral_ltv() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_ltv: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CollateralLtv**](CollateralLtv.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_multi_collateral_fix_rate** +> list[CollateralFixRate] get_multi_collateral_fix_rate() + +Query fixed interest rates for the currency for 7 days and 30 days + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) + +try: + # Query fixed interest rates for the currency for 7 days and 30 days + api_response = api_instance.get_multi_collateral_fix_rate() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_fix_rate: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[CollateralFixRate]**](CollateralFixRate.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_multi_collateral_current_rate** +> list[CollateralCurrentRate] get_multi_collateral_current_rate(currencies, vip_level=vip_level) + +Query the current interest rate of the currency + +Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.MultiCollateralLoanApi(api_client) +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. +vip_level = '0' # str | VIP level, defaults to 0 if not transferred (optional) (default to '0') + +try: + # Query the current interest rate of the currency + api_response = api_instance.get_multi_collateral_current_rate(currencies, vip_level=vip_level) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling MultiCollateralLoanApi->get_multi_collateral_current_rate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencies** | [**list[str]**](str.md)| Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. | + **vip_level** | **str**| VIP level, defaults to 0 if not transferred | [optional] [default to '0'] + +### Return type + +[**list[CollateralCurrentRate]**](CollateralCurrentRate.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MultiCollateralOrder.md b/docs/MultiCollateralOrder.md new file mode 100644 index 0000000..0c5ebee --- /dev/null +++ b/docs/MultiCollateralOrder.md @@ -0,0 +1,24 @@ +# MultiCollateralOrder + +Multi-Collateral Order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | [optional] +**order_type** | **str** | current - current, fixed - fixed | [optional] +**fixed_type** | **str** | Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. | [optional] +**fixed_rate** | **str** | Fixed interest rate | [optional] +**expire_time** | **int** | Expiration time, timestamp, unit in seconds. | [optional] +**auto_renew** | **bool** | Fixed interest rate, automatic renewal | [optional] +**auto_repay** | **bool** | Fixed interest rate, automatic repayment | [optional] +**current_ltv** | **str** | The current collateralization rate | [optional] +**status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] +**total_left_repay_usdt** | **str** | Value of Left repay amount converted in USDT | [optional] +**total_left_collateral_usdt** | **str** | Value of Collateral amount in USDT | [optional] +**borrow_currencies** | [**list[BorrowCurrencyInfo]**](BorrowCurrencyInfo.md) | Borrowing Currency List | [optional] +**collateral_currencies** | [**list[CollateralCurrencyInfo]**](CollateralCurrencyInfo.md) | Collateral Currency List | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiCollateralRecord.md b/docs/MultiCollateralRecord.md new file mode 100644 index 0000000..4f79e11 --- /dev/null +++ b/docs/MultiCollateralRecord.md @@ -0,0 +1,17 @@ +# MultiCollateralRecord + +Multi-Collateral adjustment record. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Collateral record ID | [optional] +**before_ltv** | **str** | The collateral ratio before adjustment | [optional] +**after_ltv** | **str** | The collateral ratio before adjustment | [optional] +**operate_time** | **int** | Operation time, timestamp in seconds. | [optional] +**borrow_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Borrowing Currency List | [optional] +**collateral_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Collateral Currency List | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiCollateralRecordCurrency.md b/docs/MultiCollateralRecordCurrency.md new file mode 100644 index 0000000..7c622f8 --- /dev/null +++ b/docs/MultiCollateralRecordCurrency.md @@ -0,0 +1,15 @@ +# MultiCollateralRecordCurrency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**before_amount** | **str** | Amount before the operation | [optional] +**before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] +**after_amount** | **str** | Amount after the operation. | [optional] +**after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiLoanItem.md b/docs/MultiLoanItem.md new file mode 100644 index 0000000..3c45fc2 --- /dev/null +++ b/docs/MultiLoanItem.md @@ -0,0 +1,11 @@ +# MultiLoanItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**price** | **str** | Latest price of the currency | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiLoanRepayItem.md b/docs/MultiLoanRepayItem.md new file mode 100644 index 0000000..df0f95b --- /dev/null +++ b/docs/MultiLoanRepayItem.md @@ -0,0 +1,12 @@ +# MultiLoanRepayItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Repayment currency | [optional] +**amount** | **str** | Size | [optional] +**repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial 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/MultiRepayRecord.md b/docs/MultiRepayRecord.md new file mode 100644 index 0000000..715ee36 --- /dev/null +++ b/docs/MultiRepayRecord.md @@ -0,0 +1,22 @@ +# MultiRepayRecord + +Mult Repay Record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Repayment record ID | [optional] +**init_ltv** | **str** | The initial collateralization rate | [optional] +**before_ltv** | **str** | Ltv before the operation | [optional] +**after_ltv** | **str** | Ltv after the operation | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] +**repay_time** | **int** | Repayment time, timestamp in seconds. | [optional] +**borrow_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of borrowing information | [optional] +**collateral_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of collateral information | [optional] +**repaid_currencies** | [**list[RepayRecordRepaidCurrency]**](RepayRecordRepaidCurrency.md) | Repay Currency List | [optional] +**total_interest_list** | [**list[RepayRecordTotalInterest]**](RepayRecordTotalInterest.md) | Total Interest List | [optional] +**left_repay_interest_list** | [**list[RepayRecordLeftInterest]**](RepayRecordLeftInterest.md) | List of left repay interest | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiRepayResp.md b/docs/MultiRepayResp.md new file mode 100644 index 0000000..6315962 --- /dev/null +++ b/docs/MultiRepayResp.md @@ -0,0 +1,12 @@ +# MultiRepayResp + +Repay Multi-Collateral Loan +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**repaid_currencies** | [**list[RepayCurrencyRes]**](RepayCurrencyRes.md) | Repay Currency List | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MyFuturesTrade.md b/docs/MyFuturesTrade.md new file mode 100644 index 0000000..431447d --- /dev/null +++ b/docs/MyFuturesTrade.md @@ -0,0 +1,20 @@ +# MyFuturesTrade + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Trade ID | [optional] +**create_time** | **float** | Trading time | [optional] +**contract** | **str** | Futures contract | [optional] +**order_id** | **str** | Order ID related | [optional] +**size** | **int** | Trading size | [optional] +**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] +**price** | **str** | Trading price | [optional] +**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] +**text** | **str** | User defined information | [optional] +**fee** | **str** | Fee deducted | [optional] +**point_fee** | **str** | Points used to deduct fee | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MyFuturesTradeTimeRange.md b/docs/MyFuturesTradeTimeRange.md new file mode 100644 index 0000000..14c8d62 --- /dev/null +++ b/docs/MyFuturesTradeTimeRange.md @@ -0,0 +1,20 @@ +# MyFuturesTradeTimeRange + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trade_id** | **str** | Trade ID | [optional] +**create_time** | **float** | Trading time | [optional] +**contract** | **str** | Futures contract | [optional] +**order_id** | **str** | Order ID related | [optional] +**size** | **int** | Trading size | [optional] +**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] +**price** | **str** | Trading price | [optional] +**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] +**text** | **str** | User defined information | [optional] +**fee** | **str** | Fee deducted | [optional] +**point_fee** | **str** | Points used to deduct fee | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenOrders.md b/docs/OpenOrders.md new file mode 100644 index 0000000..8c14eb2 --- /dev/null +++ b/docs/OpenOrders.md @@ -0,0 +1,12 @@ +# OpenOrders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | [optional] +**total** | **int** | The total number of pending orders for this trading pair on the current page | [optional] +**orders** | [**list[Order]**](Order.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsAccount.md b/docs/OptionsAccount.md new file mode 100644 index 0000000..b5e08dc --- /dev/null +++ b/docs/OptionsAccount.md @@ -0,0 +1,28 @@ +# OptionsAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **int** | User ID | [optional] +**total** | **str** | Account balance | [optional] +**position_value** | **str** | Position value, long position value is positive, short position value is negative | [optional] +**equity** | **str** | Account equity, the sum of account balance and position value | [optional] +**short_enabled** | **bool** | If the account is allowed to short | [optional] +**mmp_enabled** | **bool** | Whether to enable MMP | [optional] +**liq_triggered** | **bool** | Whether to trigger position liquidation | [optional] +**margin_mode** | **int** | | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 | [optional] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] +**init_margin** | **str** | Initial position margin | [optional] +**maint_margin** | **str** | Position maintenance margin | [optional] +**order_margin** | **str** | Order margin of unfinished orders | [optional] +**ask_order_margin** | **str** | Margin for outstanding sell orders | [optional] +**bid_order_margin** | **str** | Margin for outstanding buy orders | [optional] +**available** | **str** | Available balance to transfer out or trade | [optional] +**point** | **str** | POINT amount | [optional] +**currency** | **str** | Settle currency | [optional] +**orders_limit** | **int** | Maximum number of outstanding orders | [optional] +**position_notional_limit** | **int** | Notional value upper limit, including the nominal value of positions and outstanding orders | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsAccountBook.md b/docs/OptionsAccountBook.md new file mode 100644 index 0000000..2b4a4a5 --- /dev/null +++ b/docs/OptionsAccountBook.md @@ -0,0 +1,14 @@ +# OptionsAccountBook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **float** | Change time | [optional] +**change** | **str** | Amount changed (USDT) | [optional] +**balance** | **str** | Account total balance after change (USDT) | [optional] +**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] +**text** | **str** | custom text | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md new file mode 100644 index 0000000..c72a395 --- /dev/null +++ b/docs/OptionsApi.md @@ -0,0 +1,1892 @@ +# gate_api.OptionsApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings +[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times +[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time +[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail +[**list_options_settlements**](OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history +[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement +[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements +[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book +[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts +[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker +[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks +[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying +[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history +[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account +[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history +[**list_options_positions**](OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying +[**get_options_position**](OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position +[**list_options_position_close**](OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying +[**list_options_orders**](OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders +[**create_options_order**](OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order +[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched +[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order +[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order +[**countdown_cancel_all_options**](OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders +[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history +[**get_options_mmp**](OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query +[**set_options_mmp**](OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings +[**reset_options_mmp**](OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset + + +# **list_options_underlyings** +> list[OptionsUnderlying] list_options_underlyings() + +List all underlyings + +### 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.OptionsApi(api_client) + +try: + # List all underlyings + api_response = api_instance.list_options_underlyings() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_underlyings: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[OptionsUnderlying]**](OptionsUnderlying.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_expirations** +> list[int] list_options_expirations(underlying) + +List all expiration times + +### 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.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) + +try: + # List all expiration times + api_response = api_instance.list_options_expirations(underlying) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_expirations: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + +### Return type + +**list[int]** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List expiration times of specified underlying | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_contracts** +> list[OptionsContract] list_options_contracts(underlying, expiration=expiration) + +List all the contracts with specified underlying and expiration time + +### 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.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +expiration = 1636588800 # int | Unix timestamp of the expiration time (optional) + +try: + # List all the contracts with specified underlying and expiration time + api_response = api_instance.list_options_contracts(underlying, expiration=expiration) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_contracts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **expiration** | **int**| Unix timestamp of the expiration time | [optional] + +### Return type + +[**list[OptionsContract]**](OptionsContract.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_options_contract** +> OptionsContract get_options_contract(contract) + +Query specified contract detail + +### 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.OptionsApi(api_client) +contract = 'BTC_USDT-20211130-65000-C' # str | + +try: + # Query specified contract detail + api_response = api_instance.get_options_contract(contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->get_options_contract: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract** | **str**| | + +### Return type + +[**OptionsContract**](OptionsContract.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_settlements** +> list[OptionsSettlement] list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) + +List settlement history + +### 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.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # List settlement history + api_response = api_instance.list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_settlements: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[OptionsSettlement]**](OptionsSettlement.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_options_settlement** +> OptionsSettlement get_options_settlement(contract, underlying, at) + +Get specified contract's settlement + +### 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.OptionsApi(api_client) +contract = 'BTC_USDT-20211130-65000-C' # str | +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +at = 56 # int | + +try: + # Get specified contract's settlement + api_response = api_instance.get_options_settlement(contract, underlying, at) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->get_options_settlement: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract** | **str**| | + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **at** | **int**| | + +### Return type + +[**OptionsSettlement**](OptionsSettlement.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_my_options_settlements** +> list[OptionsMySettlements] list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) + +List my options settlements + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # List my options settlements + api_response = api_instance.list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_my_options_settlements: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **contract** | **str**| Options contract name | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[OptionsMySettlements]**](OptionsMySettlements.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_order_book** +> FuturesOrderBook list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) + +Options order book + +Bids will be sorted by price from high to low, while asks sorted reversely + +### 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.OptionsApi(api_client) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) +with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) + +try: + # Options order book + api_response = api_instance.list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_order_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract** | **str**| Options contract name | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] + **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] + +### Return type + +[**FuturesOrderBook**](FuturesOrderBook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order book retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_tickers** +> list[OptionsTicker] list_options_tickers(underlying) + +List tickers of options contracts + +### 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.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) + +try: + # List tickers of options contracts + api_response = api_instance.list_options_tickers(underlying) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_tickers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + +### Return type + +[**list[OptionsTicker]**](OptionsTicker.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_underlying_tickers** +> OptionsUnderlyingTicker list_options_underlying_tickers(underlying) + +Get underlying ticker + +### 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.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying + +try: + # Get underlying ticker + api_response = api_instance.list_options_underlying_tickers(underlying) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_underlying_tickers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying | + +### Return type + +[**OptionsUnderlyingTicker**](OptionsUnderlyingTicker.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_candlesticks** +> list[OptionsCandlestick] list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) + +Get options candlesticks + +### 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.OptionsApi(api_client) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +interval = '5m' # str | Interval time between data points (optional) (default to '5m') + +try: + # Get options candlesticks + api_response = api_instance.list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_candlesticks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract** | **str**| Options contract name | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **interval** | **str**| Interval time between data points | [optional] [default to '5m'] + +### Return type + +[**list[OptionsCandlestick]**](OptionsCandlestick.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_underlying_candlesticks** +> list[FuturesCandlestick] list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) + +Mark price candlesticks of an underlying + +### 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.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +interval = '5m' # str | Interval time between data points (optional) (default to '5m') + +try: + # Mark price candlesticks of an underlying + api_response = api_instance.list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_underlying_candlesticks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **interval** | **str**| Interval time between data points | [optional] [default to '5m'] + +### Return type + +[**list[FuturesCandlestick]**](FuturesCandlestick.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_trades** +> list[FuturesTrade] list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) + +Options trade history + +### 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.OptionsApi(api_client) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +type = '1546935600' # str | `C` is call, while `P` is put (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # Options trade history + api_response = api_instance.list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract** | **str**| Options contract name | [optional] + **type** | **str**| `C` is call, while `P` is put | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[FuturesTrade]**](FuturesTrade.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_account** +> OptionsAccount list_options_account() + +List options account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) + +try: + # List options account + api_response = api_instance.list_options_account() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_account: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OptionsAccount**](OptionsAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_account_book** +> list[OptionsAccountBook] list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) + +List account changing history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) +type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL (optional) + +try: + # List account changing history + api_response = api_instance.list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_account_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL | [optional] + +### Return type + +[**list[OptionsAccountBook]**](OptionsAccountBook.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_positions** +> list[OptionsPosition] list_options_positions(underlying=underlying) + +List user's positions of specified underlying + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (optional) + +try: + # List user's positions of specified underlying + api_response = api_instance.list_options_positions(underlying=underlying) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_positions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying | [optional] + +### Return type + +[**list[OptionsPosition]**](OptionsPosition.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_options_position** +> OptionsPosition get_options_position(contract) + +Get specified contract position + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +contract = 'BTC_USDT-20211130-65000-C' # str | + +try: + # Get specified contract position + api_response = api_instance.get_options_position(contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->get_options_position: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract** | **str**| | + +### Return type + +[**OptionsPosition**](OptionsPosition.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_position_close** +> list[OptionsPositionClose] list_options_position_close(underlying, contract=contract) + +List user's liquidation history of specified underlying + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) + +try: + # List user's liquidation history of specified underlying + api_response = api_instance.list_options_position_close(underlying, contract=contract) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_position_close: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **contract** | **str**| Options contract name | [optional] + +### Return type + +[**list[OptionsPositionClose]**](OptionsPositionClose.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_options_orders** +> list[OptionsOrder] list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) + +List options 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.OptionsApi(api_client) +status = 'open' # str | Only list the orders with this status +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +underlying = 'BTC_USDT' # str | Underlying (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # List options orders + api_response = api_instance.list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_options_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| Only list the orders with this status | + **contract** | **str**| Options contract name | [optional] + **underlying** | **str**| Underlying | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[OptionsOrder]**](OptionsOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_options_order** +> OptionsOrder create_options_order(options_order) + +Create an options 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.OptionsApi(api_client) +options_order = gate_api.OptionsOrder() # OptionsOrder | + +try: + # Create an options order + api_response = api_instance.create_options_order(options_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->create_options_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **options_order** | [**OptionsOrder**](OptionsOrder.md)| | + +### Return type + +[**OptionsOrder**](OptionsOrder.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 detail | - | + +[[Back to top]](#) [[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_options_orders** +> list[OptionsOrder] cancel_options_orders(contract=contract, underlying=underlying, side=side) + +Cancel all `open` orders matched + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +underlying = 'BTC_USDT' # str | Underlying (optional) +side = 'ask' # str | All bids or asks. Both included if not specified (optional) + +try: + # Cancel all `open` orders matched + api_response = api_instance.cancel_options_orders(contract=contract, underlying=underlying, 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 OptionsApi->cancel_options_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract** | **str**| Options contract name | [optional] + **underlying** | **str**| Underlying | [optional] + **side** | **str**| All bids or asks. Both included if not specified | [optional] + +### Return type + +[**list[OptionsOrder]**](OptionsOrder.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** | All orders matched 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) + +# **get_options_order** +> OptionsOrder get_options_order(order_id) + +Get a single 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.OptionsApi(api_client) +order_id = 12345 # int | Order ID returned on successful order creation + +try: + # Get a single order + api_response = api_instance.get_options_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 OptionsApi->get_options_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Order ID returned on successful order creation | + +### Return type + +[**OptionsOrder**](OptionsOrder.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 detail | - | + +[[Back to top]](#) [[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_options_order** +> OptionsOrder cancel_options_order(order_id) + +Cancel a single 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.OptionsApi(api_client) +order_id = 12345 # int | Order ID returned on successful order creation + +try: + # Cancel a single order + api_response = api_instance.cancel_options_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 OptionsApi->cancel_options_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Order ID returned on successful order creation | + +### Return type + +[**OptionsOrder**](OptionsOrder.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 detail | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **countdown_cancel_all_options** +> TriggerTime countdown_cancel_all_options(countdown_cancel_all_options_task) + +Countdown cancel orders + +Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +countdown_cancel_all_options_task = gate_api.CountdownCancelAllOptionsTask() # CountdownCancelAllOptionsTask | + +try: + # Countdown cancel orders + api_response = api_instance.countdown_cancel_all_options(countdown_cancel_all_options_task) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->countdown_cancel_all_options: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **countdown_cancel_all_options_task** | [**CountdownCancelAllOptionsTask**](CountdownCancelAllOptionsTask.md)| | + +### Return type + +[**TriggerTime**](TriggerTime.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Set countdown successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_my_options_trades** +> list[OptionsMyTrade] list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) + +List personal trading history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) + +try: + # List personal trading history + api_response = api_instance.list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->list_my_options_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **contract** | **str**| Options contract name | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] + +### Return type + +[**list[OptionsMyTrade]**](OptionsMyTrade.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_options_mmp** +> list[OptionsMMP] get_options_mmp(underlying=underlying) + +MMP Query + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +underlying = 'BTC_USDT' # str | Underlying (optional) + +try: + # MMP Query + api_response = api_instance.get_options_mmp(underlying=underlying) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->get_options_mmp: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **underlying** | **str**| Underlying | [optional] + +### Return type + +[**list[OptionsMMP]**](OptionsMMP.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_options_mmp** +> OptionsMMP set_options_mmp(options_mmp) + +MMP Settings + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +options_mmp = gate_api.OptionsMMP() # OptionsMMP | + +try: + # MMP Settings + api_response = api_instance.set_options_mmp(options_mmp) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->set_options_mmp: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **options_mmp** | [**OptionsMMP**](OptionsMMP.md)| | + +### Return type + +[**OptionsMMP**](OptionsMMP.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | MMP Information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reset_options_mmp** +> OptionsMMP reset_options_mmp(options_mmp_reset) + +MMP Reset + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.OptionsApi(api_client) +options_mmp_reset = gate_api.OptionsMMPReset() # OptionsMMPReset | + +try: + # MMP Reset + api_response = api_instance.reset_options_mmp(options_mmp_reset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling OptionsApi->reset_options_mmp: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **options_mmp_reset** | [**OptionsMMPReset**](OptionsMMPReset.md)| | + +### Return type + +[**OptionsMMP**](OptionsMMP.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | MMP Information | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/OptionsCandlestick.md b/docs/OptionsCandlestick.md new file mode 100644 index 0000000..963ccda --- /dev/null +++ b/docs/OptionsCandlestick.md @@ -0,0 +1,16 @@ +# OptionsCandlestick + +data point in every timestamp +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**t** | **float** | Unix timestamp in seconds | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] +**c** | **str** | Close price (quote currency, unit: underlying corresponding option price) | [optional] +**h** | **str** | Highest price (quote currency, unit: underlying corresponding option price) | [optional] +**l** | **str** | Lowest price (quote currency, unit: underlying corresponding option price) | [optional] +**o** | **str** | Open price (quote currency, unit: underlying corresponding option 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/OptionsContract.md b/docs/OptionsContract.md new file mode 100644 index 0000000..ee11273 --- /dev/null +++ b/docs/OptionsContract.md @@ -0,0 +1,35 @@ +# OptionsContract + +Options contract detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Options contract name | [optional] +**tag** | **str** | tag | [optional] +**create_time** | **float** | Creation time | [optional] +**expiration_time** | **float** | Expiration time | [optional] +**is_call** | **bool** | `true` means call options, while `false` is put options | [optional] +**multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] +**underlying** | **str** | Underlying | [optional] +**underlying_price** | **str** | Underlying price (quote currency) | [optional] +**last_price** | **str** | Last trading price | [optional] +**mark_price** | **str** | Current mark price (quote currency) | [optional] +**index_price** | **str** | Current index price (quote currency) | [optional] +**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] +**taker_fee_rate** | **str** | Taker fee rate | [optional] +**order_price_round** | **str** | Minimum order price increment | [optional] +**mark_price_round** | **str** | Minimum mark price increment | [optional] +**order_size_min** | **int** | Minimum order size the contract allowed | [optional] +**order_size_max** | **int** | Maximum order size the contract allowed | [optional] +**order_price_deviate** | **str** | The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders | [optional] +**ref_discount_rate** | **str** | Referral fee rate discount | [optional] +**ref_rebate_rate** | **str** | Referrer commission rate | [optional] +**orderbook_id** | **int** | Current orderbook ID | [optional] +**trade_id** | **int** | Current trade ID | [optional] +**trade_size** | **int** | Historical accumulated trade size | [optional] +**position_size** | **int** | Current total long position size | [optional] +**orders_limit** | **int** | Maximum number of open orders | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsMMP.md b/docs/OptionsMMP.md new file mode 100644 index 0000000..9b9cf63 --- /dev/null +++ b/docs/OptionsMMP.md @@ -0,0 +1,17 @@ +# OptionsMMP + +MMP Settings +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**underlying** | **str** | Underlying | +**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | +**frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | +**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | +**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | +**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] +**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsMMPReset.md b/docs/OptionsMMPReset.md new file mode 100644 index 0000000..28f91f9 --- /dev/null +++ b/docs/OptionsMMPReset.md @@ -0,0 +1,17 @@ +# OptionsMMPReset + +MMP Reset +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**underlying** | **str** | Underlying | +**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | [optional] [readonly] +**frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | [optional] [readonly] +**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | [optional] [readonly] +**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | [optional] [readonly] +**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] +**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsMySettlements.md b/docs/OptionsMySettlements.md new file mode 100644 index 0000000..fc2ef9d --- /dev/null +++ b/docs/OptionsMySettlements.md @@ -0,0 +1,18 @@ +# OptionsMySettlements + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **float** | Settlement time | [optional] +**underlying** | **str** | Underlying | [optional] +**contract** | **str** | Options contract name | [optional] +**strike_price** | **str** | Strike price (quote currency) | [optional] +**settle_price** | **str** | Settlement price (quote currency) | [optional] +**size** | **int** | Size | [optional] +**settle_profit** | **str** | Settlement profit (quote currency) | [optional] +**fee** | **str** | Fee (quote currency) | [optional] +**realised_pnl** | **str** | The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsMyTrade.md b/docs/OptionsMyTrade.md new file mode 100644 index 0000000..44eb069 --- /dev/null +++ b/docs/OptionsMyTrade.md @@ -0,0 +1,17 @@ +# OptionsMyTrade + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Trade ID | [optional] +**create_time** | **float** | Trading time | [optional] +**contract** | **str** | Options contract name | [optional] +**order_id** | **int** | Order ID related | [optional] +**size** | **int** | Trading size | [optional] +**price** | **str** | Trading price (quote currency) | [optional] +**underlying_price** | **str** | Underlying price (quote currency) | [optional] +**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsOrder.md b/docs/OptionsOrder.md new file mode 100644 index 0000000..7c2bdef --- /dev/null +++ b/docs/OptionsOrder.md @@ -0,0 +1,35 @@ +# OptionsOrder + +Options order detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Options order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Creation time of order | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] +**finish_as** | **str** | Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled | [optional] [readonly] +**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] +**contract** | **str** | Contract name | +**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | +**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] +**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` (USDT) | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] +**is_close** | **bool** | Is the order to close position | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] +**mmp** | **bool** | When set to true, delegate to MMP | [optional] [default to False] +**is_mmp** | **bool** | Whether it is MMP delegation. Corresponds to `mmp` in the request. | [optional] [readonly] +**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc'] +**left** | **int** | Size left to be traded | [optional] [readonly] +**fill_price** | **str** | Fill price of the order | [optional] [readonly] +**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] +**tkfr** | **str** | Taker fee | [optional] [readonly] +**mkfr** | **str** | Maker fee | [optional] [readonly] +**refu** | **int** | Reference user ID | [optional] [readonly] +**refr** | **str** | Referrer rebate | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsPosition.md b/docs/OptionsPosition.md new file mode 100644 index 0000000..282039d --- /dev/null +++ b/docs/OptionsPosition.md @@ -0,0 +1,26 @@ +# OptionsPosition + +Options position information +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **int** | User ID | [optional] [readonly] +**underlying** | **str** | Underlying | [optional] [readonly] +**underlying_price** | **str** | Underlying price (quote currency) | [optional] [readonly] +**contract** | **str** | Options contract name | [optional] [readonly] +**size** | **int** | Position size (contract size) | [optional] [readonly] +**entry_price** | **str** | Entry size (quote currency) | [optional] [readonly] +**mark_price** | **str** | Current mark price (quote currency) | [optional] [readonly] +**mark_iv** | **str** | Implied volatility | [optional] [readonly] +**realised_pnl** | **str** | Realized PNL | [optional] [readonly] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] +**pending_orders** | **int** | Current open orders | [optional] [readonly] +**close_order** | [**OptionsPositionCloseOrder**](OptionsPositionCloseOrder.md) | | [optional] +**delta** | **str** | Delta | [optional] [readonly] +**gamma** | **str** | Gamma | [optional] [readonly] +**vega** | **str** | Vega | [optional] [readonly] +**theta** | **str** | Theta | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsPositionClose.md b/docs/OptionsPositionClose.md new file mode 100644 index 0000000..bf5479d --- /dev/null +++ b/docs/OptionsPositionClose.md @@ -0,0 +1,15 @@ +# OptionsPositionClose + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **float** | Position close time | [optional] [readonly] +**contract** | **str** | Options contract name | [optional] [readonly] +**side** | **str** | Position side, long or short | [optional] [readonly] +**pnl** | **str** | PNL | [optional] [readonly] +**text** | **str** | Text of close order | [optional] [readonly] +**settle_size** | **str** | settlement size | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsPositionCloseOrder.md b/docs/OptionsPositionCloseOrder.md new file mode 100644 index 0000000..53044b1 --- /dev/null +++ b/docs/OptionsPositionCloseOrder.md @@ -0,0 +1,13 @@ +# OptionsPositionCloseOrder + +Current close order if any, or `null` +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Close order ID | [optional] +**price** | **str** | Close order price (quote currency) | [optional] +**is_liq** | **bool** | Is the close order from liquidation | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsSettlement.md b/docs/OptionsSettlement.md new file mode 100644 index 0000000..6e5b8b6 --- /dev/null +++ b/docs/OptionsSettlement.md @@ -0,0 +1,15 @@ +# OptionsSettlement + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **float** | Last changed time of configuration | [optional] +**contract** | **str** | Options contract name | [optional] +**profit** | **str** | Settlement profit per size (quote currency) | [optional] +**fee** | **str** | Settlement fee per size (quote currency) | [optional] +**strike_price** | **str** | Strike price (quote currency) | [optional] +**settle_price** | **str** | Settlement price (quote currency) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsTicker.md b/docs/OptionsTicker.md new file mode 100644 index 0000000..43b4b46 --- /dev/null +++ b/docs/OptionsTicker.md @@ -0,0 +1,28 @@ +# OptionsTicker + +Options contract detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Options contract name | [optional] +**last_price** | **str** | Last trading price (quote currency) | [optional] +**mark_price** | **str** | Current mark price (quote currency) | [optional] +**index_price** | **str** | Current index price (quote currency) | [optional] +**ask1_size** | **int** | Best ask size | [optional] +**ask1_price** | **str** | Best ask price | [optional] +**bid1_size** | **int** | Best bid size | [optional] +**bid1_price** | **str** | Best bid price | [optional] +**position_size** | **int** | Current total long position size | [optional] +**mark_iv** | **str** | Implied volatility | [optional] +**bid_iv** | **str** | Bid side implied volatility | [optional] +**ask_iv** | **str** | Ask side implied volatility | [optional] +**leverage** | **str** | Current leverage. Formula: underlying_price / mark_price * delta | [optional] +**delta** | **str** | Delta | [optional] +**gamma** | **str** | Gamma | [optional] +**vega** | **str** | Vega | [optional] +**theta** | **str** | Theta | [optional] +**rho** | **str** | Rho | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsUnderlying.md b/docs/OptionsUnderlying.md new file mode 100644 index 0000000..30897a6 --- /dev/null +++ b/docs/OptionsUnderlying.md @@ -0,0 +1,11 @@ +# OptionsUnderlying + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Underlying name | [optional] +**index_price** | **str** | Spot index price (quote currency) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OptionsUnderlyingTicker.md b/docs/OptionsUnderlyingTicker.md new file mode 100644 index 0000000..07be739 --- /dev/null +++ b/docs/OptionsUnderlyingTicker.md @@ -0,0 +1,13 @@ +# OptionsUnderlyingTicker + +Options underlying detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trade_put** | **int** | Total put options trades amount in last 24h | [optional] +**trade_call** | **int** | Total call options trades amount in last 24h | [optional] +**index_price** | **str** | Index price (quote currency) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Order.md b/docs/Order.md new file mode 100644 index 0000000..868bf2f --- /dev/null +++ b/docs/Order.md @@ -0,0 +1,46 @@ +# Order + +Spot order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Order ID | [optional] [readonly] +**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] +**create_time** | **str** | Creation time of order | [optional] [readonly] +**update_time** | **str** | Last modification time of order | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] +**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] +**currency_pair** | **str** | Currency pair | +**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] +**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] +**side** | **str** | Order side | +**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | +**price** | **str** | Price can't be empty when `type`= `limit` | [optional] +**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] +**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] +**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] +**left** | **str** | Amount left to fill | [optional] [readonly] +**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price | [optional] [readonly] +**fee** | **str** | Fee deducted | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] +**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly] +**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] +**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**finish_as** | **str** | Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown | [optional] [readonly] +**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderBook.md b/docs/OrderBook.md new file mode 100644 index 0000000..1cd4f55 --- /dev/null +++ b/docs/OrderBook.md @@ -0,0 +1,14 @@ +# OrderBook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` | [optional] +**current** | **int** | The timestamp of the response data being generated (in milliseconds) | [optional] +**update** | **int** | The timestamp of when the orderbook last changed (in milliseconds) | [optional] +**asks** | **list[list[str]]** | Asks order depth | +**bids** | **list[list[str]]** | Bids order depth | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderCancel.md b/docs/OrderCancel.md new file mode 100644 index 0000000..8cb355a --- /dev/null +++ b/docs/OrderCancel.md @@ -0,0 +1,49 @@ +# OrderCancel + +Spot order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Order ID | [optional] [readonly] +**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] +**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] +**label** | **str** | Error label, if any, otherwise an empty string | [optional] +**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] +**create_time** | **str** | Creation time of order | [optional] [readonly] +**update_time** | **str** | Last modification time of order | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] +**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] +**currency_pair** | **str** | Currency pair | +**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] +**account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] +**side** | **str** | Order side | +**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | +**price** | **str** | Price can't be empty when `type`= `limit` | [optional] +**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] +**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] +**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] +**left** | **str** | Amount left to fill | [optional] [readonly] +**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price | [optional] [readonly] +**fee** | **str** | Fee deducted | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] +**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly] +**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] +**stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] +**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md new file mode 100644 index 0000000..81969b0 --- /dev/null +++ b/docs/OrderPatch.md @@ -0,0 +1,16 @@ +# OrderPatch + +Spot order details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | [optional] +**account** | **str** | Specify query account. | [optional] +**amount** | **str** | New order amount. `amount` and `price` must specify one of them | [optional] +**price** | **str** | New order price. `amount` and `Price` must specify one of them\" | [optional] +**amend_text** | **str** | Custom info during amending order | [optional] +**action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderResp.md b/docs/OrderResp.md new file mode 100644 index 0000000..c89354c --- /dev/null +++ b/docs/OrderResp.md @@ -0,0 +1,10 @@ +# OrderResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartnerCommissionHistory.md b/docs/PartnerCommissionHistory.md new file mode 100644 index 0000000..06a4443 --- /dev/null +++ b/docs/PartnerCommissionHistory.md @@ -0,0 +1,11 @@ +# PartnerCommissionHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total | [optional] +**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartnerSub.md b/docs/PartnerSub.md new file mode 100644 index 0000000..bc191d9 --- /dev/null +++ b/docs/PartnerSub.md @@ -0,0 +1,12 @@ +# PartnerSub + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**user_join_time** | **int** | The time when the user joined the system, in seconds Unix timestamp | [optional] +**type** | **int** | Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartnerSubList.md b/docs/PartnerSubList.md new file mode 100644 index 0000000..c77bc6f --- /dev/null +++ b/docs/PartnerSubList.md @@ -0,0 +1,11 @@ +# PartnerSubList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total | [optional] +**list** | [**list[PartnerSub]**](PartnerSub.md) | Subordinate list | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartnerTransactionHistory.md b/docs/PartnerTransactionHistory.md new file mode 100644 index 0000000..707f40b --- /dev/null +++ b/docs/PartnerTransactionHistory.md @@ -0,0 +1,11 @@ +# PartnerTransactionHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total | [optional] +**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchUniLend.md b/docs/PatchUniLend.md new file mode 100644 index 0000000..b622196 --- /dev/null +++ b/docs/PatchUniLend.md @@ -0,0 +1,11 @@ +# PatchUniLend + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**min_rate** | **str** | Minimum interest rate | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PlaceDualInvestmentOrder.md b/docs/PlaceDualInvestmentOrder.md new file mode 100644 index 0000000..55944b5 --- /dev/null +++ b/docs/PlaceDualInvestmentOrder.md @@ -0,0 +1,15 @@ +# PlaceDualInvestmentOrder + +Dual Investment order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | Plan ID | +**copies** | **str** | The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. | [optional] +**is_max** | **int** | Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. | [optional] +**amount** | **str** | Subscription amount, mutually exclusive with the copies field | +**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] + +[[Back to Model list]](../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 new file mode 100644 index 0000000..8606015 --- /dev/null +++ b/docs/Position.md @@ -0,0 +1,41 @@ +# Position + +Futures position details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **int** | User ID | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**size** | **int** | Position size | [optional] [readonly] +**leverage** | **str** | Position leverage. 0 means cross margin; positive number means isolated margin | [optional] +**risk_limit** | **str** | Position risk limit | [optional] +**leverage_max** | **str** | Maximum leverage under current risk limit | [optional] [readonly] +**maintenance_rate** | **str** | Maintenance rate under current risk limit | [optional] [readonly] +**value** | **str** | Position value calculated in settlement currency | [optional] [readonly] +**margin** | **str** | Position margin | [optional] +**entry_price** | **str** | Entry price | [optional] [readonly] +**liq_price** | **str** | Liquidation price | [optional] [readonly] +**mark_price** | **str** | Current mark price | [optional] [readonly] +**initial_margin** | **str** | The initial margin occupied by the position, applicable to the portfolio margin account | [optional] [readonly] +**maintenance_margin** | **str** | Maintenance margin required for the position, applicable to portfolio margin account | [optional] [readonly] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] +**realised_pnl** | **str** | Realized PNL | [optional] [readonly] +**pnl_pnl** | **str** | Realized PNL - Position P/L | [optional] [readonly] +**pnl_fund** | **str** | Realized PNL - Funding Fees | [optional] [readonly] +**pnl_fee** | **str** | Realized PNL - Transaction Fees | [optional] [readonly] +**history_pnl** | **str** | History realized PNL | [optional] [readonly] +**last_close_pnl** | **str** | PNL of last position close | [optional] [readonly] +**realised_point** | **str** | Realized POINT PNL | [optional] [readonly] +**history_point** | **str** | History realized POINT PNL | [optional] [readonly] +**adl_ranking** | **int** | Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation | [optional] [readonly] +**pending_orders** | **int** | Current open orders | [optional] [readonly] +**close_order** | [**PositionCloseOrder**](PositionCloseOrder.md) | | [optional] +**mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional] +**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional] +**update_time** | **int** | Last update time | [optional] [readonly] +**update_id** | **int** | Update id. Each time the position is updated, the value will be +1. | [optional] [readonly] +**open_time** | **int** | First Open 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/PositionClose.md b/docs/PositionClose.md new file mode 100644 index 0000000..196b7b8 --- /dev/null +++ b/docs/PositionClose.md @@ -0,0 +1,22 @@ +# PositionClose + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **float** | Position close time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**side** | **str** | Position side, long or short | [optional] [readonly] +**pnl** | **str** | PNL | [optional] [readonly] +**pnl_pnl** | **str** | PNL - Position P/L | [optional] [readonly] +**pnl_fund** | **str** | PNL - Funding Fees | [optional] [readonly] +**pnl_fee** | **str** | PNL - Transaction Fees | [optional] [readonly] +**text** | **str** | Text of close order | [optional] [readonly] +**max_size** | **str** | Max Trade Size | [optional] [readonly] +**accum_size** | **str** | Cumulative closed position volume | [optional] [readonly] +**first_open_time** | **int** | First Open Time | [optional] [readonly] +**long_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. | [optional] [readonly] +**short_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PositionCloseOrder.md b/docs/PositionCloseOrder.md new file mode 100644 index 0000000..6f5540d --- /dev/null +++ b/docs/PositionCloseOrder.md @@ -0,0 +1,13 @@ +# PositionCloseOrder + +Current close order if any, or `null` +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Close order ID | [optional] +**price** | **str** | Close order price | [optional] +**is_liq** | **bool** | Is the close order from liquidation | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProfitLossRange.md b/docs/ProfitLossRange.md new file mode 100644 index 0000000..e48908d --- /dev/null +++ b/docs/ProfitLossRange.md @@ -0,0 +1,13 @@ +# ProfitLossRange + +Profit and loss range +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**price_percentage** | **str** | Percentage change in price | [optional] +**implied_volatility_percentage** | **str** | Percentage change in implied volatility | [optional] +**profit_loss** | **str** | PNL | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RebateApi.md b/docs/RebateApi.md new file mode 100644 index 0000000..e75796c --- /dev/null +++ b/docs/RebateApi.md @@ -0,0 +1,692 @@ +# gate_api.RebateApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user +[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user +[**partner_transaction_history**](RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users +[**partner_commissions_history**](RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users +[**partner_sub_list**](RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list +[**rebate_broker_commission_history**](RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records +[**rebate_broker_transaction_history**](RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history +[**rebate_user_info**](RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information +[**user_sub_relation**](RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship + + +# **agency_transaction_history** +> list[AgencyTransactionHistory] agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + +The agency obtains the transaction history of the recommended user + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) +to = 1602123600 # int | Time range ending, default to current time (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # The agency obtains the transaction history of the recommended user + api_response = api_instance.agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->agency_transaction_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[AgencyTransactionHistory]**](AgencyTransactionHistory.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **agency_commissions_history** +> list[AgencyCommissionHistory] agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + +The agency obtains the commission history of the recommended user + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) +to = 1602123600 # int | Time range ending, default to current time (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # The agency obtains the commission history of the recommended user + api_response = api_instance.agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->agency_commissions_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[AgencyCommissionHistory]**](AgencyCommissionHistory.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **partner_transaction_history** +> PartnerTransactionHistory partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + +Partner obtains transaction records of recommended users + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) +to = 1602123600 # int | Time range ending, default to current time (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # Partner obtains transaction records of recommended users + api_response = api_instance.partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->partner_transaction_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**PartnerTransactionHistory**](PartnerTransactionHistory.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **partner_commissions_history** +> PartnerCommissionHistory partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + +Partner obtains commission records of recommended users + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) +to = 1602123600 # int | Time range ending, default to current time (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # Partner obtains commission records of recommended users + api_response = api_instance.partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->partner_commissions_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**PartnerCommissionHistory**](PartnerCommissionHistory.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **partner_sub_list** +> PartnerSubList partner_sub_list(user_id=user_id, limit=limit, offset=offset) + +Partner subordinate list + +Including sub-agents, direct customers, indirect customers + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # Partner subordinate list + api_response = api_instance.partner_sub_list(user_id=user_id, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->partner_sub_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**PartnerSubList**](PartnerSubList.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **rebate_broker_commission_history** +> list[BrokerCommission] rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) + +The broker obtains the user's commission rebate records + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) +to = 1714521600 # int | Time range ending, default to current time (optional) + +try: + # The broker obtains the user's commission rebate records + api_response = api_instance.rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->rebate_broker_commission_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + +### Return type + +[**list[BrokerCommission]**](BrokerCommission.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **rebate_broker_transaction_history** +> list[BrokerTransaction] rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) + +The broker obtains the user's trading history + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) +to = 1714521600 # int | Time range ending, default to current time (optional) + +try: + # The broker obtains the user's trading history + api_response = api_instance.rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->rebate_broker_transaction_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + +### Return type + +[**list[BrokerTransaction]**](BrokerTransaction.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **rebate_user_info** +> list[RebateUserInfo] rebate_user_info() + +User retrieves rebate information + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) + +try: + # User retrieves rebate information + api_response = api_instance.rebate_user_info() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->rebate_user_info: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[RebateUserInfo]**](RebateUserInfo.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_sub_relation** +> UserSubRelation user_sub_relation(user_id_list) + +User-subordinate relationship + +Query whether the specified user is in the system + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.RebateApi(api_client) +user_id_list = '1, 2, 3' # str | Query the user's ID list, split by,, if there are more than 100, take 100 + +try: + # User-subordinate relationship + api_response = api_instance.user_sub_relation(user_id_list) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling RebateApi->user_sub_relation: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id_list** | **str**| Query the user's ID list, split by,, if there are more than 100, take 100 | + +### Return type + +[**UserSubRelation**](UserSubRelation.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RebateUserInfo.md b/docs/RebateUserInfo.md new file mode 100644 index 0000000..0f97b11 --- /dev/null +++ b/docs/RebateUserInfo.md @@ -0,0 +1,11 @@ +# RebateUserInfo + +Retrieve user rebate information +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_uid** | **int** | My inviter's UID | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayCurrencyRes.md b/docs/RepayCurrencyRes.md new file mode 100644 index 0000000..dd4ab05 --- /dev/null +++ b/docs/RepayCurrencyRes.md @@ -0,0 +1,15 @@ +# RepayCurrencyRes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**succeeded** | **bool** | Has the repayment been successful | [optional] +**label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] +**message** | **str** | Error description in case of operation failure; empty when successful. | [optional] +**currency** | **str** | Repayment currency | [optional] +**repaid_principal** | **str** | Principal | [optional] +**repaid_interest** | **str** | Principal | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayLoan.md b/docs/RepayLoan.md new file mode 100644 index 0000000..910e2be --- /dev/null +++ b/docs/RepayLoan.md @@ -0,0 +1,13 @@ +# RepayLoan + +Repay +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | +**repay_amount** | **str** | Repayment amount, it is mandatory when making partial repayments | +**repaid_all** | **bool** | Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayMultiLoan.md b/docs/RepayMultiLoan.md new file mode 100644 index 0000000..e9be0f0 --- /dev/null +++ b/docs/RepayMultiLoan.md @@ -0,0 +1,12 @@ +# RepayMultiLoan + +Repay Multi-Collateral Loan +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | +**repay_items** | [**list[MultiLoanRepayItem]**](MultiLoanRepayItem.md) | Repay Currency Item | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayRecord.md b/docs/RepayRecord.md new file mode 100644 index 0000000..5137865 --- /dev/null +++ b/docs/RepayRecord.md @@ -0,0 +1,23 @@ +# RepayRecord + +Repayment record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Repayment record ID | [optional] +**repaid_amount** | **str** | Repayment amount | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**collateral_currency** | **str** | Collateral | [optional] +**init_ltv** | **str** | The initial collateralization rate | [optional] +**borrow_time** | **int** | Borrowing time, timestamp | [optional] +**repay_time** | **int** | Repayment time, timestamp | [optional] +**total_interest** | **str** | Total interest | [optional] +**before_left_principal** | **str** | Principal to be repaid before repayment | [optional] +**after_left_principal** | **str** | Principal to be repaid after repayment | [optional] +**before_left_collateral** | **str** | Collateral quantity before repayment | [optional] +**after_left_collateral** | **str** | Collateral quantity after repayment | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayRecordCurrency.md b/docs/RepayRecordCurrency.md new file mode 100644 index 0000000..0cfa03c --- /dev/null +++ b/docs/RepayRecordCurrency.md @@ -0,0 +1,15 @@ +# RepayRecordCurrency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**before_amount** | **str** | Amount before the operation | [optional] +**before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] +**after_amount** | **str** | Amount after the operation. | [optional] +**after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayRecordLeftInterest.md b/docs/RepayRecordLeftInterest.md new file mode 100644 index 0000000..79ca1d9 --- /dev/null +++ b/docs/RepayRecordLeftInterest.md @@ -0,0 +1,15 @@ +# RepayRecordLeftInterest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**before_amount** | **str** | Interest amount before repayment | [optional] +**before_amount_usdt** | **str** | Converted value of interest before repayment in USDT | [optional] +**after_amount** | **str** | Interest amount after repayment | [optional] +**after_amount_usdt** | **str** | Converted value of interest after repayment in USDT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayRecordRepaidCurrency.md b/docs/RepayRecordRepaidCurrency.md new file mode 100644 index 0000000..7f111e8 --- /dev/null +++ b/docs/RepayRecordRepaidCurrency.md @@ -0,0 +1,15 @@ +# RepayRecordRepaidCurrency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Repayment currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**repaid_amount** | **str** | Repayment amount | [optional] +**repaid_principal** | **str** | Principal | [optional] +**repaid_interest** | **str** | Interest | [optional] +**repaid_amount_usdt** | **str** | Value of the repayment amount in USDT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayRecordTotalInterest.md b/docs/RepayRecordTotalInterest.md new file mode 100644 index 0000000..8c7a2cc --- /dev/null +++ b/docs/RepayRecordTotalInterest.md @@ -0,0 +1,13 @@ +# RepayRecordTotalInterest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**amount** | **str** | Interest Amount | [optional] +**amount_usdt** | **str** | Interest amount converted to USDT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepayResp.md b/docs/RepayResp.md new file mode 100644 index 0000000..f7124e3 --- /dev/null +++ b/docs/RepayResp.md @@ -0,0 +1,12 @@ +# RepayResp + +Repay +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**repaid_principal** | **str** | Principal | [optional] +**repaid_interest** | **str** | Interest | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RiskUnits.md b/docs/RiskUnits.md new file mode 100644 index 0000000..7ca433f --- /dev/null +++ b/docs/RiskUnits.md @@ -0,0 +1,17 @@ +# RiskUnits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | Risk unit flag | [optional] +**spot_in_use** | **str** | Spot hedging utilization | [optional] +**maintain_margin** | **str** | Maintenance margin for risk unit | [optional] +**initial_margin** | **str** | Initial margin for risk unit | [optional] +**delta** | **str** | Total Delta of risk unit | [optional] +**gamma** | **str** | Total Gamma of risk unit | [optional] +**theta** | **str** | Total Theta of risk unit | [optional] +**vega** | **str** | Total Vega of risk unit | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SavedAddress.md b/docs/SavedAddress.md new file mode 100644 index 0000000..117d52d --- /dev/null +++ b/docs/SavedAddress.md @@ -0,0 +1,15 @@ +# SavedAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**chain** | **str** | Chain name | [optional] +**address** | **str** | Address | [optional] +**name** | **str** | Name | [optional] +**tag** | **str** | Tag | [optional] +**verified** | **str** | Whether to pass the verification 0-unverified, 1-verified | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SmallBalance.md b/docs/SmallBalance.md new file mode 100644 index 0000000..80e11fa --- /dev/null +++ b/docs/SmallBalance.md @@ -0,0 +1,14 @@ +# SmallBalance + +Convert Small Balance +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**available_balance** | **str** | Available balance | [optional] +**estimated_as_btc** | **str** | Estimated as BTC | [optional] +**convertible_to_gt** | **str** | Estimated conversion to GT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SmallBalanceHistory.md b/docs/SmallBalanceHistory.md new file mode 100644 index 0000000..ffe1d05 --- /dev/null +++ b/docs/SmallBalanceHistory.md @@ -0,0 +1,15 @@ +# SmallBalanceHistory + +Convert Small Balance +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Order ID | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**amount** | **str** | amount | [optional] [readonly] +**gt_amount** | **str** | GT amount | [optional] [readonly] +**create_time** | **int** | Exchange time (in seconds) | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md new file mode 100644 index 0000000..5fd9ad7 --- /dev/null +++ b/docs/SpotAccount.md @@ -0,0 +1,14 @@ +# 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] +**refresh_time** | **int** | Asset Refresh Time (ms) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotAccountBook.md b/docs/SpotAccountBook.md new file mode 100644 index 0000000..f4a1b2f --- /dev/null +++ b/docs/SpotAccountBook.md @@ -0,0 +1,17 @@ +# SpotAccountBook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Balance change record ID | [optional] +**time** | **int** | The timestamp of the change (in milliseconds) | [optional] +**currency** | **str** | Currency changed | [optional] +**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] +**balance** | **str** | Balance after change | [optional] +**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] +**code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code) | [optional] +**text** | **str** | Additional information | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotApi.md b/docs/SpotApi.md new file mode 100644 index 0000000..31944e8 --- /dev/null +++ b/docs/SpotApi.md @@ -0,0 +1,2248 @@ +# gate_api.SpotApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details +[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency +[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported +[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair +[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information +[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book +[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades +[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks +[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates +[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates +[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts +[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book +[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders +[**list_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 +[**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair +[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list +[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order +[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order +[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order +[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history +[**get_system_time**](SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time +[**countdown_cancel_all_spot**](SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders +[**amend_batch_orders**](SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders +[**get_spot_insurance_history**](SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data +[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list +[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order +[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders +[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order +[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order + + +# **list_currencies** +> list[Currency] list_currencies() + +List all currencies' details + +When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) + +try: + # List all currencies' details + api_response = api_instance.list_currencies() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->list_currencies: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Currency]**](Currency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_currency** +> Currency get_currency(currency) + +Get details of a specific currency + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +currency = 'GT' # str | Currency name + +try: + # Get details of a specific currency + api_response = api_instance.get_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->get_currency: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency name | + +### Return type + +[**Currency**](Currency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_currency_pairs** +> list[CurrencyPair] list_currency_pairs() + +List all currency pairs supported + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) + +try: + # List all currency pairs supported + api_response = api_instance.list_currency_pairs() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->list_currency_pairs: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[CurrencyPair]**](CurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | All currency pairs retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_currency_pair** +> CurrencyPair get_currency_pair(currency_pair) + +Get details of a specifc currency pair + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +currency_pair = 'ETH_BTC' # str | Currency pair + +try: + # Get details of a specifc currency pair + api_response = api_instance.get_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->get_currency_pair: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | + +### Return type + +[**CurrencyPair**](CurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_tickers** +> list[Ticker] list_tickers(currency_pair=currency_pair, timezone=timezone) + +Retrieve ticker information + +Return only related data if `currency_pair` is specified; otherwise return all of them + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +timezone = 'utc0' # str | Timezone (optional) + +try: + # Retrieve ticker information + api_response = api_instance.list_tickers(currency_pair=currency_pair, timezone=timezone) + 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_tickers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | [optional] + **timezone** | **str**| Timezone | [optional] + +### Return type + +[**list[Ticker]**](Ticker.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_order_book** +> OrderBook list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id) + +Retrieve order book + +Order book will be sorted by price from high to low on bids; low to high on asks + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) +with_id = False # bool | Return order book ID (optional) (default to False) + +try: + # Retrieve order book + api_response = api_instance.list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_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->list_order_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] + **with_id** | **bool**| Return order book ID | [optional] [default to False] + +### Return type + +[**OrderBook**](OrderBook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_trades** +> list[Trade] list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) + +Retrieve market trades + +Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair +limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) +last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) +reverse = False # bool | Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. (optional) (default to False) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +page = 1 # int | Page number (optional) (default to 1) + +try: + # Retrieve market trades + api_response = api_instance.list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->list_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | + **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] + **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + **reverse** | **bool**| Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. | [optional] [default to False] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + +### Return type + +[**list[Trade]**](Trade.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_candlesticks** +> list[list[str]] list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) + +Market candlesticks + +Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair +limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +_from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) +to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +interval = '30m' # str | Interval time between data points. Note that `30d` means 1 natual month, not 30 days (optional) (default to '30m') + +try: + # Market candlesticks + api_response = api_instance.list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) + 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_candlesticks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | + **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] + **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **interval** | **str**| Interval time between data points. Note that `30d` means 1 natual month, not 30 days | [optional] [default to '30m'] + +### Return type + +**list[list[str]]** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_fee** +> SpotFee get_fee(currency_pair=currency_pair) + +Query user trading fee rates + +This API is deprecated in favour of new fee retrieving API `/wallet/fee`. + +### 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 | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional) + +try: + # Query user trading fee rates + api_response = api_instance.get_fee(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->get_fee: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional] + +### Return type + +[**SpotFee**](SpotFee.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_batch_spot_fee** +> dict(str, SpotFee) get_batch_spot_fee(currency_pairs) + +Query a batch of user trading fee rates + +### 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_pairs = 'BTC_USDT,ETH_USDT' # str | A request can only query up to 50 currency pairs + +try: + # Query a batch of user trading fee rates + api_response = api_instance.get_batch_spot_fee(currency_pairs) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->get_batch_spot_fee: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pairs** | **str**| A request can only query up to 50 currency pairs | + +### Return type + +[**dict(str, SpotFee)**](SpotFee.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_spot_accounts** +> list[SpotAccount] list_spot_accounts(currency=currency) + +List spot 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 | Retrieve data of the specified currency (optional) + +try: + # List spot 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**| Retrieve data of the specified currency | [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 | - | + +[[Back to top]](#) [[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) + +Query account book + +Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. + +### 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 | Retrieve data of the specified currency (optional) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) +code = 'code_example' # str | Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` (optional) + +try: + # Query account book + api_response = api_instance.list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=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 SpotApi->list_spot_account_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] + **code** | **str**| Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` | [optional] + +### Return type + +[**list[SpotAccountBook]**](SpotAccountBook.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_batch_orders** +> list[BatchOrder] create_batch_orders(order, x_gate_exptime=x_gate_exptime) + +Create a batch of orders + +Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders + +### 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 = [gate_api.Order()] # list[Order] | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Create a batch of orders + api_response = api_instance.create_batch_orders(order, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->create_batch_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**list[Order]**](Order.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**list[BatchOrder]**](BatchOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request is completed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_all_open_orders** +> list[OpenOrders] list_all_open_orders(page=page, limit=limit, account=account) + +List all open orders + +Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. + +### 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) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in one page in each currency pair (optional) (default to 100) +account = 'spot' # str | Specify query account. (optional) + +try: + # List all open orders + api_response = api_instance.list_all_open_orders(page=page, limit=limit, account=account) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->list_all_open_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in one page in each currency pair | [optional] [default to 100] + **account** | **str**| Specify query account. | [optional] + +### Return type + +[**list[OpenOrders]**](OpenOrders.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_cross_liquidate_order** +> Order create_cross_liquidate_order(liquidate_order) + +close position when cross-currency is disabled + +Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 + +### 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) +liquidate_order = gate_api.LiquidateOrder() # LiquidateOrder | + +try: + # close position when cross-currency is disabled + api_response = api_instance.create_cross_liquidate_order(liquidate_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->create_cross_liquidate_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **liquidate_order** | [**LiquidateOrder**](LiquidateOrder.md)| | + +### Return type + +[**Order**](Order.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 | - | + +[[Back to top]](#) [[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_orders** +> list[Order] list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, side=side) + +List orders + +Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. + +### 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 | Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. +status = 'open' # str | List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 (optional) (default to 100) +account = 'spot' # str | Specify query account. (optional) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +side = 'sell' # str | All bids or asks. Both included if not specified (optional) + +try: + # List orders + api_response = api_instance.list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, 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 SpotApi->list_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. | + **status** | **str**| List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled | + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 | [optional] [default to 100] + **account** | **str**| Specify query account. | [optional] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **side** | **str**| All bids or asks. Both included if not specified | [optional] + +### Return type + +[**list[Order]**](Order.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_order** +> Order create_order(order, x_gate_exptime=x_gate_exptime) + +Create an order + +Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions + +### 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 = gate_api.Order() # Order | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Create an order + api_response = api_instance.create_order(order, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->create_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**Order**](Order.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**Order**](Order.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. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_orders** +> list[OrderCancel] cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) + +Cancel all `open` orders in specified currency pair + +When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +side = 'sell' # str | All bids or asks. Both included if not specified (optional) +account = 'spot' # str | Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` (optional) +action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Cancel all `open` orders in specified currency pair + api_response = api_instance.cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->cancel_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | [optional] + **side** | **str**| All bids or asks. Both included if not specified | [optional] + **account** | **str**| Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` | [optional] + **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**list[OrderCancel]**](OrderCancel.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 cancellation request accepted. Query order status by listing orders | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_batch_orders** +> list[CancelOrderResult] cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) + +Cancel a batch of orders with an ID list + +Multiple currency pairs can be specified, but maximum 20 orders are allowed per request + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +cancel_batch_order = [gate_api.CancelBatchOrder()] # list[CancelBatchOrder] | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Cancel a batch of orders with an ID list + api_response = api_instance.cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->cancel_batch_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cancel_batch_order** | [**list[CancelBatchOrder]**](CancelBatchOrder.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**list[CancelOrderResult]**](CancelOrderResult.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 cancellation completed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_order** +> Order get_order(order_id, currency_pair, account=account) + +Get a single order + +By default, orders for spot, unified account and warehouse-by-site leverage account are checked. + +### 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) +currency_pair = 'BTC_USDT' # str | Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. +account = 'spot' # str | Specify query account. (optional) + +try: + # Get a single order + api_response = api_instance.get_order(order_id, currency_pair, account=account) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->get_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | + **currency_pair** | **str**| Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. | + **account** | **str**| Specify query account. | [optional] + +### Return type + +[**Order**](Order.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_order** +> Order cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) + +Cancel a single order + +By default, orders for spot, unified accounts and leveraged accounts are revoked. + +### 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) +currency_pair = 'BTC_USDT' # str | Currency pair +account = 'spot' # str | Specify query account. (optional) +action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Cancel a single order + api_response = api_instance.cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->cancel_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | + **currency_pair** | **str**| Currency pair | + **account** | **str**| Specify query account. | [optional] + **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**Order**](Order.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) + +# **amend_order** +> Order amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) + +Amend an order + +By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation + +### 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) +order_patch = gate_api.OrderPatch() # OrderPatch | +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +account = 'spot' # str | Specify query account. (optional) +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Amend an order + api_response = api_instance.amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->amend_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | + **order_patch** | [**OrderPatch**](OrderPatch.md)| | + **currency_pair** | **str**| Currency pair | [optional] + **account** | **str**| Specify query account. | [optional] + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**Order**](Order.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_my_trades** +> list[Trade] list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) + +List personal trading history + +By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. + +### Example + +* 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 | Retrieve results with specified currency pair (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) +order_id = '12345' # str | Filter trades with specified order ID. `currency_pair` is also required if this field is present (optional) +account = 'spot' # str | Specify query account. (optional) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) + +try: + # List personal trading history + api_response = api_instance.list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->list_my_trades: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Retrieve results with specified currency pair | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] + **order_id** | **str**| Filter trades with specified order ID. `currency_pair` is also required if this field is present | [optional] + **account** | **str**| Specify query account. | [optional] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + +### Return type + +[**list[Trade]**](Trade.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_system_time** +> SystemTime get_system_time() + +Get server current time + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) + +try: + # Get server current time + api_response = api_instance.get_system_time() + 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_system_time: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SystemTime**](SystemTime.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **countdown_cancel_all_spot** +> TriggerTime countdown_cancel_all_spot(countdown_cancel_all_spot_task) + +Countdown cancel orders + +When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. + +### 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) +countdown_cancel_all_spot_task = gate_api.CountdownCancelAllSpotTask() # CountdownCancelAllSpotTask | + +try: + # Countdown cancel orders + api_response = api_instance.countdown_cancel_all_spot(countdown_cancel_all_spot_task) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->countdown_cancel_all_spot: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **countdown_cancel_all_spot_task** | [**CountdownCancelAllSpotTask**](CountdownCancelAllSpotTask.md)| | + +### Return type + +[**TriggerTime**](TriggerTime.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Set countdown successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **amend_batch_orders** +> list[BatchOrder] amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) + +Batch modification of orders + +By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the order list + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +batch_amend_item = [gate_api.BatchAmendItem()] # list[BatchAmendItem] | +x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) + +try: + # Batch modification of orders + api_response = api_instance.amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->amend_batch_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **batch_amend_item** | [**list[BatchAmendItem]**](BatchAmendItem.md)| | + **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] + +### Return type + +[**list[BatchOrder]**](BatchOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order modification executed successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_spot_insurance_history** +> list[SpotInsuranceHistory] get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) + +Query spot insurance fund historical data + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SpotApi(api_client) +business = 'margin' # str | Leverage business, margin - position by position; unified - unified account +currency = 'BTC' # str | Currency +_from = 1547706332 # int | Start timestamp, seconds +to = 1547706332 # int | End timestamp, in seconds +page = 1 # int | Page number (optional) (default to 1) +limit = 30 # int | The maximum number of items returned in the list, the default value is 30 (optional) (default to 30) + +try: + # Query spot insurance fund historical data + api_response = api_instance.get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->get_spot_insurance_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **business** | **str**| Leverage business, margin - position by position; unified - unified account | + **currency** | **str**| Currency | + **_from** | **int**| Start timestamp, seconds | + **to** | **int**| End timestamp, in seconds | + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| The maximum number of items returned in the list, the default value is 30 | [optional] [default to 30] + +### Return type + +[**list[SpotInsuranceHistory]**](SpotInsuranceHistory.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_spot_price_triggered_orders** +> list[SpotPriceTriggeredOrder] list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) + +Retrieve running auto order list + +### 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 = 'status_example' # str | Only list the orders with this status +market = 'BTC_USDT' # str | Currency pair (optional) +account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified` (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # Retrieve running auto order list + api_response = api_instance.list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->list_spot_price_triggered_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| Only list the orders with this status | + **market** | **str**| Currency pair | [optional] + **account** | **str**| Trading account type. Portfolio margin account must set to `unified` | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[SpotPriceTriggeredOrder]**](SpotPriceTriggeredOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_spot_price_triggered_order** +> TriggerOrderResponse create_spot_price_triggered_order(spot_price_triggered_order) + +Create a price-triggered 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_price_triggered_order = gate_api.SpotPriceTriggeredOrder() # SpotPriceTriggeredOrder | + +try: + # Create a price-triggered order + api_response = api_instance.create_spot_price_triggered_order(spot_price_triggered_order) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->create_spot_price_triggered_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **spot_price_triggered_order** | [**SpotPriceTriggeredOrder**](SpotPriceTriggeredOrder.md)| | + +### Return type + +[**TriggerOrderResponse**](TriggerOrderResponse.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_spot_price_triggered_order_list** +> list[SpotPriceTriggeredOrder] cancel_spot_price_triggered_order_list(market=market, account=account) + +Cancel All Price-triggered 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) +market = 'BTC_USDT' # str | Currency pair (optional) +account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified` (optional) + +try: + # Cancel All Price-triggered Orders + api_response = api_instance.cancel_spot_price_triggered_order_list(market=market, account=account) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SpotApi->cancel_spot_price_triggered_order_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **market** | **str**| Currency pair | [optional] + **account** | **str**| Trading account type. Portfolio margin account must set to `unified` | [optional] + +### Return type + +[**list[SpotPriceTriggeredOrder]**](SpotPriceTriggeredOrder.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 cancellation request accepted. Query order status by listing orders | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_spot_price_triggered_order** +> SpotPriceTriggeredOrder get_spot_price_triggered_order(order_id) + +Get a price-triggered order + +### 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 = 'order_id_example' # str | Retrieve the data of the order with the specified ID + +try: + # Get a price-triggered order + api_response = api_instance.get_spot_price_triggered_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_price_triggered_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**SpotPriceTriggeredOrder**](SpotPriceTriggeredOrder.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** | Auto order detail | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_spot_price_triggered_order** +> SpotPriceTriggeredOrder cancel_spot_price_triggered_order(order_id) + +cancel a price-triggered order + +### 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 = 'order_id_example' # str | Retrieve the data of the order with the specified ID + +try: + # cancel a price-triggered order + api_response = api_instance.cancel_spot_price_triggered_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_price_triggered_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| Retrieve the data of the order with the specified ID | + +### Return type + +[**SpotPriceTriggeredOrder**](SpotPriceTriggeredOrder.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** | Auto order detail | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SpotCurrencyChain.md b/docs/SpotCurrencyChain.md new file mode 100644 index 0000000..d9696fd --- /dev/null +++ b/docs/SpotCurrencyChain.md @@ -0,0 +1,14 @@ +# SpotCurrencyChain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Chain name | [optional] +**addr** | **str** | token address | [optional] +**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled | [optional] +**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed | [optional] +**deposit_disabled** | **bool** | Whether currency's deposit is disabled | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotFee.md b/docs/SpotFee.md new file mode 100644 index 0000000..78ff43c --- /dev/null +++ b/docs/SpotFee.md @@ -0,0 +1,19 @@ +# SpotFee + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**taker_fee** | **str** | taker fee rate | [optional] +**maker_fee** | **str** | maker fee rate | [optional] +**gt_discount** | **bool** | If GT deduction is enabled | [optional] +**gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] +**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] +**loan_fee** | **str** | Loan fee rate of margin lending | [optional] +**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotInsuranceHistory.md b/docs/SpotInsuranceHistory.md new file mode 100644 index 0000000..0731b7f --- /dev/null +++ b/docs/SpotInsuranceHistory.md @@ -0,0 +1,12 @@ +# SpotInsuranceHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**balance** | **str** | balance | [optional] +**time** | **int** | Creation time, timestamp, milliseconds | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotPricePutOrder.md b/docs/SpotPricePutOrder.md new file mode 100644 index 0000000..73b5f85 --- /dev/null +++ b/docs/SpotPricePutOrder.md @@ -0,0 +1,18 @@ +# SpotPricePutOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Order type,default to `limit` - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] +**side** | **str** | Order side - buy: buy side - sell: sell side | +**price** | **str** | Order price | +**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | +**account** | **str** | Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading | [default to 'normal'] +**time_in_force** | **str** | time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only | [optional] [default to 'gtc'] +**auto_borrow** | **bool** | Whether to borrow coins automatically | [optional] [default to False] +**auto_repay** | **bool** | Whether to repay the loan automatically | [optional] [default to False] +**text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotPriceTrigger.md b/docs/SpotPriceTrigger.md new file mode 100644 index 0000000..7ee5505 --- /dev/null +++ b/docs/SpotPriceTrigger.md @@ -0,0 +1,12 @@ +# SpotPriceTrigger + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**price** | **str** | Trigger price | +**rule** | **str** | Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field | +**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpotPriceTriggeredOrder.md b/docs/SpotPriceTriggeredOrder.md new file mode 100644 index 0000000..4291cb2 --- /dev/null +++ b/docs/SpotPriceTriggeredOrder.md @@ -0,0 +1,20 @@ +# SpotPriceTriggeredOrder + +Spot order detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trigger** | [**SpotPriceTrigger**](SpotPriceTrigger.md) | | +**put** | [**SpotPricePutOrder**](SpotPricePutOrder.md) | | +**id** | **int** | Auto order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**market** | **str** | Currency pair | +**ctime** | **int** | Creation time | [optional] [readonly] +**ftime** | **int** | Finished time | [optional] [readonly] +**fired_order_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly] +**status** | **str** | Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired | [optional] [readonly] +**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StpGroup.md b/docs/StpGroup.md new file mode 100644 index 0000000..3ae5da0 --- /dev/null +++ b/docs/StpGroup.md @@ -0,0 +1,13 @@ +# StpGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | STP Group ID | [optional] +**name** | **str** | STP Group name | +**creator_id** | **int** | Creator ID | [optional] +**create_time** | **int** | Creation time | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StpGroupUser.md b/docs/StpGroupUser.md new file mode 100644 index 0000000..a5a103e --- /dev/null +++ b/docs/StpGroupUser.md @@ -0,0 +1,12 @@ +# StpGroupUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**stp_id** | **int** | STP Group ID | [optional] +**create_time** | **int** | Creation time | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StructuredBuy.md b/docs/StructuredBuy.md new file mode 100644 index 0000000..4a3e128 --- /dev/null +++ b/docs/StructuredBuy.md @@ -0,0 +1,12 @@ +# StructuredBuy + +Dual Investment Purchase +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pid** | **str** | Plan ID | [optional] +**amount** | **str** | Purchase 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/StructuredGetProjectList.md b/docs/StructuredGetProjectList.md new file mode 100644 index 0000000..38e9f37 --- /dev/null +++ b/docs/StructuredGetProjectList.md @@ -0,0 +1,22 @@ +# StructuredGetProjectList + +Structured Products +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Plan ID | [optional] +**type** | **str** | product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball | [optional] +**name_en** | **str** | name | [optional] +**investment_coin** | **str** | Investment Currency | [optional] +**investment_period** | **str** | Investment term | [optional] +**min_annual_rate** | **str** | Minimum annual rate | [optional] +**mid_annual_rate** | **str** | Intermediate annual rate | [optional] +**max_annual_rate** | **str** | Maximum annual rate | [optional] +**watch_market** | **str** | Watch market | [optional] +**start_time** | **int** | start time | [optional] +**end_time** | **int** | Finished time | [optional] +**status** | **str** | Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StructuredOrderList.md b/docs/StructuredOrderList.md new file mode 100644 index 0000000..2886d54 --- /dev/null +++ b/docs/StructuredOrderList.md @@ -0,0 +1,17 @@ +# StructuredOrderList + +Structured order +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] +**pid** | **str** | Plan ID | [optional] +**lock_coin** | **str** | Locked coin | [optional] +**amount** | **str** | Locked amount | [optional] +**status** | **str** | Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE | [optional] +**income** | **str** | Income | [optional] +**create_time** | **int** | Created time | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccount.md b/docs/SubAccount.md new file mode 100644 index 0000000..70dbc36 --- /dev/null +++ b/docs/SubAccount.md @@ -0,0 +1,17 @@ +# SubAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**remark** | **str** | custom text | [optional] +**login_name** | **str** | Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters | +**password** | **str** | The sub-account's password. (Default: the same as main account's password) | [optional] +**email** | **str** | The sub-account's email address. (Default: the same as main account's email address) | [optional] +**state** | **int** | State: 1-normal, 2-locked\" | [optional] [readonly] +**type** | **int** | \"Sub-account type: 1 - sub-account, 3 - cross margin account | [optional] [readonly] +**user_id** | **int** | The user id of the sub-account | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountApi.md b/docs/SubAccountApi.md new file mode 100644 index 0000000..3f938a3 --- /dev/null +++ b/docs/SubAccountApi.md @@ -0,0 +1,760 @@ +# gate_api.SubAccountApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_sub_accounts**](SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts +[**create_sub_accounts**](SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account +[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account +[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account +[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account +[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account +[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account +[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account +[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account +[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account +[**list_unified_mode**](SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode + + +# **list_sub_accounts** +> list[SubAccount] list_sub_accounts(type=type) + +List sub-accounts + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +type = '0' # str | `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. (optional) + +try: + # List sub-accounts + api_response = api_instance.list_sub_accounts(type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->list_sub_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. | [optional] + +### Return type + +[**list[SubAccount]**](SubAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_sub_accounts** +> SubAccount create_sub_accounts(sub_account) + +Create a new sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +sub_account = gate_api.SubAccount() # SubAccount | + +try: + # Create a new sub-account + api_response = api_instance.create_sub_accounts(sub_account) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->create_sub_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_account** | [**SubAccount**](SubAccount.md)| | + +### Return type + +[**SubAccount**](SubAccount.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** | Created Successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_sub_account** +> SubAccount get_sub_account(user_id) + +Get the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | Sub-account user id + +try: + # Get the sub-account + api_response = api_instance.get_sub_account(user_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 SubAccountApi->get_sub_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| Sub-account user id | + +### Return type + +[**SubAccount**](SubAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_sub_account_keys** +> list[SubAccountKey] list_sub_account_keys(user_id) + +List all API Key of the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | Sub-account user id + +try: + # List all API Key of the sub-account + api_response = api_instance.list_sub_account_keys(user_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 SubAccountApi->list_sub_account_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| Sub-account user id | + +### Return type + +[**list[SubAccountKey]**](SubAccountKey.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_sub_account_keys** +> list[SubAccountKey] create_sub_account_keys(user_id, sub_account_key) + +Create API Key of the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | Sub-account user id +sub_account_key = gate_api.SubAccountKey() # SubAccountKey | + +try: + # Create API Key of the sub-account + api_response = api_instance.create_sub_account_keys(user_id, sub_account_key) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->create_sub_account_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| Sub-account user id | + **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | + +### Return type + +[**list[SubAccountKey]**](SubAccountKey.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created Successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_sub_account_key** +> SubAccountKey get_sub_account_key(user_id, key) + +Get the API Key of the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | Sub-account user id +key = 'key_example' # str | The API Key of the sub-account + +try: + # Get the API Key of the sub-account + api_response = api_instance.get_sub_account_key(user_id, key) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->get_sub_account_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| Sub-account user id | + **key** | **str**| The API Key of the sub-account | + +### Return type + +[**SubAccountKey**](SubAccountKey.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_sub_account_keys** +> update_sub_account_keys(user_id, key, sub_account_key) + +Update API key of the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | Sub-account user id +key = 'key_example' # str | The API Key of the sub-account +sub_account_key = gate_api.SubAccountKey() # SubAccountKey | + +try: + # Update API key of the sub-account + api_instance.update_sub_account_keys(user_id, key, sub_account_key) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->update_sub_account_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| Sub-account user id | + **key** | **str**| The API Key of the sub-account | + **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Updated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_sub_account_keys** +> delete_sub_account_keys(user_id, key) + +Delete API key of the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | Sub-account user id +key = 'key_example' # str | The API Key of the sub-account + +try: + # Delete API key of the sub-account + api_instance.delete_sub_account_keys(user_id, key) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->delete_sub_account_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| Sub-account user id | + **key** | **str**| The API Key of the sub-account | + +### 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 | +|-------------|-------------|------------------| +**204** | Delete successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **lock_sub_account** +> lock_sub_account(user_id) + +Lock the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | The user id of the sub-account + +try: + # Lock the sub-account + api_instance.lock_sub_account(user_id) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->lock_sub_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| The user id of the sub-account | + +### 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 | +|-------------|-------------|------------------| +**204** | Lock successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unlock_sub_account** +> unlock_sub_account(user_id) + +Unlock the sub-account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) +user_id = 56 # int | The user id of the sub-account + +try: + # Unlock the sub-account + api_instance.unlock_sub_account(user_id) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->unlock_sub_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| The user id of the sub-account | + +### 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 | +|-------------|-------------|------------------| +**204** | Unlock successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_unified_mode** +> list[SubUserMode] list_unified_mode() + +Get sub-account mode + +Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.SubAccountApi(api_client) + +try: + # Get sub-account mode + api_response = api_instance.list_unified_mode() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling SubAccountApi->list_unified_mode: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[SubUserMode]**](SubUserMode.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SubAccountBalance.md b/docs/SubAccountBalance.md new file mode 100644 index 0000000..753d3dd --- /dev/null +++ b/docs/SubAccountBalance.md @@ -0,0 +1,11 @@ +# SubAccountBalance + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | User ID | [optional] +**available** | **dict(str, str)** | Available balances of currencies | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountCrossMarginBalance.md b/docs/SubAccountCrossMarginBalance.md new file mode 100644 index 0000000..ebb3791 --- /dev/null +++ b/docs/SubAccountCrossMarginBalance.md @@ -0,0 +1,11 @@ +# SubAccountCrossMarginBalance + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | User ID | [optional] +**available** | [**SubCrossMarginAccount**](.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/SubAccountFuturesBalance.md b/docs/SubAccountFuturesBalance.md new file mode 100644 index 0000000..d5ddf25 --- /dev/null +++ b/docs/SubAccountFuturesBalance.md @@ -0,0 +1,11 @@ +# SubAccountFuturesBalance + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | User ID | [optional] +**available** | [**dict(str, FuturesAccount)**](FuturesAccount.md) | Futures account balances | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountKey.md b/docs/SubAccountKey.md new file mode 100644 index 0000000..dfce92b --- /dev/null +++ b/docs/SubAccountKey.md @@ -0,0 +1,19 @@ +# SubAccountKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | User ID | [optional] [readonly] +**mode** | **int** | Mode: 1 - classic 2 - portfolio account | [optional] +**name** | **str** | API key name | [optional] +**perms** | [**list[SubAccountKeyPerms]**](SubAccountKeyPerms.md) | | [optional] +**ip_whitelist** | **list[str]** | ip white list (list will be removed if no value is passed) | [optional] +**key** | **str** | API Key | [optional] [readonly] +**state** | **int** | State 1 - normal 2 - locked 3 - frozen | [optional] [readonly] +**created_at** | **int** | Creation time | [optional] [readonly] +**updated_at** | **int** | Last update time | [optional] [readonly] +**last_access** | **int** | Last access time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountKeyPerms.md b/docs/SubAccountKeyPerms.md new file mode 100644 index 0000000..ed59a5b --- /dev/null +++ b/docs/SubAccountKeyPerms.md @@ -0,0 +1,11 @@ +# SubAccountKeyPerms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy | [optional] +**read_only** | **bool** | read only | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountMarginBalance.md b/docs/SubAccountMarginBalance.md new file mode 100644 index 0000000..817fd31 --- /dev/null +++ b/docs/SubAccountMarginBalance.md @@ -0,0 +1,11 @@ +# SubAccountMarginBalance + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | User ID | [optional] +**available** | [**list[MarginAccount]**](MarginAccount.md) | Margin account balances | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountToSubAccount.md b/docs/SubAccountToSubAccount.md new file mode 100644 index 0000000..cc7b962 --- /dev/null +++ b/docs/SubAccountToSubAccount.md @@ -0,0 +1,16 @@ +# SubAccountToSubAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Transfer currency name | +**sub_account_type** | **str** | Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional] +**sub_account_from** | **str** | Transfer from the user id of the sub-account | +**sub_account_from_type** | **str** | The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. | +**sub_account_to** | **str** | Transfer to the user id of the sub-account | +**sub_account_to_type** | **str** | The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account | +**amount** | **str** | Transfer amount | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md new file mode 100644 index 0000000..511b3d3 --- /dev/null +++ b/docs/SubAccountTransfer.md @@ -0,0 +1,18 @@ +# SubAccountTransfer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Transfer currency name | +**sub_account** | **str** | Sub account user ID | +**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | +**amount** | **str** | Transfer amount | +**uid** | **str** | Main account user ID | [optional] [readonly] +**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] +**timest** | **str** | Transfer timestamp | [optional] [readonly] +**source** | **str** | Where the operation is initiated from | [optional] [readonly] +**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md new file mode 100644 index 0000000..de0d009 --- /dev/null +++ b/docs/SubCrossMarginAccount.md @@ -0,0 +1,25 @@ +# SubCrossMarginAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account | [optional] +**locked** | **bool** | Whether account is locked | [optional] +**balances** | [**dict(str, CrossMarginBalance1)**](CrossMarginBalance1.md) | | [optional] +**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] +**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] +**borrowed_net** | **str** | Total borrowed value in USDT * borrowed factor | [optional] +**net** | **str** | Total net assets in USDT | [optional] +**leverage** | **str** | Position leverage | [optional] +**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] +**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] +**total_initial_margin** | **str** | Total initial margin | [optional] +**total_margin_balance** | **str** | Total margin balance | [optional] +**total_maintenance_margin** | **str** | Total maintenance margin | [optional] +**total_initial_margin_rate** | **str** | Total initial margin rate | [optional] +**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional] +**total_available_margin** | **str** | Total available margin | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubUserMode.md b/docs/SubUserMode.md new file mode 100644 index 0000000..137ad4b --- /dev/null +++ b/docs/SubUserMode.md @@ -0,0 +1,12 @@ +# SubUserMode + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**is_unified** | **bool** | Is it a unified account? | [optional] +**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SystemTime.md b/docs/SystemTime.md new file mode 100644 index 0000000..abcf889 --- /dev/null +++ b/docs/SystemTime.md @@ -0,0 +1,10 @@ +# SystemTime + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_time** | **int** | Server current time(ms) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Ticker.md b/docs/Ticker.md new file mode 100644 index 0000000..4a104eb --- /dev/null +++ b/docs/Ticker.md @@ -0,0 +1,26 @@ +# Ticker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency_pair** | **str** | Currency pair | [optional] +**last** | **str** | Last trading price | [optional] +**lowest_ask** | **str** | Recent lowest ask | [optional] +**lowest_size** | **str** | The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] +**highest_bid** | **str** | Recent highest bid | [optional] +**highest_size** | **str** | The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] +**change_percentage** | **str** | Change percentage in the last 24h | [optional] +**change_utc0** | **str** | utc0 timezone, the percentage change in the last 24 hours | [optional] +**change_utc8** | **str** | utc8 timezone, the percentage change in the last 24 hours | [optional] +**base_volume** | **str** | Base currency trade volume in the last 24h | [optional] +**quote_volume** | **str** | Quote currency trade volume in the last 24h | [optional] +**high_24h** | **str** | Highest price in 24h | [optional] +**low_24h** | **str** | Lowest price in 24h | [optional] +**etf_net_value** | **str** | ETF net value | [optional] +**etf_pre_net_value** | **str** | ETF previous net value at re-balancing time | [optional] +**etf_pre_timestamp** | **int** | ETF previous re-balancing time | [optional] +**etf_leverage** | **str** | ETF current leverage | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TotalBalance.md b/docs/TotalBalance.md new file mode 100644 index 0000000..91b929e --- /dev/null +++ b/docs/TotalBalance.md @@ -0,0 +1,12 @@ +# TotalBalance + +User's balance in all accounts +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | [**AccountBalance**](AccountBalance.md) | | [optional] +**details** | [**dict(str, AccountBalance)**](AccountBalance.md) | Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Trade.md b/docs/Trade.md new file mode 100644 index 0000000..94cd01e --- /dev/null +++ b/docs/Trade.md @@ -0,0 +1,25 @@ +# Trade + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Trade ID | [optional] +**create_time** | **str** | Trading time | [optional] +**create_time_ms** | **str** | Trading time, with millisecond precision | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**side** | **str** | Order side | [optional] +**role** | **str** | Trade role. No value in public endpoints | [optional] +**amount** | **str** | Trade amount | [optional] +**price** | **str** | Order price | [optional] +**order_id** | **str** | Related order ID. No value in public endpoints | [optional] +**fee** | **str** | Fee deducted. No value in public endpoints | [optional] +**fee_currency** | **str** | Fee currency unit. No value in public endpoints | [optional] +**point_fee** | **str** | Points used to deduct fee. No value in public endpoints | [optional] +**gt_fee** | **str** | GT used to deduct fee. No value in public endpoints | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] +**sequence_id** | **str** | Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market | [optional] +**text** | **str** | User defined information. No value in public endpoints | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TradeFee.md b/docs/TradeFee.md new file mode 100644 index 0000000..a75fdab --- /dev/null +++ b/docs/TradeFee.md @@ -0,0 +1,22 @@ +# TradeFee + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**taker_fee** | **str** | taker fee rate | [optional] +**maker_fee** | **str** | maker fee rate | [optional] +**gt_discount** | **bool** | If GT deduction is enabled | [optional] +**gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] +**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] +**loan_fee** | **str** | Loan fee rate of margin lending | [optional] +**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional] +**futures_taker_fee** | **str** | Futures trading taker fee | [optional] +**futures_maker_fee** | **str** | Future trading maker fee | [optional] +**delivery_taker_fee** | **str** | Delivery trading taker fee | [optional] +**delivery_maker_fee** | **str** | Delivery trading maker fee | [optional] +**debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TransactionID.md b/docs/TransactionID.md new file mode 100644 index 0000000..040c3c3 --- /dev/null +++ b/docs/TransactionID.md @@ -0,0 +1,10 @@ +# TransactionID + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tx_id** | **int** | Order id | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Transfer.md b/docs/Transfer.md new file mode 100644 index 0000000..85415bd --- /dev/null +++ b/docs/Transfer.md @@ -0,0 +1,16 @@ +# Transfer + +Accounts available to transfer: - `spot`: spot account - `margin`: margin account - `futures`: perpetual futures account - `delivery`: delivery futures account - `options`: options account +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency | +**_from** | **str** | Account to transfer from | +**to** | **str** | Account to transfer to | +**amount** | **str** | Transfer amount | +**currency_pair** | **str** | Margin currency pair. Required if transfer from or to margin account | [optional] +**settle** | **str** | Futures settle currency. Required if transferring from or to futures account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TransferOrderStatus.md b/docs/TransferOrderStatus.md new file mode 100644 index 0000000..c5ffc42 --- /dev/null +++ b/docs/TransferOrderStatus.md @@ -0,0 +1,11 @@ +# TransferOrderStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tx_id** | **str** | Order id | [optional] +**status** | **str** | Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TransferablesResult.md b/docs/TransferablesResult.md new file mode 100644 index 0000000..768c2cc --- /dev/null +++ b/docs/TransferablesResult.md @@ -0,0 +1,12 @@ +# TransferablesResult + +Batch query unified account can be transferred up to a maximum of results +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | The maximum amount that can be transferred out | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerOrderResponse.md b/docs/TriggerOrderResponse.md new file mode 100644 index 0000000..6f44aa3 --- /dev/null +++ b/docs/TriggerOrderResponse.md @@ -0,0 +1,10 @@ +# TriggerOrderResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Auto 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/TriggerTime.md b/docs/TriggerTime.md new file mode 100644 index 0000000..702ff62 --- /dev/null +++ b/docs/TriggerTime.md @@ -0,0 +1,10 @@ +# TriggerTime + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trigger_time** | **int** | Timestamp of the end of the countdown, in milliseconds | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UidPushOrder.md b/docs/UidPushOrder.md new file mode 100644 index 0000000..8d5ca0a --- /dev/null +++ b/docs/UidPushOrder.md @@ -0,0 +1,18 @@ +# UidPushOrder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] +**push_uid** | **int** | Initiator User ID | [optional] +**receive_uid** | **int** | Recipient User ID | [optional] +**currency** | **str** | Currency name | [optional] +**amount** | **str** | Transfer amount | [optional] +**create_time** | **int** | Creation time | [optional] +**status** | **str** | Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success | [optional] +**message** | **str** | PENDING Reason Tips | [optional] +**transaction_type** | **str** | Order Type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UidPushWithdrawal.md b/docs/UidPushWithdrawal.md new file mode 100644 index 0000000..2510006 --- /dev/null +++ b/docs/UidPushWithdrawal.md @@ -0,0 +1,12 @@ +# UidPushWithdrawal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**receive_uid** | **int** | Recipient UID | +**currency** | **str** | Currency name | +**amount** | **str** | Transfer amount | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UidPushWithdrawalResp.md b/docs/UidPushWithdrawalResp.md new file mode 100644 index 0000000..5363c0f --- /dev/null +++ b/docs/UidPushWithdrawalResp.md @@ -0,0 +1,10 @@ +# UidPushWithdrawalResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniCurrency.md b/docs/UniCurrency.md new file mode 100644 index 0000000..6810b7e --- /dev/null +++ b/docs/UniCurrency.md @@ -0,0 +1,15 @@ +# UniCurrency + +Currency detail +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] [readonly] +**min_lend_amount** | **str** | The minimum lending amount, in the unit of the currency. | [optional] [readonly] +**max_lend_amount** | **str** | The total maximum lending amount, in USDT | [optional] [readonly] +**max_rate** | **str** | Maximum rate (Hourly) | [optional] [readonly] +**min_rate** | **str** | Minimum rate (Hourly) | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniCurrencyInterest.md b/docs/UniCurrencyInterest.md new file mode 100644 index 0000000..bd58430 --- /dev/null +++ b/docs/UniCurrencyInterest.md @@ -0,0 +1,11 @@ +# UniCurrencyInterest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniCurrencyPair.md b/docs/UniCurrencyPair.md new file mode 100644 index 0000000..4e0d0c6 --- /dev/null +++ b/docs/UniCurrencyPair.md @@ -0,0 +1,14 @@ +# UniCurrencyPair + +Currency pair of the loan +## Properties +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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniInterestMode.md b/docs/UniInterestMode.md new file mode 100644 index 0000000..8084354 --- /dev/null +++ b/docs/UniInterestMode.md @@ -0,0 +1,12 @@ +# UniInterestMode + +Lend & Earn interest reinvestment toggle +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | +**status** | **bool** | Interest toggle settings, true - interest reinvestment, false - regular dividend | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniInterestRecord.md b/docs/UniInterestRecord.md new file mode 100644 index 0000000..1859976 --- /dev/null +++ b/docs/UniInterestRecord.md @@ -0,0 +1,16 @@ +# UniInterestRecord + +Interest Record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**actual_rate** | **str** | Actual Rate | [optional] [readonly] +**interest** | **str** | Interest | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniLend.md b/docs/UniLend.md new file mode 100644 index 0000000..a6caff9 --- /dev/null +++ b/docs/UniLend.md @@ -0,0 +1,20 @@ +# UniLend + +Loan record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] [readonly] +**current_amount** | **str** | Current amount | [optional] [readonly] +**amount** | **str** | Total amount | [optional] [readonly] +**lent_amount** | **str** | Lent amount | [optional] [readonly] +**frozen_amount** | **str** | Frozen amount | [optional] [readonly] +**min_rate** | **str** | Minimum interest rate | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] +**reinvest_left_amount** | **str** | Amount not reinvested | [optional] [readonly] +**create_time** | **int** | Created time of the lending order | [optional] [readonly] +**update_time** | **int** | Upated time of the lending order | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniLendInterest.md b/docs/UniLendInterest.md new file mode 100644 index 0000000..18a0815 --- /dev/null +++ b/docs/UniLendInterest.md @@ -0,0 +1,11 @@ +# UniLendInterest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] [readonly] +**interest** | **str** | Interest | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniLendRecord.md b/docs/UniLendRecord.md new file mode 100644 index 0000000..294f6d8 --- /dev/null +++ b/docs/UniLendRecord.md @@ -0,0 +1,17 @@ +# UniLendRecord + +Interest Record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] [readonly] +**amount** | **str** | current amount | [optional] [readonly] +**last_wallet_amount** | **str** | Last wallet amount | [optional] [readonly] +**last_lent_amount** | **str** | Last lent amount | [optional] [readonly] +**last_frozen_amount** | **str** | Last frozen amount | [optional] [readonly] +**type** | **str** | Record type: lend - lend, redeem - redeem | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniLoan.md b/docs/UniLoan.md new file mode 100644 index 0000000..6e28454 --- /dev/null +++ b/docs/UniLoan.md @@ -0,0 +1,16 @@ +# UniLoan + +Loan +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**amount** | **str** | amount | [optional] [readonly] +**type** | **str** | Loan type, platform - platform, margin - margin | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] +**update_time** | **int** | Updated time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniLoanInterestRecord.md b/docs/UniLoanInterestRecord.md new file mode 100644 index 0000000..01c41f8 --- /dev/null +++ b/docs/UniLoanInterestRecord.md @@ -0,0 +1,17 @@ +# UniLoanInterestRecord + +Interest record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**actual_rate** | **str** | Actual rate | [optional] [readonly] +**interest** | **str** | Interest | [optional] [readonly] +**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] +**type** | **str** | Type, platform - platform,margin - margin | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UniLoanRecord.md b/docs/UniLoanRecord.md new file mode 100644 index 0000000..93fd89e --- /dev/null +++ b/docs/UniLoanRecord.md @@ -0,0 +1,15 @@ +# UniLoanRecord + +Loan records +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**amount** | **str** | The amount of lending or repaying | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md new file mode 100644 index 0000000..e017e2a --- /dev/null +++ b/docs/UnifiedAccount.md @@ -0,0 +1,28 @@ +# UnifiedAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**refresh_time** | **int** | Time of the most recent refresh | [optional] +**locked** | **bool** | Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode | [optional] +**balances** | [**dict(str, UnifiedBalance)**](UnifiedBalance.md) | | [optional] +**total** | **str** | Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) | [optional] +**borrowed** | **str** | The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. | [optional] +**total_initial_margin** | **str** | Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**total_margin_balance** | **str** | Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**total_maintenance_margin** | **str** | Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional] +**total_initial_margin_rate** | **str** | Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**total_maintenance_margin_rate** | **str** | Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**total_available_margin** | **str** | Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**unified_account_total** | **str** | Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode | [optional] +**unified_account_total_liab** | **str** | Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode | [optional] +**unified_account_total_equity** | **str** | Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode | [optional] +**leverage** | **str** | Actual leverage, valid in cross-currency margin/combined margin mode | [optional] [readonly] +**spot_order_loss** | **str** | Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] +**use_funding** | **bool** | Whether to use funds as margin | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md new file mode 100644 index 0000000..8ac0611 --- /dev/null +++ b/docs/UnifiedApi.md @@ -0,0 +1,1428 @@ +# gate_api.UnifiedApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_unified_accounts**](UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information +[**get_unified_borrowable**](UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account +[**get_unified_transferable**](UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account +[**get_unified_transferables**](UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. +[**get_unified_borrowable_list**](UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum +[**list_unified_loans**](UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans +[**create_unified_loan**](UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay +[**list_unified_loan_records**](UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records +[**list_unified_loan_interest_records**](UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records +[**get_unified_risk_units**](UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details +[**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account +[**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account +[**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate +[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers +[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers +[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency +[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage +[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account +[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates + + +# **list_unified_accounts** +> UnifiedAccount list_unified_accounts(currency=currency, sub_uid=sub_uid) + +Get unified account information + +The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +sub_uid = '10001' # str | Sub account user ID (optional) + +try: + # Get unified account information + api_response = api_instance.list_unified_accounts(currency=currency, sub_uid=sub_uid) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->list_unified_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **sub_uid** | **str**| Sub account user ID | [optional] + +### Return type + +[**UnifiedAccount**](UnifiedAccount.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_unified_borrowable** +> UnifiedBorrowable get_unified_borrowable(currency) + +Query about the maximum borrowing for the unified account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency + +try: + # Query about the maximum borrowing for the unified account + api_response = api_instance.get_unified_borrowable(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_unified_borrowable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | + +### Return type + +[**UnifiedBorrowable**](UnifiedBorrowable.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_unified_transferable** +> UnifiedTransferable get_unified_transferable(currency) + +Query about the maximum transferable for the unified account + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency + +try: + # Query about the maximum transferable for the unified account + api_response = api_instance.get_unified_transferable(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_unified_transferable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | + +### Return type + +[**UnifiedTransferable**](UnifiedTransferable.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_unified_transferables** +> list[TransferablesResult] get_unified_transferables(currencies) + +Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currencies = 'BTC,ETH' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. + +try: + # Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. + api_response = api_instance.get_unified_transferables(currencies) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_unified_transferables: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencies** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | + +### Return type + +[**list[TransferablesResult]**](TransferablesResult.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_unified_borrowable_list** +> list[UnifiedBorrowable1] get_unified_borrowable_list(currencies) + +Batch query unified account can be borrowed up to a maximum + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. + +try: + # Batch query unified account can be borrowed up to a maximum + api_response = api_instance.get_unified_borrowable_list(currencies) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_unified_borrowable_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencies** | [**list[str]**](str.md)| Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. | + +### Return type + +[**list[UnifiedBorrowable1]**](UnifiedBorrowable1.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_unified_loans** +> list[UniLoan] list_unified_loans(currency=currency, page=page, limit=limit, type=type) + +List loans + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +type = 'platform' # str | Loan type, platform - platform, margin - margin (optional) + +try: + # List loans + api_response = api_instance.list_unified_loans(currency=currency, page=page, limit=limit, type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->list_unified_loans: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **type** | **str**| Loan type, platform - platform, margin - margin | [optional] + +### Return type + +[**list[UniLoan]**](UniLoan.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_unified_loan** +> UnifiedLoanResult create_unified_loan(unified_loan) + +Borrow or repay + +When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +unified_loan = gate_api.UnifiedLoan() # UnifiedLoan | + +try: + # Borrow or repay + api_response = api_instance.create_unified_loan(unified_loan) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->create_unified_loan: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unified_loan** | [**UnifiedLoan**](UnifiedLoan.md)| | + +### Return type + +[**UnifiedLoanResult**](UnifiedLoanResult.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Operated successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_unified_loan_records** +> list[UnifiedLoanRecord] list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) + +Get load records + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +type = 'type_example' # str | The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) + +try: + # Get load records + api_response = api_instance.list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->list_unified_loan_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +[**list[UnifiedLoanRecord]**](UnifiedLoanRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_unified_loan_interest_records** +> list[UniLoanInterestRecord] list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) + +List interest records + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +type = 'platform' # str | Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin (optional) + +try: + # List interest records + api_response = api_instance.list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->list_unified_loan_interest_records: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **type** | **str**| Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin | [optional] + +### Return type + +[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_unified_risk_units** +> UnifiedRiskUnits get_unified_risk_units() + +Get user risk unit details + +Retrieve user risk unit details, only valid in portfolio margin mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) + +try: + # Get user risk unit details + api_response = api_instance.get_unified_risk_units() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_unified_risk_units: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UnifiedRiskUnits**](UnifiedRiskUnits.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_unified_mode** +> UnifiedModeSet get_unified_mode() + +Query mode of the unified account + +Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) + +try: + # Query mode of the unified account + api_response = api_instance.get_unified_mode() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_unified_mode: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UnifiedModeSet**](UnifiedModeSet.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_unified_mode** +> set_unified_mode(unified_mode_set) + +Set mode of the unified account + +Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +unified_mode_set = gate_api.UnifiedModeSet() # UnifiedModeSet | + +try: + # Set mode of the unified account + api_instance.set_unified_mode(unified_mode_set) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->set_unified_mode: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unified_mode_set** | [**UnifiedModeSet**](UnifiedModeSet.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 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_unified_estimate_rate** +> dict(str, str) get_unified_estimate_rate(currencies) + +Get unified estimate rate + +Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. + +try: + # Get unified estimate rate + api_response = api_instance.get_unified_estimate_rate(currencies) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_unified_estimate_rate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencies** | [**list[str]**](str.md)| Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. | + +### Return type + +**dict(str, str)** + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_currency_discount_tiers** +> list[UnifiedDiscount] list_currency_discount_tiers() + +List currency discount tiers + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) + +try: + # List currency discount tiers + api_response = api_instance.list_currency_discount_tiers() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->list_currency_discount_tiers: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[UnifiedDiscount]**](UnifiedDiscount.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_loan_margin_tiers** +> list[UnifiedMarginTiers] list_loan_margin_tiers() + +List loan margin tiers + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) + +try: + # List loan margin tiers + api_response = api_instance.list_loan_margin_tiers() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->list_loan_margin_tiers: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[UnifiedMarginTiers]**](UnifiedMarginTiers.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **calculate_portfolio_margin** +> UnifiedPortfolioOutput calculate_portfolio_margin(unified_portfolio_input) + +Portfolio margin calculator + +Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +unified_portfolio_input = gate_api.UnifiedPortfolioInput() # UnifiedPortfolioInput | + +try: + # Portfolio margin calculator + api_response = api_instance.calculate_portfolio_margin(unified_portfolio_input) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->calculate_portfolio_margin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unified_portfolio_input** | [**UnifiedPortfolioInput**](UnifiedPortfolioInput.md)| | + +### Return type + +[**UnifiedPortfolioOutput**](UnifiedPortfolioOutput.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user_leverage_currency_config** +> UnifiedLeverageConfig get_user_leverage_currency_config(currency) + +Minimum currency leverage that can be set + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Currency + +try: + # Minimum currency leverage that can be set + api_response = api_instance.get_user_leverage_currency_config(currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_user_leverage_currency_config: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | + +### Return type + +[**UnifiedLeverageConfig**](UnifiedLeverageConfig.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user_leverage_currency_setting** +> UnifiedLeverageSetting get_user_leverage_currency_setting(currency=currency) + +Get the leverage multiple of the user currency + +Get the user's currency leverage. If currency is not passed, query all currencies. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Currency (optional) + +try: + # Get the leverage multiple of the user currency + api_response = api_instance.get_user_leverage_currency_setting(currency=currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_user_leverage_currency_setting: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | [optional] + +### Return type + +[**UnifiedLeverageSetting**](UnifiedLeverageSetting.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_user_leverage_currency_setting** +> set_user_leverage_currency_setting(unified_leverage_setting) + +Set the loan currency leverage + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +unified_leverage_setting = gate_api.UnifiedLeverageSetting() # UnifiedLeverageSetting | + +try: + # Set the loan currency leverage + api_instance.set_user_leverage_currency_setting(unified_leverage_setting) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->set_user_leverage_currency_setting: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unified_leverage_setting** | [**UnifiedLeverageSetting**](UnifiedLeverageSetting.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 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_unified_currencies** +> list[UnifiedCurrency] list_unified_currencies(currency=currency) + +List of loan currencies supported by unified account + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'BTC' # str | Currency (optional) + +try: + # List of loan currencies supported by unified account + api_response = api_instance.list_unified_currencies(currency=currency) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->list_unified_currencies: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | [optional] + +### Return type + +[**list[UnifiedCurrency]**](UnifiedCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_history_loan_rate** +> UnifiedHistoryLoanRate get_history_loan_rate(currency, tier=tier, page=page, limit=limit) + +get historical lending rates + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +currency = 'USDT' # str | Currency +tier = '1' # str | The VIP level of the floating rate that needs to be queried (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) + +try: + # get historical lending rates + api_response = api_instance.get_history_loan_rate(currency, tier=tier, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->get_history_loan_rate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | + **tier** | **str**| The VIP level of the floating rate that needs to be queried | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +[**UnifiedHistoryLoanRate**](UnifiedHistoryLoanRate.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md new file mode 100644 index 0000000..a5847e1 --- /dev/null +++ b/docs/UnifiedBalance.md @@ -0,0 +1,28 @@ +# UnifiedBalance + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **str** | Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes | [optional] +**freeze** | **str** | The locked amount is valid in single currency margin/cross-currency margin/combined margin mode | [optional] +**borrowed** | **str** | Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**negative_liab** | **str** | Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional] +**futures_pos_liab** | **str** | Contract opening position borrowing currency (abandoned, to be offline field) | [optional] +**equity** | **str** | Equity, valid in single currency margin/cross currency margin/combined margin mode | [optional] +**total_freeze** | **str** | Total occupancy (discarded, to be offline field) | [optional] +**total_liab** | **str** | Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**spot_in_use** | **str** | The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes | [optional] +**funding** | **str** | Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch | [optional] +**funding_version** | **str** | Funding version | [optional] +**cross_balance** | **str** | Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode | [optional] +**iso_balance** | **str** | Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] +**im** | **str** | Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] +**mm** | **str** | The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. | [optional] +**imr** | **str** | Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] +**mmr** | **str** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] +**margin_balance** | **str** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional] +**available_margin** | **str** | Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined 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/UnifiedBorrowable.md b/docs/UnifiedBorrowable.md new file mode 100644 index 0000000..edd2c95 --- /dev/null +++ b/docs/UnifiedBorrowable.md @@ -0,0 +1,11 @@ +# UnifiedBorrowable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | Max borrowable amount | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedBorrowable1.md b/docs/UnifiedBorrowable1.md new file mode 100644 index 0000000..f0e6974 --- /dev/null +++ b/docs/UnifiedBorrowable1.md @@ -0,0 +1,12 @@ +# UnifiedBorrowable1 + +Batch query unified account can be borrowed up to a maximum of results +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | The maximum amount to borrow | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedCurrency.md b/docs/UnifiedCurrency.md new file mode 100644 index 0000000..031c9f6 --- /dev/null +++ b/docs/UnifiedCurrency.md @@ -0,0 +1,15 @@ +# UnifiedCurrency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Currency name | [optional] +**prec** | **str** | Currency precision | [optional] +**min_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional] +**user_max_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional] +**total_max_borrow_amount** | **str** | The maximum debit limit for the platform is USDT | [optional] +**loan_status** | **str** | Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedDiscount.md b/docs/UnifiedDiscount.md new file mode 100644 index 0000000..a75f59f --- /dev/null +++ b/docs/UnifiedDiscount.md @@ -0,0 +1,12 @@ +# UnifiedDiscount + +Currency discount tiers +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**discount_tiers** | [**list[UnifiedDiscountTiers]**](UnifiedDiscountTiers.md) | Tiered discount | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedDiscountTiers.md b/docs/UnifiedDiscountTiers.md new file mode 100644 index 0000000..b6d7f19 --- /dev/null +++ b/docs/UnifiedDiscountTiers.md @@ -0,0 +1,14 @@ +# UnifiedDiscountTiers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tier** | **str** | Tier | [optional] +**discount** | **str** | Discount | [optional] +**lower_limit** | **str** | Lower limit | [optional] +**upper_limit** | **str** | Upper limit,+ indicates positive infinity | [optional] +**leverage** | **str** | Position leverage | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedHistoryLoanRate.md b/docs/UnifiedHistoryLoanRate.md new file mode 100644 index 0000000..9d9d670 --- /dev/null +++ b/docs/UnifiedHistoryLoanRate.md @@ -0,0 +1,13 @@ +# UnifiedHistoryLoanRate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**tier** | **str** | The VIP level of the floating rate required | [optional] +**tier_up_rate** | **str** | VIP level corresponding floating rate | [optional] +**rates** | [**list[UnifiedHistoryLoanRateRates]**](UnifiedHistoryLoanRateRates.md) | Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in 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/UnifiedHistoryLoanRateRates.md b/docs/UnifiedHistoryLoanRateRates.md new file mode 100644 index 0000000..af73623 --- /dev/null +++ b/docs/UnifiedHistoryLoanRateRates.md @@ -0,0 +1,11 @@ +# UnifiedHistoryLoanRateRates + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | The hourly timestamp corresponding to the interest rate, in milliseconds | [optional] +**rate** | **str** | Historical interest rates for this hour | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedLeverageConfig.md b/docs/UnifiedLeverageConfig.md new file mode 100644 index 0000000..3fe3c49 --- /dev/null +++ b/docs/UnifiedLeverageConfig.md @@ -0,0 +1,16 @@ +# UnifiedLeverageConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current_leverage** | **str** | Current leverage ratio | [optional] +**min_leverage** | **str** | Minimum adjustable leverage ratio | [optional] +**max_leverage** | **str** | Maximum adjustable leverage ratio | [optional] +**debit** | **str** | Current liabilities | [optional] +**available_margin** | **str** | Available Margin | [optional] +**borrowable** | **str** | The current leverage you can choose is | [optional] +**except_leverage_borrowable** | **str** | The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedLeverageSetting.md b/docs/UnifiedLeverageSetting.md new file mode 100644 index 0000000..a5ea773 --- /dev/null +++ b/docs/UnifiedLeverageSetting.md @@ -0,0 +1,12 @@ +# UnifiedLeverageSetting + +Loan currency leverage +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | +**leverage** | **str** | multiple | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedLoan.md b/docs/UnifiedLoan.md new file mode 100644 index 0000000..9bc0760 --- /dev/null +++ b/docs/UnifiedLoan.md @@ -0,0 +1,15 @@ +# UnifiedLoan + +Borrow or repay +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | +**type** | **str** | type: borrow - borrow, repay - repay | +**amount** | **str** | The amount of lending or repaying | +**repaid_all** | **bool** | Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. | [optional] +**text** | **str** | User defined custom ID | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedLoanRecord.md b/docs/UnifiedLoanRecord.md new file mode 100644 index 0000000..43d8410 --- /dev/null +++ b/docs/UnifiedLoanRecord.md @@ -0,0 +1,18 @@ +# UnifiedLoanRecord + +Loan records +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | id | [optional] [readonly] +**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly] +**repayment_type** | **str** | Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment | [optional] [readonly] +**borrow_type** | **str** | Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment | [optional] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**amount** | **str** | The amount of lending or repaying | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedLoanResult.md b/docs/UnifiedLoanResult.md new file mode 100644 index 0000000..218d159 --- /dev/null +++ b/docs/UnifiedLoanResult.md @@ -0,0 +1,11 @@ +# UnifiedLoanResult + +Unified account loan and repayment response results +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | Transaction id | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedMarginTiers.md b/docs/UnifiedMarginTiers.md new file mode 100644 index 0000000..2fb5930 --- /dev/null +++ b/docs/UnifiedMarginTiers.md @@ -0,0 +1,12 @@ +# UnifiedMarginTiers + +Unified margin tiers +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**margin_tiers** | [**list[MarginTiers]**](MarginTiers.md) | Margin tiers | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedModeSet.md b/docs/UnifiedModeSet.md new file mode 100644 index 0000000..7d564ce --- /dev/null +++ b/docs/UnifiedModeSet.md @@ -0,0 +1,11 @@ +# UnifiedModeSet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model | +**settings** | [**UnifiedSettings**](UnifiedSettings.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedPortfolioInput.md b/docs/UnifiedPortfolioInput.md new file mode 100644 index 0000000..296fdb1 --- /dev/null +++ b/docs/UnifiedPortfolioInput.md @@ -0,0 +1,17 @@ +# UnifiedPortfolioInput + +Input for the portfolio margin calculator. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spot_balances** | [**list[MockSpotBalance]**](MockSpotBalance.md) | Spot | [optional] +**spot_orders** | [**list[MockSpotOrder]**](MockSpotOrder.md) | Spot orders | [optional] +**futures_positions** | [**list[MockFuturesPosition]**](MockFuturesPosition.md) | Futures positions | [optional] +**futures_orders** | [**list[MockFuturesOrder]**](MockFuturesOrder.md) | Futures order | [optional] +**options_positions** | [**list[MockOptionsPosition]**](MockOptionsPosition.md) | Options positions | [optional] +**options_orders** | [**list[MockOptionsOrder]**](MockOptionsOrder.md) | Option orders | [optional] +**spot_hedge** | **bool** | Whether to enable spot hedging. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedPortfolioOutput.md b/docs/UnifiedPortfolioOutput.md new file mode 100644 index 0000000..11447de --- /dev/null +++ b/docs/UnifiedPortfolioOutput.md @@ -0,0 +1,14 @@ +# UnifiedPortfolioOutput + +The output of the portfolio margin calculator. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maintain_margin_total** | **str** | Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. | [optional] +**initial_margin_total** | **str** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. | [optional] +**calculate_time** | **int** | Calculate time | [optional] +**risk_unit** | [**list[MockRiskUnit]**](MockRiskUnit.md) | Risk unit | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedRiskUnits.md b/docs/UnifiedRiskUnits.md new file mode 100644 index 0000000..8765dbf --- /dev/null +++ b/docs/UnifiedRiskUnits.md @@ -0,0 +1,12 @@ +# UnifiedRiskUnits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | User ID | [optional] +**spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] +**risk_units** | [**list[RiskUnits]**](RiskUnits.md) | Risk unit | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedSettings.md b/docs/UnifiedSettings.md new file mode 100644 index 0000000..185f55e --- /dev/null +++ b/docs/UnifiedSettings.md @@ -0,0 +1,13 @@ +# UnifiedSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**usdt_futures** | **bool** | USDT contract switch. In cross-currency margin mode, it can only be turned on and not off | [optional] +**spot_hedge** | **bool** | Spot hedging switch. | [optional] +**use_funding** | **bool** | switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin | [optional] +**options** | **bool** | Option switch. In cross-currency margin mode, it can only be turned on and not off | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedTransferable.md b/docs/UnifiedTransferable.md new file mode 100644 index 0000000..69f9b19 --- /dev/null +++ b/docs/UnifiedTransferable.md @@ -0,0 +1,11 @@ +# UnifiedTransferable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | The maximum amount that can be transferred out | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserLtvInfo.md b/docs/UserLtvInfo.md new file mode 100644 index 0000000..f267508 --- /dev/null +++ b/docs/UserLtvInfo.md @@ -0,0 +1,17 @@ +# UserLtvInfo + +User's currency statistics data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collateral_currency** | **str** | Collateral | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**init_ltv** | **str** | The initial collateralization rate | [optional] +**alert_ltv** | **str** | Warning collateralization ratio | [optional] +**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] +**min_borrow_amount** | **str** | Minimum borrowable amount for the loan currency | [optional] +**left_borrowable_amount** | **str** | Remaining borrowable amount for the loan currency | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSub.md b/docs/UserSub.md new file mode 100644 index 0000000..01c7b2e --- /dev/null +++ b/docs/UserSub.md @@ -0,0 +1,13 @@ +# UserSub + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **int** | User ID | [optional] +**belong** | **str** | The system to which the user belongs (partner referral). If empty, it means not belonging to any system. | [optional] +**type** | **int** | Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) | [optional] +**ref_uid** | **int** | Inviter user ID | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSubRelation.md b/docs/UserSubRelation.md new file mode 100644 index 0000000..912227c --- /dev/null +++ b/docs/UserSubRelation.md @@ -0,0 +1,10 @@ +# UserSubRelation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**list[UserSub]**](UserSub.md) | Subordinate relationship list | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserTotalAmount.md b/docs/UserTotalAmount.md new file mode 100644 index 0000000..38d1b41 --- /dev/null +++ b/docs/UserTotalAmount.md @@ -0,0 +1,12 @@ +# UserTotalAmount + +Total borrowed amount and pledged collateral amount by the user +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**borrow_amount** | **str** | Total borrowing amount, calculated in USDT | [optional] +**collateral_amount** | **str** | Total collateral amount, calculated in USDT | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WalletApi.md b/docs/WalletApi.md new file mode 100644 index 0000000..e46a1e4 --- /dev/null +++ b/docs/WalletApi.md @@ -0,0 +1,1494 @@ +# gate_api.WalletApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency +[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address +[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records +[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records +[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts +[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts +[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts +[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account +[**get_transfer_order_status**](WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query +[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status +[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances +[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances +[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances +[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info +[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address +[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee +[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances +[**list_small_balance**](WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance +[**convert_small_balance**](WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance +[**list_small_balance_history**](WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history +[**list_push_orders**](WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history + + +# **list_currency_chains** +> list[CurrencyChain] list_currency_chains(currency) + +List chains supported for specified currency + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'GT' # str | Currency name + +try: + # List chains supported for specified currency + api_response = api_instance.list_currency_chains(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 WalletApi->list_currency_chains: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency name | + +### Return type + +[**list[CurrencyChain]**](CurrencyChain.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_deposit_address** +> DepositAddress get_deposit_address(currency) + +Generate currency deposit address + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'USDT' # str | Currency name + +try: + # Generate currency deposit address + api_response = api_instance.get_deposit_address(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 WalletApi->get_deposit_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency name | + +### Return type + +[**DepositAddress**](DepositAddress.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** | Address successfully generated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_withdrawals** +> list[WithdrawalRecord] list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset) + +Retrieve withdrawal records + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) +withdraw_id = 'withdraw_id_example' # str | The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time (optional) +asset_class = 'asset_class_example' # str | The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone (optional) +withdraw_order_id = 'withdraw_order_id_example' # str | User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) +to = 1602123600 # int | Time range ending, default to current time (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # Retrieve withdrawal records + api_response = api_instance.list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_withdrawals: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] + **withdraw_id** | **str**| The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time | [optional] + **asset_class** | **str**| The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] + **withdraw_order_id** | **str**| User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[WithdrawalRecord]**](WithdrawalRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_deposits** +> list[DepositRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) + +Retrieve deposit records + +Record time range cannot exceed 30 days + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) +to = 1602123600 # int | Time range ending, default to current time (optional) +limit = 100 # int | The maximum number of entries returned in the list is limited to 500 transactions. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # Retrieve deposit records + api_response = api_instance.list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_deposits: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **limit** | **int**| The maximum number of entries returned in the list is limited to 500 transactions. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[DepositRecord]**](DepositRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **transfer** +> TransactionID transfer(transfer) + +Transfer between trading accounts + +Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options + +### 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) +transfer = gate_api.Transfer() # Transfer | + +try: + # Transfer between trading accounts + api_response = api_instance.transfer(transfer) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->transfer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transfer** | [**Transfer**](Transfer.md)| | + +### Return type + +[**TransactionID**](TransactionID.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** | Balance transferred | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_sub_account_transfers** +> list[SubAccountTransfer] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) + +Retrieve transfer records between main and sub accounts + +Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved + +### 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) +sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) +to = 1602123600 # int | Time range ending, default to current time (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) + +try: + # Retrieve transfer records between main and sub accounts + api_response = api_instance.list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_sub_account_transfers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + +### Return type + +[**list[SubAccountTransfer]**](SubAccountTransfer.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **transfer_with_sub_account** +> TransactionID transfer_with_sub_account(sub_account_transfer) + +Transfer between main and sub accounts + +Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. + +### 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) +sub_account_transfer = gate_api.SubAccountTransfer() # SubAccountTransfer | + +try: + # Transfer between main and sub accounts + api_response = api_instance.transfer_with_sub_account(sub_account_transfer) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->transfer_with_sub_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_account_transfer** | [**SubAccountTransfer**](SubAccountTransfer.md)| | + +### Return type + +[**TransactionID**](TransactionID.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** | Balance transferred | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sub_account_to_sub_account** +> TransactionID sub_account_to_sub_account(sub_account_to_sub_account) + +Sub-account transfers to sub-account + +It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. + +### 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) +sub_account_to_sub_account = gate_api.SubAccountToSubAccount() # SubAccountToSubAccount | + +try: + # Sub-account transfers to sub-account + api_response = api_instance.sub_account_to_sub_account(sub_account_to_sub_account) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->sub_account_to_sub_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_account_to_sub_account** | [**SubAccountToSubAccount**](SubAccountToSubAccount.md)| | + +### Return type + +[**TransactionID**](TransactionID.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** | Balance transferred | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_transfer_order_status** +> TransferOrderStatus get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) + +Transfer status query + +Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +client_order_id = 'da3ce7a088c8b0372b741419c7829033' # str | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. (optional) +tx_id = '59636381286' # str | The transfer operation number and client_order_id cannot be empty at the same time (optional) + +try: + # Transfer status query + api_response = api_instance.get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->get_transfer_order_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **client_order_id** | **str**| The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] + **tx_id** | **str**| The transfer operation number and client_order_id cannot be empty at the same time | [optional] + +### Return type + +[**TransferOrderStatus**](TransferOrderStatus.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer status obtained successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_withdraw_status** +> list[WithdrawStatus] list_withdraw_status(currency=currency) + +Retrieve withdrawal status + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) + +try: + # Retrieve withdrawal status + api_response = api_instance.list_withdraw_status(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 WalletApi->list_withdraw_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + +### Return type + +[**list[WithdrawStatus]**](WithdrawStatus.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_sub_account_balances** +> list[SubAccountBalance] list_sub_account_balances(sub_uid=sub_uid) + +Retrieve sub account balances + +### 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) +sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) + +try: + # Retrieve sub account balances + api_response = api_instance.list_sub_account_balances(sub_uid=sub_uid) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_sub_account_balances: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + +### Return type + +[**list[SubAccountBalance]**](SubAccountBalance.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_sub_account_margin_balances** +> list[SubAccountMarginBalance] list_sub_account_margin_balances(sub_uid=sub_uid) + +Query sub accounts' margin balances + +### 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) +sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) + +try: + # Query sub accounts' margin balances + api_response = api_instance.list_sub_account_margin_balances(sub_uid=sub_uid) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_sub_account_margin_balances: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + +### Return type + +[**list[SubAccountMarginBalance]**](SubAccountMarginBalance.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_sub_account_futures_balances** +> list[SubAccountFuturesBalance] list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) + +Query sub accounts' futures account balances + +### 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) +sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) +settle = 'usdt' # str | Query only balances of specified settle currency (optional) + +try: + # Query sub accounts' futures account balances + api_response = api_instance.list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_sub_account_futures_balances: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + **settle** | **str**| Query only balances of specified settle currency | [optional] + +### Return type + +[**list[SubAccountFuturesBalance]**](SubAccountFuturesBalance.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_sub_account_cross_margin_balances** +> list[SubAccountCrossMarginBalance] list_sub_account_cross_margin_balances(sub_uid=sub_uid) + +Query subaccount's cross_margin account info + +### 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) +sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) + +try: + # Query subaccount's cross_margin account info + api_response = api_instance.list_sub_account_cross_margin_balances(sub_uid=sub_uid) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_sub_account_cross_margin_balances: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + +### Return type + +[**list[SubAccountCrossMarginBalance]**](SubAccountCrossMarginBalance.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_saved_address** +> list[SavedAddress] list_saved_address(currency, chain=chain, limit=limit, page=page) + +Query saved address + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'USDT' # str | Currency +chain = '' # str | Chain name (optional) (default to '') +limit = '50' # str | Maximum number returned, 100 at most (optional) (default to '50') +page = 1 # int | Page number (optional) (default to 1) + +try: + # Query saved address + api_response = api_instance.list_saved_address(currency, chain=chain, limit=limit, page=page) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_saved_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | + **chain** | **str**| Chain name | [optional] [default to ''] + **limit** | **str**| Maximum number returned, 100 at most | [optional] [default to '50'] + **page** | **int**| Page number | [optional] [default to 1] + +### Return type + +[**list[SavedAddress]**](SavedAddress.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_trade_fee** +> TradeFee get_trade_fee(currency_pair=currency_pair, settle=settle) + +Retrieve personal trading fee + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional) +settle = 'BTC' # str | Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. (optional) + +try: + # Retrieve personal trading fee + api_response = api_instance.get_trade_fee(currency_pair=currency_pair, settle=settle) + 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_trade_fee: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional] + **settle** | **str**| Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. | [optional] + +### Return type + +[**TradeFee**](TradeFee.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_total_balance** +> TotalBalance get_total_balance(currency=currency) + +Retrieve user's total balances + +This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'USDT' # str | Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. (optional) (default to 'USDT') + +try: + # Retrieve user's total balances + api_response = api_instance.get_total_balance(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 WalletApi->get_total_balance: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. | [optional] [default to 'USDT'] + +### Return type + +[**TotalBalance**](TotalBalance.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 is valid and is successfully responded | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_small_balance** +> list[SmallBalance] list_small_balance() + +List small balance + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) + +try: + # List small balance + api_response = api_instance.list_small_balance() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_small_balance: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[SmallBalance]**](SmallBalance.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **convert_small_balance** +> convert_small_balance(convert_small_balance) + +Convert small balance + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +convert_small_balance = gate_api.ConvertSmallBalance() # ConvertSmallBalance | + +try: + # Convert small balance + api_instance.convert_small_balance(convert_small_balance) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->convert_small_balance: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **convert_small_balance** | [**ConvertSmallBalance**](ConvertSmallBalance.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_small_balance_history** +> list[SmallBalanceHistory] list_small_balance_history(currency=currency, page=page, limit=limit) + +List small balance history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +currency = 'currency_example' # str | Currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) + +try: + # List small balance history + api_response = api_instance.list_small_balance_history(currency=currency, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_small_balance_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +[**list[SmallBalanceHistory]**](SmallBalanceHistory.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_push_orders** +> list[UidPushOrder] list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) + +Retrieve the UID transfer history + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WalletApi(api_client) +id = 56 # int | Order ID (optional) +_from = 56 # int | The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp (optional) +to = 56 # int | The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. (optional) +limit = 100 # int | The maximum number of items returned in the list, the default value is 100 (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +transaction_type = 'withdraw' # str | The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. (optional) (default to 'withdraw') + +try: + # Retrieve the UID transfer history + api_response = api_instance.list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WalletApi->list_push_orders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Order ID | [optional] + **_from** | **int**| The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp | [optional] + **to** | **int**| The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. | [optional] + **limit** | **int**| The maximum number of items returned in the list, the default value is 100 | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **transaction_type** | **str**| The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. | [optional] [default to 'withdraw'] + +### Return type + +[**list[UidPushOrder]**](UidPushOrder.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/WithdrawStatus.md b/docs/WithdrawStatus.md new file mode 100644 index 0000000..2b8e5de --- /dev/null +++ b/docs/WithdrawStatus.md @@ -0,0 +1,21 @@ +# WithdrawStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency | [optional] +**name** | **str** | Currency name | [optional] +**name_cn** | **str** | Currency Chinese name | [optional] +**deposit** | **str** | Deposits fee | [optional] +**withdraw_percent** | **str** | Withdrawal fee rate percentage | [optional] +**withdraw_fix** | **str** | Fixed withdrawal fee | [optional] +**withdraw_day_limit** | **str** | Daily allowed withdrawal amount | [optional] +**withdraw_amount_mini** | **str** | Minimum withdrawal amount | [optional] +**withdraw_day_limit_remain** | **str** | Daily withdrawal amount left | [optional] +**withdraw_eachtime_limit** | **str** | Maximum amount for each withdrawal | [optional] +**withdraw_fix_on_chains** | **dict(str, str)** | Fixed withdrawal fee on multiple chains | [optional] +**withdraw_percent_on_chains** | **dict(str, str)** | Percentage withdrawal fee on multiple chains | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WithdrawalApi.md b/docs/WithdrawalApi.md new file mode 100644 index 0000000..7a118ce --- /dev/null +++ b/docs/WithdrawalApi.md @@ -0,0 +1,216 @@ +# gate_api.WithdrawalApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw +[**withdraw_push_order**](WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer +[**cancel_withdrawal**](WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID + + +# **withdraw** +> LedgerRecord withdraw(ledger_record) + +Withdraw + +Withdrawals to Gate addresses do not incur transaction fees. + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WithdrawalApi(api_client) +ledger_record = gate_api.LedgerRecord() # LedgerRecord | + +try: + # Withdraw + api_response = api_instance.withdraw(ledger_record) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WithdrawalApi->withdraw: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ledger_record** | [**LedgerRecord**](LedgerRecord.md)| | + +### Return type + +[**LedgerRecord**](LedgerRecord.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** | Withdraw request is accepted. Refer to withdrawal records for status | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **withdraw_push_order** +> UidPushWithdrawalResp withdraw_push_order(uid_push_withdrawal) + +UID transfer + +Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.WithdrawalApi(api_client) +uid_push_withdrawal = gate_api.UidPushWithdrawal() # UidPushWithdrawal | + +try: + # UID transfer + api_response = api_instance.withdraw_push_order(uid_push_withdrawal) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling WithdrawalApi->withdraw_push_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uid_push_withdrawal** | [**UidPushWithdrawal**](UidPushWithdrawal.md)| | + +### Return type + +[**UidPushWithdrawalResp**](UidPushWithdrawalResp.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The request has been accepted. Check the withdrawal record status for the processing result. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_withdrawal** +> LedgerRecord cancel_withdrawal(withdrawal_id) + +Cancel withdrawal with specified 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.WithdrawalApi(api_client) +withdrawal_id = '210496' # str | + +try: + # Cancel withdrawal with specified ID + api_response = api_instance.cancel_withdrawal(withdrawal_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 WithdrawalApi->cancel_withdrawal: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **withdrawal_id** | **str**| | + +### Return type + +[**LedgerRecord**](LedgerRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Cancellation accepted. Refer to record status for the cancellation result | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md new file mode 100644 index 0000000..80a4cce --- /dev/null +++ b/docs/WithdrawalRecord.md @@ -0,0 +1,22 @@ +# WithdrawalRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Record ID | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] +**block_number** | **str** | 区块编号 | [optional] [readonly] +**withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] +**timestamp** | **str** | Operation time | [optional] [readonly] +**amount** | **str** | Currency amount | +**fee** | **str** | fee | [optional] [readonly] +**currency** | **str** | Currency name | +**fail_reason** | **str** | The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty | [optional] +**timestamp2** | **str** | The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] +**status** | **str** | Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review | [optional] [readonly] +**chain** | **str** | Name of the chain used in withdrawals | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gate_api/__init__.py b/gate_api/__init__.py new file mode 100644 index 0000000..1cf893c --- /dev/null +++ b/gate_api/__init__.py @@ -0,0 +1,297 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +__version__ = "6.97.0" + +# import apis into sdk package +from gate_api.api.earn_uni_api import EarnUniApi +from gate_api.api.margin_uni_api import MarginUniApi +from gate_api.api.sub_account_api import SubAccountApi +from gate_api.api.unified_api import UnifiedApi +from gate_api.api.account_api import AccountApi +from gate_api.api.collateral_loan_api import CollateralLoanApi +from gate_api.api.delivery_api import DeliveryApi +from gate_api.api.earn_api import EarnApi +from gate_api.api.flash_swap_api import FlashSwapApi +from gate_api.api.futures_api import FuturesApi +from gate_api.api.margin_api import MarginApi +from gate_api.api.multi_collateral_loan_api import MultiCollateralLoanApi +from gate_api.api.options_api import OptionsApi +from gate_api.api.rebate_api import RebateApi +from gate_api.api.spot_api import SpotApi +from gate_api.api.wallet_api import WalletApi +from gate_api.api.withdrawal_api import WithdrawalApi + +# import ApiClient +from gate_api.api_client import ApiClient +from gate_api.configuration import Configuration +from gate_api.exceptions import OpenApiException +from gate_api.exceptions import ApiTypeError +from gate_api.exceptions import ApiValueError +from gate_api.exceptions import ApiKeyError +from gate_api.exceptions import ApiException +# import models into sdk package +from gate_api.models.account_balance import AccountBalance +from gate_api.models.account_detail import AccountDetail +from gate_api.models.account_detail_key import AccountDetailKey +from gate_api.models.account_rate_limit import AccountRateLimit +from gate_api.models.agency_commission import AgencyCommission +from gate_api.models.agency_commission_history import AgencyCommissionHistory +from gate_api.models.agency_transaction import AgencyTransaction +from gate_api.models.agency_transaction_history import AgencyTransactionHistory +from gate_api.models.auto_repay_setting import AutoRepaySetting +from gate_api.models.batch_amend_item import BatchAmendItem +from gate_api.models.batch_amend_order_req import BatchAmendOrderReq +from gate_api.models.batch_futures_order import BatchFuturesOrder +from gate_api.models.batch_order import BatchOrder +from gate_api.models.borrow_currency_info import BorrowCurrencyInfo +from gate_api.models.broker_commission import BrokerCommission +from gate_api.models.broker_commission1 import BrokerCommission1 +from gate_api.models.broker_transaction import BrokerTransaction +from gate_api.models.broker_transaction1 import BrokerTransaction1 +from gate_api.models.cancel_batch_order import CancelBatchOrder +from gate_api.models.cancel_order_result import CancelOrderResult +from gate_api.models.collateral_adjust import CollateralAdjust +from gate_api.models.collateral_adjust_res import CollateralAdjustRes +from gate_api.models.collateral_align import CollateralAlign +from gate_api.models.collateral_currency import CollateralCurrency +from gate_api.models.collateral_currency_info import CollateralCurrencyInfo +from gate_api.models.collateral_currency_res import CollateralCurrencyRes +from gate_api.models.collateral_current_rate import CollateralCurrentRate +from gate_api.models.collateral_fix_rate import CollateralFixRate +from gate_api.models.collateral_loan_currency import CollateralLoanCurrency +from gate_api.models.collateral_ltv import CollateralLtv +from gate_api.models.collateral_order import CollateralOrder +from gate_api.models.collateral_record import CollateralRecord +from gate_api.models.contract import Contract +from gate_api.models.contract_stat import ContractStat +from gate_api.models.convert_small_balance import ConvertSmallBalance +from gate_api.models.countdown_cancel_all_futures_task import CountdownCancelAllFuturesTask +from gate_api.models.countdown_cancel_all_options_task import CountdownCancelAllOptionsTask +from gate_api.models.countdown_cancel_all_spot_task import CountdownCancelAllSpotTask +from gate_api.models.create_collateral_order import CreateCollateralOrder +from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder +from gate_api.models.create_uni_lend import CreateUniLend +from gate_api.models.create_uni_loan import CreateUniLoan +from gate_api.models.cross_margin_account import CrossMarginAccount +from gate_api.models.cross_margin_account_book import CrossMarginAccountBook +from gate_api.models.cross_margin_balance import CrossMarginBalance +from gate_api.models.cross_margin_balance1 import CrossMarginBalance1 +from gate_api.models.cross_margin_currency import CrossMarginCurrency +from gate_api.models.cross_margin_loan import CrossMarginLoan +from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest +from gate_api.models.cross_margin_repayment import CrossMarginRepayment +from gate_api.models.cross_margin_transferable import CrossMarginTransferable +from gate_api.models.currency import Currency +from gate_api.models.currency_chain import CurrencyChain +from gate_api.models.currency_pair import CurrencyPair +from gate_api.models.currency_quota import CurrencyQuota +from gate_api.models.debit_fee import DebitFee +from gate_api.models.delivery_candlestick import DeliveryCandlestick +from gate_api.models.delivery_contract import DeliveryContract +from gate_api.models.delivery_settlement import DeliverySettlement +from gate_api.models.deposit_address import DepositAddress +from gate_api.models.deposit_record import DepositRecord +from gate_api.models.dual_get_orders import DualGetOrders +from gate_api.models.dual_get_plans import DualGetPlans +from gate_api.models.eth2_rate_list import Eth2RateList +from gate_api.models.eth2_swap import Eth2Swap +from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair +from gate_api.models.flash_swap_order import FlashSwapOrder +from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview +from gate_api.models.flash_swap_order_request import FlashSwapOrderRequest +from gate_api.models.flash_swap_preview_request import FlashSwapPreviewRequest +from gate_api.models.funding_account import FundingAccount +from gate_api.models.funding_rate_record import FundingRateRecord +from gate_api.models.future_cancel_order_result import FutureCancelOrderResult +from gate_api.models.futures_account import FuturesAccount +from gate_api.models.futures_account_book import FuturesAccountBook +from gate_api.models.futures_account_history import FuturesAccountHistory +from gate_api.models.futures_auto_deleverage import FuturesAutoDeleverage +from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest +from gate_api.models.futures_candlestick import FuturesCandlestick +from gate_api.models.futures_fee import FuturesFee +from gate_api.models.futures_index_constituents import FuturesIndexConstituents +from gate_api.models.futures_initial_order import FuturesInitialOrder +from gate_api.models.futures_limit_risk_tiers import FuturesLimitRiskTiers +from gate_api.models.futures_liq_order import FuturesLiqOrder +from gate_api.models.futures_liquidate import FuturesLiquidate +from gate_api.models.futures_order import FuturesOrder +from gate_api.models.futures_order_amendment import FuturesOrderAmendment +from gate_api.models.futures_order_book import FuturesOrderBook +from gate_api.models.futures_order_book_item import FuturesOrderBookItem +from gate_api.models.futures_premium_index import FuturesPremiumIndex +from gate_api.models.futures_price_trigger import FuturesPriceTrigger +from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder +from gate_api.models.futures_ticker import FuturesTicker +from gate_api.models.futures_trade import FuturesTrade +from gate_api.models.index_constituent import IndexConstituent +from gate_api.models.inline_object import InlineObject +from gate_api.models.inline_response200 import InlineResponse200 +from gate_api.models.insurance_record import InsuranceRecord +from gate_api.models.ledger_record import LedgerRecord +from gate_api.models.liquidate_order import LiquidateOrder +from gate_api.models.margin_account import MarginAccount +from gate_api.models.margin_account_book import MarginAccountBook +from gate_api.models.margin_account_currency import MarginAccountCurrency +from gate_api.models.margin_leverage_tier import MarginLeverageTier +from gate_api.models.margin_market_leverage import MarginMarketLeverage +from gate_api.models.margin_tiers import MarginTiers +from gate_api.models.margin_transferable import MarginTransferable +from gate_api.models.max_uni_borrowable import MaxUniBorrowable +from gate_api.models.mock_futures_order import MockFuturesOrder +from gate_api.models.mock_futures_position import MockFuturesPosition +from gate_api.models.mock_margin_result import MockMarginResult +from gate_api.models.mock_options_order import MockOptionsOrder +from gate_api.models.mock_options_position import MockOptionsPosition +from gate_api.models.mock_risk_unit import MockRiskUnit +from gate_api.models.mock_spot_balance import MockSpotBalance +from gate_api.models.mock_spot_order import MockSpotOrder +from gate_api.models.multi_chain_address_item import MultiChainAddressItem +from gate_api.models.multi_collateral_currency import MultiCollateralCurrency +from gate_api.models.multi_collateral_item import MultiCollateralItem +from gate_api.models.multi_collateral_order import MultiCollateralOrder +from gate_api.models.multi_collateral_record import MultiCollateralRecord +from gate_api.models.multi_collateral_record_currency import MultiCollateralRecordCurrency +from gate_api.models.multi_loan_item import MultiLoanItem +from gate_api.models.multi_loan_repay_item import MultiLoanRepayItem +from gate_api.models.multi_repay_record import MultiRepayRecord +from gate_api.models.multi_repay_resp import MultiRepayResp +from gate_api.models.my_futures_trade import MyFuturesTrade +from gate_api.models.my_futures_trade_time_range import MyFuturesTradeTimeRange +from gate_api.models.open_orders import OpenOrders +from gate_api.models.options_account import OptionsAccount +from gate_api.models.options_account_book import OptionsAccountBook +from gate_api.models.options_candlestick import OptionsCandlestick +from gate_api.models.options_contract import OptionsContract +from gate_api.models.options_mmp import OptionsMMP +from gate_api.models.options_mmp_reset import OptionsMMPReset +from gate_api.models.options_my_settlements import OptionsMySettlements +from gate_api.models.options_my_trade import OptionsMyTrade +from gate_api.models.options_order import OptionsOrder +from gate_api.models.options_position import OptionsPosition +from gate_api.models.options_position_close import OptionsPositionClose +from gate_api.models.options_position_close_order import OptionsPositionCloseOrder +from gate_api.models.options_settlement import OptionsSettlement +from gate_api.models.options_ticker import OptionsTicker +from gate_api.models.options_underlying import OptionsUnderlying +from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker +from gate_api.models.order import Order +from gate_api.models.order_book import OrderBook +from gate_api.models.order_cancel import OrderCancel +from gate_api.models.order_patch import OrderPatch +from gate_api.models.order_resp import OrderResp +from gate_api.models.partner_commission_history import PartnerCommissionHistory +from gate_api.models.partner_sub import PartnerSub +from gate_api.models.partner_sub_list import PartnerSubList +from gate_api.models.partner_transaction_history import PartnerTransactionHistory +from gate_api.models.patch_uni_lend import PatchUniLend +from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder +from gate_api.models.position import Position +from gate_api.models.position_close import PositionClose +from gate_api.models.position_close_order import PositionCloseOrder +from gate_api.models.profit_loss_range import ProfitLossRange +from gate_api.models.rebate_user_info import RebateUserInfo +from gate_api.models.repay_currency_res import RepayCurrencyRes +from gate_api.models.repay_loan import RepayLoan +from gate_api.models.repay_multi_loan import RepayMultiLoan +from gate_api.models.repay_record import RepayRecord +from gate_api.models.repay_record_currency import RepayRecordCurrency +from gate_api.models.repay_record_left_interest import RepayRecordLeftInterest +from gate_api.models.repay_record_repaid_currency import RepayRecordRepaidCurrency +from gate_api.models.repay_record_total_interest import RepayRecordTotalInterest +from gate_api.models.repay_resp import RepayResp +from gate_api.models.risk_units import RiskUnits +from gate_api.models.saved_address import SavedAddress +from gate_api.models.small_balance import SmallBalance +from gate_api.models.small_balance_history import SmallBalanceHistory +from gate_api.models.spot_account import SpotAccount +from gate_api.models.spot_account_book import SpotAccountBook +from gate_api.models.spot_currency_chain import SpotCurrencyChain +from gate_api.models.spot_fee import SpotFee +from gate_api.models.spot_insurance_history import SpotInsuranceHistory +from gate_api.models.spot_price_put_order import SpotPricePutOrder +from gate_api.models.spot_price_trigger import SpotPriceTrigger +from gate_api.models.spot_price_triggered_order import SpotPriceTriggeredOrder +from gate_api.models.stp_group import StpGroup +from gate_api.models.stp_group_user import StpGroupUser +from gate_api.models.structured_buy import StructuredBuy +from gate_api.models.structured_get_project_list import StructuredGetProjectList +from gate_api.models.structured_order_list import StructuredOrderList +from gate_api.models.sub_account import SubAccount +from gate_api.models.sub_account_balance import SubAccountBalance +from gate_api.models.sub_account_cross_margin_balance import SubAccountCrossMarginBalance +from gate_api.models.sub_account_futures_balance import SubAccountFuturesBalance +from gate_api.models.sub_account_key import SubAccountKey +from gate_api.models.sub_account_key_perms import SubAccountKeyPerms +from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance +from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount +from gate_api.models.sub_account_transfer import SubAccountTransfer +from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount +from gate_api.models.sub_user_mode import SubUserMode +from gate_api.models.system_time import SystemTime +from gate_api.models.ticker import Ticker +from gate_api.models.total_balance import TotalBalance +from gate_api.models.trade import Trade +from gate_api.models.trade_fee import TradeFee +from gate_api.models.transaction_id import TransactionID +from gate_api.models.transfer import Transfer +from gate_api.models.transfer_order_status import TransferOrderStatus +from gate_api.models.transferables_result import TransferablesResult +from gate_api.models.trigger_order_response import TriggerOrderResponse +from gate_api.models.trigger_time import TriggerTime +from gate_api.models.uid_push_order import UidPushOrder +from gate_api.models.uid_push_withdrawal import UidPushWithdrawal +from gate_api.models.uid_push_withdrawal_resp import UidPushWithdrawalResp +from gate_api.models.uni_currency import UniCurrency +from gate_api.models.uni_currency_interest import UniCurrencyInterest +from gate_api.models.uni_currency_pair import UniCurrencyPair +from gate_api.models.uni_interest_mode import UniInterestMode +from gate_api.models.uni_interest_record import UniInterestRecord +from gate_api.models.uni_lend import UniLend +from gate_api.models.uni_lend_interest import UniLendInterest +from gate_api.models.uni_lend_record import UniLendRecord +from gate_api.models.uni_loan import UniLoan +from gate_api.models.uni_loan_interest_record import UniLoanInterestRecord +from gate_api.models.uni_loan_record import UniLoanRecord +from gate_api.models.unified_account import UnifiedAccount +from gate_api.models.unified_balance import UnifiedBalance +from gate_api.models.unified_borrowable import UnifiedBorrowable +from gate_api.models.unified_borrowable1 import UnifiedBorrowable1 +from gate_api.models.unified_currency import UnifiedCurrency +from gate_api.models.unified_discount import UnifiedDiscount +from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers +from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate +from gate_api.models.unified_history_loan_rate_rates import UnifiedHistoryLoanRateRates +from gate_api.models.unified_leverage_config import UnifiedLeverageConfig +from gate_api.models.unified_leverage_setting import UnifiedLeverageSetting +from gate_api.models.unified_loan import UnifiedLoan +from gate_api.models.unified_loan_record import UnifiedLoanRecord +from gate_api.models.unified_loan_result import UnifiedLoanResult +from gate_api.models.unified_margin_tiers import UnifiedMarginTiers +from gate_api.models.unified_mode_set import UnifiedModeSet +from gate_api.models.unified_portfolio_input import UnifiedPortfolioInput +from gate_api.models.unified_portfolio_output import UnifiedPortfolioOutput +from gate_api.models.unified_risk_units import UnifiedRiskUnits +from gate_api.models.unified_settings import UnifiedSettings +from gate_api.models.unified_transferable import UnifiedTransferable +from gate_api.models.user_ltv_info import UserLtvInfo +from gate_api.models.user_sub import UserSub +from gate_api.models.user_sub_relation import UserSubRelation +from gate_api.models.user_total_amount import UserTotalAmount +from gate_api.models.withdraw_status import WithdrawStatus +from gate_api.models.withdrawal_record import WithdrawalRecord + diff --git a/gate_api/api/__init__.py b/gate_api/api/__init__.py new file mode 100644 index 0000000..6cd727a --- /dev/null +++ b/gate_api/api/__init__.py @@ -0,0 +1,22 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from gate_api.api.earn_uni_api import EarnUniApi +from gate_api.api.margin_uni_api import MarginUniApi +from gate_api.api.sub_account_api import SubAccountApi +from gate_api.api.unified_api import UnifiedApi +from gate_api.api.account_api import AccountApi +from gate_api.api.collateral_loan_api import CollateralLoanApi +from gate_api.api.delivery_api import DeliveryApi +from gate_api.api.earn_api import EarnApi +from gate_api.api.flash_swap_api import FlashSwapApi +from gate_api.api.futures_api import FuturesApi +from gate_api.api.margin_api import MarginApi +from gate_api.api.multi_collateral_loan_api import MultiCollateralLoanApi +from gate_api.api.options_api import OptionsApi +from gate_api.api.rebate_api import RebateApi +from gate_api.api.spot_api import SpotApi +from gate_api.api.wallet_api import WalletApi +from gate_api.api.withdrawal_api import WithdrawalApi diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py new file mode 100644 index 0000000..6827757 --- /dev/null +++ b/gate_api/api/account_api.py @@ -0,0 +1,1054 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AccountApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_account_detail(self, **kwargs): # noqa: E501 + """Get account 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_account_detail(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.AccountDetail + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_account_detail_with_http_info(**kwargs) # noqa: E501 + + def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 + """Get account detail # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_account_detail_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.AccountDetail, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_account_detail" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/account/detail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountDetail', # noqa: E501 + auth_settings=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_account_rate_limit(self, **kwargs): # noqa: E501 + """Get user transaction rate limit information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_account_rate_limit(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.AccountRateLimit] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_account_rate_limit_with_http_info(**kwargs) # noqa: E501 + + def get_account_rate_limit_with_http_info(self, **kwargs): # noqa: E501 + """Get user transaction rate limit information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_account_rate_limit_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.AccountRateLimit], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_account_rate_limit" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/account/rate_limit', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AccountRateLimit]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_stp_groups(self, **kwargs): # noqa: E501 + """List STP Groups # noqa: E501 + + Retrieve the list of STP groups created by the main account user only # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_stp_groups(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str name: Perform a fuzzy search based on the name + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.StpGroup] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_stp_groups_with_http_info(**kwargs) # noqa: E501 + + def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501 + """List STP Groups # noqa: E501 + + Retrieve the list of STP groups created by the main account user only # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_stp_groups_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str name: Perform a fuzzy search based on the name + :param _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.StpGroup], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_stp_groups" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # 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( + '/account/stp_groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StpGroup]', # noqa: E501 + auth_settings=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_stp_group(self, stp_group, **kwargs): # noqa: E501 + """Create STP Group # noqa: E501 + + Only the main account is allowed to create a new STP user group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_stp_group(stp_group, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param StpGroup stp_group: (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.StpGroup + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_stp_group_with_http_info(stp_group, **kwargs) # noqa: E501 + + def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501 + """Create STP Group # noqa: E501 + + Only the main account is allowed to create a new STP user group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_stp_group_with_http_info(stp_group, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param StpGroup stp_group: (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.StpGroup, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'stp_group' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_stp_group" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'stp_group' is set + if self.api_client.client_side_validation and ('stp_group' not in local_var_params or # noqa: E501 + local_var_params['stp_group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stp_group` when calling `create_stp_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'stp_group' in local_var_params: + body_params = local_var_params['stp_group'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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( + '/account/stp_groups', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StpGroup', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 + """List users of the STP group # noqa: E501 + + Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_stp_groups_users(stp_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int stp_id: STP Group ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.StpGroupUser] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_stp_groups_users_with_http_info(stp_id, **kwargs) # noqa: E501 + + def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501 + """List users of the STP group # noqa: E501 + + Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_stp_groups_users_with_http_info(stp_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int stp_id: STP Group ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.StpGroupUser], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'stp_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_stp_groups_users" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'stp_id' is set + if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501 + local_var_params['stp_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stp_id` when calling `list_stp_groups_users`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'stp_id' in local_var_params: + path_params['stp_id'] = local_var_params['stp_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( + '/account/stp_groups/{stp_id}/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StpGroupUser]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501 + """Add users to the STP group # noqa: E501 + + - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_stp_group_users(stp_id, request_body, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int stp_id: STP Group ID (required) + :param list[int] request_body: User ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.StpGroupUser] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.add_stp_group_users_with_http_info(stp_id, request_body, **kwargs) # noqa: E501 + + def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # noqa: E501 + """Add users to the STP group # noqa: E501 + + - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_stp_group_users_with_http_info(stp_id, request_body, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int stp_id: STP Group ID (required) + :param list[int] request_body: User ID (required) + :param _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.StpGroupUser], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'stp_id', + 'request_body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_stp_group_users" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'stp_id' is set + if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501 + local_var_params['stp_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stp_id` when calling `add_stp_group_users`") # noqa: E501 + # verify the required parameter 'request_body' is set + if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501 + local_var_params['request_body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `request_body` when calling `add_stp_group_users`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'stp_id' in local_var_params: + path_params['stp_id'] = local_var_params['stp_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'request_body' in local_var_params: + body_params = local_var_params['request_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/account/stp_groups/{stp_id}/users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StpGroupUser]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 + """Delete the user in the STP group # noqa: E501 + + - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_stp_group_users(stp_id, user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int stp_id: STP Group ID (required) + :param int user_id: STP user ID, multiple can be separated by commas (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.StpGroupUser] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_stp_group_users_with_http_info(stp_id, user_id, **kwargs) # noqa: E501 + + def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # noqa: E501 + """Delete the user in the STP group # noqa: E501 + + - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_stp_group_users_with_http_info(stp_id, user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int stp_id: STP Group ID (required) + :param int user_id: STP user ID, multiple can be separated by commas (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.StpGroupUser], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'stp_id', + 'user_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_stp_group_users" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'stp_id' is set + if self.api_client.client_side_validation and ('stp_id' not in local_var_params or # noqa: E501 + local_var_params['stp_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `stp_id` when calling `delete_stp_group_users`") # noqa: E501 + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `delete_stp_group_users`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'stp_id' in local_var_params: + path_params['stp_id'] = local_var_params['stp_id'] # noqa: E501 + + query_params = [] + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/account/stp_groups/{stp_id}/users', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StpGroupUser]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_debit_fee(self, **kwargs): # noqa: E501 + """Query GT deduction configuration. # noqa: E501 + + Query the current GT deduction configuration for the account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_debit_fee(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.DebitFee + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_debit_fee_with_http_info(**kwargs) # noqa: E501 + + def get_debit_fee_with_http_info(self, **kwargs): # noqa: E501 + """Query GT deduction configuration. # noqa: E501 + + Query the current GT deduction configuration for the account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_debit_fee_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.DebitFee, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_debit_fee" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/account/debit_fee', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DebitFee', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_debit_fee(self, debit_fee, **kwargs): # noqa: E501 + """Set GT deduction. # noqa: E501 + + Enable or disable GT deduction for the current account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_debit_fee(debit_fee, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DebitFee debit_fee: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_debit_fee_with_http_info(debit_fee, **kwargs) # noqa: E501 + + def set_debit_fee_with_http_info(self, debit_fee, **kwargs): # noqa: E501 + """Set GT deduction. # noqa: E501 + + Enable or disable GT deduction for the current account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_debit_fee_with_http_info(debit_fee, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param DebitFee debit_fee: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'debit_fee' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_debit_fee" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'debit_fee' is set + if self.api_client.client_side_validation and ('debit_fee' not in local_var_params or # noqa: E501 + local_var_params['debit_fee'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `debit_fee` when calling `set_debit_fee`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'debit_fee' in local_var_params: + body_params = local_var_params['debit_fee'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/account/debit_fee', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py new file mode 100644 index 0000000..861d48e --- /dev/null +++ b/gate_api/api/collateral_loan_api.py @@ -0,0 +1,1241 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CollateralLoanApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_collateral_loan_orders(self, **kwargs): # noqa: E501 + """List 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_collateral_loan_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str collateral_currency: Collateral + :param str borrow_currency: Borrowed currency + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CollateralOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_collateral_loan_orders_with_http_info(**kwargs) # noqa: E501 + + def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 + """List 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_collateral_loan_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str collateral_currency: Collateral + :param str borrow_currency: Borrowed currency + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CollateralOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'limit', + 'collateral_currency', + 'borrow_currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_collateral_loan_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_loan_orders`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 + query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 + if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 + query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CollateralOrder]', # noqa: E501 + auth_settings=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_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E501 + """Place 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_collateral_loan(create_collateral_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateCollateralOrder create_collateral_order: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OrderResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_collateral_loan_with_http_info(create_collateral_order, **kwargs) # noqa: E501 + + def create_collateral_loan_with_http_info(self, create_collateral_order, **kwargs): # noqa: E501 + """Place 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_collateral_loan_with_http_info(create_collateral_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateCollateralOrder create_collateral_order: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OrderResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_collateral_order' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_collateral_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'create_collateral_order' is set + if self.api_client.client_side_validation and ('create_collateral_order' not in local_var_params or # noqa: E501 + local_var_params['create_collateral_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_collateral_order` when calling `create_collateral_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_collateral_order' in local_var_params: + body_params = local_var_params['create_collateral_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrderResp', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_collateral_loan_order_detail(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Order ID returned on successful order creation (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.CollateralOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_collateral_loan_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_collateral_loan_order_detail_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Order ID returned on successful order creation (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.CollateralOrder, 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_collateral_loan_order_detail" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_collateral_loan_order_detail`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CollateralOrder', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501 + """Repayment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_collateral_loan(repay_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param RepayLoan repay_loan: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.RepayResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.repay_collateral_loan_with_http_info(repay_loan, **kwargs) # noqa: E501 + + def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E501 + """Repayment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_collateral_loan_with_http_info(repay_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param RepayLoan repay_loan: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.RepayResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'repay_loan' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method repay_collateral_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'repay_loan' is set + if self.api_client.client_side_validation and ('repay_loan' not in local_var_params or # noqa: E501 + local_var_params['repay_loan'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `repay_loan` when calling `repay_collateral_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'repay_loan' in local_var_params: + body_params = local_var_params['repay_loan'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/repay', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RepayResp', # noqa: E501 + auth_settings=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_repay_records(self, source, **kwargs): # noqa: E501 + """Repayment history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_repay_records(source, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.RepayRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_repay_records_with_http_info(source, **kwargs) # noqa: E501 + + def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 + """Repayment history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_repay_records_with_http_info(source, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param _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.RepayRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'source', + 'borrow_currency', + 'collateral_currency', + 'page', + 'limit', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_repay_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'source' is set + if self.api_client.client_side_validation and ('source' not in local_var_params or # noqa: E501 + local_var_params['source'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `source` when calling `list_repay_records`") # noqa: E501 + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_repay_records`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'source' in local_var_params and local_var_params['source'] is not None: # noqa: E501 + query_params.append(('source', local_var_params['source'])) # noqa: E501 + if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 + query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 + if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 + query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/repay_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[RepayRecord]', # noqa: E501 + auth_settings=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_collateral_records(self, **kwargs): # noqa: E501 + """Query collateral adjustment records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collateral_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CollateralRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_collateral_records_with_http_info(**kwargs) # noqa: E501 + + def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 + """Query collateral adjustment records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collateral_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral + :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.CollateralRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'limit', + '_from', + 'to', + 'borrow_currency', + 'collateral_currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_collateral_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 + query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 + if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 + query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/collaterals', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CollateralRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def operate_collateral(self, collateral_align, **kwargs): # noqa: E501 + """Increase or redeem collateral # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.operate_collateral(collateral_align, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CollateralAlign collateral_align: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.operate_collateral_with_http_info(collateral_align, **kwargs) # noqa: E501 + + def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa: E501 + """Increase or redeem collateral # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.operate_collateral_with_http_info(collateral_align, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CollateralAlign collateral_align: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'collateral_align' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method operate_collateral" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'collateral_align' is set + if self.api_client.client_side_validation and ('collateral_align' not in local_var_params or # noqa: E501 + local_var_params['collateral_align'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collateral_align` when calling `operate_collateral`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'collateral_align' in local_var_params: + body_params = local_var_params['collateral_align'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/collaterals', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_total_amount(self, **kwargs): # noqa: E501 + """Query the total borrowing and collateral amount for the user # 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_total_amount(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.UserTotalAmount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_total_amount_with_http_info(**kwargs) # noqa: E501 + + def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501 + """Query the total borrowing and collateral amount for the user # 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_total_amount_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.UserTotalAmount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_total_amount" % 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( + '/loan/collateral/total_amount', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserTotalAmount', # noqa: E501 + auth_settings=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_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 + """Query user's collateralization ratio # 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_ltv_info(collateral_currency, borrow_currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str collateral_currency: Collateral (required) + :param str borrow_currency: Borrowed currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.UserLtvInfo + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_ltv_info_with_http_info(collateral_currency, borrow_currency, **kwargs) # noqa: E501 + + def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 + """Query user's collateralization ratio # 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_ltv_info_with_http_info(collateral_currency, borrow_currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str collateral_currency: Collateral (required) + :param str borrow_currency: Borrowed currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.UserLtvInfo, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'collateral_currency', + 'borrow_currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_ltv_info" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'collateral_currency' is set + if self.api_client.client_side_validation and ('collateral_currency' not in local_var_params or # noqa: E501 + local_var_params['collateral_currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collateral_currency` when calling `get_user_ltv_info`") # noqa: E501 + # verify the required parameter 'borrow_currency' is set + if self.api_client.client_side_validation and ('borrow_currency' not in local_var_params or # noqa: E501 + local_var_params['borrow_currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `borrow_currency` when calling `get_user_ltv_info`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 + query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 + if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 + query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/ltv', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserLtvInfo', # noqa: E501 + auth_settings=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_collateral_currencies(self, **kwargs): # noqa: E501 + """Query supported borrowing and collateral currencies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collateral_currencies(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CollateralLoanCurrency] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_collateral_currencies_with_http_info(**kwargs) # noqa: E501 + + def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 + """Query supported borrowing and collateral currencies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collateral_currencies_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CollateralLoanCurrency], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'loan_currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_collateral_currencies" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'loan_currency' in local_var_params and local_var_params['loan_currency'] is not None: # noqa: E501 + query_params.append(('loan_currency', local_var_params['loan_currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/loan/collateral/currencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CollateralLoanCurrency]', # noqa: E501 + auth_settings=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/delivery_api.py b/gate_api/api/delivery_api.py new file mode 100644 index 0000000..c0c689f --- /dev/null +++ b/gate_api/api/delivery_api.py @@ -0,0 +1,3765 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class DeliveryApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 + """List all futures contracts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_contracts(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.DeliveryContract] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_contracts_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 + """List all futures contracts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_contracts_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.DeliveryContract], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_contracts" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_contracts`") # 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/contracts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DeliveryContract]', # noqa: E501 + auth_settings=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_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 + """Get a single contract # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_contract(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.DeliveryContract + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_delivery_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Get a single contract # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_contract_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.DeliveryContract, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_delivery_contract" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_contract`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_delivery_contract`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/contracts/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeliveryContract', # noqa: E501 + auth_settings=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_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501 + """Futures order book # noqa: E501 + + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_order_book(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrderBook + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Futures order book # noqa: E501 + + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_order_book_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param _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.FuturesOrderBook, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'interval', + 'limit', + 'with_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_order_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_order_book`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_order_book`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value less than or equal to `50`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_order_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 + query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/order_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrderBook', # noqa: E501 + auth_settings=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_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 + """Futures trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_trades(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records to be returned in a single list + :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range + :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. + :param int to: Specify end time in Unix seconds, default to current time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesTrade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Futures trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_trades_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records to be returned in a single list + :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range + :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. + :param int to: Specify end time in Unix seconds, default to current time + :param _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.FuturesTrade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'last_id', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_trades" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_trades`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_trades`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_trades`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesTrade]', # noqa: E501 + auth_settings=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_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 + """Get futures candlesticks # noqa: E501 + + Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_candlesticks(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 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.DeliveryCandlestick] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Get futures candlesticks # noqa: E501 + + Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_candlesticks_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 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.DeliveryCandlestick], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + '_from', + 'to', + 'limit', + 'interval' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_candlesticks" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_candlesticks`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_delivery_candlesticks`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_candlesticks`, must be a value less than or equal to `2000`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/candlesticks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DeliveryCandlestick]', # noqa: E501 + auth_settings=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_delivery_tickers(self, settle, **kwargs): # noqa: E501 + """List futures tickers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_tickers(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesTicker] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_tickers_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 + """List futures tickers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_tickers_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param _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.FuturesTicker], 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 list_delivery_tickers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_tickers`") # noqa: E501 + + collection_formats = {} + + 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 = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/tickers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesTicker]', # noqa: E501 + auth_settings=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_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 + """Futures insurance balance history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_insurance_ledger(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 to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.InsuranceRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 + """Futures insurance balance history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_insurance_ledger_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 to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.InsuranceRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_insurance_ledger" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_insurance_ledger`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_insurance_ledger`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + 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 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/insurance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InsuranceRecord]', # noqa: E501 + auth_settings=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_delivery_accounts(self, settle, **kwargs): # noqa: E501 + """Query futures account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_accounts(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.FuturesAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_accounts_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 + """Query futures account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_accounts_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_accounts" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_accounts`") # 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 + # 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( + '/delivery/{settle}/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 + """Query account book # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_account_book(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 to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesAccountBook] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_account_book_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 + """Query account book # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_account_book_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 to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate + :param _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.FuturesAccountBook], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'limit', + '_from', + 'to', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_account_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_account_book`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + 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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/account_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesAccountBook]', # noqa: E501 + auth_settings=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_delivery_positions(self, settle, **kwargs): # noqa: E501 + """List all positions of a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_positions(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Position] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_positions_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E501 + """List all positions of a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_positions_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_positions" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_positions`") # 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 + # 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( + '/delivery/{settle}/positions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Position]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 + """Get single position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_position(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_delivery_position_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Get single position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_position_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_delivery_position" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_position`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_delivery_position`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/positions/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_delivery_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 + """Update position 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.update_delivery_position_margin(settle, contract, change, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_delivery_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 + + def update_delivery_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 + """Update position 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.update_delivery_position_margin_with_http_info(settle, contract, change, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'change' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_delivery_position_margin" % k + ) + 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 `update_delivery_position_margin`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_margin`") # noqa: E501 + # verify the required parameter 'change' is set + if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501 + local_var_params['change'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `change` when calling `update_delivery_position_margin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'change' in local_var_params and local_var_params['change'] is not None: # noqa: E501 + query_params.append(('change', local_var_params['change'])) # 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( + '/delivery/{settle}/positions/{contract}/margin', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 + """Update position leverage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_delivery_position_leverage(settle, contract, leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (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.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_delivery_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 + + def update_delivery_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 + """Update position leverage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_delivery_position_leverage_with_http_info(settle, contract, leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'leverage' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_delivery_position_leverage" % k + ) + 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 `update_delivery_position_leverage`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_leverage`") # noqa: E501 + # verify the required parameter 'leverage' is set + if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501 + local_var_params['leverage'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `leverage` when calling `update_delivery_position_leverage`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501 + query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501 + + 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( + '/delivery/{settle}/positions/{contract}/leverage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 + """Update position risk limit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_delivery_position_risk_limit(settle, contract, risk_limit, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New position risk limit (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.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_delivery_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 + + def update_delivery_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 + """Update position risk limit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_delivery_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New position risk limit (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.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'risk_limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_delivery_position_risk_limit" % k + ) + 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 `update_delivery_position_risk_limit`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_delivery_position_risk_limit`") # noqa: E501 + # verify the required parameter 'risk_limit' is set + if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501 + local_var_params['risk_limit'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_delivery_position_risk_limit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501 + query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501 + + header_params = {} + + 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( + '/delivery/{settle}/positions/{contract}/risk_limit', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 + """List futures orders # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_orders(settle, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str status: Only list the orders with this status (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param int count_total: Whether to return total number matched. Default to 0(no return) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 + + def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 + """List futures orders # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_orders_with_http_info(settle, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str status: Only list the orders with this status (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param int count_total: Whether to return total number matched. Default to 0(no return) + :param _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.FuturesOrder], 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', + 'last_id', + 'count_total' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_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_delivery_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_delivery_orders`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '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 '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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + if 'count_total' in local_var_params and local_var_params['count_total'] is not None: # noqa: E501 + query_params.append(('count_total', local_var_params['count_total'])) # 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( + '/delivery/{settle}/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesOrder]', # noqa: E501 + auth_settings=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_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501 + """Create a futures order # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_delivery_order(settle, futures_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param FuturesOrder futures_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.FuturesOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_delivery_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 + + def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 + """Create a futures order # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_delivery_order_with_http_info(settle, futures_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param FuturesOrder futures_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.FuturesOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'futures_order' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_delivery_order" % k + ) + 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_delivery_order`") # noqa: E501 + # verify the required parameter 'futures_order' is set + if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501 + local_var_params['futures_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `futures_order` when calling `create_delivery_order`") # noqa: E501 + + collection_formats = {} + + 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_order' in local_var_params: + body_params = local_var_params['futures_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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( + '/delivery/{settle}/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrder', # noqa: E501 + auth_settings=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_delivery_orders(self, settle, contract, **kwargs): # noqa: E501 + """Cancel all `open` orders matched # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_delivery_orders(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str side: All bids or asks. Both included if not specified + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_delivery_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Cancel all `open` orders matched # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_delivery_orders_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str side: All bids or asks. Both included if not specified + :param _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.FuturesOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'side' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_delivery_orders" % k + ) + 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_delivery_orders`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `cancel_delivery_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '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( + '/delivery/{settle}/orders', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesOrder]', # noqa: E501 + auth_settings=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_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_order(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + + def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_order_with_http_info(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _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.FuturesOrder, 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_delivery_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_delivery_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_delivery_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/delivery/{settle}/orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrder', # noqa: E501 + auth_settings=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_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 + """Cancel a single 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_delivery_order(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + + def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 + """Cancel a single order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_delivery_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 str order_id: Retrieve the data of the order with the specified 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.FuturesOrder, 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 cancel_delivery_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `cancel_delivery_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_delivery_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/delivery/{settle}/orders/{order_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrder', # noqa: E501 + auth_settings=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_my_delivery_trades(self, settle, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_my_delivery_trades(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param int count_total: Whether to return total number matched. Default to 0(no return) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MyFuturesTrade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_my_delivery_trades_with_http_info(settle, **kwargs) # noqa: E501 + + def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_my_delivery_trades_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param int count_total: Whether to return total number matched. Default to 0(no return) + :param _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.MyFuturesTrade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'order', + 'limit', + 'offset', + 'last_id', + 'count_total' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_my_delivery_trades" % k + ) + 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_my_delivery_trades`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_delivery_trades`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_delivery_trades`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'order' in local_var_params and local_var_params['order'] is not None: # noqa: E501 + query_params.append(('order', local_var_params['order'])) # 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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + if 'count_total' in local_var_params and local_var_params['count_total'] is not None: # noqa: E501 + query_params.append(('count_total', local_var_params['count_total'])) # 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( + '/delivery/{settle}/my_trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MyFuturesTrade]', # noqa: E501 + auth_settings=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_delivery_position_close(self, settle, **kwargs): # noqa: E501 + """List position close history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_position_close(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.PositionClose] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_position_close_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 + """List position close history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_position_close_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.PositionClose], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_position_close" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_position_close`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_position_close`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + 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( + '/delivery/{settle}/position_close', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PositionClose]', # noqa: E501 + auth_settings=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_delivery_liquidates(self, settle, **kwargs): # noqa: E501 + """List liquidation history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_liquidates(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify a liquidation timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesLiquidate] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_liquidates_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 + """List liquidation history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_liquidates_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify a liquidation timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesLiquidate], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'at' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_liquidates" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_liquidates`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_liquidates`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 + query_params.append(('at', local_var_params['at'])) # noqa: E501 + + 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( + '/delivery/{settle}/liquidates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesLiquidate]', # noqa: E501 + auth_settings=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_delivery_settlements(self, settle, **kwargs): # noqa: E501 + """List settlement history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_settlements(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify a settlement timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.DeliverySettlement] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_settlements_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E501 + """List settlement history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_settlements_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify a settlement timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.DeliverySettlement], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'at' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_settlements" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_settlements`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_settlements`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 + query_params.append(('at', local_var_params['at'])) # noqa: E501 + + 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( + '/delivery/{settle}/settlements', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DeliverySettlement]', # noqa: E501 + auth_settings=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_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 + """List risk limit tiers # noqa: E501 + + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_risk_limit_tiers(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FuturesLimitRiskTiers] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_delivery_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 + + def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 + """List risk limit tiers # noqa: E501 + + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_delivery_risk_limit_tiers_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.FuturesLimitRiskTiers], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_delivery_risk_limit_tiers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_delivery_risk_limit_tiers`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_risk_limit_tiers`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_delivery_risk_limit_tiers`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_delivery_risk_limit_tiers`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/delivery/{settle}/risk_limit_tiers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesLimitRiskTiers]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noqa: E501 + """List All Price-triggered 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_price_triggered_delivery_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: Only list the orders with this status (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int 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_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 + + def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 + """List All Price-triggered 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_price_triggered_delivery_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: Only list the orders with this status (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int 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_delivery_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_price_triggered_delivery_orders`") # noqa: E501 + # verify the required parameter 'status' is set + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `status` when calling `list_price_triggered_delivery_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_price_triggered_delivery_orders`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + 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( + '/delivery/{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_delivery_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 + """Create a 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_delivery_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_delivery_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501 + + def create_price_triggered_delivery_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 + """Create a price-triggered order # noqa: E501 + + 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_delivery_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_delivery_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `create_price_triggered_delivery_order`") # noqa: E501 + # verify the required parameter 'futures_price_triggered_order' is set + if self.api_client.client_side_validation and ('futures_price_triggered_order' not in local_var_params or # noqa: E501 + local_var_params['futures_price_triggered_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `futures_price_triggered_order` when calling `create_price_triggered_delivery_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/delivery/{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_delivery_order_list(self, settle, contract, **kwargs): # noqa: E501 + """Cancel All Price-triggered 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_delivery_order_list(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FuturesPriceTriggeredOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_price_triggered_delivery_order_list_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Cancel All Price-triggered 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_delivery_order_list_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.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_delivery_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_delivery_order_list`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `cancel_price_triggered_delivery_order_list`") # noqa: E501 + + collection_formats = {} + + 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( + '/delivery/{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_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 + """Get a 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.get_price_triggered_delivery_order(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + + def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 + """Get a price-triggered order # noqa: E501 + + 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_delivery_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 str order_id: Retrieve the data of the order with the specified 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.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_delivery_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_price_triggered_delivery_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_price_triggered_delivery_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/delivery/{settle}/price_orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='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 cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 + """cancel a 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.cancel_price_triggered_delivery_order(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.cancel_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + + def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 + """cancel a price-triggered order # noqa: E501 + + 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_delivery_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 str order_id: Retrieve the data of the order with the specified 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.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 cancel_price_triggered_delivery_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_delivery_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_price_triggered_delivery_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/delivery/{settle}/price_orders/{order_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='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) diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py new file mode 100644 index 0000000..debcadf --- /dev/null +++ b/gate_api/api/earn_api.py @@ -0,0 +1,977 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EarnApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 + """ETH2 swap # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.swap_eth2(eth2_swap, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param Eth2Swap eth2_swap: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.swap_eth2_with_http_info(eth2_swap, **kwargs) # noqa: E501 + + def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 + """ETH2 swap # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.swap_eth2_with_http_info(eth2_swap, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param Eth2Swap eth2_swap: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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 = [ + 'eth2_swap' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method swap_eth2" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'eth2_swap' is set + if self.api_client.client_side_validation and ('eth2_swap' not in local_var_params or # noqa: E501 + local_var_params['eth2_swap'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `eth2_swap` when calling `swap_eth2`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'eth2_swap' in local_var_params: + body_params = local_var_params['eth2_swap'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/staking/eth2/swap', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def rate_list_eth2(self, **kwargs): # noqa: E501 + """ETH2 historical rate of return query # noqa: E501 + + Check the ETH earnings rate record for the last 31 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rate_list_eth2(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Eth2RateList] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.rate_list_eth2_with_http_info(**kwargs) # noqa: E501 + + def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 + """ETH2 historical rate of return query # noqa: E501 + + Check the ETH earnings rate record for the last 31 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rate_list_eth2_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Eth2RateList], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method rate_list_eth2" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/staking/eth2/rate_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Eth2RateList]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_dual_investment_plans(self, **kwargs): # noqa: E501 + """Dual Investment product list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_dual_investment_plans(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int plan_id: Financial project id + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.DualGetPlans] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_dual_investment_plans_with_http_info(**kwargs) # noqa: E501 + + def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 + """Dual Investment product list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_dual_investment_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int plan_id: Financial project id + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.DualGetPlans], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'plan_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_dual_investment_plans" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'plan_id' in local_var_params and local_var_params['plan_id'] is not None: # noqa: E501 + query_params.append(('plan_id', local_var_params['plan_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/earn/dual/investment_plan', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DualGetPlans]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_dual_orders(self, **kwargs): # noqa: E501 + """Dual Investment order list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_dual_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start checkout time + :param int to: End settlement time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.DualGetOrders] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_dual_orders_with_http_info(**kwargs) # noqa: E501 + + def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 + """Dual Investment order list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_dual_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start checkout time + :param int to: End settlement time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.DualGetOrders], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '_from', + 'to', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_dual_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_dual_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_dual_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_dual_orders`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/dual/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DualGetOrders]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def place_dual_order(self, place_dual_investment_order, **kwargs): # noqa: E501 + """Place Dual Investment order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_dual_order(place_dual_investment_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PlaceDualInvestmentOrder place_dual_investment_order: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.place_dual_order_with_http_info(place_dual_investment_order, **kwargs) # noqa: E501 + + def place_dual_order_with_http_info(self, place_dual_investment_order, **kwargs): # noqa: E501 + """Place Dual Investment order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_dual_order_with_http_info(place_dual_investment_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PlaceDualInvestmentOrder place_dual_investment_order: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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 = [ + 'place_dual_investment_order' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method place_dual_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'place_dual_investment_order' is set + if self.api_client.client_side_validation and ('place_dual_investment_order' not in local_var_params or # noqa: E501 + local_var_params['place_dual_investment_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `place_dual_investment_order` when calling `place_dual_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'place_dual_investment_order' in local_var_params: + body_params = local_var_params['place_dual_investment_order'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/dual/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_structured_products(self, status, **kwargs): # noqa: E501 + """Structured Product List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_structured_products(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish (required) + :param str type: Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.StructuredGetProjectList] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_structured_products_with_http_info(status, **kwargs) # noqa: E501 + + def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E501 + """Structured Product List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_structured_products_with_http_info(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish (required) + :param str type: Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.StructuredGetProjectList], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'type', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_structured_products" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'status' is set + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `status` when calling `list_structured_products`") # noqa: E501 + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_structured_products`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_products`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_products`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/earn/structured/products', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StructuredGetProjectList]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_structured_orders(self, **kwargs): # noqa: E501 + """Structured Product Order List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_structured_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start timestamp + :param int to: End timestamp + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.StructuredOrderList] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_structured_orders_with_http_info(**kwargs) # noqa: E501 + + def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 + """Structured Product Order List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_structured_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start timestamp + :param int to: End timestamp + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.StructuredOrderList], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '_from', + 'to', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_structured_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_structured_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_structured_orders`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/structured/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StructuredOrderList]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 + """Place Structured Product Order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_structured_order(structured_buy, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param StructuredBuy structured_buy: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.place_structured_order_with_http_info(structured_buy, **kwargs) # noqa: E501 + + def place_structured_order_with_http_info(self, structured_buy, **kwargs): # noqa: E501 + """Place Structured Product Order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_structured_order_with_http_info(structured_buy, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param StructuredBuy structured_buy: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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 = [ + 'structured_buy' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method place_structured_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'structured_buy' is set + if self.api_client.client_side_validation and ('structured_buy' not in local_var_params or # noqa: E501 + local_var_params['structured_buy'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `structured_buy` when calling `place_structured_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'structured_buy' in local_var_params: + body_params = local_var_params['structured_buy'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/structured/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py new file mode 100644 index 0000000..0921f96 --- /dev/null +++ b/gate_api/api/earn_uni_api.py @@ -0,0 +1,1345 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EarnUniApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_uni_currencies(self, **kwargs): # noqa: E501 + """List currencies for lending # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_currencies(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniCurrency] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_currencies_with_http_info(**kwargs) # noqa: E501 + + def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501 + """List currencies for lending # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_currencies_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniCurrency], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_currencies" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/currencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniCurrency]', # noqa: E501 + auth_settings=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_uni_currency(self, currency, **kwargs): # noqa: E501 + """Get currency detail for lending # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_currency(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UniCurrency + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_uni_currency_with_http_info(currency, **kwargs) # noqa: E501 + + def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get currency detail for lending # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_currency_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UniCurrency, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_uni_currency" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_currency`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'currency' in local_var_params: + path_params['currency'] = local_var_params['currency'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/currencies/{currency}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UniCurrency', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_user_uni_lends(self, **kwargs): # noqa: E501 + """List user's lending 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_user_uni_lends(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniLend] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_user_uni_lends_with_http_info(**kwargs) # noqa: E501 + + def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 + """List user's lending orders # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_user_uni_lends_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniLend], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_user_uni_lends" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_user_uni_lends`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/lends', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLend]', # noqa: E501 + auth_settings=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_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 + """Lend or redeem # noqa: E501 + + `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_uni_lend(create_uni_lend, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateUniLend create_uni_lend: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_uni_lend_with_http_info(create_uni_lend, **kwargs) # noqa: E501 + + def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E501 + """Lend or redeem # noqa: E501 + + `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_uni_lend_with_http_info(create_uni_lend, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateUniLend create_uni_lend: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_uni_lend' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_uni_lend" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'create_uni_lend' is set + if self.api_client.client_side_validation and ('create_uni_lend' not in local_var_params or # noqa: E501 + local_var_params['create_uni_lend'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_uni_lend` when calling `create_uni_lend`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_uni_lend' in local_var_params: + body_params = local_var_params['create_uni_lend'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/lends', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501 + """Amend lending order # noqa: E501 + + Currently only supports amending the minimum interest rate (hour) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.change_uni_lend(patch_uni_lend, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PatchUniLend patch_uni_lend: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.change_uni_lend_with_http_info(patch_uni_lend, **kwargs) # noqa: E501 + + def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E501 + """Amend lending order # noqa: E501 + + Currently only supports amending the minimum interest rate (hour) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.change_uni_lend_with_http_info(patch_uni_lend, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PatchUniLend patch_uni_lend: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'patch_uni_lend' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method change_uni_lend" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'patch_uni_lend' is set + if self.api_client.client_side_validation and ('patch_uni_lend' not in local_var_params or # noqa: E501 + local_var_params['patch_uni_lend'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `patch_uni_lend` when calling `change_uni_lend`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'patch_uni_lend' in local_var_params: + body_params = local_var_params['patch_uni_lend'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/lends', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_uni_lend_records(self, **kwargs): # noqa: E501 + """List records of lending # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_lend_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: type: lend - lend, redeem - redeem + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.UniLendRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_lend_records_with_http_info(**kwargs) # noqa: E501 + + def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 + """List records of lending # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_lend_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: type: lend - lend, redeem - redeem + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.UniLendRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit', + '_from', + 'to', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_lend_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_lend_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/lend_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLendRecord]', # noqa: E501 + auth_settings=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_uni_interest(self, currency, **kwargs): # noqa: E501 + """Get the user's total interest income of specified currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_interest(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UniLendInterest + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_uni_interest_with_http_info(currency, **kwargs) # noqa: E501 + + def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get the user's total interest income of specified currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_interest_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UniLendInterest, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_uni_interest" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_interest`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'currency' in local_var_params: + path_params['currency'] = local_var_params['currency'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/interests/{currency}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UniLendInterest', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_uni_interest_records(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_interest_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.UniInterestRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_interest_records_with_http_info(**kwargs) # noqa: E501 + + def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_interest_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp + :param int to: End timestamp + :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.UniInterestRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_interest_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/interest_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniInterestRecord]', # noqa: E501 + auth_settings=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 switch_interest_reinvest(self, uni_interest_mode, **kwargs): # noqa: E501 + """Set interest reinvestment toggle # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.switch_interest_reinvest(uni_interest_mode, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UniInterestMode uni_interest_mode: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.switch_interest_reinvest_with_http_info(uni_interest_mode, **kwargs) # noqa: E501 + + def switch_interest_reinvest_with_http_info(self, uni_interest_mode, **kwargs): # noqa: E501 + """Set interest reinvestment toggle # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.switch_interest_reinvest_with_http_info(uni_interest_mode, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UniInterestMode uni_interest_mode: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'uni_interest_mode' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method switch_interest_reinvest" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'uni_interest_mode' is set + if self.api_client.client_side_validation and ('uni_interest_mode' not in local_var_params or # noqa: E501 + local_var_params['uni_interest_mode'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `uni_interest_mode` when calling `switch_interest_reinvest`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'uni_interest_mode' in local_var_params: + body_params = local_var_params['uni_interest_mode'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/interest_reinvest', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 + """query currency interest compounding status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_interest_status(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UniCurrencyInterest + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_uni_interest_status_with_http_info(currency, **kwargs) # noqa: E501 + + def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E501 + """query currency interest compounding status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_interest_status_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UniCurrencyInterest, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_uni_interest_status" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_interest_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'currency' in local_var_params: + path_params['currency'] = local_var_params['currency'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/interest_status/{currency}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UniCurrencyInterest', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 + """UniLoan currency annualized trend chart # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:22+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start timestamp, unit s, maximum span of 30 days (required) + :param int to: End timestamp, unit s, maximum span of 30 days (required) + :param str asset: Currency name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.InlineResponse200] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_chart_with_http_info(_from, to, asset, **kwargs) # noqa: E501 + + def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 + """UniLoan currency annualized trend chart # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:22+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start timestamp, unit s, maximum span of 30 days (required) + :param int to: End timestamp, unit s, maximum span of 30 days (required) + :param str asset: Currency name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.InlineResponse200], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '_from', + 'to', + 'asset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_chart" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter '_from' is set + if self.api_client.client_side_validation and ('_from' not in local_var_params or # noqa: E501 + local_var_params['_from'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_from` when calling `list_uni_chart`") # noqa: E501 + # verify the required parameter 'to' is set + if self.api_client.client_side_validation and ('to' not in local_var_params or # noqa: E501 + local_var_params['to'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `to` when calling `list_uni_chart`") # noqa: E501 + # verify the required parameter 'asset' is set + if self.api_client.client_side_validation and ('asset' not in local_var_params or # noqa: E501 + local_var_params['asset'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `asset` when calling `list_uni_chart`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'asset' in local_var_params and local_var_params['asset'] is not None: # noqa: E501 + query_params.append(('asset', local_var_params['asset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/chart', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InlineResponse200]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py new file mode 100644 index 0000000..a01a23c --- /dev/null +++ b/gate_api/api/flash_swap_api.py @@ -0,0 +1,648 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class FlashSwapApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 + """List All Supported Currency Pairs In Flash Swap # noqa: E501 + + `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_flash_swap_currency_pair(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FlashSwapCurrencyPair] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_flash_swap_currency_pair_with_http_info(**kwargs) # noqa: E501 + + def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 + """List All Supported Currency Pairs In Flash Swap # noqa: E501 + + `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_flash_swap_currency_pair_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000 + :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.FlashSwapCurrencyPair], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_flash_swap_currency_pair" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_flash_swap_currency_pair`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_currency_pair`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_currency_pair`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/flash_swap/currency_pairs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FlashSwapCurrencyPair]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_flash_swap_orders(self, **kwargs): # noqa: E501 + """List all flash swap 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_flash_swap_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int status: Flash swap order status `1` - success `2` - failure + :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` + :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` + :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) + :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FlashSwapOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_flash_swap_orders_with_http_info(**kwargs) # noqa: E501 + + def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 + """List all flash swap orders # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_flash_swap_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int status: Flash swap order status `1` - success `2` - failure + :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` + :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` + :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) + :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.FlashSwapOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'sell_currency', + 'buy_currency', + 'reverse', + 'limit', + 'page' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_flash_swap_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_flash_swap_orders`, must be a value greater than or equal to `1`") # noqa: E501 + 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 'sell_currency' in local_var_params and local_var_params['sell_currency'] is not None: # noqa: E501 + query_params.append(('sell_currency', local_var_params['sell_currency'])) # noqa: E501 + if 'buy_currency' in local_var_params and local_var_params['buy_currency'] is not None: # noqa: E501 + query_params.append(('buy_currency', local_var_params['buy_currency'])) # noqa: E501 + if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 + query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/flash_swap/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FlashSwapOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_flash_swap_order(self, flash_swap_order_request, **kwargs): # noqa: E501 + """Create a flash swap order # noqa: E501 + + Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_flash_swap_order(flash_swap_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapOrderRequest flash_swap_order_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.FlashSwapOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_flash_swap_order_with_http_info(flash_swap_order_request, **kwargs) # noqa: E501 + + def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwargs): # noqa: E501 + """Create a flash swap order # noqa: E501 + + Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_flash_swap_order_with_http_info(flash_swap_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapOrderRequest flash_swap_order_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.FlashSwapOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'flash_swap_order_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_flash_swap_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'flash_swap_order_request' is set + if self.api_client.client_side_validation and ('flash_swap_order_request' not in local_var_params or # noqa: E501 + local_var_params['flash_swap_order_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `flash_swap_order_request` when calling `create_flash_swap_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'flash_swap_order_request' in local_var_params: + body_params = local_var_params['flash_swap_order_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/flash_swap/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapOrder', # noqa: E501 + auth_settings=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_flash_swap_order(self, order_id, **kwargs): # noqa: E501 + """Get a single flash swap order's 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_flash_swap_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Flash swap order ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.FlashSwapOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_flash_swap_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Get a single flash swap order's detail # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_flash_swap_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Flash swap order ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.FlashSwapOrder, 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_flash_swap_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_flash_swap_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/flash_swap/orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapOrder', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noqa: E501 + """Initiate a flash swap order preview # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_order(flash_swap_preview_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapPreviewRequest flash_swap_preview_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.FlashSwapOrderPreview + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.preview_flash_swap_order_with_http_info(flash_swap_preview_request, **kwargs) # noqa: E501 + + def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **kwargs): # noqa: E501 + """Initiate a flash swap order preview # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.preview_flash_swap_order_with_http_info(flash_swap_preview_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FlashSwapPreviewRequest flash_swap_preview_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.FlashSwapOrderPreview, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'flash_swap_preview_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method preview_flash_swap_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'flash_swap_preview_request' is set + if self.api_client.client_side_validation and ('flash_swap_preview_request' not in local_var_params or # noqa: E501 + local_var_params['flash_swap_preview_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `flash_swap_preview_request` when calling `preview_flash_swap_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'flash_swap_preview_request' in local_var_params: + body_params = local_var_params['flash_swap_preview_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/flash_swap/orders/preview', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlashSwapOrderPreview', # noqa: E501 + auth_settings=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 new file mode 100644 index 0000000..7f80fab --- /dev/null +++ b/gate_api/api/futures_api.py @@ -0,0 +1,6385 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class FuturesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_futures_contracts(self, settle, **kwargs): # noqa: E501 + """List all futures contracts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_contracts(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 to be 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_with_http_info(settle, **kwargs) # noqa: E501 + + def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 + """List all futures contracts # noqa: E501 + + 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_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 to be 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" % 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`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_contracts`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_contracts`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_contracts`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + 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', '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 + """Get a single contract # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_contract(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.Contract + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_futures_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Get a single contract # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_contract_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(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', + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_futures_contract" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_contract`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_futures_contract`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/contracts/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='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 list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501 + """Futures order book # noqa: E501 + + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_order_book(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrderBook + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Futures order book # noqa: E501 + + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_order_book_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param _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.FuturesOrderBook, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'interval', + 'limit', + 'with_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_order_book" % k + ) + 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_order_book`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_order_book`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value less than or equal to `50`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_order_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 + query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/order_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrderBook', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 + """Futures trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_trades(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range + :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. + :param int to: Specify end time in Unix seconds, default to current time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesTrade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Futures trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_trades_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range + :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. + :param int to: Specify end time in Unix seconds, default to current time + :param _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.FuturesTrade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'offset', + 'last_id', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_trades" % k + ) + 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_trades`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_trades`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_trades`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_trades`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesTrade]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 + """Get futures candlesticks # noqa: E501 + + Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_candlesticks(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesCandlestick] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Get futures candlesticks # noqa: E501 + + Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_candlesticks_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesCandlestick], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + '_from', + 'to', + 'limit', + 'interval' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_candlesticks" % k + ) + 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_candlesticks`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_candlesticks`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_candlesticks`, must be a value less than or equal to `2000`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + + 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}/candlesticks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesCandlestick]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 + """Premium Index K-Line # noqa: E501 + + Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_premium_index(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesPremiumIndex] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_premium_index_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Premium Index K-Line # noqa: E501 + + Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_premium_index_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesPremiumIndex], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + '_from', + 'to', + 'limit', + 'interval' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_premium_index" % k + ) + 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_premium_index`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_premium_index`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 2000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_premium_index`, must be a value less than or equal to `2000`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + + 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}/premium_index', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesPremiumIndex]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_tickers(self, settle, **kwargs): # noqa: E501 + """List futures tickers # 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_tickers(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.FuturesTicker] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_tickers_with_http_info(settle, **kwargs) # noqa: E501 + + def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 + """List futures tickers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_tickers_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.FuturesTicker], 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 list_futures_tickers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_tickers`") # noqa: E501 + + collection_formats = {} + + 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 = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/tickers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesTicker]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa: E501 + """Funding rate history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_funding_rate_history(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FundingRateRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_funding_rate_history_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_futures_funding_rate_history_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Funding rate history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_funding_rate_history_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :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.FundingRateRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_funding_rate_history" % k + ) + 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_funding_rate_history`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_futures_funding_rate_history`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_funding_rate_history`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/funding_rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FundingRateRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 + """Futures insurance balance history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_insurance_ledger(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 to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.InsuranceRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 + + def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 + """Futures insurance balance history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_insurance_ledger_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 to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.InsuranceRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_insurance_ledger" % k + ) + 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_insurance_ledger`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_insurance_ledger`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + 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 + + 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}/insurance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InsuranceRecord]', # noqa: E501 + auth_settings=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_contract_stats(self, settle, contract, **kwargs): # noqa: E501 + """Futures stats # 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_contract_stats(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start timestamp + :param str interval: + :param int limit: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.ContractStat] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_contract_stats_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Futures stats # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_contract_stats_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start timestamp + :param str interval: + :param int limit: + :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.ContractStat], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + '_from', + 'interval', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_contract_stats" % k + ) + 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_contract_stats`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_contract_stats`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_contract_stats`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/contract_stats', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ContractStat]', # noqa: E501 + auth_settings=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_index_constituents(self, settle, index, **kwargs): # noqa: E501 + """Get index constituents # 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_index_constituents(settle, index, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str index: Index name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.FuturesIndexConstituents + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_index_constituents_with_http_info(settle, index, **kwargs) # noqa: E501 + + def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noqa: E501 + """Get index constituents # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_index_constituents_with_http_info(settle, index, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str index: Index name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.FuturesIndexConstituents, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'index' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_index_constituents" % k + ) + 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_index_constituents`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in local_var_params or # noqa: E501 + local_var_params['index'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `index` when calling `get_index_constituents`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'index' in local_var_params: + path_params['index'] = local_var_params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/index_constituents/{index}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesIndexConstituents', # noqa: E501 + auth_settings=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_liquidated_orders(self, settle, **kwargs): # noqa: E501 + """Retrieve liquidation history # noqa: E501 + + Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_liquidated_orders(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int _from: Start timestamp + :param int to: End timestamp + :param int limit: Maximum number of records to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FuturesLiqOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_liquidated_orders_with_http_info(settle, **kwargs) # noqa: E501 + + def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 + """Retrieve liquidation history # noqa: E501 + + Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_liquidated_orders_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int _from: Start timestamp + :param int to: End timestamp + :param int limit: Maximum number of records to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.FuturesLiqOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + '_from', + 'to', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_liquidated_orders" % k + ) + 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_liquidated_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidated_orders`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + 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}/liq_orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesLiqOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 + """List risk limit tiers # noqa: E501 + + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_risk_limit_tiers(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FuturesLimitRiskTiers] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 + + def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 + """List risk limit tiers # noqa: E501 + + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_risk_limit_tiers_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.FuturesLimitRiskTiers], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_risk_limit_tiers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `list_futures_risk_limit_tiers`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_risk_limit_tiers`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_risk_limit_tiers`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_risk_limit_tiers`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/risk_limit_tiers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesLimitRiskTiers]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_accounts(self, settle, **kwargs): # noqa: E501 + """Query futures account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_accounts(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.FuturesAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_accounts_with_http_info(settle, **kwargs) # noqa: E501 + + def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 + """Query futures account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_accounts_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_accounts" % k + ) + 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_accounts`") # 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 + # 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}/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_account_book(self, settle, **kwargs): # noqa: E501 + """Query account book # noqa: E501 + + If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_account_book(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesAccountBook] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_account_book_with_http_info(settle, **kwargs) # noqa: E501 + + def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 + """Query account book # noqa: E501 + + If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_account_book_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction + :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.FuturesAccountBook], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'offset', + '_from', + 'to', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_account_book" % k + ) + 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_account_book`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_account_book`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/account_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesAccountBook]', # noqa: E501 + auth_settings=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_positions(self, settle, **kwargs): # noqa: E501 + """List all positions of a user # 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_positions(settle, async_req=True) + >>> result = thread.get() + + :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 to be 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.Position] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_positions_with_http_info(settle, **kwargs) # noqa: E501 + + def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 + """List all positions of a user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_positions_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :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 to be 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.Position], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'holding', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_positions" % k + ) + 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_positions`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_positions`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_positions`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'holding' in local_var_params and local_var_params['holding'] is not None: # noqa: E501 + query_params.append(('holding', local_var_params['holding'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + 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}/positions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Position]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_position(self, settle, contract, **kwargs): # noqa: E501 + """Get single position # 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_position(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_position_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Get single position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_position_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_position" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_position`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_position`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/positions/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 + """Update position 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.update_position_margin(settle, contract, change, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 + + def update_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 + """Update position 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.update_position_margin_with_http_info(settle, contract, change, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (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.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'change' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_position_margin" % k + ) + 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 `update_position_margin`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_position_margin`") # noqa: E501 + # verify the required parameter 'change' is set + if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501 + local_var_params['change'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `change` when calling `update_position_margin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'change' in local_var_params and local_var_params['change'] is not None: # noqa: E501 + query_params.append(('change', local_var_params['change'])) # 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}/positions/{contract}/margin', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 + """Update position leverage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_position_leverage(settle, contract, leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 + + def update_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 + """Update position leverage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_position_leverage_with_http_info(settle, contract, leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'leverage', + 'cross_leverage_limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_position_leverage" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `update_position_leverage`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_position_leverage`") # noqa: E501 + # verify the required parameter 'leverage' is set + if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501 + local_var_params['leverage'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `leverage` when calling `update_position_leverage`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501 + query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501 + if 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None: # noqa: E501 + query_params.append(('cross_leverage_limit', local_var_params['cross_leverage_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( + '/futures/{settle}/positions/{contract}/leverage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_position_cross_mode(self, settle, inline_object, **kwargs): # noqa: E501 + """Switch to the full position-by-store mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_position_cross_mode(settle, inline_object, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param InlineObject inline_object: (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.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_position_cross_mode_with_http_info(settle, inline_object, **kwargs) # noqa: E501 + + def update_position_cross_mode_with_http_info(self, settle, inline_object, **kwargs): # noqa: E501 + """Switch to the full position-by-store mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_position_cross_mode_with_http_info(settle, inline_object, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param InlineObject inline_object: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'inline_object' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_position_cross_mode" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `update_position_cross_mode`") # noqa: E501 + # verify the required parameter 'inline_object' is set + if self.api_client.client_side_validation and ('inline_object' not in local_var_params or # noqa: E501 + local_var_params['inline_object'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inline_object` when calling `update_position_cross_mode`") # 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 'inline_object' in local_var_params: + body_params = local_var_params['inline_object'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/positions/cross_mode', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 + """Update position risk limit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_position_risk_limit(settle, contract, risk_limit, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New Risk Limit Value (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Position + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 + + def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 + """Update position risk limit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New Risk Limit Value (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Position, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'risk_limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_position_risk_limit" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `update_position_risk_limit`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_position_risk_limit`") # noqa: E501 + # verify the required parameter 'risk_limit' is set + if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501 + local_var_params['risk_limit'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_position_risk_limit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501 + query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501 + + header_params = {} + + 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}/positions/{contract}/risk_limit', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Position', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 + """Enable or disable dual mode # noqa: E501 + + Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_dual_mode(settle, dual_mode, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param bool dual_mode: Whether to enable dual mode (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.FuturesAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_dual_mode_with_http_info(settle, dual_mode, **kwargs) # noqa: E501 + + def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E501 + """Enable or disable dual mode # noqa: E501 + + Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_dual_mode_with_http_info(settle, dual_mode, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param bool dual_mode: Whether to enable dual mode (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.FuturesAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'dual_mode' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_dual_mode" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `set_dual_mode`") # noqa: E501 + # verify the required parameter 'dual_mode' is set + if self.api_client.client_side_validation and ('dual_mode' not in local_var_params or # noqa: E501 + local_var_params['dual_mode'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `dual_mode` when calling `set_dual_mode`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'dual_mode' in local_var_params and local_var_params['dual_mode'] is not None: # noqa: E501 + query_params.append(('dual_mode', local_var_params['dual_mode'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/dual_mode', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 + """Retrieve position detail in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dual_mode_position(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Position] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_dual_mode_position_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Retrieve position detail in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dual_mode_position_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_dual_mode_position" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_dual_mode_position`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_dual_mode_position`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/dual_comp/positions/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Position]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_dual_mode_position_margin(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 + """Update position margin in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_mode_position_margin(settle, contract, change, dual_side, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str dual_side: Long or short position (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Position] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_dual_mode_position_margin_with_http_info(settle, contract, change, dual_side, **kwargs) # noqa: E501 + + def update_dual_mode_position_margin_with_http_info(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 + """Update position margin in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_mode_position_margin_with_http_info(settle, contract, change, dual_side, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str dual_side: Long or short position (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'change', + 'dual_side' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_dual_mode_position_margin" % k + ) + 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 `update_dual_mode_position_margin`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_margin`") # noqa: E501 + # verify the required parameter 'change' is set + if self.api_client.client_side_validation and ('change' not in local_var_params or # noqa: E501 + local_var_params['change'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `change` when calling `update_dual_mode_position_margin`") # noqa: E501 + # verify the required parameter 'dual_side' is set + if self.api_client.client_side_validation and ('dual_side' not in local_var_params or # noqa: E501 + local_var_params['dual_side'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `dual_side` when calling `update_dual_mode_position_margin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'change' in local_var_params and local_var_params['change'] is not None: # noqa: E501 + query_params.append(('change', local_var_params['change'])) # noqa: E501 + if 'dual_side' in local_var_params and local_var_params['dual_side'] is not None: # noqa: E501 + query_params.append(('dual_side', local_var_params['dual_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}/dual_comp/positions/{contract}/margin', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Position]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 + """Update position leverage in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_mode_position_leverage(settle, contract, leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Position] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_dual_mode_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 + + def update_dual_mode_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 + """Update position leverage in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_mode_position_leverage_with_http_info(settle, contract, leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'leverage', + 'cross_leverage_limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_dual_mode_position_leverage" % k + ) + 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 `update_dual_mode_position_leverage`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_leverage`") # noqa: E501 + # verify the required parameter 'leverage' is set + if self.api_client.client_side_validation and ('leverage' not in local_var_params or # noqa: E501 + local_var_params['leverage'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `leverage` when calling `update_dual_mode_position_leverage`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'leverage' in local_var_params and local_var_params['leverage'] is not None: # noqa: E501 + query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501 + if 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None: # noqa: E501 + query_params.append(('cross_leverage_limit', local_var_params['cross_leverage_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( + '/futures/{settle}/dual_comp/positions/{contract}/leverage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Position]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 + """Update position risk limit in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_mode_position_risk_limit(settle, contract, risk_limit, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New Risk Limit Value (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Position] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_dual_mode_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 + + def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 + """Update position risk limit in dual mode # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_mode_position_risk_limit_with_http_info(settle, contract, risk_limit, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New Risk Limit Value (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'risk_limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_dual_mode_position_risk_limit" % k + ) + 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 `update_dual_mode_position_risk_limit`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `update_dual_mode_position_risk_limit`") # noqa: E501 + # verify the required parameter 'risk_limit' is set + if self.api_client.client_side_validation and ('risk_limit' not in local_var_params or # noqa: E501 + local_var_params['risk_limit'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `risk_limit` when calling `update_dual_mode_position_risk_limit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'risk_limit' in local_var_params and local_var_params['risk_limit'] is not None: # noqa: E501 + query_params.append(('risk_limit', local_var_params['risk_limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/dual_comp/positions/{contract}/risk_limit', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Position]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 + """List futures orders # noqa: E501 + + - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_orders(settle, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str status: Only list the orders with this status (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_futures_orders_with_http_info(settle, status, **kwargs) # noqa: E501 + + def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 + """List futures orders # noqa: E501 + + - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_futures_orders_with_http_info(settle, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str status: Only list the orders with this status (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param _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.FuturesOrder], 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', + 'last_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_futures_orders" % k + ) + 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_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_futures_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_futures_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_futures_orders`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '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 '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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + + 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}/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesOrder]', # noqa: E501 + auth_settings=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_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 + """Create a futures order # noqa: E501 + + - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_futures_order(settle, futures_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param FuturesOrder futures_order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 + + def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 + """Create a futures order # noqa: E501 + + - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_futures_order_with_http_info(settle, futures_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param FuturesOrder futures_order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'futures_order', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_futures_order" % k + ) + 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_futures_order`") # noqa: E501 + # verify the required parameter 'futures_order' is set + if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501 + local_var_params['futures_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `futures_order` when calling `create_futures_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'futures_order' in local_var_params: + body_params = local_var_params['futures_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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}/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrder', # noqa: E501 + auth_settings=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_futures_orders(self, settle, contract, **kwargs): # noqa: E501 + """Cancel all `open` orders matched # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_futures_orders(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_futures_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 + + def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 + """Cancel all `open` orders matched # noqa: E501 + + Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_futures_orders_with_http_info(settle, contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask + :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.FuturesOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'x_gate_exptime', + 'side' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_futures_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `cancel_futures_orders`") # noqa: E501 + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `cancel_futures_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '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 = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/orders', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesOrder]', # noqa: E501 + auth_settings=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_orders_with_time_range(self, settle, **kwargs): # noqa: E501 + """List Futures Orders By Time Range # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_orders_with_time_range(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int _from: Start timestamp + :param int to: End timestamp + :param int limit: Maximum number of records to be 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.FuturesOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_orders_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 + + def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 + """List Futures Orders By Time Range # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_orders_with_time_range_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int _from: Start timestamp + :param int to: End timestamp + :param int limit: Maximum number of records to be 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.FuturesOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_orders_with_time_range" % k + ) + 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_orders_with_time_range`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_orders_with_time_range`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `get_orders_with_time_range`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/orders_timerange', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesOrder]', # noqa: E501 + auth_settings=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_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 + """Create a batch of futures orders # noqa: E501 + + - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_batch_futures_order(settle, futures_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param list[FuturesOrder] futures_order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.BatchFuturesOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_batch_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 + + def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 + """Create a batch of futures orders # noqa: E501 + + - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_batch_futures_order_with_http_info(settle, futures_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param list[FuturesOrder] futures_order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.BatchFuturesOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'futures_order', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_batch_futures_order" % k + ) + 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_batch_futures_order`") # noqa: E501 + # verify the required parameter 'futures_order' is set + if self.api_client.client_side_validation and ('futures_order' not in local_var_params or # noqa: E501 + local_var_params['futures_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `futures_order` when calling `create_batch_futures_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'futures_order' in local_var_params: + body_params = local_var_params['futures_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/batch_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BatchFuturesOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_order(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + + def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_order_with_http_info(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param _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.FuturesOrder, 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_futures_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_futures_order`") # noqa: E501 + + collection_formats = {} + + 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}/orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrder', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 + """Amend an order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.amend_futures_order(settle, order_id, futures_order_amendment, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param FuturesOrderAmendment futures_order_amendment: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.amend_futures_order_with_http_info(settle, order_id, futures_order_amendment, **kwargs) # noqa: E501 + + def amend_futures_order_with_http_info(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 + """Amend an order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.amend_futures_order_with_http_info(settle, order_id, futures_order_amendment, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param FuturesOrderAmendment futures_order_amendment: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrder, 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', + 'futures_order_amendment', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method amend_futures_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `amend_futures_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `amend_futures_order`") # noqa: E501 + # verify the required parameter 'futures_order_amendment' is set + if self.api_client.client_side_validation and ('futures_order_amendment' not in local_var_params or # noqa: E501 + local_var_params['futures_order_amendment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `futures_order_amendment` when calling `amend_futures_order`") # noqa: E501 + + collection_formats = {} + + 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 = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'futures_order_amendment' in local_var_params: + body_params = local_var_params['futures_order_amendment'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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}/orders/{order_id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrder', # noqa: E501 + auth_settings=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_futures_order(self, settle, order_id, **kwargs): # noqa: E501 + """Cancel a single 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_futures_order(settle, order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.FuturesOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + + def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 + """Cancel a single order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_futures_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 str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.FuturesOrder, 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', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_futures_order" % k + ) + 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_futures_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_futures_order`") # noqa: E501 + + collection_formats = {} + + 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 = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/orders/{order_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrder', # noqa: E501 + auth_settings=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_my_trades(self, settle, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_my_trades(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MyFuturesTrade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_my_trades_with_http_info(settle, **kwargs) # noqa: E501 + + def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_my_trades_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. + :param _return_http_data_only: response data without head status code + 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.MyFuturesTrade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'order', + 'limit', + 'offset', + 'last_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_my_trades" % k + ) + 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_my_trades`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_trades`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'order' in local_var_params and local_var_params['order'] is not None: # noqa: E501 + query_params.append(('order', local_var_params['order'])) # 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 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + + 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}/my_trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MyFuturesTrade]', # noqa: E501 + auth_settings=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_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 + """List personal trading history by time range # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_my_trades_with_time_range(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int _from: Start timestamp + :param int to: End timestamp + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str role: Query role, maker or taker. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MyFuturesTradeTimeRange] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_my_trades_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 + + def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 + """List personal trading history by time range # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_my_trades_with_time_range_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int _from: Start timestamp + :param int to: End timestamp + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param str role: Query role, maker or taker. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MyFuturesTradeTimeRange], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + '_from', + 'to', + 'limit', + 'offset', + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_my_trades_with_time_range" % k + ) + 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_my_trades_with_time_range`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `get_my_trades_with_time_range`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 + query_params.append(('role', local_var_params['role'])) # 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}/my_trades_timerange', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MyFuturesTradeTimeRange]', # noqa: E501 + auth_settings=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_position_close(self, settle, **kwargs): # noqa: E501 + """List position close history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_position_close(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param str side: Query side. long or shot + :param str pnl: Query profit or loss + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.PositionClose] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_position_close_with_http_info(settle, **kwargs) # noqa: E501 + + def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 + """List position close history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_position_close_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param str side: Query side. long or shot + :param str pnl: Query profit or loss + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.PositionClose], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'offset', + '_from', + 'to', + 'side', + 'pnl' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_position_close" % k + ) + 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_position_close`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_position_close`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_position_close`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_position_close`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if '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 'pnl' in local_var_params and local_var_params['pnl'] is not None: # noqa: E501 + query_params.append(('pnl', local_var_params['pnl'])) # 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}/position_close', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PositionClose]', # noqa: E501 + auth_settings=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_liquidates(self, settle, **kwargs): # noqa: E501 + """List liquidation history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_liquidates(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify a liquidation timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesLiquidate] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_liquidates_with_http_info(settle, **kwargs) # noqa: E501 + + def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 + """List liquidation history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_liquidates_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify a liquidation timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesLiquidate], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'at' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_liquidates" % k + ) + 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_liquidates`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 + query_params.append(('at', local_var_params['at'])) # noqa: E501 + + 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}/liquidates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesLiquidate]', # noqa: E501 + auth_settings=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_auto_deleverages(self, settle, **kwargs): # noqa: E501 + """List Auto-Deleveraging History # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_auto_deleverages(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify an auto-deleveraging timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesAutoDeleverage] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_auto_deleverages_with_http_info(settle, **kwargs) # noqa: E501 + + def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 + """List Auto-Deleveraging History # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_auto_deleverages_with_http_info(settle, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int at: Specify an auto-deleveraging timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesAutoDeleverage], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract', + 'limit', + 'at' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_auto_deleverages" % k + ) + 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_auto_deleverages`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 + query_params.append(('at', local_var_params['at'])) # noqa: E501 + + 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}/auto_deleverages', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesAutoDeleverage]', # noqa: E501 + auth_settings=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 countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 + """Countdown cancel orders # noqa: E501 + + When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.TriggerTime + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, **kwargs) # noqa: E501 + + def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 + """Countdown cancel orders # noqa: E501 + + When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.TriggerTime, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'countdown_cancel_all_futures_task' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method countdown_cancel_all_futures" % k + ) + 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 `countdown_cancel_all_futures`") # noqa: E501 + # verify the required parameter 'countdown_cancel_all_futures_task' is set + if self.api_client.client_side_validation and ('countdown_cancel_all_futures_task' not in local_var_params or # noqa: E501 + local_var_params['countdown_cancel_all_futures_task'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `countdown_cancel_all_futures_task` when calling `countdown_cancel_all_futures`") # noqa: E501 + + collection_formats = {} + + 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 'countdown_cancel_all_futures_task' in local_var_params: + body_params = local_var_params['countdown_cancel_all_futures_task'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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}/countdown_cancel_all', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TriggerTime', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_futures_fee(self, settle, **kwargs): # noqa: E501 + """Query user trading fee rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_fee(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: dict(str, gate_api.FuturesFee) + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_futures_fee_with_http_info(settle, **kwargs) # noqa: E501 + + def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 + """Query user trading fee rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_fee_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(dict(str, gate_api.FuturesFee), status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_futures_fee" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_fee`") # noqa: E501 + + collection_formats = {} + + 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}/fee', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, FuturesFee)', # noqa: E501 + auth_settings=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_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E501 + """Cancel a batch of orders with an ID list # noqa: E501 + + Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_batch_future_orders(settle, request_body, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param list[str] request_body: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FutureCancelOrderResult] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_batch_future_orders_with_http_info(settle, request_body, **kwargs) # noqa: E501 + + def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwargs): # noqa: E501 + """Cancel a batch of orders with an ID list # noqa: E501 + + Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_batch_future_orders_with_http_info(settle, request_body, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param list[str] request_body: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.FutureCancelOrderResult], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'request_body', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_batch_future_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `cancel_batch_future_orders`") # noqa: E501 + # verify the required parameter 'request_body' is set + if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501 + local_var_params['request_body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `request_body` when calling `cancel_batch_future_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'request_body' in local_var_params: + body_params = local_var_params['request_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/batch_cancel_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FutureCancelOrderResult]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 + """Batch modify orders with specified IDs # noqa: E501 + + You can specify multiple different order IDs. You can only modify up to 10 orders in one request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.amend_batch_future_orders(settle, batch_amend_order_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param list[BatchAmendOrderReq] batch_amend_order_req: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.BatchFuturesOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, **kwargs) # noqa: E501 + + def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 + """Batch modify orders with specified IDs # noqa: E501 + + You can specify multiple different order IDs. You can only modify up to 10 orders in one request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param list[BatchAmendOrderReq] batch_amend_order_req: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.BatchFuturesOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'batch_amend_order_req', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method amend_batch_future_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `amend_batch_future_orders`") # noqa: E501 + # verify the required parameter 'batch_amend_order_req' is set + if self.api_client.client_side_validation and ('batch_amend_order_req' not in local_var_params or # noqa: E501 + local_var_params['batch_amend_order_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `batch_amend_order_req` when calling `amend_batch_future_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'batch_amend_order_req' in local_var_params: + body_params = local_var_params['batch_amend_order_req'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/batch_amend_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BatchFuturesOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 + """List All Price-triggered 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_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: Only list the orders with this status (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int 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 + """List All Price-triggered 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_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: Only list the orders with this status (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records to be returned in a single list + :param int 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 a 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 a 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 Price-triggered 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 Price-triggered 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 + """Get a 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.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 str order_id: Retrieve the data of the order with the specified 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.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 + """Get a 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.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 str order_id: Retrieve the data of the order with the specified 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.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, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='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 cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 + """cancel a 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.cancel_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 str order_id: Retrieve the data of the order with the specified 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.FuturesPriceTriggeredOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 + + def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 + """cancel a price-triggered order # noqa: E501 + + 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_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 str order_id: Retrieve the data of the order with the specified 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.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 cancel_price_triggered_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `cancel_price_triggered_order`") # noqa: E501 + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_price_triggered_order`") # noqa: E501 + + collection_formats = {} + + 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}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='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) diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py new file mode 100644 index 0000000..395c9b8 --- /dev/null +++ b/gate_api/api/margin_api.py @@ -0,0 +1,2739 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class MarginApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_margin_accounts(self, **kwargs): # noqa: E501 + """Margin account 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_margin_accounts(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.MarginAccount] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_margin_accounts_with_http_info(**kwargs) # noqa: E501 + + def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 + """Margin account 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_margin_accounts_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.MarginAccount], 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 list_margin_accounts" % 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( + '/margin/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MarginAccount]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_margin_account_book(self, **kwargs): # noqa: E501 + """List margin account balance change history # noqa: E501 + + Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_margin_account_book(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. + :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.MarginAccountBook] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 + + def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 + """List margin account balance change history # noqa: E501 + + Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_margin_account_book_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. + :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.MarginAccountBook], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'currency_pair', + 'type', + '_from', + 'to', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_margin_account_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + 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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/account_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MarginAccountBook]', # noqa: E501 + auth_settings=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_funding_accounts(self, **kwargs): # noqa: E501 + """Funding account 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_funding_accounts(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FundingAccount] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 + + def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 + """Funding account 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_funding_accounts_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param _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.FundingAccount], 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_funding_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( + '/margin/funding_accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FundingAccount]', # noqa: E501 + auth_settings=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_auto_repay_status(self, **kwargs): # noqa: E501 + """Retrieve user auto repayment 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_auto_repay_status(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.AutoRepaySetting + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 + + def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve user auto repayment setting # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_auto_repay_status_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.AutoRepaySetting, 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_auto_repay_status" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/auto_repay', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AutoRepaySetting', # noqa: E501 + auth_settings=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_auto_repay(self, status, **kwargs): # noqa: E501 + """Update user's auto repayment 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.set_auto_repay(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.AutoRepaySetting + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 + + def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 + """Update user's auto repayment setting # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_auto_repay_with_http_info(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_auto_repay" % k + ) + 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 `set_auto_repay`") # 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 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/auto_repay', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AutoRepaySetting', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_margin_transferable(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific margin currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_margin_transferable(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.MarginTransferable + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 + + def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific margin currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_margin_transferable_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.MarginTransferable, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'currency_pair' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_margin_transferable" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_margin_transferable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/transferable', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MarginTransferable', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_cross_margin_currencies(self, **kwargs): # noqa: E501 + """Currencies supported by cross margin.(deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_currencies(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CrossMarginCurrency] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_cross_margin_currencies_with_http_info(**kwargs) # noqa: E501 + + def list_cross_margin_currencies_with_http_info(self, **kwargs): # noqa: E501 + """Currencies supported by cross margin.(deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_currencies_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CrossMarginCurrency], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_cross_margin_currencies" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/currencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CrossMarginCurrency]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_cross_margin_currency(self, currency, **kwargs): # noqa: E501 + """Retrieve detail of one single currency supported by cross margin. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_currency(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.CrossMarginCurrency + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_cross_margin_currency_with_http_info(currency, **kwargs) # noqa: E501 + + def get_cross_margin_currency_with_http_info(self, currency, **kwargs): # noqa: E501 + """Retrieve detail of one single currency supported by cross margin. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_currency_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.CrossMarginCurrency, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cross_margin_currency" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_currency`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'currency' in local_var_params: + path_params['currency'] = local_var_params['currency'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/currencies/{currency}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossMarginCurrency', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_cross_margin_account(self, **kwargs): # noqa: E501 + """Retrieve cross margin account. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_account(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.CrossMarginAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_cross_margin_account_with_http_info(**kwargs) # noqa: E501 + + def get_cross_margin_account_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve cross margin account. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_account_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.CrossMarginAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cross_margin_account" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossMarginAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_cross_margin_account_book(self, **kwargs): # noqa: E501 + """Retrieve cross margin account change history. (deprecated) # noqa: E501 + + The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_account_book(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CrossMarginAccountBook] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_cross_margin_account_book_with_http_info(**kwargs) # noqa: E501 + + def list_cross_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve cross margin account change history. (deprecated) # noqa: E501 + + The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_account_book_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CrossMarginAccountBook], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + '_from', + 'to', + 'page', + 'limit', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_cross_margin_account_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/account_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CrossMarginAccountBook]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 + """List cross margin borrow history. (deprecated) # noqa: E501 + + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_loans(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) + :param str currency: Filter by currency + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CrossMarginLoan] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501 + + def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501 + """List cross margin borrow history. (deprecated) # noqa: E501 + + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_loans_with_http_info(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) + :param str currency: Filter by currency + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'currency', + 'limit', + 'offset', + 'reverse' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_cross_margin_loans" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'status' is set + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `status` when calling `list_cross_margin_loans`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_loans`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 + query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/loans', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CrossMarginLoan]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_cross_margin_loan(self, cross_margin_loan, **kwargs): # noqa: E501 + """Create a cross margin borrow loan. (deprecated) # noqa: E501 + + Borrow amount cannot be less than currency minimum borrow amount # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cross_margin_loan(cross_margin_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossMarginLoan cross_margin_loan: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.CrossMarginLoan + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_cross_margin_loan_with_http_info(cross_margin_loan, **kwargs) # noqa: E501 + + def create_cross_margin_loan_with_http_info(self, cross_margin_loan, **kwargs): # noqa: E501 + """Create a cross margin borrow loan. (deprecated) # noqa: E501 + + Borrow amount cannot be less than currency minimum borrow amount # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cross_margin_loan_with_http_info(cross_margin_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossMarginLoan cross_margin_loan: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'cross_margin_loan' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_cross_margin_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'cross_margin_loan' is set + if self.api_client.client_side_validation and ('cross_margin_loan' not in local_var_params or # noqa: E501 + local_var_params['cross_margin_loan'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `cross_margin_loan` when calling `create_cross_margin_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'cross_margin_loan' in local_var_params: + body_params = local_var_params['cross_margin_loan'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/loans', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossMarginLoan', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_cross_margin_loan(self, loan_id, **kwargs): # noqa: E501 + """Retrieve single borrow loan detail. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_loan(loan_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str loan_id: Borrow loan ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.CrossMarginLoan + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_cross_margin_loan_with_http_info(loan_id, **kwargs) # noqa: E501 + + def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 + """Retrieve single borrow loan detail. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_loan_with_http_info(loan_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str loan_id: Borrow loan ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'loan_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cross_margin_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'loan_id' is set + if self.api_client.client_side_validation and ('loan_id' not in local_var_params or # noqa: E501 + local_var_params['loan_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `loan_id` when calling `get_cross_margin_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'loan_id' in local_var_params: + path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/loans/{loan_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossMarginLoan', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_cross_margin_repayments(self, **kwargs): # noqa: E501 + """Retrieve cross margin repayments. (deprecated) # noqa: E501 + + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_repayments(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: + :param str loan_id: + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CrossMarginRepayment] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501 + + def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve cross margin repayments. (deprecated) # noqa: E501 + + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cross_margin_repayments_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: + :param str loan_id: + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CrossMarginRepayment], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'loan_id', + 'limit', + 'offset', + 'reverse' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_cross_margin_repayments" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501 + query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 + query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/repayments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CrossMarginRepayment]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def repay_cross_margin_loan(self, cross_margin_repay_request, **kwargs): # noqa: E501 + """Cross margin repayments. (deprecated) # noqa: E501 + + When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_cross_margin_loan(cross_margin_repay_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossMarginRepayRequest cross_margin_repay_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CrossMarginLoan] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, **kwargs) # noqa: E501 + + def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **kwargs): # noqa: E501 + """Cross margin repayments. (deprecated) # noqa: E501 + + When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CrossMarginRepayRequest cross_margin_repay_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'cross_margin_repay_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method repay_cross_margin_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'cross_margin_repay_request' is set + if self.api_client.client_side_validation and ('cross_margin_repay_request' not in local_var_params or # noqa: E501 + local_var_params['cross_margin_repay_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `cross_margin_repay_request` when calling `repay_cross_margin_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'cross_margin_repay_request' in local_var_params: + body_params = local_var_params['cross_margin_repay_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/repayments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CrossMarginLoan]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_cross_margin_interest_records(self, **kwargs): # noqa: E501 + """Interest records for the cross margin account. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_interest_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniLoanInterestRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_cross_margin_interest_records_with_http_info(**kwargs) # noqa: E501 + + def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E501 + """Interest records for the cross margin account. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_interest_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp + :param int to: End timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cross_margin_interest_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/interest_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLoanInterestRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_cross_margin_transferable(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific cross margin currency. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_transferable(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.CrossMarginTransferable + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_cross_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 + + def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific cross margin currency. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_transferable_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.CrossMarginTransferable, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cross_margin_transferable" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_transferable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/transferable', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossMarginTransferable', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_cross_margin_estimate_rate(self, currencies, **kwargs): # noqa: E501 + """Estimated interest rates. (deprecated) # noqa: E501 + + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_estimate_rate(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: dict + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_cross_margin_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 + + def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Estimated interest rates. (deprecated) # noqa: E501 + + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_estimate_rate_with_http_info(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currencies' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cross_margin_estimate_rate" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_cross_margin_estimate_rate`") # noqa: E501 + + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) > 10): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) < 1): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + collection_formats['currencies'] = 'multi' # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/estimate_rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, str)', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_cross_margin_borrowable(self, currency, **kwargs): # noqa: E501 + """Get the max borrowable amount for a specific cross margin currency. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_borrowable(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedBorrowable + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_cross_margin_borrowable_with_http_info(currency, **kwargs) # noqa: E501 + + def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get the max borrowable amount for a specific cross margin currency. (deprecated) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cross_margin_borrowable_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedBorrowable, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cross_margin_borrowable" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_borrowable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/cross/borrowable', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedBorrowable', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 + """Check the user's own leverage lending gradient in the current market # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_margin_tier(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MarginLeverageTier] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 + + def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Check the user's own leverage lending gradient in the current market # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_margin_tier_with_http_info(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_margin_tier" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_user_margin_tier`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/user/loan_margin_tiers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MarginLeverageTier]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 + """Query the current market leverage lending gradient # 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_market_margin_tier(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MarginLeverageTier] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 + + def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Query the current market leverage lending gradient # 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_market_margin_tier_with_http_info(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, 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_market_margin_tier" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_market_margin_tier`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + 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 = [] # noqa: E501 + + return self.api_client.call_api( + '/margin/loan_margin_tiers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MarginLeverageTier]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 + """Set the user market leverage multiple # 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_market_leverage(margin_market_leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param MarginMarketLeverage margin_market_leverage: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 + + def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 + """Set the user market leverage multiple # 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_market_leverage_with_http_info(margin_market_leverage, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param MarginMarketLeverage margin_market_leverage: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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 = [ + 'margin_market_leverage' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_user_market_leverage" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'margin_market_leverage' is set + if self.api_client.client_side_validation and ('margin_market_leverage' not in local_var_params or # noqa: E501 + local_var_params['margin_market_leverage'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `margin_market_leverage` when calling `set_user_market_leverage`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'margin_market_leverage' in local_var_params: + body_params = local_var_params['margin_market_leverage'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/leverage/user_market_setting', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_margin_user_account(self, **kwargs): # noqa: E501 + """Query the user's leverage account list # noqa: E501 + + Support querying risk rate per position account and margin rate per position account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_margin_user_account(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.MarginAccount] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 + + def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 + """Query the user's leverage account list # noqa: E501 + + Support querying risk rate per position account and margin rate per position account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_margin_user_account_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.MarginAccount], 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 list_margin_user_account" % 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( + '/margin/user/account', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MarginAccount]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py new file mode 100644 index 0000000..1ceca59 --- /dev/null +++ b/gate_api/api/margin_uni_api.py @@ -0,0 +1,1008 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class MarginUniApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_uni_currency_pairs(self, **kwargs): # noqa: E501 + """List lending markets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_currency_pairs(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniCurrencyPair] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_currency_pairs_with_http_info(**kwargs) # noqa: E501 + + def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 + """List lending markets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_currency_pairs_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniCurrencyPair], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_currency_pairs" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/currency_pairs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniCurrencyPair]', # noqa: E501 + auth_settings=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_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 + """Get detail of lending market # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_currency_pair(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.UniCurrencyPair + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 + + def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Get detail of lending market # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_currency_pair_with_http_info(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.UniCurrencyPair, 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 get_uni_currency_pair" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'currency_pair' in local_var_params: + path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/currency_pairs/{currency_pair}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UniCurrencyPair', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 + """Estimate interest Rate # noqa: E501 + + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: dict + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 + + def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Estimate interest Rate # noqa: E501 + + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currencies' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_margin_uni_estimate_rate" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`") # noqa: E501 + + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) > 10): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) < 1): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + collection_formats['currencies'] = 'multi' # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/estimate_rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, str)', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_uni_loans(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_loans(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniLoan] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 + + def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_loans_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'currency', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_loans" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 + 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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/loans', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLoan]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_uni_loan(create_uni_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateUniLoan create_uni_loan: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 + + def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_uni_loan_with_http_info(create_uni_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateUniLoan create_uni_loan: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_uni_loan' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_uni_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'create_uni_loan' is set + if self.api_client.client_side_validation and ('create_uni_loan' not in local_var_params or # noqa: E501 + local_var_params['create_uni_loan'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_uni_loan` when calling `create_uni_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_uni_loan' in local_var_params: + body_params = local_var_params['create_uni_loan'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/loans', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_uni_loan_records(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_loan_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: type: borrow - borrow, repay - repay + :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniLoanRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 + + def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_loan_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: type: borrow - borrow, repay - repay + :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniLoanRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'type', + 'currency', + 'currency_pair', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_loan_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if '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 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/loan_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLoanRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_loan_interest_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniLoanInterestRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 + + def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_loan_interest_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'currency', + 'page', + 'limit', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_loan_interest_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/interest_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLoanInterestRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 + """Get maximum borrowable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_borrowable(currency, currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair (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.MaxUniBorrowable + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 + + def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 + """Get maximum borrowable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_uni_borrowable_with_http_info(currency, currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair (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.MaxUniBorrowable, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'currency_pair' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_uni_borrowable" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_borrowable`") # noqa: E501 + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_borrowable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/margin/uni/borrowable', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MaxUniBorrowable', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py new file mode 100644 index 0000000..8cea842 --- /dev/null +++ b/gate_api/api/multi_collateral_loan_api.py @@ -0,0 +1,1461 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class MultiCollateralLoanApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_multi_collateral_orders(self, **kwargs): # noqa: E501 + """List Multi-Collateral 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_multi_collateral_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str sort: Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. + :param str order_type: Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.MultiCollateralOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_multi_collateral_orders_with_http_info(**kwargs) # noqa: E501 + + def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 + """List Multi-Collateral 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_multi_collateral_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str sort: Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. + :param str order_type: Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.MultiCollateralOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'limit', + 'sort', + 'order_type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_multi_collateral_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_collateral_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_orders`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_orders`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'order_type' in local_var_params and local_var_params['order_type'] is not None: # noqa: E501 + query_params.append(('order_type', local_var_params['order_type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MultiCollateralOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_multi_collateral(self, create_multi_collateral_order, **kwargs): # noqa: E501 + """Create Multi-Collateral Order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_multi_collateral(create_multi_collateral_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateMultiCollateralOrder create_multi_collateral_order: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OrderResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_multi_collateral_with_http_info(create_multi_collateral_order, **kwargs) # noqa: E501 + + def create_multi_collateral_with_http_info(self, create_multi_collateral_order, **kwargs): # noqa: E501 + """Create Multi-Collateral Order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_multi_collateral_with_http_info(create_multi_collateral_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CreateMultiCollateralOrder create_multi_collateral_order: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OrderResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_multi_collateral_order' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_multi_collateral" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'create_multi_collateral_order' is set + if self.api_client.client_side_validation and ('create_multi_collateral_order' not in local_var_params or # noqa: E501 + local_var_params['create_multi_collateral_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_multi_collateral_order` when calling `create_multi_collateral`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_multi_collateral_order' in local_var_params: + body_params = local_var_params['create_multi_collateral_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrderResp', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 + """Get Multi-Collateral 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_multi_collateral_order_detail(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Order ID returned on successful order creation (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.MultiCollateralOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_multi_collateral_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Get Multi-Collateral 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_multi_collateral_order_detail_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Order ID returned on successful order creation (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.MultiCollateralOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_multi_collateral_order_detail" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_multi_collateral_order_detail`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MultiCollateralOrder', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_multi_repay_records(self, type, **kwargs): # noqa: E501 + """List Multi-Collateral Repay Records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_multi_repay_records(type, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.MultiRepayRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_multi_repay_records_with_http_info(type, **kwargs) # noqa: E501 + + def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 + """List Multi-Collateral Repay Records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_multi_repay_records_with_http_info(type, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.MultiRepayRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'type', + 'borrow_currency', + 'page', + 'limit', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_multi_repay_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `list_multi_repay_records`") # noqa: E501 + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_repay_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_repay_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'borrow_currency' in local_var_params and local_var_params['borrow_currency'] is not None: # noqa: E501 + query_params.append(('borrow_currency', local_var_params['borrow_currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/repay', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MultiRepayRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def repay_multi_collateral_loan(self, repay_multi_loan, **kwargs): # noqa: E501 + """Repay Multi-Collateral Loan # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_multi_collateral_loan(repay_multi_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param RepayMultiLoan repay_multi_loan: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.MultiRepayResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.repay_multi_collateral_loan_with_http_info(repay_multi_loan, **kwargs) # noqa: E501 + + def repay_multi_collateral_loan_with_http_info(self, repay_multi_loan, **kwargs): # noqa: E501 + """Repay Multi-Collateral Loan # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repay_multi_collateral_loan_with_http_info(repay_multi_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param RepayMultiLoan repay_multi_loan: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.MultiRepayResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'repay_multi_loan' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method repay_multi_collateral_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'repay_multi_loan' is set + if self.api_client.client_side_validation and ('repay_multi_loan' not in local_var_params or # noqa: E501 + local_var_params['repay_multi_loan'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `repay_multi_loan` when calling `repay_multi_collateral_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'repay_multi_loan' in local_var_params: + body_params = local_var_params['repay_multi_loan'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/repay', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MultiRepayResp', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_multi_collateral_records(self, **kwargs): # noqa: E501 + """Query collateral adjustment records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_multi_collateral_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str collateral_currency: Collateral + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.MultiCollateralRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_multi_collateral_records_with_http_info(**kwargs) # noqa: E501 + + def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 + """Query collateral adjustment records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_multi_collateral_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str collateral_currency: Collateral + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.MultiCollateralRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'limit', + '_from', + 'to', + 'collateral_currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_multi_collateral_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_multi_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_multi_collateral_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'collateral_currency' in local_var_params and local_var_params['collateral_currency'] is not None: # noqa: E501 + query_params.append(('collateral_currency', local_var_params['collateral_currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/mortgage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MultiCollateralRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def operate_multi_collateral(self, collateral_adjust, **kwargs): # noqa: E501 + """Operate Multi-Collateral # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.operate_multi_collateral(collateral_adjust, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CollateralAdjust collateral_adjust: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.CollateralAdjustRes + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.operate_multi_collateral_with_http_info(collateral_adjust, **kwargs) # noqa: E501 + + def operate_multi_collateral_with_http_info(self, collateral_adjust, **kwargs): # noqa: E501 + """Operate Multi-Collateral # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.operate_multi_collateral_with_http_info(collateral_adjust, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CollateralAdjust collateral_adjust: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.CollateralAdjustRes, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'collateral_adjust' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method operate_multi_collateral" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'collateral_adjust' is set + if self.api_client.client_side_validation and ('collateral_adjust' not in local_var_params or # noqa: E501 + local_var_params['collateral_adjust'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collateral_adjust` when calling `operate_multi_collateral`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'collateral_adjust' in local_var_params: + body_params = local_var_params['collateral_adjust'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/mortgage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CollateralAdjustRes', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 + """List User Currency Quota # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_user_currency_quota(type, currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: Currency types: collateral - collateral currency, borrow - borrowing currency. (required) + :param str currency: When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CurrencyQuota] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_user_currency_quota_with_http_info(type, currency, **kwargs) # noqa: E501 + + def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # noqa: E501 + """List User Currency Quota # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_user_currency_quota_with_http_info(type, currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: Currency types: collateral - collateral currency, borrow - borrowing currency. (required) + :param str currency: When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CurrencyQuota], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'type', + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_user_currency_quota" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `list_user_currency_quota`") # noqa: E501 + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `list_user_currency_quota`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/currency_quota', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CurrencyQuota]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_multi_collateral_currencies(self, **kwargs): # noqa: E501 + """Query supported borrowing and collateral currencies in Multi-Collateral # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_multi_collateral_currencies(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.MultiCollateralCurrency + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_multi_collateral_currencies_with_http_info(**kwargs) # noqa: E501 + + def list_multi_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 + """Query supported borrowing and collateral currencies in Multi-Collateral # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_multi_collateral_currencies_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.MultiCollateralCurrency, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_multi_collateral_currencies" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/currencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MultiCollateralCurrency', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_multi_collateral_ltv(self, **kwargs): # noqa: E501 + """Get Multi-Collateral ratio # noqa: E501 + + The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_multi_collateral_ltv(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.CollateralLtv + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_multi_collateral_ltv_with_http_info(**kwargs) # noqa: E501 + + def get_multi_collateral_ltv_with_http_info(self, **kwargs): # noqa: E501 + """Get Multi-Collateral ratio # noqa: E501 + + The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_multi_collateral_ltv_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.CollateralLtv, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_multi_collateral_ltv" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/ltv', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CollateralLtv', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_multi_collateral_fix_rate(self, **kwargs): # noqa: E501 + """Query fixed interest rates for the currency for 7 days and 30 days # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_multi_collateral_fix_rate(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CollateralFixRate] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_multi_collateral_fix_rate_with_http_info(**kwargs) # noqa: E501 + + def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501 + """Query fixed interest rates for the currency for 7 days and 30 days # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_multi_collateral_fix_rate_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CollateralFixRate], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_multi_collateral_fix_rate" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/fixed_rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CollateralFixRate]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 + """Query the current interest rate of the currency # noqa: E501 + + Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_multi_collateral_current_rate(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. (required) + :param str vip_level: VIP level, defaults to 0 if not transferred + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CollateralCurrentRate] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_multi_collateral_current_rate_with_http_info(currencies, **kwargs) # noqa: E501 + + def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Query the current interest rate of the currency # noqa: E501 + + Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_multi_collateral_current_rate_with_http_info(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. (required) + :param str vip_level: VIP level, defaults to 0 if not transferred + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CollateralCurrentRate], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currencies', + 'vip_level' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_multi_collateral_current_rate" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_multi_collateral_current_rate`") # noqa: E501 + + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) > 100): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_multi_collateral_current_rate`, number of items must be less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) < 1): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_multi_collateral_current_rate`, number of items must be greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + collection_formats['currencies'] = 'multi' # noqa: E501 + if 'vip_level' in local_var_params and local_var_params['vip_level'] is not None: # noqa: E501 + query_params.append(('vip_level', local_var_params['vip_level'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/loan/multi_collateral/current_rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CollateralCurrentRate]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py new file mode 100644 index 0000000..b5f74f7 --- /dev/null +++ b/gate_api/api/options_api.py @@ -0,0 +1,3441 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class OptionsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_options_underlyings(self, **kwargs): # noqa: E501 + """List all underlyings # 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_options_underlyings(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.OptionsUnderlying] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_underlyings_with_http_info(**kwargs) # noqa: E501 + + def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501 + """List all underlyings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_underlyings_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.OptionsUnderlying], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_underlyings" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/options/underlyings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsUnderlying]', # noqa: E501 + auth_settings=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_options_expirations(self, underlying, **kwargs): # noqa: E501 + """List all expiration times # 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_options_expirations(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying 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: list[int] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_expirations_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa: E501 + """List all expiration times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_expirations_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying 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(list[int], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_expirations" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_expirations`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/options/expirations', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[int]', # noqa: E501 + auth_settings=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_options_contracts(self, underlying, **kwargs): # noqa: E501 + """List all the contracts with specified underlying and expiration time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_contracts(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int expiration: Unix timestamp of the expiration time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsContract] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_contracts_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: E501 + """List all the contracts with specified underlying and expiration time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_contracts_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int expiration: Unix timestamp of the expiration time + :param _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.OptionsContract], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying', + 'expiration' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_contracts" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_contracts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + if 'expiration' in local_var_params and local_var_params['expiration'] is not None: # noqa: E501 + query_params.append(('expiration', local_var_params['expiration'])) # 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( + '/options/contracts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsContract]', # noqa: E501 + auth_settings=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_options_contract(self, contract, **kwargs): # noqa: E501 + """Query specified contract 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_options_contract(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OptionsContract + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_options_contract_with_http_info(contract, **kwargs) # noqa: E501 + + def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501 + """Query specified contract detail # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_contract_with_http_info(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OptionsContract, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_options_contract" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_options_contract`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/options/contracts/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsContract', # noqa: E501 + auth_settings=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_options_settlements(self, underlying, **kwargs): # noqa: E501 + """List settlement history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_settlements(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsSettlement] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 + """List settlement history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_settlements_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :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.OptionsSettlement], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying', + 'limit', + 'offset', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_settlements" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_settlements`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_settlements`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_settlements`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + 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( + '/options/settlements', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsSettlement]', # noqa: E501 + auth_settings=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_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E501 + """Get specified contract's settlement # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_settlement(contract, underlying, at, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int at: (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.OptionsSettlement + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_options_settlement_with_http_info(contract, underlying, at, **kwargs) # noqa: E501 + + def get_options_settlement_with_http_info(self, contract, underlying, at, **kwargs): # noqa: E501 + """Get specified contract's settlement # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_settlement_with_http_info(contract, underlying, at, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int at: (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.OptionsSettlement, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract', + 'underlying', + 'at' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_options_settlement" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_options_settlement`") # noqa: E501 + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `get_options_settlement`") # noqa: E501 + # verify the required parameter 'at' is set + if self.api_client.client_side_validation and ('at' not in local_var_params or # noqa: E501 + local_var_params['at'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `at` when calling `get_options_settlement`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 + query_params.append(('at', local_var_params['at'])) # noqa: E501 + + 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( + '/options/settlements/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsSettlement', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 + """List my options settlements # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_my_options_settlements(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsMySettlements] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_my_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 + """List my options settlements # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_my_options_settlements_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :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.OptionsMySettlements], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying', + 'contract', + 'limit', + 'offset', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_my_options_settlements" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_my_options_settlements`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_settlements`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_my_options_settlements`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/my_settlements', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsMySettlements]', # noqa: E501 + auth_settings=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_options_order_book(self, contract, **kwargs): # noqa: E501 + """Options order book # noqa: E501 + + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_order_book(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesOrderBook + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_order_book_with_http_info(contract, **kwargs) # noqa: E501 + + def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E501 + """Options order book # noqa: E501 + + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_order_book_with_http_info(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param _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.FuturesOrderBook, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract', + 'interval', + 'limit', + 'with_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_order_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_options_order_book`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value less than or equal to `50`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_order_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 + query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/options/order_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FuturesOrderBook', # noqa: E501 + auth_settings=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_options_tickers(self, underlying, **kwargs): # noqa: E501 + """List tickers of options contracts # 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_options_tickers(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying 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: list[gate_api.OptionsTicker] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_tickers_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 + """List tickers of options contracts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_tickers_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying 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(list[gate_api.OptionsTicker], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_tickers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_tickers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/options/tickers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsTicker]', # noqa: E501 + auth_settings=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_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 + """Get underlying ticker # 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_options_underlying_tickers(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (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.OptionsUnderlyingTicker + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_underlying_tickers_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 + """Get underlying ticker # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_underlying_tickers_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (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.OptionsUnderlyingTicker, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_underlying_tickers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_underlying_tickers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'underlying' in local_var_params: + path_params['underlying'] = local_var_params['underlying'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/options/underlying/tickers/{underlying}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsUnderlyingTicker', # noqa: E501 + auth_settings=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_options_candlesticks(self, contract, **kwargs): # noqa: E501 + """Get options candlesticks # 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_options_candlesticks(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name (required) + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param str interval: Interval time between data points + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsCandlestick] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_candlesticks_with_http_info(contract, **kwargs) # noqa: E501 + + def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: E501 + """Get options candlesticks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_candlesticks_with_http_info(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name (required) + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param str interval: Interval time between data points + :param _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.OptionsCandlestick], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract', + 'limit', + '_from', + 'to', + 'interval' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_candlesticks" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `list_options_candlesticks`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_candlesticks`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + + 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( + '/options/candlesticks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsCandlestick]', # noqa: E501 + auth_settings=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_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E501 + """Mark price candlesticks of an underlying # 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_options_underlying_candlesticks(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param str interval: Interval time between data points + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesCandlestick] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_underlying_candlesticks_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwargs): # noqa: E501 + """Mark price candlesticks of an underlying # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_underlying_candlesticks_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp + :param str interval: Interval time between data points + :param _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.FuturesCandlestick], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying', + 'limit', + '_from', + 'to', + 'interval' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_underlying_candlesticks" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_underlying_candlesticks`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_underlying_candlesticks`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + + 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( + '/options/underlying/candlesticks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesCandlestick]', # noqa: E501 + auth_settings=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_options_trades(self, **kwargs): # noqa: E501 + """Options trade history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_trades(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name + :param str type: `C` is call, while `P` is put + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.FuturesTrade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_trades_with_http_info(**kwargs) # noqa: E501 + + def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 + """Options trade history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_trades_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name + :param str type: `C` is call, while `P` is put + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :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.FuturesTrade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract', + 'type', + 'limit', + 'offset', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_trades" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_trades`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_trades`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 '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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + 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( + '/options/trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesTrade]', # noqa: E501 + auth_settings=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_options_account(self, **kwargs): # noqa: E501 + """List options account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_account(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OptionsAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_account_with_http_info(**kwargs) # noqa: E501 + + def list_options_account_with_http_info(self, **kwargs): # noqa: E501 + """List options account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_account_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OptionsAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_account" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsAccount', # noqa: E501 + auth_settings=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_options_account_book(self, **kwargs): # noqa: E501 + """List account changing history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_account_book(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsAccountBook] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_account_book_with_http_info(**kwargs) # noqa: E501 + + def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 + """List account changing history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_options_account_book_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL + :param _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.OptionsAccountBook], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'limit', + 'offset', + '_from', + 'to', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_account_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_account_book`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/account_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsAccountBook]', # noqa: E501 + auth_settings=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_options_positions(self, **kwargs): # noqa: E501 + """List user's positions of specified underlying # 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_options_positions(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.OptionsPosition] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_positions_with_http_info(**kwargs) # noqa: E501 + + def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 + """List user's positions of specified underlying # 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_options_positions_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.OptionsPosition], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_positions" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/positions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsPosition]', # noqa: E501 + auth_settings=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_options_position(self, contract, **kwargs): # noqa: E501 + """Get specified contract position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_position(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OptionsPosition + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_options_position_with_http_info(contract, **kwargs) # noqa: E501 + + def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501 + """Get specified contract position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_position_with_http_info(contract, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OptionsPosition, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_options_position" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'contract' is set + if self.api_client.client_side_validation and ('contract' not in local_var_params or # noqa: E501 + local_var_params['contract'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contract` when calling `get_options_position`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'contract' in local_var_params: + path_params['contract'] = local_var_params['contract'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/positions/{contract}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsPosition', # noqa: E501 + auth_settings=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_options_position_close(self, underlying, **kwargs): # noqa: E501 + """List user's liquidation history of specified underlying # 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_options_position_close(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract 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.OptionsPositionClose] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_position_close_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_options_position_close_with_http_info(self, underlying, **kwargs): # noqa: E501 + """List user's liquidation history of specified underlying # 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_options_position_close_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract 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.OptionsPositionClose], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying', + 'contract' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_position_close" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_options_position_close`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + 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( + '/options/position_close', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsPositionClose]', # noqa: E501 + auth_settings=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_options_orders(self, status, **kwargs): # noqa: E501 + """List options 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_options_orders(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Only list the orders with this status (required) + :param str contract: Options contract name + :param str underlying: Underlying + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_options_orders_with_http_info(status, **kwargs) # noqa: E501 + + def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 + """List options 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_options_orders_with_http_info(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Only list the orders with this status (required) + :param str contract: Options contract name + :param str underlying: Underlying + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :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.OptionsOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'contract', + 'underlying', + 'limit', + 'offset', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_options_orders" % k + ) + 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_options_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_options_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_options_orders`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsOrder]', # noqa: E501 + auth_settings=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_options_order(self, options_order, **kwargs): # noqa: E501 + """Create an options 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_options_order(options_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OptionsOrder options_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.OptionsOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_options_order_with_http_info(options_order, **kwargs) # noqa: E501 + + def create_options_order_with_http_info(self, options_order, **kwargs): # noqa: E501 + """Create an options 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_options_order_with_http_info(options_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OptionsOrder options_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.OptionsOrder, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'options_order' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_options_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'options_order' is set + if self.api_client.client_side_validation and ('options_order' not in local_var_params or # noqa: E501 + local_var_params['options_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `options_order` when calling `create_options_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'options_order' in local_var_params: + body_params = local_var_params['options_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsOrder', # noqa: E501 + auth_settings=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_options_orders(self, **kwargs): # noqa: E501 + """Cancel all `open` orders matched # 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_options_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name + :param str underlying: Underlying + :param str side: All bids or asks. Both included if not specified + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_options_orders_with_http_info(**kwargs) # noqa: E501 + + def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 + """Cancel all `open` orders matched # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_options_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str contract: Options contract name + :param str underlying: Underlying + :param str side: All bids or asks. Both included if not specified + :param _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.OptionsOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contract', + 'underlying', + 'side' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_options_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + 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 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + 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( + '/options/orders', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsOrder]', # noqa: E501 + auth_settings=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_options_order(self, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Order ID returned on successful order creation (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.OptionsOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_options_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Order ID returned on successful order creation (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.OptionsOrder, 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_options_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_options_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/options/orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsOrder', # noqa: E501 + auth_settings=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_options_order(self, order_id, **kwargs): # noqa: E501 + """Cancel a single 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_options_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Order ID returned on successful order creation (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.OptionsOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_options_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Cancel a single order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_options_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int order_id: Order ID returned on successful order creation (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.OptionsOrder, 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_options_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_options_order`") # noqa: E501 + + collection_formats = {} + + 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( + '/options/orders/{order_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsOrder', # noqa: E501 + auth_settings=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 countdown_cancel_all_options(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 + """Countdown cancel orders # noqa: E501 + + Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.countdown_cancel_all_options(countdown_cancel_all_options_task, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CountdownCancelAllOptionsTask countdown_cancel_all_options_task: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.TriggerTime + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, **kwargs) # noqa: E501 + + def countdown_cancel_all_options_with_http_info(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 + """Countdown cancel orders # noqa: E501 + + Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CountdownCancelAllOptionsTask countdown_cancel_all_options_task: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.TriggerTime, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'countdown_cancel_all_options_task' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method countdown_cancel_all_options" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'countdown_cancel_all_options_task' is set + if self.api_client.client_side_validation and ('countdown_cancel_all_options_task' not in local_var_params or # noqa: E501 + local_var_params['countdown_cancel_all_options_task'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `countdown_cancel_all_options_task` when calling `countdown_cancel_all_options`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'countdown_cancel_all_options_task' in local_var_params: + body_params = local_var_params['countdown_cancel_all_options_task'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/countdown_cancel_all', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TriggerTime', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_my_options_trades(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OptionsMyTrade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_my_options_trades_with_http_info(underlying, **kwargs) # noqa: E501 + + def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_my_options_trades_with_http_info(underlying, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int _from: Start timestamp + :param int to: End timestamp + :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.OptionsMyTrade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying', + 'contract', + 'limit', + 'offset', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_my_options_trades" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'underlying' is set + if self.api_client.client_side_validation and ('underlying' not in local_var_params or # noqa: E501 + local_var_params['underlying'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `underlying` when calling `list_my_options_trades`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_options_trades`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_my_options_trades`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + if 'contract' in local_var_params and local_var_params['contract'] is not None: # noqa: E501 + query_params.append(('contract', local_var_params['contract'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/my_trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsMyTrade]', # noqa: E501 + auth_settings=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_options_mmp(self, **kwargs): # noqa: E501 + """MMP Query # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_mmp(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.OptionsMMP] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_options_mmp_with_http_info(**kwargs) # noqa: E501 + + def get_options_mmp_with_http_info(self, **kwargs): # noqa: E501 + """MMP Query # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_options_mmp_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str underlying: Underlying + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.OptionsMMP], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'underlying' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_options_mmp" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'underlying' in local_var_params and local_var_params['underlying'] is not None: # noqa: E501 + query_params.append(('underlying', local_var_params['underlying'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/mmp', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OptionsMMP]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_options_mmp(self, options_mmp, **kwargs): # noqa: E501 + """MMP Settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_options_mmp(options_mmp, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OptionsMMP options_mmp: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OptionsMMP + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_options_mmp_with_http_info(options_mmp, **kwargs) # noqa: E501 + + def set_options_mmp_with_http_info(self, options_mmp, **kwargs): # noqa: E501 + """MMP Settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_options_mmp_with_http_info(options_mmp, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OptionsMMP options_mmp: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OptionsMMP, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'options_mmp' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_options_mmp" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'options_mmp' is set + if self.api_client.client_side_validation and ('options_mmp' not in local_var_params or # noqa: E501 + local_var_params['options_mmp'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `options_mmp` when calling `set_options_mmp`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'options_mmp' in local_var_params: + body_params = local_var_params['options_mmp'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/mmp', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsMMP', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def reset_options_mmp(self, options_mmp_reset, **kwargs): # noqa: E501 + """MMP Reset # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reset_options_mmp(options_mmp_reset, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OptionsMMPReset options_mmp_reset: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OptionsMMP + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.reset_options_mmp_with_http_info(options_mmp_reset, **kwargs) # noqa: E501 + + def reset_options_mmp_with_http_info(self, options_mmp_reset, **kwargs): # noqa: E501 + """MMP Reset # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reset_options_mmp_with_http_info(options_mmp_reset, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param OptionsMMPReset options_mmp_reset: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OptionsMMP, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'options_mmp_reset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method reset_options_mmp" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'options_mmp_reset' is set + if self.api_client.client_side_validation and ('options_mmp_reset' not in local_var_params or # noqa: E501 + local_var_params['options_mmp_reset'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `options_mmp_reset` when calling `reset_options_mmp`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'options_mmp_reset' in local_var_params: + body_params = local_var_params['options_mmp_reset'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/options/mmp/reset', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OptionsMMP', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py new file mode 100644 index 0000000..9136c26 --- /dev/null +++ b/gate_api/api/rebate_api.py @@ -0,0 +1,1216 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class RebateApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def agency_transaction_history(self, **kwargs): # noqa: E501 + """The agency obtains the transaction history of the recommended user # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.agency_transaction_history(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.AgencyTransactionHistory] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.agency_transaction_history_with_http_info(**kwargs) # noqa: E501 + + def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501 + """The agency obtains the transaction history of the recommended user # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.agency_transaction_history_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.AgencyTransactionHistory], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'user_id', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method agency_transaction_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `agency_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `agency_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/agency/transaction_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AgencyTransactionHistory]', # noqa: E501 + auth_settings=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 agency_commissions_history(self, **kwargs): # noqa: E501 + """The agency obtains the commission history of the recommended user # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.agency_commissions_history(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.AgencyCommissionHistory] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.agency_commissions_history_with_http_info(**kwargs) # noqa: E501 + + def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 + """The agency obtains the commission history of the recommended user # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.agency_commissions_history_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.AgencyCommissionHistory], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'user_id', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method agency_commissions_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `agency_commissions_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `agency_commissions_history`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/agency/commission_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AgencyCommissionHistory]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def partner_transaction_history(self, **kwargs): # noqa: E501 + """Partner obtains transaction records of recommended users # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.partner_transaction_history(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.PartnerTransactionHistory + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.partner_transaction_history_with_http_info(**kwargs) # noqa: E501 + + def partner_transaction_history_with_http_info(self, **kwargs): # noqa: E501 + """Partner obtains transaction records of recommended users # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.partner_transaction_history_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.PartnerTransactionHistory, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'user_id', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method partner_transaction_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `partner_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `partner_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `partner_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/partner/transaction_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PartnerTransactionHistory', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def partner_commissions_history(self, **kwargs): # noqa: E501 + """Partner obtains commission records of recommended users # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.partner_commissions_history(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.PartnerCommissionHistory + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.partner_commissions_history_with_http_info(**kwargs) # noqa: E501 + + def partner_commissions_history_with_http_info(self, **kwargs): # noqa: E501 + """Partner obtains commission records of recommended users # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.partner_commissions_history_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.PartnerCommissionHistory, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'user_id', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method partner_commissions_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `partner_commissions_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `partner_commissions_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `partner_commissions_history`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/partner/commission_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PartnerCommissionHistory', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def partner_sub_list(self, **kwargs): # noqa: E501 + """Partner subordinate list # noqa: E501 + + Including sub-agents, direct customers, indirect customers # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.partner_sub_list(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: User ID. If not specified, all user records will be returned + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.PartnerSubList + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.partner_sub_list_with_http_info(**kwargs) # noqa: E501 + + def partner_sub_list_with_http_info(self, **kwargs): # noqa: E501 + """Partner subordinate list # noqa: E501 + + Including sub-agents, direct customers, indirect customers # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.partner_sub_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: User ID. If not specified, all user records will be returned + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.PartnerSubList, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method partner_sub_list" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `partner_sub_list`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `partner_sub_list`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `partner_sub_list`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/partner/sub_list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PartnerSubList', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def rebate_broker_commission_history(self, **kwargs): # noqa: E501 + """The broker obtains the user's commission rebate records # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rebate_broker_commission_history(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. + :param int to: Time range ending, default to current time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.BrokerCommission] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.rebate_broker_commission_history_with_http_info(**kwargs) # noqa: E501 + + def rebate_broker_commission_history_with_http_info(self, **kwargs): # noqa: E501 + """The broker obtains the user's commission rebate records # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rebate_broker_commission_history_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. + :param int to: Time range ending, default to current time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.BrokerCommission], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'limit', + 'offset', + 'user_id', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method rebate_broker_commission_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_commission_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_commission_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `rebate_broker_commission_history`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/broker/commission_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BrokerCommission]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def rebate_broker_transaction_history(self, **kwargs): # noqa: E501 + """The broker obtains the user's trading history # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rebate_broker_transaction_history(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. + :param int to: Time range ending, default to current time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.BrokerTransaction] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.rebate_broker_transaction_history_with_http_info(**kwargs) # noqa: E501 + + def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E501 + """The broker obtains the user's trading history # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rebate_broker_transaction_history_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. + :param int to: Time range ending, default to current time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.BrokerTransaction], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'limit', + 'offset', + 'user_id', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method rebate_broker_transaction_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_transaction_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `rebate_broker_transaction_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `rebate_broker_transaction_history`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 + query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/broker/transaction_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BrokerTransaction]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def rebate_user_info(self, **kwargs): # noqa: E501 + """User retrieves rebate information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rebate_user_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.RebateUserInfo] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.rebate_user_info_with_http_info(**kwargs) # noqa: E501 + + def rebate_user_info_with_http_info(self, **kwargs): # noqa: E501 + """User retrieves rebate information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rebate_user_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.RebateUserInfo], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method rebate_user_info" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/user/info', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[RebateUserInfo]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_sub_relation(self, user_id_list, **kwargs): # noqa: E501 + """User-subordinate relationship # noqa: E501 + + Query whether the specified user is in the system # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_sub_relation(user_id_list, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100 (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UserSubRelation + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.user_sub_relation_with_http_info(user_id_list, **kwargs) # noqa: E501 + + def user_sub_relation_with_http_info(self, user_id_list, **kwargs): # noqa: E501 + """User-subordinate relationship # noqa: E501 + + Query whether the specified user is in the system # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_sub_relation_with_http_info(user_id_list, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100 (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UserSubRelation, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id_list' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method user_sub_relation" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id_list' is set + if self.api_client.client_side_validation and ('user_id_list' not in local_var_params or # noqa: E501 + local_var_params['user_id_list'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id_list` when calling `user_sub_relation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user_id_list' in local_var_params and local_var_params['user_id_list'] is not None: # noqa: E501 + query_params.append(('user_id_list', local_var_params['user_id_list'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/rebate/user/sub_relation', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserSubRelation', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py new file mode 100644 index 0000000..fd8ae80 --- /dev/null +++ b/gate_api/api/spot_api.py @@ -0,0 +1,4023 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SpotApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_currencies(self, **kwargs): # noqa: E501 + """List all currencies' details # noqa: E501 + + When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_currencies(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Currency] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_currencies_with_http_info(**kwargs) # noqa: E501 + + def list_currencies_with_http_info(self, **kwargs): # noqa: E501 + """List all currencies' details # noqa: E501 + + When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_currencies_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Currency], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_currencies" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/currencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Currency]', # noqa: E501 + auth_settings=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_currency(self, currency, **kwargs): # noqa: E501 + """Get details of a specific currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_currency(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.Currency + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_currency_with_http_info(currency, **kwargs) # noqa: E501 + + def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get details of a specific currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_currency_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.Currency, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_currency" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_currency`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'currency' in local_var_params: + path_params['currency'] = local_var_params['currency'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/currencies/{currency}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Currency', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_currency_pairs(self, **kwargs): # noqa: E501 + """List all currency pairs 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.list_currency_pairs(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CurrencyPair] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_currency_pairs_with_http_info(**kwargs) # noqa: E501 + + def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 + """List all currency pairs supported # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_currency_pairs_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CurrencyPair], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_currency_pairs" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/currency_pairs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CurrencyPair]', # noqa: E501 + auth_settings=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_currency_pair(self, currency_pair, **kwargs): # noqa: E501 + """Get details of a specifc currency pair # 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_currency_pair(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CurrencyPair + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 + + def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Get details of a specifc currency pair # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_currency_pair_with_http_info(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CurrencyPair, 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 get_currency_pair" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_currency_pair`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'currency_pair' in local_var_params: + path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/currency_pairs/{currency_pair}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CurrencyPair', # noqa: E501 + auth_settings=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_tickers(self, **kwargs): # noqa: E501 + """Retrieve ticker information # noqa: E501 + + Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_tickers(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str timezone: Timezone + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Ticker] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_tickers_with_http_info(**kwargs) # noqa: E501 + + def list_tickers_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve ticker information # noqa: E501 + + Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_tickers_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str timezone: Timezone + :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.Ticker], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'timezone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_tickers" % k + ) + 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 + if 'timezone' in local_var_params and local_var_params['timezone'] is not None: # noqa: E501 + query_params.append(('timezone', local_var_params['timezone'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/tickers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Ticker]', # noqa: E501 + auth_settings=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_order_book(self, currency_pair, **kwargs): # noqa: E501 + """Retrieve order book # noqa: E501 + + Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_order_book(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Return order book ID + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OrderBook + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_order_book_with_http_info(currency_pair, **kwargs) # noqa: E501 + + def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Retrieve order book # noqa: E501 + + Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_order_book_with_http_info(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0 + :param int limit: Maximum number of order depth data in asks or bids + :param bool with_id: Return order book ID + :param _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.OrderBook, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'interval', + 'limit', + 'with_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_order_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_order_book`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_order_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + if '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 'with_id' in local_var_params and local_var_params['with_id'] is not None: # noqa: E501 + query_params.append(('with_id', local_var_params['with_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/order_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrderBook', # noqa: E501 + auth_settings=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_trades(self, currency_pair, **kwargs): # noqa: E501 + """Retrieve market trades # noqa: E501 + + Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_trades(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Trade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_trades_with_http_info(currency_pair, **kwargs) # noqa: E501 + + def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Retrieve market trades # noqa: E501 + + Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_trades_with_http_info(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Trade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'limit', + 'last_id', + 'reverse', + '_from', + 'to', + 'page' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_trades" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_trades`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_trades`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_trades`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'last_id' in local_var_params and local_var_params['last_id'] is not None: # noqa: E501 + query_params.append(('last_id', local_var_params['last_id'])) # noqa: E501 + if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 + query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Trade]', # noqa: E501 + auth_settings=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_candlesticks(self, currency_pair, **kwargs): # noqa: E501 + """Market candlesticks # noqa: E501 + + Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_candlesticks(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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[list[str]] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_candlesticks_with_http_info(currency_pair, **kwargs) # noqa: E501 + + def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Market candlesticks # noqa: E501 + + Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_candlesticks_with_http_info(currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) + :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified + :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days + :param _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[list[str]], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'limit', + '_from', + 'to', + 'interval' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_candlesticks" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_candlesticks`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_candlesticks`, must be a value less than or equal to `1000`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 + query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/candlesticks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[list[str]]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_fee(self, **kwargs): # noqa: E501 + """Query user trading fee rates # noqa: E501 + + This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fee(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotFee + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_fee_with_http_info(**kwargs) # noqa: E501 + + def get_fee_with_http_info(self, **kwargs): # noqa: E501 + """Query user trading fee rates # noqa: E501 + + This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fee_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs + :param _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.SpotFee, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_fee" % k + ) + 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/fee', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SpotFee', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 + """Query a batch of user trading fee rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_batch_spot_fee(currency_pairs, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pairs: A request can only query up to 50 currency pairs (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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, gate_api.SpotFee) + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_batch_spot_fee_with_http_info(currency_pairs, **kwargs) # noqa: E501 + + def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: E501 + """Query a batch of user trading fee rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_batch_spot_fee_with_http_info(currency_pairs, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pairs: A request can only query up to 50 currency pairs (required) + :param _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, gate_api.SpotFee), status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pairs' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_batch_spot_fee" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pairs' is set + if self.api_client.client_side_validation and ('currency_pairs' not in local_var_params or # noqa: E501 + local_var_params['currency_pairs'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pairs` when calling `get_batch_spot_fee`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency_pairs' in local_var_params and local_var_params['currency_pairs'] is not None: # noqa: E501 + query_params.append(('currency_pairs', local_var_params['currency_pairs'])) # 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/batch_fee', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, SpotFee)', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_spot_accounts(self, **kwargs): # noqa: E501 + """List spot 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: Retrieve data of the specified currency + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.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 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: Retrieve data of the specified currency + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.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 account book # noqa: E501 + + Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_spot_account_book(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotAccountBook] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_spot_account_book_with_http_info(**kwargs) # noqa: E501 + + def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501 + """Query account book # noqa: E501 + + Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_spot_account_book_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotAccountBook], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + '_from', + 'to', + 'page', + 'limit', + 'type', + 'code' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_spot_account_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_spot_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'code' in local_var_params and local_var_params['code'] is not None: # noqa: E501 + query_params.append(('code', local_var_params['code'])) # noqa: E501 + + header_params = {} + + 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/account_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SpotAccountBook]', # noqa: E501 + auth_settings=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_batch_orders(self, order, **kwargs): # noqa: E501 + """Create a batch of orders # noqa: E501 + + Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_batch_orders(order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[Order] order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.BatchOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_batch_orders_with_http_info(order, **kwargs) # noqa: E501 + + def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501 + """Create a batch of orders # noqa: E501 + + Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_batch_orders_with_http_info(order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[Order] order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.BatchOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_batch_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order' is set + if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501 + local_var_params['order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order` when calling `create_batch_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'order' in local_var_params: + body_params = local_var_params['order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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/batch_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BatchOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_all_open_orders(self, **kwargs): # noqa: E501 + """List all open orders # noqa: E501 + + Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_all_open_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records returned in one page in each currency pair + :param str account: Specify query account. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OpenOrders] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_all_open_orders_with_http_info(**kwargs) # noqa: E501 + + def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501 + """List all open orders # noqa: E501 + + Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_all_open_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int page: Page number + :param int limit: Maximum number of records returned in one page in each currency pair + :param str account: Specify query account. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OpenOrders], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'limit', + 'account' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_all_open_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_all_open_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_all_open_orders`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + + 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/open_orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OpenOrders]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501 + """close position when cross-currency is disabled # noqa: E501 + + Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cross_liquidate_order(liquidate_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param LiquidateOrder liquidate_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.Order + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_cross_liquidate_order_with_http_info(liquidate_order, **kwargs) # noqa: E501 + + def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs): # noqa: E501 + """close position when cross-currency is disabled # noqa: E501 + + Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cross_liquidate_order_with_http_info(liquidate_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param LiquidateOrder liquidate_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.Order, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'liquidate_order' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_cross_liquidate_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'liquidate_order' is set + if self.api_client.client_side_validation and ('liquidate_order' not in local_var_params or # noqa: E501 + local_var_params['liquidate_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `liquidate_order` when calling `create_cross_liquidate_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'liquidate_order' in local_var_params: + body_params = local_var_params['liquidate_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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/cross_liquidate_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Order', # noqa: E501 + auth_settings=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_orders(self, currency_pair, status, **kwargs): # noqa: E501 + """List orders # noqa: E501 + + Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_orders(currency_pair, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) + :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) + :param int page: Page number + :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 + :param str account: Specify query account. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str side: All bids or asks. Both included if not specified + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_orders_with_http_info(currency_pair, status, **kwargs) # noqa: E501 + + def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: E501 + """List orders # noqa: E501 + + Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_orders_with_http_info(currency_pair, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) + :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) + :param int page: Page number + :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 + :param str account: Specify query account. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str side: All bids or asks. Both included if not specified + :param _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.Order], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'status', + 'page', + 'limit', + 'account', + '_from', + 'to', + 'side' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `list_orders`") # noqa: E501 + # verify the required parameter 'status' is set + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `status` when calling `list_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_orders`, must be a value greater than or equal to `1`") # noqa: E501 + 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 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if '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( + '/spot/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Order]', # noqa: E501 + auth_settings=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_order(self, order, **kwargs): # noqa: E501 + """Create an order # noqa: E501 + + Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_order(order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param Order order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + 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 + + Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_order_with_http_info(order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param Order order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order' is set + if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501 + local_var_params['order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order` when calling `create_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'order' in local_var_params: + body_params = local_var_params['order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Order', # noqa: E501 + auth_settings=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_orders(self, **kwargs): # noqa: E501 + """Cancel all `open` orders in specified currency pair # noqa: E501 + + When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str side: All bids or asks. Both included if not specified + :param str account: Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OrderCancel] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_orders_with_http_info(**kwargs) # noqa: E501 + + def cancel_orders_with_http_info(self, **kwargs): # noqa: E501 + """Cancel all `open` orders in specified currency pair # noqa: E501 + + When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair + :param str side: All bids or asks. Both included if not specified + :param str account: Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OrderCancel], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'side', + 'account', + 'action_mode', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_orders" % k + ) + 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 + 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 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + if 'action_mode' in local_var_params and local_var_params['action_mode'] is not None: # noqa: E501 + query_params.append(('action_mode', local_var_params['action_mode'])) # noqa: E501 + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/spot/orders', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OrderCancel]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501 + """Cancel a batch of orders with an ID list # noqa: E501 + + Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_batch_orders(cancel_batch_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[CancelBatchOrder] cancel_batch_order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CancelOrderResult] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_batch_orders_with_http_info(cancel_batch_order, **kwargs) # noqa: E501 + + def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # noqa: E501 + """Cancel a batch of orders with an ID list # noqa: E501 + + Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_batch_orders_with_http_info(cancel_batch_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[CancelBatchOrder] cancel_batch_order: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.CancelOrderResult], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'cancel_batch_order', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_batch_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'cancel_batch_order' is set + if self.api_client.client_side_validation and ('cancel_batch_order' not in local_var_params or # noqa: E501 + local_var_params['cancel_batch_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `cancel_batch_order` when calling `cancel_batch_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'cancel_batch_order' in local_var_params: + body_params = local_var_params['cancel_batch_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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/cancel_batch_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CancelOrderResult]', # noqa: E501 + auth_settings=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_order(self, order_id, currency_pair, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_order(order_id, currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) + :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. (required) + :param str account: Specify query account. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 + + def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 + """Get a single order # noqa: E501 + + By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_order_with_http_info(order_id, currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) + :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. (required) + :param str account: Specify query account. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order_id', + 'currency_pair', + 'account' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_order" % k + ) + 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_order`") # noqa: E501 + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + + 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/orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Order', # noqa: E501 + auth_settings=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_order(self, order_id, currency_pair, **kwargs): # noqa: E501 + """Cancel a single order # noqa: E501 + + By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_order(order_id, currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) + :param str currency_pair: Currency pair (required) + :param str account: Specify query account. + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 + + def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 + """Cancel a single order # noqa: E501 + + By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_order_with_http_info(order_id, currency_pair, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) + :param str currency_pair: Currency pair (required) + :param str account: Specify query account. + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order_id', + 'currency_pair', + 'account', + 'action_mode', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_order" % k + ) + 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_order`") # noqa: E501 + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `cancel_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + if 'action_mode' in local_var_params and local_var_params['action_mode'] is not None: # noqa: E501 + query_params.append(('action_mode', local_var_params['action_mode'])) # noqa: E501 + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/spot/orders/{order_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Order', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 + """Amend an order # noqa: E501 + + By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.amend_order(order_id, order_patch, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) + :param OrderPatch order_patch: (required) + :param str currency_pair: Currency pair + :param str account: Specify query account. + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.amend_order_with_http_info(order_id, order_patch, **kwargs) # noqa: E501 + + def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: E501 + """Amend an order # noqa: E501 + + By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.amend_order_with_http_info(order_id, order_patch, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) + :param OrderPatch order_patch: (required) + :param str currency_pair: Currency pair + :param str account: Specify query account. + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Order, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'order_id', + 'order_patch', + 'currency_pair', + 'account', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method amend_order" % k + ) + 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 `amend_order`") # noqa: E501 + # verify the required parameter 'order_patch' is set + if self.api_client.client_side_validation and ('order_patch' not in local_var_params or # noqa: E501 + local_var_params['order_patch'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_patch` when calling `amend_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 + + query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'order_patch' in local_var_params: + body_params = local_var_params['order_patch'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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/orders/{order_id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Order', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_my_trades(self, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_my_trades(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Retrieve results with specified currency pair + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param int page: Page number + :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present + :param str account: Specify query account. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Trade] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_my_trades_with_http_info(**kwargs) # noqa: E501 + + def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 + """List personal trading history # noqa: E501 + + By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_my_trades_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Retrieve results with specified currency pair + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param int page: Page number + :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present + :param str account: Specify query account. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Trade], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'limit', + 'page', + 'order_id', + 'account', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_my_trades" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_trades`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_my_trades`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_my_trades`, must be a value greater than or equal to `1`") # noqa: E501 + 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 + query_params.append(('order_id', local_var_params['order_id'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/spot/my_trades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Trade]', # noqa: E501 + auth_settings=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_system_time(self, **kwargs): # noqa: E501 + """Get server current time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_system_time(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.SystemTime + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_system_time_with_http_info(**kwargs) # noqa: E501 + + def get_system_time_with_http_info(self, **kwargs): # noqa: E501 + """Get server current time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_system_time_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.SystemTime, 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_system_time" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/time', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SystemTime', # noqa: E501 + auth_settings=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 countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 + """Countdown cancel orders # noqa: E501 + + When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.countdown_cancel_all_spot(countdown_cancel_all_spot_task, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CountdownCancelAllSpotTask countdown_cancel_all_spot_task: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.TriggerTime + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, **kwargs) # noqa: E501 + + def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 + """Countdown cancel orders # noqa: E501 + + When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param CountdownCancelAllSpotTask countdown_cancel_all_spot_task: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.TriggerTime, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'countdown_cancel_all_spot_task' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method countdown_cancel_all_spot" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'countdown_cancel_all_spot_task' is set + if self.api_client.client_side_validation and ('countdown_cancel_all_spot_task' not in local_var_params or # noqa: E501 + local_var_params['countdown_cancel_all_spot_task'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `countdown_cancel_all_spot_task` when calling `countdown_cancel_all_spot`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'countdown_cancel_all_spot_task' in local_var_params: + body_params = local_var_params['countdown_cancel_all_spot_task'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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/countdown_cancel_all', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TriggerTime', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 + """Batch modification of orders # noqa: E501 + + By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the 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.amend_batch_orders(batch_amend_item, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[BatchAmendItem] batch_amend_item: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.BatchOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.amend_batch_orders_with_http_info(batch_amend_item, **kwargs) # noqa: E501 + + def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa: E501 + """Batch modification of orders # noqa: E501 + + By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the 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.amend_batch_orders_with_http_info(batch_amend_item, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[BatchAmendItem] batch_amend_item: (required) + :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.BatchOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'batch_amend_item', + 'x_gate_exptime' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method amend_batch_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'batch_amend_item' is set + if self.api_client.client_side_validation and ('batch_amend_item' not in local_var_params or # noqa: E501 + local_var_params['batch_amend_item'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `batch_amend_item` when calling `amend_batch_orders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_gate_exptime' in local_var_params: + header_params['x-gate-exptime'] = local_var_params['x_gate_exptime'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'batch_amend_item' in local_var_params: + body_params = local_var_params['batch_amend_item'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/spot/amend_batch_orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BatchOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): # noqa: E501 + """Query spot insurance fund historical data # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_spot_insurance_history(business, currency, _from, to, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str business: Leverage business, margin - position by position; unified - unified account (required) + :param str currency: Currency (required) + :param int _from: Start timestamp, seconds (required) + :param int to: End timestamp, in seconds (required) + :param int page: Page number + :param int limit: The maximum number of items returned in the list, the default value is 30 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.SpotInsuranceHistory] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_spot_insurance_history_with_http_info(business, currency, _from, to, **kwargs) # noqa: E501 + + def get_spot_insurance_history_with_http_info(self, business, currency, _from, to, **kwargs): # noqa: E501 + """Query spot insurance fund historical data # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_spot_insurance_history_with_http_info(business, currency, _from, to, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str business: Leverage business, margin - position by position; unified - unified account (required) + :param str currency: Currency (required) + :param int _from: Start timestamp, seconds (required) + :param int to: End timestamp, in seconds (required) + :param int page: Page number + :param int limit: The maximum number of items returned in the list, the default value is 30 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.SpotInsuranceHistory], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'business', + 'currency', + '_from', + 'to', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_spot_insurance_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'business' is set + if self.api_client.client_side_validation and ('business' not in local_var_params or # noqa: E501 + local_var_params['business'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `business` when calling `get_spot_insurance_history`") # noqa: E501 + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_spot_insurance_history`") # noqa: E501 + # verify the required parameter '_from' is set + if self.api_client.client_side_validation and ('_from' not in local_var_params or # noqa: E501 + local_var_params['_from'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_from` when calling `get_spot_insurance_history`") # noqa: E501 + # verify the required parameter 'to' is set + if self.api_client.client_side_validation and ('to' not in local_var_params or # noqa: E501 + local_var_params['to'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `to` when calling `get_spot_insurance_history`") # noqa: E501 + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `get_spot_insurance_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_spot_insurance_history`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_spot_insurance_history`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'business' in local_var_params and local_var_params['business'] is not None: # noqa: E501 + query_params.append(('business', local_var_params['business'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/spot/insurance_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SpotInsuranceHistory]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 + """Retrieve running auto order list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_spot_price_triggered_orders(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Only list the orders with this status (required) + :param str market: Currency pair + :param str account: Trading account type. Portfolio margin account must set to `unified` + :param int limit: Maximum number of records to be 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.SpotPriceTriggeredOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_spot_price_triggered_orders_with_http_info(status, **kwargs) # noqa: E501 + + def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # noqa: E501 + """Retrieve running auto order list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_spot_price_triggered_orders_with_http_info(status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str status: Only list the orders with this status (required) + :param str market: Currency pair + :param str account: Trading account type. Portfolio margin account must set to `unified` + :param int limit: Maximum number of records to be 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.SpotPriceTriggeredOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'status', + 'market', + 'account', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_spot_price_triggered_orders" % k + ) + 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_price_triggered_orders`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_spot_price_triggered_orders`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + 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 'market' in local_var_params and local_var_params['market'] is not None: # noqa: E501 + query_params.append(('market', local_var_params['market'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + if '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( + '/spot/price_orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SpotPriceTriggeredOrder]', # noqa: E501 + auth_settings=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_price_triggered_order(self, spot_price_triggered_order, **kwargs): # noqa: E501 + """Create a 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_spot_price_triggered_order(spot_price_triggered_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotPriceTriggeredOrder spot_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_spot_price_triggered_order_with_http_info(spot_price_triggered_order, **kwargs) # noqa: E501 + + def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_order, **kwargs): # noqa: E501 + """Create a price-triggered order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_spot_price_triggered_order_with_http_info(spot_price_triggered_order, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SpotPriceTriggeredOrder spot_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 = [ + 'spot_price_triggered_order' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_spot_price_triggered_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'spot_price_triggered_order' is set + if self.api_client.client_side_validation and ('spot_price_triggered_order' not in local_var_params or # noqa: E501 + local_var_params['spot_price_triggered_order'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `spot_price_triggered_order` when calling `create_spot_price_triggered_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'spot_price_triggered_order' in local_var_params: + body_params = local_var_params['spot_price_triggered_order'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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/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_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 + """Cancel All Price-triggered 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_price_triggered_order_list(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str market: Currency pair + :param str account: Trading account type. Portfolio margin account must set to `unified` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotPriceTriggeredOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_spot_price_triggered_order_list_with_http_info(**kwargs) # noqa: E501 + + def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # noqa: E501 + """Cancel All Price-triggered 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_price_triggered_order_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str market: Currency pair + :param str account: Trading account type. Portfolio margin account must set to `unified` + :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.SpotPriceTriggeredOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'market', + 'account' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_spot_price_triggered_order_list" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'market' in local_var_params and local_var_params['market'] is not None: # noqa: E501 + query_params.append(('market', local_var_params['market'])) # noqa: E501 + if 'account' in local_var_params and local_var_params['account'] is not None: # noqa: E501 + query_params.append(('account', local_var_params['account'])) # noqa: E501 + + 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/price_orders', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SpotPriceTriggeredOrder]', # noqa: E501 + auth_settings=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_price_triggered_order(self, order_id, **kwargs): # noqa: E501 + """Get a 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.get_spot_price_triggered_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotPriceTriggeredOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Get a price-triggered order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_spot_price_triggered_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _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.SpotPriceTriggeredOrder, 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_price_triggered_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `get_spot_price_triggered_order`") # noqa: E501 + + collection_formats = {} + + 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/price_orders/{order_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SpotPriceTriggeredOrder', # noqa: E501 + auth_settings=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_price_triggered_order(self, order_id, **kwargs): # noqa: E501 + """cancel a 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.cancel_spot_price_triggered_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SpotPriceTriggeredOrder + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """cancel a price-triggered order # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_spot_price_triggered_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Retrieve the data of the order with the specified ID (required) + :param _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.SpotPriceTriggeredOrder, 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_price_triggered_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'order_id' is set + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `order_id` when calling `cancel_spot_price_triggered_order`") # noqa: E501 + + collection_formats = {} + + 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/price_orders/{order_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SpotPriceTriggeredOrder', # noqa: E501 + auth_settings=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/sub_account_api.py b/gate_api/api/sub_account_api.py new file mode 100644 index 0000000..3ab7b07 --- /dev/null +++ b/gate_api/api/sub_account_api.py @@ -0,0 +1,1299 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SubAccountApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_sub_accounts(self, **kwargs): # noqa: E501 + """List sub-accounts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_accounts(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccount] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_sub_accounts_with_http_info(**kwargs) # noqa: E501 + + def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501 + """List sub-accounts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_accounts_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. + :param _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.SubAccount], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_sub_accounts" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/sub_accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccount]', # noqa: E501 + auth_settings=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_sub_accounts(self, sub_account, **kwargs): # noqa: E501 + """Create a new sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_sub_accounts(sub_account, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SubAccount sub_account: (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.SubAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_sub_accounts_with_http_info(sub_account, **kwargs) # noqa: E501 + + def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E501 + """Create a new sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_sub_accounts_with_http_info(sub_account, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SubAccount sub_account: (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.SubAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_account' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_sub_accounts" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'sub_account' is set + if self.api_client.client_side_validation and ('sub_account' not in local_var_params or # noqa: E501 + local_var_params['sub_account'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sub_account` when calling `create_sub_accounts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sub_account' in local_var_params: + body_params = local_var_params['sub_account'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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( + '/sub_accounts', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SubAccount', # noqa: E501 + auth_settings=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_sub_account(self, user_id, **kwargs): # noqa: E501 + """Get the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sub_account(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 + + def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Get the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sub_account_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sub_account" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `get_sub_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_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( + '/sub_accounts/{user_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SubAccount', # noqa: E501 + auth_settings=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_sub_account_keys(self, user_id, **kwargs): # noqa: E501 + """List all API Key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_keys(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountKey] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_sub_account_keys_with_http_info(user_id, **kwargs) # noqa: E501 + + def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 + """List all API Key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_keys_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountKey], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_sub_account_keys" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `list_sub_account_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_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( + '/sub_accounts/{user_id}/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccountKey]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: E501 + """Create API Key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_sub_account_keys(user_id, sub_account_key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param SubAccountKey sub_account_key: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountKey] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_sub_account_keys_with_http_info(user_id, sub_account_key, **kwargs) # noqa: E501 + + def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwargs): # noqa: E501 + """Create API Key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_sub_account_keys_with_http_info(user_id, sub_account_key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param SubAccountKey sub_account_key: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountKey], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id', + 'sub_account_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_sub_account_keys" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `create_sub_account_keys`") # noqa: E501 + # verify the required parameter 'sub_account_key' is set + if self.api_client.client_side_validation and ('sub_account_key' not in local_var_params or # noqa: E501 + local_var_params['sub_account_key'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sub_account_key` when calling `create_sub_account_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sub_account_key' in local_var_params: + body_params = local_var_params['sub_account_key'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # 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( + '/sub_accounts/{user_id}/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccountKey]', # noqa: E501 + auth_settings=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_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 + """Get the API Key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sub_account_key(user_id, key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param str key: The API Key of the sub-account (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountKey + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sub_account_key_with_http_info(user_id, key, **kwargs) # noqa: E501 + + def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E501 + """Get the API Key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sub_account_key_with_http_info(user_id, key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param str key: The API Key of the sub-account (required) + :param _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.SubAccountKey, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id', + 'key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sub_account_key" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `get_sub_account_key`") # noqa: E501 + # verify the required parameter 'key' is set + if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 + local_var_params['key'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `key` when calling `get_sub_account_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_id'] # noqa: E501 + if 'key' in local_var_params: + path_params['key'] = local_var_params['key'] # 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( + '/sub_accounts/{user_id}/keys/{key}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SubAccountKey', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 + """Update API key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_sub_account_keys(user_id, key, sub_account_key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param str key: The API Key of the sub-account (required) + :param SubAccountKey sub_account_key: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_sub_account_keys_with_http_info(user_id, key, sub_account_key, **kwargs) # noqa: E501 + + def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 + """Update API key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_sub_account_keys_with_http_info(user_id, key, sub_account_key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param str key: The API Key of the sub-account (required) + :param SubAccountKey sub_account_key: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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 = [ + 'user_id', + 'key', + 'sub_account_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_sub_account_keys" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `update_sub_account_keys`") # noqa: E501 + # verify the required parameter 'key' is set + if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 + local_var_params['key'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `key` when calling `update_sub_account_keys`") # noqa: E501 + # verify the required parameter 'sub_account_key' is set + if self.api_client.client_side_validation and ('sub_account_key' not in local_var_params or # noqa: E501 + local_var_params['sub_account_key'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sub_account_key` when calling `update_sub_account_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_id'] # noqa: E501 + if 'key' in local_var_params: + path_params['key'] = local_var_params['key'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sub_account_key' in local_var_params: + body_params = local_var_params['sub_account_key'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/sub_accounts/{user_id}/keys/{key}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 + """Delete API key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sub_account_keys(user_id, key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param str key: The API Key of the sub-account (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.delete_sub_account_keys_with_http_info(user_id, key, **kwargs) # noqa: E501 + + def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noqa: E501 + """Delete API key of the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sub_account_keys_with_http_info(user_id, key, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: Sub-account user id (required) + :param str key: The API Key of the sub-account (required) + :param _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 = [ + 'user_id', + 'key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_sub_account_keys" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `delete_sub_account_keys`") # noqa: E501 + # verify the required parameter 'key' is set + if self.api_client.client_side_validation and ('key' not in local_var_params or # noqa: E501 + local_var_params['key'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `key` when calling `delete_sub_account_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_id'] # noqa: E501 + if 'key' in local_var_params: + path_params['key'] = local_var_params['key'] # noqa: E501 + + 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( + '/sub_accounts/{user_id}/keys/{key}', 'DELETE', + 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 lock_sub_account(self, user_id, **kwargs): # noqa: E501 + """Lock the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lock_sub_account(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: The user id of the sub-account (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.lock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 + + def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Lock the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lock_sub_account_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: The user id of the sub-account (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method lock_sub_account" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `lock_sub_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_id'] # noqa: E501 + + 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( + '/sub_accounts/{user_id}/lock', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 + """Unlock the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unlock_sub_account(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: The user id of the sub-account (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.unlock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 + + def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Unlock the sub-account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unlock_sub_account_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int user_id: The user id of the sub-account (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'user_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method unlock_sub_account" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 + local_var_params['user_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_id` when calling `unlock_sub_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in local_var_params: + path_params['user_id'] = local_var_params['user_id'] # noqa: E501 + + 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( + '/sub_accounts/{user_id}/unlock', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_unified_mode(self, **kwargs): # noqa: E501 + """Get sub-account mode # noqa: E501 + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_mode(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.SubUserMode] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_unified_mode_with_http_info(**kwargs) # noqa: E501 + + def list_unified_mode_with_http_info(self, **kwargs): # noqa: E501 + """Get sub-account mode # noqa: E501 + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_mode_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.SubUserMode], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_unified_mode" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/sub_accounts/unified_mode', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubUserMode]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py new file mode 100644 index 0000000..d1b37bd --- /dev/null +++ b/gate_api/api/unified_api.py @@ -0,0 +1,2466 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UnifiedApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_unified_accounts(self, **kwargs): # noqa: E501 + """Get unified account information # noqa: E501 + + The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_accounts(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param str sub_uid: Sub account user ID + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedAccount + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_unified_accounts_with_http_info(**kwargs) # noqa: E501 + + def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501 + """Get unified account information # noqa: E501 + + The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_accounts_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param str sub_uid: Sub account user ID + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedAccount, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'sub_uid' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_unified_accounts" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 + query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 + """Query about the maximum borrowing for the unified account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_borrowable(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedBorrowable + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_borrowable_with_http_info(currency, **kwargs) # noqa: E501 + + def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501 + """Query about the maximum borrowing for the unified account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_borrowable_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedBorrowable, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unified_borrowable" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_unified_borrowable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/borrowable', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedBorrowable', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unified_transferable(self, currency, **kwargs): # noqa: E501 + """Query about the maximum transferable for the unified account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_transferable(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedTransferable + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_transferable_with_http_info(currency, **kwargs) # noqa: E501 + + def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 + """Query about the maximum transferable for the unified account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_transferable_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedTransferable, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unified_transferable" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_unified_transferable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/transferable', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedTransferable', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unified_transferables(self, currencies, **kwargs): # noqa: E501 + """Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_transferables(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.TransferablesResult] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_transferables_with_http_info(currencies, **kwargs) # noqa: E501 + + def get_unified_transferables_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_transferables_with_http_info(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.TransferablesResult], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currencies' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unified_transferables" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_transferables`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/transferables', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TransferablesResult]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unified_borrowable_list(self, currencies, **kwargs): # noqa: E501 + """Batch query unified account can be borrowed up to a maximum # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_borrowable_list(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UnifiedBorrowable1] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_borrowable_list_with_http_info(currencies, **kwargs) # noqa: E501 + + def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Batch query unified account can be borrowed up to a maximum # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_borrowable_list_with_http_info(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UnifiedBorrowable1], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currencies' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unified_borrowable_list" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_borrowable_list`") # noqa: E501 + + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) > 10): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_borrowable_list`, number of items must be less than or equal to `10`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) < 1): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_borrowable_list`, number of items must be greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + collection_formats['currencies'] = 'multi' # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/batch_borrowable', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UnifiedBorrowable1]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_unified_loans(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_loans(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str type: Loan type, platform - platform, margin - margin + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniLoan] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_unified_loans_with_http_info(**kwargs) # noqa: E501 + + def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_loans_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str type: Loan type, platform - platform, margin - margin + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_unified_loans" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loans`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loans`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loans`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/loans', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLoan]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_unified_loan(self, unified_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 + + When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_unified_loan(unified_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedLoan unified_loan: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedLoanResult + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_unified_loan_with_http_info(unified_loan, **kwargs) # noqa: E501 + + def create_unified_loan_with_http_info(self, unified_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 + + When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_unified_loan_with_http_info(unified_loan, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedLoan unified_loan: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedLoanResult, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'unified_loan' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_unified_loan" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'unified_loan' is set + if self.api_client.client_side_validation and ('unified_loan' not in local_var_params or # noqa: E501 + local_var_params['unified_loan'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `unified_loan` when calling `create_unified_loan`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'unified_loan' in local_var_params: + body_params = local_var_params['unified_loan'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/loans', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedLoanResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_unified_loan_records(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_loan_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UnifiedLoanRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_unified_loan_records_with_http_info(**kwargs) # noqa: E501 + + def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_loan_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UnifiedLoanRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'type', + 'currency', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_unified_loan_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/loan_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UnifiedLoanRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_loan_interest_records(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UniLoanInterestRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_unified_loan_interest_records_with_http_info(**kwargs) # noqa: E501 + + def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_loan_interest_records_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit', + '_from', + 'to', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_unified_loan_interest_records" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_unified_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_interest_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_unified_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/interest_records', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UniLoanInterestRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unified_risk_units(self, **kwargs): # noqa: E501 + """Get user risk unit details # noqa: E501 + + Retrieve user risk unit details, only valid in portfolio margin mode # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_risk_units(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedRiskUnits + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_risk_units_with_http_info(**kwargs) # noqa: E501 + + def get_unified_risk_units_with_http_info(self, **kwargs): # noqa: E501 + """Get user risk unit details # noqa: E501 + + Retrieve user risk unit details, only valid in portfolio margin mode # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_risk_units_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedRiskUnits, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unified_risk_units" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/risk_units', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedRiskUnits', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unified_mode(self, **kwargs): # noqa: E501 + """Query mode of the unified account # noqa: E501 + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_mode(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedModeSet + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_mode_with_http_info(**kwargs) # noqa: E501 + + def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 + """Query mode of the unified account # noqa: E501 + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_mode_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedModeSet, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unified_mode" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/unified_mode', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedModeSet', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 + """Set mode of the unified account # noqa: E501 + + Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_unified_mode(unified_mode_set, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedModeSet unified_mode_set: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_unified_mode_with_http_info(unified_mode_set, **kwargs) # noqa: E501 + + def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: E501 + """Set mode of the unified account # noqa: E501 + + Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_unified_mode_with_http_info(unified_mode_set, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedModeSet unified_mode_set: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'unified_mode_set' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_unified_mode" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'unified_mode_set' is set + if self.api_client.client_side_validation and ('unified_mode_set' not in local_var_params or # noqa: E501 + local_var_params['unified_mode_set'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `unified_mode_set` when calling `set_unified_mode`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'unified_mode_set' in local_var_params: + body_params = local_var_params['unified_mode_set'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/unified_mode', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unified_estimate_rate(self, currencies, **kwargs): # noqa: E501 + """Get unified estimate rate # noqa: E501 + + Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_estimate_rate(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: dict + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unified_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 + + def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Get unified estimate rate # noqa: E501 + + Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unified_estimate_rate_with_http_info(currencies, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currencies' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unified_estimate_rate" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_unified_estimate_rate`") # noqa: E501 + + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) > 10): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) < 1): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_unified_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + collection_formats['currencies'] = 'multi' # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/estimate_rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, str)', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_currency_discount_tiers(self, **kwargs): # noqa: E501 + """List currency discount tiers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_currency_discount_tiers(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UnifiedDiscount] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_currency_discount_tiers_with_http_info(**kwargs) # noqa: E501 + + def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501 + """List currency discount tiers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_currency_discount_tiers_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UnifiedDiscount], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_currency_discount_tiers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/unified/currency_discount_tiers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UnifiedDiscount]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_loan_margin_tiers(self, **kwargs): # noqa: E501 + """List loan margin tiers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_loan_margin_tiers(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UnifiedMarginTiers] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_loan_margin_tiers_with_http_info(**kwargs) # noqa: E501 + + def list_loan_margin_tiers_with_http_info(self, **kwargs): # noqa: E501 + """List loan margin tiers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_loan_margin_tiers_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UnifiedMarginTiers], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_loan_margin_tiers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/unified/loan_margin_tiers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UnifiedMarginTiers]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def calculate_portfolio_margin(self, unified_portfolio_input, **kwargs): # noqa: E501 + """Portfolio margin calculator # noqa: E501 + + Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.calculate_portfolio_margin(unified_portfolio_input, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedPortfolioInput unified_portfolio_input: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedPortfolioOutput + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.calculate_portfolio_margin_with_http_info(unified_portfolio_input, **kwargs) # noqa: E501 + + def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **kwargs): # noqa: E501 + """Portfolio margin calculator # noqa: E501 + + Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.calculate_portfolio_margin_with_http_info(unified_portfolio_input, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedPortfolioInput unified_portfolio_input: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedPortfolioOutput, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'unified_portfolio_input' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method calculate_portfolio_margin" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'unified_portfolio_input' is set + if self.api_client.client_side_validation and ('unified_portfolio_input' not in local_var_params or # noqa: E501 + local_var_params['unified_portfolio_input'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `unified_portfolio_input` when calling `calculate_portfolio_margin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'unified_portfolio_input' in local_var_params: + body_params = local_var_params['unified_portfolio_input'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/unified/portfolio_calculator', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedPortfolioOutput', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 + """Minimum currency leverage that can be set # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_leverage_currency_config(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedLeverageConfig + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_leverage_currency_config_with_http_info(currency, **kwargs) # noqa: E501 + + def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): # noqa: E501 + """Minimum currency leverage that can be set # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_leverage_currency_config_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedLeverageConfig, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_leverage_currency_config" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_user_leverage_currency_config`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/leverage/user_currency_config', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedLeverageConfig', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501 + """Get the leverage multiple of the user currency # noqa: E501 + + Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_leverage_currency_setting(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedLeverageSetting + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_leverage_currency_setting_with_http_info(**kwargs) # noqa: E501 + + def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: E501 + """Get the leverage multiple of the user currency # noqa: E501 + + Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_leverage_currency_setting_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedLeverageSetting, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_leverage_currency_setting" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/leverage/user_currency_setting', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedLeverageSetting', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_user_leverage_currency_setting(self, unified_leverage_setting, **kwargs): # noqa: E501 + """Set the loan currency leverage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_user_leverage_currency_setting(unified_leverage_setting, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedLeverageSetting unified_leverage_setting: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, **kwargs) # noqa: E501 + + def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_setting, **kwargs): # noqa: E501 + """Set the loan currency leverage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedLeverageSetting unified_leverage_setting: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'unified_leverage_setting' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_user_leverage_currency_setting" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'unified_leverage_setting' is set + if self.api_client.client_side_validation and ('unified_leverage_setting' not in local_var_params or # noqa: E501 + local_var_params['unified_leverage_setting'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `unified_leverage_setting` when calling `set_user_leverage_currency_setting`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'unified_leverage_setting' in local_var_params: + body_params = local_var_params['unified_leverage_setting'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/leverage/user_currency_setting', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_unified_currencies(self, **kwargs): # noqa: E501 + """List of loan currencies supported by unified account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_currencies(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UnifiedCurrency] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_unified_currencies_with_http_info(**kwargs) # noqa: E501 + + def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 + """List of loan currencies supported by unified account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_unified_currencies_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UnifiedCurrency], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_unified_currencies" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/unified/currencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UnifiedCurrency]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 + """get historical lending rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_history_loan_rate(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param str tier: The VIP level of the floating rate that needs to be queried + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedHistoryLoanRate + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_history_loan_rate_with_http_info(currency, **kwargs) # noqa: E501 + + def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E501 + """get historical lending rates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_history_loan_rate_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param str tier: The VIP level of the floating rate that needs to be queried + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedHistoryLoanRate, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'tier', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_history_loan_rate" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_history_loan_rate`") # noqa: E501 + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `get_history_loan_rate`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_history_loan_rate`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_history_loan_rate`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'tier' in local_var_params and local_var_params['tier'] is not None: # noqa: E501 + query_params.append(('tier', local_var_params['tier'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/history_loan_rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedHistoryLoanRate', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py new file mode 100644 index 0000000..726ba97 --- /dev/null +++ b/gate_api/api/wallet_api.py @@ -0,0 +1,2526 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class WalletApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_currency_chains(self, currency, **kwargs): # noqa: E501 + """List chains supported for specified currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_currency_chains(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.CurrencyChain] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_currency_chains_with_http_info(currency, **kwargs) # noqa: E501 + + def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 + """List chains supported for specified currency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_currency_chains_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.CurrencyChain], 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_currency_chains" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `list_currency_chains`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/wallet/currency_chains', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CurrencyChain]', # noqa: E501 + auth_settings=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_deposit_address(self, currency, **kwargs): # noqa: E501 + """Generate currency deposit 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.get_deposit_address(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.DepositAddress + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_deposit_address_with_http_info(currency, **kwargs) # noqa: E501 + + def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 + """Generate currency deposit 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.get_deposit_address_with_http_info(currency, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency name (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.DepositAddress, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_deposit_address" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_deposit_address`") # noqa: E501 + + collection_formats = {} + + 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( + '/wallet/deposit_address', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DepositAddress', # noqa: E501 + auth_settings=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_withdrawals(self, **kwargs): # noqa: E501 + """Retrieve withdrawal records # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_withdrawals(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param str withdraw_id: The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time + :param str asset_class: The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone + :param str withdraw_order_id: User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.WithdrawalRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_withdrawals_with_http_info(**kwargs) # noqa: E501 + + def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve withdrawal records # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_withdrawals_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param str withdraw_id: The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time + :param str asset_class: The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone + :param str withdraw_order_id: User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.WithdrawalRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'withdraw_id', + 'asset_class', + 'withdraw_order_id', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_withdrawals" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_withdrawals`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_withdrawals`, must be a value greater than or equal to `0`") # noqa: E501 + 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 'withdraw_id' in local_var_params and local_var_params['withdraw_id'] is not None: # noqa: E501 + query_params.append(('withdraw_id', local_var_params['withdraw_id'])) # noqa: E501 + if 'asset_class' in local_var_params and local_var_params['asset_class'] is not None: # noqa: E501 + query_params.append(('asset_class', local_var_params['asset_class'])) # noqa: E501 + if 'withdraw_order_id' in local_var_params and local_var_params['withdraw_order_id'] is not None: # noqa: E501 + query_params.append(('withdraw_order_id', local_var_params['withdraw_order_id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/withdrawals', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[WithdrawalRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_deposits(self, **kwargs): # noqa: E501 + """Retrieve deposit records # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_deposits(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. + :param int offset: List offset, starting from 0 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.DepositRecord] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_deposits_with_http_info(**kwargs) # noqa: E501 + + def list_deposits_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve deposit records # noqa: E501 + + Record time range cannot exceed 30 days # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_deposits_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Filter by currency. Return all currency records if not specified + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. + :param int offset: List offset, starting from 0 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.DepositRecord], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_deposits" % k + ) + 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'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_deposits`, must be a value less than or equal to `500`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_deposits`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_deposits`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if '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( + '/wallet/deposits', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DepositRecord]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def transfer(self, transfer, **kwargs): # noqa: E501 + """Transfer between trading accounts # noqa: E501 + + Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transfer(transfer, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param Transfer transfer: (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.TransactionID + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.transfer_with_http_info(transfer, **kwargs) # noqa: E501 + + def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501 + """Transfer between trading accounts # noqa: E501 + + Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transfer_with_http_info(transfer, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param Transfer transfer: (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.TransactionID, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'transfer' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method transfer" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'transfer' is set + if self.api_client.client_side_validation and ('transfer' not in local_var_params or # noqa: E501 + local_var_params['transfer'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `transfer` when calling `transfer`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'transfer' in local_var_params: + body_params = local_var_params['transfer'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/transfers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionID', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_sub_account_transfers(self, **kwargs): # noqa: E501 + """Retrieve transfer records between main and sub accounts # noqa: E501 + + Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_transfers(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.SubAccountTransfer] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_sub_account_transfers_with_http_info(**kwargs) # noqa: E501 + + def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve transfer records between main and sub accounts # noqa: E501 + + Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_transfers_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param int _from: Time range beginning, default to 7 days before current time + :param int to: Time range ending, default to current time + :param int limit: Maximum number of records to be returned in a single list + :param 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.SubAccountTransfer], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_uid', + '_from', + 'to', + 'limit', + 'offset' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_sub_account_transfers" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_sub_account_transfers`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_sub_account_transfers`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 + query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/sub_account_transfers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccountTransfer]', # noqa: E501 + auth_settings=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_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E501 + """Transfer between main and sub accounts # noqa: E501 + + Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transfer_with_sub_account(sub_account_transfer, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SubAccountTransfer sub_account_transfer: (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.TransactionID + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.transfer_with_sub_account_with_http_info(sub_account_transfer, **kwargs) # noqa: E501 + + def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwargs): # noqa: E501 + """Transfer between main and sub accounts # noqa: E501 + + Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transfer_with_sub_account_with_http_info(sub_account_transfer, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SubAccountTransfer sub_account_transfer: (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.TransactionID, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_account_transfer' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method transfer_with_sub_account" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'sub_account_transfer' is set + if self.api_client.client_side_validation and ('sub_account_transfer' not in local_var_params or # noqa: E501 + local_var_params['sub_account_transfer'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sub_account_transfer` when calling `transfer_with_sub_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sub_account_transfer' in local_var_params: + body_params = local_var_params['sub_account_transfer'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/sub_account_transfers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionID', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # noqa: E501 + """Sub-account transfers to sub-account # noqa: E501 + + It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sub_account_to_sub_account(sub_account_to_sub_account, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SubAccountToSubAccount sub_account_to_sub_account: (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.TransactionID + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, **kwargs) # noqa: E501 + + def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account, **kwargs): # noqa: E501 + """Sub-account transfers to sub-account # noqa: E501 + + It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SubAccountToSubAccount sub_account_to_sub_account: (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.TransactionID, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_account_to_sub_account' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method sub_account_to_sub_account" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'sub_account_to_sub_account' is set + if self.api_client.client_side_validation and ('sub_account_to_sub_account' not in local_var_params or # noqa: E501 + local_var_params['sub_account_to_sub_account'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sub_account_to_sub_account` when calling `sub_account_to_sub_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sub_account_to_sub_account' in local_var_params: + body_params = local_var_params['sub_account_to_sub_account'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/sub_account_to_sub_account', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionID', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_transfer_order_status(self, **kwargs): # noqa: E501 + """Transfer status query # noqa: E501 + + Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_transfer_order_status(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str client_order_id: The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. + :param str tx_id: The transfer operation number and client_order_id cannot be empty at the same time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.TransferOrderStatus + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_transfer_order_status_with_http_info(**kwargs) # noqa: E501 + + def get_transfer_order_status_with_http_info(self, **kwargs): # noqa: E501 + """Transfer status query # noqa: E501 + + Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_transfer_order_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str client_order_id: The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. + :param str tx_id: The transfer operation number and client_order_id cannot be empty at the same time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.TransferOrderStatus, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'client_order_id', + 'tx_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_transfer_order_status" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'client_order_id' in local_var_params and local_var_params['client_order_id'] is not None: # noqa: E501 + query_params.append(('client_order_id', local_var_params['client_order_id'])) # noqa: E501 + if 'tx_id' in local_var_params and local_var_params['tx_id'] is not None: # noqa: E501 + query_params.append(('tx_id', local_var_params['tx_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/order_status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransferOrderStatus', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_withdraw_status(self, **kwargs): # noqa: E501 + """Retrieve withdrawal status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_withdraw_status(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.WithdrawStatus] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_withdraw_status_with_http_info(**kwargs) # noqa: E501 + + def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve withdrawal status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_withdraw_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param _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.WithdrawStatus], 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_withdraw_status" % 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( + '/wallet/withdraw_status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[WithdrawStatus]', # noqa: E501 + auth_settings=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_sub_account_balances(self, **kwargs): # noqa: E501 + """Retrieve sub account balances # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_balances(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountBalance] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_sub_account_balances_with_http_info(**kwargs) # noqa: E501 + + def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve sub account balances # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_balances_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param _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.SubAccountBalance], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_uid' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_sub_account_balances" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 + query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 + + 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/sub_account_balances', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccountBalance]', # noqa: E501 + auth_settings=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_sub_account_margin_balances(self, **kwargs): # noqa: E501 + """Query sub accounts' margin balances # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_margin_balances(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountMarginBalance] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_sub_account_margin_balances_with_http_info(**kwargs) # noqa: E501 + + def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E501 + """Query sub accounts' margin balances # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_margin_balances_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param _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.SubAccountMarginBalance], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_uid' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_sub_account_margin_balances" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 + query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 + + 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/sub_account_margin_balances', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccountMarginBalance]', # noqa: E501 + auth_settings=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_sub_account_futures_balances(self, **kwargs): # noqa: E501 + """Query sub accounts' futures account balances # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_futures_balances(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str settle: Query only balances of specified settle currency + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.SubAccountFuturesBalance] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_sub_account_futures_balances_with_http_info(**kwargs) # noqa: E501 + + def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E501 + """Query sub accounts' futures account balances # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_futures_balances_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str settle: Query only balances of specified settle currency + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.SubAccountFuturesBalance], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_uid', + 'settle' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_sub_account_futures_balances" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 + query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 + if 'settle' in local_var_params and local_var_params['settle'] is not None: # noqa: E501 + query_params.append(('settle', local_var_params['settle'])) # 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/sub_account_futures_balances', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccountFuturesBalance]', # noqa: E501 + auth_settings=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_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501 + """Query subaccount's cross_margin account info # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_cross_margin_balances(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.SubAccountCrossMarginBalance] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_sub_account_cross_margin_balances_with_http_info(**kwargs) # noqa: E501 + + def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # noqa: E501 + """Query subaccount's cross_margin account info # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_sub_account_cross_margin_balances_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param _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.SubAccountCrossMarginBalance], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sub_uid' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_sub_account_cross_margin_balances" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'sub_uid' in local_var_params and local_var_params['sub_uid'] is not None: # noqa: E501 + query_params.append(('sub_uid', local_var_params['sub_uid'])) # noqa: E501 + + 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/sub_account_cross_margin_balances', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SubAccountCrossMarginBalance]', # noqa: E501 + auth_settings=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_saved_address(self, currency, **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) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param str chain: Chain name + :param str limit: Maximum number returned, 100 at most + :param int page: Page number + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.SavedAddress] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_saved_address_with_http_info(currency, **kwargs) # noqa: E501 + + def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 + """Query saved address # noqa: E501 + + 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) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency (required) + :param str chain: Chain name + :param str limit: Maximum number returned, 100 at most + :param int page: Page number + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.SavedAddress], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'chain', + 'limit', + 'page' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_saved_address" % k + ) + 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 + 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 '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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/saved_address', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SavedAddress]', # noqa: E501 + auth_settings=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_trade_fee(self, **kwargs): # noqa: E501 + """Retrieve personal trading fee # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_trade_fee(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs + :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.TradeFee + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_trade_fee_with_http_info(**kwargs) # noqa: E501 + + def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve personal trading fee # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_trade_fee_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs + :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. + :param _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.TradeFee, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency_pair', + 'settle' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_trade_fee" % k + ) + 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 + if 'settle' in local_var_params and local_var_params['settle'] is not None: # noqa: E501 + query_params.append(('settle', local_var_params['settle'])) # 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/fee', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TradeFee', # noqa: E501 + auth_settings=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_total_balance(self, **kwargs): # noqa: E501 + """Retrieve user's total balances # noqa: E501 + + This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_total_balance(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.TotalBalance + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_total_balance_with_http_info(**kwargs) # noqa: E501 + + def get_total_balance_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve user's total balances # noqa: E501 + + This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_total_balance_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. + :param _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.TotalBalance, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_total_balance" % 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( + '/wallet/total_balance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TotalBalance', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_small_balance(self, **kwargs): # noqa: E501 + """List small balance # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_small_balance(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.SmallBalance] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_small_balance_with_http_info(**kwargs) # noqa: E501 + + def list_small_balance_with_http_info(self, **kwargs): # noqa: E501 + """List small balance # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_small_balance_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.SmallBalance], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_small_balance" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/small_balance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SmallBalance]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def convert_small_balance(self, convert_small_balance, **kwargs): # noqa: E501 + """Convert small balance # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.convert_small_balance(convert_small_balance, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ConvertSmallBalance convert_small_balance: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.convert_small_balance_with_http_info(convert_small_balance, **kwargs) # noqa: E501 + + def convert_small_balance_with_http_info(self, convert_small_balance, **kwargs): # noqa: E501 + """Convert small balance # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.convert_small_balance_with_http_info(convert_small_balance, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param ConvertSmallBalance convert_small_balance: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'convert_small_balance' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method convert_small_balance" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'convert_small_balance' is set + if self.api_client.client_side_validation and ('convert_small_balance' not in local_var_params or # noqa: E501 + local_var_params['convert_small_balance'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `convert_small_balance` when calling `convert_small_balance`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'convert_small_balance' in local_var_params: + body_params = local_var_params['convert_small_balance'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/small_balance', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_small_balance_history(self, **kwargs): # noqa: E501 + """List small balance history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_small_balance_history(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.SmallBalanceHistory] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_small_balance_history_with_http_info(**kwargs) # noqa: E501 + + def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 + """List small balance history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_small_balance_history_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.SmallBalanceHistory], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_small_balance_history" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_small_balance_history`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_small_balance_history`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_small_balance_history`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/small_balance_history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SmallBalanceHistory]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_push_orders(self, **kwargs): # noqa: E501 + """Retrieve the UID transfer history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_push_orders(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int id: Order ID + :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp + :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. + :param int limit: The maximum number of items returned in the list, the default value is 100 + :param int offset: List offset, starting from 0 + :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.UidPushOrder] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_push_orders_with_http_info(**kwargs) # noqa: E501 + + def list_push_orders_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve the UID transfer history # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_push_orders_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int id: Order ID + :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp + :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. + :param int limit: The maximum number of items returned in the list, the default value is 100 + :param int offset: List offset, starting from 0 + :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.UidPushOrder], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id', + '_from', + 'to', + 'limit', + 'offset', + 'transaction_type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_push_orders" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_push_orders`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_push_orders`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'id' in local_var_params and local_var_params['id'] is not None: # noqa: E501 + query_params.append(('id', local_var_params['id'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'transaction_type' in local_var_params and local_var_params['transaction_type'] is not None: # noqa: E501 + query_params.append(('transaction_type', local_var_params['transaction_type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/wallet/push', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UidPushOrder]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py new file mode 100644 index 0000000..318623a --- /dev/null +++ b/gate_api/api/withdrawal_api.py @@ -0,0 +1,385 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class WithdrawalApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def withdraw(self, ledger_record, **kwargs): # noqa: E501 + """Withdraw # noqa: E501 + + Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.withdraw(ledger_record, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param LedgerRecord ledger_record: (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.LedgerRecord + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.withdraw_with_http_info(ledger_record, **kwargs) # noqa: E501 + + def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501 + """Withdraw # noqa: E501 + + Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.withdraw_with_http_info(ledger_record, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param LedgerRecord ledger_record: (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.LedgerRecord, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'ledger_record' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method withdraw" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'ledger_record' is set + if self.api_client.client_side_validation and ('ledger_record' not in local_var_params or # noqa: E501 + local_var_params['ledger_record'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ledger_record` when calling `withdraw`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'ledger_record' in local_var_params: + body_params = local_var_params['ledger_record'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/withdrawals', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LedgerRecord', # noqa: E501 + auth_settings=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 withdraw_push_order(self, uid_push_withdrawal, **kwargs): # noqa: E501 + """UID transfer # noqa: E501 + + Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.withdraw_push_order(uid_push_withdrawal, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UidPushWithdrawal uid_push_withdrawal: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UidPushWithdrawalResp + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.withdraw_push_order_with_http_info(uid_push_withdrawal, **kwargs) # noqa: E501 + + def withdraw_push_order_with_http_info(self, uid_push_withdrawal, **kwargs): # noqa: E501 + """UID transfer # noqa: E501 + + Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.withdraw_push_order_with_http_info(uid_push_withdrawal, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UidPushWithdrawal uid_push_withdrawal: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UidPushWithdrawalResp, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'uid_push_withdrawal' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method withdraw_push_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'uid_push_withdrawal' is set + if self.api_client.client_side_validation and ('uid_push_withdrawal' not in local_var_params or # noqa: E501 + local_var_params['uid_push_withdrawal'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `uid_push_withdrawal` when calling `withdraw_push_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'uid_push_withdrawal' in local_var_params: + body_params = local_var_params['uid_push_withdrawal'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/withdrawals/push', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UidPushWithdrawalResp', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def cancel_withdrawal(self, withdrawal_id, **kwargs): # noqa: E501 + """Cancel withdrawal with specified ID # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_withdrawal(withdrawal_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str withdrawal_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.LedgerRecord + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.cancel_withdrawal_with_http_info(withdrawal_id, **kwargs) # noqa: E501 + + def cancel_withdrawal_with_http_info(self, withdrawal_id, **kwargs): # noqa: E501 + """Cancel withdrawal with specified 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.cancel_withdrawal_with_http_info(withdrawal_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str withdrawal_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.LedgerRecord, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'withdrawal_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_withdrawal" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'withdrawal_id' is set + if self.api_client.client_side_validation and ('withdrawal_id' not in local_var_params or # noqa: E501 + local_var_params['withdrawal_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `withdrawal_id` when calling `cancel_withdrawal`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'withdrawal_id' in local_var_params: + path_params['withdrawal_id'] = local_var_params['withdrawal_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( + '/withdrawals/{withdrawal_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LedgerRecord', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api_client.py b/gate_api/api_client.py new file mode 100644 index 0000000..e70cb8e --- /dev/null +++ b/gate_api/api_client.py @@ -0,0 +1,707 @@ +# coding: utf-8 +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import atexit +import datetime +import hashlib +import hmac +import time +from six.moves.urllib.parse import unquote_plus, urlencode, urlparse + +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from gate_api.configuration import Configuration +import gate_api.models +from gate_api import rest +from gate_api.exceptions import ApiValueError, ApiException, GateApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + if configuration is None: + configuration = Configuration.get_default_copy() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/6.97.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # auth setting + self.update_params_for_auth(method, url, header_params, query_params, body, auth_settings) + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + try: + err = json.loads(e.body) + except ValueError: + raise e + else: + if not err.get('label'): + raise e + raise GateApiException(err.get('label'), err.get('message'), err.get('detail'), e) + + content_type = response_data.getheader('content-type') + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return return_data + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.openapi_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(gate_api.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param list post_params: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param list auth_settings: Auth Settings names for the request. + :param response_type: Response data type. + :param dict files: key -> filename, value -> filepath, + for `multipart/form-data`. + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _host: server/host defined in path or operation instead + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, method, url, headers, querys, body, auth_settings): + """Updates header and query params based on authentication setting. + + :param method: Request method + :param url: Request path, host included + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param body: Request body + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if auth_setting['type'] == 'apiv4': + auth_headers = self.gen_sign(method, urlparse(url).path, unquote_plus(urlencode(querys)), body) + headers.update(auth_headers) + continue + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def gen_sign(self, method, url, query_string=None, body=None): + """generate authentication headers + + :param method: http request method + :param url: http resource path + :param query_string: query string + :param body: request body + :return: signature headers + """ + t = time.time() + m = hashlib.sha512() + if body is not None: + if not isinstance(body, six.string_types): + body = json.dumps(body) + m.update(body.encode('utf-8')) + hashed_payload = m.hexdigest() + s = '%s\n%s\n%s\n%s\n%s' % (method, url, query_string or "", hashed_payload, t) + sign = hmac.new(self.configuration.secret.encode('utf-8'), s.encode('utf-8'), + hashlib.sha512).hexdigest() + return {'KEY': self.configuration.key, 'Timestamp': str(t), 'SIGN': sign} + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True + + if not klass.openapi_types and has_discriminator is False: + return data + + kwargs = {} + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): + for attr, attr_type in six.iteritems(klass.openapi_types): + if klass.attribute_map[attr] in data: + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if has_discriminator: + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/gate_api/configuration.py b/gate_api/configuration.py new file mode 100644 index 0000000..5c6998d --- /dev/null +++ b/gate_api/configuration.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param key: APIv4 key + :param secret: APIv4 secret + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + + :Example: + + You can set the APIv4 key and secret like: + +conf = gate_api.Configuration( + key='example_key' + secret='example_secret' +) + + The following headers will be added to the HTTP request: + KEY: example_key + SIGN: generated_signature_using_example_secret + Timestamp: request_timestamp + """ + + _default = None + + def __init__(self, host="https://api.gateio.ws/api/v4", + key=None, secret=None, + username=None, password=None, + discard_unknown_keys=False, + ): + """Constructor + """ + self.host = host + """Default Base url + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + # Init APIv4 authentication key and secret + self.key = key + """API key for APIv4 authentication + """ + self.secret = secret + """API secret for APIv4 authentication + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("gate_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Disable client side validation + self.client_side_validation = True + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :return: The logger_file path. + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :return: The debug status, True or False. + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :return: The format string. + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.key is not None and self.secret is not None: + auth['apiv4'] = { + 'type': 'apiv4', + 'in': 'header', + 'key': 'SIGN', + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 4.97.0\n"\ + "SDK Package Version: 6.97.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.gateio.ws/api/v4", + 'description': "Real Trading", + }, + { + 'url': "https://fx-api-testnet.gateio.ws/api/v4", + 'description': "TestNet Trading", + } + ] + + def get_host_from_settings(self, index, variables=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :return: URL based on host settings + """ + variables = {} if variables is None else variables + servers = self.get_host_settings() + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server['variables'].items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py new file mode 100644 index 0000000..e890184 --- /dev/null +++ b/gate_api/exceptions.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import six + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +class GateApiException(ApiException): + def __init__(self, label=None, message=None, detail=None, exp=None): + """Init GateApiException from ApiException + + :param str label: error label parsed + :param str message: error message parsed + :param str detail: possible error message parsed + :param ApiException exp: parent exception + """ + self.label = label + self.message = detail if detail else message + self.status = exp.status + self.reason = exp.reason + self.body = exp.body + self.headers = exp.headers + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, six.integer_types): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py new file mode 100644 index 0000000..2fb1061 --- /dev/null +++ b/gate_api/models/__init__.py @@ -0,0 +1,266 @@ +# coding: utf-8 + +# flake8: noqa +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +# import models into model package +from gate_api.models.account_balance import AccountBalance +from gate_api.models.account_detail import AccountDetail +from gate_api.models.account_detail_key import AccountDetailKey +from gate_api.models.account_rate_limit import AccountRateLimit +from gate_api.models.agency_commission import AgencyCommission +from gate_api.models.agency_commission_history import AgencyCommissionHistory +from gate_api.models.agency_transaction import AgencyTransaction +from gate_api.models.agency_transaction_history import AgencyTransactionHistory +from gate_api.models.auto_repay_setting import AutoRepaySetting +from gate_api.models.batch_amend_item import BatchAmendItem +from gate_api.models.batch_amend_order_req import BatchAmendOrderReq +from gate_api.models.batch_futures_order import BatchFuturesOrder +from gate_api.models.batch_order import BatchOrder +from gate_api.models.borrow_currency_info import BorrowCurrencyInfo +from gate_api.models.broker_commission import BrokerCommission +from gate_api.models.broker_commission1 import BrokerCommission1 +from gate_api.models.broker_transaction import BrokerTransaction +from gate_api.models.broker_transaction1 import BrokerTransaction1 +from gate_api.models.cancel_batch_order import CancelBatchOrder +from gate_api.models.cancel_order_result import CancelOrderResult +from gate_api.models.collateral_adjust import CollateralAdjust +from gate_api.models.collateral_adjust_res import CollateralAdjustRes +from gate_api.models.collateral_align import CollateralAlign +from gate_api.models.collateral_currency import CollateralCurrency +from gate_api.models.collateral_currency_info import CollateralCurrencyInfo +from gate_api.models.collateral_currency_res import CollateralCurrencyRes +from gate_api.models.collateral_current_rate import CollateralCurrentRate +from gate_api.models.collateral_fix_rate import CollateralFixRate +from gate_api.models.collateral_loan_currency import CollateralLoanCurrency +from gate_api.models.collateral_ltv import CollateralLtv +from gate_api.models.collateral_order import CollateralOrder +from gate_api.models.collateral_record import CollateralRecord +from gate_api.models.contract import Contract +from gate_api.models.contract_stat import ContractStat +from gate_api.models.convert_small_balance import ConvertSmallBalance +from gate_api.models.countdown_cancel_all_futures_task import CountdownCancelAllFuturesTask +from gate_api.models.countdown_cancel_all_options_task import CountdownCancelAllOptionsTask +from gate_api.models.countdown_cancel_all_spot_task import CountdownCancelAllSpotTask +from gate_api.models.create_collateral_order import CreateCollateralOrder +from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder +from gate_api.models.create_uni_lend import CreateUniLend +from gate_api.models.create_uni_loan import CreateUniLoan +from gate_api.models.cross_margin_account import CrossMarginAccount +from gate_api.models.cross_margin_account_book import CrossMarginAccountBook +from gate_api.models.cross_margin_balance import CrossMarginBalance +from gate_api.models.cross_margin_balance1 import CrossMarginBalance1 +from gate_api.models.cross_margin_currency import CrossMarginCurrency +from gate_api.models.cross_margin_loan import CrossMarginLoan +from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest +from gate_api.models.cross_margin_repayment import CrossMarginRepayment +from gate_api.models.cross_margin_transferable import CrossMarginTransferable +from gate_api.models.currency import Currency +from gate_api.models.currency_chain import CurrencyChain +from gate_api.models.currency_pair import CurrencyPair +from gate_api.models.currency_quota import CurrencyQuota +from gate_api.models.debit_fee import DebitFee +from gate_api.models.delivery_candlestick import DeliveryCandlestick +from gate_api.models.delivery_contract import DeliveryContract +from gate_api.models.delivery_settlement import DeliverySettlement +from gate_api.models.deposit_address import DepositAddress +from gate_api.models.deposit_record import DepositRecord +from gate_api.models.dual_get_orders import DualGetOrders +from gate_api.models.dual_get_plans import DualGetPlans +from gate_api.models.eth2_rate_list import Eth2RateList +from gate_api.models.eth2_swap import Eth2Swap +from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair +from gate_api.models.flash_swap_order import FlashSwapOrder +from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview +from gate_api.models.flash_swap_order_request import FlashSwapOrderRequest +from gate_api.models.flash_swap_preview_request import FlashSwapPreviewRequest +from gate_api.models.funding_account import FundingAccount +from gate_api.models.funding_rate_record import FundingRateRecord +from gate_api.models.future_cancel_order_result import FutureCancelOrderResult +from gate_api.models.futures_account import FuturesAccount +from gate_api.models.futures_account_book import FuturesAccountBook +from gate_api.models.futures_account_history import FuturesAccountHistory +from gate_api.models.futures_auto_deleverage import FuturesAutoDeleverage +from gate_api.models.futures_batch_amend_order_request import FuturesBatchAmendOrderRequest +from gate_api.models.futures_candlestick import FuturesCandlestick +from gate_api.models.futures_fee import FuturesFee +from gate_api.models.futures_index_constituents import FuturesIndexConstituents +from gate_api.models.futures_initial_order import FuturesInitialOrder +from gate_api.models.futures_limit_risk_tiers import FuturesLimitRiskTiers +from gate_api.models.futures_liq_order import FuturesLiqOrder +from gate_api.models.futures_liquidate import FuturesLiquidate +from gate_api.models.futures_order import FuturesOrder +from gate_api.models.futures_order_amendment import FuturesOrderAmendment +from gate_api.models.futures_order_book import FuturesOrderBook +from gate_api.models.futures_order_book_item import FuturesOrderBookItem +from gate_api.models.futures_premium_index import FuturesPremiumIndex +from gate_api.models.futures_price_trigger import FuturesPriceTrigger +from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder +from gate_api.models.futures_ticker import FuturesTicker +from gate_api.models.futures_trade import FuturesTrade +from gate_api.models.index_constituent import IndexConstituent +from gate_api.models.inline_object import InlineObject +from gate_api.models.inline_response200 import InlineResponse200 +from gate_api.models.insurance_record import InsuranceRecord +from gate_api.models.ledger_record import LedgerRecord +from gate_api.models.liquidate_order import LiquidateOrder +from gate_api.models.margin_account import MarginAccount +from gate_api.models.margin_account_book import MarginAccountBook +from gate_api.models.margin_account_currency import MarginAccountCurrency +from gate_api.models.margin_leverage_tier import MarginLeverageTier +from gate_api.models.margin_market_leverage import MarginMarketLeverage +from gate_api.models.margin_tiers import MarginTiers +from gate_api.models.margin_transferable import MarginTransferable +from gate_api.models.max_uni_borrowable import MaxUniBorrowable +from gate_api.models.mock_futures_order import MockFuturesOrder +from gate_api.models.mock_futures_position import MockFuturesPosition +from gate_api.models.mock_margin_result import MockMarginResult +from gate_api.models.mock_options_order import MockOptionsOrder +from gate_api.models.mock_options_position import MockOptionsPosition +from gate_api.models.mock_risk_unit import MockRiskUnit +from gate_api.models.mock_spot_balance import MockSpotBalance +from gate_api.models.mock_spot_order import MockSpotOrder +from gate_api.models.multi_chain_address_item import MultiChainAddressItem +from gate_api.models.multi_collateral_currency import MultiCollateralCurrency +from gate_api.models.multi_collateral_item import MultiCollateralItem +from gate_api.models.multi_collateral_order import MultiCollateralOrder +from gate_api.models.multi_collateral_record import MultiCollateralRecord +from gate_api.models.multi_collateral_record_currency import MultiCollateralRecordCurrency +from gate_api.models.multi_loan_item import MultiLoanItem +from gate_api.models.multi_loan_repay_item import MultiLoanRepayItem +from gate_api.models.multi_repay_record import MultiRepayRecord +from gate_api.models.multi_repay_resp import MultiRepayResp +from gate_api.models.my_futures_trade import MyFuturesTrade +from gate_api.models.my_futures_trade_time_range import MyFuturesTradeTimeRange +from gate_api.models.open_orders import OpenOrders +from gate_api.models.options_account import OptionsAccount +from gate_api.models.options_account_book import OptionsAccountBook +from gate_api.models.options_candlestick import OptionsCandlestick +from gate_api.models.options_contract import OptionsContract +from gate_api.models.options_mmp import OptionsMMP +from gate_api.models.options_mmp_reset import OptionsMMPReset +from gate_api.models.options_my_settlements import OptionsMySettlements +from gate_api.models.options_my_trade import OptionsMyTrade +from gate_api.models.options_order import OptionsOrder +from gate_api.models.options_position import OptionsPosition +from gate_api.models.options_position_close import OptionsPositionClose +from gate_api.models.options_position_close_order import OptionsPositionCloseOrder +from gate_api.models.options_settlement import OptionsSettlement +from gate_api.models.options_ticker import OptionsTicker +from gate_api.models.options_underlying import OptionsUnderlying +from gate_api.models.options_underlying_ticker import OptionsUnderlyingTicker +from gate_api.models.order import Order +from gate_api.models.order_book import OrderBook +from gate_api.models.order_cancel import OrderCancel +from gate_api.models.order_patch import OrderPatch +from gate_api.models.order_resp import OrderResp +from gate_api.models.partner_commission_history import PartnerCommissionHistory +from gate_api.models.partner_sub import PartnerSub +from gate_api.models.partner_sub_list import PartnerSubList +from gate_api.models.partner_transaction_history import PartnerTransactionHistory +from gate_api.models.patch_uni_lend import PatchUniLend +from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder +from gate_api.models.position import Position +from gate_api.models.position_close import PositionClose +from gate_api.models.position_close_order import PositionCloseOrder +from gate_api.models.profit_loss_range import ProfitLossRange +from gate_api.models.rebate_user_info import RebateUserInfo +from gate_api.models.repay_currency_res import RepayCurrencyRes +from gate_api.models.repay_loan import RepayLoan +from gate_api.models.repay_multi_loan import RepayMultiLoan +from gate_api.models.repay_record import RepayRecord +from gate_api.models.repay_record_currency import RepayRecordCurrency +from gate_api.models.repay_record_left_interest import RepayRecordLeftInterest +from gate_api.models.repay_record_repaid_currency import RepayRecordRepaidCurrency +from gate_api.models.repay_record_total_interest import RepayRecordTotalInterest +from gate_api.models.repay_resp import RepayResp +from gate_api.models.risk_units import RiskUnits +from gate_api.models.saved_address import SavedAddress +from gate_api.models.small_balance import SmallBalance +from gate_api.models.small_balance_history import SmallBalanceHistory +from gate_api.models.spot_account import SpotAccount +from gate_api.models.spot_account_book import SpotAccountBook +from gate_api.models.spot_currency_chain import SpotCurrencyChain +from gate_api.models.spot_fee import SpotFee +from gate_api.models.spot_insurance_history import SpotInsuranceHistory +from gate_api.models.spot_price_put_order import SpotPricePutOrder +from gate_api.models.spot_price_trigger import SpotPriceTrigger +from gate_api.models.spot_price_triggered_order import SpotPriceTriggeredOrder +from gate_api.models.stp_group import StpGroup +from gate_api.models.stp_group_user import StpGroupUser +from gate_api.models.structured_buy import StructuredBuy +from gate_api.models.structured_get_project_list import StructuredGetProjectList +from gate_api.models.structured_order_list import StructuredOrderList +from gate_api.models.sub_account import SubAccount +from gate_api.models.sub_account_balance import SubAccountBalance +from gate_api.models.sub_account_cross_margin_balance import SubAccountCrossMarginBalance +from gate_api.models.sub_account_futures_balance import SubAccountFuturesBalance +from gate_api.models.sub_account_key import SubAccountKey +from gate_api.models.sub_account_key_perms import SubAccountKeyPerms +from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance +from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount +from gate_api.models.sub_account_transfer import SubAccountTransfer +from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount +from gate_api.models.sub_user_mode import SubUserMode +from gate_api.models.system_time import SystemTime +from gate_api.models.ticker import Ticker +from gate_api.models.total_balance import TotalBalance +from gate_api.models.trade import Trade +from gate_api.models.trade_fee import TradeFee +from gate_api.models.transaction_id import TransactionID +from gate_api.models.transfer import Transfer +from gate_api.models.transfer_order_status import TransferOrderStatus +from gate_api.models.transferables_result import TransferablesResult +from gate_api.models.trigger_order_response import TriggerOrderResponse +from gate_api.models.trigger_time import TriggerTime +from gate_api.models.uid_push_order import UidPushOrder +from gate_api.models.uid_push_withdrawal import UidPushWithdrawal +from gate_api.models.uid_push_withdrawal_resp import UidPushWithdrawalResp +from gate_api.models.uni_currency import UniCurrency +from gate_api.models.uni_currency_interest import UniCurrencyInterest +from gate_api.models.uni_currency_pair import UniCurrencyPair +from gate_api.models.uni_interest_mode import UniInterestMode +from gate_api.models.uni_interest_record import UniInterestRecord +from gate_api.models.uni_lend import UniLend +from gate_api.models.uni_lend_interest import UniLendInterest +from gate_api.models.uni_lend_record import UniLendRecord +from gate_api.models.uni_loan import UniLoan +from gate_api.models.uni_loan_interest_record import UniLoanInterestRecord +from gate_api.models.uni_loan_record import UniLoanRecord +from gate_api.models.unified_account import UnifiedAccount +from gate_api.models.unified_balance import UnifiedBalance +from gate_api.models.unified_borrowable import UnifiedBorrowable +from gate_api.models.unified_borrowable1 import UnifiedBorrowable1 +from gate_api.models.unified_currency import UnifiedCurrency +from gate_api.models.unified_discount import UnifiedDiscount +from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers +from gate_api.models.unified_history_loan_rate import UnifiedHistoryLoanRate +from gate_api.models.unified_history_loan_rate_rates import UnifiedHistoryLoanRateRates +from gate_api.models.unified_leverage_config import UnifiedLeverageConfig +from gate_api.models.unified_leverage_setting import UnifiedLeverageSetting +from gate_api.models.unified_loan import UnifiedLoan +from gate_api.models.unified_loan_record import UnifiedLoanRecord +from gate_api.models.unified_loan_result import UnifiedLoanResult +from gate_api.models.unified_margin_tiers import UnifiedMarginTiers +from gate_api.models.unified_mode_set import UnifiedModeSet +from gate_api.models.unified_portfolio_input import UnifiedPortfolioInput +from gate_api.models.unified_portfolio_output import UnifiedPortfolioOutput +from gate_api.models.unified_risk_units import UnifiedRiskUnits +from gate_api.models.unified_settings import UnifiedSettings +from gate_api.models.unified_transferable import UnifiedTransferable +from gate_api.models.user_ltv_info import UserLtvInfo +from gate_api.models.user_sub import UserSub +from gate_api.models.user_sub_relation import UserSubRelation +from gate_api.models.user_total_amount import UserTotalAmount +from gate_api.models.withdraw_status import WithdrawStatus +from gate_api.models.withdrawal_record import WithdrawalRecord diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py new file mode 100644 index 0000000..03dfc20 --- /dev/null +++ b/gate_api/models/account_balance.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AccountBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'amount': 'str', + 'currency': 'str', + 'unrealised_pnl': 'str', + 'borrowed': 'str' + } + + attribute_map = { + 'amount': 'amount', + 'currency': 'currency', + 'unrealised_pnl': 'unrealised_pnl', + 'borrowed': 'borrowed' + } + + def __init__(self, amount=None, currency=None, unrealised_pnl=None, borrowed=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """AccountBalance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._amount = None + self._currency = None + self._unrealised_pnl = None + self._borrowed = None + self.discriminator = None + + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency + if unrealised_pnl is not None: + self.unrealised_pnl = unrealised_pnl + if borrowed is not None: + self.borrowed = borrowed + + @property + def amount(self): + """Gets the amount of this AccountBalance. # noqa: E501 + + Account total balance amount # noqa: E501 + + :return: The amount of this AccountBalance. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AccountBalance. + + Account total balance amount # noqa: E501 + + :param amount: The amount of this AccountBalance. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def currency(self): + """Gets the currency of this AccountBalance. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this AccountBalance. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this AccountBalance. + + Currency # noqa: E501 + + :param currency: The currency of this AccountBalance. # noqa: E501 + :type: str + """ + allowed_values = ["BTC", "CNY", "USD", "USDT"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and currency not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `currency` ({0}), must be one of {1}" # noqa: E501 + .format(currency, allowed_values) + ) + + self._currency = currency + + @property + def unrealised_pnl(self): + """Gets the unrealised_pnl of this AccountBalance. # noqa: E501 + + Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts # noqa: E501 + + :return: The unrealised_pnl of this AccountBalance. # noqa: E501 + :rtype: str + """ + return self._unrealised_pnl + + @unrealised_pnl.setter + def unrealised_pnl(self, unrealised_pnl): + """Sets the unrealised_pnl of this AccountBalance. + + Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts # noqa: E501 + + :param unrealised_pnl: The unrealised_pnl of this AccountBalance. # noqa: E501 + :type: str + """ + + self._unrealised_pnl = unrealised_pnl + + @property + def borrowed(self): + """Gets the borrowed of this AccountBalance. # noqa: E501 + + Borrowed,this field will only appear in margin and cross_margin accounts # noqa: E501 + + :return: The borrowed of this AccountBalance. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this AccountBalance. + + Borrowed,this field will only appear in margin and cross_margin accounts # noqa: E501 + + :param borrowed: The borrowed of this AccountBalance. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py new file mode 100644 index 0000000..914531f --- /dev/null +++ b/gate_api/models/account_detail.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AccountDetail(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'ip_whitelist': 'list[str]', + 'currency_pairs': 'list[str]', + 'user_id': 'int', + 'tier': 'int', + 'key': 'AccountDetailKey', + 'copy_trading_role': 'int' + } + + attribute_map = { + 'ip_whitelist': 'ip_whitelist', + 'currency_pairs': 'currency_pairs', + 'user_id': 'user_id', + 'tier': 'tier', + 'key': 'key', + 'copy_trading_role': 'copy_trading_role' + } + + def __init__(self, ip_whitelist=None, currency_pairs=None, user_id=None, tier=None, key=None, copy_trading_role=None, local_vars_configuration=None): # noqa: E501 + # type: (list[str], list[str], int, int, AccountDetailKey, int, Configuration) -> None + """AccountDetail - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._ip_whitelist = None + self._currency_pairs = None + self._user_id = None + self._tier = None + self._key = None + self._copy_trading_role = None + self.discriminator = None + + if ip_whitelist is not None: + self.ip_whitelist = ip_whitelist + if currency_pairs is not None: + self.currency_pairs = currency_pairs + if user_id is not None: + self.user_id = user_id + if tier is not None: + self.tier = tier + if key is not None: + self.key = key + if copy_trading_role is not None: + self.copy_trading_role = copy_trading_role + + @property + def ip_whitelist(self): + """Gets the ip_whitelist of this AccountDetail. # noqa: E501 + + IP whitelist # noqa: E501 + + :return: The ip_whitelist of this AccountDetail. # noqa: E501 + :rtype: list[str] + """ + return self._ip_whitelist + + @ip_whitelist.setter + def ip_whitelist(self, ip_whitelist): + """Sets the ip_whitelist of this AccountDetail. + + IP whitelist # noqa: E501 + + :param ip_whitelist: The ip_whitelist of this AccountDetail. # noqa: E501 + :type: list[str] + """ + + self._ip_whitelist = ip_whitelist + + @property + def currency_pairs(self): + """Gets the currency_pairs of this AccountDetail. # noqa: E501 + + CurrencyPair whitelisting # noqa: E501 + + :return: The currency_pairs of this AccountDetail. # noqa: E501 + :rtype: list[str] + """ + return self._currency_pairs + + @currency_pairs.setter + def currency_pairs(self, currency_pairs): + """Sets the currency_pairs of this AccountDetail. + + CurrencyPair whitelisting # noqa: E501 + + :param currency_pairs: The currency_pairs of this AccountDetail. # noqa: E501 + :type: list[str] + """ + + self._currency_pairs = currency_pairs + + @property + def user_id(self): + """Gets the user_id of this AccountDetail. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this AccountDetail. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AccountDetail. + + User ID # noqa: E501 + + :param user_id: The user_id of this AccountDetail. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def tier(self): + """Gets the tier of this AccountDetail. # noqa: E501 + + User VIP level # noqa: E501 + + :return: The tier of this AccountDetail. # noqa: E501 + :rtype: int + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this AccountDetail. + + User VIP level # noqa: E501 + + :param tier: The tier of this AccountDetail. # noqa: E501 + :type: int + """ + + self._tier = tier + + @property + def key(self): + """Gets the key of this AccountDetail. # noqa: E501 + + + :return: The key of this AccountDetail. # noqa: E501 + :rtype: AccountDetailKey + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this AccountDetail. + + + :param key: The key of this AccountDetail. # noqa: E501 + :type: AccountDetailKey + """ + + self._key = key + + @property + def copy_trading_role(self): + """Gets the copy_trading_role of this AccountDetail. # noqa: E501 + + User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower # noqa: E501 + + :return: The copy_trading_role of this AccountDetail. # noqa: E501 + :rtype: int + """ + return self._copy_trading_role + + @copy_trading_role.setter + def copy_trading_role(self, copy_trading_role): + """Sets the copy_trading_role of this AccountDetail. + + User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower # noqa: E501 + + :param copy_trading_role: The copy_trading_role of this AccountDetail. # noqa: E501 + :type: int + """ + + self._copy_trading_role = copy_trading_role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountDetail): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py new file mode 100644 index 0000000..75cde18 --- /dev/null +++ b/gate_api/models/account_detail_key.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AccountDetailKey(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mode': 'int' + } + + attribute_map = { + 'mode': 'mode' + } + + def __init__(self, mode=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """AccountDetailKey - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._mode = None + self.discriminator = None + + if mode is not None: + self.mode = mode + + @property + def mode(self): + """Gets the mode of this AccountDetailKey. # noqa: E501 + + mode: 1 - classic account 2 - portfolio margin account # noqa: E501 + + :return: The mode of this AccountDetailKey. # noqa: E501 + :rtype: int + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this AccountDetailKey. + + mode: 1 - classic account 2 - portfolio margin account # noqa: E501 + + :param mode: The mode of this AccountDetailKey. # noqa: E501 + :type: int + """ + + self._mode = mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountDetailKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountDetailKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py new file mode 100644 index 0000000..24b19e8 --- /dev/null +++ b/gate_api/models/account_rate_limit.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AccountRateLimit(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tier': 'str', + 'ratio': 'str', + 'main_ratio': 'str', + 'updated_at': 'str' + } + + attribute_map = { + 'tier': 'tier', + 'ratio': 'ratio', + 'main_ratio': 'main_ratio', + 'updated_at': 'updated_at' + } + + def __init__(self, tier=None, ratio=None, main_ratio=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """AccountRateLimit - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tier = None + self._ratio = None + self._main_ratio = None + self._updated_at = None + self.discriminator = None + + if tier is not None: + self.tier = tier + if ratio is not None: + self.ratio = ratio + if main_ratio is not None: + self.main_ratio = main_ratio + if updated_at is not None: + self.updated_at = updated_at + + @property + def tier(self): + """Gets the tier of this AccountRateLimit. # noqa: E501 + + Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) # noqa: E501 + + :return: The tier of this AccountRateLimit. # noqa: E501 + :rtype: str + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this AccountRateLimit. + + Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) # noqa: E501 + + :param tier: The tier of this AccountRateLimit. # noqa: E501 + :type: str + """ + + self._tier = tier + + @property + def ratio(self): + """Gets the ratio of this AccountRateLimit. # noqa: E501 + + Transaction rate # noqa: E501 + + :return: The ratio of this AccountRateLimit. # noqa: E501 + :rtype: str + """ + return self._ratio + + @ratio.setter + def ratio(self, ratio): + """Sets the ratio of this AccountRateLimit. + + Transaction rate # noqa: E501 + + :param ratio: The ratio of this AccountRateLimit. # noqa: E501 + :type: str + """ + + self._ratio = ratio + + @property + def main_ratio(self): + """Gets the main_ratio of this AccountRateLimit. # noqa: E501 + + Total transaction ratio of main account # noqa: E501 + + :return: The main_ratio of this AccountRateLimit. # noqa: E501 + :rtype: str + """ + return self._main_ratio + + @main_ratio.setter + def main_ratio(self, main_ratio): + """Sets the main_ratio of this AccountRateLimit. + + Total transaction ratio of main account # noqa: E501 + + :param main_ratio: The main_ratio of this AccountRateLimit. # noqa: E501 + :type: str + """ + + self._main_ratio = main_ratio + + @property + def updated_at(self): + """Gets the updated_at of this AccountRateLimit. # noqa: E501 + + Update time # noqa: E501 + + :return: The updated_at of this AccountRateLimit. # noqa: E501 + :rtype: str + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this AccountRateLimit. + + Update time # noqa: E501 + + :param updated_at: The updated_at of this AccountRateLimit. # noqa: E501 + :type: str + """ + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountRateLimit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountRateLimit): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py new file mode 100644 index 0000000..c55dad8 --- /dev/null +++ b/gate_api/models/agency_commission.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AgencyCommission(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'commission_time': 'int', + 'user_id': 'int', + 'group_name': 'str', + 'commission_amount': 'str', + 'commission_asset': 'str', + 'source': 'str' + } + + attribute_map = { + 'commission_time': 'commission_time', + 'user_id': 'user_id', + 'group_name': 'group_name', + 'commission_amount': 'commission_amount', + 'commission_asset': 'commission_asset', + 'source': 'source' + } + + def __init__(self, commission_time=None, user_id=None, group_name=None, commission_amount=None, commission_asset=None, source=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, Configuration) -> None + """AgencyCommission - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._commission_time = None + self._user_id = None + self._group_name = None + self._commission_amount = None + self._commission_asset = None + self._source = None + self.discriminator = None + + if commission_time is not None: + self.commission_time = commission_time + if user_id is not None: + self.user_id = user_id + if group_name is not None: + self.group_name = group_name + if commission_amount is not None: + self.commission_amount = commission_amount + if commission_asset is not None: + self.commission_asset = commission_asset + if source is not None: + self.source = source + + @property + def commission_time(self): + """Gets the commission_time of this AgencyCommission. # noqa: E501 + + Commission Time. (unix timestamp) # noqa: E501 + + :return: The commission_time of this AgencyCommission. # noqa: E501 + :rtype: int + """ + return self._commission_time + + @commission_time.setter + def commission_time(self, commission_time): + """Sets the commission_time of this AgencyCommission. + + Commission Time. (unix timestamp) # noqa: E501 + + :param commission_time: The commission_time of this AgencyCommission. # noqa: E501 + :type: int + """ + + self._commission_time = commission_time + + @property + def user_id(self): + """Gets the user_id of this AgencyCommission. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this AgencyCommission. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AgencyCommission. + + User ID # noqa: E501 + + :param user_id: The user_id of this AgencyCommission. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def group_name(self): + """Gets the group_name of this AgencyCommission. # noqa: E501 + + Group name # noqa: E501 + + :return: The group_name of this AgencyCommission. # noqa: E501 + :rtype: str + """ + return self._group_name + + @group_name.setter + def group_name(self, group_name): + """Sets the group_name of this AgencyCommission. + + Group name # noqa: E501 + + :param group_name: The group_name of this AgencyCommission. # noqa: E501 + :type: str + """ + + self._group_name = group_name + + @property + def commission_amount(self): + """Gets the commission_amount of this AgencyCommission. # noqa: E501 + + Commission Amount # noqa: E501 + + :return: The commission_amount of this AgencyCommission. # noqa: E501 + :rtype: str + """ + return self._commission_amount + + @commission_amount.setter + def commission_amount(self, commission_amount): + """Sets the commission_amount of this AgencyCommission. + + Commission Amount # noqa: E501 + + :param commission_amount: The commission_amount of this AgencyCommission. # noqa: E501 + :type: str + """ + + self._commission_amount = commission_amount + + @property + def commission_asset(self): + """Gets the commission_asset of this AgencyCommission. # noqa: E501 + + Commission Asset # noqa: E501 + + :return: The commission_asset of this AgencyCommission. # noqa: E501 + :rtype: str + """ + return self._commission_asset + + @commission_asset.setter + def commission_asset(self, commission_asset): + """Sets the commission_asset of this AgencyCommission. + + Commission Asset # noqa: E501 + + :param commission_asset: The commission_asset of this AgencyCommission. # noqa: E501 + :type: str + """ + + self._commission_asset = commission_asset + + @property + def source(self): + """Gets the source of this AgencyCommission. # noqa: E501 + + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + + :return: The source of this AgencyCommission. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this AgencyCommission. + + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + + :param source: The source of this AgencyCommission. # noqa: E501 + :type: str + """ + + self._source = source + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AgencyCommission): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AgencyCommission): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py new file mode 100644 index 0000000..59c4540 --- /dev/null +++ b/gate_api/models/agency_commission_history.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AgencyCommissionHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'total': 'int', + 'list': 'list[AgencyCommission]' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'total': 'total', + 'list': 'list' + } + + def __init__(self, currency_pair=None, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, list[AgencyCommission], Configuration) -> None + """AgencyCommissionHistory - a 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._total = None + self._list = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if total is not None: + self.total = total + if list is not None: + self.list = list + + @property + def currency_pair(self): + """Gets the currency_pair of this AgencyCommissionHistory. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this AgencyCommissionHistory. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this AgencyCommissionHistory. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this AgencyCommissionHistory. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def total(self): + """Gets the total of this AgencyCommissionHistory. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this AgencyCommissionHistory. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this AgencyCommissionHistory. + + Total # noqa: E501 + + :param total: The total of this AgencyCommissionHistory. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this AgencyCommissionHistory. # noqa: E501 + + List of comission history # noqa: E501 + + :return: The list of this AgencyCommissionHistory. # noqa: E501 + :rtype: list[AgencyCommission] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this AgencyCommissionHistory. + + List of comission history # noqa: E501 + + :param list: The list of this AgencyCommissionHistory. # noqa: E501 + :type: list[AgencyCommission] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AgencyCommissionHistory): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AgencyCommissionHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py new file mode 100644 index 0000000..ffba857 --- /dev/null +++ b/gate_api/models/agency_transaction.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AgencyTransaction(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'transaction_time': 'int', + 'user_id': 'int', + 'group_name': 'str', + 'fee': 'str', + 'fee_asset': 'str', + 'currency_pair': 'str', + 'amount': 'str', + 'amount_asset': 'str', + 'source': 'str' + } + + attribute_map = { + 'transaction_time': 'transaction_time', + 'user_id': 'user_id', + 'group_name': 'group_name', + 'fee': 'fee', + 'fee_asset': 'fee_asset', + 'currency_pair': 'currency_pair', + 'amount': 'amount', + 'amount_asset': 'amount_asset', + 'source': 'source' + } + + def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, fee_asset=None, currency_pair=None, amount=None, amount_asset=None, source=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, Configuration) -> None + """AgencyTransaction - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._transaction_time = None + self._user_id = None + self._group_name = None + self._fee = None + self._fee_asset = None + self._currency_pair = None + self._amount = None + self._amount_asset = None + self._source = None + self.discriminator = None + + if transaction_time is not None: + self.transaction_time = transaction_time + if user_id is not None: + self.user_id = user_id + if group_name is not None: + self.group_name = group_name + if fee is not None: + self.fee = fee + if fee_asset is not None: + self.fee_asset = fee_asset + if currency_pair is not None: + self.currency_pair = currency_pair + if amount is not None: + self.amount = amount + if amount_asset is not None: + self.amount_asset = amount_asset + if source is not None: + self.source = source + + @property + def transaction_time(self): + """Gets the transaction_time of this AgencyTransaction. # noqa: E501 + + Transaction Time. (unix timestamp) # noqa: E501 + + :return: The transaction_time of this AgencyTransaction. # noqa: E501 + :rtype: int + """ + return self._transaction_time + + @transaction_time.setter + def transaction_time(self, transaction_time): + """Sets the transaction_time of this AgencyTransaction. + + Transaction Time. (unix timestamp) # noqa: E501 + + :param transaction_time: The transaction_time of this AgencyTransaction. # noqa: E501 + :type: int + """ + + self._transaction_time = transaction_time + + @property + def user_id(self): + """Gets the user_id of this AgencyTransaction. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this AgencyTransaction. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AgencyTransaction. + + User ID # noqa: E501 + + :param user_id: The user_id of this AgencyTransaction. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def group_name(self): + """Gets the group_name of this AgencyTransaction. # noqa: E501 + + Group name # noqa: E501 + + :return: The group_name of this AgencyTransaction. # noqa: E501 + :rtype: str + """ + return self._group_name + + @group_name.setter + def group_name(self, group_name): + """Sets the group_name of this AgencyTransaction. + + Group name # noqa: E501 + + :param group_name: The group_name of this AgencyTransaction. # noqa: E501 + :type: str + """ + + self._group_name = group_name + + @property + def fee(self): + """Gets the fee of this AgencyTransaction. # noqa: E501 + + Fee # noqa: E501 + + :return: The fee of this AgencyTransaction. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this AgencyTransaction. + + Fee # noqa: E501 + + :param fee: The fee of this AgencyTransaction. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def fee_asset(self): + """Gets the fee_asset of this AgencyTransaction. # noqa: E501 + + Fee currency # noqa: E501 + + :return: The fee_asset of this AgencyTransaction. # noqa: E501 + :rtype: str + """ + return self._fee_asset + + @fee_asset.setter + def fee_asset(self, fee_asset): + """Sets the fee_asset of this AgencyTransaction. + + Fee currency # noqa: E501 + + :param fee_asset: The fee_asset of this AgencyTransaction. # noqa: E501 + :type: str + """ + + self._fee_asset = fee_asset + + @property + def currency_pair(self): + """Gets the currency_pair of this AgencyTransaction. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this AgencyTransaction. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this AgencyTransaction. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this AgencyTransaction. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def amount(self): + """Gets the amount of this AgencyTransaction. # noqa: E501 + + Commission Amount # noqa: E501 + + :return: The amount of this AgencyTransaction. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this AgencyTransaction. + + Commission Amount # noqa: E501 + + :param amount: The amount of this AgencyTransaction. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def amount_asset(self): + """Gets the amount_asset of this AgencyTransaction. # noqa: E501 + + Commission Asset # noqa: E501 + + :return: The amount_asset of this AgencyTransaction. # noqa: E501 + :rtype: str + """ + return self._amount_asset + + @amount_asset.setter + def amount_asset(self, amount_asset): + """Sets the amount_asset of this AgencyTransaction. + + Commission Asset # noqa: E501 + + :param amount_asset: The amount_asset of this AgencyTransaction. # noqa: E501 + :type: str + """ + + self._amount_asset = amount_asset + + @property + def source(self): + """Gets the source of this AgencyTransaction. # noqa: E501 + + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + + :return: The source of this AgencyTransaction. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this AgencyTransaction. + + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + + :param source: The source of this AgencyTransaction. # noqa: E501 + :type: str + """ + + self._source = source + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AgencyTransaction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AgencyTransaction): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py new file mode 100644 index 0000000..63f4d6b --- /dev/null +++ b/gate_api/models/agency_transaction_history.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AgencyTransactionHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'total': 'int', + 'list': 'list[AgencyTransaction]' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'total': 'total', + 'list': 'list' + } + + def __init__(self, currency_pair=None, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, list[AgencyTransaction], Configuration) -> None + """AgencyTransactionHistory - a 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._total = None + self._list = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if total is not None: + self.total = total + if list is not None: + self.list = list + + @property + def currency_pair(self): + """Gets the currency_pair of this AgencyTransactionHistory. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this AgencyTransactionHistory. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this AgencyTransactionHistory. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this AgencyTransactionHistory. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def total(self): + """Gets the total of this AgencyTransactionHistory. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this AgencyTransactionHistory. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this AgencyTransactionHistory. + + Total # noqa: E501 + + :param total: The total of this AgencyTransactionHistory. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this AgencyTransactionHistory. # noqa: E501 + + List of transaction history # noqa: E501 + + :return: The list of this AgencyTransactionHistory. # noqa: E501 + :rtype: list[AgencyTransaction] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this AgencyTransactionHistory. + + List of transaction history # noqa: E501 + + :param list: The list of this AgencyTransactionHistory. # noqa: E501 + :type: list[AgencyTransaction] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AgencyTransactionHistory): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AgencyTransactionHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py new file mode 100644 index 0000000..8b3fe3c --- /dev/null +++ b/gate_api/models/auto_repay_setting.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AutoRepaySetting(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'status': 'str' + } + + attribute_map = { + 'status': 'status' + } + + def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, Configuration) -> None + """AutoRepaySetting - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._status = None + self.discriminator = None + + if status is not None: + self.status = status + + @property + def status(self): + """Gets the status of this AutoRepaySetting. # noqa: E501 + + Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501 + + :return: The status of this AutoRepaySetting. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AutoRepaySetting. + + Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501 + + :param status: The status of this AutoRepaySetting. # noqa: E501 + :type: str + """ + allowed_values = ["on", "off"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AutoRepaySetting): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AutoRepaySetting): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py new file mode 100644 index 0000000..ae56f80 --- /dev/null +++ b/gate_api/models/batch_amend_item.py @@ -0,0 +1,296 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BatchAmendItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'str', + 'currency_pair': 'str', + 'account': 'str', + 'amount': 'str', + 'price': 'str', + 'amend_text': 'str', + 'action_mode': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'currency_pair': 'currency_pair', + 'account': 'account', + 'amount': 'amount', + 'price': 'price', + 'amend_text': 'amend_text', + 'action_mode': 'action_mode' + } + + def __init__(self, order_id=None, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, Configuration) -> None + """BatchAmendItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._currency_pair = None + self._account = None + self._amount = None + self._price = None + self._amend_text = None + self._action_mode = None + self.discriminator = None + + self.order_id = order_id + self.currency_pair = currency_pair + if account is not None: + self.account = account + if amount is not None: + self.amount = amount + if price is not None: + self.price = price + if amend_text is not None: + self.amend_text = amend_text + if action_mode is not None: + self.action_mode = action_mode + + @property + def order_id(self): + """Gets the order_id of this BatchAmendItem. # noqa: E501 + + The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). # noqa: E501 + + :return: The order_id of this BatchAmendItem. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this BatchAmendItem. + + The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). # noqa: E501 + + :param order_id: The order_id of this BatchAmendItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 + raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 + + self._order_id = order_id + + @property + def currency_pair(self): + """Gets the currency_pair of this BatchAmendItem. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this BatchAmendItem. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this BatchAmendItem. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this BatchAmendItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 + raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 + + self._currency_pair = currency_pair + + @property + def account(self): + """Gets the account of this BatchAmendItem. # noqa: E501 + + Default spot, unified account and warehouse-by-store leverage account. # noqa: E501 + + :return: The account of this BatchAmendItem. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this BatchAmendItem. + + Default spot, unified account and warehouse-by-store leverage account. # noqa: E501 + + :param account: The account of this BatchAmendItem. # noqa: E501 + :type: str + """ + + self._account = account + + @property + def amount(self): + """Gets the amount of this BatchAmendItem. # noqa: E501 + + trade amount, only one of amount and price can be specified # noqa: E501 + + :return: The amount of this BatchAmendItem. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this BatchAmendItem. + + trade amount, only one of amount and price can be specified # noqa: E501 + + :param amount: The amount of this BatchAmendItem. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def price(self): + """Gets the price of this BatchAmendItem. # noqa: E501 + + trade price, only one of amount and price can be specified # noqa: E501 + + :return: The price of this BatchAmendItem. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this BatchAmendItem. + + trade price, only one of amount and price can be specified # noqa: E501 + + :param price: The price of this BatchAmendItem. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def amend_text(self): + """Gets the amend_text of this BatchAmendItem. # noqa: E501 + + Custom info during amending order # noqa: E501 + + :return: The amend_text of this BatchAmendItem. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this BatchAmendItem. + + Custom info during amending order # noqa: E501 + + :param amend_text: The amend_text of this BatchAmendItem. # noqa: E501 + :type: str + """ + if (self.local_vars_configuration.client_side_validation and + amend_text is not None and len(amend_text) > 31): + raise ValueError("Invalid value for `amend_text`, length must be less than or equal to `31`") # noqa: E501 + + self._amend_text = amend_text + + @property + def action_mode(self): + """Gets the action_mode of this BatchAmendItem. # noqa: E501 + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :return: The action_mode of this BatchAmendItem. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this BatchAmendItem. + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :param action_mode: The action_mode of this BatchAmendItem. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchAmendItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BatchAmendItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py new file mode 100644 index 0000000..e6ab0e6 --- /dev/null +++ b/gate_api/models/batch_amend_order_req.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BatchAmendOrderReq(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'text': 'str', + 'size': 'int', + 'price': 'str', + 'amend_text': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'text': 'text', + 'size': 'size', + 'price': 'price', + 'amend_text': 'amend_text' + } + + def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, str, str, Configuration) -> None + """BatchAmendOrderReq - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._text = None + self._size = None + self._price = None + self._amend_text = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if text is not None: + self.text = text + if size is not None: + self.size = size + if price is not None: + self.price = price + if amend_text is not None: + self.amend_text = amend_text + + @property + def order_id(self): + """Gets the order_id of this BatchAmendOrderReq. # noqa: E501 + + Order id, order_id and text must contain at least one # noqa: E501 + + :return: The order_id of this BatchAmendOrderReq. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this BatchAmendOrderReq. + + Order id, order_id and text must contain at least one # noqa: E501 + + :param order_id: The order_id of this BatchAmendOrderReq. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def text(self): + """Gets the text of this BatchAmendOrderReq. # noqa: E501 + + User-defined order text, at least one of order_id and text must be passed # noqa: E501 + + :return: The text of this BatchAmendOrderReq. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this BatchAmendOrderReq. + + User-defined order text, at least one of order_id and text must be passed # noqa: E501 + + :param text: The text of this BatchAmendOrderReq. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def size(self): + """Gets the size of this BatchAmendOrderReq. # noqa: E501 + + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + + :return: The size of this BatchAmendOrderReq. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this BatchAmendOrderReq. + + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + + :param size: The size of this BatchAmendOrderReq. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def price(self): + """Gets the price of this BatchAmendOrderReq. # noqa: E501 + + New order price. # noqa: E501 + + :return: The price of this BatchAmendOrderReq. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this BatchAmendOrderReq. + + New order price. # noqa: E501 + + :param price: The price of this BatchAmendOrderReq. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def amend_text(self): + """Gets the amend_text of this BatchAmendOrderReq. # noqa: E501 + + Custom info during amending order # noqa: E501 + + :return: The amend_text of this BatchAmendOrderReq. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this BatchAmendOrderReq. + + Custom info during amending order # noqa: E501 + + :param amend_text: The amend_text of this BatchAmendOrderReq. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchAmendOrderReq): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BatchAmendOrderReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py new file mode 100644 index 0000000..0d8529a --- /dev/null +++ b/gate_api/models/batch_futures_order.py @@ -0,0 +1,909 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BatchFuturesOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'succeeded': 'bool', + 'label': 'str', + 'detail': 'str', + 'id': 'int', + 'user': 'int', + 'create_time': 'float', + 'finish_time': 'float', + 'finish_as': 'str', + 'status': 'str', + 'contract': 'str', + 'size': 'int', + 'iceberg': 'int', + 'price': 'str', + 'close': 'bool', + 'is_close': 'bool', + 'reduce_only': 'bool', + 'is_reduce_only': 'bool', + 'is_liq': 'bool', + 'tif': 'str', + 'left': 'int', + 'fill_price': 'str', + 'text': 'str', + 'tkfr': 'str', + 'mkfr': 'str', + 'refu': 'int', + 'auto_size': 'str', + 'stp_act': 'str', + 'stp_id': 'int' + } + + attribute_map = { + 'succeeded': 'succeeded', + 'label': 'label', + 'detail': 'detail', + 'id': 'id', + 'user': 'user', + 'create_time': 'create_time', + 'finish_time': 'finish_time', + 'finish_as': 'finish_as', + 'status': 'status', + 'contract': 'contract', + 'size': 'size', + 'iceberg': 'iceberg', + 'price': 'price', + 'close': 'close', + 'is_close': 'is_close', + 'reduce_only': 'reduce_only', + 'is_reduce_only': 'is_reduce_only', + 'is_liq': 'is_liq', + 'tif': 'tif', + 'left': 'left', + 'fill_price': 'fill_price', + 'text': 'text', + 'tkfr': 'tkfr', + 'mkfr': 'mkfr', + 'refu': 'refu', + 'auto_size': 'auto_size', + 'stp_act': 'stp_act', + 'stp_id': 'stp_id' + } + + def __init__(self, succeeded=None, label=None, detail=None, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_act=None, stp_id=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, str, str, int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, str, int, Configuration) -> None + """BatchFuturesOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._succeeded = None + self._label = None + self._detail = None + self._id = None + self._user = None + self._create_time = None + self._finish_time = None + self._finish_as = None + self._status = None + self._contract = None + self._size = None + self._iceberg = None + self._price = None + self._close = None + self._is_close = None + self._reduce_only = None + self._is_reduce_only = None + self._is_liq = None + self._tif = None + self._left = None + self._fill_price = None + self._text = None + self._tkfr = None + self._mkfr = None + self._refu = None + self._auto_size = None + self._stp_act = None + self._stp_id = None + self.discriminator = None + + if succeeded is not None: + self.succeeded = succeeded + if label is not None: + self.label = label + if detail is not None: + self.detail = detail + if id is not None: + self.id = id + if user is not None: + self.user = user + if create_time is not None: + self.create_time = create_time + if finish_time is not None: + self.finish_time = finish_time + if finish_as is not None: + self.finish_as = finish_as + if status is not None: + self.status = status + if contract is not None: + self.contract = contract + if size is not None: + self.size = size + if iceberg is not None: + self.iceberg = iceberg + if price is not None: + self.price = price + if close is not None: + self.close = close + if is_close is not None: + self.is_close = is_close + if reduce_only is not None: + self.reduce_only = reduce_only + if is_reduce_only is not None: + self.is_reduce_only = is_reduce_only + if is_liq is not None: + self.is_liq = is_liq + if tif is not None: + self.tif = tif + if left is not None: + self.left = left + if fill_price is not None: + self.fill_price = fill_price + if text is not None: + self.text = text + if tkfr is not None: + self.tkfr = tkfr + if mkfr is not None: + self.mkfr = mkfr + if refu is not None: + self.refu = refu + if auto_size is not None: + self.auto_size = auto_size + if stp_act is not None: + self.stp_act = stp_act + if stp_id is not None: + self.stp_id = stp_id + + @property + def succeeded(self): + """Gets the succeeded of this BatchFuturesOrder. # noqa: E501 + + Whether the batch of orders succeeded # noqa: E501 + + :return: The succeeded of this BatchFuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this BatchFuturesOrder. + + Whether the batch of orders succeeded # noqa: E501 + + :param succeeded: The succeeded of this BatchFuturesOrder. # noqa: E501 + :type: bool + """ + + self._succeeded = succeeded + + @property + def label(self): + """Gets the label of this BatchFuturesOrder. # noqa: E501 + + Error label, only exists if execution fails # noqa: E501 + + :return: The label of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this BatchFuturesOrder. + + Error label, only exists if execution fails # noqa: E501 + + :param label: The label of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def detail(self): + """Gets the detail of this BatchFuturesOrder. # noqa: E501 + + Error detail, only present if execution failed and details need to be given # noqa: E501 + + :return: The detail of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this BatchFuturesOrder. + + Error detail, only present if execution failed and details need to be given # noqa: E501 + + :param detail: The detail of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._detail = detail + + @property + def id(self): + """Gets the id of this BatchFuturesOrder. # noqa: E501 + + Futures order ID # noqa: E501 + + :return: The id of this BatchFuturesOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BatchFuturesOrder. + + Futures order ID # noqa: E501 + + :param id: The id of this BatchFuturesOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user(self): + """Gets the user of this BatchFuturesOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this BatchFuturesOrder. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this BatchFuturesOrder. + + User ID # noqa: E501 + + :param user: The user of this BatchFuturesOrder. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def create_time(self): + """Gets the create_time of this BatchFuturesOrder. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The create_time of this BatchFuturesOrder. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this BatchFuturesOrder. + + Creation time of order # noqa: E501 + + :param create_time: The create_time of this BatchFuturesOrder. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def finish_time(self): + """Gets the finish_time of this BatchFuturesOrder. # noqa: E501 + + Order finished time. Not returned if order is open # noqa: E501 + + :return: The finish_time of this BatchFuturesOrder. # noqa: E501 + :rtype: float + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this BatchFuturesOrder. + + Order finished time. Not returned if order is open # noqa: E501 + + :param finish_time: The finish_time of this BatchFuturesOrder. # noqa: E501 + :type: float + """ + + self._finish_time = finish_time + + @property + def finish_as(self): + """Gets the finish_as of this BatchFuturesOrder. # noqa: E501 + + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + + :return: The finish_as of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this BatchFuturesOrder. + + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + + :param finish_as: The finish_as of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "stp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + @property + def status(self): + """Gets the status of this BatchFuturesOrder. # noqa: E501 + + Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + + :return: The status of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchFuturesOrder. + + Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + + :param status: The status of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["open", "finished"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def contract(self): + """Gets the contract of this BatchFuturesOrder. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this BatchFuturesOrder. + + Futures contract # noqa: E501 + + :param contract: The contract of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def size(self): + """Gets the size of this BatchFuturesOrder. # noqa: E501 + + Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + + :return: The size of this BatchFuturesOrder. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this BatchFuturesOrder. + + Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + + :param size: The size of this BatchFuturesOrder. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def iceberg(self): + """Gets the iceberg of this BatchFuturesOrder. # noqa: E501 + + Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + + :return: The iceberg of this BatchFuturesOrder. # noqa: E501 + :rtype: int + """ + return self._iceberg + + @iceberg.setter + def iceberg(self, iceberg): + """Sets the iceberg of this BatchFuturesOrder. + + Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + + :param iceberg: The iceberg of this BatchFuturesOrder. # noqa: E501 + :type: int + """ + + self._iceberg = iceberg + + @property + def price(self): + """Gets the price of this BatchFuturesOrder. # noqa: E501 + + Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + + :return: The price of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this BatchFuturesOrder. + + Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + + :param price: The price of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def close(self): + """Gets the close of this BatchFuturesOrder. # noqa: E501 + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :return: The close of this BatchFuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._close + + @close.setter + def close(self, close): + """Sets the close of this BatchFuturesOrder. + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :param close: The close of this BatchFuturesOrder. # noqa: E501 + :type: bool + """ + + self._close = close + + @property + def is_close(self): + """Gets the is_close of this BatchFuturesOrder. # noqa: E501 + + Is the order to close position # noqa: E501 + + :return: The is_close of this BatchFuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._is_close + + @is_close.setter + def is_close(self, is_close): + """Sets the is_close of this BatchFuturesOrder. + + Is the order to close position # noqa: E501 + + :param is_close: The is_close of this BatchFuturesOrder. # noqa: E501 + :type: bool + """ + + self._is_close = is_close + + @property + def reduce_only(self): + """Gets the reduce_only of this BatchFuturesOrder. # noqa: E501 + + Set as `true` to be reduce-only order # noqa: E501 + + :return: The reduce_only of this BatchFuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._reduce_only + + @reduce_only.setter + def reduce_only(self, reduce_only): + """Sets the reduce_only of this BatchFuturesOrder. + + Set as `true` to be reduce-only order # noqa: E501 + + :param reduce_only: The reduce_only of this BatchFuturesOrder. # noqa: E501 + :type: bool + """ + + self._reduce_only = reduce_only + + @property + def is_reduce_only(self): + """Gets the is_reduce_only of this BatchFuturesOrder. # noqa: E501 + + Is the order reduce-only # noqa: E501 + + :return: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._is_reduce_only + + @is_reduce_only.setter + def is_reduce_only(self, is_reduce_only): + """Sets the is_reduce_only of this BatchFuturesOrder. + + Is the order reduce-only # noqa: E501 + + :param is_reduce_only: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 + :type: bool + """ + + self._is_reduce_only = is_reduce_only + + @property + def is_liq(self): + """Gets the is_liq of this BatchFuturesOrder. # noqa: E501 + + Is the order for liquidation # noqa: E501 + + :return: The is_liq of this BatchFuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._is_liq + + @is_liq.setter + def is_liq(self, is_liq): + """Sets the is_liq of this BatchFuturesOrder. + + Is the order for liquidation # noqa: E501 + + :param is_liq: The is_liq of this BatchFuturesOrder. # noqa: E501 + :type: bool + """ + + self._is_liq = is_liq + + @property + def tif(self): + """Gets the tif of this BatchFuturesOrder. # noqa: E501 + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 + + :return: The tif of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._tif + + @tif.setter + def tif(self, tif): + """Sets the tif of this BatchFuturesOrder. + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 + + :param tif: The tif of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 + .format(tif, allowed_values) + ) + + self._tif = tif + + @property + def left(self): + """Gets the left of this BatchFuturesOrder. # noqa: E501 + + Size left to be traded # noqa: E501 + + :return: The left of this BatchFuturesOrder. # noqa: E501 + :rtype: int + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this BatchFuturesOrder. + + Size left to be traded # noqa: E501 + + :param left: The left of this BatchFuturesOrder. # noqa: E501 + :type: int + """ + + self._left = left + + @property + def fill_price(self): + """Gets the fill_price of this BatchFuturesOrder. # noqa: E501 + + Fill price of the order # noqa: E501 + + :return: The fill_price of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this BatchFuturesOrder. + + Fill price of the order # noqa: E501 + + :param fill_price: The fill_price of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def text(self): + """Gets the text of this BatchFuturesOrder. # noqa: E501 + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 + + :return: The text of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this BatchFuturesOrder. + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 + + :param text: The text of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def tkfr(self): + """Gets the tkfr of this BatchFuturesOrder. # noqa: E501 + + Taker fee # noqa: E501 + + :return: The tkfr of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._tkfr + + @tkfr.setter + def tkfr(self, tkfr): + """Sets the tkfr of this BatchFuturesOrder. + + Taker fee # noqa: E501 + + :param tkfr: The tkfr of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._tkfr = tkfr + + @property + def mkfr(self): + """Gets the mkfr of this BatchFuturesOrder. # noqa: E501 + + Maker fee # noqa: E501 + + :return: The mkfr of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._mkfr + + @mkfr.setter + def mkfr(self, mkfr): + """Sets the mkfr of this BatchFuturesOrder. + + Maker fee # noqa: E501 + + :param mkfr: The mkfr of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + + self._mkfr = mkfr + + @property + def refu(self): + """Gets the refu of this BatchFuturesOrder. # noqa: E501 + + Reference user ID # noqa: E501 + + :return: The refu of this BatchFuturesOrder. # noqa: E501 + :rtype: int + """ + return self._refu + + @refu.setter + def refu(self, refu): + """Sets the refu of this BatchFuturesOrder. + + Reference user ID # noqa: E501 + + :param refu: The refu of this BatchFuturesOrder. # noqa: E501 + :type: int + """ + + self._refu = refu + + @property + def auto_size(self): + """Gets the auto_size of this BatchFuturesOrder. # noqa: E501 + + Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 + + :return: The auto_size of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._auto_size + + @auto_size.setter + def auto_size(self, auto_size): + """Sets the auto_size of this BatchFuturesOrder. + + Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 + + :param auto_size: The auto_size of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["close_long", "close_short"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and auto_size not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `auto_size` ({0}), must be one of {1}" # noqa: E501 + .format(auto_size, allowed_values) + ) + + self._auto_size = auto_size + + @property + def stp_act(self): + """Gets the stp_act of this BatchFuturesOrder. # noqa: E501 + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :return: The stp_act of this BatchFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._stp_act + + @stp_act.setter + def stp_act(self, stp_act): + """Sets the stp_act of this BatchFuturesOrder. + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :param stp_act: The stp_act of this BatchFuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["co", "cn", "cb", "-"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 + .format(stp_act, allowed_values) + ) + + self._stp_act = stp_act + + @property + def stp_id(self): + """Gets the stp_id of this BatchFuturesOrder. # noqa: E501 + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :return: The stp_id of this BatchFuturesOrder. # noqa: E501 + :rtype: int + """ + return self._stp_id + + @stp_id.setter + def stp_id(self, stp_id): + """Sets the stp_id of this BatchFuturesOrder. + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :param stp_id: The stp_id of this BatchFuturesOrder. # noqa: E501 + :type: int + """ + + self._stp_id = stp_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, BatchFuturesOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BatchFuturesOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py new file mode 100644 index 0000000..a90d329 --- /dev/null +++ b/gate_api/models/batch_order.py @@ -0,0 +1,1173 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BatchOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'amend_text': 'str', + 'text': 'str', + 'succeeded': 'bool', + 'label': 'str', + 'message': 'str', + 'id': 'str', + 'create_time': 'str', + 'update_time': 'str', + 'create_time_ms': 'int', + 'update_time_ms': 'int', + 'status': 'str', + 'currency_pair': 'str', + 'type': 'str', + 'account': 'str', + 'side': 'str', + 'amount': 'str', + 'price': 'str', + 'time_in_force': 'str', + 'iceberg': 'str', + 'auto_borrow': 'bool', + 'auto_repay': 'bool', + 'left': 'str', + 'filled_amount': 'str', + 'fill_price': 'str', + 'filled_total': 'str', + 'avg_deal_price': 'str', + 'fee': 'str', + 'fee_currency': 'str', + 'point_fee': 'str', + 'gt_fee': 'str', + 'gt_discount': 'bool', + 'rebated_fee': 'str', + 'rebated_fee_currency': 'str', + 'stp_id': 'int', + 'stp_act': 'str', + 'finish_as': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'amend_text': 'amend_text', + 'text': 'text', + 'succeeded': 'succeeded', + 'label': 'label', + 'message': 'message', + 'id': 'id', + 'create_time': 'create_time', + 'update_time': 'update_time', + 'create_time_ms': 'create_time_ms', + 'update_time_ms': 'update_time_ms', + 'status': 'status', + 'currency_pair': 'currency_pair', + 'type': 'type', + 'account': 'account', + 'side': 'side', + 'amount': 'amount', + 'price': 'price', + 'time_in_force': 'time_in_force', + 'iceberg': 'iceberg', + 'auto_borrow': 'auto_borrow', + 'auto_repay': 'auto_repay', + 'left': 'left', + 'filled_amount': 'filled_amount', + 'fill_price': 'fill_price', + 'filled_total': 'filled_total', + 'avg_deal_price': 'avg_deal_price', + 'fee': 'fee', + 'fee_currency': 'fee_currency', + 'point_fee': 'point_fee', + 'gt_fee': 'gt_fee', + 'gt_discount': 'gt_discount', + 'rebated_fee': 'rebated_fee', + 'rebated_fee_currency': 'rebated_fee_currency', + 'stp_id': 'stp_id', + 'stp_act': 'stp_act', + 'finish_as': 'finish_as' + } + + def __init__(self, order_id=None, amend_text=None, text=None, succeeded=None, label=None, message=None, id=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, Configuration) -> None + """BatchOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._amend_text = None + self._text = None + self._succeeded = None + self._label = None + self._message = None + self._id = None + self._create_time = None + self._update_time = None + self._create_time_ms = None + self._update_time_ms = None + self._status = None + self._currency_pair = None + self._type = None + self._account = None + self._side = None + self._amount = None + self._price = None + self._time_in_force = None + self._iceberg = None + self._auto_borrow = None + self._auto_repay = None + self._left = None + self._filled_amount = None + self._fill_price = None + self._filled_total = None + self._avg_deal_price = None + self._fee = None + self._fee_currency = None + self._point_fee = None + self._gt_fee = None + self._gt_discount = None + self._rebated_fee = None + self._rebated_fee_currency = None + self._stp_id = None + self._stp_act = None + self._finish_as = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if amend_text is not None: + self.amend_text = amend_text + if text is not None: + self.text = text + if succeeded is not None: + self.succeeded = succeeded + if label is not None: + self.label = label + if message is not None: + self.message = message + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + if create_time_ms is not None: + self.create_time_ms = create_time_ms + if update_time_ms is not None: + self.update_time_ms = update_time_ms + if status is not None: + self.status = status + if currency_pair is not None: + self.currency_pair = currency_pair + if type is not None: + self.type = type + if account is not None: + self.account = account + if side is not None: + self.side = side + if amount is not None: + self.amount = amount + if price is not None: + self.price = price + if time_in_force is not None: + self.time_in_force = time_in_force + if iceberg is not None: + self.iceberg = iceberg + if auto_borrow is not None: + self.auto_borrow = auto_borrow + if auto_repay is not None: + self.auto_repay = auto_repay + if left is not None: + self.left = left + if filled_amount is not None: + self.filled_amount = filled_amount + if fill_price is not None: + self.fill_price = fill_price + if filled_total is not None: + self.filled_total = filled_total + if avg_deal_price is not None: + self.avg_deal_price = avg_deal_price + if fee is not None: + self.fee = fee + if fee_currency is not None: + self.fee_currency = fee_currency + if point_fee is not None: + self.point_fee = point_fee + if gt_fee is not None: + self.gt_fee = gt_fee + if gt_discount is not None: + self.gt_discount = gt_discount + if rebated_fee is not None: + self.rebated_fee = rebated_fee + if rebated_fee_currency is not None: + self.rebated_fee_currency = rebated_fee_currency + if stp_id is not None: + self.stp_id = stp_id + if stp_act is not None: + self.stp_act = stp_act + if finish_as is not None: + self.finish_as = finish_as + + @property + def order_id(self): + """Gets the order_id of this BatchOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this BatchOrder. + + Order ID # noqa: E501 + + :param order_id: The order_id of this BatchOrder. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def amend_text(self): + """Gets the amend_text of this BatchOrder. # noqa: E501 + + The custom data that the user remarked when amending the order # noqa: E501 + + :return: The amend_text of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this BatchOrder. + + The custom data that the user remarked when amending the order # noqa: E501 + + :param amend_text: The amend_text of this BatchOrder. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + @property + def text(self): + """Gets the text of this BatchOrder. # noqa: E501 + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :return: The text of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this BatchOrder. + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :param text: The text of this BatchOrder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def succeeded(self): + """Gets the succeeded of this BatchOrder. # noqa: E501 + + Whether the batch of orders succeeded # noqa: E501 + + :return: The succeeded of this BatchOrder. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this BatchOrder. + + Whether the batch of orders succeeded # noqa: E501 + + :param succeeded: The succeeded of this BatchOrder. # noqa: E501 + :type: bool + """ + + self._succeeded = succeeded + + @property + def label(self): + """Gets the label of this BatchOrder. # noqa: E501 + + Error label, if any, otherwise an empty string # noqa: E501 + + :return: The label of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this BatchOrder. + + Error label, if any, otherwise an empty string # noqa: E501 + + :param label: The label of this BatchOrder. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this BatchOrder. # noqa: E501 + + Detailed error message, if any, otherwise an empty string # noqa: E501 + + :return: The message of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BatchOrder. + + Detailed error message, if any, otherwise an empty string # noqa: E501 + + :param message: The message of this BatchOrder. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def id(self): + """Gets the id of this BatchOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BatchOrder. + + Order ID # noqa: E501 + + :param id: The id of this BatchOrder. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this BatchOrder. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The create_time of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this BatchOrder. + + Creation time of order # noqa: E501 + + :param create_time: The create_time of this BatchOrder. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this BatchOrder. # noqa: E501 + + Last modification time of order # noqa: E501 + + :return: The update_time of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this BatchOrder. + + Last modification time of order # noqa: E501 + + :param update_time: The update_time of this BatchOrder. # noqa: E501 + :type: str + """ + + self._update_time = update_time + + @property + def create_time_ms(self): + """Gets the create_time_ms of this BatchOrder. # noqa: E501 + + Creation time of order (in milliseconds) # noqa: E501 + + :return: The create_time_ms of this BatchOrder. # 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 BatchOrder. + + Creation time of order (in milliseconds) # noqa: E501 + + :param create_time_ms: The create_time_ms of this BatchOrder. # noqa: E501 + :type: int + """ + + self._create_time_ms = create_time_ms + + @property + def update_time_ms(self): + """Gets the update_time_ms of this BatchOrder. # noqa: E501 + + Last modification time of order (in milliseconds) # noqa: E501 + + :return: The update_time_ms of this BatchOrder. # 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 BatchOrder. + + Last modification time of order (in milliseconds) # noqa: E501 + + :param update_time_ms: The update_time_ms of this BatchOrder. # noqa: E501 + :type: int + """ + + self._update_time_ms = update_time_ms + + @property + def status(self): + """Gets the status of this BatchOrder. # noqa: E501 + + Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 + + :return: The status of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BatchOrder. + + Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 + + :param status: The status of this BatchOrder. # noqa: E501 + :type: str + """ + allowed_values = ["open", "closed", "cancelled"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def currency_pair(self): + """Gets the currency_pair of this BatchOrder. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this BatchOrder. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this BatchOrder. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def type(self): + """Gets the type of this BatchOrder. # noqa: E501 + + Order Type - limit : Limit Order - market : Market Order # noqa: E501 + + :return: The type of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this BatchOrder. + + Order Type - limit : Limit Order - market : Market Order # noqa: E501 + + :param type: The type of this BatchOrder. # noqa: E501 + :type: str + """ + allowed_values = ["limit", "market"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def account(self): + """Gets the account of this BatchOrder. # noqa: E501 + + Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 + + :return: The account of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this BatchOrder. + + Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 + + :param account: The account of this BatchOrder. # noqa: E501 + :type: str + """ + allowed_values = ["spot", "margin", "cross_margin", "unified"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `account` ({0}), must be one of {1}" # noqa: E501 + .format(account, allowed_values) + ) + + self._account = account + + @property + def side(self): + """Gets the side of this BatchOrder. # noqa: E501 + + Order side # noqa: E501 + + :return: The side of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this BatchOrder. + + Order side # noqa: E501 + + :param side: The side of this BatchOrder. # noqa: E501 + :type: str + """ + 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 BatchOrder. # noqa: E501 + + Trade amount # noqa: E501 + + :return: The amount of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this BatchOrder. + + Trade amount # noqa: E501 + + :param amount: The amount of this BatchOrder. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def price(self): + """Gets the price of this BatchOrder. # noqa: E501 + + Order price # noqa: E501 + + :return: The price of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this BatchOrder. + + Order price # noqa: E501 + + :param price: The price of this BatchOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def time_in_force(self): + """Gets the time_in_force of this BatchOrder. # noqa: E501 + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 + + :return: The time_in_force of this BatchOrder. # 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 BatchOrder. + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 + + :param time_in_force: The time_in_force of this BatchOrder. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 + .format(time_in_force, allowed_values) + ) + + self._time_in_force = time_in_force + + @property + def iceberg(self): + """Gets the iceberg of this BatchOrder. # noqa: E501 + + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + + :return: The iceberg of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._iceberg + + @iceberg.setter + def iceberg(self, iceberg): + """Sets the iceberg of this BatchOrder. + + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + + :param iceberg: The iceberg of this BatchOrder. # noqa: E501 + :type: str + """ + + self._iceberg = iceberg + + @property + def auto_borrow(self): + """Gets the auto_borrow of this BatchOrder. # noqa: E501 + + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + + :return: The auto_borrow of this BatchOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_borrow + + @auto_borrow.setter + def auto_borrow(self, auto_borrow): + """Sets the auto_borrow of this BatchOrder. + + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + + :param auto_borrow: The auto_borrow of this BatchOrder. # noqa: E501 + :type: bool + """ + + self._auto_borrow = auto_borrow + + @property + def auto_repay(self): + """Gets the auto_repay of this BatchOrder. # noqa: E501 + + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + + :return: The auto_repay of this BatchOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_repay + + @auto_repay.setter + def auto_repay(self, auto_repay): + """Sets the auto_repay of this BatchOrder. + + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + + :param auto_repay: The auto_repay of this BatchOrder. # noqa: E501 + :type: bool + """ + + self._auto_repay = auto_repay + + @property + def left(self): + """Gets the left of this BatchOrder. # noqa: E501 + + Amount left to fill # noqa: E501 + + :return: The left of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this BatchOrder. + + Amount left to fill # noqa: E501 + + :param left: The left of this BatchOrder. # noqa: E501 + :type: str + """ + + self._left = left + + @property + def filled_amount(self): + """Gets the filled_amount of this BatchOrder. # noqa: E501 + + Amount traded to fill # noqa: E501 + + :return: The filled_amount of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._filled_amount + + @filled_amount.setter + def filled_amount(self, filled_amount): + """Sets the filled_amount of this BatchOrder. + + Amount traded to fill # noqa: E501 + + :param filled_amount: The filled_amount of this BatchOrder. # noqa: E501 + :type: str + """ + + self._filled_amount = filled_amount + + @property + def fill_price(self): + """Gets the fill_price of this BatchOrder. # noqa: E501 + + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + + :return: The fill_price of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this BatchOrder. + + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + + :param fill_price: The fill_price of this BatchOrder. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def filled_total(self): + """Gets the filled_total of this BatchOrder. # noqa: E501 + + Total filled in quote currency # noqa: E501 + + :return: The filled_total of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._filled_total + + @filled_total.setter + def filled_total(self, filled_total): + """Sets the filled_total of this BatchOrder. + + Total filled in quote currency # noqa: E501 + + :param filled_total: The filled_total of this BatchOrder. # noqa: E501 + :type: str + """ + + self._filled_total = filled_total + + @property + def avg_deal_price(self): + """Gets the avg_deal_price of this BatchOrder. # noqa: E501 + + Average fill price # noqa: E501 + + :return: The avg_deal_price of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._avg_deal_price + + @avg_deal_price.setter + def avg_deal_price(self, avg_deal_price): + """Sets the avg_deal_price of this BatchOrder. + + Average fill price # noqa: E501 + + :param avg_deal_price: The avg_deal_price of this BatchOrder. # noqa: E501 + :type: str + """ + + self._avg_deal_price = avg_deal_price + + @property + def fee(self): + """Gets the fee of this BatchOrder. # noqa: E501 + + Fee deducted # noqa: E501 + + :return: The fee of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this BatchOrder. + + Fee deducted # noqa: E501 + + :param fee: The fee of this BatchOrder. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def fee_currency(self): + """Gets the fee_currency of this BatchOrder. # noqa: E501 + + Fee currency unit # noqa: E501 + + :return: The fee_currency of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._fee_currency + + @fee_currency.setter + def fee_currency(self, fee_currency): + """Sets the fee_currency of this BatchOrder. + + Fee currency unit # noqa: E501 + + :param fee_currency: The fee_currency of this BatchOrder. # noqa: E501 + :type: str + """ + + self._fee_currency = fee_currency + + @property + def point_fee(self): + """Gets the point_fee of this BatchOrder. # noqa: E501 + + Points used to deduct fee # noqa: E501 + + :return: The point_fee of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._point_fee + + @point_fee.setter + def point_fee(self, point_fee): + """Sets the point_fee of this BatchOrder. + + Points used to deduct fee # noqa: E501 + + :param point_fee: The point_fee of this BatchOrder. # noqa: E501 + :type: str + """ + + self._point_fee = point_fee + + @property + def gt_fee(self): + """Gets the gt_fee of this BatchOrder. # noqa: E501 + + GT used to deduct fee # noqa: E501 + + :return: The gt_fee of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._gt_fee + + @gt_fee.setter + def gt_fee(self, gt_fee): + """Sets the gt_fee of this BatchOrder. + + GT used to deduct fee # noqa: E501 + + :param gt_fee: The gt_fee of this BatchOrder. # noqa: E501 + :type: str + """ + + self._gt_fee = gt_fee + + @property + def gt_discount(self): + """Gets the gt_discount of this BatchOrder. # noqa: E501 + + Whether GT fee discount is used # noqa: E501 + + :return: The gt_discount of this BatchOrder. # noqa: E501 + :rtype: bool + """ + return self._gt_discount + + @gt_discount.setter + def gt_discount(self, gt_discount): + """Sets the gt_discount of this BatchOrder. + + Whether GT fee discount is used # noqa: E501 + + :param gt_discount: The gt_discount of this BatchOrder. # noqa: E501 + :type: bool + """ + + self._gt_discount = gt_discount + + @property + def rebated_fee(self): + """Gets the rebated_fee of this BatchOrder. # noqa: E501 + + Rebated fee # noqa: E501 + + :return: The rebated_fee of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._rebated_fee + + @rebated_fee.setter + def rebated_fee(self, rebated_fee): + """Sets the rebated_fee of this BatchOrder. + + Rebated fee # noqa: E501 + + :param rebated_fee: The rebated_fee of this BatchOrder. # noqa: E501 + :type: str + """ + + self._rebated_fee = rebated_fee + + @property + def rebated_fee_currency(self): + """Gets the rebated_fee_currency of this BatchOrder. # noqa: E501 + + Rebated fee currency unit # noqa: E501 + + :return: The rebated_fee_currency of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._rebated_fee_currency + + @rebated_fee_currency.setter + def rebated_fee_currency(self, rebated_fee_currency): + """Sets the rebated_fee_currency of this BatchOrder. + + Rebated fee currency unit # noqa: E501 + + :param rebated_fee_currency: The rebated_fee_currency of this BatchOrder. # noqa: E501 + :type: str + """ + + self._rebated_fee_currency = rebated_fee_currency + + @property + def stp_id(self): + """Gets the stp_id of this BatchOrder. # noqa: E501 + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :return: The stp_id of this BatchOrder. # noqa: E501 + :rtype: int + """ + return self._stp_id + + @stp_id.setter + def stp_id(self, stp_id): + """Sets the stp_id of this BatchOrder. + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :param stp_id: The stp_id of this BatchOrder. # noqa: E501 + :type: int + """ + + self._stp_id = stp_id + + @property + def stp_act(self): + """Gets the stp_act of this BatchOrder. # noqa: E501 + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :return: The stp_act of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._stp_act + + @stp_act.setter + def stp_act(self, stp_act): + """Sets the stp_act of this BatchOrder. + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :param stp_act: The stp_act of this BatchOrder. # noqa: E501 + :type: str + """ + allowed_values = ["cn", "co", "cb", "-"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 + .format(stp_act, allowed_values) + ) + + self._stp_act = stp_act + + @property + def finish_as(self): + """Gets the finish_as of this BatchOrder. # noqa: E501 + + How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 + + :return: The finish_as of this BatchOrder. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this BatchOrder. + + How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 + + :param finish_as: The finish_as of this BatchOrder. # noqa: E501 + :type: str + """ + allowed_values = ["open", "filled", "cancelled", "ioc", "stp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BatchOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py new file mode 100644 index 0000000..58762be --- /dev/null +++ b/gate_api/models/borrow_currency_info.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BorrowCurrencyInfo(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'left_repay_principal': 'str', + 'left_repay_interest': 'str', + 'left_repay_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'left_repay_principal': 'left_repay_principal', + 'left_repay_interest': 'left_repay_interest', + 'left_repay_usdt': 'left_repay_usdt' + } + + def __init__(self, currency=None, index_price=None, left_repay_principal=None, left_repay_interest=None, left_repay_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """BorrowCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._left_repay_principal = None + self._left_repay_interest = None + self._left_repay_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if left_repay_principal is not None: + self.left_repay_principal = left_repay_principal + if left_repay_interest is not None: + self.left_repay_interest = left_repay_interest + if left_repay_usdt is not None: + self.left_repay_usdt = left_repay_usdt + + @property + def currency(self): + """Gets the currency of this BorrowCurrencyInfo. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this BorrowCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this BorrowCurrencyInfo. + + Currency # noqa: E501 + + :param currency: The currency of this BorrowCurrencyInfo. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this BorrowCurrencyInfo. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this BorrowCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this BorrowCurrencyInfo. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this BorrowCurrencyInfo. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def left_repay_principal(self): + """Gets the left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 + + outstanding principal # noqa: E501 + + :return: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._left_repay_principal + + @left_repay_principal.setter + def left_repay_principal(self, left_repay_principal): + """Sets the left_repay_principal of this BorrowCurrencyInfo. + + outstanding principal # noqa: E501 + + :param left_repay_principal: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 + :type: str + """ + + self._left_repay_principal = left_repay_principal + + @property + def left_repay_interest(self): + """Gets the left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 + + outstanding interest # noqa: E501 + + :return: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._left_repay_interest + + @left_repay_interest.setter + def left_repay_interest(self, left_repay_interest): + """Sets the left_repay_interest of this BorrowCurrencyInfo. + + outstanding interest # noqa: E501 + + :param left_repay_interest: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 + :type: str + """ + + self._left_repay_interest = left_repay_interest + + @property + def left_repay_usdt(self): + """Gets the left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 + + Value of left total repayments amount in USDT # noqa: E501 + + :return: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._left_repay_usdt + + @left_repay_usdt.setter + def left_repay_usdt(self, left_repay_usdt): + """Sets the left_repay_usdt of this BorrowCurrencyInfo. + + Value of left total repayments amount in USDT # noqa: E501 + + :param left_repay_usdt: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 + :type: str + """ + + self._left_repay_usdt = left_repay_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BorrowCurrencyInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BorrowCurrencyInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py new file mode 100644 index 0000000..e6f2d36 --- /dev/null +++ b/gate_api/models/broker_commission.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BrokerCommission(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total': 'int', + 'list': 'list[BrokerCommission1]' + } + + attribute_map = { + 'total': 'total', + 'list': 'list' + } + + def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[BrokerCommission1], Configuration) -> None + """BrokerCommission - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._total = None + self._list = None + self.discriminator = None + + if total is not None: + self.total = total + if list is not None: + self.list = list + + @property + def total(self): + """Gets the total of this BrokerCommission. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this BrokerCommission. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this BrokerCommission. + + Total # noqa: E501 + + :param total: The total of this BrokerCommission. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this BrokerCommission. # noqa: E501 + + List of comission history # noqa: E501 + + :return: The list of this BrokerCommission. # noqa: E501 + :rtype: list[BrokerCommission1] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this BrokerCommission. + + List of comission history # noqa: E501 + + :param list: The list of this BrokerCommission. # noqa: E501 + :type: list[BrokerCommission1] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BrokerCommission): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BrokerCommission): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py new file mode 100644 index 0000000..3c60c83 --- /dev/null +++ b/gate_api/models/broker_commission1.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BrokerCommission1(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'commission_time': 'int', + 'user_id': 'int', + 'group_name': 'str', + 'amount': 'str', + 'fee': 'str', + 'fee_asset': 'str', + 'rebate_fee': 'str', + 'source': 'str', + 'currency_pair': 'str' + } + + attribute_map = { + 'commission_time': 'commission_time', + 'user_id': 'user_id', + 'group_name': 'group_name', + 'amount': 'amount', + 'fee': 'fee', + 'fee_asset': 'fee_asset', + 'rebate_fee': 'rebate_fee', + 'source': 'source', + 'currency_pair': 'currency_pair' + } + + def __init__(self, commission_time=None, user_id=None, group_name=None, amount=None, fee=None, fee_asset=None, rebate_fee=None, source=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, Configuration) -> None + """BrokerCommission1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._commission_time = None + self._user_id = None + self._group_name = None + self._amount = None + self._fee = None + self._fee_asset = None + self._rebate_fee = None + self._source = None + self._currency_pair = None + self.discriminator = None + + if commission_time is not None: + self.commission_time = commission_time + if user_id is not None: + self.user_id = user_id + if group_name is not None: + self.group_name = group_name + if amount is not None: + self.amount = amount + if fee is not None: + self.fee = fee + if fee_asset is not None: + self.fee_asset = fee_asset + if rebate_fee is not None: + self.rebate_fee = rebate_fee + if source is not None: + self.source = source + if currency_pair is not None: + self.currency_pair = currency_pair + + @property + def commission_time(self): + """Gets the commission_time of this BrokerCommission1. # noqa: E501 + + Commission Time. (unix timestamp) # noqa: E501 + + :return: The commission_time of this BrokerCommission1. # noqa: E501 + :rtype: int + """ + return self._commission_time + + @commission_time.setter + def commission_time(self, commission_time): + """Sets the commission_time of this BrokerCommission1. + + Commission Time. (unix timestamp) # noqa: E501 + + :param commission_time: The commission_time of this BrokerCommission1. # noqa: E501 + :type: int + """ + + self._commission_time = commission_time + + @property + def user_id(self): + """Gets the user_id of this BrokerCommission1. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this BrokerCommission1. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this BrokerCommission1. + + User ID # noqa: E501 + + :param user_id: The user_id of this BrokerCommission1. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def group_name(self): + """Gets the group_name of this BrokerCommission1. # noqa: E501 + + Group name # noqa: E501 + + :return: The group_name of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._group_name + + @group_name.setter + def group_name(self, group_name): + """Sets the group_name of this BrokerCommission1. + + Group name # noqa: E501 + + :param group_name: The group_name of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._group_name = group_name + + @property + def amount(self): + """Gets the amount of this BrokerCommission1. # noqa: E501 + + The amount of commission rebates # noqa: E501 + + :return: The amount of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this BrokerCommission1. + + The amount of commission rebates # noqa: E501 + + :param amount: The amount of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def fee(self): + """Gets the fee of this BrokerCommission1. # noqa: E501 + + Fee # noqa: E501 + + :return: The fee of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this BrokerCommission1. + + Fee # noqa: E501 + + :param fee: The fee of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def fee_asset(self): + """Gets the fee_asset of this BrokerCommission1. # noqa: E501 + + Fee currency # noqa: E501 + + :return: The fee_asset of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._fee_asset + + @fee_asset.setter + def fee_asset(self, fee_asset): + """Sets the fee_asset of this BrokerCommission1. + + Fee currency # noqa: E501 + + :param fee_asset: The fee_asset of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._fee_asset = fee_asset + + @property + def rebate_fee(self): + """Gets the rebate_fee of this BrokerCommission1. # noqa: E501 + + The income from rebates, converted to USDT # noqa: E501 + + :return: The rebate_fee of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._rebate_fee + + @rebate_fee.setter + def rebate_fee(self, rebate_fee): + """Sets the rebate_fee of this BrokerCommission1. + + The income from rebates, converted to USDT # noqa: E501 + + :param rebate_fee: The rebate_fee of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._rebate_fee = rebate_fee + + @property + def source(self): + """Gets the source of this BrokerCommission1. # noqa: E501 + + Rebate Type: Spot、Futures、Options # noqa: E501 + + :return: The source of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this BrokerCommission1. + + Rebate Type: Spot、Futures、Options # noqa: E501 + + :param source: The source of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._source = source + + @property + def currency_pair(self): + """Gets the currency_pair of this BrokerCommission1. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this BrokerCommission1. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BrokerCommission1): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BrokerCommission1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py new file mode 100644 index 0000000..96ce328 --- /dev/null +++ b/gate_api/models/broker_transaction.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BrokerTransaction(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total': 'int', + 'list': 'list[BrokerTransaction1]' + } + + attribute_map = { + 'total': 'total', + 'list': 'list' + } + + def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[BrokerTransaction1], Configuration) -> None + """BrokerTransaction - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._total = None + self._list = None + self.discriminator = None + + if total is not None: + self.total = total + if list is not None: + self.list = list + + @property + def total(self): + """Gets the total of this BrokerTransaction. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this BrokerTransaction. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this BrokerTransaction. + + Total # noqa: E501 + + :param total: The total of this BrokerTransaction. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this BrokerTransaction. # noqa: E501 + + List of transaction history # noqa: E501 + + :return: The list of this BrokerTransaction. # noqa: E501 + :rtype: list[BrokerTransaction1] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this BrokerTransaction. + + List of transaction history # noqa: E501 + + :param list: The list of this BrokerTransaction. # noqa: E501 + :type: list[BrokerTransaction1] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BrokerTransaction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BrokerTransaction): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py new file mode 100644 index 0000000..3e507d1 --- /dev/null +++ b/gate_api/models/broker_transaction1.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BrokerTransaction1(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'transaction_time': 'int', + 'user_id': 'int', + 'group_name': 'str', + 'fee': 'str', + 'currency_pair': 'str', + 'amount': 'str', + 'fee_asset': 'str', + 'source': 'str' + } + + attribute_map = { + 'transaction_time': 'transaction_time', + 'user_id': 'user_id', + 'group_name': 'group_name', + 'fee': 'fee', + 'currency_pair': 'currency_pair', + 'amount': 'amount', + 'fee_asset': 'fee_asset', + 'source': 'source' + } + + def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, currency_pair=None, amount=None, fee_asset=None, source=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, Configuration) -> None + """BrokerTransaction1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._transaction_time = None + self._user_id = None + self._group_name = None + self._fee = None + self._currency_pair = None + self._amount = None + self._fee_asset = None + self._source = None + self.discriminator = None + + if transaction_time is not None: + self.transaction_time = transaction_time + if user_id is not None: + self.user_id = user_id + if group_name is not None: + self.group_name = group_name + if fee is not None: + self.fee = fee + if currency_pair is not None: + self.currency_pair = currency_pair + if amount is not None: + self.amount = amount + if fee_asset is not None: + self.fee_asset = fee_asset + if source is not None: + self.source = source + + @property + def transaction_time(self): + """Gets the transaction_time of this BrokerTransaction1. # noqa: E501 + + Transaction Time. (unix timestamp) # noqa: E501 + + :return: The transaction_time of this BrokerTransaction1. # noqa: E501 + :rtype: int + """ + return self._transaction_time + + @transaction_time.setter + def transaction_time(self, transaction_time): + """Sets the transaction_time of this BrokerTransaction1. + + Transaction Time. (unix timestamp) # noqa: E501 + + :param transaction_time: The transaction_time of this BrokerTransaction1. # noqa: E501 + :type: int + """ + + self._transaction_time = transaction_time + + @property + def user_id(self): + """Gets the user_id of this BrokerTransaction1. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this BrokerTransaction1. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this BrokerTransaction1. + + User ID # noqa: E501 + + :param user_id: The user_id of this BrokerTransaction1. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def group_name(self): + """Gets the group_name of this BrokerTransaction1. # noqa: E501 + + Group name # noqa: E501 + + :return: The group_name of this BrokerTransaction1. # noqa: E501 + :rtype: str + """ + return self._group_name + + @group_name.setter + def group_name(self, group_name): + """Sets the group_name of this BrokerTransaction1. + + Group name # noqa: E501 + + :param group_name: The group_name of this BrokerTransaction1. # noqa: E501 + :type: str + """ + + self._group_name = group_name + + @property + def fee(self): + """Gets the fee of this BrokerTransaction1. # noqa: E501 + + fee (usdt) # noqa: E501 + + :return: The fee of this BrokerTransaction1. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this BrokerTransaction1. + + fee (usdt) # noqa: E501 + + :param fee: The fee of this BrokerTransaction1. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def currency_pair(self): + """Gets the currency_pair of this BrokerTransaction1. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this BrokerTransaction1. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this BrokerTransaction1. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this BrokerTransaction1. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def amount(self): + """Gets the amount of this BrokerTransaction1. # noqa: E501 + + Commission Amount # noqa: E501 + + :return: The amount of this BrokerTransaction1. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this BrokerTransaction1. + + Commission Amount # noqa: E501 + + :param amount: The amount of this BrokerTransaction1. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def fee_asset(self): + """Gets the fee_asset of this BrokerTransaction1. # noqa: E501 + + Fee currency # noqa: E501 + + :return: The fee_asset of this BrokerTransaction1. # noqa: E501 + :rtype: str + """ + return self._fee_asset + + @fee_asset.setter + def fee_asset(self, fee_asset): + """Sets the fee_asset of this BrokerTransaction1. + + Fee currency # noqa: E501 + + :param fee_asset: The fee_asset of this BrokerTransaction1. # noqa: E501 + :type: str + """ + + self._fee_asset = fee_asset + + @property + def source(self): + """Gets the source of this BrokerTransaction1. # noqa: E501 + + Rebate Type: Spot、Futures、Options # noqa: E501 + + :return: The source of this BrokerTransaction1. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this BrokerTransaction1. + + Rebate Type: Spot、Futures、Options # noqa: E501 + + :param source: The source of this BrokerTransaction1. # noqa: E501 + :type: str + """ + + self._source = source + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BrokerTransaction1): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BrokerTransaction1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py new file mode 100644 index 0000000..d8e5f13 --- /dev/null +++ b/gate_api/models/cancel_batch_order.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CancelBatchOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency_pair': 'str', + 'id': 'str', + 'account': 'str', + 'action_mode': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'id': 'id', + 'account': 'account', + 'action_mode': 'action_mode' + } + + def __init__(self, currency_pair=None, id=None, account=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """CancelBatchOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._id = None + self._account = None + self._action_mode = None + self.discriminator = None + + self.currency_pair = currency_pair + self.id = id + if account is not None: + self.account = account + if action_mode is not None: + self.action_mode = action_mode + + @property + def currency_pair(self): + """Gets the currency_pair of this CancelBatchOrder. # noqa: E501 + + Order currency pair # noqa: E501 + + :return: The currency_pair of this CancelBatchOrder. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this CancelBatchOrder. + + Order currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this CancelBatchOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 + raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 + + self._currency_pair = currency_pair + + @property + def id(self): + """Gets the id of this CancelBatchOrder. # noqa: E501 + + Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation # noqa: E501 + + :return: The id of this CancelBatchOrder. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CancelBatchOrder. + + Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation # noqa: E501 + + :param id: The id of this CancelBatchOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def account(self): + """Gets the account of this CancelBatchOrder. # noqa: E501 + + If the canceled order is a unified account apikey, this field must be specified and set to `unified` # noqa: E501 + + :return: The account of this CancelBatchOrder. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this CancelBatchOrder. + + If the canceled order is a unified account apikey, this field must be specified and set to `unified` # noqa: E501 + + :param account: The account of this CancelBatchOrder. # noqa: E501 + :type: str + """ + + self._account = account + + @property + def action_mode(self): + """Gets the action_mode of this CancelBatchOrder. # noqa: E501 + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :return: The action_mode of this CancelBatchOrder. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this CancelBatchOrder. + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :param action_mode: The action_mode of this CancelBatchOrder. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CancelBatchOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CancelBatchOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py new file mode 100644 index 0000000..d4be89f --- /dev/null +++ b/gate_api/models/cancel_order_result.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CancelOrderResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency_pair': 'str', + 'id': 'str', + 'text': 'str', + 'succeeded': 'bool', + 'label': 'str', + 'message': 'str', + 'account': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'id': 'id', + 'text': 'text', + 'succeeded': 'succeeded', + 'label': 'label', + 'message': 'message', + 'account': 'account' + } + + def __init__(self, currency_pair=None, id=None, text=None, succeeded=None, label=None, message=None, account=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, str, str, str, Configuration) -> None + """CancelOrderResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._id = None + self._text = None + self._succeeded = None + self._label = None + self._message = None + self._account = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if id is not None: + self.id = id + if text is not None: + self.text = text + if succeeded is not None: + self.succeeded = succeeded + if label is not None: + self.label = label + if message is not None: + self.message = message + if account is not None: + self.account = account + + @property + def currency_pair(self): + """Gets the currency_pair of this CancelOrderResult. # noqa: E501 + + Order currency pair # noqa: E501 + + :return: The currency_pair of this CancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this CancelOrderResult. + + Order currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this CancelOrderResult. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def id(self): + """Gets the id of this CancelOrderResult. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this CancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CancelOrderResult. + + Order ID # noqa: E501 + + :param id: The id of this CancelOrderResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def text(self): + """Gets the text of this CancelOrderResult. # noqa: E501 + + Custom order information # noqa: E501 + + :return: The text of this CancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this CancelOrderResult. + + Custom order information # noqa: E501 + + :param text: The text of this CancelOrderResult. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def succeeded(self): + """Gets the succeeded of this CancelOrderResult. # noqa: E501 + + Whether cancellation succeeded # noqa: E501 + + :return: The succeeded of this CancelOrderResult. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this CancelOrderResult. + + Whether cancellation succeeded # noqa: E501 + + :param succeeded: The succeeded of this CancelOrderResult. # noqa: E501 + :type: bool + """ + + self._succeeded = succeeded + + @property + def label(self): + """Gets the label of this CancelOrderResult. # noqa: E501 + + Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 + + :return: The label of this CancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this CancelOrderResult. + + Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 + + :param label: The label of this CancelOrderResult. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this CancelOrderResult. # noqa: E501 + + Error message when failed to cancel the order; empty if succeeded # noqa: E501 + + :return: The message of this CancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CancelOrderResult. + + Error message when failed to cancel the order; empty if succeeded # noqa: E501 + + :param message: The message of this CancelOrderResult. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def account(self): + """Gets the account of this CancelOrderResult. # noqa: E501 + + Default is empty (deprecated) # noqa: E501 + + :return: The account of this CancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this CancelOrderResult. + + Default is empty (deprecated) # noqa: E501 + + :param account: The account of this CancelOrderResult. # noqa: E501 + :type: str + """ + + self._account = account + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CancelOrderResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CancelOrderResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py new file mode 100644 index 0000000..3ed0b11 --- /dev/null +++ b/gate_api/models/collateral_adjust.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralAdjust(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'type': 'str', + 'collaterals': 'list[CollateralCurrency]' + } + + attribute_map = { + 'order_id': 'order_id', + 'type': 'type', + 'collaterals': 'collaterals' + } + + def __init__(self, order_id=None, type=None, collaterals=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, list[CollateralCurrency], Configuration) -> None + """CollateralAdjust - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._type = None + self._collaterals = None + self.discriminator = None + + self.order_id = order_id + self.type = type + if collaterals is not None: + self.collaterals = collaterals + + @property + def order_id(self): + """Gets the order_id of this CollateralAdjust. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this CollateralAdjust. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CollateralAdjust. + + Order ID # noqa: E501 + + :param order_id: The order_id of this CollateralAdjust. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 + raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 + + self._order_id = order_id + + @property + def type(self): + """Gets the type of this CollateralAdjust. # noqa: E501 + + Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + + :return: The type of this CollateralAdjust. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CollateralAdjust. + + Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + + :param type: The type of this CollateralAdjust. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def collaterals(self): + """Gets the collaterals of this CollateralAdjust. # noqa: E501 + + Collateral Currency List # noqa: E501 + + :return: The collaterals of this CollateralAdjust. # noqa: E501 + :rtype: list[CollateralCurrency] + """ + return self._collaterals + + @collaterals.setter + def collaterals(self, collaterals): + """Sets the collaterals of this CollateralAdjust. + + Collateral Currency List # noqa: E501 + + :param collaterals: The collaterals of this CollateralAdjust. # noqa: E501 + :type: list[CollateralCurrency] + """ + + self._collaterals = collaterals + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralAdjust): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralAdjust): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py new file mode 100644 index 0000000..4f0e933 --- /dev/null +++ b/gate_api/models/collateral_adjust_res.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralAdjustRes(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'collateral_currencies': 'list[CollateralCurrencyRes]' + } + + attribute_map = { + 'order_id': 'order_id', + 'collateral_currencies': 'collateral_currencies' + } + + def __init__(self, order_id=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[CollateralCurrencyRes], Configuration) -> None + """CollateralAdjustRes - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._collateral_currencies = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if collateral_currencies is not None: + self.collateral_currencies = collateral_currencies + + @property + def order_id(self): + """Gets the order_id of this CollateralAdjustRes. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this CollateralAdjustRes. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CollateralAdjustRes. + + Order ID # noqa: E501 + + :param order_id: The order_id of this CollateralAdjustRes. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def collateral_currencies(self): + """Gets the collateral_currencies of this CollateralAdjustRes. # noqa: E501 + + Collateral Currency Information # noqa: E501 + + :return: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 + :rtype: list[CollateralCurrencyRes] + """ + return self._collateral_currencies + + @collateral_currencies.setter + def collateral_currencies(self, collateral_currencies): + """Sets the collateral_currencies of this CollateralAdjustRes. + + Collateral Currency Information # noqa: E501 + + :param collateral_currencies: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 + :type: list[CollateralCurrencyRes] + """ + + self._collateral_currencies = collateral_currencies + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralAdjustRes): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralAdjustRes): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py new file mode 100644 index 0000000..3b77762 --- /dev/null +++ b/gate_api/models/collateral_align.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralAlign(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'collateral_currency': 'str', + 'collateral_amount': 'str', + 'type': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'collateral_currency': 'collateral_currency', + 'collateral_amount': 'collateral_amount', + 'type': 'type' + } + + def __init__(self, order_id=None, collateral_currency=None, collateral_amount=None, type=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, Configuration) -> None + """CollateralAlign - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._collateral_currency = None + self._collateral_amount = None + self._type = None + self.discriminator = None + + self.order_id = order_id + self.collateral_currency = collateral_currency + self.collateral_amount = collateral_amount + self.type = type + + @property + def order_id(self): + """Gets the order_id of this CollateralAlign. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this CollateralAlign. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CollateralAlign. + + Order ID # noqa: E501 + + :param order_id: The order_id of this CollateralAlign. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 + raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 + + self._order_id = order_id + + @property + def collateral_currency(self): + """Gets the collateral_currency of this CollateralAlign. # noqa: E501 + + Collateral # noqa: E501 + + :return: The collateral_currency of this CollateralAlign. # noqa: E501 + :rtype: str + """ + return self._collateral_currency + + @collateral_currency.setter + def collateral_currency(self, collateral_currency): + """Sets the collateral_currency of this CollateralAlign. + + Collateral # noqa: E501 + + :param collateral_currency: The collateral_currency of this CollateralAlign. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and collateral_currency is None: # noqa: E501 + raise ValueError("Invalid value for `collateral_currency`, must not be `None`") # noqa: E501 + + self._collateral_currency = collateral_currency + + @property + def collateral_amount(self): + """Gets the collateral_amount of this CollateralAlign. # noqa: E501 + + Collateral amount # noqa: E501 + + :return: The collateral_amount of this CollateralAlign. # noqa: E501 + :rtype: str + """ + return self._collateral_amount + + @collateral_amount.setter + def collateral_amount(self, collateral_amount): + """Sets the collateral_amount of this CollateralAlign. + + Collateral amount # noqa: E501 + + :param collateral_amount: The collateral_amount of this CollateralAlign. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and collateral_amount is None: # noqa: E501 + raise ValueError("Invalid value for `collateral_amount`, must not be `None`") # noqa: E501 + + self._collateral_amount = collateral_amount + + @property + def type(self): + """Gets the type of this CollateralAlign. # noqa: E501 + + Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + + :return: The type of this CollateralAlign. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CollateralAlign. + + Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + + :param type: The type of this CollateralAlign. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralAlign): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralAlign): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py new file mode 100644 index 0000000..47f69b4 --- /dev/null +++ b/gate_api/models/collateral_currency.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CollateralCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + + @property + def currency(self): + """Gets the currency of this CollateralCurrency. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this CollateralCurrency. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CollateralCurrency. + + Currency # noqa: E501 + + :param currency: The currency of this CollateralCurrency. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this CollateralCurrency. # noqa: E501 + + Size # noqa: E501 + + :return: The amount of this CollateralCurrency. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CollateralCurrency. + + Size # noqa: E501 + + :param amount: The amount of this CollateralCurrency. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py new file mode 100644 index 0000000..2671b11 --- /dev/null +++ b/gate_api/models/collateral_currency_info.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralCurrencyInfo(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'left_collateral': 'str', + 'left_collateral_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'left_collateral': 'left_collateral', + 'left_collateral_usdt': 'left_collateral_usdt' + } + + def __init__(self, currency=None, index_price=None, left_collateral=None, left_collateral_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """CollateralCurrencyInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._left_collateral = None + self._left_collateral_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if left_collateral is not None: + self.left_collateral = left_collateral + if left_collateral_usdt is not None: + self.left_collateral_usdt = left_collateral_usdt + + @property + def currency(self): + """Gets the currency of this CollateralCurrencyInfo. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this CollateralCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CollateralCurrencyInfo. + + Currency # noqa: E501 + + :param currency: The currency of this CollateralCurrencyInfo. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this CollateralCurrencyInfo. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this CollateralCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this CollateralCurrencyInfo. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this CollateralCurrencyInfo. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def left_collateral(self): + """Gets the left_collateral of this CollateralCurrencyInfo. # noqa: E501 + + Left Collateral Amount # noqa: E501 + + :return: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._left_collateral + + @left_collateral.setter + def left_collateral(self, left_collateral): + """Sets the left_collateral of this CollateralCurrencyInfo. + + Left Collateral Amount # noqa: E501 + + :param left_collateral: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 + :type: str + """ + + self._left_collateral = left_collateral + + @property + def left_collateral_usdt(self): + """Gets the left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 + + Value of left collateral amount in USDT # noqa: E501 + + :return: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 + :rtype: str + """ + return self._left_collateral_usdt + + @left_collateral_usdt.setter + def left_collateral_usdt(self, left_collateral_usdt): + """Sets the left_collateral_usdt of this CollateralCurrencyInfo. + + Value of left collateral amount in USDT # noqa: E501 + + :param left_collateral_usdt: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 + :type: str + """ + + self._left_collateral_usdt = left_collateral_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralCurrencyInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralCurrencyInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py new file mode 100644 index 0000000..585b8a6 --- /dev/null +++ b/gate_api/models/collateral_currency_res.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralCurrencyRes(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'succeeded': 'bool', + 'label': 'str', + 'message': 'str', + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'succeeded': 'succeeded', + 'label': 'label', + 'message': 'message', + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, succeeded=None, label=None, message=None, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, str, str, str, str, Configuration) -> None + """CollateralCurrencyRes - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._succeeded = None + self._label = None + self._message = None + self._currency = None + self._amount = None + self.discriminator = None + + if succeeded is not None: + self.succeeded = succeeded + if label is not None: + self.label = label + if message is not None: + self.message = message + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + + @property + def succeeded(self): + """Gets the succeeded of this CollateralCurrencyRes. # noqa: E501 + + Update success status # noqa: E501 + + :return: The succeeded of this CollateralCurrencyRes. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this CollateralCurrencyRes. + + Update success status # noqa: E501 + + :param succeeded: The succeeded of this CollateralCurrencyRes. # noqa: E501 + :type: bool + """ + + self._succeeded = succeeded + + @property + def label(self): + """Gets the label of this CollateralCurrencyRes. # noqa: E501 + + Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + + :return: The label of this CollateralCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this CollateralCurrencyRes. + + Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + + :param label: The label of this CollateralCurrencyRes. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this CollateralCurrencyRes. # noqa: E501 + + Error description in case of operation failure; empty when successful. # noqa: E501 + + :return: The message of this CollateralCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CollateralCurrencyRes. + + Error description in case of operation failure; empty when successful. # noqa: E501 + + :param message: The message of this CollateralCurrencyRes. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def currency(self): + """Gets the currency of this CollateralCurrencyRes. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this CollateralCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CollateralCurrencyRes. + + Currency # noqa: E501 + + :param currency: The currency of this CollateralCurrencyRes. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this CollateralCurrencyRes. # noqa: E501 + + Quantity of successful collateral operation; 0 if the operation fails. # noqa: E501 + + :return: The amount of this CollateralCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CollateralCurrencyRes. + + Quantity of successful collateral operation; 0 if the operation fails. # noqa: E501 + + :param amount: The amount of this CollateralCurrencyRes. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralCurrencyRes): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralCurrencyRes): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py new file mode 100644 index 0000000..0031fc0 --- /dev/null +++ b/gate_api/models/collateral_current_rate.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralCurrentRate(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'current_rate': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'current_rate': 'current_rate' + } + + def __init__(self, currency=None, current_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CollateralCurrentRate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._current_rate = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if current_rate is not None: + self.current_rate = current_rate + + @property + def currency(self): + """Gets the currency of this CollateralCurrentRate. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this CollateralCurrentRate. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CollateralCurrentRate. + + Currency # noqa: E501 + + :param currency: The currency of this CollateralCurrentRate. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def current_rate(self): + """Gets the current_rate of this CollateralCurrentRate. # noqa: E501 + + Currency current interest rate # noqa: E501 + + :return: The current_rate of this CollateralCurrentRate. # noqa: E501 + :rtype: str + """ + return self._current_rate + + @current_rate.setter + def current_rate(self, current_rate): + """Sets the current_rate of this CollateralCurrentRate. + + Currency current interest rate # noqa: E501 + + :param current_rate: The current_rate of this CollateralCurrentRate. # noqa: E501 + :type: str + """ + + self._current_rate = current_rate + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralCurrentRate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralCurrentRate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py new file mode 100644 index 0000000..f11afc2 --- /dev/null +++ b/gate_api/models/collateral_fix_rate.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralFixRate(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'rate_7d': 'str', + 'rate_30d': 'str', + 'update_time': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'rate_7d': 'rate_7d', + 'rate_30d': 'rate_30d', + 'update_time': 'update_time' + } + + def __init__(self, currency=None, rate_7d=None, rate_30d=None, update_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, Configuration) -> None + """CollateralFixRate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._rate_7d = None + self._rate_30d = None + self._update_time = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if rate_7d is not None: + self.rate_7d = rate_7d + if rate_30d is not None: + self.rate_30d = rate_30d + if update_time is not None: + self.update_time = update_time + + @property + def currency(self): + """Gets the currency of this CollateralFixRate. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this CollateralFixRate. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CollateralFixRate. + + Currency # noqa: E501 + + :param currency: The currency of this CollateralFixRate. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def rate_7d(self): + """Gets the rate_7d of this CollateralFixRate. # noqa: E501 + + Fixed interest rate for a lending period of 7 days # noqa: E501 + + :return: The rate_7d of this CollateralFixRate. # noqa: E501 + :rtype: str + """ + return self._rate_7d + + @rate_7d.setter + def rate_7d(self, rate_7d): + """Sets the rate_7d of this CollateralFixRate. + + Fixed interest rate for a lending period of 7 days # noqa: E501 + + :param rate_7d: The rate_7d of this CollateralFixRate. # noqa: E501 + :type: str + """ + + self._rate_7d = rate_7d + + @property + def rate_30d(self): + """Gets the rate_30d of this CollateralFixRate. # noqa: E501 + + Fixed interest rate for a lending period of 30 days # noqa: E501 + + :return: The rate_30d of this CollateralFixRate. # noqa: E501 + :rtype: str + """ + return self._rate_30d + + @rate_30d.setter + def rate_30d(self, rate_30d): + """Sets the rate_30d of this CollateralFixRate. + + Fixed interest rate for a lending period of 30 days # noqa: E501 + + :param rate_30d: The rate_30d of this CollateralFixRate. # noqa: E501 + :type: str + """ + + self._rate_30d = rate_30d + + @property + def update_time(self): + """Gets the update_time of this CollateralFixRate. # noqa: E501 + + Update time, timestamp, unit in seconds # noqa: E501 + + :return: The update_time of this CollateralFixRate. # noqa: E501 + :rtype: int + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this CollateralFixRate. + + Update time, timestamp, unit in seconds # noqa: E501 + + :param update_time: The update_time of this CollateralFixRate. # noqa: E501 + :type: int + """ + + self._update_time = update_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralFixRate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralFixRate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py new file mode 100644 index 0000000..90120f4 --- /dev/null +++ b/gate_api/models/collateral_loan_currency.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralLoanCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'loan_currency': 'str', + 'collateral_currency': 'list[str]' + } + + attribute_map = { + 'loan_currency': 'loan_currency', + 'collateral_currency': 'collateral_currency' + } + + def __init__(self, loan_currency=None, collateral_currency=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[str], Configuration) -> None + """CollateralLoanCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._loan_currency = None + self._collateral_currency = None + self.discriminator = None + + if loan_currency is not None: + self.loan_currency = loan_currency + if collateral_currency is not None: + self.collateral_currency = collateral_currency + + @property + def loan_currency(self): + """Gets the loan_currency of this CollateralLoanCurrency. # noqa: E501 + + Borrowed currency # noqa: E501 + + :return: The loan_currency of this CollateralLoanCurrency. # noqa: E501 + :rtype: str + """ + return self._loan_currency + + @loan_currency.setter + def loan_currency(self, loan_currency): + """Sets the loan_currency of this CollateralLoanCurrency. + + Borrowed currency # noqa: E501 + + :param loan_currency: The loan_currency of this CollateralLoanCurrency. # noqa: E501 + :type: str + """ + + self._loan_currency = loan_currency + + @property + def collateral_currency(self): + """Gets the collateral_currency of this CollateralLoanCurrency. # noqa: E501 + + List of supported collateral currencies # noqa: E501 + + :return: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 + :rtype: list[str] + """ + return self._collateral_currency + + @collateral_currency.setter + def collateral_currency(self, collateral_currency): + """Sets the collateral_currency of this CollateralLoanCurrency. + + List of supported collateral currencies # noqa: E501 + + :param collateral_currency: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 + :type: list[str] + """ + + self._collateral_currency = collateral_currency + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralLoanCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralLoanCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py new file mode 100644 index 0000000..daee385 --- /dev/null +++ b/gate_api/models/collateral_ltv.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralLtv(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'init_ltv': 'str', + 'alert_ltv': 'str', + 'liquidate_ltv': 'str' + } + + attribute_map = { + 'init_ltv': 'init_ltv', + 'alert_ltv': 'alert_ltv', + 'liquidate_ltv': 'liquidate_ltv' + } + + def __init__(self, init_ltv=None, alert_ltv=None, liquidate_ltv=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """CollateralLtv - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._init_ltv = None + self._alert_ltv = None + self._liquidate_ltv = None + self.discriminator = None + + if init_ltv is not None: + self.init_ltv = init_ltv + if alert_ltv is not None: + self.alert_ltv = alert_ltv + if liquidate_ltv is not None: + self.liquidate_ltv = liquidate_ltv + + @property + def init_ltv(self): + """Gets the init_ltv of this CollateralLtv. # noqa: E501 + + The initial collateralization rate # noqa: E501 + + :return: The init_ltv of this CollateralLtv. # noqa: E501 + :rtype: str + """ + return self._init_ltv + + @init_ltv.setter + def init_ltv(self, init_ltv): + """Sets the init_ltv of this CollateralLtv. + + The initial collateralization rate # noqa: E501 + + :param init_ltv: The init_ltv of this CollateralLtv. # noqa: E501 + :type: str + """ + + self._init_ltv = init_ltv + + @property + def alert_ltv(self): + """Gets the alert_ltv of this CollateralLtv. # noqa: E501 + + Warning collateralization ratio # noqa: E501 + + :return: The alert_ltv of this CollateralLtv. # noqa: E501 + :rtype: str + """ + return self._alert_ltv + + @alert_ltv.setter + def alert_ltv(self, alert_ltv): + """Sets the alert_ltv of this CollateralLtv. + + Warning collateralization ratio # noqa: E501 + + :param alert_ltv: The alert_ltv of this CollateralLtv. # noqa: E501 + :type: str + """ + + self._alert_ltv = alert_ltv + + @property + def liquidate_ltv(self): + """Gets the liquidate_ltv of this CollateralLtv. # noqa: E501 + + The liquidation collateralization rate # noqa: E501 + + :return: The liquidate_ltv of this CollateralLtv. # noqa: E501 + :rtype: str + """ + return self._liquidate_ltv + + @liquidate_ltv.setter + def liquidate_ltv(self, liquidate_ltv): + """Sets the liquidate_ltv of this CollateralLtv. + + The liquidation collateralization rate # noqa: E501 + + :param liquidate_ltv: The liquidate_ltv of this CollateralLtv. # noqa: E501 + :type: str + """ + + self._liquidate_ltv = liquidate_ltv + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralLtv): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralLtv): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py new file mode 100644 index 0000000..da2b478 --- /dev/null +++ b/gate_api/models/collateral_order.py @@ -0,0 +1,543 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'collateral_currency': 'str', + 'collateral_amount': 'str', + 'borrow_currency': 'str', + 'borrow_amount': 'str', + 'repaid_amount': 'str', + 'repaid_principal': 'str', + 'repaid_interest': 'str', + 'init_ltv': 'str', + 'current_ltv': 'str', + 'liquidate_ltv': 'str', + 'status': 'str', + 'borrow_time': 'int', + 'left_repay_total': 'str', + 'left_repay_principal': 'str', + 'left_repay_interest': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'collateral_currency': 'collateral_currency', + 'collateral_amount': 'collateral_amount', + 'borrow_currency': 'borrow_currency', + 'borrow_amount': 'borrow_amount', + 'repaid_amount': 'repaid_amount', + 'repaid_principal': 'repaid_principal', + 'repaid_interest': 'repaid_interest', + 'init_ltv': 'init_ltv', + 'current_ltv': 'current_ltv', + 'liquidate_ltv': 'liquidate_ltv', + 'status': 'status', + 'borrow_time': 'borrow_time', + 'left_repay_total': 'left_repay_total', + 'left_repay_principal': 'left_repay_principal', + 'left_repay_interest': 'left_repay_interest' + } + + def __init__(self, order_id=None, collateral_currency=None, collateral_amount=None, borrow_currency=None, borrow_amount=None, repaid_amount=None, repaid_principal=None, repaid_interest=None, init_ltv=None, current_ltv=None, liquidate_ltv=None, status=None, borrow_time=None, left_repay_total=None, left_repay_principal=None, left_repay_interest=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, str, str, str, str, str, str, int, str, str, str, Configuration) -> None + """CollateralOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._collateral_currency = None + self._collateral_amount = None + self._borrow_currency = None + self._borrow_amount = None + self._repaid_amount = None + self._repaid_principal = None + self._repaid_interest = None + self._init_ltv = None + self._current_ltv = None + self._liquidate_ltv = None + self._status = None + self._borrow_time = None + self._left_repay_total = None + self._left_repay_principal = None + self._left_repay_interest = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if collateral_currency is not None: + self.collateral_currency = collateral_currency + if collateral_amount is not None: + self.collateral_amount = collateral_amount + if borrow_currency is not None: + self.borrow_currency = borrow_currency + if borrow_amount is not None: + self.borrow_amount = borrow_amount + if repaid_amount is not None: + self.repaid_amount = repaid_amount + if repaid_principal is not None: + self.repaid_principal = repaid_principal + if repaid_interest is not None: + self.repaid_interest = repaid_interest + if init_ltv is not None: + self.init_ltv = init_ltv + if current_ltv is not None: + self.current_ltv = current_ltv + if liquidate_ltv is not None: + self.liquidate_ltv = liquidate_ltv + if status is not None: + self.status = status + if borrow_time is not None: + self.borrow_time = borrow_time + if left_repay_total is not None: + self.left_repay_total = left_repay_total + if left_repay_principal is not None: + self.left_repay_principal = left_repay_principal + if left_repay_interest is not None: + self.left_repay_interest = left_repay_interest + + @property + def order_id(self): + """Gets the order_id of this CollateralOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this CollateralOrder. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CollateralOrder. + + Order ID # noqa: E501 + + :param order_id: The order_id of this CollateralOrder. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def collateral_currency(self): + """Gets the collateral_currency of this CollateralOrder. # noqa: E501 + + Collateral # noqa: E501 + + :return: The collateral_currency of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._collateral_currency + + @collateral_currency.setter + def collateral_currency(self, collateral_currency): + """Sets the collateral_currency of this CollateralOrder. + + Collateral # noqa: E501 + + :param collateral_currency: The collateral_currency of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._collateral_currency = collateral_currency + + @property + def collateral_amount(self): + """Gets the collateral_amount of this CollateralOrder. # noqa: E501 + + Collateral amount # noqa: E501 + + :return: The collateral_amount of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._collateral_amount + + @collateral_amount.setter + def collateral_amount(self, collateral_amount): + """Sets the collateral_amount of this CollateralOrder. + + Collateral amount # noqa: E501 + + :param collateral_amount: The collateral_amount of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._collateral_amount = collateral_amount + + @property + def borrow_currency(self): + """Gets the borrow_currency of this CollateralOrder. # noqa: E501 + + Borrowed currency # noqa: E501 + + :return: The borrow_currency of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._borrow_currency + + @borrow_currency.setter + def borrow_currency(self, borrow_currency): + """Sets the borrow_currency of this CollateralOrder. + + Borrowed currency # noqa: E501 + + :param borrow_currency: The borrow_currency of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._borrow_currency = borrow_currency + + @property + def borrow_amount(self): + """Gets the borrow_amount of this CollateralOrder. # noqa: E501 + + Borrowing amount # noqa: E501 + + :return: The borrow_amount of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._borrow_amount + + @borrow_amount.setter + def borrow_amount(self, borrow_amount): + """Sets the borrow_amount of this CollateralOrder. + + Borrowing amount # noqa: E501 + + :param borrow_amount: The borrow_amount of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._borrow_amount = borrow_amount + + @property + def repaid_amount(self): + """Gets the repaid_amount of this CollateralOrder. # noqa: E501 + + Repaid amount # noqa: E501 + + :return: The repaid_amount of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._repaid_amount + + @repaid_amount.setter + def repaid_amount(self, repaid_amount): + """Sets the repaid_amount of this CollateralOrder. + + Repaid amount # noqa: E501 + + :param repaid_amount: The repaid_amount of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._repaid_amount = repaid_amount + + @property + def repaid_principal(self): + """Gets the repaid_principal of this CollateralOrder. # noqa: E501 + + Repaid principal # noqa: E501 + + :return: The repaid_principal of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._repaid_principal + + @repaid_principal.setter + def repaid_principal(self, repaid_principal): + """Sets the repaid_principal of this CollateralOrder. + + Repaid principal # noqa: E501 + + :param repaid_principal: The repaid_principal of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._repaid_principal = repaid_principal + + @property + def repaid_interest(self): + """Gets the repaid_interest of this CollateralOrder. # noqa: E501 + + Repaid interest # noqa: E501 + + :return: The repaid_interest of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._repaid_interest + + @repaid_interest.setter + def repaid_interest(self, repaid_interest): + """Sets the repaid_interest of this CollateralOrder. + + Repaid interest # noqa: E501 + + :param repaid_interest: The repaid_interest of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._repaid_interest = repaid_interest + + @property + def init_ltv(self): + """Gets the init_ltv of this CollateralOrder. # noqa: E501 + + The initial collateralization rate # noqa: E501 + + :return: The init_ltv of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._init_ltv + + @init_ltv.setter + def init_ltv(self, init_ltv): + """Sets the init_ltv of this CollateralOrder. + + The initial collateralization rate # noqa: E501 + + :param init_ltv: The init_ltv of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._init_ltv = init_ltv + + @property + def current_ltv(self): + """Gets the current_ltv of this CollateralOrder. # noqa: E501 + + The current collateralization rate # noqa: E501 + + :return: The current_ltv of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._current_ltv + + @current_ltv.setter + def current_ltv(self, current_ltv): + """Sets the current_ltv of this CollateralOrder. + + The current collateralization rate # noqa: E501 + + :param current_ltv: The current_ltv of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._current_ltv = current_ltv + + @property + def liquidate_ltv(self): + """Gets the liquidate_ltv of this CollateralOrder. # noqa: E501 + + The liquidation collateralization rate # noqa: E501 + + :return: The liquidate_ltv of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._liquidate_ltv + + @liquidate_ltv.setter + def liquidate_ltv(self, liquidate_ltv): + """Sets the liquidate_ltv of this CollateralOrder. + + The liquidation collateralization rate # noqa: E501 + + :param liquidate_ltv: The liquidate_ltv of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._liquidate_ltv = liquidate_ltv + + @property + def status(self): + """Gets the status of this CollateralOrder. # noqa: E501 + + Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 + + :return: The status of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CollateralOrder. + + Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 + + :param status: The status of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def borrow_time(self): + """Gets the borrow_time of this CollateralOrder. # noqa: E501 + + Borrowing time, timestamp in seconds # noqa: E501 + + :return: The borrow_time of this CollateralOrder. # noqa: E501 + :rtype: int + """ + return self._borrow_time + + @borrow_time.setter + def borrow_time(self, borrow_time): + """Sets the borrow_time of this CollateralOrder. + + Borrowing time, timestamp in seconds # noqa: E501 + + :param borrow_time: The borrow_time of this CollateralOrder. # noqa: E501 + :type: int + """ + + self._borrow_time = borrow_time + + @property + def left_repay_total(self): + """Gets the left_repay_total of this CollateralOrder. # noqa: E501 + + Outstanding principal and interest (outstanding principal + outstanding interest) # noqa: E501 + + :return: The left_repay_total of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._left_repay_total + + @left_repay_total.setter + def left_repay_total(self, left_repay_total): + """Sets the left_repay_total of this CollateralOrder. + + Outstanding principal and interest (outstanding principal + outstanding interest) # noqa: E501 + + :param left_repay_total: The left_repay_total of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._left_repay_total = left_repay_total + + @property + def left_repay_principal(self): + """Gets the left_repay_principal of this CollateralOrder. # noqa: E501 + + outstanding principal # noqa: E501 + + :return: The left_repay_principal of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._left_repay_principal + + @left_repay_principal.setter + def left_repay_principal(self, left_repay_principal): + """Sets the left_repay_principal of this CollateralOrder. + + outstanding principal # noqa: E501 + + :param left_repay_principal: The left_repay_principal of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._left_repay_principal = left_repay_principal + + @property + def left_repay_interest(self): + """Gets the left_repay_interest of this CollateralOrder. # noqa: E501 + + outstanding interest # noqa: E501 + + :return: The left_repay_interest of this CollateralOrder. # noqa: E501 + :rtype: str + """ + return self._left_repay_interest + + @left_repay_interest.setter + def left_repay_interest(self, left_repay_interest): + """Sets the left_repay_interest of this CollateralOrder. + + outstanding interest # noqa: E501 + + :param left_repay_interest: The left_repay_interest of this CollateralOrder. # noqa: E501 + :type: str + """ + + self._left_repay_interest = left_repay_interest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollateralOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py new file mode 100644 index 0000000..36d8f8f --- /dev/null +++ b/gate_api/models/collateral_record.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CollateralRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'record_id': 'int', + 'borrow_currency': 'str', + 'borrow_amount': 'str', + 'collateral_currency': 'str', + 'before_collateral': 'str', + 'after_collateral': 'str', + 'before_ltv': 'str', + 'after_ltv': 'str', + 'operate_time': 'int' + } + + attribute_map = { + 'order_id': 'order_id', + 'record_id': 'record_id', + 'borrow_currency': 'borrow_currency', + 'borrow_amount': 'borrow_amount', + 'collateral_currency': 'collateral_currency', + 'before_collateral': 'before_collateral', + 'after_collateral': 'after_collateral', + 'before_ltv': 'before_ltv', + 'after_ltv': 'after_ltv', + 'operate_time': 'operate_time' + } + + def __init__(self, order_id=None, record_id=None, borrow_currency=None, borrow_amount=None, collateral_currency=None, before_collateral=None, after_collateral=None, before_ltv=None, after_ltv=None, operate_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, int, Configuration) -> None + """CollateralRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._record_id = None + self._borrow_currency = None + self._borrow_amount = None + self._collateral_currency = None + self._before_collateral = None + self._after_collateral = None + self._before_ltv = None + self._after_ltv = None + self._operate_time = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if record_id is not None: + self.record_id = record_id + if borrow_currency is not None: + self.borrow_currency = borrow_currency + if borrow_amount is not None: + self.borrow_amount = borrow_amount + if collateral_currency is not None: + self.collateral_currency = collateral_currency + if before_collateral is not None: + self.before_collateral = before_collateral + if after_collateral is not None: + self.after_collateral = after_collateral + if before_ltv is not None: + self.before_ltv = before_ltv + if after_ltv is not None: + self.after_ltv = after_ltv + if operate_time is not None: + self.operate_time = operate_time + + @property + def order_id(self): + """Gets the order_id of this CollateralRecord. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this CollateralRecord. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CollateralRecord. + + Order ID # noqa: E501 + + :param order_id: The order_id of this CollateralRecord. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def record_id(self): + """Gets the record_id of this CollateralRecord. # noqa: E501 + + Collateral record ID # noqa: E501 + + :return: The record_id of this CollateralRecord. # noqa: E501 + :rtype: int + """ + return self._record_id + + @record_id.setter + def record_id(self, record_id): + """Sets the record_id of this CollateralRecord. + + Collateral record ID # noqa: E501 + + :param record_id: The record_id of this CollateralRecord. # noqa: E501 + :type: int + """ + + self._record_id = record_id + + @property + def borrow_currency(self): + """Gets the borrow_currency of this CollateralRecord. # noqa: E501 + + Borrowed currency # noqa: E501 + + :return: The borrow_currency of this CollateralRecord. # noqa: E501 + :rtype: str + """ + return self._borrow_currency + + @borrow_currency.setter + def borrow_currency(self, borrow_currency): + """Sets the borrow_currency of this CollateralRecord. + + Borrowed currency # noqa: E501 + + :param borrow_currency: The borrow_currency of this CollateralRecord. # noqa: E501 + :type: str + """ + + self._borrow_currency = borrow_currency + + @property + def borrow_amount(self): + """Gets the borrow_amount of this CollateralRecord. # noqa: E501 + + Borrowing amount # noqa: E501 + + :return: The borrow_amount of this CollateralRecord. # noqa: E501 + :rtype: str + """ + return self._borrow_amount + + @borrow_amount.setter + def borrow_amount(self, borrow_amount): + """Sets the borrow_amount of this CollateralRecord. + + Borrowing amount # noqa: E501 + + :param borrow_amount: The borrow_amount of this CollateralRecord. # noqa: E501 + :type: str + """ + + self._borrow_amount = borrow_amount + + @property + def collateral_currency(self): + """Gets the collateral_currency of this CollateralRecord. # noqa: E501 + + Collateral # noqa: E501 + + :return: The collateral_currency of this CollateralRecord. # noqa: E501 + :rtype: str + """ + return self._collateral_currency + + @collateral_currency.setter + def collateral_currency(self, collateral_currency): + """Sets the collateral_currency of this CollateralRecord. + + Collateral # noqa: E501 + + :param collateral_currency: The collateral_currency of this CollateralRecord. # noqa: E501 + :type: str + """ + + self._collateral_currency = collateral_currency + + @property + def before_collateral(self): + """Gets the before_collateral of this CollateralRecord. # noqa: E501 + + The collateral amount before adjustment # noqa: E501 + + :return: The before_collateral of this CollateralRecord. # noqa: E501 + :rtype: str + """ + return self._before_collateral + + @before_collateral.setter + def before_collateral(self, before_collateral): + """Sets the before_collateral of this CollateralRecord. + + The collateral amount before adjustment # noqa: E501 + + :param before_collateral: The before_collateral of this CollateralRecord. # noqa: E501 + :type: str + """ + + self._before_collateral = before_collateral + + @property + def after_collateral(self): + """Gets the after_collateral of this CollateralRecord. # noqa: E501 + + The collateral amount after adjustment # noqa: E501 + + :return: The after_collateral of this CollateralRecord. # noqa: E501 + :rtype: str + """ + return self._after_collateral + + @after_collateral.setter + def after_collateral(self, after_collateral): + """Sets the after_collateral of this CollateralRecord. + + The collateral amount after adjustment # noqa: E501 + + :param after_collateral: The after_collateral of this CollateralRecord. # noqa: E501 + :type: str + """ + + self._after_collateral = after_collateral + + @property + def before_ltv(self): + """Gets the before_ltv of this CollateralRecord. # noqa: E501 + + The collateral ratio before adjustment # noqa: E501 + + :return: The before_ltv of this CollateralRecord. # noqa: E501 + :rtype: str + """ + return self._before_ltv + + @before_ltv.setter + def before_ltv(self, before_ltv): + """Sets the before_ltv of this CollateralRecord. + + The collateral ratio before adjustment # noqa: E501 + + :param before_ltv: The before_ltv of this CollateralRecord. # noqa: E501 + :type: str + """ + + self._before_ltv = before_ltv + + @property + def after_ltv(self): + """Gets the after_ltv of this CollateralRecord. # noqa: E501 + + The collateral ratio after adjustment # noqa: E501 + + :return: The after_ltv of this CollateralRecord. # noqa: E501 + :rtype: str + """ + return self._after_ltv + + @after_ltv.setter + def after_ltv(self, after_ltv): + """Sets the after_ltv of this CollateralRecord. + + The collateral ratio after adjustment # noqa: E501 + + :param after_ltv: The after_ltv of this CollateralRecord. # noqa: E501 + :type: str + """ + + self._after_ltv = after_ltv + + @property + def operate_time(self): + """Gets the operate_time of this CollateralRecord. # noqa: E501 + + Timestamp of the operation, in seconds # noqa: E501 + + :return: The operate_time of this CollateralRecord. # noqa: E501 + :rtype: int + """ + return self._operate_time + + @operate_time.setter + def operate_time(self, operate_time): + """Sets the operate_time of this CollateralRecord. + + Timestamp of the operation, in seconds # noqa: E501 + + :param operate_time: The operate_time of this CollateralRecord. # noqa: E501 + :type: int + """ + + self._operate_time = operate_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, CollateralRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CollateralRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py new file mode 100644 index 0000000..0af2632 --- /dev/null +++ b/gate_api/models/contract.py @@ -0,0 +1,1115 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Contract(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'type': 'str', + 'quanto_multiplier': 'str', + 'leverage_min': 'str', + 'leverage_max': 'str', + 'maintenance_rate': 'str', + 'mark_type': 'str', + 'mark_price': 'str', + 'index_price': 'str', + 'last_price': 'str', + 'maker_fee_rate': 'str', + 'taker_fee_rate': 'str', + 'order_price_round': 'str', + 'mark_price_round': 'str', + 'funding_rate': 'str', + 'funding_interval': 'int', + 'funding_next_apply': 'float', + 'risk_limit_base': 'str', + 'risk_limit_step': 'str', + 'risk_limit_max': 'str', + 'order_size_min': 'int', + 'order_size_max': 'int', + 'order_price_deviate': 'str', + 'ref_discount_rate': 'str', + 'ref_rebate_rate': 'str', + 'orderbook_id': 'int', + 'trade_id': 'int', + 'trade_size': 'int', + 'position_size': 'int', + 'config_change_time': 'float', + 'in_delisting': 'bool', + 'orders_limit': 'int', + 'enable_bonus': 'bool', + 'enable_credit': 'bool', + 'create_time': 'float', + 'funding_cap_ratio': 'str' + } + + attribute_map = { + 'name': 'name', + 'type': 'type', + 'quanto_multiplier': 'quanto_multiplier', + 'leverage_min': 'leverage_min', + 'leverage_max': 'leverage_max', + 'maintenance_rate': 'maintenance_rate', + 'mark_type': 'mark_type', + 'mark_price': 'mark_price', + 'index_price': 'index_price', + 'last_price': 'last_price', + 'maker_fee_rate': 'maker_fee_rate', + 'taker_fee_rate': 'taker_fee_rate', + 'order_price_round': 'order_price_round', + 'mark_price_round': 'mark_price_round', + 'funding_rate': 'funding_rate', + 'funding_interval': 'funding_interval', + 'funding_next_apply': 'funding_next_apply', + 'risk_limit_base': 'risk_limit_base', + 'risk_limit_step': 'risk_limit_step', + 'risk_limit_max': 'risk_limit_max', + 'order_size_min': 'order_size_min', + 'order_size_max': 'order_size_max', + 'order_price_deviate': 'order_price_deviate', + 'ref_discount_rate': 'ref_discount_rate', + 'ref_rebate_rate': 'ref_rebate_rate', + 'orderbook_id': 'orderbook_id', + 'trade_id': 'trade_id', + 'trade_size': 'trade_size', + 'position_size': 'position_size', + 'config_change_time': 'config_change_time', + 'in_delisting': 'in_delisting', + 'orders_limit': 'orders_limit', + 'enable_bonus': 'enable_bonus', + 'enable_credit': 'enable_credit', + 'create_time': 'create_time', + 'funding_cap_ratio': 'funding_cap_ratio' + } + + def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, funding_rate=None, funding_interval=None, funding_next_apply=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, enable_bonus=None, enable_credit=None, create_time=None, funding_cap_ratio=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, str, Configuration) -> None + """Contract - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._type = None + self._quanto_multiplier = None + self._leverage_min = None + self._leverage_max = None + self._maintenance_rate = None + self._mark_type = None + self._mark_price = None + self._index_price = None + self._last_price = None + self._maker_fee_rate = None + self._taker_fee_rate = None + self._order_price_round = None + self._mark_price_round = None + self._funding_rate = None + self._funding_interval = None + self._funding_next_apply = None + self._risk_limit_base = None + self._risk_limit_step = None + self._risk_limit_max = None + self._order_size_min = None + self._order_size_max = None + self._order_price_deviate = None + self._ref_discount_rate = None + self._ref_rebate_rate = None + self._orderbook_id = None + self._trade_id = None + self._trade_size = None + self._position_size = None + self._config_change_time = None + self._in_delisting = None + self._orders_limit = None + self._enable_bonus = None + self._enable_credit = None + self._create_time = None + self._funding_cap_ratio = None + self.discriminator = None + + if name is not None: + self.name = name + if type is not None: + self.type = type + if quanto_multiplier is not None: + self.quanto_multiplier = quanto_multiplier + if leverage_min is not None: + self.leverage_min = leverage_min + if leverage_max is not None: + self.leverage_max = leverage_max + if maintenance_rate is not None: + self.maintenance_rate = maintenance_rate + if mark_type is not None: + self.mark_type = mark_type + if mark_price is not None: + self.mark_price = mark_price + if index_price is not None: + self.index_price = index_price + if last_price is not None: + self.last_price = last_price + if maker_fee_rate is not None: + self.maker_fee_rate = maker_fee_rate + if taker_fee_rate is not None: + self.taker_fee_rate = taker_fee_rate + if order_price_round is not None: + self.order_price_round = order_price_round + if mark_price_round is not None: + self.mark_price_round = mark_price_round + if funding_rate is not None: + self.funding_rate = funding_rate + if funding_interval is not None: + self.funding_interval = funding_interval + if funding_next_apply is not None: + self.funding_next_apply = funding_next_apply + if risk_limit_base is not None: + self.risk_limit_base = risk_limit_base + if risk_limit_step is not None: + self.risk_limit_step = risk_limit_step + if risk_limit_max is not None: + self.risk_limit_max = risk_limit_max + if order_size_min is not None: + self.order_size_min = order_size_min + if order_size_max is not None: + self.order_size_max = order_size_max + if order_price_deviate is not None: + self.order_price_deviate = order_price_deviate + if ref_discount_rate is not None: + self.ref_discount_rate = ref_discount_rate + if ref_rebate_rate is not None: + self.ref_rebate_rate = ref_rebate_rate + if orderbook_id is not None: + self.orderbook_id = orderbook_id + if trade_id is not None: + self.trade_id = trade_id + if trade_size is not None: + self.trade_size = trade_size + if position_size is not None: + self.position_size = position_size + if config_change_time is not None: + self.config_change_time = config_change_time + if in_delisting is not None: + self.in_delisting = in_delisting + if orders_limit is not None: + self.orders_limit = orders_limit + if enable_bonus is not None: + self.enable_bonus = enable_bonus + if enable_credit is not None: + self.enable_credit = enable_credit + if create_time is not None: + self.create_time = create_time + if funding_cap_ratio is not None: + self.funding_cap_ratio = funding_cap_ratio + + @property + def name(self): + """Gets the name of this Contract. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The name of this Contract. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Contract. + + Futures contract # noqa: E501 + + :param name: The name of this Contract. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def type(self): + """Gets the type of this Contract. # noqa: E501 + + Futures contract type # noqa: E501 + + :return: The type of this Contract. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Contract. + + Futures contract type # noqa: E501 + + :param type: The type of this Contract. # noqa: E501 + :type: str + """ + allowed_values = ["inverse", "direct"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def quanto_multiplier(self): + """Gets the quanto_multiplier of this Contract. # noqa: E501 + + Multiplier used in converting from invoicing to settlement currency # noqa: E501 + + :return: The quanto_multiplier of this Contract. # noqa: E501 + :rtype: str + """ + return self._quanto_multiplier + + @quanto_multiplier.setter + def quanto_multiplier(self, quanto_multiplier): + """Sets the quanto_multiplier of this Contract. + + Multiplier used in converting from invoicing to settlement currency # noqa: E501 + + :param quanto_multiplier: The quanto_multiplier of this Contract. # noqa: E501 + :type: str + """ + + self._quanto_multiplier = quanto_multiplier + + @property + def leverage_min(self): + """Gets the leverage_min of this Contract. # noqa: E501 + + Minimum leverage # noqa: E501 + + :return: The leverage_min of this Contract. # noqa: E501 + :rtype: str + """ + return self._leverage_min + + @leverage_min.setter + def leverage_min(self, leverage_min): + """Sets the leverage_min of this Contract. + + Minimum leverage # noqa: E501 + + :param leverage_min: The leverage_min of this Contract. # noqa: E501 + :type: str + """ + + self._leverage_min = leverage_min + + @property + def leverage_max(self): + """Gets the leverage_max of this Contract. # noqa: E501 + + Maximum leverage # noqa: E501 + + :return: The leverage_max of this Contract. # noqa: E501 + :rtype: str + """ + return self._leverage_max + + @leverage_max.setter + def leverage_max(self, leverage_max): + """Sets the leverage_max of this Contract. + + Maximum leverage # noqa: E501 + + :param leverage_max: The leverage_max of this Contract. # noqa: E501 + :type: str + """ + + self._leverage_max = leverage_max + + @property + def maintenance_rate(self): + """Gets the maintenance_rate of this Contract. # noqa: E501 + + Maintenance rate of margin # noqa: E501 + + :return: The maintenance_rate of this Contract. # noqa: E501 + :rtype: str + """ + return self._maintenance_rate + + @maintenance_rate.setter + def maintenance_rate(self, maintenance_rate): + """Sets the maintenance_rate of this Contract. + + Maintenance rate of margin # noqa: E501 + + :param maintenance_rate: The maintenance_rate of this Contract. # noqa: E501 + :type: str + """ + + self._maintenance_rate = maintenance_rate + + @property + def mark_type(self): + """Gets the mark_type of this Contract. # noqa: E501 + + Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + + :return: The mark_type of this Contract. # noqa: E501 + :rtype: str + """ + return self._mark_type + + @mark_type.setter + def mark_type(self, mark_type): + """Sets the mark_type of this Contract. + + Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + + :param mark_type: The mark_type of this Contract. # noqa: E501 + :type: str + """ + allowed_values = ["internal", "index"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and mark_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `mark_type` ({0}), must be one of {1}" # noqa: E501 + .format(mark_type, allowed_values) + ) + + self._mark_type = mark_type + + @property + def mark_price(self): + """Gets the mark_price of this Contract. # noqa: E501 + + Current mark price # noqa: E501 + + :return: The mark_price of this Contract. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this Contract. + + Current mark price # noqa: E501 + + :param mark_price: The mark_price of this Contract. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def index_price(self): + """Gets the index_price of this Contract. # noqa: E501 + + Current index price # noqa: E501 + + :return: The index_price of this Contract. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this Contract. + + Current index price # noqa: E501 + + :param index_price: The index_price of this Contract. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def last_price(self): + """Gets the last_price of this Contract. # noqa: E501 + + Last trading price # noqa: E501 + + :return: The last_price of this Contract. # noqa: E501 + :rtype: str + """ + return self._last_price + + @last_price.setter + def last_price(self, last_price): + """Sets the last_price of this Contract. + + Last trading price # noqa: E501 + + :param last_price: The last_price of this Contract. # noqa: E501 + :type: str + """ + + self._last_price = last_price + + @property + def maker_fee_rate(self): + """Gets the maker_fee_rate of this Contract. # noqa: E501 + + Maker fee rate, where negative means rebate # noqa: E501 + + :return: The maker_fee_rate of this Contract. # noqa: E501 + :rtype: str + """ + return self._maker_fee_rate + + @maker_fee_rate.setter + def maker_fee_rate(self, maker_fee_rate): + """Sets the maker_fee_rate of this Contract. + + Maker fee rate, where negative means rebate # noqa: E501 + + :param maker_fee_rate: The maker_fee_rate of this Contract. # noqa: E501 + :type: str + """ + + self._maker_fee_rate = maker_fee_rate + + @property + def taker_fee_rate(self): + """Gets the taker_fee_rate of this Contract. # noqa: E501 + + Taker fee rate # noqa: E501 + + :return: The taker_fee_rate of this Contract. # noqa: E501 + :rtype: str + """ + return self._taker_fee_rate + + @taker_fee_rate.setter + def taker_fee_rate(self, taker_fee_rate): + """Sets the taker_fee_rate of this Contract. + + Taker fee rate # noqa: E501 + + :param taker_fee_rate: The taker_fee_rate of this Contract. # noqa: E501 + :type: str + """ + + self._taker_fee_rate = taker_fee_rate + + @property + def order_price_round(self): + """Gets the order_price_round of this Contract. # noqa: E501 + + Minimum order price increment # noqa: E501 + + :return: The order_price_round of this Contract. # noqa: E501 + :rtype: str + """ + return self._order_price_round + + @order_price_round.setter + def order_price_round(self, order_price_round): + """Sets the order_price_round of this Contract. + + Minimum order price increment # noqa: E501 + + :param order_price_round: The order_price_round of this Contract. # noqa: E501 + :type: str + """ + + self._order_price_round = order_price_round + + @property + def mark_price_round(self): + """Gets the mark_price_round of this Contract. # noqa: E501 + + Minimum mark price increment # noqa: E501 + + :return: The mark_price_round of this Contract. # noqa: E501 + :rtype: str + """ + return self._mark_price_round + + @mark_price_round.setter + def mark_price_round(self, mark_price_round): + """Sets the mark_price_round of this Contract. + + Minimum mark price increment # noqa: E501 + + :param mark_price_round: The mark_price_round of this Contract. # noqa: E501 + :type: str + """ + + self._mark_price_round = mark_price_round + + @property + def funding_rate(self): + """Gets the funding_rate of this Contract. # noqa: E501 + + Current funding rate # noqa: E501 + + :return: The funding_rate of this Contract. # noqa: E501 + :rtype: str + """ + return self._funding_rate + + @funding_rate.setter + def funding_rate(self, funding_rate): + """Sets the funding_rate of this Contract. + + Current funding rate # noqa: E501 + + :param funding_rate: The funding_rate of this Contract. # noqa: E501 + :type: str + """ + + self._funding_rate = funding_rate + + @property + def funding_interval(self): + """Gets the funding_interval of this Contract. # noqa: E501 + + Funding application interval, unit in seconds # noqa: E501 + + :return: The funding_interval of this Contract. # noqa: E501 + :rtype: int + """ + return self._funding_interval + + @funding_interval.setter + def funding_interval(self, funding_interval): + """Sets the funding_interval of this Contract. + + Funding application interval, unit in seconds # noqa: E501 + + :param funding_interval: The funding_interval of this Contract. # noqa: E501 + :type: int + """ + + self._funding_interval = funding_interval + + @property + def funding_next_apply(self): + """Gets the funding_next_apply of this Contract. # noqa: E501 + + Next funding time # noqa: E501 + + :return: The funding_next_apply of this Contract. # noqa: E501 + :rtype: float + """ + return self._funding_next_apply + + @funding_next_apply.setter + def funding_next_apply(self, funding_next_apply): + """Sets the funding_next_apply of this Contract. + + Next funding time # noqa: E501 + + :param funding_next_apply: The funding_next_apply of this Contract. # noqa: E501 + :type: float + """ + + self._funding_next_apply = funding_next_apply + + @property + def risk_limit_base(self): + """Gets the risk_limit_base of this Contract. # noqa: E501 + + Risk limit base,deprecated # noqa: E501 + + :return: The risk_limit_base of this Contract. # noqa: E501 + :rtype: str + """ + return self._risk_limit_base + + @risk_limit_base.setter + def risk_limit_base(self, risk_limit_base): + """Sets the risk_limit_base of this Contract. + + Risk limit base,deprecated # noqa: E501 + + :param risk_limit_base: The risk_limit_base of this Contract. # noqa: E501 + :type: str + """ + + self._risk_limit_base = risk_limit_base + + @property + def risk_limit_step(self): + """Gets the risk_limit_step of this Contract. # noqa: E501 + + Step of adjusting risk limit,deprecated # noqa: E501 + + :return: The risk_limit_step of this Contract. # noqa: E501 + :rtype: str + """ + return self._risk_limit_step + + @risk_limit_step.setter + def risk_limit_step(self, risk_limit_step): + """Sets the risk_limit_step of this Contract. + + Step of adjusting risk limit,deprecated # noqa: E501 + + :param risk_limit_step: The risk_limit_step of this Contract. # noqa: E501 + :type: str + """ + + self._risk_limit_step = risk_limit_step + + @property + def risk_limit_max(self): + """Gets the risk_limit_max of this Contract. # noqa: E501 + + Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. # noqa: E501 + + :return: The risk_limit_max of this Contract. # noqa: E501 + :rtype: str + """ + return self._risk_limit_max + + @risk_limit_max.setter + def risk_limit_max(self, risk_limit_max): + """Sets the risk_limit_max of this Contract. + + Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. # noqa: E501 + + :param risk_limit_max: The risk_limit_max of this Contract. # noqa: E501 + :type: str + """ + + self._risk_limit_max = risk_limit_max + + @property + def order_size_min(self): + """Gets the order_size_min of this Contract. # noqa: E501 + + Minimum order size the contract allowed # noqa: E501 + + :return: The order_size_min of this Contract. # noqa: E501 + :rtype: int + """ + return self._order_size_min + + @order_size_min.setter + def order_size_min(self, order_size_min): + """Sets the order_size_min of this Contract. + + Minimum order size the contract allowed # noqa: E501 + + :param order_size_min: The order_size_min of this Contract. # noqa: E501 + :type: int + """ + + self._order_size_min = order_size_min + + @property + def order_size_max(self): + """Gets the order_size_max of this Contract. # noqa: E501 + + Maximum order size the contract allowed # noqa: E501 + + :return: The order_size_max of this Contract. # noqa: E501 + :rtype: int + """ + return self._order_size_max + + @order_size_max.setter + def order_size_max(self, order_size_max): + """Sets the order_size_max of this Contract. + + Maximum order size the contract allowed # noqa: E501 + + :param order_size_max: The order_size_max of this Contract. # noqa: E501 + :type: int + """ + + self._order_size_max = order_size_max + + @property + def order_price_deviate(self): + """Gets the order_price_deviate of this Contract. # noqa: E501 + + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + + :return: The order_price_deviate of this Contract. # noqa: E501 + :rtype: str + """ + return self._order_price_deviate + + @order_price_deviate.setter + def order_price_deviate(self, order_price_deviate): + """Sets the order_price_deviate of this Contract. + + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + + :param order_price_deviate: The order_price_deviate of this Contract. # noqa: E501 + :type: str + """ + + self._order_price_deviate = order_price_deviate + + @property + def ref_discount_rate(self): + """Gets the ref_discount_rate of this Contract. # noqa: E501 + + Referral fee rate discount # noqa: E501 + + :return: The ref_discount_rate of this Contract. # noqa: E501 + :rtype: str + """ + return self._ref_discount_rate + + @ref_discount_rate.setter + def ref_discount_rate(self, ref_discount_rate): + """Sets the ref_discount_rate of this Contract. + + Referral fee rate discount # noqa: E501 + + :param ref_discount_rate: The ref_discount_rate of this Contract. # noqa: E501 + :type: str + """ + + self._ref_discount_rate = ref_discount_rate + + @property + def ref_rebate_rate(self): + """Gets the ref_rebate_rate of this Contract. # noqa: E501 + + Referrer commission rate # noqa: E501 + + :return: The ref_rebate_rate of this Contract. # noqa: E501 + :rtype: str + """ + return self._ref_rebate_rate + + @ref_rebate_rate.setter + def ref_rebate_rate(self, ref_rebate_rate): + """Sets the ref_rebate_rate of this Contract. + + Referrer commission rate # noqa: E501 + + :param ref_rebate_rate: The ref_rebate_rate of this Contract. # noqa: E501 + :type: str + """ + + self._ref_rebate_rate = ref_rebate_rate + + @property + def orderbook_id(self): + """Gets the orderbook_id of this Contract. # noqa: E501 + + Current orderbook ID # noqa: E501 + + :return: The orderbook_id of this Contract. # noqa: E501 + :rtype: int + """ + return self._orderbook_id + + @orderbook_id.setter + def orderbook_id(self, orderbook_id): + """Sets the orderbook_id of this Contract. + + Current orderbook ID # noqa: E501 + + :param orderbook_id: The orderbook_id of this Contract. # noqa: E501 + :type: int + """ + + self._orderbook_id = orderbook_id + + @property + def trade_id(self): + """Gets the trade_id of this Contract. # noqa: E501 + + Current trade ID # noqa: E501 + + :return: The trade_id of this Contract. # noqa: E501 + :rtype: int + """ + return self._trade_id + + @trade_id.setter + def trade_id(self, trade_id): + """Sets the trade_id of this Contract. + + Current trade ID # noqa: E501 + + :param trade_id: The trade_id of this Contract. # noqa: E501 + :type: int + """ + + self._trade_id = trade_id + + @property + def trade_size(self): + """Gets the trade_size of this Contract. # noqa: E501 + + Historical accumulated trade size # noqa: E501 + + :return: The trade_size of this Contract. # noqa: E501 + :rtype: int + """ + return self._trade_size + + @trade_size.setter + def trade_size(self, trade_size): + """Sets the trade_size of this Contract. + + Historical accumulated trade size # noqa: E501 + + :param trade_size: The trade_size of this Contract. # noqa: E501 + :type: int + """ + + self._trade_size = trade_size + + @property + def position_size(self): + """Gets the position_size of this Contract. # noqa: E501 + + Current total long position size # noqa: E501 + + :return: The position_size of this Contract. # noqa: E501 + :rtype: int + """ + return self._position_size + + @position_size.setter + def position_size(self, position_size): + """Sets the position_size of this Contract. + + Current total long position size # noqa: E501 + + :param position_size: The position_size of this Contract. # noqa: E501 + :type: int + """ + + self._position_size = position_size + + @property + def config_change_time(self): + """Gets the config_change_time of this Contract. # noqa: E501 + + Last changed time of configuration # noqa: E501 + + :return: The config_change_time of this Contract. # noqa: E501 + :rtype: float + """ + return self._config_change_time + + @config_change_time.setter + def config_change_time(self, config_change_time): + """Sets the config_change_time of this Contract. + + Last changed time of configuration # noqa: E501 + + :param config_change_time: The config_change_time of this Contract. # noqa: E501 + :type: float + """ + + self._config_change_time = config_change_time + + @property + def in_delisting(self): + """Gets the in_delisting of this Contract. # noqa: E501 + + `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline # noqa: E501 + + :return: The in_delisting of this Contract. # noqa: E501 + :rtype: bool + """ + return self._in_delisting + + @in_delisting.setter + def in_delisting(self, in_delisting): + """Sets the in_delisting of this Contract. + + `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline # noqa: E501 + + :param in_delisting: The in_delisting of this Contract. # noqa: E501 + :type: bool + """ + + self._in_delisting = in_delisting + + @property + def orders_limit(self): + """Gets the orders_limit of this Contract. # noqa: E501 + + Maximum number of open orders # noqa: E501 + + :return: The orders_limit of this Contract. # noqa: E501 + :rtype: int + """ + return self._orders_limit + + @orders_limit.setter + def orders_limit(self, orders_limit): + """Sets the orders_limit of this Contract. + + Maximum number of open orders # noqa: E501 + + :param orders_limit: The orders_limit of this Contract. # noqa: E501 + :type: int + """ + + self._orders_limit = orders_limit + + @property + def enable_bonus(self): + """Gets the enable_bonus of this Contract. # noqa: E501 + + Whether bouns is enabled # noqa: E501 + + :return: The enable_bonus of this Contract. # noqa: E501 + :rtype: bool + """ + return self._enable_bonus + + @enable_bonus.setter + def enable_bonus(self, enable_bonus): + """Sets the enable_bonus of this Contract. + + Whether bouns is enabled # noqa: E501 + + :param enable_bonus: The enable_bonus of this Contract. # noqa: E501 + :type: bool + """ + + self._enable_bonus = enable_bonus + + @property + def enable_credit(self): + """Gets the enable_credit of this Contract. # noqa: E501 + + Whether portfolio margin account is enabled # noqa: E501 + + :return: The enable_credit of this Contract. # noqa: E501 + :rtype: bool + """ + return self._enable_credit + + @enable_credit.setter + def enable_credit(self, enable_credit): + """Sets the enable_credit of this Contract. + + Whether portfolio margin account is enabled # noqa: E501 + + :param enable_credit: The enable_credit of this Contract. # noqa: E501 + :type: bool + """ + + self._enable_credit = enable_credit + + @property + def create_time(self): + """Gets the create_time of this Contract. # noqa: E501 + + Created time of the contract # noqa: E501 + + :return: The create_time of this Contract. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Contract. + + Created time of the contract # noqa: E501 + + :param create_time: The create_time of this Contract. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def funding_cap_ratio(self): + """Gets the funding_cap_ratio of this Contract. # noqa: E501 + + The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio # noqa: E501 + + :return: The funding_cap_ratio of this Contract. # noqa: E501 + :rtype: str + """ + return self._funding_cap_ratio + + @funding_cap_ratio.setter + def funding_cap_ratio(self, funding_cap_ratio): + """Sets the funding_cap_ratio of this Contract. + + The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio # noqa: E501 + + :param funding_cap_ratio: The funding_cap_ratio of this Contract. # noqa: E501 + :type: str + """ + + self._funding_cap_ratio = funding_cap_ratio + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Contract): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Contract): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py new file mode 100644 index 0000000..450c573 --- /dev/null +++ b/gate_api/models/contract_stat.py @@ -0,0 +1,459 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class ContractStat(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'int', + 'lsr_taker': 'float', + 'lsr_account': 'float', + 'long_liq_size': 'int', + 'long_liq_amount': 'float', + 'long_liq_usd': 'float', + 'short_liq_size': 'int', + 'short_liq_amount': 'float', + 'short_liq_usd': 'float', + 'open_interest': 'int', + 'open_interest_usd': 'float', + 'top_lsr_account': 'float', + 'top_lsr_size': 'float' + } + + attribute_map = { + 'time': 'time', + 'lsr_taker': 'lsr_taker', + 'lsr_account': 'lsr_account', + 'long_liq_size': 'long_liq_size', + 'long_liq_amount': 'long_liq_amount', + 'long_liq_usd': 'long_liq_usd', + 'short_liq_size': 'short_liq_size', + 'short_liq_amount': 'short_liq_amount', + 'short_liq_usd': 'short_liq_usd', + 'open_interest': 'open_interest', + 'open_interest_usd': 'open_interest_usd', + 'top_lsr_account': 'top_lsr_account', + 'top_lsr_size': 'top_lsr_size' + } + + def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=None, long_liq_amount=None, long_liq_usd=None, short_liq_size=None, short_liq_amount=None, short_liq_usd=None, open_interest=None, open_interest_usd=None, top_lsr_account=None, top_lsr_size=None, local_vars_configuration=None): # noqa: E501 + # type: (int, float, float, int, float, float, int, float, float, int, float, float, float, Configuration) -> None + """ContractStat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._lsr_taker = None + self._lsr_account = None + self._long_liq_size = None + self._long_liq_amount = None + self._long_liq_usd = None + self._short_liq_size = None + self._short_liq_amount = None + self._short_liq_usd = None + self._open_interest = None + self._open_interest_usd = None + self._top_lsr_account = None + self._top_lsr_size = None + self.discriminator = None + + if time is not None: + self.time = time + if lsr_taker is not None: + self.lsr_taker = lsr_taker + if lsr_account is not None: + self.lsr_account = lsr_account + if long_liq_size is not None: + self.long_liq_size = long_liq_size + if long_liq_amount is not None: + self.long_liq_amount = long_liq_amount + if long_liq_usd is not None: + self.long_liq_usd = long_liq_usd + 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 open_interest is not None: + self.open_interest = open_interest + if open_interest_usd is not None: + self.open_interest_usd = open_interest_usd + if top_lsr_account is not None: + self.top_lsr_account = top_lsr_account + if top_lsr_size is not None: + self.top_lsr_size = top_lsr_size + + @property + def time(self): + """Gets the time of this ContractStat. # noqa: E501 + + Stat timestamp # noqa: E501 + + :return: The time of this ContractStat. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this ContractStat. + + Stat timestamp # noqa: E501 + + :param time: The time of this ContractStat. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def lsr_taker(self): + """Gets the lsr_taker of this ContractStat. # noqa: E501 + + Long/short account number ratio # noqa: E501 + + :return: The lsr_taker of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._lsr_taker + + @lsr_taker.setter + def lsr_taker(self, lsr_taker): + """Sets the lsr_taker of this ContractStat. + + Long/short account number ratio # noqa: E501 + + :param lsr_taker: The lsr_taker of this ContractStat. # noqa: E501 + :type: float + """ + + self._lsr_taker = lsr_taker + + @property + def lsr_account(self): + """Gets the lsr_account of this ContractStat. # noqa: E501 + + Long/short taker size ratio # noqa: E501 + + :return: The lsr_account of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._lsr_account + + @lsr_account.setter + def lsr_account(self, lsr_account): + """Sets the lsr_account of this ContractStat. + + Long/short taker size ratio # noqa: E501 + + :param lsr_account: The lsr_account of this ContractStat. # noqa: E501 + :type: float + """ + + self._lsr_account = lsr_account + + @property + def long_liq_size(self): + """Gets the long_liq_size of this ContractStat. # noqa: E501 + + Long liquidation size # noqa: E501 + + :return: The long_liq_size of this ContractStat. # noqa: E501 + :rtype: int + """ + return self._long_liq_size + + @long_liq_size.setter + def long_liq_size(self, long_liq_size): + """Sets the long_liq_size of this ContractStat. + + Long liquidation size # noqa: E501 + + :param long_liq_size: The long_liq_size of this ContractStat. # noqa: E501 + :type: int + """ + + self._long_liq_size = long_liq_size + + @property + def long_liq_amount(self): + """Gets the long_liq_amount of this ContractStat. # noqa: E501 + + Long liquidation amount(base currency) # noqa: E501 + + :return: The long_liq_amount of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._long_liq_amount + + @long_liq_amount.setter + def long_liq_amount(self, long_liq_amount): + """Sets the long_liq_amount of this ContractStat. + + Long liquidation amount(base currency) # noqa: E501 + + :param long_liq_amount: The long_liq_amount of this ContractStat. # noqa: E501 + :type: float + """ + + self._long_liq_amount = long_liq_amount + + @property + def long_liq_usd(self): + """Gets the long_liq_usd of this ContractStat. # noqa: E501 + + Long liquidation volume(quote currency) # noqa: E501 + + :return: The long_liq_usd of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._long_liq_usd + + @long_liq_usd.setter + def long_liq_usd(self, long_liq_usd): + """Sets the long_liq_usd of this ContractStat. + + Long liquidation volume(quote currency) # noqa: E501 + + :param long_liq_usd: The long_liq_usd of this ContractStat. # noqa: E501 + :type: float + """ + + self._long_liq_usd = long_liq_usd + + @property + def short_liq_size(self): + """Gets the short_liq_size of this ContractStat. # noqa: E501 + + Short liquidation size # noqa: E501 + + :return: The short_liq_size of this ContractStat. # noqa: E501 + :rtype: int + """ + return self._short_liq_size + + @short_liq_size.setter + def short_liq_size(self, short_liq_size): + """Sets the short_liq_size of this ContractStat. + + Short liquidation size # noqa: E501 + + :param short_liq_size: The short_liq_size of this ContractStat. # noqa: E501 + :type: int + """ + + self._short_liq_size = short_liq_size + + @property + def short_liq_amount(self): + """Gets the short_liq_amount of this ContractStat. # noqa: E501 + + Short liquidation amount(base currency) # noqa: E501 + + :return: The short_liq_amount of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._short_liq_amount + + @short_liq_amount.setter + def short_liq_amount(self, short_liq_amount): + """Sets the short_liq_amount of this ContractStat. + + Short liquidation amount(base currency) # noqa: E501 + + :param short_liq_amount: The short_liq_amount of this ContractStat. # noqa: E501 + :type: float + """ + + self._short_liq_amount = short_liq_amount + + @property + def short_liq_usd(self): + """Gets the short_liq_usd of this ContractStat. # noqa: E501 + + Short liquidation volume(quote currency) # noqa: E501 + + :return: The short_liq_usd of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._short_liq_usd + + @short_liq_usd.setter + def short_liq_usd(self, short_liq_usd): + """Sets the short_liq_usd of this ContractStat. + + Short liquidation volume(quote currency) # noqa: E501 + + :param short_liq_usd: The short_liq_usd of this ContractStat. # noqa: E501 + :type: float + """ + + self._short_liq_usd = short_liq_usd + + @property + def open_interest(self): + """Gets the open_interest of this ContractStat. # noqa: E501 + + Open interest size # noqa: E501 + + :return: The open_interest of this ContractStat. # noqa: E501 + :rtype: int + """ + return self._open_interest + + @open_interest.setter + def open_interest(self, open_interest): + """Sets the open_interest of this ContractStat. + + Open interest size # noqa: E501 + + :param open_interest: The open_interest of this ContractStat. # noqa: E501 + :type: int + """ + + self._open_interest = open_interest + + @property + def open_interest_usd(self): + """Gets the open_interest_usd of this ContractStat. # noqa: E501 + + Open interest volume(quote currency) # noqa: E501 + + :return: The open_interest_usd of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._open_interest_usd + + @open_interest_usd.setter + def open_interest_usd(self, open_interest_usd): + """Sets the open_interest_usd of this ContractStat. + + Open interest volume(quote currency) # noqa: E501 + + :param open_interest_usd: The open_interest_usd of this ContractStat. # noqa: E501 + :type: float + """ + + self._open_interest_usd = open_interest_usd + + @property + def top_lsr_account(self): + """Gets the top_lsr_account of this ContractStat. # noqa: E501 + + Top trader long/short account ratio # noqa: E501 + + :return: The top_lsr_account of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._top_lsr_account + + @top_lsr_account.setter + def top_lsr_account(self, top_lsr_account): + """Sets the top_lsr_account of this ContractStat. + + Top trader long/short account ratio # noqa: E501 + + :param top_lsr_account: The top_lsr_account of this ContractStat. # noqa: E501 + :type: float + """ + + self._top_lsr_account = top_lsr_account + + @property + def top_lsr_size(self): + """Gets the top_lsr_size of this ContractStat. # noqa: E501 + + Top trader long/short position ratio # noqa: E501 + + :return: The top_lsr_size of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._top_lsr_size + + @top_lsr_size.setter + def top_lsr_size(self, top_lsr_size): + """Sets the top_lsr_size of this ContractStat. + + Top trader long/short position ratio # noqa: E501 + + :param top_lsr_size: The top_lsr_size of this ContractStat. # noqa: E501 + :type: float + """ + + self._top_lsr_size = top_lsr_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContractStat): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContractStat): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py new file mode 100644 index 0000000..e254254 --- /dev/null +++ b/gate_api/models/convert_small_balance.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class ConvertSmallBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'list[str]', + 'is_all': 'bool' + } + + attribute_map = { + 'currency': 'currency', + 'is_all': 'is_all' + } + + def __init__(self, currency=None, is_all=None, local_vars_configuration=None): # noqa: E501 + # type: (list[str], bool, Configuration) -> None + """ConvertSmallBalance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._is_all = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if is_all is not None: + self.is_all = is_all + + @property + def currency(self): + """Gets the currency of this ConvertSmallBalance. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this ConvertSmallBalance. # noqa: E501 + :rtype: list[str] + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this ConvertSmallBalance. + + Currency # noqa: E501 + + :param currency: The currency of this ConvertSmallBalance. # noqa: E501 + :type: list[str] + """ + + self._currency = currency + + @property + def is_all(self): + """Gets the is_all of this ConvertSmallBalance. # noqa: E501 + + Whether to exchange all # noqa: E501 + + :return: The is_all of this ConvertSmallBalance. # noqa: E501 + :rtype: bool + """ + return self._is_all + + @is_all.setter + def is_all(self, is_all): + """Sets the is_all of this ConvertSmallBalance. + + Whether to exchange all # noqa: E501 + + :param is_all: The is_all of this ConvertSmallBalance. # noqa: E501 + :type: bool + """ + + self._is_all = is_all + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConvertSmallBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ConvertSmallBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py new file mode 100644 index 0000000..4501ba2 --- /dev/null +++ b/gate_api/models/countdown_cancel_all_futures_task.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CountdownCancelAllFuturesTask(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'timeout': 'int', + 'contract': 'str' + } + + attribute_map = { + 'timeout': 'timeout', + 'contract': 'contract' + } + + def __init__(self, timeout=None, contract=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """CountdownCancelAllFuturesTask - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._timeout = None + self._contract = None + self.discriminator = None + + self.timeout = timeout + if contract is not None: + self.contract = contract + + @property + def timeout(self): + """Gets the timeout of this CountdownCancelAllFuturesTask. # noqa: E501 + + Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + + :return: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501 + :rtype: int + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this CountdownCancelAllFuturesTask. + + Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + + :param timeout: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 + raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 + + self._timeout = timeout + + @property + def contract(self): + """Gets the contract of this CountdownCancelAllFuturesTask. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this CountdownCancelAllFuturesTask. + + Futures contract # noqa: E501 + + :param contract: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 + :type: str + """ + + self._contract = contract + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CountdownCancelAllFuturesTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountdownCancelAllFuturesTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py new file mode 100644 index 0000000..62cc503 --- /dev/null +++ b/gate_api/models/countdown_cancel_all_options_task.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CountdownCancelAllOptionsTask(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'timeout': 'int', + 'contract': 'str', + 'underlying': 'str' + } + + attribute_map = { + 'timeout': 'timeout', + 'contract': 'contract', + 'underlying': 'underlying' + } + + def __init__(self, timeout=None, contract=None, underlying=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, Configuration) -> None + """CountdownCancelAllOptionsTask - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._timeout = None + self._contract = None + self._underlying = None + self.discriminator = None + + self.timeout = timeout + if contract is not None: + self.contract = contract + if underlying is not None: + self.underlying = underlying + + @property + def timeout(self): + """Gets the timeout of this CountdownCancelAllOptionsTask. # noqa: E501 + + Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + + :return: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501 + :rtype: int + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this CountdownCancelAllOptionsTask. + + Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + + :param timeout: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 + raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 + + self._timeout = timeout + + @property + def contract(self): + """Gets the contract of this CountdownCancelAllOptionsTask. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this CountdownCancelAllOptionsTask. + + Options contract name # noqa: E501 + + :param contract: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def underlying(self): + """Gets the underlying of this CountdownCancelAllOptionsTask. # noqa: E501 + + Underlying # noqa: E501 + + :return: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 + :rtype: str + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this CountdownCancelAllOptionsTask. + + Underlying # noqa: E501 + + :param underlying: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 + :type: str + """ + + self._underlying = underlying + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CountdownCancelAllOptionsTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountdownCancelAllOptionsTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py new file mode 100644 index 0000000..f2764ab --- /dev/null +++ b/gate_api/models/countdown_cancel_all_spot_task.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CountdownCancelAllSpotTask(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'timeout': 'int', + 'currency_pair': 'str' + } + + attribute_map = { + 'timeout': 'timeout', + 'currency_pair': 'currency_pair' + } + + def __init__(self, timeout=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """CountdownCancelAllSpotTask - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._timeout = None + self._currency_pair = None + self.discriminator = None + + self.timeout = timeout + if currency_pair is not None: + self.currency_pair = currency_pair + + @property + def timeout(self): + """Gets the timeout of this CountdownCancelAllSpotTask. # noqa: E501 + + Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + + :return: The timeout of this CountdownCancelAllSpotTask. # noqa: E501 + :rtype: int + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this CountdownCancelAllSpotTask. + + Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + + :param timeout: The timeout of this CountdownCancelAllSpotTask. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 + raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 + + self._timeout = timeout + + @property + def currency_pair(self): + """Gets the currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this CountdownCancelAllSpotTask. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this CountdownCancelAllSpotTask. # 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, CountdownCancelAllSpotTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountdownCancelAllSpotTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py new file mode 100644 index 0000000..b82beab --- /dev/null +++ b/gate_api/models/create_collateral_order.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CreateCollateralOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'collateral_amount': 'str', + 'collateral_currency': 'str', + 'borrow_amount': 'str', + 'borrow_currency': 'str' + } + + attribute_map = { + 'collateral_amount': 'collateral_amount', + 'collateral_currency': 'collateral_currency', + 'borrow_amount': 'borrow_amount', + 'borrow_currency': 'borrow_currency' + } + + def __init__(self, collateral_amount=None, collateral_currency=None, borrow_amount=None, borrow_currency=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """CreateCollateralOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._collateral_amount = None + self._collateral_currency = None + self._borrow_amount = None + self._borrow_currency = None + self.discriminator = None + + self.collateral_amount = collateral_amount + self.collateral_currency = collateral_currency + self.borrow_amount = borrow_amount + self.borrow_currency = borrow_currency + + @property + def collateral_amount(self): + """Gets the collateral_amount of this CreateCollateralOrder. # noqa: E501 + + Collateral amount # noqa: E501 + + :return: The collateral_amount of this CreateCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._collateral_amount + + @collateral_amount.setter + def collateral_amount(self, collateral_amount): + """Sets the collateral_amount of this CreateCollateralOrder. + + Collateral amount # noqa: E501 + + :param collateral_amount: The collateral_amount of this CreateCollateralOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and collateral_amount is None: # noqa: E501 + raise ValueError("Invalid value for `collateral_amount`, must not be `None`") # noqa: E501 + + self._collateral_amount = collateral_amount + + @property + def collateral_currency(self): + """Gets the collateral_currency of this CreateCollateralOrder. # noqa: E501 + + Collateral # noqa: E501 + + :return: The collateral_currency of this CreateCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._collateral_currency + + @collateral_currency.setter + def collateral_currency(self, collateral_currency): + """Sets the collateral_currency of this CreateCollateralOrder. + + Collateral # noqa: E501 + + :param collateral_currency: The collateral_currency of this CreateCollateralOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and collateral_currency is None: # noqa: E501 + raise ValueError("Invalid value for `collateral_currency`, must not be `None`") # noqa: E501 + + self._collateral_currency = collateral_currency + + @property + def borrow_amount(self): + """Gets the borrow_amount of this CreateCollateralOrder. # noqa: E501 + + Borrowing amount # noqa: E501 + + :return: The borrow_amount of this CreateCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._borrow_amount + + @borrow_amount.setter + def borrow_amount(self, borrow_amount): + """Sets the borrow_amount of this CreateCollateralOrder. + + Borrowing amount # noqa: E501 + + :param borrow_amount: The borrow_amount of this CreateCollateralOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and borrow_amount is None: # noqa: E501 + raise ValueError("Invalid value for `borrow_amount`, must not be `None`") # noqa: E501 + + self._borrow_amount = borrow_amount + + @property + def borrow_currency(self): + """Gets the borrow_currency of this CreateCollateralOrder. # noqa: E501 + + Borrowed currency # noqa: E501 + + :return: The borrow_currency of this CreateCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._borrow_currency + + @borrow_currency.setter + def borrow_currency(self, borrow_currency): + """Sets the borrow_currency of this CreateCollateralOrder. + + Borrowed currency # noqa: E501 + + :param borrow_currency: The borrow_currency of this CreateCollateralOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and borrow_currency is None: # noqa: E501 + raise ValueError("Invalid value for `borrow_currency`, must not be `None`") # noqa: E501 + + self._borrow_currency = borrow_currency + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateCollateralOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateCollateralOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py new file mode 100644 index 0000000..84e5e21 --- /dev/null +++ b/gate_api/models/create_multi_collateral_order.py @@ -0,0 +1,349 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CreateMultiCollateralOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'str', + 'order_type': 'str', + 'fixed_type': 'str', + 'fixed_rate': 'str', + 'auto_renew': 'bool', + 'auto_repay': 'bool', + 'borrow_currency': 'str', + 'borrow_amount': 'str', + 'collateral_currencies': 'list[CollateralCurrency]' + } + + attribute_map = { + 'order_id': 'order_id', + 'order_type': 'order_type', + 'fixed_type': 'fixed_type', + 'fixed_rate': 'fixed_rate', + 'auto_renew': 'auto_renew', + 'auto_repay': 'auto_repay', + 'borrow_currency': 'borrow_currency', + 'borrow_amount': 'borrow_amount', + 'collateral_currencies': 'collateral_currencies' + } + + def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=None, auto_renew=None, auto_repay=None, borrow_currency=None, borrow_amount=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, bool, bool, str, str, list[CollateralCurrency], Configuration) -> None + """CreateMultiCollateralOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._order_type = None + self._fixed_type = None + self._fixed_rate = None + self._auto_renew = None + self._auto_repay = None + self._borrow_currency = None + self._borrow_amount = None + self._collateral_currencies = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if order_type is not None: + self.order_type = order_type + if fixed_type is not None: + self.fixed_type = fixed_type + if fixed_rate is not None: + self.fixed_rate = fixed_rate + if auto_renew is not None: + self.auto_renew = auto_renew + if auto_repay is not None: + self.auto_repay = auto_repay + self.borrow_currency = borrow_currency + self.borrow_amount = borrow_amount + if collateral_currencies is not None: + self.collateral_currencies = collateral_currencies + + @property + def order_id(self): + """Gets the order_id of this CreateMultiCollateralOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this CreateMultiCollateralOrder. + + Order ID # noqa: E501 + + :param order_id: The order_id of this CreateMultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def order_type(self): + """Gets the order_type of this CreateMultiCollateralOrder. # noqa: E501 + + current - current, fixed - fixed, if not specified, default to current # noqa: E501 + + :return: The order_type of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._order_type + + @order_type.setter + def order_type(self, order_type): + """Sets the order_type of this CreateMultiCollateralOrder. + + current - current, fixed - fixed, if not specified, default to current # noqa: E501 + + :param order_type: The order_type of this CreateMultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._order_type = order_type + + @property + def fixed_type(self): + """Gets the fixed_type of this CreateMultiCollateralOrder. # noqa: E501 + + Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed # noqa: E501 + + :return: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._fixed_type + + @fixed_type.setter + def fixed_type(self, fixed_type): + """Sets the fixed_type of this CreateMultiCollateralOrder. + + Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed # noqa: E501 + + :param fixed_type: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._fixed_type = fixed_type + + @property + def fixed_rate(self): + """Gets the fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 + + Fixed interest rate, must be specified for fixed # noqa: E501 + + :return: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._fixed_rate + + @fixed_rate.setter + def fixed_rate(self, fixed_rate): + """Sets the fixed_rate of this CreateMultiCollateralOrder. + + Fixed interest rate, must be specified for fixed # noqa: E501 + + :param fixed_rate: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._fixed_rate = fixed_rate + + @property + def auto_renew(self): + """Gets the auto_renew of this CreateMultiCollateralOrder. # noqa: E501 + + Fixed interest rate, automatic renewal # noqa: E501 + + :return: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_renew + + @auto_renew.setter + def auto_renew(self, auto_renew): + """Sets the auto_renew of this CreateMultiCollateralOrder. + + Fixed interest rate, automatic renewal # noqa: E501 + + :param auto_renew: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 + :type: bool + """ + + self._auto_renew = auto_renew + + @property + def auto_repay(self): + """Gets the auto_repay of this CreateMultiCollateralOrder. # noqa: E501 + + Fixed interest rate, automatic repayment # noqa: E501 + + :return: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_repay + + @auto_repay.setter + def auto_repay(self, auto_repay): + """Sets the auto_repay of this CreateMultiCollateralOrder. + + Fixed interest rate, automatic repayment # noqa: E501 + + :param auto_repay: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 + :type: bool + """ + + self._auto_repay = auto_repay + + @property + def borrow_currency(self): + """Gets the borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 + + Borrowed currency # noqa: E501 + + :return: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._borrow_currency + + @borrow_currency.setter + def borrow_currency(self, borrow_currency): + """Sets the borrow_currency of this CreateMultiCollateralOrder. + + Borrowed currency # noqa: E501 + + :param borrow_currency: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and borrow_currency is None: # noqa: E501 + raise ValueError("Invalid value for `borrow_currency`, must not be `None`") # noqa: E501 + + self._borrow_currency = borrow_currency + + @property + def borrow_amount(self): + """Gets the borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 + + Borrowing amount # noqa: E501 + + :return: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._borrow_amount + + @borrow_amount.setter + def borrow_amount(self, borrow_amount): + """Sets the borrow_amount of this CreateMultiCollateralOrder. + + Borrowing amount # noqa: E501 + + :param borrow_amount: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and borrow_amount is None: # noqa: E501 + raise ValueError("Invalid value for `borrow_amount`, must not be `None`") # noqa: E501 + + self._borrow_amount = borrow_amount + + @property + def collateral_currencies(self): + """Gets the collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 + + Collateral currency and amount # noqa: E501 + + :return: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 + :rtype: list[CollateralCurrency] + """ + return self._collateral_currencies + + @collateral_currencies.setter + def collateral_currencies(self, collateral_currencies): + """Sets the collateral_currencies of this CreateMultiCollateralOrder. + + Collateral currency and amount # noqa: E501 + + :param collateral_currencies: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 + :type: list[CollateralCurrency] + """ + + self._collateral_currencies = collateral_currencies + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateMultiCollateralOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateMultiCollateralOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py new file mode 100644 index 0000000..b45bd6b --- /dev/null +++ b/gate_api/models/create_uni_lend.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CreateUniLend(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str', + 'type': 'str', + 'min_rate': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount', + 'type': 'type', + 'min_rate': 'min_rate' + } + + def __init__(self, currency=None, amount=None, type=None, min_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """CreateUniLend - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self._type = None + self._min_rate = None + self.discriminator = None + + self.currency = currency + self.amount = amount + self.type = type + if min_rate is not None: + self.min_rate = min_rate + + @property + def currency(self): + """Gets the currency of this CreateUniLend. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this CreateUniLend. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CreateUniLend. + + Currency name # noqa: E501 + + :param currency: The currency of this CreateUniLend. # 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 CreateUniLend. # noqa: E501 + + The amount of currency could be lent # noqa: E501 + + :return: The amount of this CreateUniLend. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CreateUniLend. + + The amount of currency could be lent # noqa: E501 + + :param amount: The amount of this CreateUniLend. # 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 type(self): + """Gets the type of this CreateUniLend. # noqa: E501 + + type: lend - lend, redeem - redeem # noqa: E501 + + :return: The type of this CreateUniLend. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CreateUniLend. + + type: lend - lend, redeem - redeem # noqa: E501 + + :param type: The type of this CreateUniLend. # 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 = ["lend", "redeem"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def min_rate(self): + """Gets the min_rate of this CreateUniLend. # noqa: E501 + + The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501 + + :return: The min_rate of this CreateUniLend. # noqa: E501 + :rtype: str + """ + return self._min_rate + + @min_rate.setter + def min_rate(self, min_rate): + """Sets the min_rate of this CreateUniLend. + + The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501 + + :param min_rate: The min_rate of this CreateUniLend. # noqa: E501 + :type: str + """ + + self._min_rate = min_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, CreateUniLend): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateUniLend): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py new file mode 100644 index 0000000..419b667 --- /dev/null +++ b/gate_api/models/create_uni_loan.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CreateUniLoan(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'type': 'str', + 'amount': 'str', + 'repaid_all': 'bool', + 'currency_pair': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'type': 'type', + 'amount': 'amount', + 'repaid_all': 'repaid_all', + 'currency_pair': 'currency_pair' + } + + def __init__(self, currency=None, type=None, amount=None, repaid_all=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, str, Configuration) -> None + """CreateUniLoan - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._type = None + self._amount = None + self._repaid_all = None + self._currency_pair = None + self.discriminator = None + + self.currency = currency + self.type = type + self.amount = amount + if repaid_all is not None: + self.repaid_all = repaid_all + self.currency_pair = currency_pair + + @property + def currency(self): + """Gets the currency of this CreateUniLoan. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this CreateUniLoan. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CreateUniLoan. + + Currency # noqa: E501 + + :param currency: The currency of this CreateUniLoan. # 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 type(self): + """Gets the type of this CreateUniLoan. # noqa: E501 + + type: borrow - borrow, repay - repay # noqa: E501 + + :return: The type of this CreateUniLoan. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CreateUniLoan. + + type: borrow - borrow, repay - repay # noqa: E501 + + :param type: The type of this CreateUniLoan. # 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 = ["borrow", "repay"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def amount(self): + """Gets the amount of this CreateUniLoan. # noqa: E501 + + The amount of lending or repaying # noqa: E501 + + :return: The amount of this CreateUniLoan. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CreateUniLoan. + + The amount of lending or repaying # noqa: E501 + + :param amount: The amount of this CreateUniLoan. # 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 repaid_all(self): + """Gets the repaid_all of this CreateUniLoan. # noqa: E501 + + Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501 + + :return: The repaid_all of this CreateUniLoan. # noqa: E501 + :rtype: bool + """ + return self._repaid_all + + @repaid_all.setter + def repaid_all(self, repaid_all): + """Sets the repaid_all of this CreateUniLoan. + + Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501 + + :param repaid_all: The repaid_all of this CreateUniLoan. # noqa: E501 + :type: bool + """ + + self._repaid_all = repaid_all + + @property + def currency_pair(self): + """Gets the currency_pair of this CreateUniLoan. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this CreateUniLoan. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this CreateUniLoan. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this CreateUniLoan. # 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 + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateUniLoan): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateUniLoan): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_account.py b/gate_api/models/cross_margin_account.py new file mode 100644 index 0000000..e76d6ed --- /dev/null +++ b/gate_api/models/cross_margin_account.py @@ -0,0 +1,569 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'refresh_time': 'int', + 'locked': 'bool', + 'balances': 'dict(str, CrossMarginBalance)', + 'total': 'str', + 'borrowed': 'str', + 'interest': 'str', + 'risk': 'str', + 'total_initial_margin': 'str', + 'total_margin_balance': 'str', + 'total_maintenance_margin': 'str', + 'total_initial_margin_rate': 'str', + 'total_maintenance_margin_rate': 'str', + 'total_available_margin': 'str', + 'portfolio_margin_total': 'str', + 'portfolio_margin_total_liab': 'str', + 'portfolio_margin_total_equity': 'str' + } + + attribute_map = { + 'user_id': 'user_id', + 'refresh_time': 'refresh_time', + 'locked': 'locked', + 'balances': 'balances', + 'total': 'total', + 'borrowed': 'borrowed', + 'interest': 'interest', + 'risk': 'risk', + 'total_initial_margin': 'total_initial_margin', + 'total_margin_balance': 'total_margin_balance', + 'total_maintenance_margin': 'total_maintenance_margin', + 'total_initial_margin_rate': 'total_initial_margin_rate', + 'total_maintenance_margin_rate': 'total_maintenance_margin_rate', + 'total_available_margin': 'total_available_margin', + 'portfolio_margin_total': 'portfolio_margin_total', + 'portfolio_margin_total_liab': 'portfolio_margin_total_liab', + 'portfolio_margin_total_equity': 'portfolio_margin_total_equity' + } + + def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, interest=None, risk=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, portfolio_margin_total=None, portfolio_margin_total_liab=None, portfolio_margin_total_equity=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, bool, dict(str, CrossMarginBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """CrossMarginAccount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._refresh_time = None + self._locked = None + self._balances = None + self._total = None + self._borrowed = None + self._interest = None + self._risk = None + self._total_initial_margin = None + self._total_margin_balance = None + self._total_maintenance_margin = None + self._total_initial_margin_rate = None + self._total_maintenance_margin_rate = None + self._total_available_margin = None + self._portfolio_margin_total = None + self._portfolio_margin_total_liab = None + self._portfolio_margin_total_equity = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if refresh_time is not None: + self.refresh_time = refresh_time + if locked is not None: + self.locked = locked + if balances is not None: + self.balances = balances + if total is not None: + self.total = total + if borrowed is not None: + self.borrowed = borrowed + if interest is not None: + self.interest = interest + if risk is not None: + self.risk = risk + if total_initial_margin is not None: + self.total_initial_margin = total_initial_margin + if total_margin_balance is not None: + self.total_margin_balance = total_margin_balance + if total_maintenance_margin is not None: + self.total_maintenance_margin = total_maintenance_margin + if total_initial_margin_rate is not None: + self.total_initial_margin_rate = total_initial_margin_rate + if total_maintenance_margin_rate is not None: + self.total_maintenance_margin_rate = total_maintenance_margin_rate + if total_available_margin is not None: + self.total_available_margin = total_available_margin + if portfolio_margin_total is not None: + self.portfolio_margin_total = portfolio_margin_total + if portfolio_margin_total_liab is not None: + self.portfolio_margin_total_liab = portfolio_margin_total_liab + if portfolio_margin_total_equity is not None: + self.portfolio_margin_total_equity = portfolio_margin_total_equity + + @property + def user_id(self): + """Gets the user_id of this CrossMarginAccount. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this CrossMarginAccount. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this CrossMarginAccount. + + User ID # noqa: E501 + + :param user_id: The user_id of this CrossMarginAccount. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def refresh_time(self): + """Gets the refresh_time of this CrossMarginAccount. # noqa: E501 + + Time of the most recent refresh # noqa: E501 + + :return: The refresh_time of this CrossMarginAccount. # noqa: E501 + :rtype: int + """ + return self._refresh_time + + @refresh_time.setter + def refresh_time(self, refresh_time): + """Sets the refresh_time of this CrossMarginAccount. + + Time of the most recent refresh # noqa: E501 + + :param refresh_time: The refresh_time of this CrossMarginAccount. # noqa: E501 + :type: int + """ + + self._refresh_time = refresh_time + + @property + def locked(self): + """Gets the locked of this CrossMarginAccount. # noqa: E501 + + Whether account is locked # noqa: E501 + + :return: The locked of this CrossMarginAccount. # noqa: E501 + :rtype: bool + """ + return self._locked + + @locked.setter + def locked(self, locked): + """Sets the locked of this CrossMarginAccount. + + Whether account is locked # noqa: E501 + + :param locked: The locked of this CrossMarginAccount. # noqa: E501 + :type: bool + """ + + self._locked = locked + + @property + def balances(self): + """Gets the balances of this CrossMarginAccount. # noqa: E501 + + + :return: The balances of this CrossMarginAccount. # noqa: E501 + :rtype: dict(str, CrossMarginBalance) + """ + return self._balances + + @balances.setter + def balances(self, balances): + """Sets the balances of this CrossMarginAccount. + + + :param balances: The balances of this CrossMarginAccount. # noqa: E501 + :type: dict(str, CrossMarginBalance) + """ + + self._balances = balances + + @property + def total(self): + """Gets the total of this CrossMarginAccount. # noqa: E501 + + Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 + + :return: The total of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this CrossMarginAccount. + + Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 + + :param total: The total of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total = total + + @property + def borrowed(self): + """Gets the borrowed of this CrossMarginAccount. # noqa: E501 + + Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 + + :return: The borrowed of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this CrossMarginAccount. + + Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 + + :param borrowed: The borrowed of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def interest(self): + """Gets the interest of this CrossMarginAccount. # noqa: E501 + + Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 + + :return: The interest of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this CrossMarginAccount. + + Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 + + :param interest: The interest of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._interest = interest + + @property + def risk(self): + """Gets the risk of this CrossMarginAccount. # noqa: E501 + + Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 + + :return: The risk of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._risk + + @risk.setter + def risk(self, risk): + """Sets the risk of this CrossMarginAccount. + + Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 + + :param risk: The risk of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._risk = risk + + @property + def total_initial_margin(self): + """Gets the total_initial_margin of this CrossMarginAccount. # noqa: E501 + + Total initial margin # noqa: E501 + + :return: The total_initial_margin of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_initial_margin + + @total_initial_margin.setter + def total_initial_margin(self, total_initial_margin): + """Sets the total_initial_margin of this CrossMarginAccount. + + Total initial margin # noqa: E501 + + :param total_initial_margin: The total_initial_margin of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_initial_margin = total_initial_margin + + @property + def total_margin_balance(self): + """Gets the total_margin_balance of this CrossMarginAccount. # noqa: E501 + + Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501 + + :return: The total_margin_balance of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_margin_balance + + @total_margin_balance.setter + def total_margin_balance(self, total_margin_balance): + """Sets the total_margin_balance of this CrossMarginAccount. + + Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501 + + :param total_margin_balance: The total_margin_balance of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_margin_balance = total_margin_balance + + @property + def total_maintenance_margin(self): + """Gets the total_maintenance_margin of this CrossMarginAccount. # noqa: E501 + + Total maintenance margin # noqa: E501 + + :return: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_maintenance_margin + + @total_maintenance_margin.setter + def total_maintenance_margin(self, total_maintenance_margin): + """Sets the total_maintenance_margin of this CrossMarginAccount. + + Total maintenance margin # noqa: E501 + + :param total_maintenance_margin: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_maintenance_margin = total_maintenance_margin + + @property + def total_initial_margin_rate(self): + """Gets the total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 + + Total initial margin rate # noqa: E501 + + :return: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_initial_margin_rate + + @total_initial_margin_rate.setter + def total_initial_margin_rate(self, total_initial_margin_rate): + """Sets the total_initial_margin_rate of this CrossMarginAccount. + + Total initial margin rate # noqa: E501 + + :param total_initial_margin_rate: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_initial_margin_rate = total_initial_margin_rate + + @property + def total_maintenance_margin_rate(self): + """Gets the total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 + + Total maintenance margin rate # noqa: E501 + + :return: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_maintenance_margin_rate + + @total_maintenance_margin_rate.setter + def total_maintenance_margin_rate(self, total_maintenance_margin_rate): + """Sets the total_maintenance_margin_rate of this CrossMarginAccount. + + Total maintenance margin rate # noqa: E501 + + :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_maintenance_margin_rate = total_maintenance_margin_rate + + @property + def total_available_margin(self): + """Gets the total_available_margin of this CrossMarginAccount. # noqa: E501 + + Total available margin # noqa: E501 + + :return: The total_available_margin of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_available_margin + + @total_available_margin.setter + def total_available_margin(self, total_available_margin): + """Sets the total_available_margin of this CrossMarginAccount. + + Total available margin # noqa: E501 + + :param total_available_margin: The total_available_margin of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_available_margin = total_available_margin + + @property + def portfolio_margin_total(self): + """Gets the portfolio_margin_total of this CrossMarginAccount. # noqa: E501 + + Total amount of the portfolio margin account # noqa: E501 + + :return: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._portfolio_margin_total + + @portfolio_margin_total.setter + def portfolio_margin_total(self, portfolio_margin_total): + """Sets the portfolio_margin_total of this CrossMarginAccount. + + Total amount of the portfolio margin account # noqa: E501 + + :param portfolio_margin_total: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._portfolio_margin_total = portfolio_margin_total + + @property + def portfolio_margin_total_liab(self): + """Gets the portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 + + Total liabilities of the portfolio margin account # noqa: E501 + + :return: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._portfolio_margin_total_liab + + @portfolio_margin_total_liab.setter + def portfolio_margin_total_liab(self, portfolio_margin_total_liab): + """Sets the portfolio_margin_total_liab of this CrossMarginAccount. + + Total liabilities of the portfolio margin account # noqa: E501 + + :param portfolio_margin_total_liab: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._portfolio_margin_total_liab = portfolio_margin_total_liab + + @property + def portfolio_margin_total_equity(self): + """Gets the portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 + + Total equity of the portfolio margin account # noqa: E501 + + :return: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._portfolio_margin_total_equity + + @portfolio_margin_total_equity.setter + def portfolio_margin_total_equity(self, portfolio_margin_total_equity): + """Sets the portfolio_margin_total_equity of this CrossMarginAccount. + + Total equity of the portfolio margin account # noqa: E501 + + :param portfolio_margin_total_equity: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 + :type: str + """ + + self._portfolio_margin_total_equity = portfolio_margin_total_equity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossMarginAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_account_book.py b/gate_api/models/cross_margin_account_book.py new file mode 100644 index 0000000..faf0dd2 --- /dev/null +++ b/gate_api/models/cross_margin_account_book.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginAccountBook(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'time': 'int', + 'currency': 'str', + 'change': 'str', + 'balance': 'str', + 'type': 'str' + } + + attribute_map = { + 'id': 'id', + 'time': 'time', + 'currency': 'currency', + 'change': 'change', + 'balance': 'balance', + 'type': 'type' + } + + def __init__(self, id=None, time=None, currency=None, change=None, balance=None, type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, Configuration) -> None + """CrossMarginAccountBook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._time = None + self._currency = None + self._change = None + self._balance = None + self._type = None + self.discriminator = None + + if id is not None: + self.id = id + if time is not None: + self.time = time + if currency is not None: + self.currency = currency + if change is not None: + self.change = change + if balance is not None: + self.balance = balance + if type is not None: + self.type = type + + @property + def id(self): + """Gets the id of this CrossMarginAccountBook. # noqa: E501 + + Balance change record ID # noqa: E501 + + :return: The id of this CrossMarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CrossMarginAccountBook. + + Balance change record ID # noqa: E501 + + :param id: The id of this CrossMarginAccountBook. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def time(self): + """Gets the time of this CrossMarginAccountBook. # noqa: E501 + + The timestamp of the change (in milliseconds) # noqa: E501 + + :return: The time of this CrossMarginAccountBook. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this CrossMarginAccountBook. + + The timestamp of the change (in milliseconds) # noqa: E501 + + :param time: The time of this CrossMarginAccountBook. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def currency(self): + """Gets the currency of this CrossMarginAccountBook. # noqa: E501 + + Currency changed # noqa: E501 + + :return: The currency of this CrossMarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CrossMarginAccountBook. + + Currency changed # noqa: E501 + + :param currency: The currency of this CrossMarginAccountBook. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def change(self): + """Gets the change of this CrossMarginAccountBook. # noqa: E501 + + Amount changed. Positive value means transferring in, while negative out # noqa: E501 + + :return: The change of this CrossMarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this CrossMarginAccountBook. + + Amount changed. Positive value means transferring in, while negative out # noqa: E501 + + :param change: The change of this CrossMarginAccountBook. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def balance(self): + """Gets the balance of this CrossMarginAccountBook. # noqa: E501 + + Balance after change # noqa: E501 + + :return: The balance of this CrossMarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this CrossMarginAccountBook. + + Balance after change # noqa: E501 + + :param balance: The balance of this CrossMarginAccountBook. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def type(self): + """Gets the type of this CrossMarginAccountBook. # noqa: E501 + + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + + :return: The type of this CrossMarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CrossMarginAccountBook. + + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + + :param type: The type of this CrossMarginAccountBook. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossMarginAccountBook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginAccountBook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py new file mode 100644 index 0000000..b3c766a --- /dev/null +++ b/gate_api/models/cross_margin_balance.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'available': 'str', + 'freeze': 'str', + 'borrowed': 'str', + 'interest': 'str', + 'negative_liab': 'str', + 'futures_pos_liab': 'str', + 'equity': 'str', + 'total_freeze': 'str', + 'total_liab': 'str' + } + + attribute_map = { + 'available': 'available', + 'freeze': 'freeze', + 'borrowed': 'borrowed', + 'interest': 'interest', + 'negative_liab': 'negative_liab', + 'futures_pos_liab': 'futures_pos_liab', + 'equity': 'equity', + 'total_freeze': 'total_freeze', + 'total_liab': 'total_liab' + } + + def __init__(self, available=None, freeze=None, borrowed=None, interest=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None + """CrossMarginBalance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._available = None + self._freeze = None + self._borrowed = None + self._interest = None + self._negative_liab = None + self._futures_pos_liab = None + self._equity = None + self._total_freeze = None + self._total_liab = None + self.discriminator = None + + if available is not None: + self.available = available + if freeze is not None: + self.freeze = freeze + if borrowed is not None: + self.borrowed = borrowed + if interest is not None: + self.interest = interest + if negative_liab is not None: + self.negative_liab = negative_liab + if futures_pos_liab is not None: + self.futures_pos_liab = futures_pos_liab + if equity is not None: + self.equity = equity + if total_freeze is not None: + self.total_freeze = total_freeze + if total_liab is not None: + self.total_liab = total_liab + + @property + def available(self): + """Gets the available of this CrossMarginBalance. # noqa: E501 + + Available amount # noqa: E501 + + :return: The available of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this CrossMarginBalance. + + Available amount # noqa: E501 + + :param available: The available of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def freeze(self): + """Gets the freeze of this CrossMarginBalance. # noqa: E501 + + Locked amount # noqa: E501 + + :return: The freeze of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._freeze + + @freeze.setter + def freeze(self, freeze): + """Sets the freeze of this CrossMarginBalance. + + Locked amount # noqa: E501 + + :param freeze: The freeze of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._freeze = freeze + + @property + def borrowed(self): + """Gets the borrowed of this CrossMarginBalance. # noqa: E501 + + Borrowed amount # noqa: E501 + + :return: The borrowed of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this CrossMarginBalance. + + Borrowed amount # noqa: E501 + + :param borrowed: The borrowed of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def interest(self): + """Gets the interest of this CrossMarginBalance. # noqa: E501 + + Unpaid interests # noqa: E501 + + :return: The interest of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this CrossMarginBalance. + + Unpaid interests # noqa: E501 + + :param interest: The interest of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._interest = interest + + @property + def negative_liab(self): + """Gets the negative_liab of this CrossMarginBalance. # noqa: E501 + + Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501 + + :return: The negative_liab of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._negative_liab + + @negative_liab.setter + def negative_liab(self, negative_liab): + """Sets the negative_liab of this CrossMarginBalance. + + Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501 + + :param negative_liab: The negative_liab of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._negative_liab = negative_liab + + @property + def futures_pos_liab(self): + """Gets the futures_pos_liab of this CrossMarginBalance. # noqa: E501 + + Borrowing to Open Positions in Futures # noqa: E501 + + :return: The futures_pos_liab of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._futures_pos_liab + + @futures_pos_liab.setter + def futures_pos_liab(self, futures_pos_liab): + """Sets the futures_pos_liab of this CrossMarginBalance. + + Borrowing to Open Positions in Futures # noqa: E501 + + :param futures_pos_liab: The futures_pos_liab of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._futures_pos_liab = futures_pos_liab + + @property + def equity(self): + """Gets the equity of this CrossMarginBalance. # noqa: E501 + + Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501 + + :return: The equity of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._equity + + @equity.setter + def equity(self, equity): + """Sets the equity of this CrossMarginBalance. + + Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501 + + :param equity: The equity of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._equity = equity + + @property + def total_freeze(self): + """Gets the total_freeze of this CrossMarginBalance. # noqa: E501 + + Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501 + + :return: The total_freeze of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._total_freeze + + @total_freeze.setter + def total_freeze(self, total_freeze): + """Sets the total_freeze of this CrossMarginBalance. + + Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501 + + :param total_freeze: The total_freeze of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._total_freeze = total_freeze + + @property + def total_liab(self): + """Gets the total_liab of this CrossMarginBalance. # noqa: E501 + + Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501 + + :return: The total_liab of this CrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._total_liab + + @total_liab.setter + def total_liab(self, total_liab): + """Sets the total_liab of this CrossMarginBalance. + + Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501 + + :param total_liab: The total_liab of this CrossMarginBalance. # noqa: E501 + :type: str + """ + + self._total_liab = total_liab + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossMarginBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_balance1.py b/gate_api/models/cross_margin_balance1.py new file mode 100644 index 0000000..354247d --- /dev/null +++ b/gate_api/models/cross_margin_balance1.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginBalance1(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'available': 'str', + 'freeze': 'str', + 'borrowed': 'str', + 'interest': 'str' + } + + attribute_map = { + 'available': 'available', + 'freeze': 'freeze', + 'borrowed': 'borrowed', + 'interest': 'interest' + } + + def __init__(self, available=None, freeze=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """CrossMarginBalance1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._available = None + self._freeze = None + self._borrowed = None + self._interest = None + self.discriminator = None + + if available is not None: + self.available = available + if freeze is not None: + self.freeze = freeze + if borrowed is not None: + self.borrowed = borrowed + if interest is not None: + self.interest = interest + + @property + def available(self): + """Gets the available of this CrossMarginBalance1. # noqa: E501 + + Available amount # noqa: E501 + + :return: The available of this CrossMarginBalance1. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this CrossMarginBalance1. + + Available amount # noqa: E501 + + :param available: The available of this CrossMarginBalance1. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def freeze(self): + """Gets the freeze of this CrossMarginBalance1. # noqa: E501 + + Locked amount # noqa: E501 + + :return: The freeze of this CrossMarginBalance1. # noqa: E501 + :rtype: str + """ + return self._freeze + + @freeze.setter + def freeze(self, freeze): + """Sets the freeze of this CrossMarginBalance1. + + Locked amount # noqa: E501 + + :param freeze: The freeze of this CrossMarginBalance1. # noqa: E501 + :type: str + """ + + self._freeze = freeze + + @property + def borrowed(self): + """Gets the borrowed of this CrossMarginBalance1. # noqa: E501 + + Borrowed amount # noqa: E501 + + :return: The borrowed of this CrossMarginBalance1. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this CrossMarginBalance1. + + Borrowed amount # noqa: E501 + + :param borrowed: The borrowed of this CrossMarginBalance1. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def interest(self): + """Gets the interest of this CrossMarginBalance1. # noqa: E501 + + Unpaid interests # noqa: E501 + + :return: The interest of this CrossMarginBalance1. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this CrossMarginBalance1. + + Unpaid interests # noqa: E501 + + :param interest: The interest of this CrossMarginBalance1. # noqa: E501 + :type: str + """ + + self._interest = interest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossMarginBalance1): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginBalance1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_currency.py b/gate_api/models/cross_margin_currency.py new file mode 100644 index 0000000..3b9f37a --- /dev/null +++ b/gate_api/models/cross_margin_currency.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'rate': 'str', + 'prec': 'str', + 'discount': 'str', + 'min_borrow_amount': 'str', + 'user_max_borrow_amount': 'str', + 'total_max_borrow_amount': 'str', + 'price': 'str', + 'loanable': 'bool', + 'status': 'int' + } + + attribute_map = { + 'name': 'name', + 'rate': 'rate', + 'prec': 'prec', + 'discount': 'discount', + 'min_borrow_amount': 'min_borrow_amount', + 'user_max_borrow_amount': 'user_max_borrow_amount', + 'total_max_borrow_amount': 'total_max_borrow_amount', + 'price': 'price', + 'loanable': 'loanable', + 'status': 'status' + } + + def __init__(self, name=None, rate=None, prec=None, discount=None, min_borrow_amount=None, user_max_borrow_amount=None, total_max_borrow_amount=None, price=None, loanable=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, bool, int, Configuration) -> None + """CrossMarginCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._rate = None + self._prec = None + self._discount = None + self._min_borrow_amount = None + self._user_max_borrow_amount = None + self._total_max_borrow_amount = None + self._price = None + self._loanable = None + self._status = None + self.discriminator = None + + if name is not None: + self.name = name + if rate is not None: + self.rate = rate + if prec is not None: + self.prec = prec + if discount is not None: + self.discount = discount + if min_borrow_amount is not None: + self.min_borrow_amount = min_borrow_amount + if user_max_borrow_amount is not None: + self.user_max_borrow_amount = user_max_borrow_amount + if total_max_borrow_amount is not None: + self.total_max_borrow_amount = total_max_borrow_amount + if price is not None: + self.price = price + if loanable is not None: + self.loanable = loanable + if status is not None: + self.status = status + + @property + def name(self): + """Gets the name of this CrossMarginCurrency. # noqa: E501 + + Currency name # noqa: E501 + + :return: The name of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CrossMarginCurrency. + + Currency name # noqa: E501 + + :param name: The name of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def rate(self): + """Gets the rate of this CrossMarginCurrency. # noqa: E501 + + Minimum lending rate (hourly rate) # noqa: E501 + + :return: The rate of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this CrossMarginCurrency. + + Minimum lending rate (hourly rate) # noqa: E501 + + :param rate: The rate of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._rate = rate + + @property + def prec(self): + """Gets the prec of this CrossMarginCurrency. # noqa: E501 + + Currency precision # noqa: E501 + + :return: The prec of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._prec + + @prec.setter + def prec(self, prec): + """Sets the prec of this CrossMarginCurrency. + + Currency precision # noqa: E501 + + :param prec: The prec of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._prec = prec + + @property + def discount(self): + """Gets the discount of this CrossMarginCurrency. # noqa: E501 + + Currency value discount, which is used in total value calculation # noqa: E501 + + :return: The discount of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._discount + + @discount.setter + def discount(self, discount): + """Sets the discount of this CrossMarginCurrency. + + Currency value discount, which is used in total value calculation # noqa: E501 + + :param discount: The discount of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._discount = discount + + @property + def min_borrow_amount(self): + """Gets the min_borrow_amount of this CrossMarginCurrency. # noqa: E501 + + Minimum currency borrow amount. Unit is currency itself # noqa: E501 + + :return: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._min_borrow_amount + + @min_borrow_amount.setter + def min_borrow_amount(self, min_borrow_amount): + """Sets the min_borrow_amount of this CrossMarginCurrency. + + Minimum currency borrow amount. Unit is currency itself # noqa: E501 + + :param min_borrow_amount: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._min_borrow_amount = min_borrow_amount + + @property + def user_max_borrow_amount(self): + """Gets the user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 + + Maximum borrow value allowed per user, in USDT # noqa: E501 + + :return: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._user_max_borrow_amount + + @user_max_borrow_amount.setter + def user_max_borrow_amount(self, user_max_borrow_amount): + """Sets the user_max_borrow_amount of this CrossMarginCurrency. + + Maximum borrow value allowed per user, in USDT # noqa: E501 + + :param user_max_borrow_amount: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._user_max_borrow_amount = user_max_borrow_amount + + @property + def total_max_borrow_amount(self): + """Gets the total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 + + Maximum borrow value allowed for this currency, in USDT # noqa: E501 + + :return: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._total_max_borrow_amount + + @total_max_borrow_amount.setter + def total_max_borrow_amount(self, total_max_borrow_amount): + """Sets the total_max_borrow_amount of this CrossMarginCurrency. + + Maximum borrow value allowed for this currency, in USDT # noqa: E501 + + :param total_max_borrow_amount: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._total_max_borrow_amount = total_max_borrow_amount + + @property + def price(self): + """Gets the price of this CrossMarginCurrency. # noqa: E501 + + Price change between this currency and USDT # noqa: E501 + + :return: The price of this CrossMarginCurrency. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this CrossMarginCurrency. + + Price change between this currency and USDT # noqa: E501 + + :param price: The price of this CrossMarginCurrency. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def loanable(self): + """Gets the loanable of this CrossMarginCurrency. # noqa: E501 + + Whether currency is borrowed # noqa: E501 + + :return: The loanable of this CrossMarginCurrency. # noqa: E501 + :rtype: bool + """ + return self._loanable + + @loanable.setter + def loanable(self, loanable): + """Sets the loanable of this CrossMarginCurrency. + + Whether currency is borrowed # noqa: E501 + + :param loanable: The loanable of this CrossMarginCurrency. # noqa: E501 + :type: bool + """ + + self._loanable = loanable + + @property + def status(self): + """Gets the status of this CrossMarginCurrency. # noqa: E501 + + status - `0` : disable - `1` : enable # noqa: E501 + + :return: The status of this CrossMarginCurrency. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CrossMarginCurrency. + + status - `0` : disable - `1` : enable # noqa: E501 + + :param status: The status of this CrossMarginCurrency. # noqa: E501 + :type: int + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossMarginCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py new file mode 100644 index 0000000..9a09c9e --- /dev/null +++ b/gate_api/models/cross_margin_loan.py @@ -0,0 +1,383 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginLoan(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'create_time': 'int', + 'update_time': 'int', + 'currency': 'str', + 'amount': 'str', + 'text': 'str', + 'status': 'int', + 'repaid': 'str', + 'repaid_interest': 'str', + 'unpaid_interest': 'str' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'create_time', + 'update_time': 'update_time', + 'currency': 'currency', + 'amount': 'amount', + 'text': 'text', + 'status': 'status', + 'repaid': 'repaid', + 'repaid_interest': 'repaid_interest', + 'unpaid_interest': 'unpaid_interest' + } + + def __init__(self, id=None, create_time=None, update_time=None, currency=None, amount=None, text=None, status=None, repaid=None, repaid_interest=None, unpaid_interest=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, int, str, str, str, int, str, str, str, Configuration) -> None + """CrossMarginLoan - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._create_time = None + self._update_time = None + self._currency = None + self._amount = None + self._text = None + self._status = None + self._repaid = None + self._repaid_interest = None + self._unpaid_interest = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + self.currency = currency + self.amount = amount + if text is not None: + self.text = text + if status is not None: + self.status = status + if repaid is not None: + self.repaid = repaid + if repaid_interest is not None: + self.repaid_interest = repaid_interest + if unpaid_interest is not None: + self.unpaid_interest = unpaid_interest + + @property + def id(self): + """Gets the id of this CrossMarginLoan. # noqa: E501 + + Loan record ID # noqa: E501 + + :return: The id of this CrossMarginLoan. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CrossMarginLoan. + + Loan record ID # noqa: E501 + + :param id: The id of this CrossMarginLoan. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this CrossMarginLoan. # noqa: E501 + + Creation timestamp, in milliseconds # noqa: E501 + + :return: The create_time of this CrossMarginLoan. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this CrossMarginLoan. + + Creation timestamp, in milliseconds # noqa: E501 + + :param create_time: The create_time of this CrossMarginLoan. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this CrossMarginLoan. # noqa: E501 + + Update timestamp, in milliseconds # noqa: E501 + + :return: The update_time of this CrossMarginLoan. # noqa: E501 + :rtype: int + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this CrossMarginLoan. + + Update timestamp, in milliseconds # noqa: E501 + + :param update_time: The update_time of this CrossMarginLoan. # noqa: E501 + :type: int + """ + + self._update_time = update_time + + @property + def currency(self): + """Gets the currency of this CrossMarginLoan. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this CrossMarginLoan. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CrossMarginLoan. + + Currency name # noqa: E501 + + :param currency: The currency of this CrossMarginLoan. # 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 CrossMarginLoan. # noqa: E501 + + Borrowed amount # noqa: E501 + + :return: The amount of this CrossMarginLoan. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CrossMarginLoan. + + Borrowed amount # noqa: E501 + + :param amount: The amount of this CrossMarginLoan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def text(self): + """Gets the text of this CrossMarginLoan. # noqa: E501 + + User defined custom ID # noqa: E501 + + :return: The text of this CrossMarginLoan. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this CrossMarginLoan. + + User defined custom ID # noqa: E501 + + :param text: The text of this CrossMarginLoan. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def status(self): + """Gets the status of this CrossMarginLoan. # noqa: E501 + + Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete # noqa: E501 + + :return: The status of this CrossMarginLoan. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CrossMarginLoan. + + Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete # noqa: E501 + + :param status: The status of this CrossMarginLoan. # noqa: E501 + :type: int + """ + allowed_values = [1, 2, 3] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def repaid(self): + """Gets the repaid of this CrossMarginLoan. # noqa: E501 + + Repaid amount # noqa: E501 + + :return: The repaid of this CrossMarginLoan. # noqa: E501 + :rtype: str + """ + return self._repaid + + @repaid.setter + def repaid(self, repaid): + """Sets the repaid of this CrossMarginLoan. + + Repaid amount # noqa: E501 + + :param repaid: The repaid of this CrossMarginLoan. # noqa: E501 + :type: str + """ + + self._repaid = repaid + + @property + def repaid_interest(self): + """Gets the repaid_interest of this CrossMarginLoan. # noqa: E501 + + Repaid interest # noqa: E501 + + :return: The repaid_interest of this CrossMarginLoan. # noqa: E501 + :rtype: str + """ + return self._repaid_interest + + @repaid_interest.setter + def repaid_interest(self, repaid_interest): + """Sets the repaid_interest of this CrossMarginLoan. + + Repaid interest # noqa: E501 + + :param repaid_interest: The repaid_interest of this CrossMarginLoan. # noqa: E501 + :type: str + """ + + self._repaid_interest = repaid_interest + + @property + def unpaid_interest(self): + """Gets the unpaid_interest of this CrossMarginLoan. # noqa: E501 + + Outstanding interest yet to be paid # noqa: E501 + + :return: The unpaid_interest of this CrossMarginLoan. # noqa: E501 + :rtype: str + """ + return self._unpaid_interest + + @unpaid_interest.setter + def unpaid_interest(self, unpaid_interest): + """Sets the unpaid_interest of this CrossMarginLoan. + + Outstanding interest yet to be paid # noqa: E501 + + :param unpaid_interest: The unpaid_interest of this CrossMarginLoan. # noqa: E501 + :type: str + """ + + self._unpaid_interest = unpaid_interest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossMarginLoan): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginLoan): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_repay_request.py b/gate_api/models/cross_margin_repay_request.py new file mode 100644 index 0000000..406a95d --- /dev/null +++ b/gate_api/models/cross_margin_repay_request.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginRepayRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CrossMarginRepayRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self.discriminator = None + + self.currency = currency + self.amount = amount + + @property + def currency(self): + """Gets the currency of this CrossMarginRepayRequest. # noqa: E501 + + Repayment currency # noqa: E501 + + :return: The currency of this CrossMarginRepayRequest. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CrossMarginRepayRequest. + + Repayment currency # noqa: E501 + + :param currency: The currency of this CrossMarginRepayRequest. # 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 CrossMarginRepayRequest. # noqa: E501 + + Repayment amount # noqa: E501 + + :return: The amount of this CrossMarginRepayRequest. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CrossMarginRepayRequest. + + Repayment amount # noqa: E501 + + :param amount: The amount of this CrossMarginRepayRequest. # 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, CrossMarginRepayRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginRepayRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py new file mode 100644 index 0000000..dcbb97b --- /dev/null +++ b/gate_api/models/cross_margin_repayment.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginRepayment(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'create_time': 'int', + 'loan_id': 'str', + 'currency': 'str', + 'principal': 'str', + 'interest': 'str', + 'repayment_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'create_time', + 'loan_id': 'loan_id', + 'currency': 'currency', + 'principal': 'principal', + 'interest': 'interest', + 'repayment_type': 'repayment_type' + } + + def __init__(self, id=None, create_time=None, loan_id=None, currency=None, principal=None, interest=None, repayment_type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, str, Configuration) -> None + """CrossMarginRepayment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._create_time = None + self._loan_id = None + self._currency = None + self._principal = None + self._interest = None + self._repayment_type = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if loan_id is not None: + self.loan_id = loan_id + if currency is not None: + self.currency = currency + if principal is not None: + self.principal = principal + if interest is not None: + self.interest = interest + if repayment_type is not None: + self.repayment_type = repayment_type + + @property + def id(self): + """Gets the id of this CrossMarginRepayment. # noqa: E501 + + Loan record ID # noqa: E501 + + :return: The id of this CrossMarginRepayment. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CrossMarginRepayment. + + Loan record ID # noqa: E501 + + :param id: The id of this CrossMarginRepayment. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this CrossMarginRepayment. # noqa: E501 + + Repayment time # noqa: E501 + + :return: The create_time of this CrossMarginRepayment. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this CrossMarginRepayment. + + Repayment time # noqa: E501 + + :param create_time: The create_time of this CrossMarginRepayment. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def loan_id(self): + """Gets the loan_id of this CrossMarginRepayment. # noqa: E501 + + Loan record ID # noqa: E501 + + :return: The loan_id of this CrossMarginRepayment. # noqa: E501 + :rtype: str + """ + return self._loan_id + + @loan_id.setter + def loan_id(self, loan_id): + """Sets the loan_id of this CrossMarginRepayment. + + Loan record ID # noqa: E501 + + :param loan_id: The loan_id of this CrossMarginRepayment. # noqa: E501 + :type: str + """ + + self._loan_id = loan_id + + @property + def currency(self): + """Gets the currency of this CrossMarginRepayment. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this CrossMarginRepayment. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CrossMarginRepayment. + + Currency name # noqa: E501 + + :param currency: The currency of this CrossMarginRepayment. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def principal(self): + """Gets the principal of this CrossMarginRepayment. # noqa: E501 + + Repaid principal # noqa: E501 + + :return: The principal of this CrossMarginRepayment. # noqa: E501 + :rtype: str + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this CrossMarginRepayment. + + Repaid principal # noqa: E501 + + :param principal: The principal of this CrossMarginRepayment. # noqa: E501 + :type: str + """ + + self._principal = principal + + @property + def interest(self): + """Gets the interest of this CrossMarginRepayment. # noqa: E501 + + Repaid interest # noqa: E501 + + :return: The interest of this CrossMarginRepayment. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this CrossMarginRepayment. + + Repaid interest # noqa: E501 + + :param interest: The interest of this CrossMarginRepayment. # noqa: E501 + :type: str + """ + + self._interest = interest + + @property + def repayment_type(self): + """Gets the repayment_type of this CrossMarginRepayment. # noqa: E501 + + Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation # noqa: E501 + + :return: The repayment_type of this CrossMarginRepayment. # noqa: E501 + :rtype: str + """ + return self._repayment_type + + @repayment_type.setter + def repayment_type(self, repayment_type): + """Sets the repayment_type of this CrossMarginRepayment. + + Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation # noqa: E501 + + :param repayment_type: The repayment_type of this CrossMarginRepayment. # noqa: E501 + :type: str + """ + + self._repayment_type = repayment_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, CrossMarginRepayment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginRepayment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_transferable.py b/gate_api/models/cross_margin_transferable.py new file mode 100644 index 0000000..531070e --- /dev/null +++ b/gate_api/models/cross_margin_transferable.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CrossMarginTransferable(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """CrossMarginTransferable - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + + @property + def currency(self): + """Gets the currency of this CrossMarginTransferable. # noqa: E501 + + Currency detail # noqa: E501 + + :return: The currency of this CrossMarginTransferable. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CrossMarginTransferable. + + Currency detail # noqa: E501 + + :param currency: The currency of this CrossMarginTransferable. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this CrossMarginTransferable. # noqa: E501 + + Max transferable amount # noqa: E501 + + :return: The amount of this CrossMarginTransferable. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CrossMarginTransferable. + + Max transferable amount # noqa: E501 + + :param amount: The amount of this CrossMarginTransferable. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossMarginTransferable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CrossMarginTransferable): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py new file mode 100644 index 0000000..449bdc7 --- /dev/null +++ b/gate_api/models/currency.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Currency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'name': 'str', + 'delisted': 'bool', + 'withdraw_disabled': 'bool', + 'withdraw_delayed': 'bool', + 'deposit_disabled': 'bool', + 'trade_disabled': 'bool', + 'fixed_rate': 'str', + 'chain': 'str', + 'chains': 'list[SpotCurrencyChain]' + } + + attribute_map = { + 'currency': 'currency', + 'name': 'name', + 'delisted': 'delisted', + 'withdraw_disabled': 'withdraw_disabled', + 'withdraw_delayed': 'withdraw_delayed', + 'deposit_disabled': 'deposit_disabled', + 'trade_disabled': 'trade_disabled', + 'fixed_rate': 'fixed_rate', + 'chain': 'chain', + 'chains': 'chains' + } + + def __init__(self, currency=None, name=None, delisted=None, withdraw_disabled=None, withdraw_delayed=None, deposit_disabled=None, trade_disabled=None, fixed_rate=None, chain=None, chains=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, bool, bool, bool, bool, bool, str, str, list[SpotCurrencyChain], Configuration) -> None + """Currency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._name = None + self._delisted = None + self._withdraw_disabled = None + self._withdraw_delayed = None + self._deposit_disabled = None + self._trade_disabled = None + self._fixed_rate = None + self._chain = None + self._chains = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if name is not None: + self.name = name + if delisted is not None: + self.delisted = delisted + if withdraw_disabled is not None: + self.withdraw_disabled = withdraw_disabled + if withdraw_delayed is not None: + self.withdraw_delayed = withdraw_delayed + if deposit_disabled is not None: + self.deposit_disabled = deposit_disabled + if trade_disabled is not None: + self.trade_disabled = trade_disabled + if fixed_rate is not None: + self.fixed_rate = fixed_rate + if chain is not None: + self.chain = chain + if chains is not None: + self.chains = chains + + @property + def currency(self): + """Gets the currency of this Currency. # noqa: E501 + + Currency symbol # noqa: E501 + + :return: The currency of this Currency. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Currency. + + Currency symbol # noqa: E501 + + :param currency: The currency of this Currency. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def name(self): + """Gets the name of this Currency. # noqa: E501 + + Currency name # noqa: E501 + + :return: The name of this Currency. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Currency. + + Currency name # noqa: E501 + + :param name: The name of this Currency. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def delisted(self): + """Gets the delisted of this Currency. # noqa: E501 + + Whether currency is de-listed # noqa: E501 + + :return: The delisted of this Currency. # noqa: E501 + :rtype: bool + """ + return self._delisted + + @delisted.setter + def delisted(self, delisted): + """Sets the delisted of this Currency. + + Whether currency is de-listed # noqa: E501 + + :param delisted: The delisted of this Currency. # noqa: E501 + :type: bool + """ + + self._delisted = delisted + + @property + def withdraw_disabled(self): + """Gets the withdraw_disabled of this Currency. # noqa: E501 + + Whether currency's withdrawal is disabled (deprecated) # noqa: E501 + + :return: The withdraw_disabled of this Currency. # noqa: E501 + :rtype: bool + """ + return self._withdraw_disabled + + @withdraw_disabled.setter + def withdraw_disabled(self, withdraw_disabled): + """Sets the withdraw_disabled of this Currency. + + Whether currency's withdrawal is disabled (deprecated) # noqa: E501 + + :param withdraw_disabled: The withdraw_disabled of this Currency. # noqa: E501 + :type: bool + """ + + self._withdraw_disabled = withdraw_disabled + + @property + def withdraw_delayed(self): + """Gets the withdraw_delayed of this Currency. # noqa: E501 + + Whether currency's withdrawal is delayed (deprecated) # noqa: E501 + + :return: The withdraw_delayed of this Currency. # noqa: E501 + :rtype: bool + """ + return self._withdraw_delayed + + @withdraw_delayed.setter + def withdraw_delayed(self, withdraw_delayed): + """Sets the withdraw_delayed of this Currency. + + Whether currency's withdrawal is delayed (deprecated) # noqa: E501 + + :param withdraw_delayed: The withdraw_delayed of this Currency. # noqa: E501 + :type: bool + """ + + self._withdraw_delayed = withdraw_delayed + + @property + def deposit_disabled(self): + """Gets the deposit_disabled of this Currency. # noqa: E501 + + Whether currency's deposit is disabled (deprecated) # noqa: E501 + + :return: The deposit_disabled of this Currency. # noqa: E501 + :rtype: bool + """ + return self._deposit_disabled + + @deposit_disabled.setter + def deposit_disabled(self, deposit_disabled): + """Sets the deposit_disabled of this Currency. + + Whether currency's deposit is disabled (deprecated) # noqa: E501 + + :param deposit_disabled: The deposit_disabled of this Currency. # noqa: E501 + :type: bool + """ + + self._deposit_disabled = deposit_disabled + + @property + def trade_disabled(self): + """Gets the trade_disabled of this Currency. # noqa: E501 + + Whether currency's trading is disabled # noqa: E501 + + :return: The trade_disabled of this Currency. # noqa: E501 + :rtype: bool + """ + return self._trade_disabled + + @trade_disabled.setter + def trade_disabled(self, trade_disabled): + """Sets the trade_disabled of this Currency. + + Whether currency's trading is disabled # noqa: E501 + + :param trade_disabled: The trade_disabled of this Currency. # noqa: E501 + :type: bool + """ + + self._trade_disabled = trade_disabled + + @property + def fixed_rate(self): + """Gets the fixed_rate of this Currency. # noqa: E501 + + Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies # noqa: E501 + + :return: The fixed_rate of this Currency. # noqa: E501 + :rtype: str + """ + return self._fixed_rate + + @fixed_rate.setter + def fixed_rate(self, fixed_rate): + """Sets the fixed_rate of this Currency. + + Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies # noqa: E501 + + :param fixed_rate: The fixed_rate of this Currency. # noqa: E501 + :type: str + """ + + self._fixed_rate = fixed_rate + + @property + def chain(self): + """Gets the chain of this Currency. # noqa: E501 + + The main chain corresponding to the coin # noqa: E501 + + :return: The chain of this Currency. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this Currency. + + The main chain corresponding to the coin # noqa: E501 + + :param chain: The chain of this Currency. # noqa: E501 + :type: str + """ + + self._chain = chain + + @property + def chains(self): + """Gets the chains of this Currency. # noqa: E501 + + All links corresponding to coins # noqa: E501 + + :return: The chains of this Currency. # noqa: E501 + :rtype: list[SpotCurrencyChain] + """ + return self._chains + + @chains.setter + def chains(self, chains): + """Sets the chains of this Currency. + + All links corresponding to coins # noqa: E501 + + :param chains: The chains of this Currency. # noqa: E501 + :type: list[SpotCurrencyChain] + """ + + self._chains = chains + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Currency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Currency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py new file mode 100644 index 0000000..1f4eb6d --- /dev/null +++ b/gate_api/models/currency_chain.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CurrencyChain(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain': 'str', + 'name_cn': 'str', + 'name_en': 'str', + 'contract_address': 'str', + 'is_disabled': 'int', + 'is_deposit_disabled': 'int', + 'is_withdraw_disabled': 'int', + 'decimal': 'str' + } + + attribute_map = { + 'chain': 'chain', + 'name_cn': 'name_cn', + 'name_en': 'name_en', + 'contract_address': 'contract_address', + 'is_disabled': 'is_disabled', + 'is_deposit_disabled': 'is_deposit_disabled', + 'is_withdraw_disabled': 'is_withdraw_disabled', + 'decimal': 'decimal' + } + + def __init__(self, chain=None, name_cn=None, name_en=None, contract_address=None, is_disabled=None, is_deposit_disabled=None, is_withdraw_disabled=None, decimal=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, int, int, str, Configuration) -> None + """CurrencyChain - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain = None + self._name_cn = None + self._name_en = None + self._contract_address = None + self._is_disabled = None + self._is_deposit_disabled = None + self._is_withdraw_disabled = None + self._decimal = None + self.discriminator = None + + if chain is not None: + self.chain = chain + if name_cn is not None: + self.name_cn = name_cn + if name_en is not None: + self.name_en = name_en + if contract_address is not None: + self.contract_address = contract_address + if is_disabled is not None: + self.is_disabled = is_disabled + if is_deposit_disabled is not None: + self.is_deposit_disabled = is_deposit_disabled + if is_withdraw_disabled is not None: + self.is_withdraw_disabled = is_withdraw_disabled + if decimal is not None: + self.decimal = decimal + + @property + def chain(self): + """Gets the chain of this CurrencyChain. # noqa: E501 + + Chain name # noqa: E501 + + :return: The chain of this CurrencyChain. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this CurrencyChain. + + Chain name # noqa: E501 + + :param chain: The chain of this CurrencyChain. # noqa: E501 + :type: str + """ + + self._chain = chain + + @property + def name_cn(self): + """Gets the name_cn of this CurrencyChain. # noqa: E501 + + Chain name in Chinese # noqa: E501 + + :return: The name_cn of this CurrencyChain. # noqa: E501 + :rtype: str + """ + return self._name_cn + + @name_cn.setter + def name_cn(self, name_cn): + """Sets the name_cn of this CurrencyChain. + + Chain name in Chinese # noqa: E501 + + :param name_cn: The name_cn of this CurrencyChain. # noqa: E501 + :type: str + """ + + self._name_cn = name_cn + + @property + def name_en(self): + """Gets the name_en of this CurrencyChain. # noqa: E501 + + Chain name in English # noqa: E501 + + :return: The name_en of this CurrencyChain. # noqa: E501 + :rtype: str + """ + return self._name_en + + @name_en.setter + def name_en(self, name_en): + """Sets the name_en of this CurrencyChain. + + Chain name in English # noqa: E501 + + :param name_en: The name_en of this CurrencyChain. # noqa: E501 + :type: str + """ + + self._name_en = name_en + + @property + def contract_address(self): + """Gets the contract_address of this CurrencyChain. # noqa: E501 + + Smart contract address for the currency; if no address is available, it will be an empty string # noqa: E501 + + :return: The contract_address of this CurrencyChain. # noqa: E501 + :rtype: str + """ + return self._contract_address + + @contract_address.setter + def contract_address(self, contract_address): + """Sets the contract_address of this CurrencyChain. + + Smart contract address for the currency; if no address is available, it will be an empty string # noqa: E501 + + :param contract_address: The contract_address of this CurrencyChain. # noqa: E501 + :type: str + """ + + self._contract_address = contract_address + + @property + def is_disabled(self): + """Gets the is_disabled of this CurrencyChain. # noqa: E501 + + If it is disabled. 0 means NOT being disabled # noqa: E501 + + :return: The is_disabled of this CurrencyChain. # noqa: E501 + :rtype: int + """ + return self._is_disabled + + @is_disabled.setter + def is_disabled(self, is_disabled): + """Sets the is_disabled of this CurrencyChain. + + If it is disabled. 0 means NOT being disabled # noqa: E501 + + :param is_disabled: The is_disabled of this CurrencyChain. # noqa: E501 + :type: int + """ + + self._is_disabled = is_disabled + + @property + def is_deposit_disabled(self): + """Gets the is_deposit_disabled of this CurrencyChain. # noqa: E501 + + Is deposit disabled. 0 means not # noqa: E501 + + :return: The is_deposit_disabled of this CurrencyChain. # noqa: E501 + :rtype: int + """ + return self._is_deposit_disabled + + @is_deposit_disabled.setter + def is_deposit_disabled(self, is_deposit_disabled): + """Sets the is_deposit_disabled of this CurrencyChain. + + Is deposit disabled. 0 means not # noqa: E501 + + :param is_deposit_disabled: The is_deposit_disabled of this CurrencyChain. # noqa: E501 + :type: int + """ + + self._is_deposit_disabled = is_deposit_disabled + + @property + def is_withdraw_disabled(self): + """Gets the is_withdraw_disabled of this CurrencyChain. # noqa: E501 + + Is withdrawal disabled. 0 means not # noqa: E501 + + :return: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 + :rtype: int + """ + return self._is_withdraw_disabled + + @is_withdraw_disabled.setter + def is_withdraw_disabled(self, is_withdraw_disabled): + """Sets the is_withdraw_disabled of this CurrencyChain. + + Is withdrawal disabled. 0 means not # noqa: E501 + + :param is_withdraw_disabled: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 + :type: int + """ + + self._is_withdraw_disabled = is_withdraw_disabled + + @property + def decimal(self): + """Gets the decimal of this CurrencyChain. # noqa: E501 + + Withdrawal precision # noqa: E501 + + :return: The decimal of this CurrencyChain. # noqa: E501 + :rtype: str + """ + return self._decimal + + @decimal.setter + def decimal(self, decimal): + """Sets the decimal of this CurrencyChain. + + Withdrawal precision # noqa: E501 + + :param decimal: The decimal of this CurrencyChain. # noqa: E501 + :type: str + """ + + self._decimal = decimal + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CurrencyChain): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CurrencyChain): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py new file mode 100644 index 0000000..e6195f7 --- /dev/null +++ b/gate_api/models/currency_pair.py @@ -0,0 +1,549 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CurrencyPair(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'base': 'str', + 'base_name': 'str', + 'quote': 'str', + 'quote_name': 'str', + 'fee': 'str', + 'min_base_amount': 'str', + 'min_quote_amount': 'str', + 'max_base_amount': 'str', + 'max_quote_amount': 'str', + 'amount_precision': 'int', + 'precision': 'int', + 'trade_status': 'str', + 'sell_start': 'int', + 'buy_start': 'int', + 'type': 'str' + } + + attribute_map = { + 'id': 'id', + 'base': 'base', + 'base_name': 'base_name', + 'quote': 'quote', + 'quote_name': 'quote_name', + 'fee': 'fee', + 'min_base_amount': 'min_base_amount', + 'min_quote_amount': 'min_quote_amount', + 'max_base_amount': 'max_base_amount', + 'max_quote_amount': 'max_quote_amount', + 'amount_precision': 'amount_precision', + 'precision': 'precision', + 'trade_status': 'trade_status', + 'sell_start': 'sell_start', + 'buy_start': 'buy_start', + 'type': 'type' + } + + def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=None, fee=None, min_base_amount=None, min_quote_amount=None, max_base_amount=None, max_quote_amount=None, amount_precision=None, precision=None, trade_status=None, sell_start=None, buy_start=None, type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, int, int, str, int, int, str, Configuration) -> None + """CurrencyPair - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._base = None + self._base_name = None + self._quote = None + self._quote_name = None + self._fee = None + self._min_base_amount = None + self._min_quote_amount = None + self._max_base_amount = None + self._max_quote_amount = None + self._amount_precision = None + self._precision = None + self._trade_status = None + self._sell_start = None + self._buy_start = None + self._type = None + self.discriminator = None + + if id is not None: + self.id = id + if base is not None: + self.base = base + if base_name is not None: + self.base_name = base_name + if quote is not None: + self.quote = quote + if quote_name is not None: + self.quote_name = quote_name + if fee is not None: + self.fee = fee + if min_base_amount is not None: + self.min_base_amount = min_base_amount + if min_quote_amount is not None: + self.min_quote_amount = min_quote_amount + if max_base_amount is not None: + self.max_base_amount = max_base_amount + if max_quote_amount is not None: + self.max_quote_amount = max_quote_amount + if amount_precision is not None: + self.amount_precision = amount_precision + if precision is not None: + self.precision = precision + if trade_status is not None: + self.trade_status = trade_status + if sell_start is not None: + self.sell_start = sell_start + if buy_start is not None: + self.buy_start = buy_start + if type is not None: + self.type = type + + @property + def id(self): + """Gets the id of this CurrencyPair. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The id of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CurrencyPair. + + Currency pair # noqa: E501 + + :param id: The id of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def base(self): + """Gets the base of this CurrencyPair. # noqa: E501 + + Base currency # noqa: E501 + + :return: The base of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this CurrencyPair. + + Base currency # noqa: E501 + + :param base: The base of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._base = base + + @property + def base_name(self): + """Gets the base_name of this CurrencyPair. # noqa: E501 + + Transaction currency name # noqa: E501 + + :return: The base_name of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._base_name + + @base_name.setter + def base_name(self, base_name): + """Sets the base_name of this CurrencyPair. + + Transaction currency name # noqa: E501 + + :param base_name: The base_name of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._base_name = base_name + + @property + def quote(self): + """Gets the quote of this CurrencyPair. # noqa: E501 + + Quote currency # noqa: E501 + + :return: The quote of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._quote + + @quote.setter + def quote(self, quote): + """Sets the quote of this CurrencyPair. + + Quote currency # noqa: E501 + + :param quote: The quote of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._quote = quote + + @property + def quote_name(self): + """Gets the quote_name of this CurrencyPair. # noqa: E501 + + Name of the denominated currency # noqa: E501 + + :return: The quote_name of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._quote_name + + @quote_name.setter + def quote_name(self, quote_name): + """Sets the quote_name of this CurrencyPair. + + Name of the denominated currency # noqa: E501 + + :param quote_name: The quote_name of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._quote_name = quote_name + + @property + def fee(self): + """Gets the fee of this CurrencyPair. # noqa: E501 + + Trading fee # noqa: E501 + + :return: The fee of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this CurrencyPair. + + Trading fee # noqa: E501 + + :param fee: The fee of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def min_base_amount(self): + """Gets the min_base_amount of this CurrencyPair. # noqa: E501 + + Minimum amount of base currency to trade, `null` means no limit # noqa: E501 + + :return: The min_base_amount of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._min_base_amount + + @min_base_amount.setter + def min_base_amount(self, min_base_amount): + """Sets the min_base_amount of this CurrencyPair. + + Minimum amount of base currency to trade, `null` means no limit # noqa: E501 + + :param min_base_amount: The min_base_amount of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._min_base_amount = min_base_amount + + @property + def min_quote_amount(self): + """Gets the min_quote_amount of this CurrencyPair. # noqa: E501 + + Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 + + :return: The min_quote_amount of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._min_quote_amount + + @min_quote_amount.setter + def min_quote_amount(self, min_quote_amount): + """Sets the min_quote_amount of this CurrencyPair. + + Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 + + :param min_quote_amount: The min_quote_amount of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._min_quote_amount = min_quote_amount + + @property + def max_base_amount(self): + """Gets the max_base_amount of this CurrencyPair. # noqa: E501 + + Maximum amount of base currency to trade, `null` means no limit # noqa: E501 + + :return: The max_base_amount of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._max_base_amount + + @max_base_amount.setter + def max_base_amount(self, max_base_amount): + """Sets the max_base_amount of this CurrencyPair. + + Maximum amount of base currency to trade, `null` means no limit # noqa: E501 + + :param max_base_amount: The max_base_amount of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._max_base_amount = max_base_amount + + @property + def max_quote_amount(self): + """Gets the max_quote_amount of this CurrencyPair. # noqa: E501 + + Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 + + :return: The max_quote_amount of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._max_quote_amount + + @max_quote_amount.setter + def max_quote_amount(self, max_quote_amount): + """Sets the max_quote_amount of this CurrencyPair. + + Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 + + :param max_quote_amount: The max_quote_amount of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._max_quote_amount = max_quote_amount + + @property + def amount_precision(self): + """Gets the amount_precision of this CurrencyPair. # noqa: E501 + + Amount scale # noqa: E501 + + :return: The amount_precision of this CurrencyPair. # noqa: E501 + :rtype: int + """ + return self._amount_precision + + @amount_precision.setter + def amount_precision(self, amount_precision): + """Sets the amount_precision of this CurrencyPair. + + Amount scale # noqa: E501 + + :param amount_precision: The amount_precision of this CurrencyPair. # noqa: E501 + :type: int + """ + + self._amount_precision = amount_precision + + @property + def precision(self): + """Gets the precision of this CurrencyPair. # noqa: E501 + + Price scale # noqa: E501 + + :return: The precision of this CurrencyPair. # noqa: E501 + :rtype: int + """ + return self._precision + + @precision.setter + def precision(self, precision): + """Sets the precision of this CurrencyPair. + + Price scale # noqa: E501 + + :param precision: The precision of this CurrencyPair. # noqa: E501 + :type: int + """ + + self._precision = precision + + @property + def trade_status(self): + """Gets the trade_status of this CurrencyPair. # noqa: E501 + + How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501 + + :return: The trade_status of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._trade_status + + @trade_status.setter + def trade_status(self, trade_status): + """Sets the trade_status of this CurrencyPair. + + How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501 + + :param trade_status: The trade_status of this CurrencyPair. # noqa: E501 + :type: str + """ + allowed_values = ["untradable", "buyable", "sellable", "tradable"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and trade_status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `trade_status` ({0}), must be one of {1}" # noqa: E501 + .format(trade_status, allowed_values) + ) + + self._trade_status = trade_status + + @property + def sell_start(self): + """Gets the sell_start of this CurrencyPair. # noqa: E501 + + Sell start unix timestamp in seconds # noqa: E501 + + :return: The sell_start of this CurrencyPair. # noqa: E501 + :rtype: int + """ + return self._sell_start + + @sell_start.setter + def sell_start(self, sell_start): + """Sets the sell_start of this CurrencyPair. + + Sell start unix timestamp in seconds # noqa: E501 + + :param sell_start: The sell_start of this CurrencyPair. # noqa: E501 + :type: int + """ + + self._sell_start = sell_start + + @property + def buy_start(self): + """Gets the buy_start of this CurrencyPair. # noqa: E501 + + Buy start unix timestamp in seconds # noqa: E501 + + :return: The buy_start of this CurrencyPair. # noqa: E501 + :rtype: int + """ + return self._buy_start + + @buy_start.setter + def buy_start(self, buy_start): + """Sets the buy_start of this CurrencyPair. + + Buy start unix timestamp in seconds # noqa: E501 + + :param buy_start: The buy_start of this CurrencyPair. # noqa: E501 + :type: int + """ + + self._buy_start = buy_start + + @property + def type(self): + """Gets the type of this CurrencyPair. # noqa: E501 + + Trading pair type, normal: normal, premarket: pre-market # noqa: E501 + + :return: The type of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CurrencyPair. + + Trading pair type, normal: normal, premarket: pre-market # noqa: E501 + + :param type: The type of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CurrencyPair): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CurrencyPair): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py new file mode 100644 index 0000000..58a945d --- /dev/null +++ b/gate_api/models/currency_quota.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class CurrencyQuota(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'min_quota': 'str', + 'left_quota': 'str', + 'left_quote_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'min_quota': 'min_quota', + 'left_quota': 'left_quota', + 'left_quote_usdt': 'left_quote_usdt' + } + + def __init__(self, currency=None, index_price=None, min_quota=None, left_quota=None, left_quote_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """CurrencyQuota - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._min_quota = None + self._left_quota = None + self._left_quote_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if min_quota is not None: + self.min_quota = min_quota + if left_quota is not None: + self.left_quota = left_quota + if left_quote_usdt is not None: + self.left_quote_usdt = left_quote_usdt + + @property + def currency(self): + """Gets the currency of this CurrencyQuota. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this CurrencyQuota. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CurrencyQuota. + + Currency # noqa: E501 + + :param currency: The currency of this CurrencyQuota. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this CurrencyQuota. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this CurrencyQuota. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this CurrencyQuota. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this CurrencyQuota. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def min_quota(self): + """Gets the min_quota of this CurrencyQuota. # noqa: E501 + + Minimum borrowing/collateral quota for the currency # noqa: E501 + + :return: The min_quota of this CurrencyQuota. # noqa: E501 + :rtype: str + """ + return self._min_quota + + @min_quota.setter + def min_quota(self, min_quota): + """Sets the min_quota of this CurrencyQuota. + + Minimum borrowing/collateral quota for the currency # noqa: E501 + + :param min_quota: The min_quota of this CurrencyQuota. # noqa: E501 + :type: str + """ + + self._min_quota = min_quota + + @property + def left_quota(self): + """Gets the left_quota of this CurrencyQuota. # noqa: E501 + + Remaining borrowing/collateral limit for the currency # noqa: E501 + + :return: The left_quota of this CurrencyQuota. # noqa: E501 + :rtype: str + """ + return self._left_quota + + @left_quota.setter + def left_quota(self, left_quota): + """Sets the left_quota of this CurrencyQuota. + + Remaining borrowing/collateral limit for the currency # noqa: E501 + + :param left_quota: The left_quota of this CurrencyQuota. # noqa: E501 + :type: str + """ + + self._left_quota = left_quota + + @property + def left_quote_usdt(self): + """Gets the left_quote_usdt of this CurrencyQuota. # noqa: E501 + + Remaining currency limit converted to USDT # noqa: E501 + + :return: The left_quote_usdt of this CurrencyQuota. # noqa: E501 + :rtype: str + """ + return self._left_quote_usdt + + @left_quote_usdt.setter + def left_quote_usdt(self, left_quote_usdt): + """Sets the left_quote_usdt of this CurrencyQuota. + + Remaining currency limit converted to USDT # noqa: E501 + + :param left_quote_usdt: The left_quote_usdt of this CurrencyQuota. # noqa: E501 + :type: str + """ + + self._left_quote_usdt = left_quote_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CurrencyQuota): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CurrencyQuota): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py new file mode 100644 index 0000000..24b86ad --- /dev/null +++ b/gate_api/models/debit_fee.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DebitFee(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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 + """DebitFee - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._enabled = None + self.discriminator = None + + self.enabled = enabled + + @property + def enabled(self): + """Gets the enabled of this DebitFee. # noqa: E501 + + Whether GT fee discount is used # noqa: E501 + + :return: The enabled of this DebitFee. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this DebitFee. + + Whether GT fee discount is used # noqa: E501 + + :param enabled: The enabled of this DebitFee. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and enabled is None: # noqa: E501 + 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, DebitFee): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DebitFee): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py new file mode 100644 index 0000000..8bbd1ba --- /dev/null +++ b/gate_api/models/delivery_candlestick.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DeliveryCandlestick(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 't': 'float', + 'v': 'int', + 'c': 'str', + 'h': 'str', + 'l': 'str', + 'o': 'str' + } + + attribute_map = { + 't': 't', + 'v': 'v', + 'c': 'c', + 'h': 'h', + 'l': 'l', + 'o': 'o' + } + + def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501 + # type: (float, int, str, str, str, str, Configuration) -> None + """DeliveryCandlestick - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._t = None + self._v = None + self._c = None + self._h = None + self._l = None + self._o = None + self.discriminator = None + + if t is not None: + self.t = t + if v is not None: + self.v = v + if c is not None: + self.c = c + if h is not None: + self.h = h + if l is not None: + self.l = l + if o is not None: + self.o = o + + @property + def t(self): + """Gets the t of this DeliveryCandlestick. # noqa: E501 + + Unix timestamp in seconds # noqa: E501 + + :return: The t of this DeliveryCandlestick. # noqa: E501 + :rtype: float + """ + return self._t + + @t.setter + def t(self, t): + """Sets the t of this DeliveryCandlestick. + + Unix timestamp in seconds # noqa: E501 + + :param t: The t of this DeliveryCandlestick. # noqa: E501 + :type: float + """ + + self._t = t + + @property + def v(self): + """Gets the v of this DeliveryCandlestick. # noqa: E501 + + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + + :return: The v of this DeliveryCandlestick. # noqa: E501 + :rtype: int + """ + return self._v + + @v.setter + def v(self, v): + """Sets the v of this DeliveryCandlestick. + + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + + :param v: The v of this DeliveryCandlestick. # noqa: E501 + :type: int + """ + + self._v = v + + @property + def c(self): + """Gets the c of this DeliveryCandlestick. # noqa: E501 + + Close price (quote currency) # noqa: E501 + + :return: The c of this DeliveryCandlestick. # noqa: E501 + :rtype: str + """ + return self._c + + @c.setter + def c(self, c): + """Sets the c of this DeliveryCandlestick. + + Close price (quote currency) # noqa: E501 + + :param c: The c of this DeliveryCandlestick. # noqa: E501 + :type: str + """ + + self._c = c + + @property + def h(self): + """Gets the h of this DeliveryCandlestick. # noqa: E501 + + Highest price (quote currency) # noqa: E501 + + :return: The h of this DeliveryCandlestick. # noqa: E501 + :rtype: str + """ + return self._h + + @h.setter + def h(self, h): + """Sets the h of this DeliveryCandlestick. + + Highest price (quote currency) # noqa: E501 + + :param h: The h of this DeliveryCandlestick. # noqa: E501 + :type: str + """ + + self._h = h + + @property + def l(self): + """Gets the l of this DeliveryCandlestick. # noqa: E501 + + Lowest price (quote currency) # noqa: E501 + + :return: The l of this DeliveryCandlestick. # noqa: E501 + :rtype: str + """ + return self._l + + @l.setter + def l(self, l): + """Sets the l of this DeliveryCandlestick. + + Lowest price (quote currency) # noqa: E501 + + :param l: The l of this DeliveryCandlestick. # noqa: E501 + :type: str + """ + + self._l = l + + @property + def o(self): + """Gets the o of this DeliveryCandlestick. # noqa: E501 + + Open price (quote currency) # noqa: E501 + + :return: The o of this DeliveryCandlestick. # noqa: E501 + :rtype: str + """ + return self._o + + @o.setter + def o(self, o): + """Sets the o of this DeliveryCandlestick. + + Open price (quote currency) # noqa: E501 + + :param o: The o of this DeliveryCandlestick. # noqa: E501 + :type: str + """ + + self._o = o + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeliveryCandlestick): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeliveryCandlestick): + 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 new file mode 100644 index 0000000..ee2632c --- /dev/null +++ b/gate_api/models/delivery_contract.py @@ -0,0 +1,1177 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DeliveryContract(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'underlying': 'str', + 'cycle': 'str', + 'type': 'str', + 'quanto_multiplier': 'str', + 'leverage_min': 'str', + 'leverage_max': 'str', + 'maintenance_rate': 'str', + 'mark_type': 'str', + 'mark_price': 'str', + 'index_price': 'str', + 'last_price': 'str', + 'maker_fee_rate': 'str', + 'taker_fee_rate': 'str', + 'order_price_round': 'str', + 'mark_price_round': 'str', + 'basis_rate': 'str', + 'basis_value': 'str', + 'basis_impact_value': 'str', + 'settle_price': 'str', + 'settle_price_interval': 'int', + 'settle_price_duration': 'int', + 'expire_time': 'int', + 'risk_limit_base': 'str', + 'risk_limit_step': 'str', + 'risk_limit_max': 'str', + 'order_size_min': 'int', + 'order_size_max': 'int', + 'order_price_deviate': 'str', + 'ref_discount_rate': 'str', + 'ref_rebate_rate': 'str', + 'orderbook_id': 'int', + 'trade_id': 'int', + 'trade_size': 'int', + 'position_size': 'int', + 'config_change_time': 'float', + 'in_delisting': 'bool', + 'orders_limit': 'int' + } + + attribute_map = { + 'name': 'name', + 'underlying': 'underlying', + 'cycle': 'cycle', + 'type': 'type', + 'quanto_multiplier': 'quanto_multiplier', + 'leverage_min': 'leverage_min', + 'leverage_max': 'leverage_max', + 'maintenance_rate': 'maintenance_rate', + 'mark_type': 'mark_type', + 'mark_price': 'mark_price', + 'index_price': 'index_price', + 'last_price': 'last_price', + 'maker_fee_rate': 'maker_fee_rate', + 'taker_fee_rate': 'taker_fee_rate', + 'order_price_round': 'order_price_round', + 'mark_price_round': 'mark_price_round', + 'basis_rate': 'basis_rate', + 'basis_value': 'basis_value', + 'basis_impact_value': 'basis_impact_value', + 'settle_price': 'settle_price', + 'settle_price_interval': 'settle_price_interval', + 'settle_price_duration': 'settle_price_duration', + 'expire_time': 'expire_time', + 'risk_limit_base': 'risk_limit_base', + 'risk_limit_step': 'risk_limit_step', + 'risk_limit_max': 'risk_limit_max', + 'order_size_min': 'order_size_min', + 'order_size_max': 'order_size_max', + 'order_price_deviate': 'order_price_deviate', + 'ref_discount_rate': 'ref_discount_rate', + 'ref_rebate_rate': 'ref_rebate_rate', + 'orderbook_id': 'orderbook_id', + 'trade_id': 'trade_id', + 'trade_size': 'trade_size', + 'position_size': 'position_size', + 'config_change_time': 'config_change_time', + 'in_delisting': 'in_delisting', + 'orders_limit': 'orders_limit' + } + + def __init__(self, name=None, underlying=None, cycle=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, basis_rate=None, basis_value=None, basis_impact_value=None, settle_price=None, settle_price_interval=None, settle_price_duration=None, expire_time=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, int, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, Configuration) -> None + """DeliveryContract - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._underlying = None + self._cycle = None + self._type = None + self._quanto_multiplier = None + self._leverage_min = None + self._leverage_max = None + self._maintenance_rate = None + self._mark_type = None + self._mark_price = None + self._index_price = None + self._last_price = None + self._maker_fee_rate = None + self._taker_fee_rate = None + self._order_price_round = None + self._mark_price_round = None + self._basis_rate = None + self._basis_value = None + self._basis_impact_value = None + self._settle_price = None + self._settle_price_interval = None + self._settle_price_duration = None + self._expire_time = None + self._risk_limit_base = None + self._risk_limit_step = None + self._risk_limit_max = None + self._order_size_min = None + self._order_size_max = None + self._order_price_deviate = None + self._ref_discount_rate = None + self._ref_rebate_rate = None + self._orderbook_id = None + self._trade_id = None + self._trade_size = None + self._position_size = None + self._config_change_time = None + self._in_delisting = None + self._orders_limit = None + self.discriminator = None + + if name is not None: + self.name = name + if underlying is not None: + self.underlying = underlying + if cycle is not None: + self.cycle = cycle + if type is not None: + self.type = type + if quanto_multiplier is not None: + self.quanto_multiplier = quanto_multiplier + if leverage_min is not None: + self.leverage_min = leverage_min + if leverage_max is not None: + self.leverage_max = leverage_max + if maintenance_rate is not None: + self.maintenance_rate = maintenance_rate + if mark_type is not None: + self.mark_type = mark_type + if mark_price is not None: + self.mark_price = mark_price + if index_price is not None: + self.index_price = index_price + if last_price is not None: + self.last_price = last_price + if maker_fee_rate is not None: + self.maker_fee_rate = maker_fee_rate + if taker_fee_rate is not None: + self.taker_fee_rate = taker_fee_rate + if order_price_round is not None: + self.order_price_round = order_price_round + if mark_price_round is not None: + self.mark_price_round = mark_price_round + if basis_rate is not None: + self.basis_rate = basis_rate + if basis_value is not None: + self.basis_value = basis_value + if basis_impact_value is not None: + self.basis_impact_value = basis_impact_value + if settle_price is not None: + self.settle_price = settle_price + if settle_price_interval is not None: + self.settle_price_interval = settle_price_interval + if settle_price_duration is not None: + self.settle_price_duration = settle_price_duration + if expire_time is not None: + self.expire_time = expire_time + if risk_limit_base is not None: + self.risk_limit_base = risk_limit_base + if risk_limit_step is not None: + self.risk_limit_step = risk_limit_step + if risk_limit_max is not None: + self.risk_limit_max = risk_limit_max + if order_size_min is not None: + self.order_size_min = order_size_min + if order_size_max is not None: + self.order_size_max = order_size_max + if order_price_deviate is not None: + self.order_price_deviate = order_price_deviate + if ref_discount_rate is not None: + self.ref_discount_rate = ref_discount_rate + if ref_rebate_rate is not None: + self.ref_rebate_rate = ref_rebate_rate + if orderbook_id is not None: + self.orderbook_id = orderbook_id + if trade_id is not None: + self.trade_id = trade_id + if trade_size is not None: + self.trade_size = trade_size + if position_size is not None: + self.position_size = position_size + if config_change_time is not None: + self.config_change_time = config_change_time + if in_delisting is not None: + self.in_delisting = in_delisting + if orders_limit is not None: + self.orders_limit = orders_limit + + @property + def name(self): + """Gets the name of this DeliveryContract. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The name of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DeliveryContract. + + Futures contract # noqa: E501 + + :param name: The name of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def underlying(self): + """Gets the underlying of this DeliveryContract. # noqa: E501 + + Underlying # noqa: E501 + + :return: The underlying of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this DeliveryContract. + + Underlying # noqa: E501 + + :param underlying: The underlying of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._underlying = underlying + + @property + def cycle(self): + """Gets the cycle of this DeliveryContract. # noqa: E501 + + Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 + + :return: The cycle of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._cycle + + @cycle.setter + def cycle(self, cycle): + """Sets the cycle of this DeliveryContract. + + Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 + + :param cycle: The cycle of this DeliveryContract. # noqa: E501 + :type: str + """ + allowed_values = ["WEEKLY", "BI-WEEKLY", "QUARTERLY", "BI-QUARTERLY"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and cycle not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `cycle` ({0}), must be one of {1}" # noqa: E501 + .format(cycle, allowed_values) + ) + + self._cycle = cycle + + @property + def type(self): + """Gets the type of this DeliveryContract. # noqa: E501 + + Futures contract type # noqa: E501 + + :return: The type of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this DeliveryContract. + + Futures contract type # noqa: E501 + + :param type: The type of this DeliveryContract. # noqa: E501 + :type: str + """ + allowed_values = ["inverse", "direct"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def quanto_multiplier(self): + """Gets the quanto_multiplier of this DeliveryContract. # noqa: E501 + + Multiplier used in converting from invoicing to settlement currency # noqa: E501 + + :return: The quanto_multiplier of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._quanto_multiplier + + @quanto_multiplier.setter + def quanto_multiplier(self, quanto_multiplier): + """Sets the quanto_multiplier of this DeliveryContract. + + Multiplier used in converting from invoicing to settlement currency # noqa: E501 + + :param quanto_multiplier: The quanto_multiplier of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._quanto_multiplier = quanto_multiplier + + @property + def leverage_min(self): + """Gets the leverage_min of this DeliveryContract. # noqa: E501 + + Minimum leverage # noqa: E501 + + :return: The leverage_min of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._leverage_min + + @leverage_min.setter + def leverage_min(self, leverage_min): + """Sets the leverage_min of this DeliveryContract. + + Minimum leverage # noqa: E501 + + :param leverage_min: The leverage_min of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._leverage_min = leverage_min + + @property + def leverage_max(self): + """Gets the leverage_max of this DeliveryContract. # noqa: E501 + + Maximum leverage # noqa: E501 + + :return: The leverage_max of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._leverage_max + + @leverage_max.setter + def leverage_max(self, leverage_max): + """Sets the leverage_max of this DeliveryContract. + + Maximum leverage # noqa: E501 + + :param leverage_max: The leverage_max of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._leverage_max = leverage_max + + @property + def maintenance_rate(self): + """Gets the maintenance_rate of this DeliveryContract. # noqa: E501 + + Maintenance rate of margin # noqa: E501 + + :return: The maintenance_rate of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._maintenance_rate + + @maintenance_rate.setter + def maintenance_rate(self, maintenance_rate): + """Sets the maintenance_rate of this DeliveryContract. + + Maintenance rate of margin # noqa: E501 + + :param maintenance_rate: The maintenance_rate of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._maintenance_rate = maintenance_rate + + @property + def mark_type(self): + """Gets the mark_type of this DeliveryContract. # noqa: E501 + + Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + + :return: The mark_type of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._mark_type + + @mark_type.setter + def mark_type(self, mark_type): + """Sets the mark_type of this DeliveryContract. + + Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + + :param mark_type: The mark_type of this DeliveryContract. # noqa: E501 + :type: str + """ + allowed_values = ["internal", "index"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and mark_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `mark_type` ({0}), must be one of {1}" # noqa: E501 + .format(mark_type, allowed_values) + ) + + self._mark_type = mark_type + + @property + def mark_price(self): + """Gets the mark_price of this DeliveryContract. # noqa: E501 + + Current mark price # noqa: E501 + + :return: The mark_price of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this DeliveryContract. + + Current mark price # noqa: E501 + + :param mark_price: The mark_price of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def index_price(self): + """Gets the index_price of this DeliveryContract. # noqa: E501 + + Current index price # noqa: E501 + + :return: The index_price of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this DeliveryContract. + + Current index price # noqa: E501 + + :param index_price: The index_price of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def last_price(self): + """Gets the last_price of this DeliveryContract. # noqa: E501 + + Last trading price # noqa: E501 + + :return: The last_price of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._last_price + + @last_price.setter + def last_price(self, last_price): + """Sets the last_price of this DeliveryContract. + + Last trading price # noqa: E501 + + :param last_price: The last_price of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._last_price = last_price + + @property + def maker_fee_rate(self): + """Gets the maker_fee_rate of this DeliveryContract. # noqa: E501 + + Maker fee rate, where negative means rebate # noqa: E501 + + :return: The maker_fee_rate of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._maker_fee_rate + + @maker_fee_rate.setter + def maker_fee_rate(self, maker_fee_rate): + """Sets the maker_fee_rate of this DeliveryContract. + + Maker fee rate, where negative means rebate # noqa: E501 + + :param maker_fee_rate: The maker_fee_rate of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._maker_fee_rate = maker_fee_rate + + @property + def taker_fee_rate(self): + """Gets the taker_fee_rate of this DeliveryContract. # noqa: E501 + + Taker fee rate # noqa: E501 + + :return: The taker_fee_rate of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._taker_fee_rate + + @taker_fee_rate.setter + def taker_fee_rate(self, taker_fee_rate): + """Sets the taker_fee_rate of this DeliveryContract. + + Taker fee rate # noqa: E501 + + :param taker_fee_rate: The taker_fee_rate of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._taker_fee_rate = taker_fee_rate + + @property + def order_price_round(self): + """Gets the order_price_round of this DeliveryContract. # noqa: E501 + + Minimum order price increment # noqa: E501 + + :return: The order_price_round of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._order_price_round + + @order_price_round.setter + def order_price_round(self, order_price_round): + """Sets the order_price_round of this DeliveryContract. + + Minimum order price increment # noqa: E501 + + :param order_price_round: The order_price_round of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._order_price_round = order_price_round + + @property + def mark_price_round(self): + """Gets the mark_price_round of this DeliveryContract. # noqa: E501 + + Minimum mark price increment # noqa: E501 + + :return: The mark_price_round of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._mark_price_round + + @mark_price_round.setter + def mark_price_round(self, mark_price_round): + """Sets the mark_price_round of this DeliveryContract. + + Minimum mark price increment # noqa: E501 + + :param mark_price_round: The mark_price_round of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._mark_price_round = mark_price_round + + @property + def basis_rate(self): + """Gets the basis_rate of this DeliveryContract. # noqa: E501 + + Fair basis rate # noqa: E501 + + :return: The basis_rate of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._basis_rate + + @basis_rate.setter + def basis_rate(self, basis_rate): + """Sets the basis_rate of this DeliveryContract. + + Fair basis rate # noqa: E501 + + :param basis_rate: The basis_rate of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._basis_rate = basis_rate + + @property + def basis_value(self): + """Gets the basis_value of this DeliveryContract. # noqa: E501 + + Fair basis value # noqa: E501 + + :return: The basis_value of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._basis_value + + @basis_value.setter + def basis_value(self, basis_value): + """Sets the basis_value of this DeliveryContract. + + Fair basis value # noqa: E501 + + :param basis_value: The basis_value of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._basis_value = basis_value + + @property + def basis_impact_value(self): + """Gets the basis_impact_value of this DeliveryContract. # noqa: E501 + + Funding used for calculating impact bid, ask price # noqa: E501 + + :return: The basis_impact_value of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._basis_impact_value + + @basis_impact_value.setter + def basis_impact_value(self, basis_impact_value): + """Sets the basis_impact_value of this DeliveryContract. + + Funding used for calculating impact bid, ask price # noqa: E501 + + :param basis_impact_value: The basis_impact_value of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._basis_impact_value = basis_impact_value + + @property + def settle_price(self): + """Gets the settle_price of this DeliveryContract. # noqa: E501 + + Settle price # noqa: E501 + + :return: The settle_price of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._settle_price + + @settle_price.setter + def settle_price(self, settle_price): + """Sets the settle_price of this DeliveryContract. + + Settle price # noqa: E501 + + :param settle_price: The settle_price of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._settle_price = settle_price + + @property + def settle_price_interval(self): + """Gets the settle_price_interval of this DeliveryContract. # noqa: E501 + + Settle price update interval # noqa: E501 + + :return: The settle_price_interval of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._settle_price_interval + + @settle_price_interval.setter + def settle_price_interval(self, settle_price_interval): + """Sets the settle_price_interval of this DeliveryContract. + + Settle price update interval # noqa: E501 + + :param settle_price_interval: The settle_price_interval of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._settle_price_interval = settle_price_interval + + @property + def settle_price_duration(self): + """Gets the settle_price_duration of this DeliveryContract. # noqa: E501 + + Settle price update duration in seconds # noqa: E501 + + :return: The settle_price_duration of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._settle_price_duration + + @settle_price_duration.setter + def settle_price_duration(self, settle_price_duration): + """Sets the settle_price_duration of this DeliveryContract. + + Settle price update duration in seconds # noqa: E501 + + :param settle_price_duration: The settle_price_duration of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._settle_price_duration = settle_price_duration + + @property + def expire_time(self): + """Gets the expire_time of this DeliveryContract. # noqa: E501 + + Contract expiry timestamp # noqa: E501 + + :return: The expire_time of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this DeliveryContract. + + Contract expiry timestamp # noqa: E501 + + :param expire_time: The expire_time of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._expire_time = expire_time + + @property + def risk_limit_base(self): + """Gets the risk_limit_base of this DeliveryContract. # noqa: E501 + + Risk limit base # noqa: E501 + + :return: The risk_limit_base of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._risk_limit_base + + @risk_limit_base.setter + def risk_limit_base(self, risk_limit_base): + """Sets the risk_limit_base of this DeliveryContract. + + Risk limit base # noqa: E501 + + :param risk_limit_base: The risk_limit_base of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._risk_limit_base = risk_limit_base + + @property + def risk_limit_step(self): + """Gets the risk_limit_step of this DeliveryContract. # noqa: E501 + + Step of adjusting risk limit # noqa: E501 + + :return: The risk_limit_step of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._risk_limit_step + + @risk_limit_step.setter + def risk_limit_step(self, risk_limit_step): + """Sets the risk_limit_step of this DeliveryContract. + + Step of adjusting risk limit # noqa: E501 + + :param risk_limit_step: The risk_limit_step of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._risk_limit_step = risk_limit_step + + @property + def risk_limit_max(self): + """Gets the risk_limit_max of this DeliveryContract. # noqa: E501 + + Maximum risk limit the contract allowed # noqa: E501 + + :return: The risk_limit_max of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._risk_limit_max + + @risk_limit_max.setter + def risk_limit_max(self, risk_limit_max): + """Sets the risk_limit_max of this DeliveryContract. + + Maximum risk limit the contract allowed # noqa: E501 + + :param risk_limit_max: The risk_limit_max of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._risk_limit_max = risk_limit_max + + @property + def order_size_min(self): + """Gets the order_size_min of this DeliveryContract. # noqa: E501 + + Minimum order size the contract allowed # noqa: E501 + + :return: The order_size_min of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._order_size_min + + @order_size_min.setter + def order_size_min(self, order_size_min): + """Sets the order_size_min of this DeliveryContract. + + Minimum order size the contract allowed # noqa: E501 + + :param order_size_min: The order_size_min of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._order_size_min = order_size_min + + @property + def order_size_max(self): + """Gets the order_size_max of this DeliveryContract. # noqa: E501 + + Maximum order size the contract allowed # noqa: E501 + + :return: The order_size_max of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._order_size_max + + @order_size_max.setter + def order_size_max(self, order_size_max): + """Sets the order_size_max of this DeliveryContract. + + Maximum order size the contract allowed # noqa: E501 + + :param order_size_max: The order_size_max of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._order_size_max = order_size_max + + @property + def order_price_deviate(self): + """Gets the order_price_deviate of this DeliveryContract. # noqa: E501 + + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + + :return: The order_price_deviate of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._order_price_deviate + + @order_price_deviate.setter + def order_price_deviate(self, order_price_deviate): + """Sets the order_price_deviate of this DeliveryContract. + + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + + :param order_price_deviate: The order_price_deviate of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._order_price_deviate = order_price_deviate + + @property + def ref_discount_rate(self): + """Gets the ref_discount_rate of this DeliveryContract. # noqa: E501 + + Referral fee rate discount # noqa: E501 + + :return: The ref_discount_rate of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._ref_discount_rate + + @ref_discount_rate.setter + def ref_discount_rate(self, ref_discount_rate): + """Sets the ref_discount_rate of this DeliveryContract. + + Referral fee rate discount # noqa: E501 + + :param ref_discount_rate: The ref_discount_rate of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._ref_discount_rate = ref_discount_rate + + @property + def ref_rebate_rate(self): + """Gets the ref_rebate_rate of this DeliveryContract. # noqa: E501 + + Referrer commission rate # noqa: E501 + + :return: The ref_rebate_rate of this DeliveryContract. # noqa: E501 + :rtype: str + """ + return self._ref_rebate_rate + + @ref_rebate_rate.setter + def ref_rebate_rate(self, ref_rebate_rate): + """Sets the ref_rebate_rate of this DeliveryContract. + + Referrer commission rate # noqa: E501 + + :param ref_rebate_rate: The ref_rebate_rate of this DeliveryContract. # noqa: E501 + :type: str + """ + + self._ref_rebate_rate = ref_rebate_rate + + @property + def orderbook_id(self): + """Gets the orderbook_id of this DeliveryContract. # noqa: E501 + + Current orderbook ID # noqa: E501 + + :return: The orderbook_id of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._orderbook_id + + @orderbook_id.setter + def orderbook_id(self, orderbook_id): + """Sets the orderbook_id of this DeliveryContract. + + Current orderbook ID # noqa: E501 + + :param orderbook_id: The orderbook_id of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._orderbook_id = orderbook_id + + @property + def trade_id(self): + """Gets the trade_id of this DeliveryContract. # noqa: E501 + + Current trade ID # noqa: E501 + + :return: The trade_id of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._trade_id + + @trade_id.setter + def trade_id(self, trade_id): + """Sets the trade_id of this DeliveryContract. + + Current trade ID # noqa: E501 + + :param trade_id: The trade_id of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._trade_id = trade_id + + @property + def trade_size(self): + """Gets the trade_size of this DeliveryContract. # noqa: E501 + + Historical accumulated trade size # noqa: E501 + + :return: The trade_size of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._trade_size + + @trade_size.setter + def trade_size(self, trade_size): + """Sets the trade_size of this DeliveryContract. + + Historical accumulated trade size # noqa: E501 + + :param trade_size: The trade_size of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._trade_size = trade_size + + @property + def position_size(self): + """Gets the position_size of this DeliveryContract. # noqa: E501 + + Current total long position size # noqa: E501 + + :return: The position_size of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._position_size + + @position_size.setter + def position_size(self, position_size): + """Sets the position_size of this DeliveryContract. + + Current total long position size # noqa: E501 + + :param position_size: The position_size of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._position_size = position_size + + @property + def config_change_time(self): + """Gets the config_change_time of this DeliveryContract. # noqa: E501 + + Last changed time of configuration # noqa: E501 + + :return: The config_change_time of this DeliveryContract. # noqa: E501 + :rtype: float + """ + return self._config_change_time + + @config_change_time.setter + def config_change_time(self, config_change_time): + """Sets the config_change_time of this DeliveryContract. + + Last changed time of configuration # noqa: E501 + + :param config_change_time: The config_change_time of this DeliveryContract. # noqa: E501 + :type: float + """ + + self._config_change_time = config_change_time + + @property + def in_delisting(self): + """Gets the in_delisting of this DeliveryContract. # noqa: E501 + + Contract is delisting # noqa: E501 + + :return: The in_delisting of this DeliveryContract. # noqa: E501 + :rtype: bool + """ + return self._in_delisting + + @in_delisting.setter + def in_delisting(self, in_delisting): + """Sets the in_delisting of this DeliveryContract. + + Contract is delisting # noqa: E501 + + :param in_delisting: The in_delisting of this DeliveryContract. # noqa: E501 + :type: bool + """ + + self._in_delisting = in_delisting + + @property + def orders_limit(self): + """Gets the orders_limit of this DeliveryContract. # noqa: E501 + + Maximum number of open orders # noqa: E501 + + :return: The orders_limit of this DeliveryContract. # noqa: E501 + :rtype: int + """ + return self._orders_limit + + @orders_limit.setter + def orders_limit(self, orders_limit): + """Sets the orders_limit of this DeliveryContract. + + Maximum number of open orders # noqa: E501 + + :param orders_limit: The orders_limit of this DeliveryContract. # noqa: E501 + :type: int + """ + + self._orders_limit = orders_limit + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeliveryContract): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeliveryContract): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py new file mode 100644 index 0000000..bc01b64 --- /dev/null +++ b/gate_api/models/delivery_settlement.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DeliverySettlement(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'int', + 'contract': 'str', + 'leverage': 'str', + 'size': 'int', + 'margin': 'str', + 'entry_price': 'str', + 'settle_price': 'str', + 'profit': 'str', + 'fee': 'str' + } + + attribute_map = { + 'time': 'time', + 'contract': 'contract', + 'leverage': 'leverage', + 'size': 'size', + 'margin': 'margin', + 'entry_price': 'entry_price', + 'settle_price': 'settle_price', + 'profit': 'profit', + 'fee': 'fee' + } + + def __init__(self, time=None, contract=None, leverage=None, size=None, margin=None, entry_price=None, settle_price=None, profit=None, fee=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, str, str, str, str, str, Configuration) -> None + """DeliverySettlement - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._contract = None + self._leverage = None + self._size = None + self._margin = None + self._entry_price = None + self._settle_price = None + self._profit = None + self._fee = None + self.discriminator = None + + if time is not None: + self.time = time + if contract is not None: + self.contract = contract + if leverage is not None: + self.leverage = leverage + if size is not None: + self.size = size + if margin is not None: + self.margin = margin + if entry_price is not None: + self.entry_price = entry_price + if settle_price is not None: + self.settle_price = settle_price + if profit is not None: + self.profit = profit + if fee is not None: + self.fee = fee + + @property + def time(self): + """Gets the time of this DeliverySettlement. # noqa: E501 + + Liquidation time # noqa: E501 + + :return: The time of this DeliverySettlement. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this DeliverySettlement. + + Liquidation time # noqa: E501 + + :param time: The time of this DeliverySettlement. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def contract(self): + """Gets the contract of this DeliverySettlement. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this DeliverySettlement. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this DeliverySettlement. + + Futures contract # noqa: E501 + + :param contract: The contract of this DeliverySettlement. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def leverage(self): + """Gets the leverage of this DeliverySettlement. # noqa: E501 + + Position leverage # noqa: E501 + + :return: The leverage of this DeliverySettlement. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this DeliverySettlement. + + Position leverage # noqa: E501 + + :param leverage: The leverage of this DeliverySettlement. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def size(self): + """Gets the size of this DeliverySettlement. # noqa: E501 + + Position size # noqa: E501 + + :return: The size of this DeliverySettlement. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this DeliverySettlement. + + Position size # noqa: E501 + + :param size: The size of this DeliverySettlement. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def margin(self): + """Gets the margin of this DeliverySettlement. # noqa: E501 + + Position margin # noqa: E501 + + :return: The margin of this DeliverySettlement. # noqa: E501 + :rtype: str + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this DeliverySettlement. + + Position margin # noqa: E501 + + :param margin: The margin of this DeliverySettlement. # noqa: E501 + :type: str + """ + + self._margin = margin + + @property + def entry_price(self): + """Gets the entry_price of this DeliverySettlement. # noqa: E501 + + Average entry price # noqa: E501 + + :return: The entry_price of this DeliverySettlement. # noqa: E501 + :rtype: str + """ + return self._entry_price + + @entry_price.setter + def entry_price(self, entry_price): + """Sets the entry_price of this DeliverySettlement. + + Average entry price # noqa: E501 + + :param entry_price: The entry_price of this DeliverySettlement. # noqa: E501 + :type: str + """ + + self._entry_price = entry_price + + @property + def settle_price(self): + """Gets the settle_price of this DeliverySettlement. # noqa: E501 + + Settled price # noqa: E501 + + :return: The settle_price of this DeliverySettlement. # noqa: E501 + :rtype: str + """ + return self._settle_price + + @settle_price.setter + def settle_price(self, settle_price): + """Sets the settle_price of this DeliverySettlement. + + Settled price # noqa: E501 + + :param settle_price: The settle_price of this DeliverySettlement. # noqa: E501 + :type: str + """ + + self._settle_price = settle_price + + @property + def profit(self): + """Gets the profit of this DeliverySettlement. # noqa: E501 + + Profit # noqa: E501 + + :return: The profit of this DeliverySettlement. # noqa: E501 + :rtype: str + """ + return self._profit + + @profit.setter + def profit(self, profit): + """Sets the profit of this DeliverySettlement. + + Profit # noqa: E501 + + :param profit: The profit of this DeliverySettlement. # noqa: E501 + :type: str + """ + + self._profit = profit + + @property + def fee(self): + """Gets the fee of this DeliverySettlement. # noqa: E501 + + Fee deducted # noqa: E501 + + :return: The fee of this DeliverySettlement. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this DeliverySettlement. + + Fee deducted # noqa: E501 + + :param fee: The fee of this DeliverySettlement. # noqa: E501 + :type: str + """ + + self._fee = 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, DeliverySettlement): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeliverySettlement): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py new file mode 100644 index 0000000..9601ce8 --- /dev/null +++ b/gate_api/models/deposit_address.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DepositAddress(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'address': 'str', + 'multichain_addresses': 'list[MultiChainAddressItem]' + } + + attribute_map = { + 'currency': 'currency', + 'address': 'address', + 'multichain_addresses': 'multichain_addresses' + } + + def __init__(self, currency=None, address=None, multichain_addresses=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, list[MultiChainAddressItem], Configuration) -> None + """DepositAddress - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._address = None + self._multichain_addresses = None + self.discriminator = None + + self.currency = currency + self.address = address + if multichain_addresses is not None: + self.multichain_addresses = multichain_addresses + + @property + def currency(self): + """Gets the currency of this DepositAddress. # noqa: E501 + + Currency detail # noqa: E501 + + :return: The currency of this DepositAddress. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this DepositAddress. + + Currency detail # noqa: E501 + + :param currency: The currency of this DepositAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def address(self): + """Gets the address of this DepositAddress. # noqa: E501 + + Deposit address # noqa: E501 + + :return: The address of this DepositAddress. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this DepositAddress. + + Deposit address # noqa: E501 + + :param address: The address of this DepositAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501 + raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 + + self._address = address + + @property + def multichain_addresses(self): + """Gets the multichain_addresses of this DepositAddress. # noqa: E501 + + + :return: The multichain_addresses of this DepositAddress. # noqa: E501 + :rtype: list[MultiChainAddressItem] + """ + return self._multichain_addresses + + @multichain_addresses.setter + def multichain_addresses(self, multichain_addresses): + """Sets the multichain_addresses of this DepositAddress. + + + :param multichain_addresses: The multichain_addresses of this DepositAddress. # noqa: E501 + :type: list[MultiChainAddressItem] + """ + + self._multichain_addresses = multichain_addresses + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DepositAddress): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DepositAddress): + 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 new file mode 100644 index 0000000..0112725 --- /dev/null +++ b/gate_api/models/deposit_record.py @@ -0,0 +1,378 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DepositRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'txid': 'str', + 'withdraw_order_id': 'str', + 'timestamp': 'str', + 'amount': 'str', + 'currency': 'str', + 'address': 'str', + 'memo': 'str', + 'status': 'str', + 'chain': 'str' + } + + attribute_map = { + 'id': 'id', + 'txid': 'txid', + 'withdraw_order_id': 'withdraw_order_id', + 'timestamp': 'timestamp', + 'amount': 'amount', + 'currency': 'currency', + 'address': 'address', + 'memo': 'memo', + 'status': 'status', + 'chain': 'chain' + } + + def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, amount=None, currency=None, address=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """DepositRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._txid = None + self._withdraw_order_id = None + self._timestamp = None + self._amount = None + self._currency = None + self._address = None + self._memo = None + self._status = None + self._chain = None + self.discriminator = None + + if id is not None: + self.id = id + if txid is not None: + self.txid = txid + if withdraw_order_id is not None: + self.withdraw_order_id = withdraw_order_id + if timestamp is not None: + self.timestamp = timestamp + self.amount = amount + self.currency = currency + if address is not None: + self.address = address + if memo is not None: + self.memo = memo + if status is not None: + self.status = status + self.chain = chain + + @property + def id(self): + """Gets the id of this DepositRecord. # noqa: E501 + + Record ID # noqa: E501 + + :return: The id of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DepositRecord. + + Record ID # noqa: E501 + + :param id: The id of this DepositRecord. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def txid(self): + """Gets the txid of this DepositRecord. # noqa: E501 + + Hash record of the withdrawal # noqa: E501 + + :return: The txid of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._txid + + @txid.setter + def txid(self, txid): + """Sets the txid of this DepositRecord. + + Hash record of the withdrawal # noqa: E501 + + :param txid: The txid of this DepositRecord. # noqa: E501 + :type: str + """ + + self._txid = txid + + @property + def withdraw_order_id(self): + """Gets the withdraw_order_id of this DepositRecord. # noqa: E501 + + Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :return: The withdraw_order_id of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._withdraw_order_id + + @withdraw_order_id.setter + def withdraw_order_id(self, withdraw_order_id): + """Sets the withdraw_order_id of this DepositRecord. + + Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :param withdraw_order_id: The withdraw_order_id of this DepositRecord. # noqa: E501 + :type: str + """ + + self._withdraw_order_id = withdraw_order_id + + @property + def timestamp(self): + """Gets the timestamp of this DepositRecord. # noqa: E501 + + Operation time # noqa: E501 + + :return: The timestamp of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this DepositRecord. + + Operation time # noqa: E501 + + :param timestamp: The timestamp of this DepositRecord. # noqa: E501 + :type: str + """ + + self._timestamp = timestamp + + @property + def amount(self): + """Gets the amount of this DepositRecord. # noqa: E501 + + Currency amount # noqa: E501 + + :return: The amount of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this DepositRecord. + + Currency amount # noqa: E501 + + :param amount: The amount of this DepositRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def currency(self): + """Gets the currency of this DepositRecord. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this DepositRecord. + + Currency name # noqa: E501 + + :param currency: The currency of this DepositRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def address(self): + """Gets the address of this DepositRecord. # noqa: E501 + + Withdrawal address. Required for withdrawals # noqa: E501 + + :return: The address of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this DepositRecord. + + Withdrawal address. Required for withdrawals # noqa: E501 + + :param address: The address of this DepositRecord. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def memo(self): + """Gets the memo of this DepositRecord. # noqa: E501 + + Additional remarks with regards to the withdrawal # noqa: E501 + + :return: The memo of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this DepositRecord. + + Additional remarks with regards to the withdrawal # noqa: E501 + + :param memo: The memo of this DepositRecord. # noqa: E501 + :type: str + """ + + self._memo = memo + + @property + def status(self): + """Gets the status of this DepositRecord. # noqa: E501 + + Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked # noqa: E501 + + :return: The status of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this DepositRecord. + + Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked # noqa: E501 + + :param status: The status of this DepositRecord. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def chain(self): + """Gets the chain of this DepositRecord. # noqa: E501 + + Name of the chain used in withdrawals # noqa: E501 + + :return: The chain of this DepositRecord. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this DepositRecord. + + Name of the chain used in withdrawals # noqa: E501 + + :param chain: The chain of this DepositRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and chain is None: # noqa: E501 + raise ValueError("Invalid value for `chain`, must not be `None`") # noqa: E501 + + self._chain = chain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DepositRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DepositRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py new file mode 100644 index 0000000..f6b5a2f --- /dev/null +++ b/gate_api/models/dual_get_orders.py @@ -0,0 +1,571 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DualGetOrders(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'plan_id': 'int', + 'copies': 'str', + 'invest_amount': 'str', + 'settlement_amount': 'str', + 'create_time': 'int', + 'complete_time': 'int', + 'status': 'str', + 'invest_currency': 'str', + 'exercise_currency': 'str', + 'exercise_price': 'str', + 'settlement_price': 'str', + 'settlement_currency': 'str', + 'apy_display': 'str', + 'apy_settlement': 'str', + 'delivery_time': 'int', + 'text': 'str' + } + + attribute_map = { + 'id': 'id', + 'plan_id': 'plan_id', + 'copies': 'copies', + 'invest_amount': 'invest_amount', + 'settlement_amount': 'settlement_amount', + 'create_time': 'create_time', + 'complete_time': 'complete_time', + 'status': 'status', + 'invest_currency': 'invest_currency', + 'exercise_currency': 'exercise_currency', + 'exercise_price': 'exercise_price', + 'settlement_price': 'settlement_price', + 'settlement_currency': 'settlement_currency', + 'apy_display': 'apy_display', + 'apy_settlement': 'apy_settlement', + 'delivery_time': 'delivery_time', + 'text': 'text' + } + + def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settlement_amount=None, create_time=None, complete_time=None, status=None, invest_currency=None, exercise_currency=None, exercise_price=None, settlement_price=None, settlement_currency=None, apy_display=None, apy_settlement=None, delivery_time=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, int, int, str, str, str, str, str, str, str, str, int, str, Configuration) -> None + """DualGetOrders - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._plan_id = None + self._copies = None + self._invest_amount = None + self._settlement_amount = None + self._create_time = None + self._complete_time = None + self._status = None + self._invest_currency = None + self._exercise_currency = None + self._exercise_price = None + self._settlement_price = None + self._settlement_currency = None + self._apy_display = None + self._apy_settlement = None + self._delivery_time = None + self._text = None + self.discriminator = None + + if id is not None: + self.id = id + if plan_id is not None: + self.plan_id = plan_id + if copies is not None: + self.copies = copies + if invest_amount is not None: + self.invest_amount = invest_amount + if settlement_amount is not None: + self.settlement_amount = settlement_amount + if create_time is not None: + self.create_time = create_time + if complete_time is not None: + self.complete_time = complete_time + if status is not None: + self.status = status + if invest_currency is not None: + self.invest_currency = invest_currency + if exercise_currency is not None: + self.exercise_currency = exercise_currency + if exercise_price is not None: + self.exercise_price = exercise_price + if settlement_price is not None: + self.settlement_price = settlement_price + if settlement_currency is not None: + self.settlement_currency = settlement_currency + if apy_display is not None: + self.apy_display = apy_display + if apy_settlement is not None: + self.apy_settlement = apy_settlement + if delivery_time is not None: + self.delivery_time = delivery_time + if text is not None: + self.text = text + + @property + def id(self): + """Gets the id of this DualGetOrders. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this DualGetOrders. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DualGetOrders. + + Order ID # noqa: E501 + + :param id: The id of this DualGetOrders. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def plan_id(self): + """Gets the plan_id of this DualGetOrders. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The plan_id of this DualGetOrders. # noqa: E501 + :rtype: int + """ + return self._plan_id + + @plan_id.setter + def plan_id(self, plan_id): + """Sets the plan_id of this DualGetOrders. + + Plan ID # noqa: E501 + + :param plan_id: The plan_id of this DualGetOrders. # noqa: E501 + :type: int + """ + + self._plan_id = plan_id + + @property + def copies(self): + """Gets the copies of this DualGetOrders. # noqa: E501 + + Copies # 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. + + Copies # noqa: E501 + + :param copies: The copies of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._copies = copies + + @property + def invest_amount(self): + """Gets the invest_amount of this DualGetOrders. # noqa: E501 + + Investment Amount # noqa: E501 + + :return: The invest_amount of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._invest_amount + + @invest_amount.setter + def invest_amount(self, invest_amount): + """Sets the invest_amount of this DualGetOrders. + + Investment Amount # noqa: E501 + + :param invest_amount: The invest_amount of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._invest_amount = invest_amount + + @property + def settlement_amount(self): + """Gets the settlement_amount of this DualGetOrders. # noqa: E501 + + Settlement Amount # noqa: E501 + + :return: The settlement_amount of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._settlement_amount + + @settlement_amount.setter + def settlement_amount(self, settlement_amount): + """Sets the settlement_amount of this DualGetOrders. + + Settlement Amount # noqa: E501 + + :param settlement_amount: The settlement_amount of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._settlement_amount = settlement_amount + + @property + def create_time(self): + """Gets the create_time of this DualGetOrders. # noqa: E501 + + Creation time # noqa: E501 + + :return: The create_time of this DualGetOrders. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this DualGetOrders. + + Creation time # noqa: E501 + + :param create_time: The create_time of this DualGetOrders. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def complete_time(self): + """Gets the complete_time of this DualGetOrders. # noqa: E501 + + Completion Time # noqa: E501 + + :return: The complete_time of this DualGetOrders. # noqa: E501 + :rtype: int + """ + return self._complete_time + + @complete_time.setter + def complete_time(self, complete_time): + """Sets the complete_time of this DualGetOrders. + + Completion Time # noqa: E501 + + :param complete_time: The complete_time of this DualGetOrders. # noqa: E501 + :type: int + """ + + self._complete_time = complete_time + + @property + def status(self): + """Gets the status of this DualGetOrders. # noqa: E501 + + Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 + + :return: The status of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this DualGetOrders. + + Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 + + :param status: The status of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def invest_currency(self): + """Gets the invest_currency of this DualGetOrders. # noqa: E501 + + Investment Currency # noqa: E501 + + :return: The invest_currency of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._invest_currency + + @invest_currency.setter + def invest_currency(self, invest_currency): + """Sets the invest_currency of this DualGetOrders. + + Investment Currency # noqa: E501 + + :param invest_currency: The invest_currency of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._invest_currency = invest_currency + + @property + def exercise_currency(self): + """Gets the exercise_currency of this DualGetOrders. # noqa: E501 + + Strike Currency # noqa: E501 + + :return: The exercise_currency of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._exercise_currency + + @exercise_currency.setter + def exercise_currency(self, exercise_currency): + """Sets the exercise_currency of this DualGetOrders. + + Strike Currency # noqa: E501 + + :param exercise_currency: The exercise_currency of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._exercise_currency = exercise_currency + + @property + def exercise_price(self): + """Gets the exercise_price of this DualGetOrders. # noqa: E501 + + Strike price # noqa: E501 + + :return: The exercise_price of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._exercise_price + + @exercise_price.setter + def exercise_price(self, exercise_price): + """Sets the exercise_price of this DualGetOrders. + + Strike price # noqa: E501 + + :param exercise_price: The exercise_price of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._exercise_price = exercise_price + + @property + def settlement_price(self): + """Gets the settlement_price of this DualGetOrders. # noqa: E501 + + settlement price # noqa: E501 + + :return: The settlement_price of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._settlement_price + + @settlement_price.setter + def settlement_price(self, settlement_price): + """Sets the settlement_price of this DualGetOrders. + + settlement price # noqa: E501 + + :param settlement_price: The settlement_price of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._settlement_price = settlement_price + + @property + def settlement_currency(self): + """Gets the settlement_currency of this DualGetOrders. # noqa: E501 + + Settle currency # noqa: E501 + + :return: The settlement_currency of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._settlement_currency + + @settlement_currency.setter + def settlement_currency(self, settlement_currency): + """Sets the settlement_currency of this DualGetOrders. + + Settle currency # noqa: E501 + + :param settlement_currency: The settlement_currency of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._settlement_currency = settlement_currency + + @property + def apy_display(self): + """Gets the apy_display of this DualGetOrders. # noqa: E501 + + APY # noqa: E501 + + :return: The apy_display of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._apy_display + + @apy_display.setter + def apy_display(self, apy_display): + """Sets the apy_display of this DualGetOrders. + + APY # noqa: E501 + + :param apy_display: The apy_display of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._apy_display = apy_display + + @property + def apy_settlement(self): + """Gets the apy_settlement of this DualGetOrders. # noqa: E501 + + Settlement APY # noqa: E501 + + :return: The apy_settlement of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._apy_settlement + + @apy_settlement.setter + def apy_settlement(self, apy_settlement): + """Sets the apy_settlement of this DualGetOrders. + + Settlement APY # noqa: E501 + + :param apy_settlement: The apy_settlement of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._apy_settlement = apy_settlement + + @property + def delivery_time(self): + """Gets the delivery_time of this DualGetOrders. # noqa: E501 + + Settlement time # noqa: E501 + + :return: The delivery_time of this DualGetOrders. # noqa: E501 + :rtype: int + """ + return self._delivery_time + + @delivery_time.setter + def delivery_time(self, delivery_time): + """Sets the delivery_time of this DualGetOrders. + + Settlement time # noqa: E501 + + :param delivery_time: The delivery_time of this DualGetOrders. # noqa: E501 + :type: int + """ + + self._delivery_time = delivery_time + + @property + def text(self): + """Gets the text of this DualGetOrders. # noqa: E501 + + Custom order information # noqa: E501 + + :return: The text of this DualGetOrders. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this DualGetOrders. + + Custom order information # noqa: E501 + + :param text: The text of this DualGetOrders. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DualGetOrders): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DualGetOrders): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py new file mode 100644 index 0000000..e1319ed --- /dev/null +++ b/gate_api/models/dual_get_plans.py @@ -0,0 +1,459 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DualGetPlans(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'instrument_name': 'str', + 'invest_currency': 'str', + 'exercise_currency': 'str', + 'exercise_price': 'float', + 'delivery_time': 'int', + 'min_copies': 'int', + 'max_copies': 'int', + 'per_value': 'str', + 'apy_display': 'str', + 'start_time': 'int', + 'end_time': 'int', + 'status': 'str' + } + + attribute_map = { + 'id': 'id', + 'instrument_name': 'instrument_name', + 'invest_currency': 'invest_currency', + 'exercise_currency': 'exercise_currency', + 'exercise_price': 'exercise_price', + 'delivery_time': 'delivery_time', + 'min_copies': 'min_copies', + 'max_copies': 'max_copies', + 'per_value': 'per_value', + 'apy_display': 'apy_display', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'status': 'status' + } + + def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise_currency=None, exercise_price=None, delivery_time=None, min_copies=None, max_copies=None, per_value=None, apy_display=None, start_time=None, end_time=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, float, int, int, int, str, str, int, int, str, Configuration) -> None + """DualGetPlans - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._instrument_name = None + self._invest_currency = None + self._exercise_currency = None + self._exercise_price = None + self._delivery_time = None + self._min_copies = None + self._max_copies = None + self._per_value = None + self._apy_display = None + self._start_time = None + self._end_time = None + self._status = None + self.discriminator = None + + if id is not None: + self.id = id + if instrument_name is not None: + self.instrument_name = instrument_name + if invest_currency is not None: + self.invest_currency = invest_currency + if exercise_currency is not None: + self.exercise_currency = exercise_currency + if exercise_price is not None: + self.exercise_price = exercise_price + if delivery_time is not None: + self.delivery_time = delivery_time + if min_copies is not None: + self.min_copies = min_copies + if max_copies is not None: + self.max_copies = max_copies + if per_value is not None: + self.per_value = per_value + if apy_display is not None: + self.apy_display = apy_display + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if status is not None: + self.status = status + + @property + def id(self): + """Gets the id of this DualGetPlans. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The id of this DualGetPlans. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DualGetPlans. + + Plan ID # noqa: E501 + + :param id: The id of this DualGetPlans. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def instrument_name(self): + """Gets the instrument_name of this DualGetPlans. # noqa: E501 + + Instrument Name # noqa: E501 + + :return: The instrument_name of this DualGetPlans. # noqa: E501 + :rtype: str + """ + return self._instrument_name + + @instrument_name.setter + def instrument_name(self, instrument_name): + """Sets the instrument_name of this DualGetPlans. + + Instrument Name # noqa: E501 + + :param instrument_name: The instrument_name of this DualGetPlans. # noqa: E501 + :type: str + """ + + self._instrument_name = instrument_name + + @property + def invest_currency(self): + """Gets the invest_currency of this DualGetPlans. # noqa: E501 + + Investment Currency # noqa: E501 + + :return: The invest_currency of this DualGetPlans. # noqa: E501 + :rtype: str + """ + return self._invest_currency + + @invest_currency.setter + def invest_currency(self, invest_currency): + """Sets the invest_currency of this DualGetPlans. + + Investment Currency # noqa: E501 + + :param invest_currency: The invest_currency of this DualGetPlans. # noqa: E501 + :type: str + """ + + self._invest_currency = invest_currency + + @property + def exercise_currency(self): + """Gets the exercise_currency of this DualGetPlans. # noqa: E501 + + Strike Currency # noqa: E501 + + :return: The exercise_currency of this DualGetPlans. # noqa: E501 + :rtype: str + """ + return self._exercise_currency + + @exercise_currency.setter + def exercise_currency(self, exercise_currency): + """Sets the exercise_currency of this DualGetPlans. + + Strike Currency # noqa: E501 + + :param exercise_currency: The exercise_currency of this DualGetPlans. # noqa: E501 + :type: str + """ + + self._exercise_currency = exercise_currency + + @property + def exercise_price(self): + """Gets the exercise_price of this DualGetPlans. # noqa: E501 + + Strike price # noqa: E501 + + :return: The exercise_price of this DualGetPlans. # noqa: E501 + :rtype: float + """ + return self._exercise_price + + @exercise_price.setter + def exercise_price(self, exercise_price): + """Sets the exercise_price of this DualGetPlans. + + Strike price # noqa: E501 + + :param exercise_price: The exercise_price of this DualGetPlans. # noqa: E501 + :type: float + """ + + self._exercise_price = exercise_price + + @property + def delivery_time(self): + """Gets the delivery_time of this DualGetPlans. # noqa: E501 + + Settlement time # noqa: E501 + + :return: The delivery_time of this DualGetPlans. # noqa: E501 + :rtype: int + """ + return self._delivery_time + + @delivery_time.setter + def delivery_time(self, delivery_time): + """Sets the delivery_time of this DualGetPlans. + + Settlement time # noqa: E501 + + :param delivery_time: The delivery_time of this DualGetPlans. # noqa: E501 + :type: int + """ + + self._delivery_time = delivery_time + + @property + def min_copies(self): + """Gets the min_copies of this DualGetPlans. # noqa: E501 + + Minimum Copies # 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 Copies # 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 Copies # 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 Copies # 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 + + Per Unit Value # noqa: E501 + + :return: The per_value of this DualGetPlans. # noqa: E501 + :rtype: str + """ + return self._per_value + + @per_value.setter + def per_value(self, per_value): + """Sets the per_value of this DualGetPlans. + + Per Unit Value # noqa: E501 + + :param per_value: The per_value of this DualGetPlans. # noqa: E501 + :type: str + """ + + self._per_value = per_value + + @property + def apy_display(self): + """Gets the apy_display of this DualGetPlans. # noqa: E501 + + APY # noqa: E501 + + :return: The apy_display of this DualGetPlans. # noqa: E501 + :rtype: str + """ + return self._apy_display + + @apy_display.setter + def apy_display(self, apy_display): + """Sets the apy_display of this DualGetPlans. + + APY # noqa: E501 + + :param apy_display: The apy_display of this DualGetPlans. # noqa: E501 + :type: str + """ + + self._apy_display = apy_display + + @property + def start_time(self): + """Gets the start_time of this DualGetPlans. # noqa: E501 + + start time # noqa: E501 + + :return: The start_time of this DualGetPlans. # noqa: E501 + :rtype: int + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this DualGetPlans. + + start time # noqa: E501 + + :param start_time: The start_time of this DualGetPlans. # noqa: E501 + :type: int + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this DualGetPlans. # noqa: E501 + + Finished time # noqa: E501 + + :return: The end_time of this DualGetPlans. # noqa: E501 + :rtype: int + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this DualGetPlans. + + Finished time # noqa: E501 + + :param end_time: The end_time of this DualGetPlans. # noqa: E501 + :type: int + """ + + self._end_time = end_time + + @property + def status(self): + """Gets the status of this DualGetPlans. # noqa: E501 + + Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-ended # noqa: E501 + + :return: The status of this DualGetPlans. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this DualGetPlans. + + Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-ended # noqa: E501 + + :param status: The status of this DualGetPlans. # noqa: E501 + :type: str + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DualGetPlans): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DualGetPlans): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py new file mode 100644 index 0000000..3e78f7c --- /dev/null +++ b/gate_api/models/eth2_rate_list.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Eth2RateList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'date_time': 'int', + 'date': 'str', + 'rate': 'str' + } + + attribute_map = { + 'date_time': 'date_time', + 'date': 'date', + 'rate': 'rate' + } + + def __init__(self, date_time=None, date=None, rate=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, Configuration) -> None + """Eth2RateList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._date_time = None + self._date = None + self._rate = None + self.discriminator = None + + if date_time is not None: + self.date_time = date_time + if date is not None: + self.date = date + if rate is not None: + self.rate = rate + + @property + def date_time(self): + """Gets the date_time of this Eth2RateList. # noqa: E501 + + Date and Time Stamp # noqa: E501 + + :return: The date_time of this Eth2RateList. # noqa: E501 + :rtype: int + """ + return self._date_time + + @date_time.setter + def date_time(self, date_time): + """Sets the date_time of this Eth2RateList. + + Date and Time Stamp # noqa: E501 + + :param date_time: The date_time of this Eth2RateList. # noqa: E501 + :type: int + """ + + self._date_time = date_time + + @property + def date(self): + """Gets the date of this Eth2RateList. # noqa: E501 + + Date # noqa: E501 + + :return: The date of this Eth2RateList. # noqa: E501 + :rtype: str + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this Eth2RateList. + + Date # noqa: E501 + + :param date: The date of this Eth2RateList. # noqa: E501 + :type: str + """ + + self._date = date + + @property + def rate(self): + """Gets the rate of this Eth2RateList. # noqa: E501 + + percentage # noqa: E501 + + :return: The rate of this Eth2RateList. # noqa: E501 + :rtype: str + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this Eth2RateList. + + percentage # noqa: E501 + + :param rate: The rate of this Eth2RateList. # noqa: E501 + :type: str + """ + + self._rate = rate + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Eth2RateList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Eth2RateList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py new file mode 100644 index 0000000..23a2a8e --- /dev/null +++ b/gate_api/models/eth2_swap.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Eth2Swap(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'side': 'str', + 'amount': 'str' + } + + attribute_map = { + 'side': 'side', + 'amount': 'amount' + } + + def __init__(self, side=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """Eth2Swap - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._side = None + self._amount = None + self.discriminator = None + + self.side = side + self.amount = amount + + @property + def side(self): + """Gets the side of this Eth2Swap. # noqa: E501 + + 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) # noqa: E501 + + :return: The side of this Eth2Swap. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this Eth2Swap. + + 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) # noqa: E501 + + :param side: The side of this Eth2Swap. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 + raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501 + + self._side = side + + @property + def amount(self): + """Gets the amount of this Eth2Swap. # noqa: E501 + + amount # noqa: E501 + + :return: The amount of this Eth2Swap. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Eth2Swap. + + amount # noqa: E501 + + :param amount: The amount of this Eth2Swap. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Eth2Swap): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Eth2Swap): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py new file mode 100644 index 0000000..fe52683 --- /dev/null +++ b/gate_api/models/flash_swap_currency_pair.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FlashSwapCurrencyPair(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'sell_currency': 'str', + 'buy_currency': 'str', + 'sell_min_amount': 'str', + 'sell_max_amount': 'str', + 'buy_min_amount': 'str', + 'buy_max_amount': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'sell_currency': 'sell_currency', + 'buy_currency': 'buy_currency', + 'sell_min_amount': 'sell_min_amount', + 'sell_max_amount': 'sell_max_amount', + 'buy_min_amount': 'buy_min_amount', + 'buy_max_amount': 'buy_max_amount' + } + + def __init__(self, currency_pair=None, sell_currency=None, buy_currency=None, sell_min_amount=None, sell_max_amount=None, buy_min_amount=None, buy_max_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, Configuration) -> None + """FlashSwapCurrencyPair - a 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._sell_currency = None + self._buy_currency = None + self._sell_min_amount = None + self._sell_max_amount = None + self._buy_min_amount = None + self._buy_max_amount = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if sell_currency is not None: + self.sell_currency = sell_currency + if buy_currency is not None: + self.buy_currency = buy_currency + if sell_min_amount is not None: + self.sell_min_amount = sell_min_amount + if sell_max_amount is not None: + self.sell_max_amount = sell_max_amount + if buy_min_amount is not None: + self.buy_min_amount = buy_min_amount + if buy_max_amount is not None: + self.buy_max_amount = buy_max_amount + + @property + def currency_pair(self): + """Gets the currency_pair of this FlashSwapCurrencyPair. # noqa: E501 + + The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501 + + :return: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this FlashSwapCurrencyPair. + + The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501 + + :param currency_pair: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def sell_currency(self): + """Gets the sell_currency of this FlashSwapCurrencyPair. # noqa: E501 + + The currency to be sold # noqa: E501 + + :return: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._sell_currency + + @sell_currency.setter + def sell_currency(self, sell_currency): + """Sets the sell_currency of this FlashSwapCurrencyPair. + + The currency to be sold # noqa: E501 + + :param sell_currency: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 + :type: str + """ + + self._sell_currency = sell_currency + + @property + def buy_currency(self): + """Gets the buy_currency of this FlashSwapCurrencyPair. # noqa: E501 + + The currency to be bought # noqa: E501 + + :return: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._buy_currency + + @buy_currency.setter + def buy_currency(self, buy_currency): + """Sets the buy_currency of this FlashSwapCurrencyPair. + + The currency to be bought # noqa: E501 + + :param buy_currency: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 + :type: str + """ + + self._buy_currency = buy_currency + + @property + def sell_min_amount(self): + """Gets the sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 + + The minimum quantity required for selling # noqa: E501 + + :return: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._sell_min_amount + + @sell_min_amount.setter + def sell_min_amount(self, sell_min_amount): + """Sets the sell_min_amount of this FlashSwapCurrencyPair. + + The minimum quantity required for selling # noqa: E501 + + :param sell_min_amount: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 + :type: str + """ + + self._sell_min_amount = sell_min_amount + + @property + def sell_max_amount(self): + """Gets the sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 + + The maximum quantity allowed for selling # noqa: E501 + + :return: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._sell_max_amount + + @sell_max_amount.setter + def sell_max_amount(self, sell_max_amount): + """Sets the sell_max_amount of this FlashSwapCurrencyPair. + + The maximum quantity allowed for selling # noqa: E501 + + :param sell_max_amount: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 + :type: str + """ + + self._sell_max_amount = sell_max_amount + + @property + def buy_min_amount(self): + """Gets the buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 + + The minimum quantity required for buying # noqa: E501 + + :return: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._buy_min_amount + + @buy_min_amount.setter + def buy_min_amount(self, buy_min_amount): + """Sets the buy_min_amount of this FlashSwapCurrencyPair. + + The minimum quantity required for buying # noqa: E501 + + :param buy_min_amount: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 + :type: str + """ + + self._buy_min_amount = buy_min_amount + + @property + def buy_max_amount(self): + """Gets the buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 + + The maximum quantity allowed for buying # noqa: E501 + + :return: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._buy_max_amount + + @buy_max_amount.setter + def buy_max_amount(self, buy_max_amount): + """Sets the buy_max_amount of this FlashSwapCurrencyPair. + + The maximum quantity allowed for buying # noqa: E501 + + :param buy_max_amount: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 + :type: str + """ + + self._buy_max_amount = buy_max_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, FlashSwapCurrencyPair): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlashSwapCurrencyPair): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py new file mode 100644 index 0000000..e50d55f --- /dev/null +++ b/gate_api/models/flash_swap_order.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FlashSwapOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'create_time': 'int', + 'user_id': 'int', + 'sell_currency': 'str', + 'sell_amount': 'str', + 'buy_currency': 'str', + 'buy_amount': 'str', + 'price': 'str', + 'status': 'int' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'create_time', + 'user_id': 'user_id', + 'sell_currency': 'sell_currency', + 'sell_amount': 'sell_amount', + 'buy_currency': 'buy_currency', + 'buy_amount': 'buy_amount', + 'price': 'price', + 'status': 'status' + } + + def __init__(self, id=None, create_time=None, user_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, price=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, str, str, str, str, str, int, Configuration) -> None + """FlashSwapOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._create_time = None + self._user_id = None + self._sell_currency = None + self._sell_amount = None + self._buy_currency = None + self._buy_amount = None + self._price = None + self._status = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if user_id is not None: + self.user_id = user_id + if sell_currency is not None: + self.sell_currency = sell_currency + if sell_amount is not None: + self.sell_amount = sell_amount + if buy_currency is not None: + self.buy_currency = buy_currency + if buy_amount is not None: + self.buy_amount = buy_amount + if price is not None: + self.price = price + if status is not None: + self.status = status + + @property + def id(self): + """Gets the id of this FlashSwapOrder. # noqa: E501 + + Flash swap order ID # noqa: E501 + + :return: The id of this FlashSwapOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FlashSwapOrder. + + Flash swap order ID # noqa: E501 + + :param id: The id of this FlashSwapOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this FlashSwapOrder. # noqa: E501 + + Creation time of order (in milliseconds) # noqa: E501 + + :return: The create_time of this FlashSwapOrder. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FlashSwapOrder. + + Creation time of order (in milliseconds) # noqa: E501 + + :param create_time: The create_time of this FlashSwapOrder. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def user_id(self): + """Gets the user_id of this FlashSwapOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this FlashSwapOrder. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this FlashSwapOrder. + + User ID # noqa: E501 + + :param user_id: The user_id of this FlashSwapOrder. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def sell_currency(self): + """Gets the sell_currency of this FlashSwapOrder. # noqa: E501 + + Currency to sell # noqa: E501 + + :return: The sell_currency of this FlashSwapOrder. # noqa: E501 + :rtype: str + """ + return self._sell_currency + + @sell_currency.setter + def sell_currency(self, sell_currency): + """Sets the sell_currency of this FlashSwapOrder. + + Currency to sell # noqa: E501 + + :param sell_currency: The sell_currency of this FlashSwapOrder. # noqa: E501 + :type: str + """ + + self._sell_currency = sell_currency + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapOrder. # noqa: E501 + + Amount to sell # noqa: E501 + + :return: The sell_amount of this FlashSwapOrder. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapOrder. + + Amount to sell # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapOrder. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def buy_currency(self): + """Gets the buy_currency of this FlashSwapOrder. # noqa: E501 + + Currency to buy # noqa: E501 + + :return: The buy_currency of this FlashSwapOrder. # noqa: E501 + :rtype: str + """ + return self._buy_currency + + @buy_currency.setter + def buy_currency(self, buy_currency): + """Sets the buy_currency of this FlashSwapOrder. + + Currency to buy # noqa: E501 + + :param buy_currency: The buy_currency of this FlashSwapOrder. # noqa: E501 + :type: str + """ + + self._buy_currency = buy_currency + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapOrder. # noqa: E501 + + Amount to buy # noqa: E501 + + :return: The buy_amount of this FlashSwapOrder. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapOrder. + + Amount to buy # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapOrder. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_amount + + @property + def price(self): + """Gets the price of this FlashSwapOrder. # noqa: E501 + + Price # noqa: E501 + + :return: The price of this FlashSwapOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FlashSwapOrder. + + Price # noqa: E501 + + :param price: The price of this FlashSwapOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def status(self): + """Gets the status of this FlashSwapOrder. # noqa: E501 + + Flash swap order status `1` - success `2` - failure # noqa: E501 + + :return: The status of this FlashSwapOrder. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FlashSwapOrder. + + Flash swap order status `1` - success `2` - failure # noqa: E501 + + :param status: The status of this FlashSwapOrder. # noqa: E501 + :type: int + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FlashSwapOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlashSwapOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py new file mode 100644 index 0000000..b0e582c --- /dev/null +++ b/gate_api/models/flash_swap_order_preview.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FlashSwapOrderPreview(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'preview_id': 'str', + 'sell_currency': 'str', + 'sell_amount': 'str', + 'buy_currency': 'str', + 'buy_amount': 'str', + 'price': 'str' + } + + attribute_map = { + 'preview_id': 'preview_id', + 'sell_currency': 'sell_currency', + 'sell_amount': 'sell_amount', + 'buy_currency': 'buy_currency', + 'buy_amount': 'buy_amount', + 'price': 'price' + } + + def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, price=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """FlashSwapOrderPreview - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._preview_id = None + self._sell_currency = None + self._sell_amount = None + self._buy_currency = None + self._buy_amount = None + self._price = None + self.discriminator = None + + if preview_id is not None: + self.preview_id = preview_id + if sell_currency is not None: + self.sell_currency = sell_currency + if sell_amount is not None: + self.sell_amount = sell_amount + if buy_currency is not None: + self.buy_currency = buy_currency + if buy_amount is not None: + self.buy_amount = buy_amount + if price is not None: + self.price = price + + @property + def preview_id(self): + """Gets the preview_id of this FlashSwapOrderPreview. # noqa: E501 + + Preview result ID # noqa: E501 + + :return: The preview_id of this FlashSwapOrderPreview. # noqa: E501 + :rtype: str + """ + return self._preview_id + + @preview_id.setter + def preview_id(self, preview_id): + """Sets the preview_id of this FlashSwapOrderPreview. + + Preview result ID # noqa: E501 + + :param preview_id: The preview_id of this FlashSwapOrderPreview. # noqa: E501 + :type: str + """ + + self._preview_id = preview_id + + @property + def sell_currency(self): + """Gets the sell_currency of this FlashSwapOrderPreview. # noqa: E501 + + Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + + :return: The sell_currency of this FlashSwapOrderPreview. # noqa: E501 + :rtype: str + """ + return self._sell_currency + + @sell_currency.setter + def sell_currency(self, sell_currency): + """Sets the sell_currency of this FlashSwapOrderPreview. + + Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + + :param sell_currency: The sell_currency of this FlashSwapOrderPreview. # noqa: E501 + :type: str + """ + + self._sell_currency = sell_currency + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapOrderPreview. # noqa: E501 + + Amount to sell # noqa: E501 + + :return: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapOrderPreview. + + Amount to sell # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def buy_currency(self): + """Gets the buy_currency of this FlashSwapOrderPreview. # noqa: E501 + + Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + + :return: The buy_currency of this FlashSwapOrderPreview. # noqa: E501 + :rtype: str + """ + return self._buy_currency + + @buy_currency.setter + def buy_currency(self, buy_currency): + """Sets the buy_currency of this FlashSwapOrderPreview. + + Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + + :param buy_currency: The buy_currency of this FlashSwapOrderPreview. # noqa: E501 + :type: str + """ + + self._buy_currency = buy_currency + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapOrderPreview. # noqa: E501 + + Amount to buy # noqa: E501 + + :return: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapOrderPreview. + + Amount to buy # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_amount + + @property + def price(self): + """Gets the price of this FlashSwapOrderPreview. # noqa: E501 + + Price # noqa: E501 + + :return: The price of this FlashSwapOrderPreview. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FlashSwapOrderPreview. + + Price # noqa: E501 + + :param price: The price of this FlashSwapOrderPreview. # 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, FlashSwapOrderPreview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlashSwapOrderPreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py new file mode 100644 index 0000000..7ce00f8 --- /dev/null +++ b/gate_api/models/flash_swap_order_request.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FlashSwapOrderRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'preview_id': 'str', + 'sell_currency': 'str', + 'sell_amount': 'str', + 'buy_currency': 'str', + 'buy_amount': 'str' + } + + attribute_map = { + 'preview_id': 'preview_id', + 'sell_currency': 'sell_currency', + 'sell_amount': 'sell_amount', + 'buy_currency': 'buy_currency', + 'buy_amount': 'buy_amount' + } + + def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """FlashSwapOrderRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._preview_id = None + self._sell_currency = None + self._sell_amount = None + self._buy_currency = None + self._buy_amount = None + self.discriminator = None + + self.preview_id = preview_id + self.sell_currency = sell_currency + self.sell_amount = sell_amount + self.buy_currency = buy_currency + self.buy_amount = buy_amount + + @property + def preview_id(self): + """Gets the preview_id of this FlashSwapOrderRequest. # noqa: E501 + + Preview result ID # noqa: E501 + + :return: The preview_id of this FlashSwapOrderRequest. # noqa: E501 + :rtype: str + """ + return self._preview_id + + @preview_id.setter + def preview_id(self, preview_id): + """Sets the preview_id of this FlashSwapOrderRequest. + + Preview result ID # noqa: E501 + + :param preview_id: The preview_id of this FlashSwapOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and preview_id is None: # noqa: E501 + raise ValueError("Invalid value for `preview_id`, must not be `None`") # noqa: E501 + + self._preview_id = preview_id + + @property + def sell_currency(self): + """Gets the sell_currency of this FlashSwapOrderRequest. # noqa: E501 + + The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + + :return: The sell_currency of this FlashSwapOrderRequest. # noqa: E501 + :rtype: str + """ + return self._sell_currency + + @sell_currency.setter + def sell_currency(self, sell_currency): + """Sets the sell_currency of this FlashSwapOrderRequest. + + The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + + :param sell_currency: The sell_currency of this FlashSwapOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_currency is None: # noqa: E501 + raise ValueError("Invalid value for `sell_currency`, must not be `None`") # noqa: E501 + + self._sell_currency = sell_currency + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapOrderRequest. # noqa: E501 + + Amount to sell (based on the preview result) # noqa: E501 + + :return: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapOrderRequest. + + Amount to sell (based on the preview result) # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_amount is None: # noqa: E501 + raise ValueError("Invalid value for `sell_amount`, must not be `None`") # noqa: E501 + + self._sell_amount = sell_amount + + @property + def buy_currency(self): + """Gets the buy_currency of this FlashSwapOrderRequest. # noqa: E501 + + The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + + :return: The buy_currency of this FlashSwapOrderRequest. # noqa: E501 + :rtype: str + """ + return self._buy_currency + + @buy_currency.setter + def buy_currency(self, buy_currency): + """Sets the buy_currency of this FlashSwapOrderRequest. + + The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + + :param buy_currency: The buy_currency of this FlashSwapOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_currency is None: # noqa: E501 + raise ValueError("Invalid value for `buy_currency`, must not be `None`") # noqa: E501 + + self._buy_currency = buy_currency + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapOrderRequest. # noqa: E501 + + Amount to buy (based on the preview result) # noqa: E501 + + :return: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapOrderRequest. + + Amount to buy (based on the preview result) # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_amount is None: # noqa: E501 + raise ValueError("Invalid value for `buy_amount`, must not be `None`") # noqa: E501 + + self._buy_amount = buy_amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FlashSwapOrderRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlashSwapOrderRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py new file mode 100644 index 0000000..1905832 --- /dev/null +++ b/gate_api/models/flash_swap_preview_request.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FlashSwapPreviewRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'sell_currency': 'str', + 'sell_amount': 'str', + 'buy_currency': 'str', + 'buy_amount': 'str' + } + + attribute_map = { + 'sell_currency': 'sell_currency', + 'sell_amount': 'sell_amount', + 'buy_currency': 'buy_currency', + 'buy_amount': 'buy_amount' + } + + def __init__(self, sell_currency=None, sell_amount=None, buy_currency=None, buy_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """FlashSwapPreviewRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._sell_currency = None + self._sell_amount = None + self._buy_currency = None + self._buy_amount = None + self.discriminator = None + + self.sell_currency = sell_currency + if sell_amount is not None: + self.sell_amount = sell_amount + self.buy_currency = buy_currency + if buy_amount is not None: + self.buy_amount = buy_amount + + @property + def sell_currency(self): + """Gets the sell_currency of this FlashSwapPreviewRequest. # noqa: E501 + + The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + + :return: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501 + :rtype: str + """ + return self._sell_currency + + @sell_currency.setter + def sell_currency(self, sell_currency): + """Sets the sell_currency of this FlashSwapPreviewRequest. + + The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + + :param sell_currency: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sell_currency is None: # noqa: E501 + raise ValueError("Invalid value for `sell_currency`, must not be `None`") # noqa: E501 + + self._sell_currency = sell_currency + + @property + def sell_amount(self): + """Gets the sell_amount of this FlashSwapPreviewRequest. # noqa: E501 + + Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 + + :return: The sell_amount of this FlashSwapPreviewRequest. # noqa: E501 + :rtype: str + """ + return self._sell_amount + + @sell_amount.setter + def sell_amount(self, sell_amount): + """Sets the sell_amount of this FlashSwapPreviewRequest. + + Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 + + :param sell_amount: The sell_amount of this FlashSwapPreviewRequest. # noqa: E501 + :type: str + """ + + self._sell_amount = sell_amount + + @property + def buy_currency(self): + """Gets the buy_currency of this FlashSwapPreviewRequest. # noqa: E501 + + The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + + :return: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501 + :rtype: str + """ + return self._buy_currency + + @buy_currency.setter + def buy_currency(self, buy_currency): + """Sets the buy_currency of this FlashSwapPreviewRequest. + + The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + + :param buy_currency: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and buy_currency is None: # noqa: E501 + raise ValueError("Invalid value for `buy_currency`, must not be `None`") # noqa: E501 + + self._buy_currency = buy_currency + + @property + def buy_amount(self): + """Gets the buy_amount of this FlashSwapPreviewRequest. # noqa: E501 + + Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 + + :return: The buy_amount of this FlashSwapPreviewRequest. # noqa: E501 + :rtype: str + """ + return self._buy_amount + + @buy_amount.setter + def buy_amount(self, buy_amount): + """Sets the buy_amount of this FlashSwapPreviewRequest. + + Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` # noqa: E501 + + :param buy_amount: The buy_amount of this FlashSwapPreviewRequest. # noqa: E501 + :type: str + """ + + self._buy_amount = buy_amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FlashSwapPreviewRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlashSwapPreviewRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py new file mode 100644 index 0000000..19cbfb6 --- /dev/null +++ b/gate_api/models/funding_account.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FundingAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'lent': 'str', + 'total_lent': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'available': 'available', + 'locked': 'locked', + 'lent': 'lent', + 'total_lent': 'total_lent' + } + + def __init__(self, currency=None, available=None, locked=None, lent=None, total_lent=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """FundingAccount - a 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._lent = None + self._total_lent = 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 lent is not None: + self.lent = lent + if total_lent is not None: + self.total_lent = total_lent + + @property + def currency(self): + """Gets the currency of this FundingAccount. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this FundingAccount. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this FundingAccount. + + Currency name # noqa: E501 + + :param currency: The currency of this FundingAccount. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def available(self): + """Gets the available of this FundingAccount. # noqa: E501 + + Available assets to lend, which is identical to spot account `available` # noqa: E501 + + :return: The available of this FundingAccount. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this FundingAccount. + + Available assets to lend, which is identical to spot account `available` # noqa: E501 + + :param available: The available of this FundingAccount. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def locked(self): + """Gets the locked of this FundingAccount. # noqa: E501 + + Locked amount. i.e. amount in `open` loans # noqa: E501 + + :return: The locked of this FundingAccount. # noqa: E501 + :rtype: str + """ + return self._locked + + @locked.setter + def locked(self, locked): + """Sets the locked of this FundingAccount. + + Locked amount. i.e. amount in `open` loans # noqa: E501 + + :param locked: The locked of this FundingAccount. # noqa: E501 + :type: str + """ + + self._locked = locked + + @property + def lent(self): + """Gets the lent of this FundingAccount. # noqa: E501 + + Outstanding loan amount yet to be repaid # noqa: E501 + + :return: The lent of this FundingAccount. # noqa: E501 + :rtype: str + """ + return self._lent + + @lent.setter + def lent(self, lent): + """Sets the lent of this FundingAccount. + + Outstanding loan amount yet to be repaid # noqa: E501 + + :param lent: The lent of this FundingAccount. # noqa: E501 + :type: str + """ + + self._lent = lent + + @property + def total_lent(self): + """Gets the total_lent of this FundingAccount. # noqa: E501 + + Amount used for lending. total_lent = lent + locked # noqa: E501 + + :return: The total_lent of this FundingAccount. # noqa: E501 + :rtype: str + """ + return self._total_lent + + @total_lent.setter + def total_lent(self, total_lent): + """Sets the total_lent of this FundingAccount. + + Amount used for lending. total_lent = lent + locked # noqa: E501 + + :param total_lent: The total_lent of this FundingAccount. # noqa: E501 + :type: str + """ + + self._total_lent = total_lent + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FundingAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FundingAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py new file mode 100644 index 0000000..840509d --- /dev/null +++ b/gate_api/models/funding_rate_record.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FundingRateRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 't': 'int', + 'r': 'str' + } + + attribute_map = { + 't': 't', + 'r': 'r' + } + + def __init__(self, t=None, r=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """FundingRateRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._t = None + self._r = None + self.discriminator = None + + if t is not None: + self.t = t + if r is not None: + self.r = r + + @property + def t(self): + """Gets the t of this FundingRateRecord. # noqa: E501 + + Unix timestamp in seconds # noqa: E501 + + :return: The t of this FundingRateRecord. # noqa: E501 + :rtype: int + """ + return self._t + + @t.setter + def t(self, t): + """Sets the t of this FundingRateRecord. + + Unix timestamp in seconds # noqa: E501 + + :param t: The t of this FundingRateRecord. # noqa: E501 + :type: int + """ + + self._t = t + + @property + def r(self): + """Gets the r of this FundingRateRecord. # noqa: E501 + + Funding rate # noqa: E501 + + :return: The r of this FundingRateRecord. # noqa: E501 + :rtype: str + """ + return self._r + + @r.setter + def r(self, r): + """Sets the r of this FundingRateRecord. + + Funding rate # noqa: E501 + + :param r: The r of this FundingRateRecord. # noqa: E501 + :type: str + """ + + self._r = r + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FundingRateRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FundingRateRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py new file mode 100644 index 0000000..836de56 --- /dev/null +++ b/gate_api/models/future_cancel_order_result.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FutureCancelOrderResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'int', + 'succeeded': 'bool', + 'message': 'str' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'user_id', + 'succeeded': 'succeeded', + 'message': 'message' + } + + def __init__(self, id=None, user_id=None, succeeded=None, message=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, bool, str, Configuration) -> None + """FutureCancelOrderResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._succeeded = None + self._message = None + self.discriminator = None + + if id is not None: + self.id = id + if user_id is not None: + self.user_id = user_id + if succeeded is not None: + self.succeeded = succeeded + if message is not None: + self.message = message + + @property + def id(self): + """Gets the id of this FutureCancelOrderResult. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this FutureCancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FutureCancelOrderResult. + + Order ID # noqa: E501 + + :param id: The id of this FutureCancelOrderResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this FutureCancelOrderResult. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this FutureCancelOrderResult. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this FutureCancelOrderResult. + + User ID # noqa: E501 + + :param user_id: The user_id of this FutureCancelOrderResult. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def succeeded(self): + """Gets the succeeded of this FutureCancelOrderResult. # noqa: E501 + + Whether cancellation succeeded # noqa: E501 + + :return: The succeeded of this FutureCancelOrderResult. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this FutureCancelOrderResult. + + Whether cancellation succeeded # noqa: E501 + + :param succeeded: The succeeded of this FutureCancelOrderResult. # noqa: E501 + :type: bool + """ + + self._succeeded = succeeded + + @property + def message(self): + """Gets the message of this FutureCancelOrderResult. # noqa: E501 + + Error message when failed to cancel the order; empty if succeeded # noqa: E501 + + :return: The message of this FutureCancelOrderResult. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FutureCancelOrderResult. + + Error message when failed to cancel the order; empty if succeeded # noqa: E501 + + :param message: The message of this FutureCancelOrderResult. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FutureCancelOrderResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FutureCancelOrderResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py new file mode 100644 index 0000000..e1a6095 --- /dev/null +++ b/gate_api/models/futures_account.py @@ -0,0 +1,793 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'str', + 'unrealised_pnl': 'str', + 'position_margin': 'str', + 'order_margin': 'str', + 'available': 'str', + 'point': 'str', + 'currency': 'str', + 'in_dual_mode': 'bool', + 'enable_credit': 'bool', + 'position_initial_margin': 'str', + 'maintenance_margin': 'str', + 'bonus': 'str', + 'enable_evolved_classic': 'bool', + 'cross_order_margin': 'str', + 'cross_initial_margin': 'str', + 'cross_maintenance_margin': 'str', + 'cross_unrealised_pnl': 'str', + 'cross_available': 'str', + 'cross_margin_balance': 'str', + 'cross_mmr': 'str', + 'cross_imr': 'str', + 'isolated_position_margin': 'str', + 'enable_new_dual_mode': 'bool', + 'margin_mode': 'int', + 'history': 'FuturesAccountHistory' + } + + attribute_map = { + 'total': 'total', + 'unrealised_pnl': 'unrealised_pnl', + 'position_margin': 'position_margin', + 'order_margin': 'order_margin', + 'available': 'available', + 'point': 'point', + 'currency': 'currency', + 'in_dual_mode': 'in_dual_mode', + 'enable_credit': 'enable_credit', + 'position_initial_margin': 'position_initial_margin', + 'maintenance_margin': 'maintenance_margin', + 'bonus': 'bonus', + 'enable_evolved_classic': 'enable_evolved_classic', + 'cross_order_margin': 'cross_order_margin', + 'cross_initial_margin': 'cross_initial_margin', + 'cross_maintenance_margin': 'cross_maintenance_margin', + 'cross_unrealised_pnl': 'cross_unrealised_pnl', + 'cross_available': 'cross_available', + 'cross_margin_balance': 'cross_margin_balance', + 'cross_mmr': 'cross_mmr', + 'cross_imr': 'cross_imr', + 'isolated_position_margin': 'isolated_position_margin', + 'enable_new_dual_mode': 'enable_new_dual_mode', + 'margin_mode': 'margin_mode', + 'history': 'history' + } + + def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_margin=None, available=None, point=None, currency=None, in_dual_mode=None, enable_credit=None, position_initial_margin=None, maintenance_margin=None, bonus=None, enable_evolved_classic=None, cross_order_margin=None, cross_initial_margin=None, cross_maintenance_margin=None, cross_unrealised_pnl=None, cross_available=None, cross_margin_balance=None, cross_mmr=None, cross_imr=None, isolated_position_margin=None, enable_new_dual_mode=None, margin_mode=None, history=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, bool, bool, str, str, str, bool, str, str, str, str, str, str, str, str, str, bool, int, FuturesAccountHistory, Configuration) -> None + """FuturesAccount - a 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._unrealised_pnl = None + self._position_margin = None + self._order_margin = None + self._available = None + self._point = None + self._currency = None + self._in_dual_mode = None + self._enable_credit = None + self._position_initial_margin = None + self._maintenance_margin = None + self._bonus = None + self._enable_evolved_classic = None + self._cross_order_margin = None + self._cross_initial_margin = None + self._cross_maintenance_margin = None + self._cross_unrealised_pnl = None + self._cross_available = None + self._cross_margin_balance = None + self._cross_mmr = None + self._cross_imr = None + self._isolated_position_margin = None + self._enable_new_dual_mode = None + self._margin_mode = None + self._history = None + self.discriminator = None + + if total is not None: + self.total = total + if unrealised_pnl is not None: + self.unrealised_pnl = unrealised_pnl + if position_margin is not None: + self.position_margin = position_margin + if order_margin is not None: + self.order_margin = order_margin + if available is not None: + self.available = available + if point is not None: + self.point = point + if currency is not None: + self.currency = currency + if in_dual_mode is not None: + self.in_dual_mode = in_dual_mode + if enable_credit is not None: + self.enable_credit = enable_credit + if position_initial_margin is not None: + self.position_initial_margin = position_initial_margin + if maintenance_margin is not None: + self.maintenance_margin = maintenance_margin + if bonus is not None: + self.bonus = bonus + if enable_evolved_classic is not None: + self.enable_evolved_classic = enable_evolved_classic + if cross_order_margin is not None: + self.cross_order_margin = cross_order_margin + if cross_initial_margin is not None: + self.cross_initial_margin = cross_initial_margin + if cross_maintenance_margin is not None: + self.cross_maintenance_margin = cross_maintenance_margin + if cross_unrealised_pnl is not None: + self.cross_unrealised_pnl = cross_unrealised_pnl + if cross_available is not None: + self.cross_available = cross_available + if cross_margin_balance is not None: + self.cross_margin_balance = cross_margin_balance + if cross_mmr is not None: + self.cross_mmr = cross_mmr + if cross_imr is not None: + self.cross_imr = cross_imr + if isolated_position_margin is not None: + self.isolated_position_margin = isolated_position_margin + if enable_new_dual_mode is not None: + self.enable_new_dual_mode = enable_new_dual_mode + if margin_mode is not None: + self.margin_mode = margin_mode + if history is not None: + self.history = history + + @property + def total(self): + """Gets the total of this FuturesAccount. # noqa: E501 + + total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) # noqa: E501 + + :return: The total of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this FuturesAccount. + + total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) # noqa: E501 + + :param total: The total of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._total = total + + @property + def unrealised_pnl(self): + """Gets the unrealised_pnl of this FuturesAccount. # noqa: E501 + + Unrealized PNL # noqa: E501 + + :return: The unrealised_pnl of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._unrealised_pnl + + @unrealised_pnl.setter + def unrealised_pnl(self, unrealised_pnl): + """Sets the unrealised_pnl of this FuturesAccount. + + Unrealized PNL # noqa: E501 + + :param unrealised_pnl: The unrealised_pnl of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._unrealised_pnl = unrealised_pnl + + @property + def position_margin(self): + """Gets the position_margin of this FuturesAccount. # noqa: E501 + + Position margin # noqa: E501 + + :return: The position_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._position_margin + + @position_margin.setter + def position_margin(self, position_margin): + """Sets the position_margin of this FuturesAccount. + + Position margin # noqa: E501 + + :param position_margin: The position_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._position_margin = position_margin + + @property + def order_margin(self): + """Gets the order_margin of this FuturesAccount. # noqa: E501 + + Order margin of unfinished orders # noqa: E501 + + :return: The order_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._order_margin + + @order_margin.setter + def order_margin(self, order_margin): + """Sets the order_margin of this FuturesAccount. + + Order margin of unfinished orders # noqa: E501 + + :param order_margin: The order_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._order_margin = order_margin + + @property + def available(self): + """Gets the available of this FuturesAccount. # noqa: E501 + + The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 + + :return: The available of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this FuturesAccount. + + The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 + + :param available: The available of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def point(self): + """Gets the point of this FuturesAccount. # noqa: E501 + + POINT amount # noqa: E501 + + :return: The point of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._point + + @point.setter + def point(self, point): + """Sets the point of this FuturesAccount. + + POINT amount # noqa: E501 + + :param point: The point of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._point = point + + @property + def currency(self): + """Gets the currency of this FuturesAccount. # noqa: E501 + + Settle currency # noqa: E501 + + :return: The currency of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this FuturesAccount. + + Settle currency # noqa: E501 + + :param currency: The currency of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def in_dual_mode(self): + """Gets the in_dual_mode of this FuturesAccount. # noqa: E501 + + Whether dual mode is enabled # noqa: E501 + + :return: The in_dual_mode of this FuturesAccount. # noqa: E501 + :rtype: bool + """ + return self._in_dual_mode + + @in_dual_mode.setter + def in_dual_mode(self, in_dual_mode): + """Sets the in_dual_mode of this FuturesAccount. + + Whether dual mode is enabled # noqa: E501 + + :param in_dual_mode: The in_dual_mode of this FuturesAccount. # noqa: E501 + :type: bool + """ + + self._in_dual_mode = in_dual_mode + + @property + def enable_credit(self): + """Gets the enable_credit of this FuturesAccount. # noqa: E501 + + Whether portfolio margin account mode is enabled # noqa: E501 + + :return: The enable_credit of this FuturesAccount. # noqa: E501 + :rtype: bool + """ + return self._enable_credit + + @enable_credit.setter + def enable_credit(self, enable_credit): + """Sets the enable_credit of this FuturesAccount. + + Whether portfolio margin account mode is enabled # noqa: E501 + + :param enable_credit: The enable_credit of this FuturesAccount. # noqa: E501 + :type: bool + """ + + self._enable_credit = enable_credit + + @property + def position_initial_margin(self): + """Gets the position_initial_margin of this FuturesAccount. # noqa: E501 + + Initial margin position, applicable to the portfolio margin account model # noqa: E501 + + :return: The position_initial_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._position_initial_margin + + @position_initial_margin.setter + def position_initial_margin(self, position_initial_margin): + """Sets the position_initial_margin of this FuturesAccount. + + Initial margin position, applicable to the portfolio margin account model # noqa: E501 + + :param position_initial_margin: The position_initial_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._position_initial_margin = position_initial_margin + + @property + def maintenance_margin(self): + """Gets the maintenance_margin of this FuturesAccount. # noqa: E501 + + The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model # noqa: E501 + + :return: The maintenance_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._maintenance_margin + + @maintenance_margin.setter + def maintenance_margin(self, maintenance_margin): + """Sets the maintenance_margin of this FuturesAccount. + + The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model # noqa: E501 + + :param maintenance_margin: The maintenance_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._maintenance_margin = maintenance_margin + + @property + def bonus(self): + """Gets the bonus of this FuturesAccount. # noqa: E501 + + Perpetual Contract Bonus # noqa: E501 + + :return: The bonus of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._bonus + + @bonus.setter + def bonus(self, bonus): + """Sets the bonus of this FuturesAccount. + + Perpetual Contract Bonus # noqa: E501 + + :param bonus: The bonus of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._bonus = bonus + + @property + def enable_evolved_classic(self): + """Gets the enable_evolved_classic of this FuturesAccount. # noqa: E501 + + Classic account margin mode, true-new mode, false-old mode # noqa: E501 + + :return: The enable_evolved_classic of this FuturesAccount. # noqa: E501 + :rtype: bool + """ + return self._enable_evolved_classic + + @enable_evolved_classic.setter + def enable_evolved_classic(self, enable_evolved_classic): + """Sets the enable_evolved_classic of this FuturesAccount. + + Classic account margin mode, true-new mode, false-old mode # noqa: E501 + + :param enable_evolved_classic: The enable_evolved_classic of this FuturesAccount. # noqa: E501 + :type: bool + """ + + self._enable_evolved_classic = enable_evolved_classic + + @property + def cross_order_margin(self): + """Gets the cross_order_margin of this FuturesAccount. # noqa: E501 + + Full -warehouse hanging order deposit, suitable for the new classic account margin model # noqa: E501 + + :return: The cross_order_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_order_margin + + @cross_order_margin.setter + def cross_order_margin(self, cross_order_margin): + """Sets the cross_order_margin of this FuturesAccount. + + Full -warehouse hanging order deposit, suitable for the new classic account margin model # noqa: E501 + + :param cross_order_margin: The cross_order_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_order_margin = cross_order_margin + + @property + def cross_initial_margin(self): + """Gets the cross_initial_margin of this FuturesAccount. # noqa: E501 + + The initial security deposit of the full warehouse is suitable for the new classic account margin model # noqa: E501 + + :return: The cross_initial_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_initial_margin + + @cross_initial_margin.setter + def cross_initial_margin(self, cross_initial_margin): + """Sets the cross_initial_margin of this FuturesAccount. + + The initial security deposit of the full warehouse is suitable for the new classic account margin model # noqa: E501 + + :param cross_initial_margin: The cross_initial_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_initial_margin = cross_initial_margin + + @property + def cross_maintenance_margin(self): + """Gets the cross_maintenance_margin of this FuturesAccount. # noqa: E501 + + Maintain deposit in full warehouse, suitable for new classic account margin models # noqa: E501 + + :return: The cross_maintenance_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_maintenance_margin + + @cross_maintenance_margin.setter + def cross_maintenance_margin(self, cross_maintenance_margin): + """Sets the cross_maintenance_margin of this FuturesAccount. + + Maintain deposit in full warehouse, suitable for new classic account margin models # noqa: E501 + + :param cross_maintenance_margin: The cross_maintenance_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_maintenance_margin = cross_maintenance_margin + + @property + def cross_unrealised_pnl(self): + """Gets the cross_unrealised_pnl of this FuturesAccount. # noqa: E501 + + The full warehouse does not achieve profit and loss, suitable for the new classic account margin model # noqa: E501 + + :return: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_unrealised_pnl + + @cross_unrealised_pnl.setter + def cross_unrealised_pnl(self, cross_unrealised_pnl): + """Sets the cross_unrealised_pnl of this FuturesAccount. + + The full warehouse does not achieve profit and loss, suitable for the new classic account margin model # noqa: E501 + + :param cross_unrealised_pnl: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_unrealised_pnl = cross_unrealised_pnl + + @property + def cross_available(self): + """Gets the cross_available of this FuturesAccount. # noqa: E501 + + Full warehouse available amount, suitable for the new classic account margin model # noqa: E501 + + :return: The cross_available of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_available + + @cross_available.setter + def cross_available(self, cross_available): + """Sets the cross_available of this FuturesAccount. + + Full warehouse available amount, suitable for the new classic account margin model # noqa: E501 + + :param cross_available: The cross_available of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_available = cross_available + + @property + def cross_margin_balance(self): + """Gets the cross_margin_balance of this FuturesAccount. # noqa: E501 + + Full margin balance, suitable for the new classic account margin model # noqa: E501 + + :return: The cross_margin_balance of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_margin_balance + + @cross_margin_balance.setter + def cross_margin_balance(self, cross_margin_balance): + """Sets the cross_margin_balance of this FuturesAccount. + + Full margin balance, suitable for the new classic account margin model # noqa: E501 + + :param cross_margin_balance: The cross_margin_balance of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_margin_balance = cross_margin_balance + + @property + def cross_mmr(self): + """Gets the cross_mmr of this FuturesAccount. # noqa: E501 + + Maintain margin ratio for the full position, suitable for the new classic account margin model # noqa: E501 + + :return: The cross_mmr of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_mmr + + @cross_mmr.setter + def cross_mmr(self, cross_mmr): + """Sets the cross_mmr of this FuturesAccount. + + Maintain margin ratio for the full position, suitable for the new classic account margin model # noqa: E501 + + :param cross_mmr: The cross_mmr of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_mmr = cross_mmr + + @property + def cross_imr(self): + """Gets the cross_imr of this FuturesAccount. # noqa: E501 + + The initial margin rate of the full position is suitable for the new classic account margin model # noqa: E501 + + :return: The cross_imr of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._cross_imr + + @cross_imr.setter + def cross_imr(self, cross_imr): + """Sets the cross_imr of this FuturesAccount. + + The initial margin rate of the full position is suitable for the new classic account margin model # noqa: E501 + + :param cross_imr: The cross_imr of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._cross_imr = cross_imr + + @property + def isolated_position_margin(self): + """Gets the isolated_position_margin of this FuturesAccount. # noqa: E501 + + Ware -position margin, suitable for the new classic account margin model # noqa: E501 + + :return: The isolated_position_margin of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._isolated_position_margin + + @isolated_position_margin.setter + def isolated_position_margin(self, isolated_position_margin): + """Sets the isolated_position_margin of this FuturesAccount. + + Ware -position margin, suitable for the new classic account margin model # noqa: E501 + + :param isolated_position_margin: The isolated_position_margin of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._isolated_position_margin = isolated_position_margin + + @property + def enable_new_dual_mode(self): + """Gets the enable_new_dual_mode of this FuturesAccount. # noqa: E501 + + Whether to open a new two-way position mode # noqa: E501 + + :return: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 + :rtype: bool + """ + return self._enable_new_dual_mode + + @enable_new_dual_mode.setter + def enable_new_dual_mode(self, enable_new_dual_mode): + """Sets the enable_new_dual_mode of this FuturesAccount. + + Whether to open a new two-way position mode # noqa: E501 + + :param enable_new_dual_mode: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 + :type: bool + """ + + self._enable_new_dual_mode = enable_new_dual_mode + + @property + def margin_mode(self): + """Gets the margin_mode of this FuturesAccount. # noqa: E501 + + Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode # noqa: E501 + + :return: The margin_mode of this FuturesAccount. # noqa: E501 + :rtype: int + """ + return self._margin_mode + + @margin_mode.setter + def margin_mode(self, margin_mode): + """Sets the margin_mode of this FuturesAccount. + + Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode # noqa: E501 + + :param margin_mode: The margin_mode of this FuturesAccount. # noqa: E501 + :type: int + """ + + self._margin_mode = margin_mode + + @property + def history(self): + """Gets the history of this FuturesAccount. # noqa: E501 + + + :return: The history of this FuturesAccount. # noqa: E501 + :rtype: FuturesAccountHistory + """ + return self._history + + @history.setter + def history(self, history): + """Sets the history of this FuturesAccount. + + + :param history: The history of this FuturesAccount. # noqa: E501 + :type: FuturesAccountHistory + """ + + self._history = history + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py new file mode 100644 index 0000000..558f5e9 --- /dev/null +++ b/gate_api/models/futures_account_book.py @@ -0,0 +1,325 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesAccountBook(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'float', + 'change': 'str', + 'balance': 'str', + 'type': 'str', + 'text': 'str', + 'contract': 'str', + 'trade_id': 'str', + 'id': 'str' + } + + attribute_map = { + 'time': 'time', + 'change': 'change', + 'balance': 'balance', + 'type': 'type', + 'text': 'text', + 'contract': 'contract', + 'trade_id': 'trade_id', + 'id': 'id' + } + + def __init__(self, time=None, change=None, balance=None, type=None, text=None, contract=None, trade_id=None, id=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, str, str, str, str, str, str, Configuration) -> None + """FuturesAccountBook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._change = None + self._balance = None + self._type = None + self._text = None + self._contract = None + self._trade_id = None + self._id = None + self.discriminator = None + + if time is not None: + self.time = time + if change is not None: + self.change = change + if balance is not None: + self.balance = balance + if type is not None: + self.type = type + if text is not None: + self.text = text + if contract is not None: + self.contract = contract + if trade_id is not None: + self.trade_id = trade_id + if id is not None: + self.id = id + + @property + def time(self): + """Gets the time of this FuturesAccountBook. # noqa: E501 + + Change time # noqa: E501 + + :return: The time of this FuturesAccountBook. # noqa: E501 + :rtype: float + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this FuturesAccountBook. + + Change time # noqa: E501 + + :param time: The time of this FuturesAccountBook. # noqa: E501 + :type: float + """ + + self._time = time + + @property + def change(self): + """Gets the change of this FuturesAccountBook. # noqa: E501 + + Change amount # noqa: E501 + + :return: The change of this FuturesAccountBook. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this FuturesAccountBook. + + Change amount # noqa: E501 + + :param change: The change of this FuturesAccountBook. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def balance(self): + """Gets the balance of this FuturesAccountBook. # noqa: E501 + + Balance after change # noqa: E501 + + :return: The balance of this FuturesAccountBook. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this FuturesAccountBook. + + Balance after change # noqa: E501 + + :param balance: The balance of this FuturesAccountBook. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def type(self): + """Gets the type of this FuturesAccountBook. # noqa: E501 + + Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 + + :return: The type of this FuturesAccountBook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this FuturesAccountBook. + + Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 + + :param type: The type of this FuturesAccountBook. # noqa: E501 + :type: str + """ + allowed_values = ["dnw", "pnl", "fee", "refr", "fund", "point_dnw", "point_fee", "point_refr", "bonus_offset"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def text(self): + """Gets the text of this FuturesAccountBook. # noqa: E501 + + Comment # noqa: E501 + + :return: The text of this FuturesAccountBook. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this FuturesAccountBook. + + Comment # noqa: E501 + + :param text: The text of this FuturesAccountBook. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def contract(self): + """Gets the contract of this FuturesAccountBook. # noqa: E501 + + Futures contract, the field is only available for data after 2023-10-30. # noqa: E501 + + :return: The contract of this FuturesAccountBook. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesAccountBook. + + Futures contract, the field is only available for data after 2023-10-30. # noqa: E501 + + :param contract: The contract of this FuturesAccountBook. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def trade_id(self): + """Gets the trade_id of this FuturesAccountBook. # noqa: E501 + + trade id # noqa: E501 + + :return: The trade_id of this FuturesAccountBook. # noqa: E501 + :rtype: str + """ + return self._trade_id + + @trade_id.setter + def trade_id(self, trade_id): + """Sets the trade_id of this FuturesAccountBook. + + trade id # noqa: E501 + + :param trade_id: The trade_id of this FuturesAccountBook. # noqa: E501 + :type: str + """ + + self._trade_id = trade_id + + @property + def id(self): + """Gets the id of this FuturesAccountBook. # noqa: E501 + + 账户变更记录 id # noqa: E501 + + :return: The id of this FuturesAccountBook. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FuturesAccountBook. + + 账户变更记录 id # noqa: E501 + + :param id: The id of this FuturesAccountBook. # noqa: E501 + :type: str + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesAccountBook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesAccountBook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py new file mode 100644 index 0000000..86fa0c3 --- /dev/null +++ b/gate_api/models/futures_account_history.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesAccountHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'dnw': 'str', + 'pnl': 'str', + 'fee': 'str', + 'refr': 'str', + 'fund': 'str', + 'point_dnw': 'str', + 'point_fee': 'str', + 'point_refr': 'str', + 'bonus_dnw': 'str', + 'bonus_offset': 'str' + } + + attribute_map = { + 'dnw': 'dnw', + 'pnl': 'pnl', + 'fee': 'fee', + 'refr': 'refr', + 'fund': 'fund', + 'point_dnw': 'point_dnw', + 'point_fee': 'point_fee', + 'point_refr': 'point_refr', + 'bonus_dnw': 'bonus_dnw', + 'bonus_offset': 'bonus_offset' + } + + def __init__(self, dnw=None, pnl=None, fee=None, refr=None, fund=None, point_dnw=None, point_fee=None, point_refr=None, bonus_dnw=None, bonus_offset=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """FuturesAccountHistory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._dnw = None + self._pnl = None + self._fee = None + self._refr = None + self._fund = None + self._point_dnw = None + self._point_fee = None + self._point_refr = None + self._bonus_dnw = None + self._bonus_offset = None + self.discriminator = None + + if dnw is not None: + self.dnw = dnw + if pnl is not None: + self.pnl = pnl + if fee is not None: + self.fee = fee + if refr is not None: + self.refr = refr + if fund is not None: + self.fund = fund + if point_dnw is not None: + self.point_dnw = point_dnw + if point_fee is not None: + self.point_fee = point_fee + if point_refr is not None: + self.point_refr = point_refr + if bonus_dnw is not None: + self.bonus_dnw = bonus_dnw + if bonus_offset is not None: + self.bonus_offset = bonus_offset + + @property + def dnw(self): + """Gets the dnw of this FuturesAccountHistory. # noqa: E501 + + total amount of deposit and withdraw # noqa: E501 + + :return: The dnw of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._dnw + + @dnw.setter + def dnw(self, dnw): + """Sets the dnw of this FuturesAccountHistory. + + total amount of deposit and withdraw # noqa: E501 + + :param dnw: The dnw of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._dnw = dnw + + @property + def pnl(self): + """Gets the pnl of this FuturesAccountHistory. # noqa: E501 + + total amount of trading profit and loss # noqa: E501 + + :return: The pnl of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._pnl + + @pnl.setter + def pnl(self, pnl): + """Sets the pnl of this FuturesAccountHistory. + + total amount of trading profit and loss # noqa: E501 + + :param pnl: The pnl of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._pnl = pnl + + @property + def fee(self): + """Gets the fee of this FuturesAccountHistory. # noqa: E501 + + total amount of fee # noqa: E501 + + :return: The fee of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this FuturesAccountHistory. + + total amount of fee # noqa: E501 + + :param fee: The fee of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def refr(self): + """Gets the refr of this FuturesAccountHistory. # noqa: E501 + + total amount of referrer rebates # noqa: E501 + + :return: The refr of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._refr + + @refr.setter + def refr(self, refr): + """Sets the refr of this FuturesAccountHistory. + + total amount of referrer rebates # noqa: E501 + + :param refr: The refr of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._refr = refr + + @property + def fund(self): + """Gets the fund of this FuturesAccountHistory. # noqa: E501 + + total amount of funding costs # noqa: E501 + + :return: The fund of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._fund + + @fund.setter + def fund(self, fund): + """Sets the fund of this FuturesAccountHistory. + + total amount of funding costs # noqa: E501 + + :param fund: The fund of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._fund = fund + + @property + def point_dnw(self): + """Gets the point_dnw of this FuturesAccountHistory. # noqa: E501 + + total amount of point deposit and withdraw # noqa: E501 + + :return: The point_dnw of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._point_dnw + + @point_dnw.setter + def point_dnw(self, point_dnw): + """Sets the point_dnw of this FuturesAccountHistory. + + total amount of point deposit and withdraw # noqa: E501 + + :param point_dnw: The point_dnw of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._point_dnw = point_dnw + + @property + def point_fee(self): + """Gets the point_fee of this FuturesAccountHistory. # noqa: E501 + + total amount of point fee # noqa: E501 + + :return: The point_fee of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._point_fee + + @point_fee.setter + def point_fee(self, point_fee): + """Sets the point_fee of this FuturesAccountHistory. + + total amount of point fee # noqa: E501 + + :param point_fee: The point_fee of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._point_fee = point_fee + + @property + def point_refr(self): + """Gets the point_refr of this FuturesAccountHistory. # noqa: E501 + + total amount of referrer rebates of point fee # noqa: E501 + + :return: The point_refr of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._point_refr + + @point_refr.setter + def point_refr(self, point_refr): + """Sets the point_refr of this FuturesAccountHistory. + + total amount of referrer rebates of point fee # noqa: E501 + + :param point_refr: The point_refr of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._point_refr = point_refr + + @property + def bonus_dnw(self): + """Gets the bonus_dnw of this FuturesAccountHistory. # noqa: E501 + + total amount of perpetual contract bonus transfer # noqa: E501 + + :return: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._bonus_dnw + + @bonus_dnw.setter + def bonus_dnw(self, bonus_dnw): + """Sets the bonus_dnw of this FuturesAccountHistory. + + total amount of perpetual contract bonus transfer # noqa: E501 + + :param bonus_dnw: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._bonus_dnw = bonus_dnw + + @property + def bonus_offset(self): + """Gets the bonus_offset of this FuturesAccountHistory. # noqa: E501 + + total amount of perpetual contract bonus deduction # noqa: E501 + + :return: The bonus_offset of this FuturesAccountHistory. # noqa: E501 + :rtype: str + """ + return self._bonus_offset + + @bonus_offset.setter + def bonus_offset(self, bonus_offset): + """Sets the bonus_offset of this FuturesAccountHistory. + + total amount of perpetual contract bonus deduction # noqa: E501 + + :param bonus_offset: The bonus_offset of this FuturesAccountHistory. # noqa: E501 + :type: str + """ + + self._bonus_offset = bonus_offset + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesAccountHistory): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesAccountHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py new file mode 100644 index 0000000..2a70fbf --- /dev/null +++ b/gate_api/models/futures_auto_deleverage.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesAutoDeleverage(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'int', + 'user': 'int', + 'order_id': 'int', + 'contract': 'str', + 'leverage': 'str', + 'cross_leverage_limit': 'str', + 'entry_price': 'str', + 'fill_price': 'str', + 'trade_size': 'int', + 'position_size': 'int' + } + + attribute_map = { + 'time': 'time', + 'user': 'user', + 'order_id': 'order_id', + 'contract': 'contract', + 'leverage': 'leverage', + 'cross_leverage_limit': 'cross_leverage_limit', + 'entry_price': 'entry_price', + 'fill_price': 'fill_price', + 'trade_size': 'trade_size', + 'position_size': 'position_size' + } + + def __init__(self, time=None, user=None, order_id=None, contract=None, leverage=None, cross_leverage_limit=None, entry_price=None, fill_price=None, trade_size=None, position_size=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, str, str, str, str, str, int, int, Configuration) -> None + """FuturesAutoDeleverage - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._user = None + self._order_id = None + self._contract = None + self._leverage = None + self._cross_leverage_limit = None + self._entry_price = None + self._fill_price = None + self._trade_size = None + self._position_size = None + self.discriminator = None + + if time is not None: + self.time = time + if user is not None: + self.user = user + if order_id is not None: + self.order_id = order_id + if contract is not None: + self.contract = contract + if leverage is not None: + self.leverage = leverage + if cross_leverage_limit is not None: + self.cross_leverage_limit = cross_leverage_limit + if entry_price is not None: + self.entry_price = entry_price + if fill_price is not None: + self.fill_price = fill_price + if trade_size is not None: + self.trade_size = trade_size + if position_size is not None: + self.position_size = position_size + + @property + def time(self): + """Gets the time of this FuturesAutoDeleverage. # noqa: E501 + + Automatic deleveraging time # noqa: E501 + + :return: The time of this FuturesAutoDeleverage. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this FuturesAutoDeleverage. + + Automatic deleveraging time # noqa: E501 + + :param time: The time of this FuturesAutoDeleverage. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def user(self): + """Gets the user of this FuturesAutoDeleverage. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this FuturesAutoDeleverage. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this FuturesAutoDeleverage. + + User ID # noqa: E501 + + :param user: The user of this FuturesAutoDeleverage. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def order_id(self): + """Gets the order_id of this FuturesAutoDeleverage. # noqa: E501 + + Order ID. Order IDs before 2023-02-20 are null # noqa: E501 + + :return: The order_id of this FuturesAutoDeleverage. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this FuturesAutoDeleverage. + + Order ID. Order IDs before 2023-02-20 are null # noqa: E501 + + :param order_id: The order_id of this FuturesAutoDeleverage. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def contract(self): + """Gets the contract of this FuturesAutoDeleverage. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesAutoDeleverage. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesAutoDeleverage. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesAutoDeleverage. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def leverage(self): + """Gets the leverage of this FuturesAutoDeleverage. # noqa: E501 + + Position leverage # noqa: E501 + + :return: The leverage of this FuturesAutoDeleverage. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this FuturesAutoDeleverage. + + Position leverage # noqa: E501 + + :param leverage: The leverage of this FuturesAutoDeleverage. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def cross_leverage_limit(self): + """Gets the cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 + + Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + + :return: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 + :rtype: str + """ + return self._cross_leverage_limit + + @cross_leverage_limit.setter + def cross_leverage_limit(self, cross_leverage_limit): + """Sets the cross_leverage_limit of this FuturesAutoDeleverage. + + Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + + :param cross_leverage_limit: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 + :type: str + """ + + self._cross_leverage_limit = cross_leverage_limit + + @property + def entry_price(self): + """Gets the entry_price of this FuturesAutoDeleverage. # noqa: E501 + + Average entry price # noqa: E501 + + :return: The entry_price of this FuturesAutoDeleverage. # noqa: E501 + :rtype: str + """ + return self._entry_price + + @entry_price.setter + def entry_price(self, entry_price): + """Sets the entry_price of this FuturesAutoDeleverage. + + Average entry price # noqa: E501 + + :param entry_price: The entry_price of this FuturesAutoDeleverage. # noqa: E501 + :type: str + """ + + self._entry_price = entry_price + + @property + def fill_price(self): + """Gets the fill_price of this FuturesAutoDeleverage. # noqa: E501 + + Average fill price # noqa: E501 + + :return: The fill_price of this FuturesAutoDeleverage. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this FuturesAutoDeleverage. + + Average fill price # noqa: E501 + + :param fill_price: The fill_price of this FuturesAutoDeleverage. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def trade_size(self): + """Gets the trade_size of this FuturesAutoDeleverage. # noqa: E501 + + Trading size # noqa: E501 + + :return: The trade_size of this FuturesAutoDeleverage. # noqa: E501 + :rtype: int + """ + return self._trade_size + + @trade_size.setter + def trade_size(self, trade_size): + """Sets the trade_size of this FuturesAutoDeleverage. + + Trading size # noqa: E501 + + :param trade_size: The trade_size of this FuturesAutoDeleverage. # noqa: E501 + :type: int + """ + + self._trade_size = trade_size + + @property + def position_size(self): + """Gets the position_size of this FuturesAutoDeleverage. # noqa: E501 + + Positions after auto-deleveraging # noqa: E501 + + :return: The position_size of this FuturesAutoDeleverage. # noqa: E501 + :rtype: int + """ + return self._position_size + + @position_size.setter + def position_size(self, position_size): + """Sets the position_size of this FuturesAutoDeleverage. + + Positions after auto-deleveraging # noqa: E501 + + :param position_size: The position_size of this FuturesAutoDeleverage. # noqa: E501 + :type: int + """ + + self._position_size = position_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesAutoDeleverage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesAutoDeleverage): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py new file mode 100644 index 0000000..a421bca --- /dev/null +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesBatchAmendOrderRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'text': 'str', + 'size': 'int', + 'price': 'str', + 'amend_text': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'text': 'text', + 'size': 'size', + 'price': 'price', + 'amend_text': 'amend_text' + } + + def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, str, str, Configuration) -> None + """FuturesBatchAmendOrderRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._text = None + self._size = None + self._price = None + self._amend_text = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if text is not None: + self.text = text + if size is not None: + self.size = size + if price is not None: + self.price = price + if amend_text is not None: + self.amend_text = amend_text + + @property + def order_id(self): + """Gets the order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 + + Order id, order_id and text must contain at least one # noqa: E501 + + :return: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this FuturesBatchAmendOrderRequest. + + Order id, order_id and text must contain at least one # noqa: E501 + + :param order_id: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def text(self): + """Gets the text of this FuturesBatchAmendOrderRequest. # noqa: E501 + + User-defined order text, at least one of order_id and text must be passed # noqa: E501 + + :return: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this FuturesBatchAmendOrderRequest. + + User-defined order text, at least one of order_id and text must be passed # noqa: E501 + + :param text: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def size(self): + """Gets the size of this FuturesBatchAmendOrderRequest. # noqa: E501 + + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + + :return: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesBatchAmendOrderRequest. + + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + + :param size: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def price(self): + """Gets the price of this FuturesBatchAmendOrderRequest. # noqa: E501 + + New order price. # noqa: E501 + + :return: The price of this FuturesBatchAmendOrderRequest. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FuturesBatchAmendOrderRequest. + + New order price. # noqa: E501 + + :param price: The price of this FuturesBatchAmendOrderRequest. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def amend_text(self): + """Gets the amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 + + Custom info during amending order # noqa: E501 + + :return: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this FuturesBatchAmendOrderRequest. + + Custom info during amending order # noqa: E501 + + :param amend_text: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesBatchAmendOrderRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesBatchAmendOrderRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py new file mode 100644 index 0000000..70af555 --- /dev/null +++ b/gate_api/models/futures_candlestick.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesCandlestick(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 't': 'float', + 'v': 'int', + 'c': 'str', + 'h': 'str', + 'l': 'str', + 'o': 'str', + 'sum': 'str' + } + + attribute_map = { + 't': 't', + 'v': 'v', + 'c': 'c', + 'h': 'h', + 'l': 'l', + 'o': 'o', + 'sum': 'sum' + } + + def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, sum=None, local_vars_configuration=None): # noqa: E501 + # type: (float, int, str, str, str, str, str, Configuration) -> None + """FuturesCandlestick - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._t = None + self._v = None + self._c = None + self._h = None + self._l = None + self._o = None + self._sum = None + self.discriminator = None + + if t is not None: + self.t = t + if v is not None: + self.v = v + if c is not None: + self.c = c + if h is not None: + self.h = h + if l is not None: + self.l = l + if o is not None: + self.o = o + if sum is not None: + self.sum = sum + + @property + def t(self): + """Gets the t of this FuturesCandlestick. # noqa: E501 + + Unix timestamp in seconds # noqa: E501 + + :return: The t of this FuturesCandlestick. # noqa: E501 + :rtype: float + """ + return self._t + + @t.setter + def t(self, t): + """Sets the t of this FuturesCandlestick. + + Unix timestamp in seconds # noqa: E501 + + :param t: The t of this FuturesCandlestick. # noqa: E501 + :type: float + """ + + self._t = t + + @property + def v(self): + """Gets the v of this FuturesCandlestick. # noqa: E501 + + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + + :return: The v of this FuturesCandlestick. # noqa: E501 + :rtype: int + """ + return self._v + + @v.setter + def v(self, v): + """Sets the v of this FuturesCandlestick. + + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + + :param v: The v of this FuturesCandlestick. # noqa: E501 + :type: int + """ + + self._v = v + + @property + def c(self): + """Gets the c of this FuturesCandlestick. # noqa: E501 + + Close price (quote currency) # noqa: E501 + + :return: The c of this FuturesCandlestick. # noqa: E501 + :rtype: str + """ + return self._c + + @c.setter + def c(self, c): + """Sets the c of this FuturesCandlestick. + + Close price (quote currency) # noqa: E501 + + :param c: The c of this FuturesCandlestick. # noqa: E501 + :type: str + """ + + self._c = c + + @property + def h(self): + """Gets the h of this FuturesCandlestick. # noqa: E501 + + Highest price (quote currency) # noqa: E501 + + :return: The h of this FuturesCandlestick. # noqa: E501 + :rtype: str + """ + return self._h + + @h.setter + def h(self, h): + """Sets the h of this FuturesCandlestick. + + Highest price (quote currency) # noqa: E501 + + :param h: The h of this FuturesCandlestick. # noqa: E501 + :type: str + """ + + self._h = h + + @property + def l(self): + """Gets the l of this FuturesCandlestick. # noqa: E501 + + Lowest price (quote currency) # noqa: E501 + + :return: The l of this FuturesCandlestick. # noqa: E501 + :rtype: str + """ + return self._l + + @l.setter + def l(self, l): + """Sets the l of this FuturesCandlestick. + + Lowest price (quote currency) # noqa: E501 + + :param l: The l of this FuturesCandlestick. # noqa: E501 + :type: str + """ + + self._l = l + + @property + def o(self): + """Gets the o of this FuturesCandlestick. # noqa: E501 + + Open price (quote currency) # noqa: E501 + + :return: The o of this FuturesCandlestick. # noqa: E501 + :rtype: str + """ + return self._o + + @o.setter + def o(self, o): + """Sets the o of this FuturesCandlestick. + + Open price (quote currency) # noqa: E501 + + :param o: The o of this FuturesCandlestick. # noqa: E501 + :type: str + """ + + self._o = o + + @property + def sum(self): + """Gets the sum of this FuturesCandlestick. # noqa: E501 + + Trading volume (unit: Quote currency) # noqa: E501 + + :return: The sum of this FuturesCandlestick. # noqa: E501 + :rtype: str + """ + return self._sum + + @sum.setter + def sum(self, sum): + """Sets the sum of this FuturesCandlestick. + + Trading volume (unit: Quote currency) # noqa: E501 + + :param sum: The sum of this FuturesCandlestick. # noqa: E501 + :type: str + """ + + self._sum = sum + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesCandlestick): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesCandlestick): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py new file mode 100644 index 0000000..a05f42e --- /dev/null +++ b/gate_api/models/futures_fee.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesFee(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'taker_fee': 'str', + 'maker_fee': 'str' + } + + attribute_map = { + 'taker_fee': 'taker_fee', + 'maker_fee': 'maker_fee' + } + + def __init__(self, taker_fee=None, maker_fee=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """FuturesFee - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._taker_fee = None + self._maker_fee = None + self.discriminator = None + + if taker_fee is not None: + self.taker_fee = taker_fee + if maker_fee is not None: + self.maker_fee = maker_fee + + @property + def taker_fee(self): + """Gets the taker_fee of this FuturesFee. # noqa: E501 + + Taker fee # noqa: E501 + + :return: The taker_fee of this FuturesFee. # noqa: E501 + :rtype: str + """ + return self._taker_fee + + @taker_fee.setter + def taker_fee(self, taker_fee): + """Sets the taker_fee of this FuturesFee. + + Taker fee # noqa: E501 + + :param taker_fee: The taker_fee of this FuturesFee. # noqa: E501 + :type: str + """ + + self._taker_fee = taker_fee + + @property + def maker_fee(self): + """Gets the maker_fee of this FuturesFee. # noqa: E501 + + maker fee # noqa: E501 + + :return: The maker_fee of this FuturesFee. # noqa: E501 + :rtype: str + """ + return self._maker_fee + + @maker_fee.setter + def maker_fee(self, maker_fee): + """Sets the maker_fee of this FuturesFee. + + maker fee # noqa: E501 + + :param maker_fee: The maker_fee of this FuturesFee. # noqa: E501 + :type: str + """ + + self._maker_fee = maker_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, FuturesFee): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesFee): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py new file mode 100644 index 0000000..d0a158d --- /dev/null +++ b/gate_api/models/futures_index_constituents.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesIndexConstituents(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'index': 'str', + 'constituents': 'list[IndexConstituent]' + } + + attribute_map = { + 'index': 'index', + 'constituents': 'constituents' + } + + def __init__(self, index=None, constituents=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[IndexConstituent], Configuration) -> None + """FuturesIndexConstituents - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._index = None + self._constituents = None + self.discriminator = None + + if index is not None: + self.index = index + if constituents is not None: + self.constituents = constituents + + @property + def index(self): + """Gets the index of this FuturesIndexConstituents. # noqa: E501 + + Index name # noqa: E501 + + :return: The index of this FuturesIndexConstituents. # noqa: E501 + :rtype: str + """ + return self._index + + @index.setter + def index(self, index): + """Sets the index of this FuturesIndexConstituents. + + Index name # noqa: E501 + + :param index: The index of this FuturesIndexConstituents. # noqa: E501 + :type: str + """ + + self._index = index + + @property + def constituents(self): + """Gets the constituents of this FuturesIndexConstituents. # noqa: E501 + + Constituents # noqa: E501 + + :return: The constituents of this FuturesIndexConstituents. # noqa: E501 + :rtype: list[IndexConstituent] + """ + return self._constituents + + @constituents.setter + def constituents(self, constituents): + """Sets the constituents of this FuturesIndexConstituents. + + Constituents # noqa: E501 + + :param constituents: The constituents of this FuturesIndexConstituents. # noqa: E501 + :type: list[IndexConstituent] + """ + + self._constituents = constituents + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesIndexConstituents): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesIndexConstituents): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py new file mode 100644 index 0000000..ff355ca --- /dev/null +++ b/gate_api/models/futures_initial_order.py @@ -0,0 +1,383 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesInitialOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'contract': 'str', + 'size': 'int', + 'price': 'str', + 'close': 'bool', + 'tif': 'str', + 'text': 'str', + 'reduce_only': 'bool', + 'auto_size': 'str', + 'is_reduce_only': 'bool', + 'is_close': 'bool' + } + + attribute_map = { + 'contract': 'contract', + 'size': 'size', + 'price': 'price', + 'close': 'close', + 'tif': 'tif', + 'text': 'text', + 'reduce_only': 'reduce_only', + 'auto_size': 'auto_size', + 'is_reduce_only': 'is_reduce_only', + 'is_close': 'is_close' + } + + def __init__(self, contract=None, size=None, price=None, close=False, tif='gtc', text=None, reduce_only=False, auto_size=None, is_reduce_only=None, is_close=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, bool, str, str, bool, str, bool, bool, Configuration) -> None + """FuturesInitialOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._contract = None + self._size = None + self._price = None + self._close = None + self._tif = None + self._text = None + self._reduce_only = None + self._auto_size = None + self._is_reduce_only = None + self._is_close = None + self.discriminator = None + + self.contract = contract + if size is not None: + self.size = size + self.price = price + if close is not None: + self.close = close + if tif is not None: + self.tif = tif + if text is not None: + self.text = text + if reduce_only is not None: + self.reduce_only = reduce_only + if auto_size is not None: + self.auto_size = auto_size + if is_reduce_only is not None: + self.is_reduce_only = is_reduce_only + if is_close is not None: + self.is_close = is_close + + @property + def contract(self): + """Gets the contract of this FuturesInitialOrder. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesInitialOrder. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesInitialOrder. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesInitialOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 + raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 + + self._contract = contract + + @property + def size(self): + """Gets the size of this FuturesInitialOrder. # noqa: E501 + + Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 # noqa: E501 + + :return: The size of this FuturesInitialOrder. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesInitialOrder. + + Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 # noqa: E501 + + :param size: The size of this FuturesInitialOrder. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def price(self): + """Gets the price of this FuturesInitialOrder. # noqa: E501 + + Order price. Set to 0 to use market price # noqa: E501 + + :return: The price of this FuturesInitialOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FuturesInitialOrder. + + Order price. Set to 0 to use market price # noqa: E501 + + :param price: The price of this FuturesInitialOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 + raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 + + self._price = price + + @property + def close(self): + """Gets the close of this FuturesInitialOrder. # noqa: E501 + + When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false # noqa: E501 + + :return: The close of this FuturesInitialOrder. # noqa: E501 + :rtype: bool + """ + return self._close + + @close.setter + def close(self, close): + """Sets the close of this FuturesInitialOrder. + + When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false # noqa: E501 + + :param close: The close of this FuturesInitialOrder. # noqa: E501 + :type: bool + """ + + self._close = close + + @property + def tif(self): + """Gets the tif of this FuturesInitialOrder. # noqa: E501 + + Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 + + :return: The tif of this FuturesInitialOrder. # noqa: E501 + :rtype: str + """ + return self._tif + + @tif.setter + def tif(self, tif): + """Sets the tif of this FuturesInitialOrder. + + Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 + + :param tif: The tif of this FuturesInitialOrder. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 + .format(tif, allowed_values) + ) + + self._tif = tif + + @property + def text(self): + """Gets the text of this FuturesInitialOrder. # noqa: E501 + + The source of the order, including: - web: web - api: api - app: app # noqa: E501 + + :return: The text of this FuturesInitialOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this FuturesInitialOrder. + + The source of the order, including: - web: web - api: api - app: app # noqa: E501 + + :param text: The text of this FuturesInitialOrder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def reduce_only(self): + """Gets the reduce_only of this FuturesInitialOrder. # noqa: E501 + + When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions # noqa: E501 + + :return: The reduce_only of this FuturesInitialOrder. # noqa: E501 + :rtype: bool + """ + return self._reduce_only + + @reduce_only.setter + def reduce_only(self, reduce_only): + """Sets the reduce_only of this FuturesInitialOrder. + + When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions # noqa: E501 + + :param reduce_only: The reduce_only of this FuturesInitialOrder. # noqa: E501 + :type: bool + """ + + self._reduce_only = reduce_only + + @property + def auto_size(self): + """Gets the auto_size of this FuturesInitialOrder. # noqa: E501 + + Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size # noqa: E501 + + :return: The auto_size of this FuturesInitialOrder. # noqa: E501 + :rtype: str + """ + return self._auto_size + + @auto_size.setter + def auto_size(self, auto_size): + """Sets the auto_size of this FuturesInitialOrder. + + Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size # noqa: E501 + + :param auto_size: The auto_size of this FuturesInitialOrder. # noqa: E501 + :type: str + """ + + self._auto_size = auto_size + + @property + def is_reduce_only(self): + """Gets the is_reduce_only of this FuturesInitialOrder. # noqa: E501 + + Is the order reduce-only # noqa: E501 + + :return: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 + :rtype: bool + """ + return self._is_reduce_only + + @is_reduce_only.setter + def is_reduce_only(self, is_reduce_only): + """Sets the is_reduce_only of this FuturesInitialOrder. + + Is the order reduce-only # noqa: E501 + + :param is_reduce_only: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 + :type: bool + """ + + self._is_reduce_only = is_reduce_only + + @property + def is_close(self): + """Gets the is_close of this FuturesInitialOrder. # noqa: E501 + + Is the order to close position # noqa: E501 + + :return: The is_close of this FuturesInitialOrder. # noqa: E501 + :rtype: bool + """ + return self._is_close + + @is_close.setter + def is_close(self, is_close): + """Sets the is_close of this FuturesInitialOrder. + + Is the order to close position # noqa: E501 + + :param is_close: The is_close of this FuturesInitialOrder. # noqa: E501 + :type: bool + """ + + self._is_close = is_close + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesInitialOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesInitialOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py new file mode 100644 index 0000000..6afde67 --- /dev/null +++ b/gate_api/models/futures_limit_risk_tiers.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesLimitRiskTiers(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tier': 'int', + 'risk_limit': 'str', + 'initial_rate': 'str', + 'maintenance_rate': 'str', + 'leverage_max': 'str', + 'contract': 'str' + } + + attribute_map = { + 'tier': 'tier', + 'risk_limit': 'risk_limit', + 'initial_rate': 'initial_rate', + 'maintenance_rate': 'maintenance_rate', + 'leverage_max': 'leverage_max', + 'contract': 'contract' + } + + def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_rate=None, leverage_max=None, contract=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, Configuration) -> None + """FuturesLimitRiskTiers - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tier = None + self._risk_limit = None + self._initial_rate = None + self._maintenance_rate = None + self._leverage_max = None + self._contract = None + self.discriminator = None + + if tier is not None: + self.tier = tier + if risk_limit is not None: + self.risk_limit = risk_limit + if initial_rate is not None: + self.initial_rate = initial_rate + if maintenance_rate is not None: + self.maintenance_rate = maintenance_rate + if leverage_max is not None: + self.leverage_max = leverage_max + if contract is not None: + self.contract = contract + + @property + def tier(self): + """Gets the tier of this FuturesLimitRiskTiers. # noqa: E501 + + Tier # noqa: E501 + + :return: The tier of this FuturesLimitRiskTiers. # noqa: E501 + :rtype: int + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this FuturesLimitRiskTiers. + + Tier # noqa: E501 + + :param tier: The tier of this FuturesLimitRiskTiers. # noqa: E501 + :type: int + """ + + self._tier = tier + + @property + def risk_limit(self): + """Gets the risk_limit of this FuturesLimitRiskTiers. # noqa: E501 + + Position risk limit # noqa: E501 + + :return: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 + :rtype: str + """ + return self._risk_limit + + @risk_limit.setter + def risk_limit(self, risk_limit): + """Sets the risk_limit of this FuturesLimitRiskTiers. + + Position risk limit # noqa: E501 + + :param risk_limit: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 + :type: str + """ + + self._risk_limit = risk_limit + + @property + def initial_rate(self): + """Gets the initial_rate of this FuturesLimitRiskTiers. # noqa: E501 + + Initial margin rate # noqa: E501 + + :return: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 + :rtype: str + """ + return self._initial_rate + + @initial_rate.setter + def initial_rate(self, initial_rate): + """Sets the initial_rate of this FuturesLimitRiskTiers. + + Initial margin rate # noqa: E501 + + :param initial_rate: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 + :type: str + """ + + self._initial_rate = initial_rate + + @property + def maintenance_rate(self): + """Gets the maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 + + Maintenance margin rate # noqa: E501 + + :return: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 + :rtype: str + """ + return self._maintenance_rate + + @maintenance_rate.setter + def maintenance_rate(self, maintenance_rate): + """Sets the maintenance_rate of this FuturesLimitRiskTiers. + + Maintenance margin rate # noqa: E501 + + :param maintenance_rate: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 + :type: str + """ + + self._maintenance_rate = maintenance_rate + + @property + def leverage_max(self): + """Gets the leverage_max of this FuturesLimitRiskTiers. # noqa: E501 + + Maximum leverage # noqa: E501 + + :return: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 + :rtype: str + """ + return self._leverage_max + + @leverage_max.setter + def leverage_max(self, leverage_max): + """Sets the leverage_max of this FuturesLimitRiskTiers. + + Maximum leverage # noqa: E501 + + :param leverage_max: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 + :type: str + """ + + self._leverage_max = leverage_max + + @property + def contract(self): + """Gets the contract of this FuturesLimitRiskTiers. # noqa: E501 + + Markets, visible only during market pagination requests # noqa: E501 + + :return: The contract of this FuturesLimitRiskTiers. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesLimitRiskTiers. + + Markets, visible only during market pagination requests # noqa: E501 + + :param contract: The contract of this FuturesLimitRiskTiers. # noqa: E501 + :type: str + """ + + self._contract = contract + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesLimitRiskTiers): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesLimitRiskTiers): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py new file mode 100644 index 0000000..50ded5d --- /dev/null +++ b/gate_api/models/futures_liq_order.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesLiqOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'int', + 'contract': 'str', + 'size': 'int', + 'order_size': 'int', + 'order_price': 'str', + 'fill_price': 'str', + 'left': 'int' + } + + attribute_map = { + 'time': 'time', + 'contract': 'contract', + 'size': 'size', + 'order_size': 'order_size', + 'order_price': 'order_price', + 'fill_price': 'fill_price', + 'left': 'left' + } + + def __init__(self, time=None, contract=None, size=None, order_size=None, order_price=None, fill_price=None, left=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, int, str, str, int, Configuration) -> None + """FuturesLiqOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._contract = None + self._size = None + self._order_size = None + self._order_price = None + self._fill_price = None + self._left = None + self.discriminator = None + + if time is not None: + self.time = time + if contract is not None: + self.contract = contract + if size is not None: + self.size = size + if order_size is not None: + self.order_size = order_size + if order_price is not None: + self.order_price = order_price + if fill_price is not None: + self.fill_price = fill_price + if left is not None: + self.left = left + + @property + def time(self): + """Gets the time of this FuturesLiqOrder. # noqa: E501 + + Liquidation time # noqa: E501 + + :return: The time of this FuturesLiqOrder. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this FuturesLiqOrder. + + Liquidation time # noqa: E501 + + :param time: The time of this FuturesLiqOrder. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def contract(self): + """Gets the contract of this FuturesLiqOrder. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesLiqOrder. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesLiqOrder. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesLiqOrder. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def size(self): + """Gets the size of this FuturesLiqOrder. # noqa: E501 + + User position size # noqa: E501 + + :return: The size of this FuturesLiqOrder. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesLiqOrder. + + User position size # noqa: E501 + + :param size: The size of this FuturesLiqOrder. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def order_size(self): + """Gets the order_size of this FuturesLiqOrder. # noqa: E501 + + Number of forced liquidation orders # noqa: E501 + + :return: The order_size of this FuturesLiqOrder. # noqa: E501 + :rtype: int + """ + return self._order_size + + @order_size.setter + def order_size(self, order_size): + """Sets the order_size of this FuturesLiqOrder. + + Number of forced liquidation orders # noqa: E501 + + :param order_size: The order_size of this FuturesLiqOrder. # noqa: E501 + :type: int + """ + + self._order_size = order_size + + @property + def order_price(self): + """Gets the order_price of this FuturesLiqOrder. # noqa: E501 + + Liquidation order price # noqa: E501 + + :return: The order_price of this FuturesLiqOrder. # noqa: E501 + :rtype: str + """ + return self._order_price + + @order_price.setter + def order_price(self, order_price): + """Sets the order_price of this FuturesLiqOrder. + + Liquidation order price # noqa: E501 + + :param order_price: The order_price of this FuturesLiqOrder. # noqa: E501 + :type: str + """ + + self._order_price = order_price + + @property + def fill_price(self): + """Gets the fill_price of this FuturesLiqOrder. # noqa: E501 + + Liquidation order average taker price # noqa: E501 + + :return: The fill_price of this FuturesLiqOrder. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this FuturesLiqOrder. + + Liquidation order average taker price # noqa: E501 + + :param fill_price: The fill_price of this FuturesLiqOrder. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def left(self): + """Gets the left of this FuturesLiqOrder. # noqa: E501 + + System liquidation order maker size # noqa: E501 + + :return: The left of this FuturesLiqOrder. # noqa: E501 + :rtype: int + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this FuturesLiqOrder. + + System liquidation order maker size # noqa: E501 + + :param left: The left of this FuturesLiqOrder. # noqa: E501 + :type: int + """ + + 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, FuturesLiqOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesLiqOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py new file mode 100644 index 0000000..99727e4 --- /dev/null +++ b/gate_api/models/futures_liquidate.py @@ -0,0 +1,431 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesLiquidate(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'int', + 'contract': 'str', + 'leverage': 'str', + 'size': 'int', + 'margin': 'str', + 'entry_price': 'str', + 'liq_price': 'str', + 'mark_price': 'str', + 'order_id': 'int', + 'order_price': 'str', + 'fill_price': 'str', + 'left': 'int' + } + + attribute_map = { + 'time': 'time', + 'contract': 'contract', + 'leverage': 'leverage', + 'size': 'size', + 'margin': 'margin', + 'entry_price': 'entry_price', + 'liq_price': 'liq_price', + 'mark_price': 'mark_price', + 'order_id': 'order_id', + 'order_price': 'order_price', + 'fill_price': 'fill_price', + 'left': 'left' + } + + def __init__(self, time=None, contract=None, leverage=None, size=None, margin=None, entry_price=None, liq_price=None, mark_price=None, order_id=None, order_price=None, fill_price=None, left=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, int, str, str, str, str, int, str, str, int, Configuration) -> None + """FuturesLiquidate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._contract = None + self._leverage = None + self._size = None + self._margin = None + self._entry_price = None + self._liq_price = None + self._mark_price = None + self._order_id = None + self._order_price = None + self._fill_price = None + self._left = None + self.discriminator = None + + if time is not None: + self.time = time + if contract is not None: + self.contract = contract + if leverage is not None: + self.leverage = leverage + if size is not None: + self.size = size + if margin is not None: + self.margin = margin + 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 order_id is not None: + self.order_id = order_id + if order_price is not None: + self.order_price = order_price + if fill_price is not None: + self.fill_price = fill_price + if left is not None: + self.left = left + + @property + def time(self): + """Gets the time of this FuturesLiquidate. # noqa: E501 + + Liquidation time # noqa: E501 + + :return: The time of this FuturesLiquidate. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this FuturesLiquidate. + + Liquidation time # noqa: E501 + + :param time: The time of this FuturesLiquidate. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def contract(self): + """Gets the contract of this FuturesLiquidate. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesLiquidate. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def leverage(self): + """Gets the leverage of this FuturesLiquidate. # noqa: E501 + + Position leverage. Not returned in public endpoints. # noqa: E501 + + :return: The leverage of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this FuturesLiquidate. + + Position leverage. Not returned in public endpoints. # noqa: E501 + + :param leverage: The leverage of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def size(self): + """Gets the size of this FuturesLiquidate. # noqa: E501 + + Position size # noqa: E501 + + :return: The size of this FuturesLiquidate. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesLiquidate. + + Position size # noqa: E501 + + :param size: The size of this FuturesLiquidate. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def margin(self): + """Gets the margin of this FuturesLiquidate. # noqa: E501 + + Position margin. Not returned in public endpoints. # noqa: E501 + + :return: The margin of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this FuturesLiquidate. + + Position margin. Not returned in public endpoints. # noqa: E501 + + :param margin: The margin of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._margin = margin + + @property + def entry_price(self): + """Gets the entry_price of this FuturesLiquidate. # noqa: E501 + + Average entry price. Not returned in public endpoints. # noqa: E501 + + :return: The entry_price of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._entry_price + + @entry_price.setter + def entry_price(self, entry_price): + """Sets the entry_price of this FuturesLiquidate. + + Average entry price. Not returned in public endpoints. # noqa: E501 + + :param entry_price: The entry_price of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._entry_price = entry_price + + @property + def liq_price(self): + """Gets the liq_price of this FuturesLiquidate. # noqa: E501 + + Liquidation price. Not returned in public endpoints. # noqa: E501 + + :return: The liq_price of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._liq_price + + @liq_price.setter + def liq_price(self, liq_price): + """Sets the liq_price of this FuturesLiquidate. + + Liquidation price. Not returned in public endpoints. # noqa: E501 + + :param liq_price: The liq_price of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._liq_price = liq_price + + @property + def mark_price(self): + """Gets the mark_price of this FuturesLiquidate. # noqa: E501 + + Mark price. Not returned in public endpoints. # noqa: E501 + + :return: The mark_price of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this FuturesLiquidate. + + Mark price. Not returned in public endpoints. # noqa: E501 + + :param mark_price: The mark_price of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def order_id(self): + """Gets the order_id of this FuturesLiquidate. # noqa: E501 + + Liquidation order ID. Not returned in public endpoints. # noqa: E501 + + :return: The order_id of this FuturesLiquidate. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this FuturesLiquidate. + + Liquidation order ID. Not returned in public endpoints. # noqa: E501 + + :param order_id: The order_id of this FuturesLiquidate. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def order_price(self): + """Gets the order_price of this FuturesLiquidate. # noqa: E501 + + Liquidation order price # noqa: E501 + + :return: The order_price of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._order_price + + @order_price.setter + def order_price(self, order_price): + """Sets the order_price of this FuturesLiquidate. + + Liquidation order price # noqa: E501 + + :param order_price: The order_price of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._order_price = order_price + + @property + def fill_price(self): + """Gets the fill_price of this FuturesLiquidate. # noqa: E501 + + Liquidation order average taker price # noqa: E501 + + :return: The fill_price of this FuturesLiquidate. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this FuturesLiquidate. + + Liquidation order average taker price # noqa: E501 + + :param fill_price: The fill_price of this FuturesLiquidate. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def left(self): + """Gets the left of this FuturesLiquidate. # noqa: E501 + + Liquidation order maker size # noqa: E501 + + :return: The left of this FuturesLiquidate. # noqa: E501 + :rtype: int + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this FuturesLiquidate. + + Liquidation order maker size # noqa: E501 + + :param left: The left of this FuturesLiquidate. # noqa: E501 + :type: int + """ + + 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, FuturesLiquidate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesLiquidate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py new file mode 100644 index 0000000..01811aa --- /dev/null +++ b/gate_api/models/futures_order.py @@ -0,0 +1,883 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'user': 'int', + 'create_time': 'float', + 'finish_time': 'float', + 'finish_as': 'str', + 'status': 'str', + 'contract': 'str', + 'size': 'int', + 'iceberg': 'int', + 'price': 'str', + 'close': 'bool', + 'is_close': 'bool', + 'reduce_only': 'bool', + 'is_reduce_only': 'bool', + 'is_liq': 'bool', + 'tif': 'str', + 'left': 'int', + 'fill_price': 'str', + 'text': 'str', + 'tkfr': 'str', + 'mkfr': 'str', + 'refu': 'int', + 'auto_size': 'str', + 'stp_id': 'int', + 'stp_act': 'str', + 'amend_text': 'str', + 'biz_info': 'str' + } + + attribute_map = { + 'id': 'id', + 'user': 'user', + 'create_time': 'create_time', + 'finish_time': 'finish_time', + 'finish_as': 'finish_as', + 'status': 'status', + 'contract': 'contract', + 'size': 'size', + 'iceberg': 'iceberg', + 'price': 'price', + 'close': 'close', + 'is_close': 'is_close', + 'reduce_only': 'reduce_only', + 'is_reduce_only': 'is_reduce_only', + 'is_liq': 'is_liq', + 'tif': 'tif', + 'left': 'left', + 'fill_price': 'fill_price', + 'text': 'text', + 'tkfr': 'tkfr', + 'mkfr': 'mkfr', + 'refu': 'refu', + 'auto_size': 'auto_size', + 'stp_id': 'stp_id', + 'stp_act': 'stp_act', + 'amend_text': 'amend_text', + 'biz_info': 'biz_info' + } + + def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_id=None, stp_act=None, amend_text=None, biz_info=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, str, Configuration) -> None + """FuturesOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user = None + self._create_time = None + self._finish_time = None + self._finish_as = None + self._status = None + self._contract = None + self._size = None + self._iceberg = None + self._price = None + self._close = None + self._is_close = None + self._reduce_only = None + self._is_reduce_only = None + self._is_liq = None + self._tif = None + self._left = None + self._fill_price = None + self._text = None + self._tkfr = None + self._mkfr = None + self._refu = None + self._auto_size = None + self._stp_id = None + self._stp_act = None + self._amend_text = None + self._biz_info = None + self.discriminator = None + + if id is not None: + self.id = id + if user is not None: + self.user = user + if create_time is not None: + self.create_time = create_time + if finish_time is not None: + self.finish_time = finish_time + if finish_as is not None: + self.finish_as = finish_as + if status is not None: + self.status = status + self.contract = contract + self.size = size + if iceberg is not None: + self.iceberg = iceberg + if price is not None: + self.price = price + if close is not None: + self.close = close + if is_close is not None: + self.is_close = is_close + if reduce_only is not None: + self.reduce_only = reduce_only + if is_reduce_only is not None: + self.is_reduce_only = is_reduce_only + if is_liq is not None: + self.is_liq = is_liq + if tif is not None: + self.tif = tif + if left is not None: + self.left = left + if fill_price is not None: + self.fill_price = fill_price + if text is not None: + self.text = text + if tkfr is not None: + self.tkfr = tkfr + if mkfr is not None: + self.mkfr = mkfr + if refu is not None: + self.refu = refu + if auto_size is not None: + self.auto_size = auto_size + if stp_id is not None: + self.stp_id = stp_id + if stp_act is not None: + self.stp_act = stp_act + if amend_text is not None: + self.amend_text = amend_text + if biz_info is not None: + self.biz_info = biz_info + + @property + def id(self): + """Gets the id of this FuturesOrder. # noqa: E501 + + Futures order ID # noqa: E501 + + :return: The id of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FuturesOrder. + + Futures order ID # noqa: E501 + + :param id: The id of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user(self): + """Gets the user of this FuturesOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this FuturesOrder. + + User ID # noqa: E501 + + :param user: The user of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def create_time(self): + """Gets the create_time of this FuturesOrder. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The create_time of this FuturesOrder. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FuturesOrder. + + Creation time of order # noqa: E501 + + :param create_time: The create_time of this FuturesOrder. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def finish_time(self): + """Gets the finish_time of this FuturesOrder. # noqa: E501 + + Order finished time. Not returned if order is open # noqa: E501 + + :return: The finish_time of this FuturesOrder. # noqa: E501 + :rtype: float + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this FuturesOrder. + + Order finished time. Not returned if order is open # noqa: E501 + + :param finish_time: The finish_time of this FuturesOrder. # noqa: E501 + :type: float + """ + + self._finish_time = finish_time + + @property + def finish_as(self): + """Gets the finish_as of this FuturesOrder. # noqa: E501 + + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + + :return: The finish_as of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this FuturesOrder. + + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + + :param finish_as: The finish_as of this FuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "stp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + @property + def status(self): + """Gets the status of this FuturesOrder. # noqa: E501 + + Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + + :return: The status of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FuturesOrder. + + Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + + :param status: The status of this FuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["open", "finished"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def contract(self): + """Gets the contract of this FuturesOrder. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesOrder. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 + raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 + + self._contract = contract + + @property + def size(self): + """Gets the size of this FuturesOrder. # noqa: E501 + + Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + + :return: The size of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesOrder. + + Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + + :param size: The size of this FuturesOrder. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + @property + def iceberg(self): + """Gets the iceberg of this FuturesOrder. # noqa: E501 + + Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + + :return: The iceberg of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._iceberg + + @iceberg.setter + def iceberg(self, iceberg): + """Sets the iceberg of this FuturesOrder. + + Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + + :param iceberg: The iceberg of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._iceberg = iceberg + + @property + def price(self): + """Gets the price of this FuturesOrder. # noqa: E501 + + Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + + :return: The price of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FuturesOrder. + + Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + + :param price: The price of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def close(self): + """Gets the close of this FuturesOrder. # noqa: E501 + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :return: The close of this FuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._close + + @close.setter + def close(self, close): + """Sets the close of this FuturesOrder. + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :param close: The close of this FuturesOrder. # noqa: E501 + :type: bool + """ + + self._close = close + + @property + def is_close(self): + """Gets the is_close of this FuturesOrder. # noqa: E501 + + Is the order to close position # noqa: E501 + + :return: The is_close of this FuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._is_close + + @is_close.setter + def is_close(self, is_close): + """Sets the is_close of this FuturesOrder. + + Is the order to close position # noqa: E501 + + :param is_close: The is_close of this FuturesOrder. # noqa: E501 + :type: bool + """ + + self._is_close = is_close + + @property + def reduce_only(self): + """Gets the reduce_only of this FuturesOrder. # noqa: E501 + + Set as `true` to be reduce-only order # noqa: E501 + + :return: The reduce_only of this FuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._reduce_only + + @reduce_only.setter + def reduce_only(self, reduce_only): + """Sets the reduce_only of this FuturesOrder. + + Set as `true` to be reduce-only order # noqa: E501 + + :param reduce_only: The reduce_only of this FuturesOrder. # noqa: E501 + :type: bool + """ + + self._reduce_only = reduce_only + + @property + def is_reduce_only(self): + """Gets the is_reduce_only of this FuturesOrder. # noqa: E501 + + Is the order reduce-only # noqa: E501 + + :return: The is_reduce_only of this FuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._is_reduce_only + + @is_reduce_only.setter + def is_reduce_only(self, is_reduce_only): + """Sets the is_reduce_only of this FuturesOrder. + + Is the order reduce-only # noqa: E501 + + :param is_reduce_only: The is_reduce_only of this FuturesOrder. # noqa: E501 + :type: bool + """ + + self._is_reduce_only = is_reduce_only + + @property + def is_liq(self): + """Gets the is_liq of this FuturesOrder. # noqa: E501 + + Is the order for liquidation # noqa: E501 + + :return: The is_liq of this FuturesOrder. # noqa: E501 + :rtype: bool + """ + return self._is_liq + + @is_liq.setter + def is_liq(self, is_liq): + """Sets the is_liq of this FuturesOrder. + + Is the order for liquidation # noqa: E501 + + :param is_liq: The is_liq of this FuturesOrder. # noqa: E501 + :type: bool + """ + + self._is_liq = is_liq + + @property + def tif(self): + """Gets the tif of this FuturesOrder. # noqa: E501 + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 + + :return: The tif of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._tif + + @tif.setter + def tif(self, tif): + """Sets the tif of this FuturesOrder. + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none # noqa: E501 + + :param tif: The tif of this FuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 + .format(tif, allowed_values) + ) + + self._tif = tif + + @property + def left(self): + """Gets the left of this FuturesOrder. # noqa: E501 + + Size left to be traded # noqa: E501 + + :return: The left of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this FuturesOrder. + + Size left to be traded # noqa: E501 + + :param left: The left of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._left = left + + @property + def fill_price(self): + """Gets the fill_price of this FuturesOrder. # noqa: E501 + + Fill price of the order # noqa: E501 + + :return: The fill_price of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this FuturesOrder. + + Fill price of the order # noqa: E501 + + :param fill_price: The fill_price of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def text(self): + """Gets the text of this FuturesOrder. # noqa: E501 + + Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance # noqa: E501 + + :return: The text of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this FuturesOrder. + + Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance # noqa: E501 + + :param text: The text of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def tkfr(self): + """Gets the tkfr of this FuturesOrder. # noqa: E501 + + Taker fee # noqa: E501 + + :return: The tkfr of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._tkfr + + @tkfr.setter + def tkfr(self, tkfr): + """Sets the tkfr of this FuturesOrder. + + Taker fee # noqa: E501 + + :param tkfr: The tkfr of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._tkfr = tkfr + + @property + def mkfr(self): + """Gets the mkfr of this FuturesOrder. # noqa: E501 + + Maker fee # noqa: E501 + + :return: The mkfr of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._mkfr + + @mkfr.setter + def mkfr(self, mkfr): + """Sets the mkfr of this FuturesOrder. + + Maker fee # noqa: E501 + + :param mkfr: The mkfr of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._mkfr = mkfr + + @property + def refu(self): + """Gets the refu of this FuturesOrder. # noqa: E501 + + Reference user ID # noqa: E501 + + :return: The refu of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._refu + + @refu.setter + def refu(self, refu): + """Sets the refu of this FuturesOrder. + + Reference user ID # noqa: E501 + + :param refu: The refu of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._refu = refu + + @property + def auto_size(self): + """Gets the auto_size of this FuturesOrder. # noqa: E501 + + Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 + + :return: The auto_size of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._auto_size + + @auto_size.setter + def auto_size(self, auto_size): + """Sets the auto_size of this FuturesOrder. + + Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 # noqa: E501 + + :param auto_size: The auto_size of this FuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["close_long", "close_short"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and auto_size not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `auto_size` ({0}), must be one of {1}" # noqa: E501 + .format(auto_size, allowed_values) + ) + + self._auto_size = auto_size + + @property + def stp_id(self): + """Gets the stp_id of this FuturesOrder. # noqa: E501 + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :return: The stp_id of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._stp_id + + @stp_id.setter + def stp_id(self, stp_id): + """Sets the stp_id of this FuturesOrder. + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :param stp_id: The stp_id of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._stp_id = stp_id + + @property + def stp_act(self): + """Gets the stp_act of this FuturesOrder. # noqa: E501 + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :return: The stp_act of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._stp_act + + @stp_act.setter + def stp_act(self, stp_act): + """Sets the stp_act of this FuturesOrder. + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :param stp_act: The stp_act of this FuturesOrder. # noqa: E501 + :type: str + """ + allowed_values = ["co", "cn", "cb", "-"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 + .format(stp_act, allowed_values) + ) + + self._stp_act = stp_act + + @property + def amend_text(self): + """Gets the amend_text of this FuturesOrder. # noqa: E501 + + The custom data that the user remarked when amending the order # noqa: E501 + + :return: The amend_text of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this FuturesOrder. + + The custom data that the user remarked when amending the order # noqa: E501 + + :param amend_text: The amend_text of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + @property + def biz_info(self): + """Gets the biz_info of this FuturesOrder. # noqa: E501 + + Additional information # noqa: E501 + + :return: The biz_info of this FuturesOrder. # noqa: E501 + :rtype: str + """ + return self._biz_info + + @biz_info.setter + def biz_info(self, biz_info): + """Sets the biz_info of this FuturesOrder. + + Additional information # noqa: E501 + + :param biz_info: The biz_info of this FuturesOrder. # noqa: E501 + :type: str + """ + + self._biz_info = biz_info + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py new file mode 100644 index 0000000..d50351e --- /dev/null +++ b/gate_api/models/futures_order_amendment.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesOrderAmendment(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'size': 'int', + 'price': 'str', + 'amend_text': 'str', + 'biz_info': 'str', + 'bbo': 'str' + } + + attribute_map = { + 'size': 'size', + 'price': 'price', + 'amend_text': 'amend_text', + 'biz_info': 'biz_info', + 'bbo': 'bbo' + } + + def __init__(self, size=None, price=None, amend_text=None, biz_info=None, bbo=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, Configuration) -> None + """FuturesOrderAmendment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._size = None + self._price = None + self._amend_text = None + self._biz_info = None + self._bbo = None + self.discriminator = None + + if size is not None: + self.size = size + if price is not None: + self.price = price + if amend_text is not None: + self.amend_text = amend_text + if biz_info is not None: + self.biz_info = biz_info + if bbo is not None: + self.bbo = bbo + + @property + def size(self): + """Gets the size of this FuturesOrderAmendment. # noqa: E501 + + New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. # noqa: E501 + + :return: The size of this FuturesOrderAmendment. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesOrderAmendment. + + New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. # noqa: E501 + + :param size: The size of this FuturesOrderAmendment. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def price(self): + """Gets the price of this FuturesOrderAmendment. # noqa: E501 + + New order price. # noqa: E501 + + :return: The price of this FuturesOrderAmendment. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FuturesOrderAmendment. + + New order price. # noqa: E501 + + :param price: The price of this FuturesOrderAmendment. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def amend_text(self): + """Gets the amend_text of this FuturesOrderAmendment. # noqa: E501 + + Custom info during amending order # noqa: E501 + + :return: The amend_text of this FuturesOrderAmendment. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this FuturesOrderAmendment. + + Custom info during amending order # noqa: E501 + + :param amend_text: The amend_text of this FuturesOrderAmendment. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + @property + def biz_info(self): + """Gets the biz_info of this FuturesOrderAmendment. # noqa: E501 + + Users can annotate this modification with information. # noqa: E501 + + :return: The biz_info of this FuturesOrderAmendment. # noqa: E501 + :rtype: str + """ + return self._biz_info + + @biz_info.setter + def biz_info(self, biz_info): + """Sets the biz_info of this FuturesOrderAmendment. + + Users can annotate this modification with information. # noqa: E501 + + :param biz_info: The biz_info of this FuturesOrderAmendment. # noqa: E501 + :type: str + """ + + self._biz_info = biz_info + + @property + def bbo(self): + """Gets the bbo of this FuturesOrderAmendment. # noqa: E501 + + Users are able to modify the offer price manually. # noqa: E501 + + :return: The bbo of this FuturesOrderAmendment. # noqa: E501 + :rtype: str + """ + return self._bbo + + @bbo.setter + def bbo(self, bbo): + """Sets the bbo of this FuturesOrderAmendment. + + Users are able to modify the offer price manually. # noqa: E501 + + :param bbo: The bbo of this FuturesOrderAmendment. # noqa: E501 + :type: str + """ + + self._bbo = bbo + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesOrderAmendment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesOrderAmendment): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py new file mode 100644 index 0000000..31fb88a --- /dev/null +++ b/gate_api/models/futures_order_book.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesOrderBook(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'current': 'float', + 'update': 'float', + 'asks': 'list[FuturesOrderBookItem]', + 'bids': 'list[FuturesOrderBookItem]' + } + + attribute_map = { + 'id': 'id', + 'current': 'current', + 'update': 'update', + 'asks': 'asks', + 'bids': 'bids' + } + + def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501 + # type: (int, float, float, list[FuturesOrderBookItem], list[FuturesOrderBookItem], Configuration) -> None + """FuturesOrderBook - a 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._current = None + self._update = None + self._asks = None + self._bids = None + self.discriminator = None + + if id is not None: + self.id = id + if current is not None: + self.current = current + if update is not None: + self.update = update + self.asks = asks + self.bids = bids + + @property + def id(self): + """Gets the id of this FuturesOrderBook. # noqa: E501 + + Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response # noqa: E501 + + :return: The id of this FuturesOrderBook. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FuturesOrderBook. + + Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response # noqa: E501 + + :param id: The id of this FuturesOrderBook. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def current(self): + """Gets the current of this FuturesOrderBook. # noqa: E501 + + Response data generation timestamp # noqa: E501 + + :return: The current of this FuturesOrderBook. # noqa: E501 + :rtype: float + """ + return self._current + + @current.setter + def current(self, current): + """Sets the current of this FuturesOrderBook. + + Response data generation timestamp # noqa: E501 + + :param current: The current of this FuturesOrderBook. # noqa: E501 + :type: float + """ + + self._current = current + + @property + def update(self): + """Gets the update of this FuturesOrderBook. # noqa: E501 + + Order book changed timestamp # noqa: E501 + + :return: The update of this FuturesOrderBook. # noqa: E501 + :rtype: float + """ + return self._update + + @update.setter + def update(self, update): + """Sets the update of this FuturesOrderBook. + + Order book changed timestamp # noqa: E501 + + :param update: The update of this FuturesOrderBook. # noqa: E501 + :type: float + """ + + self._update = update + + @property + def asks(self): + """Gets the asks of this FuturesOrderBook. # noqa: E501 + + Asks order depth # noqa: E501 + + :return: The asks of this FuturesOrderBook. # noqa: E501 + :rtype: list[FuturesOrderBookItem] + """ + return self._asks + + @asks.setter + def asks(self, asks): + """Sets the asks of this FuturesOrderBook. + + Asks order depth # noqa: E501 + + :param asks: The asks of this FuturesOrderBook. # noqa: E501 + :type: list[FuturesOrderBookItem] + """ + if self.local_vars_configuration.client_side_validation and asks is None: # noqa: E501 + raise ValueError("Invalid value for `asks`, must not be `None`") # noqa: E501 + + self._asks = asks + + @property + def bids(self): + """Gets the bids of this FuturesOrderBook. # noqa: E501 + + Bids order depth # noqa: E501 + + :return: The bids of this FuturesOrderBook. # noqa: E501 + :rtype: list[FuturesOrderBookItem] + """ + return self._bids + + @bids.setter + def bids(self, bids): + """Sets the bids of this FuturesOrderBook. + + Bids order depth # noqa: E501 + + :param bids: The bids of this FuturesOrderBook. # noqa: E501 + :type: list[FuturesOrderBookItem] + """ + if self.local_vars_configuration.client_side_validation and bids is None: # noqa: E501 + raise ValueError("Invalid value for `bids`, must not be `None`") # noqa: E501 + + self._bids = bids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesOrderBook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesOrderBook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py new file mode 100644 index 0000000..365905c --- /dev/null +++ b/gate_api/models/futures_order_book_item.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesOrderBookItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 's': 'int' + } + + attribute_map = { + 'p': 'p', + 's': 's' + } + + def __init__(self, p=None, s=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, Configuration) -> None + """FuturesOrderBookItem - a 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._s = None + self.discriminator = None + + if p is not None: + self.p = p + if s is not None: + self.s = s + + @property + def p(self): + """Gets the p of this FuturesOrderBookItem. # noqa: E501 + + Price (quote currency) # noqa: E501 + + :return: The p of this FuturesOrderBookItem. # noqa: E501 + :rtype: str + """ + return self._p + + @p.setter + def p(self, p): + """Sets the p of this FuturesOrderBookItem. + + Price (quote currency) # noqa: E501 + + :param p: The p of this FuturesOrderBookItem. # noqa: E501 + :type: str + """ + + self._p = p + + @property + def s(self): + """Gets the s of this FuturesOrderBookItem. # noqa: E501 + + Size # noqa: E501 + + :return: The s of this FuturesOrderBookItem. # noqa: E501 + :rtype: int + """ + return self._s + + @s.setter + def s(self, s): + """Sets the s of this FuturesOrderBookItem. + + Size # noqa: E501 + + :param s: The s of this FuturesOrderBookItem. # noqa: E501 + :type: int + """ + + self._s = s + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesOrderBookItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesOrderBookItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py new file mode 100644 index 0000000..9552be5 --- /dev/null +++ b/gate_api/models/futures_premium_index.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesPremiumIndex(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 't': 'float', + 'c': 'str', + 'h': 'str', + 'l': 'str', + 'o': 'str' + } + + attribute_map = { + 't': 't', + 'c': 'c', + 'h': 'h', + 'l': 'l', + 'o': 'o' + } + + def __init__(self, t=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, str, str, str, Configuration) -> None + """FuturesPremiumIndex - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._t = None + self._c = None + self._h = None + self._l = None + self._o = None + self.discriminator = None + + if t is not None: + self.t = t + if c is not None: + self.c = c + if h is not None: + self.h = h + if l is not None: + self.l = l + if o is not None: + self.o = o + + @property + def t(self): + """Gets the t of this FuturesPremiumIndex. # noqa: E501 + + Unix timestamp in seconds # noqa: E501 + + :return: The t of this FuturesPremiumIndex. # noqa: E501 + :rtype: float + """ + return self._t + + @t.setter + def t(self, t): + """Sets the t of this FuturesPremiumIndex. + + Unix timestamp in seconds # noqa: E501 + + :param t: The t of this FuturesPremiumIndex. # noqa: E501 + :type: float + """ + + self._t = t + + @property + def c(self): + """Gets the c of this FuturesPremiumIndex. # noqa: E501 + + Close price # noqa: E501 + + :return: The c of this FuturesPremiumIndex. # noqa: E501 + :rtype: str + """ + return self._c + + @c.setter + def c(self, c): + """Sets the c of this FuturesPremiumIndex. + + Close price # noqa: E501 + + :param c: The c of this FuturesPremiumIndex. # noqa: E501 + :type: str + """ + + self._c = c + + @property + def h(self): + """Gets the h of this FuturesPremiumIndex. # noqa: E501 + + Highest price # noqa: E501 + + :return: The h of this FuturesPremiumIndex. # noqa: E501 + :rtype: str + """ + return self._h + + @h.setter + def h(self, h): + """Sets the h of this FuturesPremiumIndex. + + Highest price # noqa: E501 + + :param h: The h of this FuturesPremiumIndex. # noqa: E501 + :type: str + """ + + self._h = h + + @property + def l(self): + """Gets the l of this FuturesPremiumIndex. # noqa: E501 + + Lowest price` # noqa: E501 + + :return: The l of this FuturesPremiumIndex. # noqa: E501 + :rtype: str + """ + return self._l + + @l.setter + def l(self, l): + """Sets the l of this FuturesPremiumIndex. + + Lowest price` # noqa: E501 + + :param l: The l of this FuturesPremiumIndex. # noqa: E501 + :type: str + """ + + self._l = l + + @property + def o(self): + """Gets the o of this FuturesPremiumIndex. # noqa: E501 + + Open price # noqa: E501 + + :return: The o of this FuturesPremiumIndex. # noqa: E501 + :rtype: str + """ + return self._o + + @o.setter + def o(self, o): + """Sets the o of this FuturesPremiumIndex. + + Open price # noqa: E501 + + :param o: The o of this FuturesPremiumIndex. # noqa: E501 + :type: str + """ + + self._o = o + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesPremiumIndex): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesPremiumIndex): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py new file mode 100644 index 0000000..89b9d36 --- /dev/null +++ b/gate_api/models/futures_price_trigger.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesPriceTrigger(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'strategy_type': 'int', + 'price_type': 'int', + 'price': 'str', + 'rule': 'int', + 'expiration': 'int' + } + + attribute_map = { + 'strategy_type': 'strategy_type', + 'price_type': 'price_type', + 'price': 'price', + 'rule': 'rule', + 'expiration': 'expiration' + } + + def __init__(self, strategy_type=None, price_type=None, price=None, rule=None, expiration=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, int, int, Configuration) -> None + """FuturesPriceTrigger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._strategy_type = None + self._price_type = None + self._price = None + self._rule = None + self._expiration = None + self.discriminator = None + + if strategy_type is not None: + self.strategy_type = strategy_type + if price_type is not None: + self.price_type = price_type + if price is not None: + self.price = price + if rule is not None: + self.rule = rule + if expiration is not None: + self.expiration = expiration + + @property + def strategy_type(self): + """Gets the strategy_type of this FuturesPriceTrigger. # noqa: E501 + + Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price # noqa: E501 + + :return: The strategy_type of this FuturesPriceTrigger. # noqa: E501 + :rtype: int + """ + return self._strategy_type + + @strategy_type.setter + def strategy_type(self, strategy_type): + """Sets the strategy_type of this FuturesPriceTrigger. + + Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price # noqa: E501 + + :param strategy_type: The strategy_type of this FuturesPriceTrigger. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and strategy_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `strategy_type` ({0}), must be one of {1}" # noqa: E501 + .format(strategy_type, allowed_values) + ) + + self._strategy_type = strategy_type + + @property + def price_type(self): + """Gets the price_type of this FuturesPriceTrigger. # noqa: E501 + + Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501 + + :return: The price_type of this FuturesPriceTrigger. # noqa: E501 + :rtype: int + """ + return self._price_type + + @price_type.setter + def price_type(self, price_type): + """Sets the price_type of this FuturesPriceTrigger. + + Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501 + + :param price_type: The price_type of this FuturesPriceTrigger. # noqa: E501 + :type: int + """ + allowed_values = [0, 1, 2] # noqa: E501 + if self.local_vars_configuration.client_side_validation and price_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `price_type` ({0}), must be one of {1}" # noqa: E501 + .format(price_type, allowed_values) + ) + + self._price_type = price_type + + @property + def price(self): + """Gets the price of this FuturesPriceTrigger. # noqa: E501 + + Value of price on price triggered, or price gap on price gap triggered # noqa: E501 + + :return: The price of this FuturesPriceTrigger. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FuturesPriceTrigger. + + Value of price on price triggered, or price gap on price gap triggered # noqa: E501 + + :param price: The price of this FuturesPriceTrigger. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def rule(self): + """Gets the rule of this FuturesPriceTrigger. # noqa: E501 + + Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 + + :return: The rule of this FuturesPriceTrigger. # noqa: E501 + :rtype: int + """ + return self._rule + + @rule.setter + def rule(self, rule): + """Sets the rule of this FuturesPriceTrigger. + + Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 + + :param rule: The rule of this FuturesPriceTrigger. # noqa: E501 + :type: int + """ + allowed_values = [1, 2] # noqa: E501 + if self.local_vars_configuration.client_side_validation and rule not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `rule` ({0}), must be one of {1}" # noqa: E501 + .format(rule, allowed_values) + ) + + self._rule = rule + + @property + def expiration(self): + """Gets the expiration of this FuturesPriceTrigger. # noqa: E501 + + How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + + :return: The expiration of this FuturesPriceTrigger. # noqa: E501 + :rtype: int + """ + return self._expiration + + @expiration.setter + def expiration(self, expiration): + """Sets the expiration of this FuturesPriceTrigger. + + How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + + :param expiration: The expiration of this FuturesPriceTrigger. # noqa: E501 + :type: int + """ + + self._expiration = expiration + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesPriceTrigger): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesPriceTrigger): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py new file mode 100644 index 0000000..09a9106 --- /dev/null +++ b/gate_api/models/futures_price_triggered_order.py @@ -0,0 +1,441 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesPriceTriggeredOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'initial': 'FuturesInitialOrder', + 'trigger': 'FuturesPriceTrigger', + 'id': 'int', + 'user': 'int', + 'create_time': 'float', + 'finish_time': 'float', + 'trade_id': 'int', + 'status': 'str', + 'finish_as': 'str', + 'reason': 'str', + 'order_type': 'str', + 'me_order_id': 'int' + } + + attribute_map = { + 'initial': 'initial', + 'trigger': 'trigger', + 'id': 'id', + 'user': 'user', + 'create_time': 'create_time', + 'finish_time': 'finish_time', + 'trade_id': 'trade_id', + 'status': 'status', + 'finish_as': 'finish_as', + 'reason': 'reason', + 'order_type': 'order_type', + 'me_order_id': 'me_order_id' + } + + def __init__(self, initial=None, trigger=None, id=None, user=None, create_time=None, finish_time=None, trade_id=None, status=None, finish_as=None, reason=None, order_type=None, me_order_id=None, local_vars_configuration=None): # noqa: E501 + # type: (FuturesInitialOrder, FuturesPriceTrigger, int, int, float, float, int, str, str, str, str, int, Configuration) -> None + """FuturesPriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._initial = None + self._trigger = None + self._id = None + self._user = None + self._create_time = None + self._finish_time = None + self._trade_id = None + self._status = None + self._finish_as = None + self._reason = None + self._order_type = None + self._me_order_id = None + self.discriminator = None + + self.initial = initial + self.trigger = trigger + if id is not None: + self.id = id + if user is not None: + self.user = user + if create_time is not None: + self.create_time = create_time + if finish_time is not None: + self.finish_time = finish_time + if trade_id is not None: + self.trade_id = trade_id + if status is not None: + self.status = status + if finish_as is not None: + self.finish_as = finish_as + if reason is not None: + self.reason = reason + if order_type is not None: + self.order_type = order_type + if me_order_id is not None: + self.me_order_id = me_order_id + + @property + def initial(self): + """Gets the initial of this FuturesPriceTriggeredOrder. # noqa: E501 + + + :return: The initial of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: FuturesInitialOrder + """ + return self._initial + + @initial.setter + def initial(self, initial): + """Sets the initial of this FuturesPriceTriggeredOrder. + + + :param initial: The initial of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: FuturesInitialOrder + """ + if self.local_vars_configuration.client_side_validation and initial is None: # noqa: E501 + raise ValueError("Invalid value for `initial`, must not be `None`") # noqa: E501 + + self._initial = initial + + @property + def trigger(self): + """Gets the trigger of this FuturesPriceTriggeredOrder. # noqa: E501 + + + :return: The trigger of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: FuturesPriceTrigger + """ + return self._trigger + + @trigger.setter + def trigger(self, trigger): + """Sets the trigger of this FuturesPriceTriggeredOrder. + + + :param trigger: The trigger of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: FuturesPriceTrigger + """ + if self.local_vars_configuration.client_side_validation and trigger is None: # noqa: E501 + raise ValueError("Invalid value for `trigger`, must not be `None`") # noqa: E501 + + self._trigger = trigger + + @property + def id(self): + """Gets the id of this FuturesPriceTriggeredOrder. # noqa: E501 + + Auto order ID # noqa: E501 + + :return: The id of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FuturesPriceTriggeredOrder. + + Auto order ID # noqa: E501 + + :param id: The id of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user(self): + """Gets the user of this FuturesPriceTriggeredOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this FuturesPriceTriggeredOrder. + + User ID # noqa: E501 + + :param user: The user of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def create_time(self): + """Gets the create_time of this FuturesPriceTriggeredOrder. # noqa: E501 + + Creation time # noqa: E501 + + :return: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FuturesPriceTriggeredOrder. + + Creation time # noqa: E501 + + :param create_time: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def finish_time(self): + """Gets the finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 + + Finished time # noqa: E501 + + :return: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: float + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this FuturesPriceTriggeredOrder. + + Finished time # noqa: E501 + + :param finish_time: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: float + """ + + self._finish_time = finish_time + + @property + def trade_id(self): + """Gets the trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 + + ID of the newly created order on condition triggered # noqa: E501 + + :return: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._trade_id + + @trade_id.setter + def trade_id(self, trade_id): + """Sets the trade_id of this FuturesPriceTriggeredOrder. + + ID of the newly created order on condition triggered # noqa: E501 + + :param trade_id: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._trade_id = trade_id + + @property + def status(self): + """Gets the status of this FuturesPriceTriggeredOrder. # noqa: E501 + + Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501 + + :return: The status of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this FuturesPriceTriggeredOrder. + + Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501 + + :param status: The status of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: str + """ + allowed_values = ["open", "finished", "inactive", "invalid"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def finish_as(self): + """Gets the finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 + + How order is finished # noqa: E501 + + :return: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this FuturesPriceTriggeredOrder. + + How order is finished # noqa: E501 + + :param finish_as: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: str + """ + allowed_values = ["cancelled", "succeeded", "failed", "expired"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + @property + def reason(self): + """Gets the reason of this FuturesPriceTriggeredOrder. # noqa: E501 + + Additional remarks on how the order was finished # noqa: E501 + + :return: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this FuturesPriceTriggeredOrder. + + Additional remarks on how the order was finished # noqa: E501 + + :param reason: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def order_type(self): + """Gets the order_type of this FuturesPriceTriggeredOrder. # noqa: E501 + + Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 + + :return: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._order_type + + @order_type.setter + def order_type(self, order_type): + """Sets the order_type of this FuturesPriceTriggeredOrder. + + Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 + + :param order_type: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: str + """ + + self._order_type = order_type + + @property + def me_order_id(self): + """Gets the me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 + + Corresponding order ID of order take-profit/stop-loss. # noqa: E501 + + :return: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._me_order_id + + @me_order_id.setter + def me_order_id(self, me_order_id): + """Sets the me_order_id of this FuturesPriceTriggeredOrder. + + Corresponding order ID of order take-profit/stop-loss. # noqa: E501 + + :param me_order_id: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._me_order_id = me_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, FuturesPriceTriggeredOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesPriceTriggeredOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py new file mode 100644 index 0000000..a4b8467 --- /dev/null +++ b/gate_api/models/futures_ticker.py @@ -0,0 +1,739 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesTicker(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'contract': 'str', + 'last': 'str', + 'change_percentage': 'str', + 'total_size': 'str', + 'low_24h': 'str', + 'high_24h': 'str', + 'volume_24h': 'str', + 'volume_24h_btc': 'str', + 'volume_24h_usd': 'str', + 'volume_24h_base': 'str', + 'volume_24h_quote': 'str', + 'volume_24h_settle': 'str', + 'mark_price': 'str', + 'funding_rate': 'str', + 'funding_rate_indicative': 'str', + 'index_price': 'str', + 'quanto_base_rate': 'str', + 'basis_rate': 'str', + 'basis_value': 'str', + 'lowest_ask': 'str', + 'lowest_size': 'str', + 'highest_bid': 'str', + 'highest_size': 'str' + } + + attribute_map = { + 'contract': 'contract', + 'last': 'last', + 'change_percentage': 'change_percentage', + 'total_size': 'total_size', + 'low_24h': 'low_24h', + 'high_24h': 'high_24h', + 'volume_24h': 'volume_24h', + 'volume_24h_btc': 'volume_24h_btc', + 'volume_24h_usd': 'volume_24h_usd', + 'volume_24h_base': 'volume_24h_base', + 'volume_24h_quote': 'volume_24h_quote', + 'volume_24h_settle': 'volume_24h_settle', + 'mark_price': 'mark_price', + 'funding_rate': 'funding_rate', + 'funding_rate_indicative': 'funding_rate_indicative', + 'index_price': 'index_price', + 'quanto_base_rate': 'quanto_base_rate', + 'basis_rate': 'basis_rate', + 'basis_value': 'basis_value', + 'lowest_ask': 'lowest_ask', + 'lowest_size': 'lowest_size', + 'highest_bid': 'highest_bid', + 'highest_size': 'highest_size' + } + + def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, basis_rate=None, basis_value=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """FuturesTicker - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._contract = None + self._last = None + self._change_percentage = None + self._total_size = None + self._low_24h = None + self._high_24h = None + self._volume_24h = None + self._volume_24h_btc = None + self._volume_24h_usd = None + self._volume_24h_base = None + self._volume_24h_quote = None + self._volume_24h_settle = None + self._mark_price = None + self._funding_rate = None + self._funding_rate_indicative = None + self._index_price = None + self._quanto_base_rate = None + self._basis_rate = None + self._basis_value = None + self._lowest_ask = None + self._lowest_size = None + self._highest_bid = None + self._highest_size = None + self.discriminator = None + + if contract is not None: + self.contract = contract + if last is not None: + self.last = last + if change_percentage is not None: + self.change_percentage = change_percentage + if total_size is not None: + self.total_size = total_size + if low_24h is not None: + self.low_24h = low_24h + if high_24h is not None: + self.high_24h = high_24h + if volume_24h is not None: + self.volume_24h = volume_24h + if volume_24h_btc is not None: + self.volume_24h_btc = volume_24h_btc + if volume_24h_usd is not None: + self.volume_24h_usd = volume_24h_usd + if volume_24h_base is not None: + self.volume_24h_base = volume_24h_base + if volume_24h_quote is not None: + self.volume_24h_quote = volume_24h_quote + if volume_24h_settle is not None: + self.volume_24h_settle = volume_24h_settle + if mark_price is not None: + self.mark_price = mark_price + if funding_rate is not None: + self.funding_rate = funding_rate + if funding_rate_indicative is not None: + self.funding_rate_indicative = funding_rate_indicative + if index_price is not None: + self.index_price = index_price + if quanto_base_rate is not None: + self.quanto_base_rate = quanto_base_rate + if basis_rate is not None: + self.basis_rate = basis_rate + if basis_value is not None: + self.basis_value = basis_value + if lowest_ask is not None: + self.lowest_ask = lowest_ask + if lowest_size is not None: + self.lowest_size = lowest_size + if highest_bid is not None: + self.highest_bid = highest_bid + if highest_size is not None: + self.highest_size = highest_size + + @property + def contract(self): + """Gets the contract of this FuturesTicker. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesTicker. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def last(self): + """Gets the last of this FuturesTicker. # noqa: E501 + + Last trading price # noqa: E501 + + :return: The last of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this FuturesTicker. + + Last trading price # noqa: E501 + + :param last: The last of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._last = last + + @property + def change_percentage(self): + """Gets the change_percentage of this FuturesTicker. # noqa: E501 + + Change percentage. # noqa: E501 + + :return: The change_percentage of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._change_percentage + + @change_percentage.setter + def change_percentage(self, change_percentage): + """Sets the change_percentage of this FuturesTicker. + + Change percentage. # noqa: E501 + + :param change_percentage: The change_percentage of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._change_percentage = change_percentage + + @property + def total_size(self): + """Gets the total_size of this FuturesTicker. # noqa: E501 + + Contract total size # noqa: E501 + + :return: The total_size of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._total_size + + @total_size.setter + def total_size(self, total_size): + """Sets the total_size of this FuturesTicker. + + Contract total size # noqa: E501 + + :param total_size: The total_size of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._total_size = total_size + + @property + def low_24h(self): + """Gets the low_24h of this FuturesTicker. # noqa: E501 + + Lowest trading price in recent 24h # noqa: E501 + + :return: The low_24h of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._low_24h + + @low_24h.setter + def low_24h(self, low_24h): + """Sets the low_24h of this FuturesTicker. + + Lowest trading price in recent 24h # noqa: E501 + + :param low_24h: The low_24h of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._low_24h = low_24h + + @property + def high_24h(self): + """Gets the high_24h of this FuturesTicker. # noqa: E501 + + Highest trading price in recent 24h # noqa: E501 + + :return: The high_24h of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._high_24h + + @high_24h.setter + def high_24h(self, high_24h): + """Sets the high_24h of this FuturesTicker. + + Highest trading price in recent 24h # noqa: E501 + + :param high_24h: The high_24h of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._high_24h = high_24h + + @property + def volume_24h(self): + """Gets the volume_24h of this FuturesTicker. # noqa: E501 + + Trade size in recent 24h # noqa: E501 + + :return: The volume_24h of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h + + @volume_24h.setter + def volume_24h(self, volume_24h): + """Sets the volume_24h of this FuturesTicker. + + Trade size in recent 24h # noqa: E501 + + :param volume_24h: The volume_24h of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._volume_24h = volume_24h + + @property + def volume_24h_btc(self): + """Gets the volume_24h_btc of this FuturesTicker. # noqa: E501 + + Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :return: The volume_24h_btc of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_btc + + @volume_24h_btc.setter + def volume_24h_btc(self, volume_24h_btc): + """Sets the volume_24h_btc of this FuturesTicker. + + Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :param volume_24h_btc: The volume_24h_btc of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_btc = volume_24h_btc + + @property + def volume_24h_usd(self): + """Gets the volume_24h_usd of this FuturesTicker. # noqa: E501 + + Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :return: The volume_24h_usd of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_usd + + @volume_24h_usd.setter + def volume_24h_usd(self, volume_24h_usd): + """Sets the volume_24h_usd of this FuturesTicker. + + Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :param volume_24h_usd: The volume_24h_usd of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_usd = volume_24h_usd + + @property + def volume_24h_base(self): + """Gets the volume_24h_base of this FuturesTicker. # noqa: E501 + + Trade volume in recent 24h, in base currency # noqa: E501 + + :return: The volume_24h_base of this FuturesTicker. # 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 FuturesTicker. + + Trade volume in recent 24h, in base currency # noqa: E501 + + :param volume_24h_base: The volume_24h_base of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_base = volume_24h_base + + @property + def volume_24h_quote(self): + """Gets the volume_24h_quote of this FuturesTicker. # noqa: E501 + + Trade volume in recent 24h, in quote currency # noqa: E501 + + :return: The volume_24h_quote of this FuturesTicker. # 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 FuturesTicker. + + Trade volume in recent 24h, in quote currency # noqa: E501 + + :param volume_24h_quote: The volume_24h_quote of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_quote = volume_24h_quote + + @property + def volume_24h_settle(self): + """Gets the volume_24h_settle of this FuturesTicker. # noqa: E501 + + Trade volume in recent 24h, in settle currency # noqa: E501 + + :return: The volume_24h_settle of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_settle + + @volume_24h_settle.setter + def volume_24h_settle(self, volume_24h_settle): + """Sets the volume_24h_settle of this FuturesTicker. + + Trade volume in recent 24h, in settle currency # noqa: E501 + + :param volume_24h_settle: The volume_24h_settle of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_settle = volume_24h_settle + + @property + def mark_price(self): + """Gets the mark_price of this FuturesTicker. # noqa: E501 + + Recent mark price # noqa: E501 + + :return: The mark_price of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this FuturesTicker. + + Recent mark price # noqa: E501 + + :param mark_price: The mark_price of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def funding_rate(self): + """Gets the funding_rate of this FuturesTicker. # noqa: E501 + + Funding rate # noqa: E501 + + :return: The funding_rate of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._funding_rate + + @funding_rate.setter + def funding_rate(self, funding_rate): + """Sets the funding_rate of this FuturesTicker. + + Funding rate # noqa: E501 + + :param funding_rate: The funding_rate of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._funding_rate = funding_rate + + @property + def funding_rate_indicative(self): + """Gets the funding_rate_indicative of this FuturesTicker. # noqa: E501 + + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + + :return: The funding_rate_indicative of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._funding_rate_indicative + + @funding_rate_indicative.setter + def funding_rate_indicative(self, funding_rate_indicative): + """Sets the funding_rate_indicative of this FuturesTicker. + + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + + :param funding_rate_indicative: The funding_rate_indicative of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._funding_rate_indicative = funding_rate_indicative + + @property + def index_price(self): + """Gets the index_price of this FuturesTicker. # noqa: E501 + + Index price # noqa: E501 + + :return: The index_price of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this FuturesTicker. + + Index price # noqa: E501 + + :param index_price: The index_price of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def quanto_base_rate(self): + """Gets the quanto_base_rate of this FuturesTicker. # noqa: E501 + + Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501 + + :return: The quanto_base_rate of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._quanto_base_rate + + @quanto_base_rate.setter + def quanto_base_rate(self, quanto_base_rate): + """Sets the quanto_base_rate of this FuturesTicker. + + Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501 + + :param quanto_base_rate: The quanto_base_rate of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._quanto_base_rate = quanto_base_rate + + @property + def basis_rate(self): + """Gets the basis_rate of this FuturesTicker. # noqa: E501 + + Basis rate # noqa: E501 + + :return: The basis_rate of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._basis_rate + + @basis_rate.setter + def basis_rate(self, basis_rate): + """Sets the basis_rate of this FuturesTicker. + + Basis rate # noqa: E501 + + :param basis_rate: The basis_rate of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._basis_rate = basis_rate + + @property + def basis_value(self): + """Gets the basis_value of this FuturesTicker. # noqa: E501 + + Basis value # noqa: E501 + + :return: The basis_value of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._basis_value + + @basis_value.setter + def basis_value(self, basis_value): + """Sets the basis_value of this FuturesTicker. + + Basis value # noqa: E501 + + :param basis_value: The basis_value of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._basis_value = basis_value + + @property + def lowest_ask(self): + """Gets the lowest_ask of this FuturesTicker. # noqa: E501 + + Recent lowest ask # noqa: E501 + + :return: The lowest_ask of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._lowest_ask + + @lowest_ask.setter + def lowest_ask(self, lowest_ask): + """Sets the lowest_ask of this FuturesTicker. + + Recent lowest ask # noqa: E501 + + :param lowest_ask: The lowest_ask of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._lowest_ask = lowest_ask + + @property + def lowest_size(self): + """Gets the lowest_size of this FuturesTicker. # noqa: E501 + + The latest seller's lowest price order quantity # noqa: E501 + + :return: The lowest_size of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._lowest_size + + @lowest_size.setter + def lowest_size(self, lowest_size): + """Sets the lowest_size of this FuturesTicker. + + The latest seller's lowest price order quantity # noqa: E501 + + :param lowest_size: The lowest_size of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._lowest_size = lowest_size + + @property + def highest_bid(self): + """Gets the highest_bid of this FuturesTicker. # noqa: E501 + + Recent highest bid # noqa: E501 + + :return: The highest_bid of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._highest_bid + + @highest_bid.setter + def highest_bid(self, highest_bid): + """Sets the highest_bid of this FuturesTicker. + + Recent highest bid # noqa: E501 + + :param highest_bid: The highest_bid of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._highest_bid = highest_bid + + @property + def highest_size(self): + """Gets the highest_size of this FuturesTicker. # noqa: E501 + + The latest buyer's highest price order volume # noqa: E501 + + :return: The highest_size of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._highest_size + + @highest_size.setter + def highest_size(self, highest_size): + """Sets the highest_size of this FuturesTicker. + + The latest buyer's highest price order volume # noqa: E501 + + :param highest_size: The highest_size of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._highest_size = highest_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesTicker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesTicker): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py new file mode 100644 index 0000000..c28ab4e --- /dev/null +++ b/gate_api/models/futures_trade.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesTrade(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'create_time': 'float', + 'create_time_ms': 'float', + 'contract': 'str', + 'size': 'int', + 'price': 'str', + 'is_internal': 'bool' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'create_time', + 'create_time_ms': 'create_time_ms', + 'contract': 'contract', + 'size': 'size', + 'price': 'price', + 'is_internal': 'is_internal' + } + + def __init__(self, id=None, create_time=None, create_time_ms=None, contract=None, size=None, price=None, is_internal=None, local_vars_configuration=None): # noqa: E501 + # type: (int, float, float, str, int, str, bool, Configuration) -> None + """FuturesTrade - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._create_time = None + self._create_time_ms = None + self._contract = None + self._size = None + self._price = None + self._is_internal = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if create_time_ms is not None: + self.create_time_ms = create_time_ms + if contract is not None: + self.contract = contract + if size is not None: + self.size = size + if price is not None: + self.price = price + if is_internal is not None: + self.is_internal = is_internal + + @property + def id(self): + """Gets the id of this FuturesTrade. # noqa: E501 + + Trade ID # noqa: E501 + + :return: The id of this FuturesTrade. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this FuturesTrade. + + Trade ID # noqa: E501 + + :param id: The id of this FuturesTrade. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this FuturesTrade. # noqa: E501 + + Trading time # noqa: E501 + + :return: The create_time of this FuturesTrade. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this FuturesTrade. + + Trading time # noqa: E501 + + :param create_time: The create_time of this FuturesTrade. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def create_time_ms(self): + """Gets the create_time_ms of this FuturesTrade. # noqa: E501 + + Trading time, with milliseconds set to 3 decimal places. # noqa: E501 + + :return: The create_time_ms of this FuturesTrade. # noqa: E501 + :rtype: float + """ + return self._create_time_ms + + @create_time_ms.setter + def create_time_ms(self, create_time_ms): + """Sets the create_time_ms of this FuturesTrade. + + Trading time, with milliseconds set to 3 decimal places. # noqa: E501 + + :param create_time_ms: The create_time_ms of this FuturesTrade. # noqa: E501 + :type: float + """ + + self._create_time_ms = create_time_ms + + @property + def contract(self): + """Gets the contract of this FuturesTrade. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this FuturesTrade. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this FuturesTrade. + + Futures contract # noqa: E501 + + :param contract: The contract of this FuturesTrade. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def size(self): + """Gets the size of this FuturesTrade. # noqa: E501 + + Trading size # noqa: E501 + + :return: The size of this FuturesTrade. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this FuturesTrade. + + Trading size # noqa: E501 + + :param size: The size of this FuturesTrade. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def price(self): + """Gets the price of this FuturesTrade. # noqa: E501 + + Trading price (quote currency) # noqa: E501 + + :return: The price of this FuturesTrade. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this FuturesTrade. + + Trading price (quote currency) # noqa: E501 + + :param price: The price of this FuturesTrade. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def is_internal(self): + """Gets the is_internal of this FuturesTrade. # noqa: E501 + + Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501 + + :return: The is_internal of this FuturesTrade. # noqa: E501 + :rtype: bool + """ + return self._is_internal + + @is_internal.setter + def is_internal(self, is_internal): + """Sets the is_internal of this FuturesTrade. + + Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501 + + :param is_internal: The is_internal of this FuturesTrade. # noqa: E501 + :type: bool + """ + + self._is_internal = is_internal + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesTrade): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesTrade): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py new file mode 100644 index 0000000..fff7594 --- /dev/null +++ b/gate_api/models/index_constituent.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class IndexConstituent(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'symbols': 'list[str]' + } + + attribute_map = { + 'exchange': 'exchange', + 'symbols': 'symbols' + } + + def __init__(self, exchange=None, symbols=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[str], Configuration) -> None + """IndexConstituent - a 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._symbols = None + self.discriminator = None + + if exchange is not None: + self.exchange = exchange + if symbols is not None: + self.symbols = symbols + + @property + def exchange(self): + """Gets the exchange of this IndexConstituent. # noqa: E501 + + Exchange # noqa: E501 + + :return: The exchange of this IndexConstituent. # noqa: E501 + :rtype: str + """ + return self._exchange + + @exchange.setter + def exchange(self, exchange): + """Sets the exchange of this IndexConstituent. + + Exchange # noqa: E501 + + :param exchange: The exchange of this IndexConstituent. # noqa: E501 + :type: str + """ + + self._exchange = exchange + + @property + def symbols(self): + """Gets the symbols of this IndexConstituent. # noqa: E501 + + Symbol list # noqa: E501 + + :return: The symbols of this IndexConstituent. # noqa: E501 + :rtype: list[str] + """ + return self._symbols + + @symbols.setter + def symbols(self, symbols): + """Sets the symbols of this IndexConstituent. + + Symbol list # noqa: E501 + + :param symbols: The symbols of this IndexConstituent. # noqa: E501 + :type: list[str] + """ + + self._symbols = symbols + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IndexConstituent): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IndexConstituent): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_object.py b/gate_api/models/inline_object.py new file mode 100644 index 0000000..7e83658 --- /dev/null +++ b/gate_api/models/inline_object.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class InlineObject(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mode': 'str', + 'contract': 'str' + } + + attribute_map = { + 'mode': 'mode', + 'contract': 'contract' + } + + def __init__(self, mode=None, contract=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """InlineObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._mode = None + self._contract = None + self.discriminator = None + + self.mode = mode + self.contract = contract + + @property + def mode(self): + """Gets the mode of this InlineObject. # noqa: E501 + + Full position-by-position model, ISOLATED-by-position, CROSS-full position # noqa: E501 + + :return: The mode of this InlineObject. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this InlineObject. + + Full position-by-position model, ISOLATED-by-position, CROSS-full position # noqa: E501 + + :param mode: The mode of this InlineObject. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501 + raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501 + + self._mode = mode + + @property + def contract(self): + """Gets the contract of this InlineObject. # noqa: E501 + + Contract Market # noqa: E501 + + :return: The contract of this InlineObject. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this InlineObject. + + Contract Market # noqa: E501 + + :param contract: The contract of this InlineObject. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 + raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 + + self._contract = contract + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineObject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py new file mode 100644 index 0000000..3b33b35 --- /dev/null +++ b/gate_api/models/inline_response200.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class InlineResponse200(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'int', + 'vaule': 'str' + } + + attribute_map = { + 'time': 'time', + 'vaule': 'vaule' + } + + def __init__(self, time=None, vaule=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """InlineResponse200 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._vaule = None + self.discriminator = None + + if time is not None: + self.time = time + if vaule is not None: + self.vaule = vaule + + @property + def time(self): + """Gets the time of this InlineResponse200. # noqa: E501 + + + :return: The time of this InlineResponse200. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this InlineResponse200. + + + :param time: The time of this InlineResponse200. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def vaule(self): + """Gets the vaule of this InlineResponse200. # noqa: E501 + + + :return: The vaule of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._vaule + + @vaule.setter + def vaule(self, vaule): + """Sets the vaule of this InlineResponse200. + + + :param vaule: The vaule of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._vaule = vaule + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse200): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineResponse200): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py new file mode 100644 index 0000000..ac2ace6 --- /dev/null +++ b/gate_api/models/insurance_record.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class InsuranceRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 't': 'int', + 'b': 'str' + } + + attribute_map = { + 't': 't', + 'b': 'b' + } + + def __init__(self, t=None, b=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """InsuranceRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._t = None + self._b = None + self.discriminator = None + + if t is not None: + self.t = t + if b is not None: + self.b = b + + @property + def t(self): + """Gets the t of this InsuranceRecord. # noqa: E501 + + Unix timestamp in seconds # noqa: E501 + + :return: The t of this InsuranceRecord. # noqa: E501 + :rtype: int + """ + return self._t + + @t.setter + def t(self, t): + """Sets the t of this InsuranceRecord. + + Unix timestamp in seconds # noqa: E501 + + :param t: The t of this InsuranceRecord. # noqa: E501 + :type: int + """ + + self._t = t + + @property + def b(self): + """Gets the b of this InsuranceRecord. # noqa: E501 + + Insurance balance # noqa: E501 + + :return: The b of this InsuranceRecord. # noqa: E501 + :rtype: str + """ + return self._b + + @b.setter + def b(self, b): + """Sets the b of this InsuranceRecord. + + Insurance balance # noqa: E501 + + :param b: The b of this InsuranceRecord. # noqa: E501 + :type: str + """ + + self._b = b + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InsuranceRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InsuranceRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py new file mode 100644 index 0000000..fead07b --- /dev/null +++ b/gate_api/models/ledger_record.py @@ -0,0 +1,434 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class LedgerRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'txid': 'str', + 'withdraw_order_id': 'str', + 'timestamp': 'str', + 'amount': 'str', + 'currency': 'str', + 'address': 'str', + 'memo': 'str', + 'withdraw_id': 'str', + 'asset_class': 'str', + 'status': 'str', + 'chain': 'str' + } + + attribute_map = { + 'id': 'id', + 'txid': 'txid', + 'withdraw_order_id': 'withdraw_order_id', + 'timestamp': 'timestamp', + 'amount': 'amount', + 'currency': 'currency', + 'address': 'address', + 'memo': 'memo', + 'withdraw_id': 'withdraw_id', + 'asset_class': 'asset_class', + 'status': 'status', + 'chain': 'chain' + } + + def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, amount=None, currency=None, address=None, memo=None, withdraw_id=None, asset_class=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """LedgerRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._txid = None + self._withdraw_order_id = None + self._timestamp = None + self._amount = None + self._currency = None + self._address = None + self._memo = None + self._withdraw_id = None + self._asset_class = None + self._status = None + self._chain = None + self.discriminator = None + + if id is not None: + self.id = id + if txid is not None: + self.txid = txid + if withdraw_order_id is not None: + self.withdraw_order_id = withdraw_order_id + if timestamp is not None: + self.timestamp = timestamp + self.amount = amount + self.currency = currency + if address is not None: + self.address = address + if memo is not None: + self.memo = memo + if withdraw_id is not None: + self.withdraw_id = withdraw_id + if asset_class is not None: + self.asset_class = asset_class + if status is not None: + self.status = status + self.chain = chain + + @property + def id(self): + """Gets the id of this LedgerRecord. # noqa: E501 + + Record ID # noqa: E501 + + :return: The id of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this LedgerRecord. + + Record ID # noqa: E501 + + :param id: The id of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def txid(self): + """Gets the txid of this LedgerRecord. # noqa: E501 + + Hash record of the withdrawal # noqa: E501 + + :return: The txid of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._txid + + @txid.setter + def txid(self, txid): + """Sets the txid of this LedgerRecord. + + Hash record of the withdrawal # noqa: E501 + + :param txid: The txid of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._txid = txid + + @property + def withdraw_order_id(self): + """Gets the withdraw_order_id of this LedgerRecord. # noqa: E501 + + User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501 + + :return: The withdraw_order_id of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._withdraw_order_id + + @withdraw_order_id.setter + def withdraw_order_id(self, withdraw_order_id): + """Sets the withdraw_order_id of this LedgerRecord. + + User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501 + + :param withdraw_order_id: The withdraw_order_id of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._withdraw_order_id = withdraw_order_id + + @property + def timestamp(self): + """Gets the timestamp of this LedgerRecord. # noqa: E501 + + Operation time # noqa: E501 + + :return: The timestamp of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this LedgerRecord. + + Operation time # noqa: E501 + + :param timestamp: The timestamp of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._timestamp = timestamp + + @property + def amount(self): + """Gets the amount of this LedgerRecord. # noqa: E501 + + Currency amount # noqa: E501 + + :return: The amount of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this LedgerRecord. + + Currency amount # noqa: E501 + + :param amount: The amount of this LedgerRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def currency(self): + """Gets the currency of this LedgerRecord. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this LedgerRecord. + + Currency name # noqa: E501 + + :param currency: The currency of this LedgerRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def address(self): + """Gets the address of this LedgerRecord. # noqa: E501 + + Withdrawal address. Required for withdrawals # noqa: E501 + + :return: The address of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this LedgerRecord. + + Withdrawal address. Required for withdrawals # noqa: E501 + + :param address: The address of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def memo(self): + """Gets the memo of this LedgerRecord. # noqa: E501 + + Additional remarks with regards to the withdrawal # noqa: E501 + + :return: The memo of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this LedgerRecord. + + Additional remarks with regards to the withdrawal # noqa: E501 + + :param memo: The memo of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._memo = memo + + @property + def withdraw_id(self): + """Gets the withdraw_id of this LedgerRecord. # noqa: E501 + + The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time # noqa: E501 + + :return: The withdraw_id of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._withdraw_id + + @withdraw_id.setter + def withdraw_id(self, withdraw_id): + """Sets the withdraw_id of this LedgerRecord. + + The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time # noqa: E501 + + :param withdraw_id: The withdraw_id of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._withdraw_id = withdraw_id + + @property + def asset_class(self): + """Gets the asset_class of this LedgerRecord. # noqa: E501 + + The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone # noqa: E501 + + :return: The asset_class of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._asset_class + + @asset_class.setter + def asset_class(self, asset_class): + """Sets the asset_class of this LedgerRecord. + + The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone # noqa: E501 + + :param asset_class: The asset_class of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._asset_class = asset_class + + @property + def status(self): + """Gets the status of this LedgerRecord. # noqa: E501 + + Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - REVIEW: Under review # noqa: E501 + + :return: The status of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this LedgerRecord. + + Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - REVIEW: Under review # noqa: E501 + + :param status: The status of this LedgerRecord. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def chain(self): + """Gets the chain of this LedgerRecord. # noqa: E501 + + Name of the chain used in withdrawals # noqa: E501 + + :return: The chain of this LedgerRecord. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this LedgerRecord. + + Name of the chain used in withdrawals # noqa: E501 + + :param chain: The chain of this LedgerRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and chain is None: # noqa: E501 + raise ValueError("Invalid value for `chain`, must not be `None`") # noqa: E501 + + self._chain = chain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LedgerRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LedgerRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py new file mode 100644 index 0000000..08b3ae6 --- /dev/null +++ b/gate_api/models/liquidate_order.py @@ -0,0 +1,238 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class LiquidateOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'text': 'str', + 'currency_pair': 'str', + 'amount': 'str', + 'price': 'str', + 'action_mode': 'str' + } + + attribute_map = { + 'text': 'text', + 'currency_pair': 'currency_pair', + 'amount': 'amount', + 'price': 'price', + 'action_mode': 'action_mode' + } + + def __init__(self, text=None, currency_pair=None, amount=None, price=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """LiquidateOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._text = None + self._currency_pair = None + self._amount = None + self._price = None + self._action_mode = None + self.discriminator = None + + if text is not None: + self.text = text + self.currency_pair = currency_pair + self.amount = amount + self.price = price + if action_mode is not None: + self.action_mode = action_mode + + @property + def text(self): + """Gets the text of this LiquidateOrder. # noqa: E501 + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :return: The text of this LiquidateOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this LiquidateOrder. + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :param text: The text of this LiquidateOrder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def currency_pair(self): + """Gets the currency_pair of this LiquidateOrder. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this LiquidateOrder. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this LiquidateOrder. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this LiquidateOrder. # 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 amount(self): + """Gets the amount of this LiquidateOrder. # noqa: E501 + + Trade amount # noqa: E501 + + :return: The amount of this LiquidateOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this LiquidateOrder. + + Trade amount # noqa: E501 + + :param amount: The amount of this LiquidateOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def price(self): + """Gets the price of this LiquidateOrder. # noqa: E501 + + Order price # noqa: E501 + + :return: The price of this LiquidateOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this LiquidateOrder. + + Order price # noqa: E501 + + :param price: The price of this LiquidateOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 + raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 + + self._price = price + + @property + def action_mode(self): + """Gets the action_mode of this LiquidateOrder. # noqa: E501 + + Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :return: The action_mode of this LiquidateOrder. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this LiquidateOrder. + + Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :param action_mode: The action_mode of this LiquidateOrder. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LiquidateOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LiquidateOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py new file mode 100644 index 0000000..f805980 --- /dev/null +++ b/gate_api/models/margin_account.py @@ -0,0 +1,315 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MarginAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'account_type': 'str', + 'leverage': 'str', + 'locked': 'bool', + 'risk': 'str', + 'mmr': 'str', + 'base': 'MarginAccountCurrency', + 'quote': 'MarginAccountCurrency' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'account_type': 'account_type', + 'leverage': 'leverage', + 'locked': 'locked', + 'risk': 'risk', + 'mmr': 'mmr', + 'base': 'base', + 'quote': 'quote' + } + + def __init__(self, currency_pair=None, account_type=None, leverage=None, locked=None, risk=None, mmr=None, base=None, quote=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, str, str, MarginAccountCurrency, MarginAccountCurrency, Configuration) -> None + """MarginAccount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._account_type = None + self._leverage = None + self._locked = None + self._risk = None + self._mmr = None + self._base = None + self._quote = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if account_type is not None: + self.account_type = account_type + if leverage is not None: + self.leverage = leverage + if locked is not None: + self.locked = locked + if risk is not None: + self.risk = risk + if mmr is not None: + self.mmr = mmr + if base is not None: + self.base = base + if quote is not None: + self.quote = quote + + @property + def currency_pair(self): + """Gets the currency_pair of this MarginAccount. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this MarginAccount. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this MarginAccount. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this MarginAccount. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def account_type(self): + """Gets the account_type of this MarginAccount. # noqa: E501 + + Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 + + :return: The account_type of this MarginAccount. # noqa: E501 + :rtype: str + """ + return self._account_type + + @account_type.setter + def account_type(self, account_type): + """Sets the account_type of this MarginAccount. + + Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 + + :param account_type: The account_type of this MarginAccount. # noqa: E501 + :type: str + """ + + self._account_type = account_type + + @property + def leverage(self): + """Gets the leverage of this MarginAccount. # noqa: E501 + + User current market leverage multiple # noqa: E501 + + :return: The leverage of this MarginAccount. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this MarginAccount. + + User current market leverage multiple # noqa: E501 + + :param leverage: The leverage of this MarginAccount. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def locked(self): + """Gets the locked of this MarginAccount. # noqa: E501 + + Whether account is locked # noqa: E501 + + :return: The locked of this MarginAccount. # noqa: E501 + :rtype: bool + """ + return self._locked + + @locked.setter + def locked(self, locked): + """Sets the locked of this MarginAccount. + + Whether account is locked # noqa: E501 + + :param locked: The locked of this MarginAccount. # noqa: E501 + :type: bool + """ + + self._locked = locked + + @property + def risk(self): + """Gets the risk of this MarginAccount. # noqa: E501 + + Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) # noqa: E501 + + :return: The risk of this MarginAccount. # noqa: E501 + :rtype: str + """ + return self._risk + + @risk.setter + def risk(self, risk): + """Sets the risk of this MarginAccount. + + Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) # noqa: E501 + + :param risk: The risk of this MarginAccount. # noqa: E501 + :type: str + """ + + self._risk = risk + + @property + def mmr(self): + """Gets the mmr of this MarginAccount. # noqa: E501 + + Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) # noqa: E501 + + :return: The mmr of this MarginAccount. # noqa: E501 + :rtype: str + """ + return self._mmr + + @mmr.setter + def mmr(self, mmr): + """Sets the mmr of this MarginAccount. + + Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) # noqa: E501 + + :param mmr: The mmr of this MarginAccount. # noqa: E501 + :type: str + """ + + self._mmr = mmr + + @property + def base(self): + """Gets the base of this MarginAccount. # noqa: E501 + + + :return: The base of this MarginAccount. # noqa: E501 + :rtype: MarginAccountCurrency + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this MarginAccount. + + + :param base: The base of this MarginAccount. # noqa: E501 + :type: MarginAccountCurrency + """ + + self._base = base + + @property + def quote(self): + """Gets the quote of this MarginAccount. # noqa: E501 + + + :return: The quote of this MarginAccount. # noqa: E501 + :rtype: MarginAccountCurrency + """ + return self._quote + + @quote.setter + def quote(self, quote): + """Sets the quote of this MarginAccount. + + + :param quote: The quote of this MarginAccount. # noqa: E501 + :type: MarginAccountCurrency + """ + + self._quote = quote + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarginAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarginAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py new file mode 100644 index 0000000..044bd9a --- /dev/null +++ b/gate_api/models/margin_account_book.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MarginAccountBook(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'time': 'str', + 'time_ms': 'int', + 'currency': 'str', + 'currency_pair': 'str', + 'change': 'str', + 'balance': 'str', + 'type': 'str' + } + + attribute_map = { + 'id': 'id', + 'time': 'time', + 'time_ms': 'time_ms', + 'currency': 'currency', + 'currency_pair': 'currency_pair', + 'change': 'change', + 'balance': 'balance', + 'type': 'type' + } + + def __init__(self, id=None, time=None, time_ms=None, currency=None, currency_pair=None, change=None, balance=None, type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, str, str, str, str, str, Configuration) -> None + """MarginAccountBook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._time = None + self._time_ms = None + self._currency = None + self._currency_pair = None + self._change = None + self._balance = None + self._type = None + self.discriminator = None + + if id is not None: + self.id = id + if time is not None: + self.time = time + if time_ms is not None: + self.time_ms = time_ms + if currency is not None: + self.currency = currency + if currency_pair is not None: + self.currency_pair = currency_pair + if change is not None: + self.change = change + if balance is not None: + self.balance = balance + if type is not None: + self.type = type + + @property + def id(self): + """Gets the id of this MarginAccountBook. # noqa: E501 + + Balance change record ID # noqa: E501 + + :return: The id of this MarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this MarginAccountBook. + + Balance change record ID # noqa: E501 + + :param id: The id of this MarginAccountBook. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def time(self): + """Gets the time of this MarginAccountBook. # noqa: E501 + + Balance changed timestamp # noqa: E501 + + :return: The time of this MarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this MarginAccountBook. + + Balance changed timestamp # noqa: E501 + + :param time: The time of this MarginAccountBook. # noqa: E501 + :type: str + """ + + self._time = time + + @property + def time_ms(self): + """Gets the time_ms of this MarginAccountBook. # noqa: E501 + + The timestamp of the change (in milliseconds) # noqa: E501 + + :return: The time_ms of this MarginAccountBook. # noqa: E501 + :rtype: int + """ + return self._time_ms + + @time_ms.setter + def time_ms(self, time_ms): + """Sets the time_ms of this MarginAccountBook. + + The timestamp of the change (in milliseconds) # noqa: E501 + + :param time_ms: The time_ms of this MarginAccountBook. # noqa: E501 + :type: int + """ + + self._time_ms = time_ms + + @property + def currency(self): + """Gets the currency of this MarginAccountBook. # noqa: E501 + + Currency changed # noqa: E501 + + :return: The currency of this MarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MarginAccountBook. + + Currency changed # noqa: E501 + + :param currency: The currency of this MarginAccountBook. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def currency_pair(self): + """Gets the currency_pair of this MarginAccountBook. # noqa: E501 + + Account currency pair # noqa: E501 + + :return: The currency_pair of this MarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this MarginAccountBook. + + Account currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this MarginAccountBook. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def change(self): + """Gets the change of this MarginAccountBook. # noqa: E501 + + Amount changed. Positive value means transferring in, while negative out # noqa: E501 + + :return: The change of this MarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this MarginAccountBook. + + Amount changed. Positive value means transferring in, while negative out # noqa: E501 + + :param change: The change of this MarginAccountBook. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def balance(self): + """Gets the balance of this MarginAccountBook. # noqa: E501 + + Balance after change # noqa: E501 + + :return: The balance of this MarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this MarginAccountBook. + + Balance after change # noqa: E501 + + :param balance: The balance of this MarginAccountBook. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def type(self): + """Gets the type of this MarginAccountBook. # noqa: E501 + + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + + :return: The type of this MarginAccountBook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this MarginAccountBook. + + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + + :param type: The type of this MarginAccountBook. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarginAccountBook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarginAccountBook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py new file mode 100644 index 0000000..7c727fd --- /dev/null +++ b/gate_api/models/margin_account_currency.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MarginAccountCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'borrowed': 'str', + 'interest': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'available': 'available', + 'locked': 'locked', + 'borrowed': 'borrowed', + 'interest': 'interest' + } + + def __init__(self, currency=None, available=None, locked=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """MarginAccountCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._available = None + self._locked = None + self._borrowed = None + self._interest = 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 borrowed is not None: + self.borrowed = borrowed + if interest is not None: + self.interest = interest + + @property + def currency(self): + """Gets the currency of this MarginAccountCurrency. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this MarginAccountCurrency. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MarginAccountCurrency. + + Currency name # noqa: E501 + + :param currency: The currency of this MarginAccountCurrency. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def available(self): + """Gets the available of this MarginAccountCurrency. # noqa: E501 + + Amount suitable for margin trading. # noqa: E501 + + :return: The available of this MarginAccountCurrency. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this MarginAccountCurrency. + + Amount suitable for margin trading. # noqa: E501 + + :param available: The available of this MarginAccountCurrency. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def locked(self): + """Gets the locked of this MarginAccountCurrency. # noqa: E501 + + Locked amount, used in margin trading # noqa: E501 + + :return: The locked of this MarginAccountCurrency. # noqa: E501 + :rtype: str + """ + return self._locked + + @locked.setter + def locked(self, locked): + """Sets the locked of this MarginAccountCurrency. + + Locked amount, used in margin trading # noqa: E501 + + :param locked: The locked of this MarginAccountCurrency. # noqa: E501 + :type: str + """ + + self._locked = locked + + @property + def borrowed(self): + """Gets the borrowed of this MarginAccountCurrency. # noqa: E501 + + Borrowed amount # noqa: E501 + + :return: The borrowed of this MarginAccountCurrency. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this MarginAccountCurrency. + + Borrowed amount # noqa: E501 + + :param borrowed: The borrowed of this MarginAccountCurrency. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def interest(self): + """Gets the interest of this MarginAccountCurrency. # noqa: E501 + + Unpaid interests # noqa: E501 + + :return: The interest of this MarginAccountCurrency. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this MarginAccountCurrency. + + Unpaid interests # noqa: E501 + + :param interest: The interest of this MarginAccountCurrency. # noqa: E501 + :type: str + """ + + self._interest = interest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarginAccountCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarginAccountCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py new file mode 100644 index 0000000..7628994 --- /dev/null +++ b/gate_api/models/margin_leverage_tier.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MarginLeverageTier(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'upper_limit': 'str', + 'mmr': 'str', + 'leverage': 'str' + } + + attribute_map = { + 'upper_limit': 'upper_limit', + 'mmr': 'mmr', + 'leverage': 'leverage' + } + + def __init__(self, upper_limit=None, mmr=None, leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """MarginLeverageTier - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._upper_limit = None + self._mmr = None + self._leverage = None + self.discriminator = None + + if upper_limit is not None: + self.upper_limit = upper_limit + if mmr is not None: + self.mmr = mmr + if leverage is not None: + self.leverage = leverage + + @property + def upper_limit(self): + """Gets the upper_limit of this MarginLeverageTier. # noqa: E501 + + Maximum loan limit # noqa: E501 + + :return: The upper_limit of this MarginLeverageTier. # noqa: E501 + :rtype: str + """ + return self._upper_limit + + @upper_limit.setter + def upper_limit(self, upper_limit): + """Sets the upper_limit of this MarginLeverageTier. + + Maximum loan limit # noqa: E501 + + :param upper_limit: The upper_limit of this MarginLeverageTier. # noqa: E501 + :type: str + """ + + self._upper_limit = upper_limit + + @property + def mmr(self): + """Gets the mmr of this MarginLeverageTier. # noqa: E501 + + Maintenance margin rate # noqa: E501 + + :return: The mmr of this MarginLeverageTier. # noqa: E501 + :rtype: str + """ + return self._mmr + + @mmr.setter + def mmr(self, mmr): + """Sets the mmr of this MarginLeverageTier. + + Maintenance margin rate # noqa: E501 + + :param mmr: The mmr of this MarginLeverageTier. # noqa: E501 + :type: str + """ + + self._mmr = mmr + + @property + def leverage(self): + """Gets the leverage of this MarginLeverageTier. # noqa: E501 + + Maximum leverage multiple # noqa: E501 + + :return: The leverage of this MarginLeverageTier. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this MarginLeverageTier. + + Maximum leverage multiple # noqa: E501 + + :param leverage: The leverage of this MarginLeverageTier. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarginLeverageTier): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarginLeverageTier): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py new file mode 100644 index 0000000..b8c8dda --- /dev/null +++ b/gate_api/models/margin_market_leverage.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MarginMarketLeverage(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency_pair': 'str', + 'leverage': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'leverage': 'leverage' + } + + def __init__(self, currency_pair=None, leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """MarginMarketLeverage - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._leverage = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + self.leverage = leverage + + @property + def currency_pair(self): + """Gets the currency_pair of this MarginMarketLeverage. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this MarginMarketLeverage. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this MarginMarketLeverage. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this MarginMarketLeverage. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def leverage(self): + """Gets the leverage of this MarginMarketLeverage. # noqa: E501 + + Position leverage # noqa: E501 + + :return: The leverage of this MarginMarketLeverage. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this MarginMarketLeverage. + + Position leverage # noqa: E501 + + :param leverage: The leverage of this MarginMarketLeverage. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501 + raise ValueError("Invalid value for `leverage`, must not be `None`") # noqa: E501 + + self._leverage = leverage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarginMarketLeverage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarginMarketLeverage): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py new file mode 100644 index 0000000..7ba2e3b --- /dev/null +++ b/gate_api/models/margin_tiers.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MarginTiers(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tier': 'str', + 'margin_rate': 'str', + 'lower_limit': 'str', + 'upper_limit': 'str', + 'leverage': 'str' + } + + attribute_map = { + 'tier': 'tier', + 'margin_rate': 'margin_rate', + 'lower_limit': 'lower_limit', + 'upper_limit': 'upper_limit', + 'leverage': 'leverage' + } + + def __init__(self, tier=None, margin_rate=None, lower_limit=None, upper_limit=None, leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """MarginTiers - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tier = None + self._margin_rate = None + self._lower_limit = None + self._upper_limit = None + self._leverage = None + self.discriminator = None + + if tier is not None: + self.tier = tier + if margin_rate is not None: + self.margin_rate = margin_rate + if lower_limit is not None: + self.lower_limit = lower_limit + if upper_limit is not None: + self.upper_limit = upper_limit + if leverage is not None: + self.leverage = leverage + + @property + def tier(self): + """Gets the tier of this MarginTiers. # noqa: E501 + + Tier # noqa: E501 + + :return: The tier of this MarginTiers. # noqa: E501 + :rtype: str + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this MarginTiers. + + Tier # noqa: E501 + + :param tier: The tier of this MarginTiers. # noqa: E501 + :type: str + """ + + self._tier = tier + + @property + def margin_rate(self): + """Gets the margin_rate of this MarginTiers. # noqa: E501 + + Discount # noqa: E501 + + :return: The margin_rate of this MarginTiers. # noqa: E501 + :rtype: str + """ + return self._margin_rate + + @margin_rate.setter + def margin_rate(self, margin_rate): + """Sets the margin_rate of this MarginTiers. + + Discount # noqa: E501 + + :param margin_rate: The margin_rate of this MarginTiers. # noqa: E501 + :type: str + """ + + self._margin_rate = margin_rate + + @property + def lower_limit(self): + """Gets the lower_limit of this MarginTiers. # noqa: E501 + + Lower limit # noqa: E501 + + :return: The lower_limit of this MarginTiers. # noqa: E501 + :rtype: str + """ + return self._lower_limit + + @lower_limit.setter + def lower_limit(self, lower_limit): + """Sets the lower_limit of this MarginTiers. + + Lower limit # noqa: E501 + + :param lower_limit: The lower_limit of this MarginTiers. # noqa: E501 + :type: str + """ + + self._lower_limit = lower_limit + + @property + def upper_limit(self): + """Gets the upper_limit of this MarginTiers. # noqa: E501 + + Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 + + :return: The upper_limit of this MarginTiers. # noqa: E501 + :rtype: str + """ + return self._upper_limit + + @upper_limit.setter + def upper_limit(self, upper_limit): + """Sets the upper_limit of this MarginTiers. + + Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 + + :param upper_limit: The upper_limit of this MarginTiers. # noqa: E501 + :type: str + """ + + self._upper_limit = upper_limit + + @property + def leverage(self): + """Gets the leverage of this MarginTiers. # noqa: E501 + + Position leverage # noqa: E501 + + :return: The leverage of this MarginTiers. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this MarginTiers. + + Position leverage # noqa: E501 + + :param leverage: The leverage of this MarginTiers. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarginTiers): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarginTiers): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py new file mode 100644 index 0000000..475eb4a --- /dev/null +++ b/gate_api/models/margin_transferable.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MarginTransferable(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'currency_pair': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'currency_pair': 'currency_pair', + 'amount': 'amount' + } + + def __init__(self, currency=None, currency_pair=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """MarginTransferable - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._currency_pair = None + self._amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if currency_pair is not None: + self.currency_pair = currency_pair + if amount is not None: + self.amount = amount + + @property + def currency(self): + """Gets the currency of this MarginTransferable. # noqa: E501 + + Currency detail # noqa: E501 + + :return: The currency of this MarginTransferable. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MarginTransferable. + + Currency detail # noqa: E501 + + :param currency: The currency of this MarginTransferable. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def currency_pair(self): + """Gets the currency_pair of this MarginTransferable. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this MarginTransferable. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this MarginTransferable. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this MarginTransferable. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def amount(self): + """Gets the amount of this MarginTransferable. # noqa: E501 + + Max transferable amount # noqa: E501 + + :return: The amount of this MarginTransferable. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this MarginTransferable. + + Max transferable amount # noqa: E501 + + :param amount: The amount of this MarginTransferable. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarginTransferable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarginTransferable): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py new file mode 100644 index 0000000..308cd25 --- /dev/null +++ b/gate_api/models/max_uni_borrowable.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MaxUniBorrowable(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'currency_pair': 'str', + 'borrowable': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'currency_pair': 'currency_pair', + 'borrowable': 'borrowable' + } + + def __init__(self, currency=None, currency_pair=None, borrowable=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """MaxUniBorrowable - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._currency_pair = None + self._borrowable = None + self.discriminator = None + + self.currency = currency + if currency_pair is not None: + self.currency_pair = currency_pair + self.borrowable = borrowable + + @property + def currency(self): + """Gets the currency of this MaxUniBorrowable. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this MaxUniBorrowable. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MaxUniBorrowable. + + Currency # noqa: E501 + + :param currency: The currency of this MaxUniBorrowable. # 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 currency_pair(self): + """Gets the currency_pair of this MaxUniBorrowable. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this MaxUniBorrowable. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this MaxUniBorrowable. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this MaxUniBorrowable. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def borrowable(self): + """Gets the borrowable of this MaxUniBorrowable. # noqa: E501 + + Maximum borrowable # noqa: E501 + + :return: The borrowable of this MaxUniBorrowable. # noqa: E501 + :rtype: str + """ + return self._borrowable + + @borrowable.setter + def borrowable(self, borrowable): + """Sets the borrowable of this MaxUniBorrowable. + + Maximum borrowable # noqa: E501 + + :param borrowable: The borrowable of this MaxUniBorrowable. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and borrowable is None: # noqa: E501 + raise ValueError("Invalid value for `borrowable`, must not be `None`") # noqa: E501 + + self._borrowable = borrowable + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MaxUniBorrowable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MaxUniBorrowable): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py new file mode 100644 index 0000000..7686660 --- /dev/null +++ b/gate_api/models/mock_futures_order.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockFuturesOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'contract': 'str', + 'size': 'str', + 'left': 'str' + } + + attribute_map = { + 'contract': 'contract', + 'size': 'size', + 'left': 'left' + } + + def __init__(self, contract=None, size=None, left=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """MockFuturesOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._contract = None + self._size = None + self._left = None + self.discriminator = None + + self.contract = contract + self.size = size + self.left = left + + @property + def contract(self): + """Gets the contract of this MockFuturesOrder. # noqa: E501 + + Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + + :return: The contract of this MockFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this MockFuturesOrder. + + Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + + :param contract: The contract of this MockFuturesOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 + raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 + + self._contract = contract + + @property + def size(self): + """Gets the size of this MockFuturesOrder. # noqa: E501 + + Futures quantity, representing the initial order quantity, not involved in actual settlement. # noqa: E501 + + :return: The size of this MockFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this MockFuturesOrder. + + Futures quantity, representing the initial order quantity, not involved in actual settlement. # noqa: E501 + + :param size: The size of this MockFuturesOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + @property + def left(self): + """Gets the left of this MockFuturesOrder. # noqa: E501 + + Unfilled contract quantity, involved in actual calculation # noqa: E501 + + :return: The left of this MockFuturesOrder. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this MockFuturesOrder. + + Unfilled contract quantity, involved in actual calculation # noqa: E501 + + :param left: The left of this MockFuturesOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501 + raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501 + + self._left = left + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockFuturesOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockFuturesOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py new file mode 100644 index 0000000..c6e645c --- /dev/null +++ b/gate_api/models/mock_futures_position.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockFuturesPosition(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'contract': 'str', + 'size': 'str' + } + + attribute_map = { + 'contract': 'contract', + 'size': 'size' + } + + def __init__(self, contract=None, size=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """MockFuturesPosition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._contract = None + self._size = None + self.discriminator = None + + self.contract = contract + self.size = size + + @property + def contract(self): + """Gets the contract of this MockFuturesPosition. # noqa: E501 + + Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + + :return: The contract of this MockFuturesPosition. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this MockFuturesPosition. + + Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + + :param contract: The contract of this MockFuturesPosition. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 + raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 + + self._contract = contract + + @property + def size(self): + """Gets the size of this MockFuturesPosition. # noqa: E501 + + Position size, measured in contract units. # noqa: E501 + + :return: The size of this MockFuturesPosition. # noqa: E501 + :rtype: str + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this MockFuturesPosition. + + Position size, measured in contract units. # noqa: E501 + + :param size: The size of this MockFuturesPosition. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockFuturesPosition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockFuturesPosition): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py new file mode 100644 index 0000000..232b895 --- /dev/null +++ b/gate_api/models/mock_margin_result.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockMarginResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'type': 'str', + 'profit_loss_ranges': 'list[ProfitLossRange]', + 'max_loss': 'ProfitLossRange', + 'mr1': 'str', + 'mr2': 'str', + 'mr3': 'str', + 'mr4': 'str' + } + + attribute_map = { + 'type': 'type', + 'profit_loss_ranges': 'profit_loss_ranges', + 'max_loss': 'max_loss', + 'mr1': 'mr1', + 'mr2': 'mr2', + 'mr3': 'mr3', + 'mr4': 'mr4' + } + + def __init__(self, type=None, profit_loss_ranges=None, max_loss=None, mr1=None, mr2=None, mr3=None, mr4=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[ProfitLossRange], ProfitLossRange, str, str, str, str, Configuration) -> None + """MockMarginResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._type = None + self._profit_loss_ranges = None + self._max_loss = None + self._mr1 = None + self._mr2 = None + self._mr3 = None + self._mr4 = None + self.discriminator = None + + if type is not None: + self.type = type + if profit_loss_ranges is not None: + self.profit_loss_ranges = profit_loss_ranges + if max_loss is not None: + self.max_loss = max_loss + if mr1 is not None: + self.mr1 = mr1 + if mr2 is not None: + self.mr2 = mr2 + if mr3 is not None: + self.mr3 = mr3 + if mr4 is not None: + self.mr4 = mr4 + + @property + def type(self): + """Gets the type of this MockMarginResult. # noqa: E501 + + Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 + + :return: The type of this MockMarginResult. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this MockMarginResult. + + Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 + + :param type: The type of this MockMarginResult. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def profit_loss_ranges(self): + """Gets the profit_loss_ranges of this MockMarginResult. # noqa: E501 + + The results of 33 pressure scenarios for MR1 # noqa: E501 + + :return: The profit_loss_ranges of this MockMarginResult. # noqa: E501 + :rtype: list[ProfitLossRange] + """ + return self._profit_loss_ranges + + @profit_loss_ranges.setter + def profit_loss_ranges(self, profit_loss_ranges): + """Sets the profit_loss_ranges of this MockMarginResult. + + The results of 33 pressure scenarios for MR1 # noqa: E501 + + :param profit_loss_ranges: The profit_loss_ranges of this MockMarginResult. # noqa: E501 + :type: list[ProfitLossRange] + """ + + self._profit_loss_ranges = profit_loss_ranges + + @property + def max_loss(self): + """Gets the max_loss of this MockMarginResult. # noqa: E501 + + 最大损失 # noqa: E501 + + :return: The max_loss of this MockMarginResult. # noqa: E501 + :rtype: ProfitLossRange + """ + return self._max_loss + + @max_loss.setter + def max_loss(self, max_loss): + """Sets the max_loss of this MockMarginResult. + + 最大损失 # noqa: E501 + + :param max_loss: The max_loss of this MockMarginResult. # noqa: E501 + :type: ProfitLossRange + """ + + self._max_loss = max_loss + + @property + def mr1(self): + """Gets the mr1 of this MockMarginResult. # noqa: E501 + + Stress testing # noqa: E501 + + :return: The mr1 of this MockMarginResult. # noqa: E501 + :rtype: str + """ + return self._mr1 + + @mr1.setter + def mr1(self, mr1): + """Sets the mr1 of this MockMarginResult. + + Stress testing # noqa: E501 + + :param mr1: The mr1 of this MockMarginResult. # noqa: E501 + :type: str + """ + + self._mr1 = mr1 + + @property + def mr2(self): + """Gets the mr2 of this MockMarginResult. # noqa: E501 + + Basis spread risk # noqa: E501 + + :return: The mr2 of this MockMarginResult. # noqa: E501 + :rtype: str + """ + return self._mr2 + + @mr2.setter + def mr2(self, mr2): + """Sets the mr2 of this MockMarginResult. + + Basis spread risk # noqa: E501 + + :param mr2: The mr2 of this MockMarginResult. # noqa: E501 + :type: str + """ + + self._mr2 = mr2 + + @property + def mr3(self): + """Gets the mr3 of this MockMarginResult. # noqa: E501 + + Volatility spread risk # noqa: E501 + + :return: The mr3 of this MockMarginResult. # noqa: E501 + :rtype: str + """ + return self._mr3 + + @mr3.setter + def mr3(self, mr3): + """Sets the mr3 of this MockMarginResult. + + Volatility spread risk # noqa: E501 + + :param mr3: The mr3 of this MockMarginResult. # noqa: E501 + :type: str + """ + + self._mr3 = mr3 + + @property + def mr4(self): + """Gets the mr4 of this MockMarginResult. # noqa: E501 + + Option short risk # noqa: E501 + + :return: The mr4 of this MockMarginResult. # noqa: E501 + :rtype: str + """ + return self._mr4 + + @mr4.setter + def mr4(self, mr4): + """Sets the mr4 of this MockMarginResult. + + Option short risk # noqa: E501 + + :param mr4: The mr4 of this MockMarginResult. # noqa: E501 + :type: str + """ + + self._mr4 = mr4 + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockMarginResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockMarginResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py new file mode 100644 index 0000000..4c9548e --- /dev/null +++ b/gate_api/models/mock_options_order.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockOptionsOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'options_name': 'str', + 'size': 'str', + 'left': 'str' + } + + attribute_map = { + 'options_name': 'options_name', + 'size': 'size', + 'left': 'left' + } + + def __init__(self, options_name=None, size=None, left=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """MockOptionsOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._options_name = None + self._size = None + self._left = None + self.discriminator = None + + self.options_name = options_name + self.size = size + self.left = left + + @property + def options_name(self): + """Gets the options_name of this MockOptionsOrder. # noqa: E501 + + Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + + :return: The options_name of this MockOptionsOrder. # noqa: E501 + :rtype: str + """ + return self._options_name + + @options_name.setter + def options_name(self, options_name): + """Sets the options_name of this MockOptionsOrder. + + Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + + :param options_name: The options_name of this MockOptionsOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and options_name is None: # noqa: E501 + raise ValueError("Invalid value for `options_name`, must not be `None`") # noqa: E501 + + self._options_name = options_name + + @property + def size(self): + """Gets the size of this MockOptionsOrder. # noqa: E501 + + Initial order quantity, not involved in actual calculation # noqa: E501 + + :return: The size of this MockOptionsOrder. # noqa: E501 + :rtype: str + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this MockOptionsOrder. + + Initial order quantity, not involved in actual calculation # noqa: E501 + + :param size: The size of this MockOptionsOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + @property + def left(self): + """Gets the left of this MockOptionsOrder. # noqa: E501 + + Unfilled contract quantity, involved in actual calculation # noqa: E501 + + :return: The left of this MockOptionsOrder. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this MockOptionsOrder. + + Unfilled contract quantity, involved in actual calculation # noqa: E501 + + :param left: The left of this MockOptionsOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501 + raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501 + + self._left = left + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockOptionsOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockOptionsOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py new file mode 100644 index 0000000..79b310d --- /dev/null +++ b/gate_api/models/mock_options_position.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockOptionsPosition(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'options_name': 'str', + 'size': 'str' + } + + attribute_map = { + 'options_name': 'options_name', + 'size': 'size' + } + + def __init__(self, options_name=None, size=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """MockOptionsPosition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._options_name = None + self._size = None + self.discriminator = None + + self.options_name = options_name + self.size = size + + @property + def options_name(self): + """Gets the options_name of this MockOptionsPosition. # noqa: E501 + + Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + + :return: The options_name of this MockOptionsPosition. # noqa: E501 + :rtype: str + """ + return self._options_name + + @options_name.setter + def options_name(self, options_name): + """Sets the options_name of this MockOptionsPosition. + + Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + + :param options_name: The options_name of this MockOptionsPosition. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and options_name is None: # noqa: E501 + raise ValueError("Invalid value for `options_name`, must not be `None`") # noqa: E501 + + self._options_name = options_name + + @property + def size(self): + """Gets the size of this MockOptionsPosition. # noqa: E501 + + Position size, measured in contract units. # noqa: E501 + + :return: The size of this MockOptionsPosition. # noqa: E501 + :rtype: str + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this MockOptionsPosition. + + Position size, measured in contract units. # noqa: E501 + + :param size: The size of this MockOptionsPosition. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockOptionsPosition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockOptionsPosition): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py new file mode 100644 index 0000000..4c32074 --- /dev/null +++ b/gate_api/models/mock_risk_unit.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockRiskUnit(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'spot_in_use': 'str', + 'maintain_margin': 'str', + 'initial_margin': 'str', + 'margin_result': 'list[MockMarginResult]', + 'delta': 'str', + 'gamma': 'str', + 'theta': 'str', + 'vega': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'spot_in_use': 'spot_in_use', + 'maintain_margin': 'maintain_margin', + 'initial_margin': 'initial_margin', + 'margin_result': 'margin_result', + 'delta': 'delta', + 'gamma': 'gamma', + 'theta': 'theta', + 'vega': 'vega' + } + + def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_margin=None, margin_result=None, delta=None, gamma=None, theta=None, vega=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, list[MockMarginResult], str, str, str, str, Configuration) -> None + """MockRiskUnit - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._spot_in_use = None + self._maintain_margin = None + self._initial_margin = None + self._margin_result = None + self._delta = None + self._gamma = None + self._theta = None + self._vega = None + self.discriminator = None + + if symbol is not None: + self.symbol = symbol + if spot_in_use is not None: + self.spot_in_use = spot_in_use + if maintain_margin is not None: + self.maintain_margin = maintain_margin + if initial_margin is not None: + self.initial_margin = initial_margin + if margin_result is not None: + self.margin_result = margin_result + if delta is not None: + self.delta = delta + if gamma is not None: + self.gamma = gamma + if theta is not None: + self.theta = theta + if vega is not None: + self.vega = vega + + @property + def symbol(self): + """Gets the symbol of this MockRiskUnit. # noqa: E501 + + Risk unit name # noqa: E501 + + :return: The symbol of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this MockRiskUnit. + + Risk unit name # noqa: E501 + + :param symbol: The symbol of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def spot_in_use(self): + """Gets the spot_in_use of this MockRiskUnit. # noqa: E501 + + Spot usage # noqa: E501 + + :return: The spot_in_use of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._spot_in_use + + @spot_in_use.setter + def spot_in_use(self, spot_in_use): + """Sets the spot_in_use of this MockRiskUnit. + + Spot usage # noqa: E501 + + :param spot_in_use: The spot_in_use of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._spot_in_use = spot_in_use + + @property + def maintain_margin(self): + """Gets the maintain_margin of this MockRiskUnit. # noqa: E501 + + Maintenance margin # noqa: E501 + + :return: The maintain_margin of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._maintain_margin + + @maintain_margin.setter + def maintain_margin(self, maintain_margin): + """Sets the maintain_margin of this MockRiskUnit. + + Maintenance margin # noqa: E501 + + :param maintain_margin: The maintain_margin of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._maintain_margin = maintain_margin + + @property + def initial_margin(self): + """Gets the initial_margin of this MockRiskUnit. # noqa: E501 + + Initial margin # noqa: E501 + + :return: The initial_margin of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._initial_margin + + @initial_margin.setter + def initial_margin(self, initial_margin): + """Sets the initial_margin of this MockRiskUnit. + + Initial margin # noqa: E501 + + :param initial_margin: The initial_margin of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._initial_margin = initial_margin + + @property + def margin_result(self): + """Gets the margin_result of this MockRiskUnit. # noqa: E501 + + Margin result # noqa: E501 + + :return: The margin_result of this MockRiskUnit. # noqa: E501 + :rtype: list[MockMarginResult] + """ + return self._margin_result + + @margin_result.setter + def margin_result(self, margin_result): + """Sets the margin_result of this MockRiskUnit. + + Margin result # noqa: E501 + + :param margin_result: The margin_result of this MockRiskUnit. # noqa: E501 + :type: list[MockMarginResult] + """ + + self._margin_result = margin_result + + @property + def delta(self): + """Gets the delta of this MockRiskUnit. # noqa: E501 + + Total Delta of risk unit # noqa: E501 + + :return: The delta of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._delta + + @delta.setter + def delta(self, delta): + """Sets the delta of this MockRiskUnit. + + Total Delta of risk unit # noqa: E501 + + :param delta: The delta of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._delta = delta + + @property + def gamma(self): + """Gets the gamma of this MockRiskUnit. # noqa: E501 + + Total Gamma of risk unit # noqa: E501 + + :return: The gamma of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._gamma + + @gamma.setter + def gamma(self, gamma): + """Sets the gamma of this MockRiskUnit. + + Total Gamma of risk unit # noqa: E501 + + :param gamma: The gamma of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._gamma = gamma + + @property + def theta(self): + """Gets the theta of this MockRiskUnit. # noqa: E501 + + Total Theta of risk unit # noqa: E501 + + :return: The theta of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._theta + + @theta.setter + def theta(self, theta): + """Sets the theta of this MockRiskUnit. + + Total Theta of risk unit # noqa: E501 + + :param theta: The theta of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._theta = theta + + @property + def vega(self): + """Gets the vega of this MockRiskUnit. # noqa: E501 + + Total Vega of risk unit # noqa: E501 + + :return: The vega of this MockRiskUnit. # noqa: E501 + :rtype: str + """ + return self._vega + + @vega.setter + def vega(self, vega): + """Sets the vega of this MockRiskUnit. + + Total Vega of risk unit # noqa: E501 + + :param vega: The vega of this MockRiskUnit. # noqa: E501 + :type: str + """ + + self._vega = vega + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockRiskUnit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockRiskUnit): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py new file mode 100644 index 0000000..a5b3c90 --- /dev/null +++ b/gate_api/models/mock_spot_balance.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockSpotBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'equity': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'equity': 'equity' + } + + def __init__(self, currency=None, equity=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """MockSpotBalance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._equity = None + self.discriminator = None + + self.currency = currency + self.equity = equity + + @property + def currency(self): + """Gets the currency of this MockSpotBalance. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this MockSpotBalance. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MockSpotBalance. + + Currency name # noqa: E501 + + :param currency: The currency of this MockSpotBalance. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def equity(self): + """Gets the equity of this MockSpotBalance. # noqa: E501 + + Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. # noqa: E501 + + :return: The equity of this MockSpotBalance. # noqa: E501 + :rtype: str + """ + return self._equity + + @equity.setter + def equity(self, equity): + """Sets the equity of this MockSpotBalance. + + Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. # noqa: E501 + + :param equity: The equity of this MockSpotBalance. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and equity is None: # noqa: E501 + raise ValueError("Invalid value for `equity`, must not be `None`") # noqa: E501 + + self._equity = equity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockSpotBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockSpotBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py new file mode 100644 index 0000000..94ee0e6 --- /dev/null +++ b/gate_api/models/mock_spot_order.py @@ -0,0 +1,239 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MockSpotOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency_pairs': 'str', + 'order_price': 'str', + 'count': 'str', + 'left': 'str', + 'type': 'str' + } + + attribute_map = { + 'currency_pairs': 'currency_pairs', + 'order_price': 'order_price', + 'count': 'count', + 'left': 'left', + 'type': 'type' + } + + def __init__(self, currency_pairs=None, order_price=None, count=None, left=None, type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """MockSpotOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pairs = None + self._order_price = None + self._count = None + self._left = None + self._type = None + self.discriminator = None + + self.currency_pairs = currency_pairs + self.order_price = order_price + if count is not None: + self.count = count + self.left = left + self.type = type + + @property + def currency_pairs(self): + """Gets the currency_pairs of this MockSpotOrder. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pairs of this MockSpotOrder. # noqa: E501 + :rtype: str + """ + return self._currency_pairs + + @currency_pairs.setter + def currency_pairs(self, currency_pairs): + """Sets the currency_pairs of this MockSpotOrder. + + Currency pair # noqa: E501 + + :param currency_pairs: The currency_pairs of this MockSpotOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency_pairs is None: # noqa: E501 + raise ValueError("Invalid value for `currency_pairs`, must not be `None`") # noqa: E501 + + self._currency_pairs = currency_pairs + + @property + def order_price(self): + """Gets the order_price of this MockSpotOrder. # noqa: E501 + + Price # noqa: E501 + + :return: The order_price of this MockSpotOrder. # noqa: E501 + :rtype: str + """ + return self._order_price + + @order_price.setter + def order_price(self, order_price): + """Sets the order_price of this MockSpotOrder. + + Price # noqa: E501 + + :param order_price: The order_price of this MockSpotOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and order_price is None: # noqa: E501 + raise ValueError("Invalid value for `order_price`, must not be `None`") # noqa: E501 + + self._order_price = order_price + + @property + def count(self): + """Gets the count of this MockSpotOrder. # noqa: E501 + + Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. # noqa: E501 + + :return: The count of this MockSpotOrder. # noqa: E501 + :rtype: str + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this MockSpotOrder. + + Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. # noqa: E501 + + :param count: The count of this MockSpotOrder. # noqa: E501 + :type: str + """ + + self._count = count + + @property + def left(self): + """Gets the left of this MockSpotOrder. # noqa: E501 + + Unfilled quantity, involved in actual calculation. # noqa: E501 + + :return: The left of this MockSpotOrder. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this MockSpotOrder. + + Unfilled quantity, involved in actual calculation. # noqa: E501 + + :param left: The left of this MockSpotOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and left is None: # noqa: E501 + raise ValueError("Invalid value for `left`, must not be `None`") # noqa: E501 + + self._left = left + + @property + def type(self): + """Gets the type of this MockSpotOrder. # noqa: E501 + + Order type, sell - sell order, buy - buy order. # noqa: E501 + + :return: The type of this MockSpotOrder. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this MockSpotOrder. + + Order type, sell - sell order, buy - buy order. # noqa: E501 + + :param type: The type of this MockSpotOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MockSpotOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MockSpotOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py new file mode 100644 index 0000000..b8731b1 --- /dev/null +++ b/gate_api/models/multi_chain_address_item.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiChainAddressItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'chain': 'str', + 'address': 'str', + 'payment_id': 'str', + 'payment_name': 'str', + 'obtain_failed': 'int' + } + + attribute_map = { + 'chain': 'chain', + 'address': 'address', + 'payment_id': 'payment_id', + 'payment_name': 'payment_name', + 'obtain_failed': 'obtain_failed' + } + + def __init__(self, chain=None, address=None, payment_id=None, payment_name=None, obtain_failed=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, Configuration) -> None + """MultiChainAddressItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._chain = None + self._address = None + self._payment_id = None + self._payment_name = None + self._obtain_failed = None + self.discriminator = None + + if chain is not None: + self.chain = chain + if address is not None: + self.address = address + if payment_id is not None: + self.payment_id = payment_id + if payment_name is not None: + self.payment_name = payment_name + if obtain_failed is not None: + self.obtain_failed = obtain_failed + + @property + def chain(self): + """Gets the chain of this MultiChainAddressItem. # noqa: E501 + + Name of the chain # noqa: E501 + + :return: The chain of this MultiChainAddressItem. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this MultiChainAddressItem. + + Name of the chain # noqa: E501 + + :param chain: The chain of this MultiChainAddressItem. # noqa: E501 + :type: str + """ + + self._chain = chain + + @property + def address(self): + """Gets the address of this MultiChainAddressItem. # noqa: E501 + + Deposit address # noqa: E501 + + :return: The address of this MultiChainAddressItem. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this MultiChainAddressItem. + + Deposit address # noqa: E501 + + :param address: The address of this MultiChainAddressItem. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def payment_id(self): + """Gets the payment_id of this MultiChainAddressItem. # noqa: E501 + + Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 + + :return: The payment_id of this MultiChainAddressItem. # noqa: E501 + :rtype: str + """ + return self._payment_id + + @payment_id.setter + def payment_id(self, payment_id): + """Sets the payment_id of this MultiChainAddressItem. + + Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 + + :param payment_id: The payment_id of this MultiChainAddressItem. # noqa: E501 + :type: str + """ + + self._payment_id = payment_id + + @property + def payment_name(self): + """Gets the payment_name of this MultiChainAddressItem. # noqa: E501 + + Note type, `Tag` or `Memo` # noqa: E501 + + :return: The payment_name of this MultiChainAddressItem. # noqa: E501 + :rtype: str + """ + return self._payment_name + + @payment_name.setter + def payment_name(self, payment_name): + """Sets the payment_name of this MultiChainAddressItem. + + Note type, `Tag` or `Memo` # noqa: E501 + + :param payment_name: The payment_name of this MultiChainAddressItem. # noqa: E501 + :type: str + """ + + self._payment_name = payment_name + + @property + def obtain_failed(self): + """Gets the obtain_failed of this MultiChainAddressItem. # noqa: E501 + + The obtain failed status- 0: address successfully obtained- 1: failed to obtain address # noqa: E501 + + :return: The obtain_failed of this MultiChainAddressItem. # noqa: E501 + :rtype: int + """ + return self._obtain_failed + + @obtain_failed.setter + def obtain_failed(self, obtain_failed): + """Sets the obtain_failed of this MultiChainAddressItem. + + The obtain failed status- 0: address successfully obtained- 1: failed to obtain address # noqa: E501 + + :param obtain_failed: The obtain_failed of this MultiChainAddressItem. # noqa: E501 + :type: int + """ + + self._obtain_failed = obtain_failed + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiChainAddressItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiChainAddressItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py new file mode 100644 index 0000000..a350a96 --- /dev/null +++ b/gate_api/models/multi_collateral_currency.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiCollateralCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'loan_currencies': 'list[MultiLoanItem]', + 'collateral_currencies': 'list[MultiCollateralItem]' + } + + attribute_map = { + 'loan_currencies': 'loan_currencies', + 'collateral_currencies': 'collateral_currencies' + } + + def __init__(self, loan_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (list[MultiLoanItem], list[MultiCollateralItem], Configuration) -> None + """MultiCollateralCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._loan_currencies = None + self._collateral_currencies = None + self.discriminator = None + + if loan_currencies is not None: + self.loan_currencies = loan_currencies + if collateral_currencies is not None: + self.collateral_currencies = collateral_currencies + + @property + def loan_currencies(self): + """Gets the loan_currencies of this MultiCollateralCurrency. # noqa: E501 + + List of supported borrowing currencies # noqa: E501 + + :return: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 + :rtype: list[MultiLoanItem] + """ + return self._loan_currencies + + @loan_currencies.setter + def loan_currencies(self, loan_currencies): + """Sets the loan_currencies of this MultiCollateralCurrency. + + List of supported borrowing currencies # noqa: E501 + + :param loan_currencies: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 + :type: list[MultiLoanItem] + """ + + self._loan_currencies = loan_currencies + + @property + def collateral_currencies(self): + """Gets the collateral_currencies of this MultiCollateralCurrency. # noqa: E501 + + List of supported collateral currencies # noqa: E501 + + :return: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 + :rtype: list[MultiCollateralItem] + """ + return self._collateral_currencies + + @collateral_currencies.setter + def collateral_currencies(self, collateral_currencies): + """Sets the collateral_currencies of this MultiCollateralCurrency. + + List of supported collateral currencies # noqa: E501 + + :param collateral_currencies: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 + :type: list[MultiCollateralItem] + """ + + self._collateral_currencies = collateral_currencies + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiCollateralCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiCollateralCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py new file mode 100644 index 0000000..ddc6772 --- /dev/null +++ b/gate_api/models/multi_collateral_item.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiCollateralItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'discount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'discount': 'discount' + } + + def __init__(self, currency=None, index_price=None, discount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """MultiCollateralItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._discount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if discount is not None: + self.discount = discount + + @property + def currency(self): + """Gets the currency of this MultiCollateralItem. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this MultiCollateralItem. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MultiCollateralItem. + + Currency # noqa: E501 + + :param currency: The currency of this MultiCollateralItem. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this MultiCollateralItem. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this MultiCollateralItem. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this MultiCollateralItem. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this MultiCollateralItem. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def discount(self): + """Gets the discount of this MultiCollateralItem. # noqa: E501 + + Discount # noqa: E501 + + :return: The discount of this MultiCollateralItem. # noqa: E501 + :rtype: str + """ + return self._discount + + @discount.setter + def discount(self, discount): + """Sets the discount of this MultiCollateralItem. + + Discount # noqa: E501 + + :param discount: The discount of this MultiCollateralItem. # noqa: E501 + :type: str + """ + + self._discount = discount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiCollateralItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiCollateralItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py new file mode 100644 index 0000000..514007b --- /dev/null +++ b/gate_api/models/multi_collateral_order.py @@ -0,0 +1,487 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiCollateralOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'str', + 'order_type': 'str', + 'fixed_type': 'str', + 'fixed_rate': 'str', + 'expire_time': 'int', + 'auto_renew': 'bool', + 'auto_repay': 'bool', + 'current_ltv': 'str', + 'status': 'str', + 'borrow_time': 'int', + 'total_left_repay_usdt': 'str', + 'total_left_collateral_usdt': 'str', + 'borrow_currencies': 'list[BorrowCurrencyInfo]', + 'collateral_currencies': 'list[CollateralCurrencyInfo]' + } + + attribute_map = { + 'order_id': 'order_id', + 'order_type': 'order_type', + 'fixed_type': 'fixed_type', + 'fixed_rate': 'fixed_rate', + 'expire_time': 'expire_time', + 'auto_renew': 'auto_renew', + 'auto_repay': 'auto_repay', + 'current_ltv': 'current_ltv', + 'status': 'status', + 'borrow_time': 'borrow_time', + 'total_left_repay_usdt': 'total_left_repay_usdt', + 'total_left_collateral_usdt': 'total_left_collateral_usdt', + 'borrow_currencies': 'borrow_currencies', + 'collateral_currencies': 'collateral_currencies' + } + + def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=None, expire_time=None, auto_renew=None, auto_repay=None, current_ltv=None, status=None, borrow_time=None, total_left_repay_usdt=None, total_left_collateral_usdt=None, borrow_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, bool, bool, str, str, int, str, str, list[BorrowCurrencyInfo], list[CollateralCurrencyInfo], Configuration) -> None + """MultiCollateralOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._order_type = None + self._fixed_type = None + self._fixed_rate = None + self._expire_time = None + self._auto_renew = None + self._auto_repay = None + self._current_ltv = None + self._status = None + self._borrow_time = None + self._total_left_repay_usdt = None + self._total_left_collateral_usdt = None + self._borrow_currencies = None + self._collateral_currencies = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if order_type is not None: + self.order_type = order_type + if fixed_type is not None: + self.fixed_type = fixed_type + if fixed_rate is not None: + self.fixed_rate = fixed_rate + if expire_time is not None: + self.expire_time = expire_time + if auto_renew is not None: + self.auto_renew = auto_renew + if auto_repay is not None: + self.auto_repay = auto_repay + if current_ltv is not None: + self.current_ltv = current_ltv + if status is not None: + self.status = status + if borrow_time is not None: + self.borrow_time = borrow_time + if total_left_repay_usdt is not None: + self.total_left_repay_usdt = total_left_repay_usdt + if total_left_collateral_usdt is not None: + self.total_left_collateral_usdt = total_left_collateral_usdt + if borrow_currencies is not None: + self.borrow_currencies = borrow_currencies + if collateral_currencies is not None: + self.collateral_currencies = collateral_currencies + + @property + def order_id(self): + """Gets the order_id of this MultiCollateralOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this MultiCollateralOrder. + + Order ID # noqa: E501 + + :param order_id: The order_id of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def order_type(self): + """Gets the order_type of this MultiCollateralOrder. # noqa: E501 + + current - current, fixed - fixed # noqa: E501 + + :return: The order_type of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._order_type + + @order_type.setter + def order_type(self, order_type): + """Sets the order_type of this MultiCollateralOrder. + + current - current, fixed - fixed # noqa: E501 + + :param order_type: The order_type of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._order_type = order_type + + @property + def fixed_type(self): + """Gets the fixed_type of this MultiCollateralOrder. # noqa: E501 + + Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. # noqa: E501 + + :return: The fixed_type of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._fixed_type + + @fixed_type.setter + def fixed_type(self, fixed_type): + """Sets the fixed_type of this MultiCollateralOrder. + + Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. # noqa: E501 + + :param fixed_type: The fixed_type of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._fixed_type = fixed_type + + @property + def fixed_rate(self): + """Gets the fixed_rate of this MultiCollateralOrder. # noqa: E501 + + Fixed interest rate # noqa: E501 + + :return: The fixed_rate of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._fixed_rate + + @fixed_rate.setter + def fixed_rate(self, fixed_rate): + """Sets the fixed_rate of this MultiCollateralOrder. + + Fixed interest rate # noqa: E501 + + :param fixed_rate: The fixed_rate of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._fixed_rate = fixed_rate + + @property + def expire_time(self): + """Gets the expire_time of this MultiCollateralOrder. # noqa: E501 + + Expiration time, timestamp, unit in seconds. # noqa: E501 + + :return: The expire_time of this MultiCollateralOrder. # noqa: E501 + :rtype: int + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this MultiCollateralOrder. + + Expiration time, timestamp, unit in seconds. # noqa: E501 + + :param expire_time: The expire_time of this MultiCollateralOrder. # noqa: E501 + :type: int + """ + + self._expire_time = expire_time + + @property + def auto_renew(self): + """Gets the auto_renew of this MultiCollateralOrder. # noqa: E501 + + Fixed interest rate, automatic renewal # noqa: E501 + + :return: The auto_renew of this MultiCollateralOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_renew + + @auto_renew.setter + def auto_renew(self, auto_renew): + """Sets the auto_renew of this MultiCollateralOrder. + + Fixed interest rate, automatic renewal # noqa: E501 + + :param auto_renew: The auto_renew of this MultiCollateralOrder. # noqa: E501 + :type: bool + """ + + self._auto_renew = auto_renew + + @property + def auto_repay(self): + """Gets the auto_repay of this MultiCollateralOrder. # noqa: E501 + + Fixed interest rate, automatic repayment # noqa: E501 + + :return: The auto_repay of this MultiCollateralOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_repay + + @auto_repay.setter + def auto_repay(self, auto_repay): + """Sets the auto_repay of this MultiCollateralOrder. + + Fixed interest rate, automatic repayment # noqa: E501 + + :param auto_repay: The auto_repay of this MultiCollateralOrder. # noqa: E501 + :type: bool + """ + + self._auto_repay = auto_repay + + @property + def current_ltv(self): + """Gets the current_ltv of this MultiCollateralOrder. # noqa: E501 + + The current collateralization rate # noqa: E501 + + :return: The current_ltv of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._current_ltv + + @current_ltv.setter + def current_ltv(self, current_ltv): + """Sets the current_ltv of this MultiCollateralOrder. + + The current collateralization rate # noqa: E501 + + :param current_ltv: The current_ltv of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._current_ltv = current_ltv + + @property + def status(self): + """Gets the status of this MultiCollateralOrder. # noqa: E501 + + Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 + + :return: The status of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this MultiCollateralOrder. + + Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed # noqa: E501 + + :param status: The status of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def borrow_time(self): + """Gets the borrow_time of this MultiCollateralOrder. # noqa: E501 + + Borrowing time, timestamp in seconds # noqa: E501 + + :return: The borrow_time of this MultiCollateralOrder. # noqa: E501 + :rtype: int + """ + return self._borrow_time + + @borrow_time.setter + def borrow_time(self, borrow_time): + """Sets the borrow_time of this MultiCollateralOrder. + + Borrowing time, timestamp in seconds # noqa: E501 + + :param borrow_time: The borrow_time of this MultiCollateralOrder. # noqa: E501 + :type: int + """ + + self._borrow_time = borrow_time + + @property + def total_left_repay_usdt(self): + """Gets the total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 + + Value of Left repay amount converted in USDT # noqa: E501 + + :return: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._total_left_repay_usdt + + @total_left_repay_usdt.setter + def total_left_repay_usdt(self, total_left_repay_usdt): + """Sets the total_left_repay_usdt of this MultiCollateralOrder. + + Value of Left repay amount converted in USDT # noqa: E501 + + :param total_left_repay_usdt: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._total_left_repay_usdt = total_left_repay_usdt + + @property + def total_left_collateral_usdt(self): + """Gets the total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 + + Value of Collateral amount in USDT # noqa: E501 + + :return: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 + :rtype: str + """ + return self._total_left_collateral_usdt + + @total_left_collateral_usdt.setter + def total_left_collateral_usdt(self, total_left_collateral_usdt): + """Sets the total_left_collateral_usdt of this MultiCollateralOrder. + + Value of Collateral amount in USDT # noqa: E501 + + :param total_left_collateral_usdt: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 + :type: str + """ + + self._total_left_collateral_usdt = total_left_collateral_usdt + + @property + def borrow_currencies(self): + """Gets the borrow_currencies of this MultiCollateralOrder. # noqa: E501 + + Borrowing Currency List # noqa: E501 + + :return: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 + :rtype: list[BorrowCurrencyInfo] + """ + return self._borrow_currencies + + @borrow_currencies.setter + def borrow_currencies(self, borrow_currencies): + """Sets the borrow_currencies of this MultiCollateralOrder. + + Borrowing Currency List # noqa: E501 + + :param borrow_currencies: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 + :type: list[BorrowCurrencyInfo] + """ + + self._borrow_currencies = borrow_currencies + + @property + def collateral_currencies(self): + """Gets the collateral_currencies of this MultiCollateralOrder. # noqa: E501 + + Collateral Currency List # noqa: E501 + + :return: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 + :rtype: list[CollateralCurrencyInfo] + """ + return self._collateral_currencies + + @collateral_currencies.setter + def collateral_currencies(self, collateral_currencies): + """Sets the collateral_currencies of this MultiCollateralOrder. + + Collateral Currency List # noqa: E501 + + :param collateral_currencies: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 + :type: list[CollateralCurrencyInfo] + """ + + self._collateral_currencies = collateral_currencies + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiCollateralOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiCollateralOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py new file mode 100644 index 0000000..e9f621d --- /dev/null +++ b/gate_api/models/multi_collateral_record.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiCollateralRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'record_id': 'int', + 'before_ltv': 'str', + 'after_ltv': 'str', + 'operate_time': 'int', + 'borrow_currencies': 'list[MultiCollateralRecordCurrency]', + 'collateral_currencies': 'list[MultiCollateralRecordCurrency]' + } + + attribute_map = { + 'order_id': 'order_id', + 'record_id': 'record_id', + 'before_ltv': 'before_ltv', + 'after_ltv': 'after_ltv', + 'operate_time': 'operate_time', + 'borrow_currencies': 'borrow_currencies', + 'collateral_currencies': 'collateral_currencies' + } + + def __init__(self, order_id=None, record_id=None, before_ltv=None, after_ltv=None, operate_time=None, borrow_currencies=None, collateral_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, int, list[MultiCollateralRecordCurrency], list[MultiCollateralRecordCurrency], Configuration) -> None + """MultiCollateralRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._record_id = None + self._before_ltv = None + self._after_ltv = None + self._operate_time = None + self._borrow_currencies = None + self._collateral_currencies = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if record_id is not None: + self.record_id = record_id + if before_ltv is not None: + self.before_ltv = before_ltv + if after_ltv is not None: + self.after_ltv = after_ltv + if operate_time is not None: + self.operate_time = operate_time + if borrow_currencies is not None: + self.borrow_currencies = borrow_currencies + if collateral_currencies is not None: + self.collateral_currencies = collateral_currencies + + @property + def order_id(self): + """Gets the order_id of this MultiCollateralRecord. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this MultiCollateralRecord. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this MultiCollateralRecord. + + Order ID # noqa: E501 + + :param order_id: The order_id of this MultiCollateralRecord. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def record_id(self): + """Gets the record_id of this MultiCollateralRecord. # noqa: E501 + + Collateral record ID # noqa: E501 + + :return: The record_id of this MultiCollateralRecord. # noqa: E501 + :rtype: int + """ + return self._record_id + + @record_id.setter + def record_id(self, record_id): + """Sets the record_id of this MultiCollateralRecord. + + Collateral record ID # noqa: E501 + + :param record_id: The record_id of this MultiCollateralRecord. # noqa: E501 + :type: int + """ + + self._record_id = record_id + + @property + def before_ltv(self): + """Gets the before_ltv of this MultiCollateralRecord. # noqa: E501 + + The collateral ratio before adjustment # noqa: E501 + + :return: The before_ltv of this MultiCollateralRecord. # noqa: E501 + :rtype: str + """ + return self._before_ltv + + @before_ltv.setter + def before_ltv(self, before_ltv): + """Sets the before_ltv of this MultiCollateralRecord. + + The collateral ratio before adjustment # noqa: E501 + + :param before_ltv: The before_ltv of this MultiCollateralRecord. # noqa: E501 + :type: str + """ + + self._before_ltv = before_ltv + + @property + def after_ltv(self): + """Gets the after_ltv of this MultiCollateralRecord. # noqa: E501 + + The collateral ratio before adjustment # noqa: E501 + + :return: The after_ltv of this MultiCollateralRecord. # noqa: E501 + :rtype: str + """ + return self._after_ltv + + @after_ltv.setter + def after_ltv(self, after_ltv): + """Sets the after_ltv of this MultiCollateralRecord. + + The collateral ratio before adjustment # noqa: E501 + + :param after_ltv: The after_ltv of this MultiCollateralRecord. # noqa: E501 + :type: str + """ + + self._after_ltv = after_ltv + + @property + def operate_time(self): + """Gets the operate_time of this MultiCollateralRecord. # noqa: E501 + + Operation time, timestamp in seconds. # noqa: E501 + + :return: The operate_time of this MultiCollateralRecord. # noqa: E501 + :rtype: int + """ + return self._operate_time + + @operate_time.setter + def operate_time(self, operate_time): + """Sets the operate_time of this MultiCollateralRecord. + + Operation time, timestamp in seconds. # noqa: E501 + + :param operate_time: The operate_time of this MultiCollateralRecord. # noqa: E501 + :type: int + """ + + self._operate_time = operate_time + + @property + def borrow_currencies(self): + """Gets the borrow_currencies of this MultiCollateralRecord. # noqa: E501 + + Borrowing Currency List # noqa: E501 + + :return: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 + :rtype: list[MultiCollateralRecordCurrency] + """ + return self._borrow_currencies + + @borrow_currencies.setter + def borrow_currencies(self, borrow_currencies): + """Sets the borrow_currencies of this MultiCollateralRecord. + + Borrowing Currency List # noqa: E501 + + :param borrow_currencies: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 + :type: list[MultiCollateralRecordCurrency] + """ + + self._borrow_currencies = borrow_currencies + + @property + def collateral_currencies(self): + """Gets the collateral_currencies of this MultiCollateralRecord. # noqa: E501 + + Collateral Currency List # noqa: E501 + + :return: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 + :rtype: list[MultiCollateralRecordCurrency] + """ + return self._collateral_currencies + + @collateral_currencies.setter + def collateral_currencies(self, collateral_currencies): + """Sets the collateral_currencies of this MultiCollateralRecord. + + Collateral Currency List # noqa: E501 + + :param collateral_currencies: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 + :type: list[MultiCollateralRecordCurrency] + """ + + self._collateral_currencies = collateral_currencies + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiCollateralRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiCollateralRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py new file mode 100644 index 0000000..40ac61e --- /dev/null +++ b/gate_api/models/multi_collateral_record_currency.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiCollateralRecordCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'before_amount': 'str', + 'before_amount_usdt': 'str', + 'after_amount': 'str', + 'after_amount_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'before_amount': 'before_amount', + 'before_amount_usdt': 'before_amount_usdt', + 'after_amount': 'after_amount', + 'after_amount_usdt': 'after_amount_usdt' + } + + def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """MultiCollateralRecordCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._before_amount = None + self._before_amount_usdt = None + self._after_amount = None + self._after_amount_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if before_amount is not None: + self.before_amount = before_amount + if before_amount_usdt is not None: + self.before_amount_usdt = before_amount_usdt + if after_amount is not None: + self.after_amount = after_amount + if after_amount_usdt is not None: + self.after_amount_usdt = after_amount_usdt + + @property + def currency(self): + """Gets the currency of this MultiCollateralRecordCurrency. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this MultiCollateralRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MultiCollateralRecordCurrency. + + Currency # noqa: E501 + + :param currency: The currency of this MultiCollateralRecordCurrency. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this MultiCollateralRecordCurrency. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this MultiCollateralRecordCurrency. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def before_amount(self): + """Gets the before_amount of this MultiCollateralRecordCurrency. # noqa: E501 + + Amount before the operation # noqa: E501 + + :return: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._before_amount + + @before_amount.setter + def before_amount(self, before_amount): + """Sets the before_amount of this MultiCollateralRecordCurrency. + + Amount before the operation # noqa: E501 + + :param before_amount: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 + :type: str + """ + + self._before_amount = before_amount + + @property + def before_amount_usdt(self): + """Gets the before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 + + USDT Amount before the operation. # noqa: E501 + + :return: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._before_amount_usdt + + @before_amount_usdt.setter + def before_amount_usdt(self, before_amount_usdt): + """Sets the before_amount_usdt of this MultiCollateralRecordCurrency. + + USDT Amount before the operation. # noqa: E501 + + :param before_amount_usdt: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 + :type: str + """ + + self._before_amount_usdt = before_amount_usdt + + @property + def after_amount(self): + """Gets the after_amount of this MultiCollateralRecordCurrency. # noqa: E501 + + Amount after the operation. # noqa: E501 + + :return: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._after_amount + + @after_amount.setter + def after_amount(self, after_amount): + """Sets the after_amount of this MultiCollateralRecordCurrency. + + Amount after the operation. # noqa: E501 + + :param after_amount: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501 + :type: str + """ + + self._after_amount = after_amount + + @property + def after_amount_usdt(self): + """Gets the after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 + + USDT Amount after the operation. # noqa: E501 + + :return: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._after_amount_usdt + + @after_amount_usdt.setter + def after_amount_usdt(self, after_amount_usdt): + """Sets the after_amount_usdt of this MultiCollateralRecordCurrency. + + USDT Amount after the operation. # noqa: E501 + + :param after_amount_usdt: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 + :type: str + """ + + self._after_amount_usdt = after_amount_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiCollateralRecordCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiCollateralRecordCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py new file mode 100644 index 0000000..d237838 --- /dev/null +++ b/gate_api/models/multi_loan_item.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiLoanItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'price': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'price': 'price' + } + + def __init__(self, currency=None, price=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """MultiLoanItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._price = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if price is not None: + self.price = price + + @property + def currency(self): + """Gets the currency of this MultiLoanItem. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this MultiLoanItem. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MultiLoanItem. + + Currency # noqa: E501 + + :param currency: The currency of this MultiLoanItem. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def price(self): + """Gets the price of this MultiLoanItem. # noqa: E501 + + Latest price of the currency # noqa: E501 + + :return: The price of this MultiLoanItem. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this MultiLoanItem. + + Latest price of the currency # noqa: E501 + + :param price: The price of this MultiLoanItem. # noqa: E501 + :type: str + """ + + self._price = price + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiLoanItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiLoanItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py new file mode 100644 index 0000000..822936b --- /dev/null +++ b/gate_api/models/multi_loan_repay_item.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiLoanRepayItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str', + 'repaid_all': 'bool' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount', + 'repaid_all': 'repaid_all' + } + + def __init__(self, currency=None, amount=None, repaid_all=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, bool, Configuration) -> None + """MultiLoanRepayItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self._repaid_all = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + if repaid_all is not None: + self.repaid_all = repaid_all + + @property + def currency(self): + """Gets the currency of this MultiLoanRepayItem. # noqa: E501 + + Repayment currency # noqa: E501 + + :return: The currency of this MultiLoanRepayItem. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this MultiLoanRepayItem. + + Repayment currency # noqa: E501 + + :param currency: The currency of this MultiLoanRepayItem. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this MultiLoanRepayItem. # noqa: E501 + + Size # noqa: E501 + + :return: The amount of this MultiLoanRepayItem. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this MultiLoanRepayItem. + + Size # noqa: E501 + + :param amount: The amount of this MultiLoanRepayItem. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def repaid_all(self): + """Gets the repaid_all of this MultiLoanRepayItem. # noqa: E501 + + Repayment method, set to true for full repayment, false for partial repayment. # noqa: E501 + + :return: The repaid_all of this MultiLoanRepayItem. # noqa: E501 + :rtype: bool + """ + return self._repaid_all + + @repaid_all.setter + def repaid_all(self, repaid_all): + """Sets the repaid_all of this MultiLoanRepayItem. + + Repayment method, set to true for full repayment, false for partial repayment. # noqa: E501 + + :param repaid_all: The repaid_all of this MultiLoanRepayItem. # noqa: E501 + :type: bool + """ + + self._repaid_all = repaid_all + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiLoanRepayItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiLoanRepayItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py new file mode 100644 index 0000000..9684714 --- /dev/null +++ b/gate_api/models/multi_repay_record.py @@ -0,0 +1,431 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiRepayRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'record_id': 'int', + 'init_ltv': 'str', + 'before_ltv': 'str', + 'after_ltv': 'str', + 'borrow_time': 'int', + 'repay_time': 'int', + 'borrow_currencies': 'list[RepayRecordCurrency]', + 'collateral_currencies': 'list[RepayRecordCurrency]', + 'repaid_currencies': 'list[RepayRecordRepaidCurrency]', + 'total_interest_list': 'list[RepayRecordTotalInterest]', + 'left_repay_interest_list': 'list[RepayRecordLeftInterest]' + } + + attribute_map = { + 'order_id': 'order_id', + 'record_id': 'record_id', + 'init_ltv': 'init_ltv', + 'before_ltv': 'before_ltv', + 'after_ltv': 'after_ltv', + 'borrow_time': 'borrow_time', + 'repay_time': 'repay_time', + 'borrow_currencies': 'borrow_currencies', + 'collateral_currencies': 'collateral_currencies', + 'repaid_currencies': 'repaid_currencies', + 'total_interest_list': 'total_interest_list', + 'left_repay_interest_list': 'left_repay_interest_list' + } + + def __init__(self, order_id=None, record_id=None, init_ltv=None, before_ltv=None, after_ltv=None, borrow_time=None, repay_time=None, borrow_currencies=None, collateral_currencies=None, repaid_currencies=None, total_interest_list=None, left_repay_interest_list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, int, int, list[RepayRecordCurrency], list[RepayRecordCurrency], list[RepayRecordRepaidCurrency], list[RepayRecordTotalInterest], list[RepayRecordLeftInterest], Configuration) -> None + """MultiRepayRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._record_id = None + self._init_ltv = None + self._before_ltv = None + self._after_ltv = None + self._borrow_time = None + self._repay_time = None + self._borrow_currencies = None + self._collateral_currencies = None + self._repaid_currencies = None + self._total_interest_list = None + self._left_repay_interest_list = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if record_id is not None: + self.record_id = record_id + if init_ltv is not None: + self.init_ltv = init_ltv + if before_ltv is not None: + self.before_ltv = before_ltv + if after_ltv is not None: + self.after_ltv = after_ltv + if borrow_time is not None: + self.borrow_time = borrow_time + if repay_time is not None: + self.repay_time = repay_time + if borrow_currencies is not None: + self.borrow_currencies = borrow_currencies + if collateral_currencies is not None: + self.collateral_currencies = collateral_currencies + if repaid_currencies is not None: + self.repaid_currencies = repaid_currencies + if total_interest_list is not None: + self.total_interest_list = total_interest_list + if left_repay_interest_list is not None: + self.left_repay_interest_list = left_repay_interest_list + + @property + def order_id(self): + """Gets the order_id of this MultiRepayRecord. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this MultiRepayRecord. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this MultiRepayRecord. + + Order ID # noqa: E501 + + :param order_id: The order_id of this MultiRepayRecord. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def record_id(self): + """Gets the record_id of this MultiRepayRecord. # noqa: E501 + + Repayment record ID # noqa: E501 + + :return: The record_id of this MultiRepayRecord. # noqa: E501 + :rtype: int + """ + return self._record_id + + @record_id.setter + def record_id(self, record_id): + """Sets the record_id of this MultiRepayRecord. + + Repayment record ID # noqa: E501 + + :param record_id: The record_id of this MultiRepayRecord. # noqa: E501 + :type: int + """ + + self._record_id = record_id + + @property + def init_ltv(self): + """Gets the init_ltv of this MultiRepayRecord. # noqa: E501 + + The initial collateralization rate # noqa: E501 + + :return: The init_ltv of this MultiRepayRecord. # noqa: E501 + :rtype: str + """ + return self._init_ltv + + @init_ltv.setter + def init_ltv(self, init_ltv): + """Sets the init_ltv of this MultiRepayRecord. + + The initial collateralization rate # noqa: E501 + + :param init_ltv: The init_ltv of this MultiRepayRecord. # noqa: E501 + :type: str + """ + + self._init_ltv = init_ltv + + @property + def before_ltv(self): + """Gets the before_ltv of this MultiRepayRecord. # noqa: E501 + + Ltv before the operation # noqa: E501 + + :return: The before_ltv of this MultiRepayRecord. # noqa: E501 + :rtype: str + """ + return self._before_ltv + + @before_ltv.setter + def before_ltv(self, before_ltv): + """Sets the before_ltv of this MultiRepayRecord. + + Ltv before the operation # noqa: E501 + + :param before_ltv: The before_ltv of this MultiRepayRecord. # noqa: E501 + :type: str + """ + + self._before_ltv = before_ltv + + @property + def after_ltv(self): + """Gets the after_ltv of this MultiRepayRecord. # noqa: E501 + + Ltv after the operation # noqa: E501 + + :return: The after_ltv of this MultiRepayRecord. # noqa: E501 + :rtype: str + """ + return self._after_ltv + + @after_ltv.setter + def after_ltv(self, after_ltv): + """Sets the after_ltv of this MultiRepayRecord. + + Ltv after the operation # noqa: E501 + + :param after_ltv: The after_ltv of this MultiRepayRecord. # noqa: E501 + :type: str + """ + + self._after_ltv = after_ltv + + @property + def borrow_time(self): + """Gets the borrow_time of this MultiRepayRecord. # noqa: E501 + + Borrowing time, timestamp in seconds. # noqa: E501 + + :return: The borrow_time of this MultiRepayRecord. # noqa: E501 + :rtype: int + """ + return self._borrow_time + + @borrow_time.setter + def borrow_time(self, borrow_time): + """Sets the borrow_time of this MultiRepayRecord. + + Borrowing time, timestamp in seconds. # noqa: E501 + + :param borrow_time: The borrow_time of this MultiRepayRecord. # noqa: E501 + :type: int + """ + + self._borrow_time = borrow_time + + @property + def repay_time(self): + """Gets the repay_time of this MultiRepayRecord. # noqa: E501 + + Repayment time, timestamp in seconds. # noqa: E501 + + :return: The repay_time of this MultiRepayRecord. # noqa: E501 + :rtype: int + """ + return self._repay_time + + @repay_time.setter + def repay_time(self, repay_time): + """Sets the repay_time of this MultiRepayRecord. + + Repayment time, timestamp in seconds. # noqa: E501 + + :param repay_time: The repay_time of this MultiRepayRecord. # noqa: E501 + :type: int + """ + + self._repay_time = repay_time + + @property + def borrow_currencies(self): + """Gets the borrow_currencies of this MultiRepayRecord. # noqa: E501 + + List of borrowing information # noqa: E501 + + :return: The borrow_currencies of this MultiRepayRecord. # noqa: E501 + :rtype: list[RepayRecordCurrency] + """ + return self._borrow_currencies + + @borrow_currencies.setter + def borrow_currencies(self, borrow_currencies): + """Sets the borrow_currencies of this MultiRepayRecord. + + List of borrowing information # noqa: E501 + + :param borrow_currencies: The borrow_currencies of this MultiRepayRecord. # noqa: E501 + :type: list[RepayRecordCurrency] + """ + + self._borrow_currencies = borrow_currencies + + @property + def collateral_currencies(self): + """Gets the collateral_currencies of this MultiRepayRecord. # noqa: E501 + + List of collateral information # noqa: E501 + + :return: The collateral_currencies of this MultiRepayRecord. # noqa: E501 + :rtype: list[RepayRecordCurrency] + """ + return self._collateral_currencies + + @collateral_currencies.setter + def collateral_currencies(self, collateral_currencies): + """Sets the collateral_currencies of this MultiRepayRecord. + + List of collateral information # noqa: E501 + + :param collateral_currencies: The collateral_currencies of this MultiRepayRecord. # noqa: E501 + :type: list[RepayRecordCurrency] + """ + + self._collateral_currencies = collateral_currencies + + @property + def repaid_currencies(self): + """Gets the repaid_currencies of this MultiRepayRecord. # noqa: E501 + + Repay Currency List # noqa: E501 + + :return: The repaid_currencies of this MultiRepayRecord. # noqa: E501 + :rtype: list[RepayRecordRepaidCurrency] + """ + return self._repaid_currencies + + @repaid_currencies.setter + def repaid_currencies(self, repaid_currencies): + """Sets the repaid_currencies of this MultiRepayRecord. + + Repay Currency List # noqa: E501 + + :param repaid_currencies: The repaid_currencies of this MultiRepayRecord. # noqa: E501 + :type: list[RepayRecordRepaidCurrency] + """ + + self._repaid_currencies = repaid_currencies + + @property + def total_interest_list(self): + """Gets the total_interest_list of this MultiRepayRecord. # noqa: E501 + + Total Interest List # noqa: E501 + + :return: The total_interest_list of this MultiRepayRecord. # noqa: E501 + :rtype: list[RepayRecordTotalInterest] + """ + return self._total_interest_list + + @total_interest_list.setter + def total_interest_list(self, total_interest_list): + """Sets the total_interest_list of this MultiRepayRecord. + + Total Interest List # noqa: E501 + + :param total_interest_list: The total_interest_list of this MultiRepayRecord. # noqa: E501 + :type: list[RepayRecordTotalInterest] + """ + + self._total_interest_list = total_interest_list + + @property + def left_repay_interest_list(self): + """Gets the left_repay_interest_list of this MultiRepayRecord. # noqa: E501 + + List of left repay interest # noqa: E501 + + :return: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 + :rtype: list[RepayRecordLeftInterest] + """ + return self._left_repay_interest_list + + @left_repay_interest_list.setter + def left_repay_interest_list(self, left_repay_interest_list): + """Sets the left_repay_interest_list of this MultiRepayRecord. + + List of left repay interest # noqa: E501 + + :param left_repay_interest_list: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 + :type: list[RepayRecordLeftInterest] + """ + + self._left_repay_interest_list = left_repay_interest_list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiRepayRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiRepayRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py new file mode 100644 index 0000000..75586d8 --- /dev/null +++ b/gate_api/models/multi_repay_resp.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MultiRepayResp(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'repaid_currencies': 'list[RepayCurrencyRes]' + } + + attribute_map = { + 'order_id': 'order_id', + 'repaid_currencies': 'repaid_currencies' + } + + def __init__(self, order_id=None, repaid_currencies=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[RepayCurrencyRes], Configuration) -> None + """MultiRepayResp - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._repaid_currencies = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if repaid_currencies is not None: + self.repaid_currencies = repaid_currencies + + @property + def order_id(self): + """Gets the order_id of this MultiRepayResp. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this MultiRepayResp. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this MultiRepayResp. + + Order ID # noqa: E501 + + :param order_id: The order_id of this MultiRepayResp. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def repaid_currencies(self): + """Gets the repaid_currencies of this MultiRepayResp. # noqa: E501 + + Repay Currency List # noqa: E501 + + :return: The repaid_currencies of this MultiRepayResp. # noqa: E501 + :rtype: list[RepayCurrencyRes] + """ + return self._repaid_currencies + + @repaid_currencies.setter + def repaid_currencies(self, repaid_currencies): + """Sets the repaid_currencies of this MultiRepayResp. + + Repay Currency List # noqa: E501 + + :param repaid_currencies: The repaid_currencies of this MultiRepayResp. # noqa: E501 + :type: list[RepayCurrencyRes] + """ + + self._repaid_currencies = repaid_currencies + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiRepayResp): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MultiRepayResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py new file mode 100644 index 0000000..311039b --- /dev/null +++ b/gate_api/models/my_futures_trade.py @@ -0,0 +1,409 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MyFuturesTrade(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'create_time': 'float', + 'contract': 'str', + 'order_id': 'str', + 'size': 'int', + 'close_size': 'int', + 'price': 'str', + 'role': 'str', + 'text': 'str', + 'fee': 'str', + 'point_fee': 'str' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'create_time', + 'contract': 'contract', + 'order_id': 'order_id', + 'size': 'size', + 'close_size': 'close_size', + 'price': 'price', + 'role': 'role', + 'text': 'text', + 'fee': 'fee', + 'point_fee': 'point_fee' + } + + def __init__(self, id=None, create_time=None, contract=None, order_id=None, size=None, close_size=None, price=None, role=None, text=None, fee=None, point_fee=None, local_vars_configuration=None): # noqa: E501 + # type: (int, float, str, str, int, int, str, str, str, str, str, Configuration) -> None + """MyFuturesTrade - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._create_time = None + self._contract = None + self._order_id = None + self._size = None + self._close_size = None + self._price = None + self._role = None + self._text = None + self._fee = None + self._point_fee = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if contract is not None: + self.contract = contract + if order_id is not None: + self.order_id = order_id + if size is not None: + self.size = size + if close_size is not None: + self.close_size = close_size + if price is not None: + self.price = price + if role is not None: + self.role = role + if text is not None: + self.text = text + if fee is not None: + self.fee = fee + if point_fee is not None: + self.point_fee = point_fee + + @property + def id(self): + """Gets the id of this MyFuturesTrade. # noqa: E501 + + Trade ID # noqa: E501 + + :return: The id of this MyFuturesTrade. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this MyFuturesTrade. + + Trade ID # noqa: E501 + + :param id: The id of this MyFuturesTrade. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this MyFuturesTrade. # noqa: E501 + + Trading time # noqa: E501 + + :return: The create_time of this MyFuturesTrade. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this MyFuturesTrade. + + Trading time # noqa: E501 + + :param create_time: The create_time of this MyFuturesTrade. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def contract(self): + """Gets the contract of this MyFuturesTrade. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this MyFuturesTrade. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this MyFuturesTrade. + + Futures contract # noqa: E501 + + :param contract: The contract of this MyFuturesTrade. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def order_id(self): + """Gets the order_id of this MyFuturesTrade. # noqa: E501 + + Order ID related # noqa: E501 + + :return: The order_id of this MyFuturesTrade. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this MyFuturesTrade. + + Order ID related # noqa: E501 + + :param order_id: The order_id of this MyFuturesTrade. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def size(self): + """Gets the size of this MyFuturesTrade. # noqa: E501 + + Trading size # noqa: E501 + + :return: The size of this MyFuturesTrade. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this MyFuturesTrade. + + Trading size # noqa: E501 + + :param size: The size of this MyFuturesTrade. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def close_size(self): + """Gets the close_size of this MyFuturesTrade. # noqa: E501 + + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + + :return: The close_size of this MyFuturesTrade. # noqa: E501 + :rtype: int + """ + return self._close_size + + @close_size.setter + def close_size(self, close_size): + """Sets the close_size of this MyFuturesTrade. + + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + + :param close_size: The close_size of this MyFuturesTrade. # noqa: E501 + :type: int + """ + + self._close_size = close_size + + @property + def price(self): + """Gets the price of this MyFuturesTrade. # noqa: E501 + + Trading price # noqa: E501 + + :return: The price of this MyFuturesTrade. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this MyFuturesTrade. + + Trading price # noqa: E501 + + :param price: The price of this MyFuturesTrade. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def role(self): + """Gets the role of this MyFuturesTrade. # noqa: E501 + + Trade role. Available values are `taker` and `maker` # noqa: E501 + + :return: The role of this MyFuturesTrade. # noqa: E501 + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this MyFuturesTrade. + + Trade role. Available values are `taker` and `maker` # noqa: E501 + + :param role: The role of this MyFuturesTrade. # noqa: E501 + :type: str + """ + allowed_values = ["taker", "maker"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 + .format(role, allowed_values) + ) + + self._role = role + + @property + def text(self): + """Gets the text of this MyFuturesTrade. # noqa: E501 + + User defined information # noqa: E501 + + :return: The text of this MyFuturesTrade. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this MyFuturesTrade. + + User defined information # noqa: E501 + + :param text: The text of this MyFuturesTrade. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def fee(self): + """Gets the fee of this MyFuturesTrade. # noqa: E501 + + Fee deducted # noqa: E501 + + :return: The fee of this MyFuturesTrade. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this MyFuturesTrade. + + Fee deducted # noqa: E501 + + :param fee: The fee of this MyFuturesTrade. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def point_fee(self): + """Gets the point_fee of this MyFuturesTrade. # noqa: E501 + + Points used to deduct fee # noqa: E501 + + :return: The point_fee of this MyFuturesTrade. # noqa: E501 + :rtype: str + """ + return self._point_fee + + @point_fee.setter + def point_fee(self, point_fee): + """Sets the point_fee of this MyFuturesTrade. + + Points used to deduct fee # noqa: E501 + + :param point_fee: The point_fee of this MyFuturesTrade. # noqa: E501 + :type: str + """ + + self._point_fee = point_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, MyFuturesTrade): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MyFuturesTrade): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py new file mode 100644 index 0000000..58b5d4b --- /dev/null +++ b/gate_api/models/my_futures_trade_time_range.py @@ -0,0 +1,409 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class MyFuturesTradeTimeRange(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'trade_id': 'str', + 'create_time': 'float', + 'contract': 'str', + 'order_id': 'str', + 'size': 'int', + 'close_size': 'int', + 'price': 'str', + 'role': 'str', + 'text': 'str', + 'fee': 'str', + 'point_fee': 'str' + } + + attribute_map = { + 'trade_id': 'trade_id', + 'create_time': 'create_time', + 'contract': 'contract', + 'order_id': 'order_id', + 'size': 'size', + 'close_size': 'close_size', + 'price': 'price', + 'role': 'role', + 'text': 'text', + 'fee': 'fee', + 'point_fee': 'point_fee' + } + + def __init__(self, trade_id=None, create_time=None, contract=None, order_id=None, size=None, close_size=None, price=None, role=None, text=None, fee=None, point_fee=None, local_vars_configuration=None): # noqa: E501 + # type: (str, float, str, str, int, int, str, str, str, str, str, Configuration) -> None + """MyFuturesTradeTimeRange - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._trade_id = None + self._create_time = None + self._contract = None + self._order_id = None + self._size = None + self._close_size = None + self._price = None + self._role = None + self._text = None + self._fee = None + self._point_fee = None + self.discriminator = None + + if trade_id is not None: + self.trade_id = trade_id + if create_time is not None: + self.create_time = create_time + if contract is not None: + self.contract = contract + if order_id is not None: + self.order_id = order_id + if size is not None: + self.size = size + if close_size is not None: + self.close_size = close_size + if price is not None: + self.price = price + if role is not None: + self.role = role + if text is not None: + self.text = text + if fee is not None: + self.fee = fee + if point_fee is not None: + self.point_fee = point_fee + + @property + def trade_id(self): + """Gets the trade_id of this MyFuturesTradeTimeRange. # noqa: E501 + + Trade ID # noqa: E501 + + :return: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._trade_id + + @trade_id.setter + def trade_id(self, trade_id): + """Sets the trade_id of this MyFuturesTradeTimeRange. + + Trade ID # noqa: E501 + + :param trade_id: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + + self._trade_id = trade_id + + @property + def create_time(self): + """Gets the create_time of this MyFuturesTradeTimeRange. # noqa: E501 + + Trading time # noqa: E501 + + :return: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this MyFuturesTradeTimeRange. + + Trading time # noqa: E501 + + :param create_time: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def contract(self): + """Gets the contract of this MyFuturesTradeTimeRange. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this MyFuturesTradeTimeRange. + + Futures contract # noqa: E501 + + :param contract: The contract of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def order_id(self): + """Gets the order_id of this MyFuturesTradeTimeRange. # noqa: E501 + + Order ID related # noqa: E501 + + :return: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this MyFuturesTradeTimeRange. + + Order ID related # noqa: E501 + + :param order_id: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def size(self): + """Gets the size of this MyFuturesTradeTimeRange. # noqa: E501 + + Trading size # noqa: E501 + + :return: The size of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this MyFuturesTradeTimeRange. + + Trading size # noqa: E501 + + :param size: The size of this MyFuturesTradeTimeRange. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def close_size(self): + """Gets the close_size of this MyFuturesTradeTimeRange. # noqa: E501 + + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + + :return: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: int + """ + return self._close_size + + @close_size.setter + def close_size(self, close_size): + """Sets the close_size of this MyFuturesTradeTimeRange. + + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + + :param close_size: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 + :type: int + """ + + self._close_size = close_size + + @property + def price(self): + """Gets the price of this MyFuturesTradeTimeRange. # noqa: E501 + + Trading price # noqa: E501 + + :return: The price of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this MyFuturesTradeTimeRange. + + Trading price # noqa: E501 + + :param price: The price of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def role(self): + """Gets the role of this MyFuturesTradeTimeRange. # noqa: E501 + + Trade role. Available values are `taker` and `maker` # noqa: E501 + + :return: The role of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this MyFuturesTradeTimeRange. + + Trade role. Available values are `taker` and `maker` # noqa: E501 + + :param role: The role of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + allowed_values = ["taker", "maker"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 + .format(role, allowed_values) + ) + + self._role = role + + @property + def text(self): + """Gets the text of this MyFuturesTradeTimeRange. # noqa: E501 + + User defined information # noqa: E501 + + :return: The text of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this MyFuturesTradeTimeRange. + + User defined information # noqa: E501 + + :param text: The text of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def fee(self): + """Gets the fee of this MyFuturesTradeTimeRange. # noqa: E501 + + Fee deducted # noqa: E501 + + :return: The fee of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this MyFuturesTradeTimeRange. + + Fee deducted # noqa: E501 + + :param fee: The fee of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def point_fee(self): + """Gets the point_fee of this MyFuturesTradeTimeRange. # noqa: E501 + + Points used to deduct fee # noqa: E501 + + :return: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 + :rtype: str + """ + return self._point_fee + + @point_fee.setter + def point_fee(self, point_fee): + """Sets the point_fee of this MyFuturesTradeTimeRange. + + Points used to deduct fee # noqa: E501 + + :param point_fee: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 + :type: str + """ + + self._point_fee = point_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, MyFuturesTradeTimeRange): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MyFuturesTradeTimeRange): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py new file mode 100644 index 0000000..2b5d58c --- /dev/null +++ b/gate_api/models/open_orders.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OpenOrders(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'total': 'int', + 'orders': 'list[Order]' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'total': 'total', + 'orders': 'orders' + } + + def __init__(self, currency_pair=None, total=None, orders=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, list[Order], Configuration) -> None + """OpenOrders - a 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._total = None + self._orders = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if total is not None: + self.total = total + if orders is not None: + self.orders = orders + + @property + def currency_pair(self): + """Gets the currency_pair of this OpenOrders. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this OpenOrders. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this OpenOrders. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this OpenOrders. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def total(self): + """Gets the total of this OpenOrders. # noqa: E501 + + The total number of pending orders for this trading pair on the current page # noqa: E501 + + :return: The total of this OpenOrders. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this OpenOrders. + + The total number of pending orders for this trading pair on the current page # noqa: E501 + + :param total: The total of this OpenOrders. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def orders(self): + """Gets the orders of this OpenOrders. # noqa: E501 + + + :return: The orders of this OpenOrders. # noqa: E501 + :rtype: list[Order] + """ + return self._orders + + @orders.setter + def orders(self, orders): + """Sets the orders of this OpenOrders. + + + :param orders: The orders of this OpenOrders. # noqa: E501 + :type: list[Order] + """ + + 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, OpenOrders): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OpenOrders): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py new file mode 100644 index 0000000..a3f2875 --- /dev/null +++ b/gate_api/models/options_account.py @@ -0,0 +1,633 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'int', + 'total': 'str', + 'position_value': 'str', + 'equity': 'str', + 'short_enabled': 'bool', + 'mmp_enabled': 'bool', + 'liq_triggered': 'bool', + 'margin_mode': 'int', + 'unrealised_pnl': 'str', + 'init_margin': 'str', + 'maint_margin': 'str', + 'order_margin': 'str', + 'ask_order_margin': 'str', + 'bid_order_margin': 'str', + 'available': 'str', + 'point': 'str', + 'currency': 'str', + 'orders_limit': 'int', + 'position_notional_limit': 'int' + } + + attribute_map = { + 'user': 'user', + 'total': 'total', + 'position_value': 'position_value', + 'equity': 'equity', + 'short_enabled': 'short_enabled', + 'mmp_enabled': 'mmp_enabled', + 'liq_triggered': 'liq_triggered', + 'margin_mode': 'margin_mode', + 'unrealised_pnl': 'unrealised_pnl', + 'init_margin': 'init_margin', + 'maint_margin': 'maint_margin', + 'order_margin': 'order_margin', + 'ask_order_margin': 'ask_order_margin', + 'bid_order_margin': 'bid_order_margin', + 'available': 'available', + 'point': 'point', + 'currency': 'currency', + 'orders_limit': 'orders_limit', + 'position_notional_limit': 'position_notional_limit' + } + + def __init__(self, user=None, total=None, position_value=None, equity=None, short_enabled=None, mmp_enabled=None, liq_triggered=None, margin_mode=None, unrealised_pnl=None, init_margin=None, maint_margin=None, order_margin=None, ask_order_margin=None, bid_order_margin=None, available=None, point=None, currency=None, orders_limit=None, position_notional_limit=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, bool, bool, bool, int, str, str, str, str, str, str, str, str, str, int, int, Configuration) -> None + """OptionsAccount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user = None + self._total = None + self._position_value = None + self._equity = None + self._short_enabled = None + self._mmp_enabled = None + self._liq_triggered = None + self._margin_mode = None + self._unrealised_pnl = None + self._init_margin = None + self._maint_margin = None + self._order_margin = None + self._ask_order_margin = None + self._bid_order_margin = None + self._available = None + self._point = None + self._currency = None + self._orders_limit = None + self._position_notional_limit = None + self.discriminator = None + + if user is not None: + self.user = user + if total is not None: + self.total = total + if position_value is not None: + self.position_value = position_value + if equity is not None: + self.equity = equity + if short_enabled is not None: + self.short_enabled = short_enabled + if mmp_enabled is not None: + self.mmp_enabled = mmp_enabled + if liq_triggered is not None: + self.liq_triggered = liq_triggered + if margin_mode is not None: + self.margin_mode = margin_mode + if unrealised_pnl is not None: + self.unrealised_pnl = unrealised_pnl + if init_margin is not None: + self.init_margin = init_margin + if maint_margin is not None: + self.maint_margin = maint_margin + if order_margin is not None: + self.order_margin = order_margin + if ask_order_margin is not None: + self.ask_order_margin = ask_order_margin + if bid_order_margin is not None: + self.bid_order_margin = bid_order_margin + if available is not None: + self.available = available + if point is not None: + self.point = point + if currency is not None: + self.currency = currency + if orders_limit is not None: + self.orders_limit = orders_limit + if position_notional_limit is not None: + self.position_notional_limit = position_notional_limit + + @property + def user(self): + """Gets the user of this OptionsAccount. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this OptionsAccount. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this OptionsAccount. + + User ID # noqa: E501 + + :param user: The user of this OptionsAccount. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def total(self): + """Gets the total of this OptionsAccount. # noqa: E501 + + Account balance # noqa: E501 + + :return: The total of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this OptionsAccount. + + Account balance # noqa: E501 + + :param total: The total of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._total = total + + @property + def position_value(self): + """Gets the position_value of this OptionsAccount. # noqa: E501 + + Position value, long position value is positive, short position value is negative # noqa: E501 + + :return: The position_value of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._position_value + + @position_value.setter + def position_value(self, position_value): + """Sets the position_value of this OptionsAccount. + + Position value, long position value is positive, short position value is negative # noqa: E501 + + :param position_value: The position_value of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._position_value = position_value + + @property + def equity(self): + """Gets the equity of this OptionsAccount. # noqa: E501 + + Account equity, the sum of account balance and position value # noqa: E501 + + :return: The equity of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._equity + + @equity.setter + def equity(self, equity): + """Sets the equity of this OptionsAccount. + + Account equity, the sum of account balance and position value # noqa: E501 + + :param equity: The equity of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._equity = equity + + @property + def short_enabled(self): + """Gets the short_enabled of this OptionsAccount. # noqa: E501 + + If the account is allowed to short # noqa: E501 + + :return: The short_enabled of this OptionsAccount. # noqa: E501 + :rtype: bool + """ + return self._short_enabled + + @short_enabled.setter + def short_enabled(self, short_enabled): + """Sets the short_enabled of this OptionsAccount. + + If the account is allowed to short # noqa: E501 + + :param short_enabled: The short_enabled of this OptionsAccount. # noqa: E501 + :type: bool + """ + + self._short_enabled = short_enabled + + @property + def mmp_enabled(self): + """Gets the mmp_enabled of this OptionsAccount. # noqa: E501 + + Whether to enable MMP # noqa: E501 + + :return: The mmp_enabled of this OptionsAccount. # noqa: E501 + :rtype: bool + """ + return self._mmp_enabled + + @mmp_enabled.setter + def mmp_enabled(self, mmp_enabled): + """Sets the mmp_enabled of this OptionsAccount. + + Whether to enable MMP # noqa: E501 + + :param mmp_enabled: The mmp_enabled of this OptionsAccount. # noqa: E501 + :type: bool + """ + + self._mmp_enabled = mmp_enabled + + @property + def liq_triggered(self): + """Gets the liq_triggered of this OptionsAccount. # noqa: E501 + + Whether to trigger position liquidation # noqa: E501 + + :return: The liq_triggered of this OptionsAccount. # noqa: E501 + :rtype: bool + """ + return self._liq_triggered + + @liq_triggered.setter + def liq_triggered(self, liq_triggered): + """Sets the liq_triggered of this OptionsAccount. + + Whether to trigger position liquidation # noqa: E501 + + :param liq_triggered: The liq_triggered of this OptionsAccount. # noqa: E501 + :type: bool + """ + + self._liq_triggered = liq_triggered + + @property + def margin_mode(self): + """Gets the margin_mode of this OptionsAccount. # noqa: E501 + + | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 # noqa: E501 + + :return: The margin_mode of this OptionsAccount. # noqa: E501 + :rtype: int + """ + return self._margin_mode + + @margin_mode.setter + def margin_mode(self, margin_mode): + """Sets the margin_mode of this OptionsAccount. + + | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 # noqa: E501 + + :param margin_mode: The margin_mode of this OptionsAccount. # noqa: E501 + :type: int + """ + allowed_values = [0, 1, 2] # noqa: E501 + if self.local_vars_configuration.client_side_validation and margin_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `margin_mode` ({0}), must be one of {1}" # noqa: E501 + .format(margin_mode, allowed_values) + ) + + self._margin_mode = margin_mode + + @property + def unrealised_pnl(self): + """Gets the unrealised_pnl of this OptionsAccount. # noqa: E501 + + Unrealized PNL # noqa: E501 + + :return: The unrealised_pnl of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._unrealised_pnl + + @unrealised_pnl.setter + def unrealised_pnl(self, unrealised_pnl): + """Sets the unrealised_pnl of this OptionsAccount. + + Unrealized PNL # noqa: E501 + + :param unrealised_pnl: The unrealised_pnl of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._unrealised_pnl = unrealised_pnl + + @property + def init_margin(self): + """Gets the init_margin of this OptionsAccount. # noqa: E501 + + Initial position margin # noqa: E501 + + :return: The init_margin of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._init_margin + + @init_margin.setter + def init_margin(self, init_margin): + """Sets the init_margin of this OptionsAccount. + + Initial position margin # noqa: E501 + + :param init_margin: The init_margin of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._init_margin = init_margin + + @property + def maint_margin(self): + """Gets the maint_margin of this OptionsAccount. # noqa: E501 + + Position maintenance margin # noqa: E501 + + :return: The maint_margin of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._maint_margin + + @maint_margin.setter + def maint_margin(self, maint_margin): + """Sets the maint_margin of this OptionsAccount. + + Position maintenance margin # noqa: E501 + + :param maint_margin: The maint_margin of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._maint_margin = maint_margin + + @property + def order_margin(self): + """Gets the order_margin of this OptionsAccount. # noqa: E501 + + Order margin of unfinished orders # noqa: E501 + + :return: The order_margin of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._order_margin + + @order_margin.setter + def order_margin(self, order_margin): + """Sets the order_margin of this OptionsAccount. + + Order margin of unfinished orders # noqa: E501 + + :param order_margin: The order_margin of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._order_margin = order_margin + + @property + def ask_order_margin(self): + """Gets the ask_order_margin of this OptionsAccount. # noqa: E501 + + Margin for outstanding sell orders # noqa: E501 + + :return: The ask_order_margin of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._ask_order_margin + + @ask_order_margin.setter + def ask_order_margin(self, ask_order_margin): + """Sets the ask_order_margin of this OptionsAccount. + + Margin for outstanding sell orders # noqa: E501 + + :param ask_order_margin: The ask_order_margin of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._ask_order_margin = ask_order_margin + + @property + def bid_order_margin(self): + """Gets the bid_order_margin of this OptionsAccount. # noqa: E501 + + Margin for outstanding buy orders # noqa: E501 + + :return: The bid_order_margin of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._bid_order_margin + + @bid_order_margin.setter + def bid_order_margin(self, bid_order_margin): + """Sets the bid_order_margin of this OptionsAccount. + + Margin for outstanding buy orders # noqa: E501 + + :param bid_order_margin: The bid_order_margin of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._bid_order_margin = bid_order_margin + + @property + def available(self): + """Gets the available of this OptionsAccount. # noqa: E501 + + Available balance to transfer out or trade # noqa: E501 + + :return: The available of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this OptionsAccount. + + Available balance to transfer out or trade # noqa: E501 + + :param available: The available of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def point(self): + """Gets the point of this OptionsAccount. # noqa: E501 + + POINT amount # noqa: E501 + + :return: The point of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._point + + @point.setter + def point(self, point): + """Sets the point of this OptionsAccount. + + POINT amount # noqa: E501 + + :param point: The point of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._point = point + + @property + def currency(self): + """Gets the currency of this OptionsAccount. # noqa: E501 + + Settle currency # noqa: E501 + + :return: The currency of this OptionsAccount. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this OptionsAccount. + + Settle currency # noqa: E501 + + :param currency: The currency of this OptionsAccount. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def orders_limit(self): + """Gets the orders_limit of this OptionsAccount. # noqa: E501 + + Maximum number of outstanding orders # noqa: E501 + + :return: The orders_limit of this OptionsAccount. # noqa: E501 + :rtype: int + """ + return self._orders_limit + + @orders_limit.setter + def orders_limit(self, orders_limit): + """Sets the orders_limit of this OptionsAccount. + + Maximum number of outstanding orders # noqa: E501 + + :param orders_limit: The orders_limit of this OptionsAccount. # noqa: E501 + :type: int + """ + + self._orders_limit = orders_limit + + @property + def position_notional_limit(self): + """Gets the position_notional_limit of this OptionsAccount. # noqa: E501 + + Notional value upper limit, including the nominal value of positions and outstanding orders # noqa: E501 + + :return: The position_notional_limit of this OptionsAccount. # noqa: E501 + :rtype: int + """ + return self._position_notional_limit + + @position_notional_limit.setter + def position_notional_limit(self, position_notional_limit): + """Sets the position_notional_limit of this OptionsAccount. + + Notional value upper limit, including the nominal value of positions and outstanding orders # noqa: E501 + + :param position_notional_limit: The position_notional_limit of this OptionsAccount. # noqa: E501 + :type: int + """ + + self._position_notional_limit = position_notional_limit + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py new file mode 100644 index 0000000..e843486 --- /dev/null +++ b/gate_api/models/options_account_book.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsAccountBook(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'float', + 'change': 'str', + 'balance': 'str', + 'type': 'str', + 'text': 'str' + } + + attribute_map = { + 'time': 'time', + 'change': 'change', + 'balance': 'balance', + 'type': 'type', + 'text': 'text' + } + + def __init__(self, time=None, change=None, balance=None, type=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, str, str, str, Configuration) -> None + """OptionsAccountBook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._change = None + self._balance = None + self._type = None + self._text = None + self.discriminator = None + + if time is not None: + self.time = time + if change is not None: + self.change = change + if balance is not None: + self.balance = balance + if type is not None: + self.type = type + if text is not None: + self.text = text + + @property + def time(self): + """Gets the time of this OptionsAccountBook. # noqa: E501 + + Change time # noqa: E501 + + :return: The time of this OptionsAccountBook. # noqa: E501 + :rtype: float + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this OptionsAccountBook. + + Change time # noqa: E501 + + :param time: The time of this OptionsAccountBook. # noqa: E501 + :type: float + """ + + self._time = time + + @property + def change(self): + """Gets the change of this OptionsAccountBook. # noqa: E501 + + Amount changed (USDT) # noqa: E501 + + :return: The change of this OptionsAccountBook. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this OptionsAccountBook. + + Amount changed (USDT) # noqa: E501 + + :param change: The change of this OptionsAccountBook. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def balance(self): + """Gets the balance of this OptionsAccountBook. # noqa: E501 + + Account total balance after change (USDT) # noqa: E501 + + :return: The balance of this OptionsAccountBook. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this OptionsAccountBook. + + Account total balance after change (USDT) # noqa: E501 + + :param balance: The balance of this OptionsAccountBook. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def type(self): + """Gets the type of this OptionsAccountBook. # noqa: E501 + + Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 + + :return: The type of this OptionsAccountBook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this OptionsAccountBook. + + Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 + + :param type: The type of this OptionsAccountBook. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def text(self): + """Gets the text of this OptionsAccountBook. # noqa: E501 + + custom text # noqa: E501 + + :return: The text of this OptionsAccountBook. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this OptionsAccountBook. + + custom text # noqa: E501 + + :param text: The text of this OptionsAccountBook. # 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, OptionsAccountBook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsAccountBook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py new file mode 100644 index 0000000..6a42d98 --- /dev/null +++ b/gate_api/models/options_candlestick.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsCandlestick(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 't': 'float', + 'v': 'int', + 'c': 'str', + 'h': 'str', + 'l': 'str', + 'o': 'str' + } + + attribute_map = { + 't': 't', + 'v': 'v', + 'c': 'c', + 'h': 'h', + 'l': 'l', + 'o': 'o' + } + + def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_configuration=None): # noqa: E501 + # type: (float, int, str, str, str, str, Configuration) -> None + """OptionsCandlestick - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._t = None + self._v = None + self._c = None + self._h = None + self._l = None + self._o = None + self.discriminator = None + + if t is not None: + self.t = t + if v is not None: + self.v = v + if c is not None: + self.c = c + if h is not None: + self.h = h + if l is not None: + self.l = l + if o is not None: + self.o = o + + @property + def t(self): + """Gets the t of this OptionsCandlestick. # noqa: E501 + + Unix timestamp in seconds # noqa: E501 + + :return: The t of this OptionsCandlestick. # noqa: E501 + :rtype: float + """ + return self._t + + @t.setter + def t(self, t): + """Sets the t of this OptionsCandlestick. + + Unix timestamp in seconds # noqa: E501 + + :param t: The t of this OptionsCandlestick. # noqa: E501 + :type: float + """ + + self._t = t + + @property + def v(self): + """Gets the v of this OptionsCandlestick. # noqa: E501 + + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + + :return: The v of this OptionsCandlestick. # noqa: E501 + :rtype: int + """ + return self._v + + @v.setter + def v(self, v): + """Sets the v of this OptionsCandlestick. + + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + + :param v: The v of this OptionsCandlestick. # noqa: E501 + :type: int + """ + + self._v = v + + @property + def c(self): + """Gets the c of this OptionsCandlestick. # noqa: E501 + + Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :return: The c of this OptionsCandlestick. # noqa: E501 + :rtype: str + """ + return self._c + + @c.setter + def c(self, c): + """Sets the c of this OptionsCandlestick. + + Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :param c: The c of this OptionsCandlestick. # noqa: E501 + :type: str + """ + + self._c = c + + @property + def h(self): + """Gets the h of this OptionsCandlestick. # noqa: E501 + + Highest price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :return: The h of this OptionsCandlestick. # noqa: E501 + :rtype: str + """ + return self._h + + @h.setter + def h(self, h): + """Sets the h of this OptionsCandlestick. + + Highest price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :param h: The h of this OptionsCandlestick. # noqa: E501 + :type: str + """ + + self._h = h + + @property + def l(self): + """Gets the l of this OptionsCandlestick. # noqa: E501 + + Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :return: The l of this OptionsCandlestick. # noqa: E501 + :rtype: str + """ + return self._l + + @l.setter + def l(self, l): + """Sets the l of this OptionsCandlestick. + + Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :param l: The l of this OptionsCandlestick. # noqa: E501 + :type: str + """ + + self._l = l + + @property + def o(self): + """Gets the o of this OptionsCandlestick. # noqa: E501 + + Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :return: The o of this OptionsCandlestick. # noqa: E501 + :rtype: str + """ + return self._o + + @o.setter + def o(self, o): + """Sets the o of this OptionsCandlestick. + + Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 + + :param o: The o of this OptionsCandlestick. # noqa: E501 + :type: str + """ + + self._o = o + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsCandlestick): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsCandlestick): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py new file mode 100644 index 0000000..7338171 --- /dev/null +++ b/gate_api/models/options_contract.py @@ -0,0 +1,795 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsContract(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'tag': 'str', + 'create_time': 'float', + 'expiration_time': 'float', + 'is_call': 'bool', + 'multiplier': 'str', + 'underlying': 'str', + 'underlying_price': 'str', + 'last_price': 'str', + 'mark_price': 'str', + 'index_price': 'str', + 'maker_fee_rate': 'str', + 'taker_fee_rate': 'str', + 'order_price_round': 'str', + 'mark_price_round': 'str', + 'order_size_min': 'int', + 'order_size_max': 'int', + 'order_price_deviate': 'str', + 'ref_discount_rate': 'str', + 'ref_rebate_rate': 'str', + 'orderbook_id': 'int', + 'trade_id': 'int', + 'trade_size': 'int', + 'position_size': 'int', + 'orders_limit': 'int' + } + + attribute_map = { + 'name': 'name', + 'tag': 'tag', + 'create_time': 'create_time', + 'expiration_time': 'expiration_time', + 'is_call': 'is_call', + 'multiplier': 'multiplier', + 'underlying': 'underlying', + 'underlying_price': 'underlying_price', + 'last_price': 'last_price', + 'mark_price': 'mark_price', + 'index_price': 'index_price', + 'maker_fee_rate': 'maker_fee_rate', + 'taker_fee_rate': 'taker_fee_rate', + 'order_price_round': 'order_price_round', + 'mark_price_round': 'mark_price_round', + 'order_size_min': 'order_size_min', + 'order_size_max': 'order_size_max', + 'order_price_deviate': 'order_price_deviate', + 'ref_discount_rate': 'ref_discount_rate', + 'ref_rebate_rate': 'ref_rebate_rate', + 'orderbook_id': 'orderbook_id', + 'trade_id': 'trade_id', + 'trade_size': 'trade_size', + 'position_size': 'position_size', + 'orders_limit': 'orders_limit' + } + + def __init__(self, name=None, tag=None, create_time=None, expiration_time=None, is_call=None, multiplier=None, underlying=None, underlying_price=None, last_price=None, mark_price=None, index_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, orders_limit=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, float, float, bool, str, str, str, str, str, str, str, str, str, str, int, int, str, str, str, int, int, int, int, int, Configuration) -> None + """OptionsContract - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._tag = None + self._create_time = None + self._expiration_time = None + self._is_call = None + self._multiplier = None + self._underlying = None + self._underlying_price = None + self._last_price = None + self._mark_price = None + self._index_price = None + self._maker_fee_rate = None + self._taker_fee_rate = None + self._order_price_round = None + self._mark_price_round = None + self._order_size_min = None + self._order_size_max = None + self._order_price_deviate = None + self._ref_discount_rate = None + self._ref_rebate_rate = None + self._orderbook_id = None + self._trade_id = None + self._trade_size = None + self._position_size = None + self._orders_limit = None + self.discriminator = None + + if name is not None: + self.name = name + if tag is not None: + self.tag = tag + if create_time is not None: + self.create_time = create_time + if expiration_time is not None: + self.expiration_time = expiration_time + if is_call is not None: + self.is_call = is_call + if multiplier is not None: + self.multiplier = multiplier + if underlying is not None: + self.underlying = underlying + if underlying_price is not None: + self.underlying_price = underlying_price + if last_price is not None: + self.last_price = last_price + if mark_price is not None: + self.mark_price = mark_price + if index_price is not None: + self.index_price = index_price + if maker_fee_rate is not None: + self.maker_fee_rate = maker_fee_rate + if taker_fee_rate is not None: + self.taker_fee_rate = taker_fee_rate + if order_price_round is not None: + self.order_price_round = order_price_round + if mark_price_round is not None: + self.mark_price_round = mark_price_round + if order_size_min is not None: + self.order_size_min = order_size_min + if order_size_max is not None: + self.order_size_max = order_size_max + if order_price_deviate is not None: + self.order_price_deviate = order_price_deviate + if ref_discount_rate is not None: + self.ref_discount_rate = ref_discount_rate + if ref_rebate_rate is not None: + self.ref_rebate_rate = ref_rebate_rate + if orderbook_id is not None: + self.orderbook_id = orderbook_id + if trade_id is not None: + self.trade_id = trade_id + if trade_size is not None: + self.trade_size = trade_size + if position_size is not None: + self.position_size = position_size + if orders_limit is not None: + self.orders_limit = orders_limit + + @property + def name(self): + """Gets the name of this OptionsContract. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The name of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OptionsContract. + + Options contract name # noqa: E501 + + :param name: The name of this OptionsContract. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tag(self): + """Gets the tag of this OptionsContract. # noqa: E501 + + tag # noqa: E501 + + :return: The tag of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this OptionsContract. + + tag # noqa: E501 + + :param tag: The tag of this OptionsContract. # noqa: E501 + :type: str + """ + + self._tag = tag + + @property + def create_time(self): + """Gets the create_time of this OptionsContract. # noqa: E501 + + Creation time # noqa: E501 + + :return: The create_time of this OptionsContract. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this OptionsContract. + + Creation time # noqa: E501 + + :param create_time: The create_time of this OptionsContract. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def expiration_time(self): + """Gets the expiration_time of this OptionsContract. # noqa: E501 + + Expiration time # noqa: E501 + + :return: The expiration_time of this OptionsContract. # noqa: E501 + :rtype: float + """ + return self._expiration_time + + @expiration_time.setter + def expiration_time(self, expiration_time): + """Sets the expiration_time of this OptionsContract. + + Expiration time # noqa: E501 + + :param expiration_time: The expiration_time of this OptionsContract. # noqa: E501 + :type: float + """ + + self._expiration_time = expiration_time + + @property + def is_call(self): + """Gets the is_call of this OptionsContract. # noqa: E501 + + `true` means call options, while `false` is put options # noqa: E501 + + :return: The is_call of this OptionsContract. # noqa: E501 + :rtype: bool + """ + return self._is_call + + @is_call.setter + def is_call(self, is_call): + """Sets the is_call of this OptionsContract. + + `true` means call options, while `false` is put options # noqa: E501 + + :param is_call: The is_call of this OptionsContract. # noqa: E501 + :type: bool + """ + + self._is_call = is_call + + @property + def multiplier(self): + """Gets the multiplier of this OptionsContract. # noqa: E501 + + Multiplier used in converting from invoicing to settlement currency # noqa: E501 + + :return: The multiplier of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._multiplier + + @multiplier.setter + def multiplier(self, multiplier): + """Sets the multiplier of this OptionsContract. + + Multiplier used in converting from invoicing to settlement currency # noqa: E501 + + :param multiplier: The multiplier of this OptionsContract. # noqa: E501 + :type: str + """ + + self._multiplier = multiplier + + @property + def underlying(self): + """Gets the underlying of this OptionsContract. # noqa: E501 + + Underlying # noqa: E501 + + :return: The underlying of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this OptionsContract. + + Underlying # noqa: E501 + + :param underlying: The underlying of this OptionsContract. # noqa: E501 + :type: str + """ + + self._underlying = underlying + + @property + def underlying_price(self): + """Gets the underlying_price of this OptionsContract. # noqa: E501 + + Underlying price (quote currency) # noqa: E501 + + :return: The underlying_price of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._underlying_price + + @underlying_price.setter + def underlying_price(self, underlying_price): + """Sets the underlying_price of this OptionsContract. + + Underlying price (quote currency) # noqa: E501 + + :param underlying_price: The underlying_price of this OptionsContract. # noqa: E501 + :type: str + """ + + self._underlying_price = underlying_price + + @property + def last_price(self): + """Gets the last_price of this OptionsContract. # noqa: E501 + + Last trading price # noqa: E501 + + :return: The last_price of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._last_price + + @last_price.setter + def last_price(self, last_price): + """Sets the last_price of this OptionsContract. + + Last trading price # noqa: E501 + + :param last_price: The last_price of this OptionsContract. # noqa: E501 + :type: str + """ + + self._last_price = last_price + + @property + def mark_price(self): + """Gets the mark_price of this OptionsContract. # noqa: E501 + + Current mark price (quote currency) # noqa: E501 + + :return: The mark_price of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this OptionsContract. + + Current mark price (quote currency) # noqa: E501 + + :param mark_price: The mark_price of this OptionsContract. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def index_price(self): + """Gets the index_price of this OptionsContract. # noqa: E501 + + Current index price (quote currency) # noqa: E501 + + :return: The index_price of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this OptionsContract. + + Current index price (quote currency) # noqa: E501 + + :param index_price: The index_price of this OptionsContract. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def maker_fee_rate(self): + """Gets the maker_fee_rate of this OptionsContract. # noqa: E501 + + Maker fee rate, where negative means rebate # noqa: E501 + + :return: The maker_fee_rate of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._maker_fee_rate + + @maker_fee_rate.setter + def maker_fee_rate(self, maker_fee_rate): + """Sets the maker_fee_rate of this OptionsContract. + + Maker fee rate, where negative means rebate # noqa: E501 + + :param maker_fee_rate: The maker_fee_rate of this OptionsContract. # noqa: E501 + :type: str + """ + + self._maker_fee_rate = maker_fee_rate + + @property + def taker_fee_rate(self): + """Gets the taker_fee_rate of this OptionsContract. # noqa: E501 + + Taker fee rate # noqa: E501 + + :return: The taker_fee_rate of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._taker_fee_rate + + @taker_fee_rate.setter + def taker_fee_rate(self, taker_fee_rate): + """Sets the taker_fee_rate of this OptionsContract. + + Taker fee rate # noqa: E501 + + :param taker_fee_rate: The taker_fee_rate of this OptionsContract. # noqa: E501 + :type: str + """ + + self._taker_fee_rate = taker_fee_rate + + @property + def order_price_round(self): + """Gets the order_price_round of this OptionsContract. # noqa: E501 + + Minimum order price increment # noqa: E501 + + :return: The order_price_round of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._order_price_round + + @order_price_round.setter + def order_price_round(self, order_price_round): + """Sets the order_price_round of this OptionsContract. + + Minimum order price increment # noqa: E501 + + :param order_price_round: The order_price_round of this OptionsContract. # noqa: E501 + :type: str + """ + + self._order_price_round = order_price_round + + @property + def mark_price_round(self): + """Gets the mark_price_round of this OptionsContract. # noqa: E501 + + Minimum mark price increment # noqa: E501 + + :return: The mark_price_round of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._mark_price_round + + @mark_price_round.setter + def mark_price_round(self, mark_price_round): + """Sets the mark_price_round of this OptionsContract. + + Minimum mark price increment # noqa: E501 + + :param mark_price_round: The mark_price_round of this OptionsContract. # noqa: E501 + :type: str + """ + + self._mark_price_round = mark_price_round + + @property + def order_size_min(self): + """Gets the order_size_min of this OptionsContract. # noqa: E501 + + Minimum order size the contract allowed # noqa: E501 + + :return: The order_size_min of this OptionsContract. # noqa: E501 + :rtype: int + """ + return self._order_size_min + + @order_size_min.setter + def order_size_min(self, order_size_min): + """Sets the order_size_min of this OptionsContract. + + Minimum order size the contract allowed # noqa: E501 + + :param order_size_min: The order_size_min of this OptionsContract. # noqa: E501 + :type: int + """ + + self._order_size_min = order_size_min + + @property + def order_size_max(self): + """Gets the order_size_max of this OptionsContract. # noqa: E501 + + Maximum order size the contract allowed # noqa: E501 + + :return: The order_size_max of this OptionsContract. # noqa: E501 + :rtype: int + """ + return self._order_size_max + + @order_size_max.setter + def order_size_max(self, order_size_max): + """Sets the order_size_max of this OptionsContract. + + Maximum order size the contract allowed # noqa: E501 + + :param order_size_max: The order_size_max of this OptionsContract. # noqa: E501 + :type: int + """ + + self._order_size_max = order_size_max + + @property + def order_price_deviate(self): + """Gets the order_price_deviate of this OptionsContract. # noqa: E501 + + The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 + + :return: The order_price_deviate of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._order_price_deviate + + @order_price_deviate.setter + def order_price_deviate(self, order_price_deviate): + """Sets the order_price_deviate of this OptionsContract. + + The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 + + :param order_price_deviate: The order_price_deviate of this OptionsContract. # noqa: E501 + :type: str + """ + + self._order_price_deviate = order_price_deviate + + @property + def ref_discount_rate(self): + """Gets the ref_discount_rate of this OptionsContract. # noqa: E501 + + Referral fee rate discount # noqa: E501 + + :return: The ref_discount_rate of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._ref_discount_rate + + @ref_discount_rate.setter + def ref_discount_rate(self, ref_discount_rate): + """Sets the ref_discount_rate of this OptionsContract. + + Referral fee rate discount # noqa: E501 + + :param ref_discount_rate: The ref_discount_rate of this OptionsContract. # noqa: E501 + :type: str + """ + + self._ref_discount_rate = ref_discount_rate + + @property + def ref_rebate_rate(self): + """Gets the ref_rebate_rate of this OptionsContract. # noqa: E501 + + Referrer commission rate # noqa: E501 + + :return: The ref_rebate_rate of this OptionsContract. # noqa: E501 + :rtype: str + """ + return self._ref_rebate_rate + + @ref_rebate_rate.setter + def ref_rebate_rate(self, ref_rebate_rate): + """Sets the ref_rebate_rate of this OptionsContract. + + Referrer commission rate # noqa: E501 + + :param ref_rebate_rate: The ref_rebate_rate of this OptionsContract. # noqa: E501 + :type: str + """ + + self._ref_rebate_rate = ref_rebate_rate + + @property + def orderbook_id(self): + """Gets the orderbook_id of this OptionsContract. # noqa: E501 + + Current orderbook ID # noqa: E501 + + :return: The orderbook_id of this OptionsContract. # noqa: E501 + :rtype: int + """ + return self._orderbook_id + + @orderbook_id.setter + def orderbook_id(self, orderbook_id): + """Sets the orderbook_id of this OptionsContract. + + Current orderbook ID # noqa: E501 + + :param orderbook_id: The orderbook_id of this OptionsContract. # noqa: E501 + :type: int + """ + + self._orderbook_id = orderbook_id + + @property + def trade_id(self): + """Gets the trade_id of this OptionsContract. # noqa: E501 + + Current trade ID # noqa: E501 + + :return: The trade_id of this OptionsContract. # noqa: E501 + :rtype: int + """ + return self._trade_id + + @trade_id.setter + def trade_id(self, trade_id): + """Sets the trade_id of this OptionsContract. + + Current trade ID # noqa: E501 + + :param trade_id: The trade_id of this OptionsContract. # noqa: E501 + :type: int + """ + + self._trade_id = trade_id + + @property + def trade_size(self): + """Gets the trade_size of this OptionsContract. # noqa: E501 + + Historical accumulated trade size # noqa: E501 + + :return: The trade_size of this OptionsContract. # noqa: E501 + :rtype: int + """ + return self._trade_size + + @trade_size.setter + def trade_size(self, trade_size): + """Sets the trade_size of this OptionsContract. + + Historical accumulated trade size # noqa: E501 + + :param trade_size: The trade_size of this OptionsContract. # noqa: E501 + :type: int + """ + + self._trade_size = trade_size + + @property + def position_size(self): + """Gets the position_size of this OptionsContract. # noqa: E501 + + Current total long position size # noqa: E501 + + :return: The position_size of this OptionsContract. # noqa: E501 + :rtype: int + """ + return self._position_size + + @position_size.setter + def position_size(self, position_size): + """Sets the position_size of this OptionsContract. + + Current total long position size # noqa: E501 + + :param position_size: The position_size of this OptionsContract. # noqa: E501 + :type: int + """ + + self._position_size = position_size + + @property + def orders_limit(self): + """Gets the orders_limit of this OptionsContract. # noqa: E501 + + Maximum number of open orders # noqa: E501 + + :return: The orders_limit of this OptionsContract. # noqa: E501 + :rtype: int + """ + return self._orders_limit + + @orders_limit.setter + def orders_limit(self, orders_limit): + """Sets the orders_limit of this OptionsContract. + + Maximum number of open orders # noqa: E501 + + :param orders_limit: The orders_limit of this OptionsContract. # noqa: E501 + :type: int + """ + + self._orders_limit = orders_limit + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsContract): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsContract): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py new file mode 100644 index 0000000..6cace49 --- /dev/null +++ b/gate_api/models/options_mmp.py @@ -0,0 +1,296 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsMMP(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'underlying': 'str', + 'window': 'int', + 'frozen_period': 'int', + 'qty_limit': 'str', + 'delta_limit': 'str', + 'trigger_time_ms': 'int', + 'frozen_until_ms': 'int' + } + + attribute_map = { + 'underlying': 'underlying', + 'window': 'window', + 'frozen_period': 'frozen_period', + 'qty_limit': 'qty_limit', + 'delta_limit': 'delta_limit', + 'trigger_time_ms': 'trigger_time_ms', + 'frozen_until_ms': 'frozen_until_ms' + } + + def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=None, delta_limit=None, trigger_time_ms=None, frozen_until_ms=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, int, str, str, int, int, Configuration) -> None + """OptionsMMP - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._underlying = None + self._window = None + self._frozen_period = None + self._qty_limit = None + self._delta_limit = None + self._trigger_time_ms = None + self._frozen_until_ms = None + self.discriminator = None + + self.underlying = underlying + self.window = window + self.frozen_period = frozen_period + self.qty_limit = qty_limit + self.delta_limit = delta_limit + if trigger_time_ms is not None: + self.trigger_time_ms = trigger_time_ms + if frozen_until_ms is not None: + self.frozen_until_ms = frozen_until_ms + + @property + def underlying(self): + """Gets the underlying of this OptionsMMP. # noqa: E501 + + Underlying # noqa: E501 + + :return: The underlying of this OptionsMMP. # noqa: E501 + :rtype: str + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this OptionsMMP. + + Underlying # noqa: E501 + + :param underlying: The underlying of this OptionsMMP. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and underlying is None: # noqa: E501 + raise ValueError("Invalid value for `underlying`, must not be `None`") # noqa: E501 + + self._underlying = underlying + + @property + def window(self): + """Gets the window of this OptionsMMP. # noqa: E501 + + Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + + :return: The window of this OptionsMMP. # noqa: E501 + :rtype: int + """ + return self._window + + @window.setter + def window(self, window): + """Sets the window of this OptionsMMP. + + Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + + :param window: The window of this OptionsMMP. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and window is None: # noqa: E501 + raise ValueError("Invalid value for `window`, must not be `None`") # noqa: E501 + + self._window = window + + @property + def frozen_period(self): + """Gets the frozen_period of this OptionsMMP. # noqa: E501 + + Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 + + :return: The frozen_period of this OptionsMMP. # noqa: E501 + :rtype: int + """ + return self._frozen_period + + @frozen_period.setter + def frozen_period(self, frozen_period): + """Sets the frozen_period of this OptionsMMP. + + Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 + + :param frozen_period: The frozen_period of this OptionsMMP. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and frozen_period is None: # noqa: E501 + raise ValueError("Invalid value for `frozen_period`, must not be `None`") # noqa: E501 + + self._frozen_period = frozen_period + + @property + def qty_limit(self): + """Gets the qty_limit of this OptionsMMP. # noqa: E501 + + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + + :return: The qty_limit of this OptionsMMP. # noqa: E501 + :rtype: str + """ + return self._qty_limit + + @qty_limit.setter + def qty_limit(self, qty_limit): + """Sets the qty_limit of this OptionsMMP. + + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + + :param qty_limit: The qty_limit of this OptionsMMP. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and qty_limit is None: # noqa: E501 + raise ValueError("Invalid value for `qty_limit`, must not be `None`") # noqa: E501 + + self._qty_limit = qty_limit + + @property + def delta_limit(self): + """Gets the delta_limit of this OptionsMMP. # noqa: E501 + + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + + :return: The delta_limit of this OptionsMMP. # noqa: E501 + :rtype: str + """ + return self._delta_limit + + @delta_limit.setter + def delta_limit(self, delta_limit): + """Sets the delta_limit of this OptionsMMP. + + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + + :param delta_limit: The delta_limit of this OptionsMMP. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and delta_limit is None: # noqa: E501 + raise ValueError("Invalid value for `delta_limit`, must not be `None`") # noqa: E501 + + self._delta_limit = delta_limit + + @property + def trigger_time_ms(self): + """Gets the trigger_time_ms of this OptionsMMP. # noqa: E501 + + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + + :return: The trigger_time_ms of this OptionsMMP. # noqa: E501 + :rtype: int + """ + return self._trigger_time_ms + + @trigger_time_ms.setter + def trigger_time_ms(self, trigger_time_ms): + """Sets the trigger_time_ms of this OptionsMMP. + + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + + :param trigger_time_ms: The trigger_time_ms of this OptionsMMP. # noqa: E501 + :type: int + """ + + self._trigger_time_ms = trigger_time_ms + + @property + def frozen_until_ms(self): + """Gets the frozen_until_ms of this OptionsMMP. # noqa: E501 + + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + + :return: The frozen_until_ms of this OptionsMMP. # noqa: E501 + :rtype: int + """ + return self._frozen_until_ms + + @frozen_until_ms.setter + def frozen_until_ms(self, frozen_until_ms): + """Sets the frozen_until_ms of this OptionsMMP. + + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + + :param frozen_until_ms: The frozen_until_ms of this OptionsMMP. # noqa: E501 + :type: int + """ + + self._frozen_until_ms = frozen_until_ms + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsMMP): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsMMP): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py new file mode 100644 index 0000000..5e3583a --- /dev/null +++ b/gate_api/models/options_mmp_reset.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsMMPReset(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'underlying': 'str', + 'window': 'int', + 'frozen_period': 'int', + 'qty_limit': 'str', + 'delta_limit': 'str', + 'trigger_time_ms': 'int', + 'frozen_until_ms': 'int' + } + + attribute_map = { + 'underlying': 'underlying', + 'window': 'window', + 'frozen_period': 'frozen_period', + 'qty_limit': 'qty_limit', + 'delta_limit': 'delta_limit', + 'trigger_time_ms': 'trigger_time_ms', + 'frozen_until_ms': 'frozen_until_ms' + } + + def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=None, delta_limit=None, trigger_time_ms=None, frozen_until_ms=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, int, str, str, int, int, Configuration) -> None + """OptionsMMPReset - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._underlying = None + self._window = None + self._frozen_period = None + self._qty_limit = None + self._delta_limit = None + self._trigger_time_ms = None + self._frozen_until_ms = None + self.discriminator = None + + self.underlying = underlying + if window is not None: + self.window = window + if frozen_period is not None: + self.frozen_period = frozen_period + if qty_limit is not None: + self.qty_limit = qty_limit + if delta_limit is not None: + self.delta_limit = delta_limit + if trigger_time_ms is not None: + self.trigger_time_ms = trigger_time_ms + if frozen_until_ms is not None: + self.frozen_until_ms = frozen_until_ms + + @property + def underlying(self): + """Gets the underlying of this OptionsMMPReset. # noqa: E501 + + Underlying # noqa: E501 + + :return: The underlying of this OptionsMMPReset. # noqa: E501 + :rtype: str + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this OptionsMMPReset. + + Underlying # noqa: E501 + + :param underlying: The underlying of this OptionsMMPReset. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and underlying is None: # noqa: E501 + raise ValueError("Invalid value for `underlying`, must not be `None`") # noqa: E501 + + self._underlying = underlying + + @property + def window(self): + """Gets the window of this OptionsMMPReset. # noqa: E501 + + Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + + :return: The window of this OptionsMMPReset. # noqa: E501 + :rtype: int + """ + return self._window + + @window.setter + def window(self, window): + """Sets the window of this OptionsMMPReset. + + Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + + :param window: The window of this OptionsMMPReset. # noqa: E501 + :type: int + """ + + self._window = window + + @property + def frozen_period(self): + """Gets the frozen_period of this OptionsMMPReset. # noqa: E501 + + Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 + + :return: The frozen_period of this OptionsMMPReset. # noqa: E501 + :rtype: int + """ + return self._frozen_period + + @frozen_period.setter + def frozen_period(self, frozen_period): + """Sets the frozen_period of this OptionsMMPReset. + + Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze # noqa: E501 + + :param frozen_period: The frozen_period of this OptionsMMPReset. # noqa: E501 + :type: int + """ + + self._frozen_period = frozen_period + + @property + def qty_limit(self): + """Gets the qty_limit of this OptionsMMPReset. # noqa: E501 + + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + + :return: The qty_limit of this OptionsMMPReset. # noqa: E501 + :rtype: str + """ + return self._qty_limit + + @qty_limit.setter + def qty_limit(self, qty_limit): + """Sets the qty_limit of this OptionsMMPReset. + + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + + :param qty_limit: The qty_limit of this OptionsMMPReset. # noqa: E501 + :type: str + """ + + self._qty_limit = qty_limit + + @property + def delta_limit(self): + """Gets the delta_limit of this OptionsMMPReset. # noqa: E501 + + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + + :return: The delta_limit of this OptionsMMPReset. # noqa: E501 + :rtype: str + """ + return self._delta_limit + + @delta_limit.setter + def delta_limit(self, delta_limit): + """Sets the delta_limit of this OptionsMMPReset. + + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + + :param delta_limit: The delta_limit of this OptionsMMPReset. # noqa: E501 + :type: str + """ + + self._delta_limit = delta_limit + + @property + def trigger_time_ms(self): + """Gets the trigger_time_ms of this OptionsMMPReset. # noqa: E501 + + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + + :return: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 + :rtype: int + """ + return self._trigger_time_ms + + @trigger_time_ms.setter + def trigger_time_ms(self, trigger_time_ms): + """Sets the trigger_time_ms of this OptionsMMPReset. + + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + + :param trigger_time_ms: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 + :type: int + """ + + self._trigger_time_ms = trigger_time_ms + + @property + def frozen_until_ms(self): + """Gets the frozen_until_ms of this OptionsMMPReset. # noqa: E501 + + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + + :return: The frozen_until_ms of this OptionsMMPReset. # noqa: E501 + :rtype: int + """ + return self._frozen_until_ms + + @frozen_until_ms.setter + def frozen_until_ms(self, frozen_until_ms): + """Sets the frozen_until_ms of this OptionsMMPReset. + + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + + :param frozen_until_ms: The frozen_until_ms of this OptionsMMPReset. # noqa: E501 + :type: int + """ + + self._frozen_until_ms = frozen_until_ms + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsMMPReset): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsMMPReset): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py new file mode 100644 index 0000000..f1eb838 --- /dev/null +++ b/gate_api/models/options_my_settlements.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsMySettlements(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'float', + 'underlying': 'str', + 'contract': 'str', + 'strike_price': 'str', + 'settle_price': 'str', + 'size': 'int', + 'settle_profit': 'str', + 'fee': 'str', + 'realised_pnl': 'str' + } + + attribute_map = { + 'time': 'time', + 'underlying': 'underlying', + 'contract': 'contract', + 'strike_price': 'strike_price', + 'settle_price': 'settle_price', + 'size': 'size', + 'settle_profit': 'settle_profit', + 'fee': 'fee', + 'realised_pnl': 'realised_pnl' + } + + def __init__(self, time=None, underlying=None, contract=None, strike_price=None, settle_price=None, size=None, settle_profit=None, fee=None, realised_pnl=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, str, str, str, int, str, str, str, Configuration) -> None + """OptionsMySettlements - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._underlying = None + self._contract = None + self._strike_price = None + self._settle_price = None + self._size = None + self._settle_profit = None + self._fee = None + self._realised_pnl = None + self.discriminator = None + + if time is not None: + self.time = time + if underlying is not None: + self.underlying = underlying + if contract is not None: + self.contract = contract + if strike_price is not None: + self.strike_price = strike_price + if settle_price is not None: + self.settle_price = settle_price + if size is not None: + self.size = size + if settle_profit is not None: + self.settle_profit = settle_profit + if fee is not None: + self.fee = fee + if realised_pnl is not None: + self.realised_pnl = realised_pnl + + @property + def time(self): + """Gets the time of this OptionsMySettlements. # noqa: E501 + + Settlement time # noqa: E501 + + :return: The time of this OptionsMySettlements. # noqa: E501 + :rtype: float + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this OptionsMySettlements. + + Settlement time # noqa: E501 + + :param time: The time of this OptionsMySettlements. # noqa: E501 + :type: float + """ + + self._time = time + + @property + def underlying(self): + """Gets the underlying of this OptionsMySettlements. # noqa: E501 + + Underlying # noqa: E501 + + :return: The underlying of this OptionsMySettlements. # noqa: E501 + :rtype: str + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this OptionsMySettlements. + + Underlying # noqa: E501 + + :param underlying: The underlying of this OptionsMySettlements. # noqa: E501 + :type: str + """ + + self._underlying = underlying + + @property + def contract(self): + """Gets the contract of this OptionsMySettlements. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The contract of this OptionsMySettlements. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this OptionsMySettlements. + + Options contract name # noqa: E501 + + :param contract: The contract of this OptionsMySettlements. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def strike_price(self): + """Gets the strike_price of this OptionsMySettlements. # noqa: E501 + + Strike price (quote currency) # noqa: E501 + + :return: The strike_price of this OptionsMySettlements. # noqa: E501 + :rtype: str + """ + return self._strike_price + + @strike_price.setter + def strike_price(self, strike_price): + """Sets the strike_price of this OptionsMySettlements. + + Strike price (quote currency) # noqa: E501 + + :param strike_price: The strike_price of this OptionsMySettlements. # noqa: E501 + :type: str + """ + + self._strike_price = strike_price + + @property + def settle_price(self): + """Gets the settle_price of this OptionsMySettlements. # noqa: E501 + + Settlement price (quote currency) # noqa: E501 + + :return: The settle_price of this OptionsMySettlements. # noqa: E501 + :rtype: str + """ + return self._settle_price + + @settle_price.setter + def settle_price(self, settle_price): + """Sets the settle_price of this OptionsMySettlements. + + Settlement price (quote currency) # noqa: E501 + + :param settle_price: The settle_price of this OptionsMySettlements. # noqa: E501 + :type: str + """ + + self._settle_price = settle_price + + @property + def size(self): + """Gets the size of this OptionsMySettlements. # noqa: E501 + + Size # noqa: E501 + + :return: The size of this OptionsMySettlements. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this OptionsMySettlements. + + Size # noqa: E501 + + :param size: The size of this OptionsMySettlements. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def settle_profit(self): + """Gets the settle_profit of this OptionsMySettlements. # noqa: E501 + + Settlement profit (quote currency) # noqa: E501 + + :return: The settle_profit of this OptionsMySettlements. # noqa: E501 + :rtype: str + """ + return self._settle_profit + + @settle_profit.setter + def settle_profit(self, settle_profit): + """Sets the settle_profit of this OptionsMySettlements. + + Settlement profit (quote currency) # noqa: E501 + + :param settle_profit: The settle_profit of this OptionsMySettlements. # noqa: E501 + :type: str + """ + + self._settle_profit = settle_profit + + @property + def fee(self): + """Gets the fee of this OptionsMySettlements. # noqa: E501 + + Fee (quote currency) # noqa: E501 + + :return: The fee of this OptionsMySettlements. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this OptionsMySettlements. + + Fee (quote currency) # noqa: E501 + + :param fee: The fee of this OptionsMySettlements. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def realised_pnl(self): + """Gets the realised_pnl of this OptionsMySettlements. # noqa: E501 + + The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501 + + :return: The realised_pnl of this OptionsMySettlements. # noqa: E501 + :rtype: str + """ + return self._realised_pnl + + @realised_pnl.setter + def realised_pnl(self, realised_pnl): + """Sets the realised_pnl of this OptionsMySettlements. + + The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501 + + :param realised_pnl: The realised_pnl of this OptionsMySettlements. # noqa: E501 + :type: str + """ + + self._realised_pnl = realised_pnl + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsMySettlements): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsMySettlements): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py new file mode 100644 index 0000000..1da411f --- /dev/null +++ b/gate_api/models/options_my_trade.py @@ -0,0 +1,325 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsMyTrade(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'create_time': 'float', + 'contract': 'str', + 'order_id': 'int', + 'size': 'int', + 'price': 'str', + 'underlying_price': 'str', + 'role': 'str' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'create_time', + 'contract': 'contract', + 'order_id': 'order_id', + 'size': 'size', + 'price': 'price', + 'underlying_price': 'underlying_price', + 'role': 'role' + } + + def __init__(self, id=None, create_time=None, contract=None, order_id=None, size=None, price=None, underlying_price=None, role=None, local_vars_configuration=None): # noqa: E501 + # type: (int, float, str, int, int, str, str, str, Configuration) -> None + """OptionsMyTrade - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._create_time = None + self._contract = None + self._order_id = None + self._size = None + self._price = None + self._underlying_price = None + self._role = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if contract is not None: + self.contract = contract + if order_id is not None: + self.order_id = order_id + if size is not None: + self.size = size + if price is not None: + self.price = price + if underlying_price is not None: + self.underlying_price = underlying_price + if role is not None: + self.role = role + + @property + def id(self): + """Gets the id of this OptionsMyTrade. # noqa: E501 + + Trade ID # noqa: E501 + + :return: The id of this OptionsMyTrade. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OptionsMyTrade. + + Trade ID # noqa: E501 + + :param id: The id of this OptionsMyTrade. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this OptionsMyTrade. # noqa: E501 + + Trading time # noqa: E501 + + :return: The create_time of this OptionsMyTrade. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this OptionsMyTrade. + + Trading time # noqa: E501 + + :param create_time: The create_time of this OptionsMyTrade. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def contract(self): + """Gets the contract of this OptionsMyTrade. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The contract of this OptionsMyTrade. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this OptionsMyTrade. + + Options contract name # noqa: E501 + + :param contract: The contract of this OptionsMyTrade. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def order_id(self): + """Gets the order_id of this OptionsMyTrade. # noqa: E501 + + Order ID related # noqa: E501 + + :return: The order_id of this OptionsMyTrade. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this OptionsMyTrade. + + Order ID related # noqa: E501 + + :param order_id: The order_id of this OptionsMyTrade. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def size(self): + """Gets the size of this OptionsMyTrade. # noqa: E501 + + Trading size # noqa: E501 + + :return: The size of this OptionsMyTrade. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this OptionsMyTrade. + + Trading size # noqa: E501 + + :param size: The size of this OptionsMyTrade. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def price(self): + """Gets the price of this OptionsMyTrade. # noqa: E501 + + Trading price (quote currency) # noqa: E501 + + :return: The price of this OptionsMyTrade. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OptionsMyTrade. + + Trading price (quote currency) # noqa: E501 + + :param price: The price of this OptionsMyTrade. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def underlying_price(self): + """Gets the underlying_price of this OptionsMyTrade. # noqa: E501 + + Underlying price (quote currency) # noqa: E501 + + :return: The underlying_price of this OptionsMyTrade. # noqa: E501 + :rtype: str + """ + return self._underlying_price + + @underlying_price.setter + def underlying_price(self, underlying_price): + """Sets the underlying_price of this OptionsMyTrade. + + Underlying price (quote currency) # noqa: E501 + + :param underlying_price: The underlying_price of this OptionsMyTrade. # noqa: E501 + :type: str + """ + + self._underlying_price = underlying_price + + @property + def role(self): + """Gets the role of this OptionsMyTrade. # noqa: E501 + + Trade role. Available values are `taker` and `maker` # noqa: E501 + + :return: The role of this OptionsMyTrade. # noqa: E501 + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this OptionsMyTrade. + + Trade role. Available values are `taker` and `maker` # noqa: E501 + + :param role: The role of this OptionsMyTrade. # noqa: E501 + :type: str + """ + allowed_values = ["taker", "maker"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 + .format(role, allowed_values) + ) + + self._role = role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsMyTrade): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsMyTrade): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py new file mode 100644 index 0000000..d3306f3 --- /dev/null +++ b/gate_api/models/options_order.py @@ -0,0 +1,815 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'user': 'int', + 'create_time': 'float', + 'finish_time': 'float', + 'finish_as': 'str', + 'status': 'str', + 'contract': 'str', + 'size': 'int', + 'iceberg': 'int', + 'price': 'str', + 'close': 'bool', + 'is_close': 'bool', + 'reduce_only': 'bool', + 'is_reduce_only': 'bool', + 'is_liq': 'bool', + 'mmp': 'bool', + 'is_mmp': 'bool', + 'tif': 'str', + 'left': 'int', + 'fill_price': 'str', + 'text': 'str', + 'tkfr': 'str', + 'mkfr': 'str', + 'refu': 'int', + 'refr': 'str' + } + + attribute_map = { + 'id': 'id', + 'user': 'user', + 'create_time': 'create_time', + 'finish_time': 'finish_time', + 'finish_as': 'finish_as', + 'status': 'status', + 'contract': 'contract', + 'size': 'size', + 'iceberg': 'iceberg', + 'price': 'price', + 'close': 'close', + 'is_close': 'is_close', + 'reduce_only': 'reduce_only', + 'is_reduce_only': 'is_reduce_only', + 'is_liq': 'is_liq', + 'mmp': 'mmp', + 'is_mmp': 'is_mmp', + 'tif': 'tif', + 'left': 'left', + 'fill_price': 'fill_price', + 'text': 'text', + 'tkfr': 'tkfr', + 'mkfr': 'mkfr', + 'refu': 'refu', + 'refr': 'refr' + } + + def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, mmp=False, is_mmp=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, refr=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, Configuration) -> None + """OptionsOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user = None + self._create_time = None + self._finish_time = None + self._finish_as = None + self._status = None + self._contract = None + self._size = None + self._iceberg = None + self._price = None + self._close = None + self._is_close = None + self._reduce_only = None + self._is_reduce_only = None + self._is_liq = None + self._mmp = None + self._is_mmp = None + self._tif = None + self._left = None + self._fill_price = None + self._text = None + self._tkfr = None + self._mkfr = None + self._refu = None + self._refr = None + self.discriminator = None + + if id is not None: + self.id = id + if user is not None: + self.user = user + if create_time is not None: + self.create_time = create_time + if finish_time is not None: + self.finish_time = finish_time + if finish_as is not None: + self.finish_as = finish_as + if status is not None: + self.status = status + self.contract = contract + self.size = size + if iceberg is not None: + self.iceberg = iceberg + if price is not None: + self.price = price + if close is not None: + self.close = close + if is_close is not None: + self.is_close = is_close + if reduce_only is not None: + self.reduce_only = reduce_only + if is_reduce_only is not None: + self.is_reduce_only = is_reduce_only + if is_liq is not None: + self.is_liq = is_liq + if mmp is not None: + self.mmp = mmp + if is_mmp is not None: + self.is_mmp = is_mmp + if tif is not None: + self.tif = tif + if left is not None: + self.left = left + if fill_price is not None: + self.fill_price = fill_price + if text is not None: + self.text = text + if tkfr is not None: + self.tkfr = tkfr + if mkfr is not None: + self.mkfr = mkfr + if refu is not None: + self.refu = refu + if refr is not None: + self.refr = refr + + @property + def id(self): + """Gets the id of this OptionsOrder. # noqa: E501 + + Options order ID # noqa: E501 + + :return: The id of this OptionsOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OptionsOrder. + + Options order ID # noqa: E501 + + :param id: The id of this OptionsOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user(self): + """Gets the user of this OptionsOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this OptionsOrder. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this OptionsOrder. + + User ID # noqa: E501 + + :param user: The user of this OptionsOrder. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def create_time(self): + """Gets the create_time of this OptionsOrder. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The create_time of this OptionsOrder. # noqa: E501 + :rtype: float + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this OptionsOrder. + + Creation time of order # noqa: E501 + + :param create_time: The create_time of this OptionsOrder. # noqa: E501 + :type: float + """ + + self._create_time = create_time + + @property + def finish_time(self): + """Gets the finish_time of this OptionsOrder. # noqa: E501 + + Order finished time. Not returned if order is open # noqa: E501 + + :return: The finish_time of this OptionsOrder. # noqa: E501 + :rtype: float + """ + return self._finish_time + + @finish_time.setter + def finish_time(self, finish_time): + """Sets the finish_time of this OptionsOrder. + + Order finished time. Not returned if order is open # noqa: E501 + + :param finish_time: The finish_time of this OptionsOrder. # noqa: E501 + :type: float + """ + + self._finish_time = finish_time + + @property + def finish_as(self): + """Gets the finish_as of this OptionsOrder. # noqa: E501 + + Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 + + :return: The finish_as of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this OptionsOrder. + + Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 + + :param finish_as: The finish_as of this OptionsOrder. # noqa: E501 + :type: str + """ + allowed_values = ["filled", "cancelled", "liquidated", "ioc", "auto_deleveraged", "reduce_only", "position_closed", "reduce_out", "mmp_cancelled"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + @property + def status(self): + """Gets the status of this OptionsOrder. # noqa: E501 + + Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + + :return: The status of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this OptionsOrder. + + Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + + :param status: The status of this OptionsOrder. # noqa: E501 + :type: str + """ + allowed_values = ["open", "finished"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def contract(self): + """Gets the contract of this OptionsOrder. # noqa: E501 + + Contract name # noqa: E501 + + :return: The contract of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this OptionsOrder. + + Contract name # noqa: E501 + + :param contract: The contract of this OptionsOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 + raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 + + self._contract = contract + + @property + def size(self): + """Gets the size of this OptionsOrder. # noqa: E501 + + Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + + :return: The size of this OptionsOrder. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this OptionsOrder. + + Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + + :param size: The size of this OptionsOrder. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + @property + def iceberg(self): + """Gets the iceberg of this OptionsOrder. # noqa: E501 + + Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + + :return: The iceberg of this OptionsOrder. # noqa: E501 + :rtype: int + """ + return self._iceberg + + @iceberg.setter + def iceberg(self, iceberg): + """Sets the iceberg of this OptionsOrder. + + Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + + :param iceberg: The iceberg of this OptionsOrder. # noqa: E501 + :type: int + """ + + self._iceberg = iceberg + + @property + def price(self): + """Gets the price of this OptionsOrder. # noqa: E501 + + Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501 + + :return: The price of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OptionsOrder. + + Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501 + + :param price: The price of this OptionsOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def close(self): + """Gets the close of this OptionsOrder. # noqa: E501 + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :return: The close of this OptionsOrder. # noqa: E501 + :rtype: bool + """ + return self._close + + @close.setter + def close(self, close): + """Sets the close of this OptionsOrder. + + Set as `true` to close the position, with `size` set to 0 # noqa: E501 + + :param close: The close of this OptionsOrder. # noqa: E501 + :type: bool + """ + + self._close = close + + @property + def is_close(self): + """Gets the is_close of this OptionsOrder. # noqa: E501 + + Is the order to close position # noqa: E501 + + :return: The is_close of this OptionsOrder. # noqa: E501 + :rtype: bool + """ + return self._is_close + + @is_close.setter + def is_close(self, is_close): + """Sets the is_close of this OptionsOrder. + + Is the order to close position # noqa: E501 + + :param is_close: The is_close of this OptionsOrder. # noqa: E501 + :type: bool + """ + + self._is_close = is_close + + @property + def reduce_only(self): + """Gets the reduce_only of this OptionsOrder. # noqa: E501 + + Set as `true` to be reduce-only order # noqa: E501 + + :return: The reduce_only of this OptionsOrder. # noqa: E501 + :rtype: bool + """ + return self._reduce_only + + @reduce_only.setter + def reduce_only(self, reduce_only): + """Sets the reduce_only of this OptionsOrder. + + Set as `true` to be reduce-only order # noqa: E501 + + :param reduce_only: The reduce_only of this OptionsOrder. # noqa: E501 + :type: bool + """ + + self._reduce_only = reduce_only + + @property + def is_reduce_only(self): + """Gets the is_reduce_only of this OptionsOrder. # noqa: E501 + + Is the order reduce-only # noqa: E501 + + :return: The is_reduce_only of this OptionsOrder. # noqa: E501 + :rtype: bool + """ + return self._is_reduce_only + + @is_reduce_only.setter + def is_reduce_only(self, is_reduce_only): + """Sets the is_reduce_only of this OptionsOrder. + + Is the order reduce-only # noqa: E501 + + :param is_reduce_only: The is_reduce_only of this OptionsOrder. # noqa: E501 + :type: bool + """ + + self._is_reduce_only = is_reduce_only + + @property + def is_liq(self): + """Gets the is_liq of this OptionsOrder. # noqa: E501 + + Is the order for liquidation # noqa: E501 + + :return: The is_liq of this OptionsOrder. # noqa: E501 + :rtype: bool + """ + return self._is_liq + + @is_liq.setter + def is_liq(self, is_liq): + """Sets the is_liq of this OptionsOrder. + + Is the order for liquidation # noqa: E501 + + :param is_liq: The is_liq of this OptionsOrder. # noqa: E501 + :type: bool + """ + + self._is_liq = is_liq + + @property + def mmp(self): + """Gets the mmp of this OptionsOrder. # noqa: E501 + + When set to true, delegate to MMP # noqa: E501 + + :return: The mmp of this OptionsOrder. # noqa: E501 + :rtype: bool + """ + return self._mmp + + @mmp.setter + def mmp(self, mmp): + """Sets the mmp of this OptionsOrder. + + When set to true, delegate to MMP # noqa: E501 + + :param mmp: The mmp of this OptionsOrder. # noqa: E501 + :type: bool + """ + + self._mmp = mmp + + @property + def is_mmp(self): + """Gets the is_mmp of this OptionsOrder. # noqa: E501 + + Whether it is MMP delegation. Corresponds to `mmp` in the request. # noqa: E501 + + :return: The is_mmp of this OptionsOrder. # noqa: E501 + :rtype: bool + """ + return self._is_mmp + + @is_mmp.setter + def is_mmp(self, is_mmp): + """Sets the is_mmp of this OptionsOrder. + + Whether it is MMP delegation. Corresponds to `mmp` in the request. # noqa: E501 + + :param is_mmp: The is_mmp of this OptionsOrder. # noqa: E501 + :type: bool + """ + + self._is_mmp = is_mmp + + @property + def tif(self): + """Gets the tif of this OptionsOrder. # noqa: E501 + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501 + + :return: The tif of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._tif + + @tif.setter + def tif(self, tif): + """Sets the tif of this OptionsOrder. + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501 + + :param tif: The tif of this OptionsOrder. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc", "poc"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and tif not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `tif` ({0}), must be one of {1}" # noqa: E501 + .format(tif, allowed_values) + ) + + self._tif = tif + + @property + def left(self): + """Gets the left of this OptionsOrder. # noqa: E501 + + Size left to be traded # noqa: E501 + + :return: The left of this OptionsOrder. # noqa: E501 + :rtype: int + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this OptionsOrder. + + Size left to be traded # noqa: E501 + + :param left: The left of this OptionsOrder. # noqa: E501 + :type: int + """ + + self._left = left + + @property + def fill_price(self): + """Gets the fill_price of this OptionsOrder. # noqa: E501 + + Fill price of the order # noqa: E501 + + :return: The fill_price of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this OptionsOrder. + + Fill price of the order # noqa: E501 + + :param fill_price: The fill_price of this OptionsOrder. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def text(self): + """Gets the text of this OptionsOrder. # noqa: E501 + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 + + :return: The text of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this OptionsOrder. + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance # noqa: E501 + + :param text: The text of this OptionsOrder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def tkfr(self): + """Gets the tkfr of this OptionsOrder. # noqa: E501 + + Taker fee # noqa: E501 + + :return: The tkfr of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._tkfr + + @tkfr.setter + def tkfr(self, tkfr): + """Sets the tkfr of this OptionsOrder. + + Taker fee # noqa: E501 + + :param tkfr: The tkfr of this OptionsOrder. # noqa: E501 + :type: str + """ + + self._tkfr = tkfr + + @property + def mkfr(self): + """Gets the mkfr of this OptionsOrder. # noqa: E501 + + Maker fee # noqa: E501 + + :return: The mkfr of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._mkfr + + @mkfr.setter + def mkfr(self, mkfr): + """Sets the mkfr of this OptionsOrder. + + Maker fee # noqa: E501 + + :param mkfr: The mkfr of this OptionsOrder. # noqa: E501 + :type: str + """ + + self._mkfr = mkfr + + @property + def refu(self): + """Gets the refu of this OptionsOrder. # noqa: E501 + + Reference user ID # noqa: E501 + + :return: The refu of this OptionsOrder. # noqa: E501 + :rtype: int + """ + return self._refu + + @refu.setter + def refu(self, refu): + """Sets the refu of this OptionsOrder. + + Reference user ID # noqa: E501 + + :param refu: The refu of this OptionsOrder. # noqa: E501 + :type: int + """ + + self._refu = refu + + @property + def refr(self): + """Gets the refr of this OptionsOrder. # noqa: E501 + + Referrer rebate # noqa: E501 + + :return: The refr of this OptionsOrder. # noqa: E501 + :rtype: str + """ + return self._refr + + @refr.setter + def refr(self, refr): + """Sets the refr of this OptionsOrder. + + Referrer rebate # noqa: E501 + + :param refr: The refr of this OptionsOrder. # noqa: E501 + :type: str + """ + + self._refr = refr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py new file mode 100644 index 0000000..b1465be --- /dev/null +++ b/gate_api/models/options_position.py @@ -0,0 +1,540 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsPosition(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'int', + 'underlying': 'str', + 'underlying_price': 'str', + 'contract': 'str', + 'size': 'int', + 'entry_price': 'str', + 'mark_price': 'str', + 'mark_iv': 'str', + 'realised_pnl': 'str', + 'unrealised_pnl': 'str', + 'pending_orders': 'int', + 'close_order': 'OptionsPositionCloseOrder', + 'delta': 'str', + 'gamma': 'str', + 'vega': 'str', + 'theta': 'str' + } + + attribute_map = { + 'user': 'user', + 'underlying': 'underlying', + 'underlying_price': 'underlying_price', + 'contract': 'contract', + 'size': 'size', + 'entry_price': 'entry_price', + 'mark_price': 'mark_price', + 'mark_iv': 'mark_iv', + 'realised_pnl': 'realised_pnl', + 'unrealised_pnl': 'unrealised_pnl', + 'pending_orders': 'pending_orders', + 'close_order': 'close_order', + 'delta': 'delta', + 'gamma': 'gamma', + 'vega': 'vega', + 'theta': 'theta' + } + + def __init__(self, user=None, underlying=None, underlying_price=None, contract=None, size=None, entry_price=None, mark_price=None, mark_iv=None, realised_pnl=None, unrealised_pnl=None, pending_orders=None, close_order=None, delta=None, gamma=None, vega=None, theta=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, int, str, str, str, str, str, int, OptionsPositionCloseOrder, str, str, str, str, Configuration) -> None + """OptionsPosition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user = None + self._underlying = None + self._underlying_price = None + self._contract = None + self._size = None + self._entry_price = None + self._mark_price = None + self._mark_iv = None + self._realised_pnl = None + self._unrealised_pnl = None + self._pending_orders = None + self._close_order = None + self._delta = None + self._gamma = None + self._vega = None + self._theta = None + self.discriminator = None + + if user is not None: + self.user = user + if underlying is not None: + self.underlying = underlying + if underlying_price is not None: + self.underlying_price = underlying_price + if contract is not None: + self.contract = contract + if size is not None: + self.size = size + if entry_price is not None: + self.entry_price = entry_price + if mark_price is not None: + self.mark_price = mark_price + if mark_iv is not None: + self.mark_iv = mark_iv + if realised_pnl is not None: + self.realised_pnl = realised_pnl + if unrealised_pnl is not None: + self.unrealised_pnl = unrealised_pnl + if pending_orders is not None: + self.pending_orders = pending_orders + self.close_order = close_order + if delta is not None: + self.delta = delta + if gamma is not None: + self.gamma = gamma + if vega is not None: + self.vega = vega + if theta is not None: + self.theta = theta + + @property + def user(self): + """Gets the user of this OptionsPosition. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this OptionsPosition. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this OptionsPosition. + + User ID # noqa: E501 + + :param user: The user of this OptionsPosition. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def underlying(self): + """Gets the underlying of this OptionsPosition. # noqa: E501 + + Underlying # noqa: E501 + + :return: The underlying of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this OptionsPosition. + + Underlying # noqa: E501 + + :param underlying: The underlying of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._underlying = underlying + + @property + def underlying_price(self): + """Gets the underlying_price of this OptionsPosition. # noqa: E501 + + Underlying price (quote currency) # noqa: E501 + + :return: The underlying_price of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._underlying_price + + @underlying_price.setter + def underlying_price(self, underlying_price): + """Sets the underlying_price of this OptionsPosition. + + Underlying price (quote currency) # noqa: E501 + + :param underlying_price: The underlying_price of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._underlying_price = underlying_price + + @property + def contract(self): + """Gets the contract of this OptionsPosition. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The contract of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this OptionsPosition. + + Options contract name # noqa: E501 + + :param contract: The contract of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def size(self): + """Gets the size of this OptionsPosition. # noqa: E501 + + Position size (contract size) # noqa: E501 + + :return: The size of this OptionsPosition. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this OptionsPosition. + + Position size (contract size) # noqa: E501 + + :param size: The size of this OptionsPosition. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def entry_price(self): + """Gets the entry_price of this OptionsPosition. # noqa: E501 + + Entry size (quote currency) # noqa: E501 + + :return: The entry_price of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._entry_price + + @entry_price.setter + def entry_price(self, entry_price): + """Sets the entry_price of this OptionsPosition. + + Entry size (quote currency) # noqa: E501 + + :param entry_price: The entry_price of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._entry_price = entry_price + + @property + def mark_price(self): + """Gets the mark_price of this OptionsPosition. # noqa: E501 + + Current mark price (quote currency) # noqa: E501 + + :return: The mark_price of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this OptionsPosition. + + Current mark price (quote currency) # noqa: E501 + + :param mark_price: The mark_price of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def mark_iv(self): + """Gets the mark_iv of this OptionsPosition. # noqa: E501 + + Implied volatility # noqa: E501 + + :return: The mark_iv of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._mark_iv + + @mark_iv.setter + def mark_iv(self, mark_iv): + """Sets the mark_iv of this OptionsPosition. + + Implied volatility # noqa: E501 + + :param mark_iv: The mark_iv of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._mark_iv = mark_iv + + @property + def realised_pnl(self): + """Gets the realised_pnl of this OptionsPosition. # noqa: E501 + + Realized PNL # noqa: E501 + + :return: The realised_pnl of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._realised_pnl + + @realised_pnl.setter + def realised_pnl(self, realised_pnl): + """Sets the realised_pnl of this OptionsPosition. + + Realized PNL # noqa: E501 + + :param realised_pnl: The realised_pnl of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._realised_pnl = realised_pnl + + @property + def unrealised_pnl(self): + """Gets the unrealised_pnl of this OptionsPosition. # noqa: E501 + + Unrealized PNL # noqa: E501 + + :return: The unrealised_pnl of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._unrealised_pnl + + @unrealised_pnl.setter + def unrealised_pnl(self, unrealised_pnl): + """Sets the unrealised_pnl of this OptionsPosition. + + Unrealized PNL # noqa: E501 + + :param unrealised_pnl: The unrealised_pnl of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._unrealised_pnl = unrealised_pnl + + @property + def pending_orders(self): + """Gets the pending_orders of this OptionsPosition. # noqa: E501 + + Current open orders # noqa: E501 + + :return: The pending_orders of this OptionsPosition. # noqa: E501 + :rtype: int + """ + return self._pending_orders + + @pending_orders.setter + def pending_orders(self, pending_orders): + """Sets the pending_orders of this OptionsPosition. + + Current open orders # noqa: E501 + + :param pending_orders: The pending_orders of this OptionsPosition. # noqa: E501 + :type: int + """ + + self._pending_orders = pending_orders + + @property + def close_order(self): + """Gets the close_order of this OptionsPosition. # noqa: E501 + + + :return: The close_order of this OptionsPosition. # noqa: E501 + :rtype: OptionsPositionCloseOrder + """ + return self._close_order + + @close_order.setter + def close_order(self, close_order): + """Sets the close_order of this OptionsPosition. + + + :param close_order: The close_order of this OptionsPosition. # noqa: E501 + :type: OptionsPositionCloseOrder + """ + + self._close_order = close_order + + @property + def delta(self): + """Gets the delta of this OptionsPosition. # noqa: E501 + + Delta # noqa: E501 + + :return: The delta of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._delta + + @delta.setter + def delta(self, delta): + """Sets the delta of this OptionsPosition. + + Delta # noqa: E501 + + :param delta: The delta of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._delta = delta + + @property + def gamma(self): + """Gets the gamma of this OptionsPosition. # noqa: E501 + + Gamma # noqa: E501 + + :return: The gamma of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._gamma + + @gamma.setter + def gamma(self, gamma): + """Sets the gamma of this OptionsPosition. + + Gamma # noqa: E501 + + :param gamma: The gamma of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._gamma = gamma + + @property + def vega(self): + """Gets the vega of this OptionsPosition. # noqa: E501 + + Vega # noqa: E501 + + :return: The vega of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._vega + + @vega.setter + def vega(self, vega): + """Sets the vega of this OptionsPosition. + + Vega # noqa: E501 + + :param vega: The vega of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._vega = vega + + @property + def theta(self): + """Gets the theta of this OptionsPosition. # noqa: E501 + + Theta # noqa: E501 + + :return: The theta of this OptionsPosition. # noqa: E501 + :rtype: str + """ + return self._theta + + @theta.setter + def theta(self, theta): + """Sets the theta of this OptionsPosition. + + Theta # noqa: E501 + + :param theta: The theta of this OptionsPosition. # noqa: E501 + :type: str + """ + + self._theta = theta + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsPosition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsPosition): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py new file mode 100644 index 0000000..be9d2eb --- /dev/null +++ b/gate_api/models/options_position_close.py @@ -0,0 +1,269 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsPositionClose(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'float', + 'contract': 'str', + 'side': 'str', + 'pnl': 'str', + 'text': 'str', + 'settle_size': 'str' + } + + attribute_map = { + 'time': 'time', + 'contract': 'contract', + 'side': 'side', + 'pnl': 'pnl', + 'text': 'text', + 'settle_size': 'settle_size' + } + + def __init__(self, time=None, contract=None, side=None, pnl=None, text=None, settle_size=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, str, str, str, str, Configuration) -> None + """OptionsPositionClose - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._contract = None + self._side = None + self._pnl = None + self._text = None + self._settle_size = None + self.discriminator = None + + if time is not None: + self.time = time + if contract is not None: + self.contract = contract + if side is not None: + self.side = side + if pnl is not None: + self.pnl = pnl + if text is not None: + self.text = text + if settle_size is not None: + self.settle_size = settle_size + + @property + def time(self): + """Gets the time of this OptionsPositionClose. # noqa: E501 + + Position close time # noqa: E501 + + :return: The time of this OptionsPositionClose. # noqa: E501 + :rtype: float + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this OptionsPositionClose. + + Position close time # noqa: E501 + + :param time: The time of this OptionsPositionClose. # noqa: E501 + :type: float + """ + + self._time = time + + @property + def contract(self): + """Gets the contract of this OptionsPositionClose. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The contract of this OptionsPositionClose. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this OptionsPositionClose. + + Options contract name # noqa: E501 + + :param contract: The contract of this OptionsPositionClose. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def side(self): + """Gets the side of this OptionsPositionClose. # noqa: E501 + + Position side, long or short # noqa: E501 + + :return: The side of this OptionsPositionClose. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this OptionsPositionClose. + + Position side, long or short # noqa: E501 + + :param side: The side of this OptionsPositionClose. # noqa: E501 + :type: str + """ + allowed_values = ["long", "short"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501 + .format(side, allowed_values) + ) + + self._side = side + + @property + def pnl(self): + """Gets the pnl of this OptionsPositionClose. # noqa: E501 + + PNL # noqa: E501 + + :return: The pnl of this OptionsPositionClose. # noqa: E501 + :rtype: str + """ + return self._pnl + + @pnl.setter + def pnl(self, pnl): + """Sets the pnl of this OptionsPositionClose. + + PNL # noqa: E501 + + :param pnl: The pnl of this OptionsPositionClose. # noqa: E501 + :type: str + """ + + self._pnl = pnl + + @property + def text(self): + """Gets the text of this OptionsPositionClose. # noqa: E501 + + Text of close order # noqa: E501 + + :return: The text of this OptionsPositionClose. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this OptionsPositionClose. + + Text of close order # noqa: E501 + + :param text: The text of this OptionsPositionClose. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def settle_size(self): + """Gets the settle_size of this OptionsPositionClose. # noqa: E501 + + settlement size # noqa: E501 + + :return: The settle_size of this OptionsPositionClose. # noqa: E501 + :rtype: str + """ + return self._settle_size + + @settle_size.setter + def settle_size(self, settle_size): + """Sets the settle_size of this OptionsPositionClose. + + settlement size # noqa: E501 + + :param settle_size: The settle_size of this OptionsPositionClose. # noqa: E501 + :type: str + """ + + self._settle_size = settle_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsPositionClose): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsPositionClose): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py new file mode 100644 index 0000000..01f5dc7 --- /dev/null +++ b/gate_api/models/options_position_close_order.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsPositionCloseOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'price': 'str', + 'is_liq': 'bool' + } + + attribute_map = { + 'id': 'id', + 'price': 'price', + 'is_liq': 'is_liq' + } + + def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, bool, Configuration) -> None + """OptionsPositionCloseOrder - a 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._price = None + self._is_liq = None + self.discriminator = None + + if id is not None: + self.id = id + if price is not None: + self.price = price + if is_liq is not None: + self.is_liq = is_liq + + @property + def id(self): + """Gets the id of this OptionsPositionCloseOrder. # noqa: E501 + + Close order ID # noqa: E501 + + :return: The id of this OptionsPositionCloseOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OptionsPositionCloseOrder. + + Close order ID # noqa: E501 + + :param id: The id of this OptionsPositionCloseOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def price(self): + """Gets the price of this OptionsPositionCloseOrder. # noqa: E501 + + Close order price (quote currency) # noqa: E501 + + :return: The price of this OptionsPositionCloseOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OptionsPositionCloseOrder. + + Close order price (quote currency) # noqa: E501 + + :param price: The price of this OptionsPositionCloseOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def is_liq(self): + """Gets the is_liq of this OptionsPositionCloseOrder. # noqa: E501 + + Is the close order from liquidation # noqa: E501 + + :return: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 + :rtype: bool + """ + return self._is_liq + + @is_liq.setter + def is_liq(self, is_liq): + """Sets the is_liq of this OptionsPositionCloseOrder. + + Is the close order from liquidation # noqa: E501 + + :param is_liq: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 + :type: bool + """ + + self._is_liq = is_liq + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsPositionCloseOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsPositionCloseOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py new file mode 100644 index 0000000..c82e5d6 --- /dev/null +++ b/gate_api/models/options_settlement.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsSettlement(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'float', + 'contract': 'str', + 'profit': 'str', + 'fee': 'str', + 'strike_price': 'str', + 'settle_price': 'str' + } + + attribute_map = { + 'time': 'time', + 'contract': 'contract', + 'profit': 'profit', + 'fee': 'fee', + 'strike_price': 'strike_price', + 'settle_price': 'settle_price' + } + + def __init__(self, time=None, contract=None, profit=None, fee=None, strike_price=None, settle_price=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, str, str, str, str, Configuration) -> None + """OptionsSettlement - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._contract = None + self._profit = None + self._fee = None + self._strike_price = None + self._settle_price = None + self.discriminator = None + + if time is not None: + self.time = time + if contract is not None: + self.contract = contract + if profit is not None: + self.profit = profit + if fee is not None: + self.fee = fee + if strike_price is not None: + self.strike_price = strike_price + if settle_price is not None: + self.settle_price = settle_price + + @property + def time(self): + """Gets the time of this OptionsSettlement. # noqa: E501 + + Last changed time of configuration # noqa: E501 + + :return: The time of this OptionsSettlement. # noqa: E501 + :rtype: float + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this OptionsSettlement. + + Last changed time of configuration # noqa: E501 + + :param time: The time of this OptionsSettlement. # noqa: E501 + :type: float + """ + + self._time = time + + @property + def contract(self): + """Gets the contract of this OptionsSettlement. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The contract of this OptionsSettlement. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this OptionsSettlement. + + Options contract name # noqa: E501 + + :param contract: The contract of this OptionsSettlement. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def profit(self): + """Gets the profit of this OptionsSettlement. # noqa: E501 + + Settlement profit per size (quote currency) # noqa: E501 + + :return: The profit of this OptionsSettlement. # noqa: E501 + :rtype: str + """ + return self._profit + + @profit.setter + def profit(self, profit): + """Sets the profit of this OptionsSettlement. + + Settlement profit per size (quote currency) # noqa: E501 + + :param profit: The profit of this OptionsSettlement. # noqa: E501 + :type: str + """ + + self._profit = profit + + @property + def fee(self): + """Gets the fee of this OptionsSettlement. # noqa: E501 + + Settlement fee per size (quote currency) # noqa: E501 + + :return: The fee of this OptionsSettlement. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this OptionsSettlement. + + Settlement fee per size (quote currency) # noqa: E501 + + :param fee: The fee of this OptionsSettlement. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def strike_price(self): + """Gets the strike_price of this OptionsSettlement. # noqa: E501 + + Strike price (quote currency) # noqa: E501 + + :return: The strike_price of this OptionsSettlement. # noqa: E501 + :rtype: str + """ + return self._strike_price + + @strike_price.setter + def strike_price(self, strike_price): + """Sets the strike_price of this OptionsSettlement. + + Strike price (quote currency) # noqa: E501 + + :param strike_price: The strike_price of this OptionsSettlement. # noqa: E501 + :type: str + """ + + self._strike_price = strike_price + + @property + def settle_price(self): + """Gets the settle_price of this OptionsSettlement. # noqa: E501 + + Settlement price (quote currency) # noqa: E501 + + :return: The settle_price of this OptionsSettlement. # noqa: E501 + :rtype: str + """ + return self._settle_price + + @settle_price.setter + def settle_price(self, settle_price): + """Sets the settle_price of this OptionsSettlement. + + Settlement price (quote currency) # noqa: E501 + + :param settle_price: The settle_price of this OptionsSettlement. # noqa: E501 + :type: str + """ + + self._settle_price = settle_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, OptionsSettlement): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsSettlement): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py new file mode 100644 index 0000000..2369175 --- /dev/null +++ b/gate_api/models/options_ticker.py @@ -0,0 +1,599 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsTicker(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'last_price': 'str', + 'mark_price': 'str', + 'index_price': 'str', + 'ask1_size': 'int', + 'ask1_price': 'str', + 'bid1_size': 'int', + 'bid1_price': 'str', + 'position_size': 'int', + 'mark_iv': 'str', + 'bid_iv': 'str', + 'ask_iv': 'str', + 'leverage': 'str', + 'delta': 'str', + 'gamma': 'str', + 'vega': 'str', + 'theta': 'str', + 'rho': 'str' + } + + attribute_map = { + 'name': 'name', + 'last_price': 'last_price', + 'mark_price': 'mark_price', + 'index_price': 'index_price', + 'ask1_size': 'ask1_size', + 'ask1_price': 'ask1_price', + 'bid1_size': 'bid1_size', + 'bid1_price': 'bid1_price', + 'position_size': 'position_size', + 'mark_iv': 'mark_iv', + 'bid_iv': 'bid_iv', + 'ask_iv': 'ask_iv', + 'leverage': 'leverage', + 'delta': 'delta', + 'gamma': 'gamma', + 'vega': 'vega', + 'theta': 'theta', + 'rho': 'rho' + } + + def __init__(self, name=None, last_price=None, mark_price=None, index_price=None, ask1_size=None, ask1_price=None, bid1_size=None, bid1_price=None, position_size=None, mark_iv=None, bid_iv=None, ask_iv=None, leverage=None, delta=None, gamma=None, vega=None, theta=None, rho=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, str, int, str, int, str, str, str, str, str, str, str, str, str, Configuration) -> None + """OptionsTicker - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._last_price = None + self._mark_price = None + self._index_price = None + self._ask1_size = None + self._ask1_price = None + self._bid1_size = None + self._bid1_price = None + self._position_size = None + self._mark_iv = None + self._bid_iv = None + self._ask_iv = None + self._leverage = None + self._delta = None + self._gamma = None + self._vega = None + self._theta = None + self._rho = None + self.discriminator = None + + if name is not None: + self.name = name + if last_price is not None: + self.last_price = last_price + if mark_price is not None: + self.mark_price = mark_price + if index_price is not None: + self.index_price = index_price + if ask1_size is not None: + self.ask1_size = ask1_size + if ask1_price is not None: + self.ask1_price = ask1_price + if bid1_size is not None: + self.bid1_size = bid1_size + if bid1_price is not None: + self.bid1_price = bid1_price + if position_size is not None: + self.position_size = position_size + if mark_iv is not None: + self.mark_iv = mark_iv + if bid_iv is not None: + self.bid_iv = bid_iv + if ask_iv is not None: + self.ask_iv = ask_iv + if leverage is not None: + self.leverage = leverage + if delta is not None: + self.delta = delta + if gamma is not None: + self.gamma = gamma + if vega is not None: + self.vega = vega + if theta is not None: + self.theta = theta + if rho is not None: + self.rho = rho + + @property + def name(self): + """Gets the name of this OptionsTicker. # noqa: E501 + + Options contract name # noqa: E501 + + :return: The name of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OptionsTicker. + + Options contract name # noqa: E501 + + :param name: The name of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def last_price(self): + """Gets the last_price of this OptionsTicker. # noqa: E501 + + Last trading price (quote currency) # noqa: E501 + + :return: The last_price of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._last_price + + @last_price.setter + def last_price(self, last_price): + """Sets the last_price of this OptionsTicker. + + Last trading price (quote currency) # noqa: E501 + + :param last_price: The last_price of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._last_price = last_price + + @property + def mark_price(self): + """Gets the mark_price of this OptionsTicker. # noqa: E501 + + Current mark price (quote currency) # noqa: E501 + + :return: The mark_price of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this OptionsTicker. + + Current mark price (quote currency) # noqa: E501 + + :param mark_price: The mark_price of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def index_price(self): + """Gets the index_price of this OptionsTicker. # noqa: E501 + + Current index price (quote currency) # noqa: E501 + + :return: The index_price of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this OptionsTicker. + + Current index price (quote currency) # noqa: E501 + + :param index_price: The index_price of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def ask1_size(self): + """Gets the ask1_size of this OptionsTicker. # noqa: E501 + + Best ask size # noqa: E501 + + :return: The ask1_size of this OptionsTicker. # noqa: E501 + :rtype: int + """ + return self._ask1_size + + @ask1_size.setter + def ask1_size(self, ask1_size): + """Sets the ask1_size of this OptionsTicker. + + Best ask size # noqa: E501 + + :param ask1_size: The ask1_size of this OptionsTicker. # noqa: E501 + :type: int + """ + + self._ask1_size = ask1_size + + @property + def ask1_price(self): + """Gets the ask1_price of this OptionsTicker. # noqa: E501 + + Best ask price # noqa: E501 + + :return: The ask1_price of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._ask1_price + + @ask1_price.setter + def ask1_price(self, ask1_price): + """Sets the ask1_price of this OptionsTicker. + + Best ask price # noqa: E501 + + :param ask1_price: The ask1_price of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._ask1_price = ask1_price + + @property + def bid1_size(self): + """Gets the bid1_size of this OptionsTicker. # noqa: E501 + + Best bid size # noqa: E501 + + :return: The bid1_size of this OptionsTicker. # noqa: E501 + :rtype: int + """ + return self._bid1_size + + @bid1_size.setter + def bid1_size(self, bid1_size): + """Sets the bid1_size of this OptionsTicker. + + Best bid size # noqa: E501 + + :param bid1_size: The bid1_size of this OptionsTicker. # noqa: E501 + :type: int + """ + + self._bid1_size = bid1_size + + @property + def bid1_price(self): + """Gets the bid1_price of this OptionsTicker. # noqa: E501 + + Best bid price # noqa: E501 + + :return: The bid1_price of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._bid1_price + + @bid1_price.setter + def bid1_price(self, bid1_price): + """Sets the bid1_price of this OptionsTicker. + + Best bid price # noqa: E501 + + :param bid1_price: The bid1_price of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._bid1_price = bid1_price + + @property + def position_size(self): + """Gets the position_size of this OptionsTicker. # noqa: E501 + + Current total long position size # noqa: E501 + + :return: The position_size of this OptionsTicker. # noqa: E501 + :rtype: int + """ + return self._position_size + + @position_size.setter + def position_size(self, position_size): + """Sets the position_size of this OptionsTicker. + + Current total long position size # noqa: E501 + + :param position_size: The position_size of this OptionsTicker. # noqa: E501 + :type: int + """ + + self._position_size = position_size + + @property + def mark_iv(self): + """Gets the mark_iv of this OptionsTicker. # noqa: E501 + + Implied volatility # noqa: E501 + + :return: The mark_iv of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._mark_iv + + @mark_iv.setter + def mark_iv(self, mark_iv): + """Sets the mark_iv of this OptionsTicker. + + Implied volatility # noqa: E501 + + :param mark_iv: The mark_iv of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._mark_iv = mark_iv + + @property + def bid_iv(self): + """Gets the bid_iv of this OptionsTicker. # noqa: E501 + + Bid side implied volatility # noqa: E501 + + :return: The bid_iv of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._bid_iv + + @bid_iv.setter + def bid_iv(self, bid_iv): + """Sets the bid_iv of this OptionsTicker. + + Bid side implied volatility # noqa: E501 + + :param bid_iv: The bid_iv of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._bid_iv = bid_iv + + @property + def ask_iv(self): + """Gets the ask_iv of this OptionsTicker. # noqa: E501 + + Ask side implied volatility # noqa: E501 + + :return: The ask_iv of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._ask_iv + + @ask_iv.setter + def ask_iv(self, ask_iv): + """Sets the ask_iv of this OptionsTicker. + + Ask side implied volatility # noqa: E501 + + :param ask_iv: The ask_iv of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._ask_iv = ask_iv + + @property + def leverage(self): + """Gets the leverage of this OptionsTicker. # noqa: E501 + + Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 + + :return: The leverage of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this OptionsTicker. + + Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 + + :param leverage: The leverage of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def delta(self): + """Gets the delta of this OptionsTicker. # noqa: E501 + + Delta # noqa: E501 + + :return: The delta of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._delta + + @delta.setter + def delta(self, delta): + """Sets the delta of this OptionsTicker. + + Delta # noqa: E501 + + :param delta: The delta of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._delta = delta + + @property + def gamma(self): + """Gets the gamma of this OptionsTicker. # noqa: E501 + + Gamma # noqa: E501 + + :return: The gamma of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._gamma + + @gamma.setter + def gamma(self, gamma): + """Sets the gamma of this OptionsTicker. + + Gamma # noqa: E501 + + :param gamma: The gamma of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._gamma = gamma + + @property + def vega(self): + """Gets the vega of this OptionsTicker. # noqa: E501 + + Vega # noqa: E501 + + :return: The vega of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._vega + + @vega.setter + def vega(self, vega): + """Sets the vega of this OptionsTicker. + + Vega # noqa: E501 + + :param vega: The vega of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._vega = vega + + @property + def theta(self): + """Gets the theta of this OptionsTicker. # noqa: E501 + + Theta # noqa: E501 + + :return: The theta of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._theta + + @theta.setter + def theta(self, theta): + """Sets the theta of this OptionsTicker. + + Theta # noqa: E501 + + :param theta: The theta of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._theta = theta + + @property + def rho(self): + """Gets the rho of this OptionsTicker. # noqa: E501 + + Rho # noqa: E501 + + :return: The rho of this OptionsTicker. # noqa: E501 + :rtype: str + """ + return self._rho + + @rho.setter + def rho(self, rho): + """Sets the rho of this OptionsTicker. + + Rho # noqa: E501 + + :param rho: The rho of this OptionsTicker. # noqa: E501 + :type: str + """ + + self._rho = rho + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OptionsTicker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsTicker): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py new file mode 100644 index 0000000..f150247 --- /dev/null +++ b/gate_api/models/options_underlying.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsUnderlying(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'index_price': 'str' + } + + attribute_map = { + 'name': 'name', + 'index_price': 'index_price' + } + + def __init__(self, name=None, index_price=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """OptionsUnderlying - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._index_price = None + self.discriminator = None + + if name is not None: + self.name = name + if index_price is not None: + self.index_price = index_price + + @property + def name(self): + """Gets the name of this OptionsUnderlying. # noqa: E501 + + Underlying name # noqa: E501 + + :return: The name of this OptionsUnderlying. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OptionsUnderlying. + + Underlying name # noqa: E501 + + :param name: The name of this OptionsUnderlying. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def index_price(self): + """Gets the index_price of this OptionsUnderlying. # noqa: E501 + + Spot index price (quote currency) # noqa: E501 + + :return: The index_price of this OptionsUnderlying. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this OptionsUnderlying. + + Spot index price (quote currency) # noqa: E501 + + :param index_price: The index_price of this OptionsUnderlying. # noqa: E501 + :type: str + """ + + self._index_price = index_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, OptionsUnderlying): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsUnderlying): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py new file mode 100644 index 0000000..df43bcb --- /dev/null +++ b/gate_api/models/options_underlying_ticker.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OptionsUnderlyingTicker(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'trade_put': 'int', + 'trade_call': 'int', + 'index_price': 'str' + } + + attribute_map = { + 'trade_put': 'trade_put', + 'trade_call': 'trade_call', + 'index_price': 'index_price' + } + + def __init__(self, trade_put=None, trade_call=None, index_price=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, Configuration) -> None + """OptionsUnderlyingTicker - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._trade_put = None + self._trade_call = None + self._index_price = None + self.discriminator = None + + if trade_put is not None: + self.trade_put = trade_put + if trade_call is not None: + self.trade_call = trade_call + if index_price is not None: + self.index_price = index_price + + @property + def trade_put(self): + """Gets the trade_put of this OptionsUnderlyingTicker. # noqa: E501 + + Total put options trades amount in last 24h # noqa: E501 + + :return: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 + :rtype: int + """ + return self._trade_put + + @trade_put.setter + def trade_put(self, trade_put): + """Sets the trade_put of this OptionsUnderlyingTicker. + + Total put options trades amount in last 24h # noqa: E501 + + :param trade_put: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 + :type: int + """ + + self._trade_put = trade_put + + @property + def trade_call(self): + """Gets the trade_call of this OptionsUnderlyingTicker. # noqa: E501 + + Total call options trades amount in last 24h # noqa: E501 + + :return: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 + :rtype: int + """ + return self._trade_call + + @trade_call.setter + def trade_call(self, trade_call): + """Sets the trade_call of this OptionsUnderlyingTicker. + + Total call options trades amount in last 24h # noqa: E501 + + :param trade_call: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 + :type: int + """ + + self._trade_call = trade_call + + @property + def index_price(self): + """Gets the index_price of this OptionsUnderlyingTicker. # noqa: E501 + + Index price (quote currency) # noqa: E501 + + :return: The index_price of this OptionsUnderlyingTicker. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this OptionsUnderlyingTicker. + + Index price (quote currency) # noqa: E501 + + :param index_price: The index_price of this OptionsUnderlyingTicker. # noqa: E501 + :type: str + """ + + self._index_price = index_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, OptionsUnderlyingTicker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OptionsUnderlyingTicker): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order.py b/gate_api/models/order.py new file mode 100644 index 0000000..0f7bfd8 --- /dev/null +++ b/gate_api/models/order.py @@ -0,0 +1,1142 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Order(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'amend_text': 'str', + 'create_time': 'str', + 'update_time': 'str', + 'create_time_ms': 'int', + 'update_time_ms': 'int', + 'status': 'str', + 'currency_pair': 'str', + 'type': 'str', + 'account': 'str', + 'side': 'str', + 'amount': 'str', + 'price': 'str', + 'time_in_force': 'str', + 'iceberg': 'str', + 'auto_borrow': 'bool', + 'auto_repay': 'bool', + 'left': 'str', + 'filled_amount': 'str', + 'fill_price': 'str', + 'filled_total': 'str', + 'avg_deal_price': 'str', + 'fee': 'str', + 'fee_currency': 'str', + 'point_fee': 'str', + 'gt_fee': 'str', + 'gt_maker_fee': 'str', + 'gt_taker_fee': 'str', + 'gt_discount': 'bool', + 'rebated_fee': 'str', + 'rebated_fee_currency': 'str', + 'stp_id': 'int', + 'stp_act': 'str', + 'finish_as': 'str', + 'action_mode': 'str' + } + + attribute_map = { + 'id': 'id', + 'text': 'text', + 'amend_text': 'amend_text', + 'create_time': 'create_time', + 'update_time': 'update_time', + 'create_time_ms': 'create_time_ms', + 'update_time_ms': 'update_time_ms', + 'status': 'status', + 'currency_pair': 'currency_pair', + 'type': 'type', + 'account': 'account', + 'side': 'side', + 'amount': 'amount', + 'price': 'price', + 'time_in_force': 'time_in_force', + 'iceberg': 'iceberg', + 'auto_borrow': 'auto_borrow', + 'auto_repay': 'auto_repay', + 'left': 'left', + 'filled_amount': 'filled_amount', + 'fill_price': 'fill_price', + 'filled_total': 'filled_total', + 'avg_deal_price': 'avg_deal_price', + 'fee': 'fee', + 'fee_currency': 'fee_currency', + 'point_fee': 'point_fee', + 'gt_fee': 'gt_fee', + 'gt_maker_fee': 'gt_maker_fee', + 'gt_taker_fee': 'gt_taker_fee', + 'gt_discount': 'gt_discount', + 'rebated_fee': 'rebated_fee', + 'rebated_fee_currency': 'rebated_fee_currency', + 'stp_id': 'stp_id', + 'stp_act': 'stp_act', + 'finish_as': 'finish_as', + 'action_mode': 'action_mode' + } + + def __init__(self, id=None, text=None, amend_text=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_maker_fee=None, gt_taker_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, str, Configuration) -> None + """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._text = None + self._amend_text = None + self._create_time = None + self._update_time = None + self._create_time_ms = None + self._update_time_ms = None + self._status = None + self._currency_pair = None + self._type = None + self._account = None + self._side = None + self._amount = None + self._price = None + self._time_in_force = None + self._iceberg = None + self._auto_borrow = None + self._auto_repay = None + self._left = None + self._filled_amount = None + self._fill_price = None + self._filled_total = None + self._avg_deal_price = None + self._fee = None + self._fee_currency = None + self._point_fee = None + self._gt_fee = None + self._gt_maker_fee = None + self._gt_taker_fee = None + self._gt_discount = None + self._rebated_fee = None + self._rebated_fee_currency = None + self._stp_id = None + self._stp_act = None + self._finish_as = None + self._action_mode = None + self.discriminator = None + + if id is not None: + self.id = id + if text is not None: + self.text = text + if amend_text is not None: + self.amend_text = amend_text + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + if create_time_ms is not None: + self.create_time_ms = create_time_ms + if update_time_ms is not None: + self.update_time_ms = update_time_ms + if status is not None: + self.status = status + self.currency_pair = currency_pair + if type is not None: + self.type = type + if account is not None: + self.account = account + self.side = side + self.amount = amount + if price is not None: + self.price = price + if time_in_force is not None: + self.time_in_force = time_in_force + if iceberg is not None: + self.iceberg = iceberg + if auto_borrow is not None: + self.auto_borrow = auto_borrow + if auto_repay is not None: + self.auto_repay = auto_repay + if left is not None: + self.left = left + if filled_amount is not None: + self.filled_amount = filled_amount + if fill_price is not None: + self.fill_price = fill_price + if filled_total is not None: + self.filled_total = filled_total + if avg_deal_price is not None: + self.avg_deal_price = avg_deal_price + if fee is not None: + self.fee = fee + if fee_currency is not None: + self.fee_currency = fee_currency + if point_fee is not None: + self.point_fee = point_fee + if gt_fee is not None: + self.gt_fee = gt_fee + if gt_maker_fee is not None: + self.gt_maker_fee = gt_maker_fee + if gt_taker_fee is not None: + self.gt_taker_fee = gt_taker_fee + if gt_discount is not None: + self.gt_discount = gt_discount + if rebated_fee is not None: + self.rebated_fee = rebated_fee + if rebated_fee_currency is not None: + self.rebated_fee_currency = rebated_fee_currency + if stp_id is not None: + self.stp_id = stp_id + if stp_act is not None: + self.stp_act = stp_act + if finish_as is not None: + self.finish_as = finish_as + if action_mode is not None: + self.action_mode = action_mode + + @property + def id(self): + """Gets the id of this Order. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this Order. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Order. + + Order ID # noqa: E501 + + :param id: The id of this Order. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def text(self): + """Gets the text of this Order. # noqa: E501 + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 + + :return: The text of this Order. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this Order. + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 + + :param text: The text of this Order. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def amend_text(self): + """Gets the amend_text of this Order. # noqa: E501 + + The custom data that the user remarked when amending the order # noqa: E501 + + :return: The amend_text of this Order. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this Order. + + The custom data that the user remarked when amending the order # noqa: E501 + + :param amend_text: The amend_text of this Order. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + @property + def create_time(self): + """Gets the create_time of this Order. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The create_time of this Order. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Order. + + Creation time of order # noqa: E501 + + :param create_time: The create_time of this Order. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this Order. # noqa: E501 + + Last modification time of order # noqa: E501 + + :return: The update_time of this Order. # noqa: E501 + :rtype: str + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this Order. + + Last modification time of order # noqa: E501 + + :param update_time: The update_time of this Order. # noqa: E501 + :type: str + """ + + self._update_time = update_time + + @property + def create_time_ms(self): + """Gets the create_time_ms of this Order. # noqa: E501 + + Creation time of order (in milliseconds) # noqa: E501 + + :return: The create_time_ms of this Order. # 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 Order. + + Creation time of order (in milliseconds) # noqa: E501 + + :param create_time_ms: The create_time_ms of this Order. # noqa: E501 + :type: int + """ + + self._create_time_ms = create_time_ms + + @property + def update_time_ms(self): + """Gets the update_time_ms of this Order. # noqa: E501 + + Last modification time of order (in milliseconds) # noqa: E501 + + :return: The update_time_ms of this Order. # 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 Order. + + Last modification time of order (in milliseconds) # noqa: E501 + + :param update_time_ms: The update_time_ms of this Order. # noqa: E501 + :type: int + """ + + self._update_time_ms = update_time_ms + + @property + def status(self): + """Gets the status of this Order. # noqa: E501 + + Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 + + :return: The status of this Order. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Order. + + Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 + + :param status: The status of this Order. # noqa: E501 + :type: str + """ + allowed_values = ["open", "closed", "cancelled"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def currency_pair(self): + """Gets the currency_pair of this Order. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this Order. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this Order. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this Order. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 + raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 + + self._currency_pair = currency_pair + + @property + def type(self): + """Gets the type of this Order. # noqa: E501 + + Order Type - limit : Limit Order - market : Market Order # noqa: E501 + + :return: The type of this Order. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Order. + + Order Type - limit : Limit Order - market : Market Order # noqa: E501 + + :param type: The type of this Order. # noqa: E501 + :type: str + """ + allowed_values = ["limit", "market"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def account(self): + """Gets the account of this Order. # noqa: E501 + + Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 + + :return: The account of this Order. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this Order. + + Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 + + :param account: The account of this Order. # noqa: E501 + :type: str + """ + + self._account = account + + @property + def side(self): + """Gets the side of this Order. # noqa: E501 + + Order side # noqa: E501 + + :return: The side of this Order. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this Order. + + Order side # noqa: E501 + + :param side: The side of this Order. # 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 Order. # noqa: E501 + + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + + :return: The amount of this Order. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Order. + + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + + :param amount: The amount of this Order. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def price(self): + """Gets the price of this Order. # noqa: E501 + + Price can't be empty when `type`= `limit` # noqa: E501 + + :return: The price of this Order. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this Order. + + Price can't be empty when `type`= `limit` # noqa: E501 + + :param price: The price of this Order. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def time_in_force(self): + """Gets the time_in_force of this Order. # noqa: E501 + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 + + :return: The time_in_force of this Order. # 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 Order. + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 + + :param time_in_force: The time_in_force of this Order. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 + .format(time_in_force, allowed_values) + ) + + self._time_in_force = time_in_force + + @property + def iceberg(self): + """Gets the iceberg of this Order. # noqa: E501 + + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + + :return: The iceberg of this Order. # noqa: E501 + :rtype: str + """ + return self._iceberg + + @iceberg.setter + def iceberg(self, iceberg): + """Sets the iceberg of this Order. + + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + + :param iceberg: The iceberg of this Order. # noqa: E501 + :type: str + """ + + self._iceberg = iceberg + + @property + def auto_borrow(self): + """Gets the auto_borrow of this Order. # noqa: E501 + + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + + :return: The auto_borrow of this Order. # noqa: E501 + :rtype: bool + """ + return self._auto_borrow + + @auto_borrow.setter + def auto_borrow(self, auto_borrow): + """Sets the auto_borrow of this Order. + + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + + :param auto_borrow: The auto_borrow of this Order. # noqa: E501 + :type: bool + """ + + self._auto_borrow = auto_borrow + + @property + def auto_repay(self): + """Gets the auto_repay of this Order. # noqa: E501 + + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + + :return: The auto_repay of this Order. # noqa: E501 + :rtype: bool + """ + return self._auto_repay + + @auto_repay.setter + def auto_repay(self, auto_repay): + """Sets the auto_repay of this Order. + + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + + :param auto_repay: The auto_repay of this Order. # noqa: E501 + :type: bool + """ + + self._auto_repay = auto_repay + + @property + def left(self): + """Gets the left of this Order. # noqa: E501 + + Amount left to fill # noqa: E501 + + :return: The left of this Order. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this Order. + + Amount left to fill # noqa: E501 + + :param left: The left of this Order. # noqa: E501 + :type: str + """ + + self._left = left + + @property + def filled_amount(self): + """Gets the filled_amount of this Order. # noqa: E501 + + Amount traded to fill # noqa: E501 + + :return: The filled_amount of this Order. # noqa: E501 + :rtype: str + """ + return self._filled_amount + + @filled_amount.setter + def filled_amount(self, filled_amount): + """Sets the filled_amount of this Order. + + Amount traded to fill # noqa: E501 + + :param filled_amount: The filled_amount of this Order. # noqa: E501 + :type: str + """ + + self._filled_amount = filled_amount + + @property + def fill_price(self): + """Gets the fill_price of this Order. # noqa: E501 + + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + + :return: The fill_price of this Order. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this Order. + + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + + :param fill_price: The fill_price of this Order. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def filled_total(self): + """Gets the filled_total of this Order. # noqa: E501 + + Total filled in quote currency # noqa: E501 + + :return: The filled_total of this Order. # noqa: E501 + :rtype: str + """ + return self._filled_total + + @filled_total.setter + def filled_total(self, filled_total): + """Sets the filled_total of this Order. + + Total filled in quote currency # noqa: E501 + + :param filled_total: The filled_total of this Order. # noqa: E501 + :type: str + """ + + self._filled_total = filled_total + + @property + def avg_deal_price(self): + """Gets the avg_deal_price of this Order. # noqa: E501 + + Average fill price # noqa: E501 + + :return: The avg_deal_price of this Order. # noqa: E501 + :rtype: str + """ + return self._avg_deal_price + + @avg_deal_price.setter + def avg_deal_price(self, avg_deal_price): + """Sets the avg_deal_price of this Order. + + Average fill price # noqa: E501 + + :param avg_deal_price: The avg_deal_price of this Order. # noqa: E501 + :type: str + """ + + self._avg_deal_price = avg_deal_price + + @property + def fee(self): + """Gets the fee of this Order. # noqa: E501 + + Fee deducted # noqa: E501 + + :return: The fee of this Order. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this Order. + + Fee deducted # noqa: E501 + + :param fee: The fee of this Order. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def fee_currency(self): + """Gets the fee_currency of this Order. # noqa: E501 + + Fee currency unit # noqa: E501 + + :return: The fee_currency of this Order. # noqa: E501 + :rtype: str + """ + return self._fee_currency + + @fee_currency.setter + def fee_currency(self, fee_currency): + """Sets the fee_currency of this Order. + + Fee currency unit # noqa: E501 + + :param fee_currency: The fee_currency of this Order. # noqa: E501 + :type: str + """ + + self._fee_currency = fee_currency + + @property + def point_fee(self): + """Gets the point_fee of this Order. # noqa: E501 + + Points used to deduct fee # noqa: E501 + + :return: The point_fee of this Order. # noqa: E501 + :rtype: str + """ + return self._point_fee + + @point_fee.setter + def point_fee(self, point_fee): + """Sets the point_fee of this Order. + + Points used to deduct fee # noqa: E501 + + :param point_fee: The point_fee of this Order. # noqa: E501 + :type: str + """ + + self._point_fee = point_fee + + @property + def gt_fee(self): + """Gets the gt_fee of this Order. # noqa: E501 + + GT used to deduct fee # noqa: E501 + + :return: The gt_fee of this Order. # noqa: E501 + :rtype: str + """ + return self._gt_fee + + @gt_fee.setter + def gt_fee(self, gt_fee): + """Sets the gt_fee of this Order. + + GT used to deduct fee # noqa: E501 + + :param gt_fee: The gt_fee of this Order. # noqa: E501 + :type: str + """ + + self._gt_fee = gt_fee + + @property + def gt_maker_fee(self): + """Gets the gt_maker_fee of this Order. # noqa: E501 + + GT used to deduct maker fee # noqa: E501 + + :return: The gt_maker_fee of this Order. # noqa: E501 + :rtype: str + """ + return self._gt_maker_fee + + @gt_maker_fee.setter + def gt_maker_fee(self, gt_maker_fee): + """Sets the gt_maker_fee of this Order. + + GT used to deduct maker fee # noqa: E501 + + :param gt_maker_fee: The gt_maker_fee of this Order. # noqa: E501 + :type: str + """ + + self._gt_maker_fee = gt_maker_fee + + @property + def gt_taker_fee(self): + """Gets the gt_taker_fee of this Order. # noqa: E501 + + GT used to deduct taker fee # noqa: E501 + + :return: The gt_taker_fee of this Order. # noqa: E501 + :rtype: str + """ + return self._gt_taker_fee + + @gt_taker_fee.setter + def gt_taker_fee(self, gt_taker_fee): + """Sets the gt_taker_fee of this Order. + + GT used to deduct taker fee # noqa: E501 + + :param gt_taker_fee: The gt_taker_fee of this Order. # noqa: E501 + :type: str + """ + + self._gt_taker_fee = gt_taker_fee + + @property + def gt_discount(self): + """Gets the gt_discount of this Order. # noqa: E501 + + Whether GT fee discount is used # noqa: E501 + + :return: The gt_discount of this Order. # noqa: E501 + :rtype: bool + """ + return self._gt_discount + + @gt_discount.setter + def gt_discount(self, gt_discount): + """Sets the gt_discount of this Order. + + Whether GT fee discount is used # noqa: E501 + + :param gt_discount: The gt_discount of this Order. # noqa: E501 + :type: bool + """ + + self._gt_discount = gt_discount + + @property + def rebated_fee(self): + """Gets the rebated_fee of this Order. # noqa: E501 + + Rebated fee # noqa: E501 + + :return: The rebated_fee of this Order. # noqa: E501 + :rtype: str + """ + return self._rebated_fee + + @rebated_fee.setter + def rebated_fee(self, rebated_fee): + """Sets the rebated_fee of this Order. + + Rebated fee # noqa: E501 + + :param rebated_fee: The rebated_fee of this Order. # noqa: E501 + :type: str + """ + + self._rebated_fee = rebated_fee + + @property + def rebated_fee_currency(self): + """Gets the rebated_fee_currency of this Order. # noqa: E501 + + Rebated fee currency unit # noqa: E501 + + :return: The rebated_fee_currency of this Order. # noqa: E501 + :rtype: str + """ + return self._rebated_fee_currency + + @rebated_fee_currency.setter + def rebated_fee_currency(self, rebated_fee_currency): + """Sets the rebated_fee_currency of this Order. + + Rebated fee currency unit # noqa: E501 + + :param rebated_fee_currency: The rebated_fee_currency of this Order. # noqa: E501 + :type: str + """ + + self._rebated_fee_currency = rebated_fee_currency + + @property + def stp_id(self): + """Gets the stp_id of this Order. # noqa: E501 + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :return: The stp_id of this Order. # noqa: E501 + :rtype: int + """ + return self._stp_id + + @stp_id.setter + def stp_id(self, stp_id): + """Sets the stp_id of this Order. + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :param stp_id: The stp_id of this Order. # noqa: E501 + :type: int + """ + + self._stp_id = stp_id + + @property + def stp_act(self): + """Gets the stp_act of this Order. # noqa: E501 + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :return: The stp_act of this Order. # noqa: E501 + :rtype: str + """ + return self._stp_act + + @stp_act.setter + def stp_act(self, stp_act): + """Sets the stp_act of this Order. + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :param stp_act: The stp_act of this Order. # noqa: E501 + :type: str + """ + allowed_values = ["cn", "co", "cb", "-"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 + .format(stp_act, allowed_values) + ) + + self._stp_act = stp_act + + @property + def finish_as(self): + """Gets the finish_as of this Order. # noqa: E501 + + Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 + + :return: The finish_as of this Order. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this Order. + + Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 + + :param finish_as: The finish_as of this Order. # noqa: E501 + :type: str + """ + allowed_values = ["open", "filled", "cancelled", "liquidate_cancelled", "depth_not_enough", "trader_not_enough", "small", "ioc", "poc", "fok", "stp", "unknown"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + @property + def action_mode(self): + """Gets the action_mode of this Order. # noqa: E501 + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :return: The action_mode of this Order. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this Order. + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :param action_mode: The action_mode of this Order. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Order): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py new file mode 100644 index 0000000..c554292 --- /dev/null +++ b/gate_api/models/order_book.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderBook(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'current': 'int', + 'update': 'int', + 'asks': 'list[list[str]]', + 'bids': 'list[list[str]]' + } + + attribute_map = { + 'id': 'id', + 'current': 'current', + 'update': 'update', + 'asks': 'asks', + 'bids': 'bids' + } + + def __init__(self, id=None, current=None, update=None, asks=None, bids=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, list[list[str]], list[list[str]], Configuration) -> None + """OrderBook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._current = None + self._update = None + self._asks = None + self._bids = None + self.discriminator = None + + if id is not None: + self.id = id + if current is not None: + self.current = current + if update is not None: + self.update = update + self.asks = asks + self.bids = bids + + @property + def id(self): + """Gets the id of this OrderBook. # noqa: E501 + + Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` # noqa: E501 + + :return: The id of this OrderBook. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OrderBook. + + Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` # noqa: E501 + + :param id: The id of this OrderBook. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def current(self): + """Gets the current of this OrderBook. # noqa: E501 + + The timestamp of the response data being generated (in milliseconds) # noqa: E501 + + :return: The current of this OrderBook. # noqa: E501 + :rtype: int + """ + return self._current + + @current.setter + def current(self, current): + """Sets the current of this OrderBook. + + The timestamp of the response data being generated (in milliseconds) # noqa: E501 + + :param current: The current of this OrderBook. # noqa: E501 + :type: int + """ + + self._current = current + + @property + def update(self): + """Gets the update of this OrderBook. # noqa: E501 + + The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 + + :return: The update of this OrderBook. # noqa: E501 + :rtype: int + """ + return self._update + + @update.setter + def update(self, update): + """Sets the update of this OrderBook. + + The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 + + :param update: The update of this OrderBook. # noqa: E501 + :type: int + """ + + self._update = update + + @property + def asks(self): + """Gets the asks of this OrderBook. # noqa: E501 + + Asks order depth # noqa: E501 + + :return: The asks of this OrderBook. # noqa: E501 + :rtype: list[list[str]] + """ + return self._asks + + @asks.setter + def asks(self, asks): + """Sets the asks of this OrderBook. + + Asks order depth # noqa: E501 + + :param asks: The asks of this OrderBook. # noqa: E501 + :type: list[list[str]] + """ + if self.local_vars_configuration.client_side_validation and asks is None: # noqa: E501 + raise ValueError("Invalid value for `asks`, must not be `None`") # noqa: E501 + + self._asks = asks + + @property + def bids(self): + """Gets the bids of this OrderBook. # noqa: E501 + + Bids order depth # noqa: E501 + + :return: The bids of this OrderBook. # noqa: E501 + :rtype: list[list[str]] + """ + return self._bids + + @bids.setter + def bids(self, bids): + """Sets the bids of this OrderBook. + + Bids order depth # noqa: E501 + + :param bids: The bids of this OrderBook. # noqa: E501 + :type: list[list[str]] + """ + if self.local_vars_configuration.client_side_validation and bids is None: # noqa: E501 + raise ValueError("Invalid value for `bids`, must not be `None`") # noqa: E501 + + self._bids = bids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderBook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderBook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py new file mode 100644 index 0000000..53343cd --- /dev/null +++ b/gate_api/models/order_cancel.py @@ -0,0 +1,1226 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderCancel(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'amend_text': 'str', + 'succeeded': 'bool', + 'label': 'str', + 'message': 'str', + 'create_time': 'str', + 'update_time': 'str', + 'create_time_ms': 'int', + 'update_time_ms': 'int', + 'status': 'str', + 'currency_pair': 'str', + 'type': 'str', + 'account': 'str', + 'side': 'str', + 'amount': 'str', + 'price': 'str', + 'time_in_force': 'str', + 'iceberg': 'str', + 'auto_borrow': 'bool', + 'auto_repay': 'bool', + 'left': 'str', + 'filled_amount': 'str', + 'fill_price': 'str', + 'filled_total': 'str', + 'avg_deal_price': 'str', + 'fee': 'str', + 'fee_currency': 'str', + 'point_fee': 'str', + 'gt_fee': 'str', + 'gt_maker_fee': 'str', + 'gt_taker_fee': 'str', + 'gt_discount': 'bool', + 'rebated_fee': 'str', + 'rebated_fee_currency': 'str', + 'stp_id': 'int', + 'stp_act': 'str', + 'finish_as': 'str', + 'action_mode': 'str' + } + + attribute_map = { + 'id': 'id', + 'text': 'text', + 'amend_text': 'amend_text', + 'succeeded': 'succeeded', + 'label': 'label', + 'message': 'message', + 'create_time': 'create_time', + 'update_time': 'update_time', + 'create_time_ms': 'create_time_ms', + 'update_time_ms': 'update_time_ms', + 'status': 'status', + 'currency_pair': 'currency_pair', + 'type': 'type', + 'account': 'account', + 'side': 'side', + 'amount': 'amount', + 'price': 'price', + 'time_in_force': 'time_in_force', + 'iceberg': 'iceberg', + 'auto_borrow': 'auto_borrow', + 'auto_repay': 'auto_repay', + 'left': 'left', + 'filled_amount': 'filled_amount', + 'fill_price': 'fill_price', + 'filled_total': 'filled_total', + 'avg_deal_price': 'avg_deal_price', + 'fee': 'fee', + 'fee_currency': 'fee_currency', + 'point_fee': 'point_fee', + 'gt_fee': 'gt_fee', + 'gt_maker_fee': 'gt_maker_fee', + 'gt_taker_fee': 'gt_taker_fee', + 'gt_discount': 'gt_discount', + 'rebated_fee': 'rebated_fee', + 'rebated_fee_currency': 'rebated_fee_currency', + 'stp_id': 'stp_id', + 'stp_act': 'stp_act', + 'finish_as': 'finish_as', + 'action_mode': 'action_mode' + } + + def __init__(self, id=None, text=None, amend_text=None, succeeded=None, label=None, message=None, create_time=None, update_time=None, create_time_ms=None, update_time_ms=None, status=None, currency_pair=None, type='limit', account='spot', side=None, amount=None, price=None, time_in_force='gtc', iceberg=None, auto_borrow=None, auto_repay=None, left=None, filled_amount=None, fill_price=None, filled_total=None, avg_deal_price=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, gt_maker_fee=None, gt_taker_fee=None, gt_discount=None, rebated_fee=None, rebated_fee_currency=None, stp_id=None, stp_act=None, finish_as=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, str, str, str, str, int, int, str, str, str, str, str, str, str, str, str, bool, bool, str, str, str, str, str, str, str, str, str, str, str, bool, str, str, int, str, str, str, Configuration) -> None + """OrderCancel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._text = None + self._amend_text = None + self._succeeded = None + self._label = None + self._message = None + self._create_time = None + self._update_time = None + self._create_time_ms = None + self._update_time_ms = None + self._status = None + self._currency_pair = None + self._type = None + self._account = None + self._side = None + self._amount = None + self._price = None + self._time_in_force = None + self._iceberg = None + self._auto_borrow = None + self._auto_repay = None + self._left = None + self._filled_amount = None + self._fill_price = None + self._filled_total = None + self._avg_deal_price = None + self._fee = None + self._fee_currency = None + self._point_fee = None + self._gt_fee = None + self._gt_maker_fee = None + self._gt_taker_fee = None + self._gt_discount = None + self._rebated_fee = None + self._rebated_fee_currency = None + self._stp_id = None + self._stp_act = None + self._finish_as = None + self._action_mode = None + self.discriminator = None + + if id is not None: + self.id = id + if text is not None: + self.text = text + if amend_text is not None: + self.amend_text = amend_text + if succeeded is not None: + self.succeeded = succeeded + if label is not None: + self.label = label + if message is not None: + self.message = message + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + if create_time_ms is not None: + self.create_time_ms = create_time_ms + if update_time_ms is not None: + self.update_time_ms = update_time_ms + if status is not None: + self.status = status + self.currency_pair = currency_pair + if type is not None: + self.type = type + if account is not None: + self.account = account + self.side = side + self.amount = amount + if price is not None: + self.price = price + if time_in_force is not None: + self.time_in_force = time_in_force + if iceberg is not None: + self.iceberg = iceberg + if auto_borrow is not None: + self.auto_borrow = auto_borrow + if auto_repay is not None: + self.auto_repay = auto_repay + if left is not None: + self.left = left + if filled_amount is not None: + self.filled_amount = filled_amount + if fill_price is not None: + self.fill_price = fill_price + if filled_total is not None: + self.filled_total = filled_total + if avg_deal_price is not None: + self.avg_deal_price = avg_deal_price + if fee is not None: + self.fee = fee + if fee_currency is not None: + self.fee_currency = fee_currency + if point_fee is not None: + self.point_fee = point_fee + if gt_fee is not None: + self.gt_fee = gt_fee + if gt_maker_fee is not None: + self.gt_maker_fee = gt_maker_fee + if gt_taker_fee is not None: + self.gt_taker_fee = gt_taker_fee + if gt_discount is not None: + self.gt_discount = gt_discount + if rebated_fee is not None: + self.rebated_fee = rebated_fee + if rebated_fee_currency is not None: + self.rebated_fee_currency = rebated_fee_currency + if stp_id is not None: + self.stp_id = stp_id + if stp_act is not None: + self.stp_act = stp_act + if finish_as is not None: + self.finish_as = finish_as + if action_mode is not None: + self.action_mode = action_mode + + @property + def id(self): + """Gets the id of this OrderCancel. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OrderCancel. + + Order ID # noqa: E501 + + :param id: The id of this OrderCancel. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def text(self): + """Gets the text of this OrderCancel. # noqa: E501 + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 + + :return: The text of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this OrderCancel. + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 # noqa: E501 + + :param text: The text of this OrderCancel. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def amend_text(self): + """Gets the amend_text of this OrderCancel. # noqa: E501 + + The custom data that the user remarked when amending the order # noqa: E501 + + :return: The amend_text of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this OrderCancel. + + The custom data that the user remarked when amending the order # noqa: E501 + + :param amend_text: The amend_text of this OrderCancel. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + @property + def succeeded(self): + """Gets the succeeded of this OrderCancel. # noqa: E501 + + Whether the batch of orders succeeded # noqa: E501 + + :return: The succeeded of this OrderCancel. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this OrderCancel. + + Whether the batch of orders succeeded # noqa: E501 + + :param succeeded: The succeeded of this OrderCancel. # noqa: E501 + :type: bool + """ + + self._succeeded = succeeded + + @property + def label(self): + """Gets the label of this OrderCancel. # noqa: E501 + + Error label, if any, otherwise an empty string # noqa: E501 + + :return: The label of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this OrderCancel. + + Error label, if any, otherwise an empty string # noqa: E501 + + :param label: The label of this OrderCancel. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this OrderCancel. # noqa: E501 + + Detailed error message, if any, otherwise an empty string # noqa: E501 + + :return: The message of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this OrderCancel. + + Detailed error message, if any, otherwise an empty string # noqa: E501 + + :param message: The message of this OrderCancel. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def create_time(self): + """Gets the create_time of this OrderCancel. # noqa: E501 + + Creation time of order # noqa: E501 + + :return: The create_time of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this OrderCancel. + + Creation time of order # noqa: E501 + + :param create_time: The create_time of this OrderCancel. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this OrderCancel. # noqa: E501 + + Last modification time of order # noqa: E501 + + :return: The update_time of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this OrderCancel. + + Last modification time of order # noqa: E501 + + :param update_time: The update_time of this OrderCancel. # noqa: E501 + :type: str + """ + + self._update_time = update_time + + @property + def create_time_ms(self): + """Gets the create_time_ms of this OrderCancel. # noqa: E501 + + Creation time of order (in milliseconds) # noqa: E501 + + :return: The create_time_ms of this OrderCancel. # noqa: E501 + :rtype: int + """ + return self._create_time_ms + + @create_time_ms.setter + def create_time_ms(self, create_time_ms): + """Sets the create_time_ms of this OrderCancel. + + Creation time of order (in milliseconds) # noqa: E501 + + :param create_time_ms: The create_time_ms of this OrderCancel. # noqa: E501 + :type: int + """ + + self._create_time_ms = create_time_ms + + @property + def update_time_ms(self): + """Gets the update_time_ms of this OrderCancel. # noqa: E501 + + Last modification time of order (in milliseconds) # noqa: E501 + + :return: The update_time_ms of this OrderCancel. # noqa: E501 + :rtype: int + """ + return self._update_time_ms + + @update_time_ms.setter + def update_time_ms(self, update_time_ms): + """Sets the update_time_ms of this OrderCancel. + + Last modification time of order (in milliseconds) # noqa: E501 + + :param update_time_ms: The update_time_ms of this OrderCancel. # noqa: E501 + :type: int + """ + + self._update_time_ms = update_time_ms + + @property + def status(self): + """Gets the status of this OrderCancel. # noqa: E501 + + Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 + + :return: The status of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this OrderCancel. + + Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled # noqa: E501 + + :param status: The status of this OrderCancel. # noqa: E501 + :type: str + """ + allowed_values = ["open", "closed", "cancelled"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def currency_pair(self): + """Gets the currency_pair of this OrderCancel. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this OrderCancel. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this OrderCancel. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency_pair is None: # noqa: E501 + raise ValueError("Invalid value for `currency_pair`, must not be `None`") # noqa: E501 + + self._currency_pair = currency_pair + + @property + def type(self): + """Gets the type of this OrderCancel. # noqa: E501 + + Order Type - limit : Limit Order - market : Market Order # noqa: E501 + + :return: The type of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this OrderCancel. + + Order Type - limit : Limit Order - market : Market Order # noqa: E501 + + :param type: The type of this OrderCancel. # noqa: E501 + :type: str + """ + allowed_values = ["limit", "market"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def account(self): + """Gets the account of this OrderCancel. # noqa: E501 + + Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 + + :return: The account of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this OrderCancel. + + Account type, spot - spot account, margin - leveraged account, unified - unified account # noqa: E501 + + :param account: The account of this OrderCancel. # noqa: E501 + :type: str + """ + + self._account = account + + @property + def side(self): + """Gets the side of this OrderCancel. # noqa: E501 + + Order side # noqa: E501 + + :return: The side of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this OrderCancel. + + Order side # noqa: E501 + + :param side: The side of this OrderCancel. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 + 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 OrderCancel. # noqa: E501 + + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + + :return: The amount of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this OrderCancel. + + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + + :param amount: The amount of this OrderCancel. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def price(self): + """Gets the price of this OrderCancel. # noqa: E501 + + Price can't be empty when `type`= `limit` # noqa: E501 + + :return: The price of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OrderCancel. + + Price can't be empty when `type`= `limit` # noqa: E501 + + :param price: The price of this OrderCancel. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def time_in_force(self): + """Gets the time_in_force of this OrderCancel. # noqa: E501 + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 + + :return: The time_in_force of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._time_in_force + + @time_in_force.setter + def time_in_force(self, time_in_force): + """Sets the time_in_force of this OrderCancel. + + Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` # noqa: E501 + + :param time_in_force: The time_in_force of this OrderCancel. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc", "poc", "fok"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 + .format(time_in_force, allowed_values) + ) + + self._time_in_force = time_in_force + + @property + def iceberg(self): + """Gets the iceberg of this OrderCancel. # noqa: E501 + + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + + :return: The iceberg of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._iceberg + + @iceberg.setter + def iceberg(self, iceberg): + """Sets the iceberg of this OrderCancel. + + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + + :param iceberg: The iceberg of this OrderCancel. # noqa: E501 + :type: str + """ + + self._iceberg = iceberg + + @property + def auto_borrow(self): + """Gets the auto_borrow of this OrderCancel. # noqa: E501 + + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + + :return: The auto_borrow of this OrderCancel. # noqa: E501 + :rtype: bool + """ + return self._auto_borrow + + @auto_borrow.setter + def auto_borrow(self, auto_borrow): + """Sets the auto_borrow of this OrderCancel. + + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + + :param auto_borrow: The auto_borrow of this OrderCancel. # noqa: E501 + :type: bool + """ + + self._auto_borrow = auto_borrow + + @property + def auto_repay(self): + """Gets the auto_repay of this OrderCancel. # noqa: E501 + + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + + :return: The auto_repay of this OrderCancel. # noqa: E501 + :rtype: bool + """ + return self._auto_repay + + @auto_repay.setter + def auto_repay(self, auto_repay): + """Sets the auto_repay of this OrderCancel. + + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + + :param auto_repay: The auto_repay of this OrderCancel. # noqa: E501 + :type: bool + """ + + self._auto_repay = auto_repay + + @property + def left(self): + """Gets the left of this OrderCancel. # noqa: E501 + + Amount left to fill # noqa: E501 + + :return: The left of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._left + + @left.setter + def left(self, left): + """Sets the left of this OrderCancel. + + Amount left to fill # noqa: E501 + + :param left: The left of this OrderCancel. # noqa: E501 + :type: str + """ + + self._left = left + + @property + def filled_amount(self): + """Gets the filled_amount of this OrderCancel. # noqa: E501 + + Amount traded to fill # noqa: E501 + + :return: The filled_amount of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._filled_amount + + @filled_amount.setter + def filled_amount(self, filled_amount): + """Sets the filled_amount of this OrderCancel. + + Amount traded to fill # noqa: E501 + + :param filled_amount: The filled_amount of this OrderCancel. # noqa: E501 + :type: str + """ + + self._filled_amount = filled_amount + + @property + def fill_price(self): + """Gets the fill_price of this OrderCancel. # noqa: E501 + + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + + :return: The fill_price of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._fill_price + + @fill_price.setter + def fill_price(self, fill_price): + """Sets the fill_price of this OrderCancel. + + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + + :param fill_price: The fill_price of this OrderCancel. # noqa: E501 + :type: str + """ + + self._fill_price = fill_price + + @property + def filled_total(self): + """Gets the filled_total of this OrderCancel. # noqa: E501 + + Total filled in quote currency # noqa: E501 + + :return: The filled_total of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._filled_total + + @filled_total.setter + def filled_total(self, filled_total): + """Sets the filled_total of this OrderCancel. + + Total filled in quote currency # noqa: E501 + + :param filled_total: The filled_total of this OrderCancel. # noqa: E501 + :type: str + """ + + self._filled_total = filled_total + + @property + def avg_deal_price(self): + """Gets the avg_deal_price of this OrderCancel. # noqa: E501 + + Average fill price # noqa: E501 + + :return: The avg_deal_price of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._avg_deal_price + + @avg_deal_price.setter + def avg_deal_price(self, avg_deal_price): + """Sets the avg_deal_price of this OrderCancel. + + Average fill price # noqa: E501 + + :param avg_deal_price: The avg_deal_price of this OrderCancel. # noqa: E501 + :type: str + """ + + self._avg_deal_price = avg_deal_price + + @property + def fee(self): + """Gets the fee of this OrderCancel. # noqa: E501 + + Fee deducted # noqa: E501 + + :return: The fee of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this OrderCancel. + + Fee deducted # noqa: E501 + + :param fee: The fee of this OrderCancel. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def fee_currency(self): + """Gets the fee_currency of this OrderCancel. # noqa: E501 + + Fee currency unit # noqa: E501 + + :return: The fee_currency of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._fee_currency + + @fee_currency.setter + def fee_currency(self, fee_currency): + """Sets the fee_currency of this OrderCancel. + + Fee currency unit # noqa: E501 + + :param fee_currency: The fee_currency of this OrderCancel. # noqa: E501 + :type: str + """ + + self._fee_currency = fee_currency + + @property + def point_fee(self): + """Gets the point_fee of this OrderCancel. # noqa: E501 + + Points used to deduct fee # noqa: E501 + + :return: The point_fee of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._point_fee + + @point_fee.setter + def point_fee(self, point_fee): + """Sets the point_fee of this OrderCancel. + + Points used to deduct fee # noqa: E501 + + :param point_fee: The point_fee of this OrderCancel. # noqa: E501 + :type: str + """ + + self._point_fee = point_fee + + @property + def gt_fee(self): + """Gets the gt_fee of this OrderCancel. # noqa: E501 + + GT used to deduct fee # noqa: E501 + + :return: The gt_fee of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._gt_fee + + @gt_fee.setter + def gt_fee(self, gt_fee): + """Sets the gt_fee of this OrderCancel. + + GT used to deduct fee # noqa: E501 + + :param gt_fee: The gt_fee of this OrderCancel. # noqa: E501 + :type: str + """ + + self._gt_fee = gt_fee + + @property + def gt_maker_fee(self): + """Gets the gt_maker_fee of this OrderCancel. # noqa: E501 + + GT used to deduct maker fee # noqa: E501 + + :return: The gt_maker_fee of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._gt_maker_fee + + @gt_maker_fee.setter + def gt_maker_fee(self, gt_maker_fee): + """Sets the gt_maker_fee of this OrderCancel. + + GT used to deduct maker fee # noqa: E501 + + :param gt_maker_fee: The gt_maker_fee of this OrderCancel. # noqa: E501 + :type: str + """ + + self._gt_maker_fee = gt_maker_fee + + @property + def gt_taker_fee(self): + """Gets the gt_taker_fee of this OrderCancel. # noqa: E501 + + GT used to deduct taker fee # noqa: E501 + + :return: The gt_taker_fee of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._gt_taker_fee + + @gt_taker_fee.setter + def gt_taker_fee(self, gt_taker_fee): + """Sets the gt_taker_fee of this OrderCancel. + + GT used to deduct taker fee # noqa: E501 + + :param gt_taker_fee: The gt_taker_fee of this OrderCancel. # noqa: E501 + :type: str + """ + + self._gt_taker_fee = gt_taker_fee + + @property + def gt_discount(self): + """Gets the gt_discount of this OrderCancel. # noqa: E501 + + Whether GT fee discount is used # noqa: E501 + + :return: The gt_discount of this OrderCancel. # noqa: E501 + :rtype: bool + """ + return self._gt_discount + + @gt_discount.setter + def gt_discount(self, gt_discount): + """Sets the gt_discount of this OrderCancel. + + Whether GT fee discount is used # noqa: E501 + + :param gt_discount: The gt_discount of this OrderCancel. # noqa: E501 + :type: bool + """ + + self._gt_discount = gt_discount + + @property + def rebated_fee(self): + """Gets the rebated_fee of this OrderCancel. # noqa: E501 + + Rebated fee # noqa: E501 + + :return: The rebated_fee of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._rebated_fee + + @rebated_fee.setter + def rebated_fee(self, rebated_fee): + """Sets the rebated_fee of this OrderCancel. + + Rebated fee # noqa: E501 + + :param rebated_fee: The rebated_fee of this OrderCancel. # noqa: E501 + :type: str + """ + + self._rebated_fee = rebated_fee + + @property + def rebated_fee_currency(self): + """Gets the rebated_fee_currency of this OrderCancel. # noqa: E501 + + Rebated fee currency unit # noqa: E501 + + :return: The rebated_fee_currency of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._rebated_fee_currency + + @rebated_fee_currency.setter + def rebated_fee_currency(self, rebated_fee_currency): + """Sets the rebated_fee_currency of this OrderCancel. + + Rebated fee currency unit # noqa: E501 + + :param rebated_fee_currency: The rebated_fee_currency of this OrderCancel. # noqa: E501 + :type: str + """ + + self._rebated_fee_currency = rebated_fee_currency + + @property + def stp_id(self): + """Gets the stp_id of this OrderCancel. # noqa: E501 + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :return: The stp_id of this OrderCancel. # noqa: E501 + :rtype: int + """ + return self._stp_id + + @stp_id.setter + def stp_id(self, stp_id): + """Sets the stp_id of this OrderCancel. + + Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` # noqa: E501 + + :param stp_id: The stp_id of this OrderCancel. # noqa: E501 + :type: int + """ + + self._stp_id = stp_id + + @property + def stp_act(self): + """Gets the stp_act of this OrderCancel. # noqa: E501 + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :return: The stp_act of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._stp_act + + @stp_act.setter + def stp_act(self, stp_act): + """Sets the stp_act of this OrderCancel. + + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + + :param stp_act: The stp_act of this OrderCancel. # noqa: E501 + :type: str + """ + allowed_values = ["cn", "co", "cb", "-"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and stp_act not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `stp_act` ({0}), must be one of {1}" # noqa: E501 + .format(stp_act, allowed_values) + ) + + self._stp_act = stp_act + + @property + def finish_as(self): + """Gets the finish_as of this OrderCancel. # noqa: E501 + + How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 + + :return: The finish_as of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._finish_as + + @finish_as.setter + def finish_as(self, finish_as): + """Sets the finish_as of this OrderCancel. + + How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention # noqa: E501 + + :param finish_as: The finish_as of this OrderCancel. # noqa: E501 + :type: str + """ + allowed_values = ["open", "filled", "cancelled", "ioc", "stp"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and finish_as not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `finish_as` ({0}), must be one of {1}" # noqa: E501 + .format(finish_as, allowed_values) + ) + + self._finish_as = finish_as + + @property + def action_mode(self): + """Gets the action_mode of this OrderCancel. # noqa: E501 + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :return: The action_mode of this OrderCancel. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this OrderCancel. + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :param action_mode: The action_mode of this OrderCancel. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderCancel): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderCancel): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py new file mode 100644 index 0000000..098f7eb --- /dev/null +++ b/gate_api/models/order_patch.py @@ -0,0 +1,266 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderPatch(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'account': 'str', + 'amount': 'str', + 'price': 'str', + 'amend_text': 'str', + 'action_mode': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'account': 'account', + 'amount': 'amount', + 'price': 'price', + 'amend_text': 'amend_text', + 'action_mode': 'action_mode' + } + + def __init__(self, currency_pair=None, account=None, amount=None, price=None, amend_text=None, action_mode=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """OrderPatch - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._account = None + self._amount = None + self._price = None + self._amend_text = None + self._action_mode = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if account is not None: + self.account = account + if amount is not None: + self.amount = amount + if price is not None: + self.price = price + if amend_text is not None: + self.amend_text = amend_text + if action_mode is not None: + self.action_mode = action_mode + + @property + def currency_pair(self): + """Gets the currency_pair of this OrderPatch. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this OrderPatch. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this OrderPatch. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this OrderPatch. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def account(self): + """Gets the account of this OrderPatch. # noqa: E501 + + Specify query account. # noqa: E501 + + :return: The account of this OrderPatch. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this OrderPatch. + + Specify query account. # noqa: E501 + + :param account: The account of this OrderPatch. # noqa: E501 + :type: str + """ + + self._account = account + + @property + def amount(self): + """Gets the amount of this OrderPatch. # noqa: E501 + + New order amount. `amount` and `price` must specify one of them # noqa: E501 + + :return: The amount of this OrderPatch. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this OrderPatch. + + New order amount. `amount` and `price` must specify one of them # noqa: E501 + + :param amount: The amount of this OrderPatch. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def price(self): + """Gets the price of this OrderPatch. # noqa: E501 + + New order price. `amount` and `Price` must specify one of them\" # noqa: E501 + + :return: The price of this OrderPatch. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OrderPatch. + + New order price. `amount` and `Price` must specify one of them\" # noqa: E501 + + :param price: The price of this OrderPatch. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def amend_text(self): + """Gets the amend_text of this OrderPatch. # noqa: E501 + + Custom info during amending order # noqa: E501 + + :return: The amend_text of this OrderPatch. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this OrderPatch. + + Custom info during amending order # noqa: E501 + + :param amend_text: The amend_text of this OrderPatch. # noqa: E501 + :type: str + """ + if (self.local_vars_configuration.client_side_validation and + amend_text is not None and len(amend_text) > 31): + raise ValueError("Invalid value for `amend_text`, length must be less than or equal to `31`") # noqa: E501 + + self._amend_text = amend_text + + @property + def action_mode(self): + """Gets the action_mode of this OrderPatch. # noqa: E501 + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :return: The action_mode of this OrderPatch. # noqa: E501 + :rtype: str + """ + return self._action_mode + + @action_mode.setter + def action_mode(self, action_mode): + """Sets the action_mode of this OrderPatch. + + Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + + :param action_mode: The action_mode of this OrderPatch. # noqa: E501 + :type: str + """ + + self._action_mode = action_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderPatch): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderPatch): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py new file mode 100644 index 0000000..73a0d80 --- /dev/null +++ b/gate_api/models/order_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderResp(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int' + } + + attribute_map = { + 'order_id': 'order_id' + } + + def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """OrderResp - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + + @property + def order_id(self): + """Gets the order_id of this OrderResp. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this OrderResp. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this OrderResp. + + Order ID # noqa: E501 + + :param order_id: The order_id of this OrderResp. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderResp): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py new file mode 100644 index 0000000..2a39879 --- /dev/null +++ b/gate_api/models/partner_commission_history.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PartnerCommissionHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total': 'int', + 'list': 'list[AgencyCommission]' + } + + attribute_map = { + 'total': 'total', + 'list': 'list' + } + + def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[AgencyCommission], Configuration) -> None + """PartnerCommissionHistory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._total = None + self._list = None + self.discriminator = None + + if total is not None: + self.total = total + if list is not None: + self.list = list + + @property + def total(self): + """Gets the total of this PartnerCommissionHistory. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this PartnerCommissionHistory. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PartnerCommissionHistory. + + Total # noqa: E501 + + :param total: The total of this PartnerCommissionHistory. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this PartnerCommissionHistory. # noqa: E501 + + List of comission history # noqa: E501 + + :return: The list of this PartnerCommissionHistory. # noqa: E501 + :rtype: list[AgencyCommission] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this PartnerCommissionHistory. + + List of comission history # noqa: E501 + + :param list: The list of this PartnerCommissionHistory. # noqa: E501 + :type: list[AgencyCommission] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PartnerCommissionHistory): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PartnerCommissionHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py new file mode 100644 index 0000000..e908461 --- /dev/null +++ b/gate_api/models/partner_sub.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PartnerSub(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'user_join_time': 'int', + 'type': 'int' + } + + attribute_map = { + 'user_id': 'user_id', + 'user_join_time': 'user_join_time', + 'type': 'type' + } + + def __init__(self, user_id=None, user_join_time=None, type=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, Configuration) -> None + """PartnerSub - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._user_join_time = None + self._type = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if user_join_time is not None: + self.user_join_time = user_join_time + if type is not None: + self.type = type + + @property + def user_id(self): + """Gets the user_id of this PartnerSub. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this PartnerSub. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this PartnerSub. + + User ID # noqa: E501 + + :param user_id: The user_id of this PartnerSub. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def user_join_time(self): + """Gets the user_join_time of this PartnerSub. # noqa: E501 + + The time when the user joined the system, in seconds Unix timestamp # noqa: E501 + + :return: The user_join_time of this PartnerSub. # noqa: E501 + :rtype: int + """ + return self._user_join_time + + @user_join_time.setter + def user_join_time(self, user_join_time): + """Sets the user_join_time of this PartnerSub. + + The time when the user joined the system, in seconds Unix timestamp # noqa: E501 + + :param user_join_time: The user_join_time of this PartnerSub. # noqa: E501 + :type: int + """ + + self._user_join_time = user_join_time + + @property + def type(self): + """Gets the type of this PartnerSub. # noqa: E501 + + Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) # noqa: E501 + + :return: The type of this PartnerSub. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this PartnerSub. + + Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) # noqa: E501 + + :param type: The type of this PartnerSub. # noqa: E501 + :type: int + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PartnerSub): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PartnerSub): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py new file mode 100644 index 0000000..735084d --- /dev/null +++ b/gate_api/models/partner_sub_list.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PartnerSubList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total': 'int', + 'list': 'list[PartnerSub]' + } + + attribute_map = { + 'total': 'total', + 'list': 'list' + } + + def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[PartnerSub], Configuration) -> None + """PartnerSubList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._total = None + self._list = None + self.discriminator = None + + if total is not None: + self.total = total + if list is not None: + self.list = list + + @property + def total(self): + """Gets the total of this PartnerSubList. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this PartnerSubList. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PartnerSubList. + + Total # noqa: E501 + + :param total: The total of this PartnerSubList. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this PartnerSubList. # noqa: E501 + + Subordinate list # noqa: E501 + + :return: The list of this PartnerSubList. # noqa: E501 + :rtype: list[PartnerSub] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this PartnerSubList. + + Subordinate list # noqa: E501 + + :param list: The list of this PartnerSubList. # noqa: E501 + :type: list[PartnerSub] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PartnerSubList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PartnerSubList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py new file mode 100644 index 0000000..50cc3c8 --- /dev/null +++ b/gate_api/models/partner_transaction_history.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PartnerTransactionHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total': 'int', + 'list': 'list[AgencyTransaction]' + } + + attribute_map = { + 'total': 'total', + 'list': 'list' + } + + def __init__(self, total=None, list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[AgencyTransaction], Configuration) -> None + """PartnerTransactionHistory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._total = None + self._list = None + self.discriminator = None + + if total is not None: + self.total = total + if list is not None: + self.list = list + + @property + def total(self): + """Gets the total of this PartnerTransactionHistory. # noqa: E501 + + Total # noqa: E501 + + :return: The total of this PartnerTransactionHistory. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PartnerTransactionHistory. + + Total # noqa: E501 + + :param total: The total of this PartnerTransactionHistory. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def list(self): + """Gets the list of this PartnerTransactionHistory. # noqa: E501 + + List of transaction history # noqa: E501 + + :return: The list of this PartnerTransactionHistory. # noqa: E501 + :rtype: list[AgencyTransaction] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this PartnerTransactionHistory. + + List of transaction history # noqa: E501 + + :param list: The list of this PartnerTransactionHistory. # noqa: E501 + :type: list[AgencyTransaction] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PartnerTransactionHistory): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PartnerTransactionHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py new file mode 100644 index 0000000..dba7451 --- /dev/null +++ b/gate_api/models/patch_uni_lend.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PatchUniLend(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'min_rate': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'min_rate': 'min_rate' + } + + def __init__(self, currency=None, min_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """PatchUniLend - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._min_rate = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if min_rate is not None: + self.min_rate = min_rate + + @property + def currency(self): + """Gets the currency of this PatchUniLend. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this PatchUniLend. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this PatchUniLend. + + Currency name # noqa: E501 + + :param currency: The currency of this PatchUniLend. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def min_rate(self): + """Gets the min_rate of this PatchUniLend. # noqa: E501 + + Minimum interest rate # noqa: E501 + + :return: The min_rate of this PatchUniLend. # noqa: E501 + :rtype: str + """ + return self._min_rate + + @min_rate.setter + def min_rate(self, min_rate): + """Sets the min_rate of this PatchUniLend. + + Minimum interest rate # noqa: E501 + + :param min_rate: The min_rate of this PatchUniLend. # noqa: E501 + :type: str + """ + + self._min_rate = min_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, PatchUniLend): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PatchUniLend): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py new file mode 100644 index 0000000..24968d5 --- /dev/null +++ b/gate_api/models/place_dual_investment_order.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PlaceDualInvestmentOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'plan_id': 'str', + 'copies': 'str', + 'is_max': 'int', + 'amount': 'str', + 'text': 'str' + } + + attribute_map = { + 'plan_id': 'plan_id', + 'copies': 'copies', + 'is_max': 'is_max', + 'amount': 'amount', + 'text': 'text' + } + + def __init__(self, plan_id=None, copies=None, is_max=None, amount=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, str, str, Configuration) -> None + """PlaceDualInvestmentOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._plan_id = None + self._copies = None + self._is_max = None + self._amount = None + self._text = None + self.discriminator = None + + self.plan_id = plan_id + if copies is not None: + self.copies = copies + if is_max is not None: + self.is_max = is_max + self.amount = amount + if text is not None: + self.text = text + + @property + def plan_id(self): + """Gets the plan_id of this PlaceDualInvestmentOrder. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 + :rtype: str + """ + return self._plan_id + + @plan_id.setter + def plan_id(self, plan_id): + """Sets the plan_id of this PlaceDualInvestmentOrder. + + Plan ID # noqa: E501 + + :param plan_id: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and plan_id is None: # noqa: E501 + raise ValueError("Invalid value for `plan_id`, must not be `None`") # noqa: E501 + + self._plan_id = plan_id + + @property + def copies(self): + """Gets the copies of this PlaceDualInvestmentOrder. # noqa: E501 + + The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. # 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. + + The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 + + :param copies: The copies of this PlaceDualInvestmentOrder. # noqa: E501 + :type: str + """ + + self._copies = copies + + @property + def is_max(self): + """Gets the is_max of this PlaceDualInvestmentOrder. # noqa: E501 + + Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 + + :return: The is_max of this PlaceDualInvestmentOrder. # noqa: E501 + :rtype: int + """ + return self._is_max + + @is_max.setter + def is_max(self, is_max): + """Sets the is_max of this PlaceDualInvestmentOrder. + + Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 + + :param is_max: The is_max of this PlaceDualInvestmentOrder. # noqa: E501 + :type: int + """ + + self._is_max = is_max + + @property + def amount(self): + """Gets the amount of this PlaceDualInvestmentOrder. # noqa: E501 + + Subscription amount, mutually exclusive with the copies field # noqa: E501 + + :return: The amount of this PlaceDualInvestmentOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this PlaceDualInvestmentOrder. + + Subscription amount, mutually exclusive with the copies field # noqa: E501 + + :param amount: The amount of this PlaceDualInvestmentOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def text(self): + """Gets the text of this PlaceDualInvestmentOrder. # noqa: E501 + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :return: The text of this PlaceDualInvestmentOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this PlaceDualInvestmentOrder. + + User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :param text: The text of this PlaceDualInvestmentOrder. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PlaceDualInvestmentOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PlaceDualInvestmentOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position.py b/gate_api/models/position.py new file mode 100644 index 0000000..0c4d905 --- /dev/null +++ b/gate_api/models/position.py @@ -0,0 +1,966 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Position(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'int', + 'contract': 'str', + 'size': 'int', + 'leverage': 'str', + 'risk_limit': 'str', + 'leverage_max': 'str', + 'maintenance_rate': 'str', + 'value': 'str', + 'margin': 'str', + 'entry_price': 'str', + 'liq_price': 'str', + 'mark_price': 'str', + 'initial_margin': 'str', + 'maintenance_margin': 'str', + 'unrealised_pnl': 'str', + 'realised_pnl': 'str', + 'pnl_pnl': 'str', + 'pnl_fund': 'str', + 'pnl_fee': 'str', + 'history_pnl': 'str', + 'last_close_pnl': 'str', + 'realised_point': 'str', + 'history_point': 'str', + 'adl_ranking': 'int', + 'pending_orders': 'int', + 'close_order': 'PositionCloseOrder', + 'mode': 'str', + 'cross_leverage_limit': 'str', + 'update_time': 'int', + 'update_id': 'int', + 'open_time': 'int' + } + + attribute_map = { + 'user': 'user', + 'contract': 'contract', + 'size': 'size', + 'leverage': 'leverage', + 'risk_limit': 'risk_limit', + 'leverage_max': 'leverage_max', + 'maintenance_rate': 'maintenance_rate', + 'value': 'value', + 'margin': 'margin', + 'entry_price': 'entry_price', + 'liq_price': 'liq_price', + 'mark_price': 'mark_price', + 'initial_margin': 'initial_margin', + 'maintenance_margin': 'maintenance_margin', + 'unrealised_pnl': 'unrealised_pnl', + 'realised_pnl': 'realised_pnl', + 'pnl_pnl': 'pnl_pnl', + 'pnl_fund': 'pnl_fund', + 'pnl_fee': 'pnl_fee', + 'history_pnl': 'history_pnl', + 'last_close_pnl': 'last_close_pnl', + 'realised_point': 'realised_point', + 'history_point': 'history_point', + 'adl_ranking': 'adl_ranking', + 'pending_orders': 'pending_orders', + 'close_order': 'close_order', + 'mode': 'mode', + 'cross_leverage_limit': 'cross_leverage_limit', + 'update_time': 'update_time', + 'update_id': 'update_id', + 'open_time': 'open_time' + } + + 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, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, int, int, Configuration) -> None + """Position - a 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 = None + self._contract = None + self._size = None + self._leverage = None + self._risk_limit = None + self._leverage_max = None + self._maintenance_rate = None + self._value = None + self._margin = None + self._entry_price = None + self._liq_price = None + self._mark_price = None + self._initial_margin = None + self._maintenance_margin = None + self._unrealised_pnl = None + self._realised_pnl = None + self._pnl_pnl = None + self._pnl_fund = None + self._pnl_fee = None + self._history_pnl = None + self._last_close_pnl = None + self._realised_point = None + self._history_point = None + self._adl_ranking = None + self._pending_orders = None + self._close_order = None + self._mode = None + self._cross_leverage_limit = None + self._update_time = None + self._update_id = None + self._open_time = None + self.discriminator = None + + if user is not None: + self.user = user + if contract is not None: + self.contract = contract + if size is not None: + self.size = size + if leverage is not None: + self.leverage = leverage + if risk_limit is not None: + self.risk_limit = risk_limit + if leverage_max is not None: + self.leverage_max = leverage_max + if maintenance_rate is not None: + self.maintenance_rate = maintenance_rate + if value is not None: + self.value = value + if margin is not None: + self.margin = margin + 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 initial_margin is not None: + self.initial_margin = initial_margin + if maintenance_margin is not None: + self.maintenance_margin = maintenance_margin + if unrealised_pnl is not None: + self.unrealised_pnl = unrealised_pnl + if realised_pnl is not None: + self.realised_pnl = realised_pnl + if pnl_pnl is not None: + self.pnl_pnl = pnl_pnl + if pnl_fund is not None: + self.pnl_fund = pnl_fund + if pnl_fee is not None: + self.pnl_fee = pnl_fee + if history_pnl is not None: + self.history_pnl = history_pnl + if last_close_pnl is not None: + self.last_close_pnl = last_close_pnl + if realised_point is not None: + self.realised_point = realised_point + if history_point is not None: + self.history_point = history_point + if adl_ranking is not None: + self.adl_ranking = adl_ranking + if pending_orders is not None: + self.pending_orders = pending_orders + self.close_order = close_order + if mode is not None: + self.mode = mode + if cross_leverage_limit is not None: + self.cross_leverage_limit = cross_leverage_limit + if update_time is not None: + self.update_time = update_time + if update_id is not None: + self.update_id = update_id + if open_time is not None: + self.open_time = open_time + + @property + def user(self): + """Gets the user of this Position. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this Position. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Position. + + User ID # noqa: E501 + + :param user: The user of this Position. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def contract(self): + """Gets the contract of this Position. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this Position. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this Position. + + Futures contract # noqa: E501 + + :param contract: The contract of this Position. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def size(self): + """Gets the size of this Position. # noqa: E501 + + Position size # noqa: E501 + + :return: The size of this Position. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Position. + + Position size # noqa: E501 + + :param size: The size of this Position. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def leverage(self): + """Gets the leverage of this Position. # noqa: E501 + + Position leverage. 0 means cross margin; positive number means isolated margin # noqa: E501 + + :return: The leverage of this Position. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this Position. + + Position leverage. 0 means cross margin; positive number means isolated margin # noqa: E501 + + :param leverage: The leverage of this Position. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def risk_limit(self): + """Gets the risk_limit of this Position. # noqa: E501 + + Position risk limit # noqa: E501 + + :return: The risk_limit of this Position. # noqa: E501 + :rtype: str + """ + return self._risk_limit + + @risk_limit.setter + def risk_limit(self, risk_limit): + """Sets the risk_limit of this Position. + + Position risk limit # noqa: E501 + + :param risk_limit: The risk_limit of this Position. # noqa: E501 + :type: str + """ + + self._risk_limit = risk_limit + + @property + def leverage_max(self): + """Gets the leverage_max of this Position. # noqa: E501 + + Maximum leverage under current risk limit # noqa: E501 + + :return: The leverage_max of this Position. # noqa: E501 + :rtype: str + """ + return self._leverage_max + + @leverage_max.setter + def leverage_max(self, leverage_max): + """Sets the leverage_max of this Position. + + Maximum leverage under current risk limit # noqa: E501 + + :param leverage_max: The leverage_max of this Position. # noqa: E501 + :type: str + """ + + self._leverage_max = leverage_max + + @property + def maintenance_rate(self): + """Gets the maintenance_rate of this Position. # noqa: E501 + + Maintenance rate under current risk limit # noqa: E501 + + :return: The maintenance_rate of this Position. # noqa: E501 + :rtype: str + """ + return self._maintenance_rate + + @maintenance_rate.setter + def maintenance_rate(self, maintenance_rate): + """Sets the maintenance_rate of this Position. + + Maintenance rate under current risk limit # noqa: E501 + + :param maintenance_rate: The maintenance_rate of this Position. # noqa: E501 + :type: str + """ + + self._maintenance_rate = maintenance_rate + + @property + def value(self): + """Gets the value of this Position. # noqa: E501 + + Position value calculated in settlement currency # noqa: E501 + + :return: The value of this Position. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this Position. + + Position value calculated in settlement currency # noqa: E501 + + :param value: The value of this Position. # noqa: E501 + :type: str + """ + + self._value = value + + @property + def margin(self): + """Gets the margin of this Position. # noqa: E501 + + Position margin # noqa: E501 + + :return: The margin of this Position. # noqa: E501 + :rtype: str + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this Position. + + Position margin # noqa: E501 + + :param margin: The margin of this Position. # noqa: E501 + :type: str + """ + + self._margin = margin + + @property + def entry_price(self): + """Gets the entry_price of this Position. # noqa: E501 + + Entry price # noqa: E501 + + :return: The entry_price of this Position. # noqa: E501 + :rtype: str + """ + return self._entry_price + + @entry_price.setter + def entry_price(self, entry_price): + """Sets the entry_price of this Position. + + Entry price # noqa: E501 + + :param entry_price: The entry_price of this Position. # noqa: E501 + :type: str + """ + + self._entry_price = entry_price + + @property + def liq_price(self): + """Gets the liq_price of this Position. # noqa: E501 + + Liquidation price # noqa: E501 + + :return: The liq_price of this Position. # noqa: E501 + :rtype: str + """ + return self._liq_price + + @liq_price.setter + def liq_price(self, liq_price): + """Sets the liq_price of this Position. + + Liquidation price # noqa: E501 + + :param liq_price: The liq_price of this Position. # noqa: E501 + :type: str + """ + + self._liq_price = liq_price + + @property + def mark_price(self): + """Gets the mark_price of this Position. # noqa: E501 + + Current mark price # noqa: E501 + + :return: The mark_price of this Position. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this Position. + + Current mark price # noqa: E501 + + :param mark_price: The mark_price of this Position. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def initial_margin(self): + """Gets the initial_margin of this Position. # noqa: E501 + + The initial margin occupied by the position, applicable to the portfolio margin account # noqa: E501 + + :return: The initial_margin of this Position. # noqa: E501 + :rtype: str + """ + return self._initial_margin + + @initial_margin.setter + def initial_margin(self, initial_margin): + """Sets the initial_margin of this Position. + + The initial margin occupied by the position, applicable to the portfolio margin account # noqa: E501 + + :param initial_margin: The initial_margin of this Position. # noqa: E501 + :type: str + """ + + self._initial_margin = initial_margin + + @property + def maintenance_margin(self): + """Gets the maintenance_margin of this Position. # noqa: E501 + + Maintenance margin required for the position, applicable to portfolio margin account # noqa: E501 + + :return: The maintenance_margin of this Position. # noqa: E501 + :rtype: str + """ + return self._maintenance_margin + + @maintenance_margin.setter + def maintenance_margin(self, maintenance_margin): + """Sets the maintenance_margin of this Position. + + Maintenance margin required for the position, applicable to portfolio margin account # noqa: E501 + + :param maintenance_margin: The maintenance_margin of this Position. # noqa: E501 + :type: str + """ + + self._maintenance_margin = maintenance_margin + + @property + def unrealised_pnl(self): + """Gets the unrealised_pnl of this Position. # noqa: E501 + + Unrealized PNL # noqa: E501 + + :return: The unrealised_pnl of this Position. # noqa: E501 + :rtype: str + """ + return self._unrealised_pnl + + @unrealised_pnl.setter + def unrealised_pnl(self, unrealised_pnl): + """Sets the unrealised_pnl of this Position. + + Unrealized PNL # noqa: E501 + + :param unrealised_pnl: The unrealised_pnl of this Position. # noqa: E501 + :type: str + """ + + self._unrealised_pnl = unrealised_pnl + + @property + def realised_pnl(self): + """Gets the realised_pnl of this Position. # noqa: E501 + + Realized PNL # noqa: E501 + + :return: The realised_pnl of this Position. # noqa: E501 + :rtype: str + """ + return self._realised_pnl + + @realised_pnl.setter + def realised_pnl(self, realised_pnl): + """Sets the realised_pnl of this Position. + + Realized PNL # noqa: E501 + + :param realised_pnl: The realised_pnl of this Position. # noqa: E501 + :type: str + """ + + self._realised_pnl = realised_pnl + + @property + def pnl_pnl(self): + """Gets the pnl_pnl of this Position. # noqa: E501 + + Realized PNL - Position P/L # noqa: E501 + + :return: The pnl_pnl of this Position. # noqa: E501 + :rtype: str + """ + return self._pnl_pnl + + @pnl_pnl.setter + def pnl_pnl(self, pnl_pnl): + """Sets the pnl_pnl of this Position. + + Realized PNL - Position P/L # noqa: E501 + + :param pnl_pnl: The pnl_pnl of this Position. # noqa: E501 + :type: str + """ + + self._pnl_pnl = pnl_pnl + + @property + def pnl_fund(self): + """Gets the pnl_fund of this Position. # noqa: E501 + + Realized PNL - Funding Fees # noqa: E501 + + :return: The pnl_fund of this Position. # noqa: E501 + :rtype: str + """ + return self._pnl_fund + + @pnl_fund.setter + def pnl_fund(self, pnl_fund): + """Sets the pnl_fund of this Position. + + Realized PNL - Funding Fees # noqa: E501 + + :param pnl_fund: The pnl_fund of this Position. # noqa: E501 + :type: str + """ + + self._pnl_fund = pnl_fund + + @property + def pnl_fee(self): + """Gets the pnl_fee of this Position. # noqa: E501 + + Realized PNL - Transaction Fees # noqa: E501 + + :return: The pnl_fee of this Position. # noqa: E501 + :rtype: str + """ + return self._pnl_fee + + @pnl_fee.setter + def pnl_fee(self, pnl_fee): + """Sets the pnl_fee of this Position. + + Realized PNL - Transaction Fees # noqa: E501 + + :param pnl_fee: The pnl_fee of this Position. # noqa: E501 + :type: str + """ + + self._pnl_fee = pnl_fee + + @property + def history_pnl(self): + """Gets the history_pnl of this Position. # noqa: E501 + + History realized PNL # noqa: E501 + + :return: The history_pnl of this Position. # noqa: E501 + :rtype: str + """ + return self._history_pnl + + @history_pnl.setter + def history_pnl(self, history_pnl): + """Sets the history_pnl of this Position. + + History realized PNL # noqa: E501 + + :param history_pnl: The history_pnl of this Position. # noqa: E501 + :type: str + """ + + self._history_pnl = history_pnl + + @property + def last_close_pnl(self): + """Gets the last_close_pnl of this Position. # noqa: E501 + + PNL of last position close # noqa: E501 + + :return: The last_close_pnl of this Position. # noqa: E501 + :rtype: str + """ + return self._last_close_pnl + + @last_close_pnl.setter + def last_close_pnl(self, last_close_pnl): + """Sets the last_close_pnl of this Position. + + PNL of last position close # noqa: E501 + + :param last_close_pnl: The last_close_pnl of this Position. # noqa: E501 + :type: str + """ + + self._last_close_pnl = last_close_pnl + + @property + def realised_point(self): + """Gets the realised_point of this Position. # noqa: E501 + + Realized POINT PNL # noqa: E501 + + :return: The realised_point of this Position. # noqa: E501 + :rtype: str + """ + return self._realised_point + + @realised_point.setter + def realised_point(self, realised_point): + """Sets the realised_point of this Position. + + Realized POINT PNL # noqa: E501 + + :param realised_point: The realised_point of this Position. # noqa: E501 + :type: str + """ + + self._realised_point = realised_point + + @property + def history_point(self): + """Gets the history_point of this Position. # noqa: E501 + + History realized POINT PNL # noqa: E501 + + :return: The history_point of this Position. # noqa: E501 + :rtype: str + """ + return self._history_point + + @history_point.setter + def history_point(self, history_point): + """Sets the history_point of this Position. + + History realized POINT PNL # noqa: E501 + + :param history_point: The history_point of this Position. # noqa: E501 + :type: str + """ + + self._history_point = history_point + + @property + def adl_ranking(self): + """Gets the adl_ranking of this Position. # noqa: E501 + + Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation # noqa: E501 + + :return: The adl_ranking of this Position. # noqa: E501 + :rtype: int + """ + return self._adl_ranking + + @adl_ranking.setter + def adl_ranking(self, adl_ranking): + """Sets the adl_ranking of this Position. + + Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation # noqa: E501 + + :param adl_ranking: The adl_ranking of this Position. # noqa: E501 + :type: int + """ + + self._adl_ranking = adl_ranking + + @property + def pending_orders(self): + """Gets the pending_orders of this Position. # noqa: E501 + + Current open orders # noqa: E501 + + :return: The pending_orders of this Position. # noqa: E501 + :rtype: int + """ + return self._pending_orders + + @pending_orders.setter + def pending_orders(self, pending_orders): + """Sets the pending_orders of this Position. + + Current open orders # noqa: E501 + + :param pending_orders: The pending_orders of this Position. # noqa: E501 + :type: int + """ + + self._pending_orders = pending_orders + + @property + def close_order(self): + """Gets the close_order of this Position. # noqa: E501 + + + :return: The close_order of this Position. # noqa: E501 + :rtype: PositionCloseOrder + """ + return self._close_order + + @close_order.setter + def close_order(self, close_order): + """Sets the close_order of this Position. + + + :param close_order: The close_order of this Position. # noqa: E501 + :type: PositionCloseOrder + """ + + self._close_order = close_order + + @property + def mode(self): + """Gets the mode of this Position. # noqa: E501 + + Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501 + + :return: The mode of this Position. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this Position. + + Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501 + + :param mode: The mode of this Position. # noqa: E501 + :type: str + """ + allowed_values = ["single", "dual_long", "dual_short"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `mode` ({0}), must be one of {1}" # noqa: E501 + .format(mode, allowed_values) + ) + + self._mode = mode + + @property + def cross_leverage_limit(self): + """Gets the cross_leverage_limit of this Position. # noqa: E501 + + Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + + :return: The cross_leverage_limit of this Position. # noqa: E501 + :rtype: str + """ + return self._cross_leverage_limit + + @cross_leverage_limit.setter + def cross_leverage_limit(self, cross_leverage_limit): + """Sets the cross_leverage_limit of this Position. + + Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + + :param cross_leverage_limit: The cross_leverage_limit of this Position. # noqa: E501 + :type: str + """ + + self._cross_leverage_limit = cross_leverage_limit + + @property + def update_time(self): + """Gets the update_time of this Position. # noqa: E501 + + Last update time # noqa: E501 + + :return: The update_time of this Position. # noqa: E501 + :rtype: int + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this Position. + + Last update time # noqa: E501 + + :param update_time: The update_time of this Position. # noqa: E501 + :type: int + """ + + self._update_time = update_time + + @property + def update_id(self): + """Gets the update_id of this Position. # noqa: E501 + + Update id. Each time the position is updated, the value will be +1. # noqa: E501 + + :return: The update_id of this Position. # noqa: E501 + :rtype: int + """ + return self._update_id + + @update_id.setter + def update_id(self, update_id): + """Sets the update_id of this Position. + + Update id. Each time the position is updated, the value will be +1. # noqa: E501 + + :param update_id: The update_id of this Position. # noqa: E501 + :type: int + """ + + self._update_id = update_id + + @property + def open_time(self): + """Gets the open_time of this Position. # noqa: E501 + + First Open Time # noqa: E501 + + :return: The open_time of this Position. # noqa: E501 + :rtype: int + """ + return self._open_time + + @open_time.setter + def open_time(self, open_time): + """Sets the open_time of this Position. + + First Open Time # noqa: E501 + + :param open_time: The open_time of this Position. # noqa: E501 + :type: int + """ + + self._open_time = open_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Position): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Position): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py new file mode 100644 index 0000000..cdca838 --- /dev/null +++ b/gate_api/models/position_close.py @@ -0,0 +1,465 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PositionClose(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'float', + 'contract': 'str', + 'side': 'str', + 'pnl': 'str', + 'pnl_pnl': 'str', + 'pnl_fund': 'str', + 'pnl_fee': 'str', + 'text': 'str', + 'max_size': 'str', + 'accum_size': 'str', + 'first_open_time': 'int', + 'long_price': 'str', + 'short_price': 'str' + } + + attribute_map = { + 'time': 'time', + 'contract': 'contract', + 'side': 'side', + 'pnl': 'pnl', + 'pnl_pnl': 'pnl_pnl', + 'pnl_fund': 'pnl_fund', + 'pnl_fee': 'pnl_fee', + 'text': 'text', + 'max_size': 'max_size', + 'accum_size': 'accum_size', + 'first_open_time': 'first_open_time', + 'long_price': 'long_price', + 'short_price': 'short_price' + } + + def __init__(self, time=None, contract=None, side=None, pnl=None, pnl_pnl=None, pnl_fund=None, pnl_fee=None, text=None, max_size=None, accum_size=None, first_open_time=None, long_price=None, short_price=None, local_vars_configuration=None): # noqa: E501 + # type: (float, str, str, str, str, str, str, str, str, str, int, str, str, Configuration) -> None + """PositionClose - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._contract = None + self._side = None + self._pnl = None + self._pnl_pnl = None + self._pnl_fund = None + self._pnl_fee = None + self._text = None + self._max_size = None + self._accum_size = None + self._first_open_time = None + self._long_price = None + self._short_price = None + self.discriminator = None + + if time is not None: + self.time = time + if contract is not None: + self.contract = contract + if side is not None: + self.side = side + if pnl is not None: + self.pnl = pnl + if pnl_pnl is not None: + self.pnl_pnl = pnl_pnl + if pnl_fund is not None: + self.pnl_fund = pnl_fund + if pnl_fee is not None: + self.pnl_fee = pnl_fee + if text is not None: + self.text = text + if max_size is not None: + self.max_size = max_size + if accum_size is not None: + self.accum_size = accum_size + if first_open_time is not None: + self.first_open_time = first_open_time + if long_price is not None: + self.long_price = long_price + if short_price is not None: + self.short_price = short_price + + @property + def time(self): + """Gets the time of this PositionClose. # noqa: E501 + + Position close time # noqa: E501 + + :return: The time of this PositionClose. # noqa: E501 + :rtype: float + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this PositionClose. + + Position close time # noqa: E501 + + :param time: The time of this PositionClose. # noqa: E501 + :type: float + """ + + self._time = time + + @property + def contract(self): + """Gets the contract of this PositionClose. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this PositionClose. + + Futures contract # noqa: E501 + + :param contract: The contract of this PositionClose. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def side(self): + """Gets the side of this PositionClose. # noqa: E501 + + Position side, long or short # noqa: E501 + + :return: The side of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this PositionClose. + + Position side, long or short # noqa: E501 + + :param side: The side of this PositionClose. # noqa: E501 + :type: str + """ + allowed_values = ["long", "short"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and side not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `side` ({0}), must be one of {1}" # noqa: E501 + .format(side, allowed_values) + ) + + self._side = side + + @property + def pnl(self): + """Gets the pnl of this PositionClose. # noqa: E501 + + PNL # noqa: E501 + + :return: The pnl of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._pnl + + @pnl.setter + def pnl(self, pnl): + """Sets the pnl of this PositionClose. + + PNL # noqa: E501 + + :param pnl: The pnl of this PositionClose. # noqa: E501 + :type: str + """ + + self._pnl = pnl + + @property + def pnl_pnl(self): + """Gets the pnl_pnl of this PositionClose. # noqa: E501 + + PNL - Position P/L # noqa: E501 + + :return: The pnl_pnl of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._pnl_pnl + + @pnl_pnl.setter + def pnl_pnl(self, pnl_pnl): + """Sets the pnl_pnl of this PositionClose. + + PNL - Position P/L # noqa: E501 + + :param pnl_pnl: The pnl_pnl of this PositionClose. # noqa: E501 + :type: str + """ + + self._pnl_pnl = pnl_pnl + + @property + def pnl_fund(self): + """Gets the pnl_fund of this PositionClose. # noqa: E501 + + PNL - Funding Fees # noqa: E501 + + :return: The pnl_fund of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._pnl_fund + + @pnl_fund.setter + def pnl_fund(self, pnl_fund): + """Sets the pnl_fund of this PositionClose. + + PNL - Funding Fees # noqa: E501 + + :param pnl_fund: The pnl_fund of this PositionClose. # noqa: E501 + :type: str + """ + + self._pnl_fund = pnl_fund + + @property + def pnl_fee(self): + """Gets the pnl_fee of this PositionClose. # noqa: E501 + + PNL - Transaction Fees # noqa: E501 + + :return: The pnl_fee of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._pnl_fee + + @pnl_fee.setter + def pnl_fee(self, pnl_fee): + """Sets the pnl_fee of this PositionClose. + + PNL - Transaction Fees # noqa: E501 + + :param pnl_fee: The pnl_fee of this PositionClose. # noqa: E501 + :type: str + """ + + self._pnl_fee = pnl_fee + + @property + def text(self): + """Gets the text of this PositionClose. # noqa: E501 + + Text of close order # noqa: E501 + + :return: The text of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this PositionClose. + + Text of close order # noqa: E501 + + :param text: The text of this PositionClose. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def max_size(self): + """Gets the max_size of this PositionClose. # noqa: E501 + + Max Trade Size # noqa: E501 + + :return: The max_size of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._max_size + + @max_size.setter + def max_size(self, max_size): + """Sets the max_size of this PositionClose. + + Max Trade Size # noqa: E501 + + :param max_size: The max_size of this PositionClose. # noqa: E501 + :type: str + """ + + self._max_size = max_size + + @property + def accum_size(self): + """Gets the accum_size of this PositionClose. # noqa: E501 + + Cumulative closed position volume # noqa: E501 + + :return: The accum_size of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._accum_size + + @accum_size.setter + def accum_size(self, accum_size): + """Sets the accum_size of this PositionClose. + + Cumulative closed position volume # noqa: E501 + + :param accum_size: The accum_size of this PositionClose. # noqa: E501 + :type: str + """ + + self._accum_size = accum_size + + @property + def first_open_time(self): + """Gets the first_open_time of this PositionClose. # noqa: E501 + + First Open Time # noqa: E501 + + :return: The first_open_time of this PositionClose. # noqa: E501 + :rtype: int + """ + return self._first_open_time + + @first_open_time.setter + def first_open_time(self, first_open_time): + """Sets the first_open_time of this PositionClose. + + First Open Time # noqa: E501 + + :param first_open_time: The first_open_time of this PositionClose. # noqa: E501 + :type: int + """ + + self._first_open_time = first_open_time + + @property + def long_price(self): + """Gets the long_price of this PositionClose. # noqa: E501 + + When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. # noqa: E501 + + :return: The long_price of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._long_price + + @long_price.setter + def long_price(self, long_price): + """Sets the long_price of this PositionClose. + + When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. # noqa: E501 + + :param long_price: The long_price of this PositionClose. # noqa: E501 + :type: str + """ + + self._long_price = long_price + + @property + def short_price(self): + """Gets the short_price of this PositionClose. # noqa: E501 + + When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price # noqa: E501 + + :return: The short_price of this PositionClose. # noqa: E501 + :rtype: str + """ + return self._short_price + + @short_price.setter + def short_price(self, short_price): + """Sets the short_price of this PositionClose. + + When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price # noqa: E501 + + :param short_price: The short_price of this PositionClose. # noqa: E501 + :type: str + """ + + self._short_price = short_price + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PositionClose): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PositionClose): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py new file mode 100644 index 0000000..c4a4bd3 --- /dev/null +++ b/gate_api/models/position_close_order.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PositionCloseOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'price': 'str', + 'is_liq': 'bool' + } + + attribute_map = { + 'id': 'id', + 'price': 'price', + 'is_liq': 'is_liq' + } + + def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, bool, Configuration) -> None + """PositionCloseOrder - a 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._price = None + self._is_liq = None + self.discriminator = None + + if id is not None: + self.id = id + if price is not None: + self.price = price + if is_liq is not None: + self.is_liq = is_liq + + @property + def id(self): + """Gets the id of this PositionCloseOrder. # noqa: E501 + + Close order ID # noqa: E501 + + :return: The id of this PositionCloseOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PositionCloseOrder. + + Close order ID # noqa: E501 + + :param id: The id of this PositionCloseOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def price(self): + """Gets the price of this PositionCloseOrder. # noqa: E501 + + Close order price # noqa: E501 + + :return: The price of this PositionCloseOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this PositionCloseOrder. + + Close order price # noqa: E501 + + :param price: The price of this PositionCloseOrder. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def is_liq(self): + """Gets the is_liq of this PositionCloseOrder. # noqa: E501 + + Is the close order from liquidation # noqa: E501 + + :return: The is_liq of this PositionCloseOrder. # noqa: E501 + :rtype: bool + """ + return self._is_liq + + @is_liq.setter + def is_liq(self, is_liq): + """Sets the is_liq of this PositionCloseOrder. + + Is the close order from liquidation # noqa: E501 + + :param is_liq: The is_liq of this PositionCloseOrder. # noqa: E501 + :type: bool + """ + + self._is_liq = is_liq + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PositionCloseOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PositionCloseOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py new file mode 100644 index 0000000..d433429 --- /dev/null +++ b/gate_api/models/profit_loss_range.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class ProfitLossRange(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'price_percentage': 'str', + 'implied_volatility_percentage': 'str', + 'profit_loss': 'str' + } + + attribute_map = { + 'price_percentage': 'price_percentage', + 'implied_volatility_percentage': 'implied_volatility_percentage', + 'profit_loss': 'profit_loss' + } + + def __init__(self, price_percentage=None, implied_volatility_percentage=None, profit_loss=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None + """ProfitLossRange - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._price_percentage = None + self._implied_volatility_percentage = None + self._profit_loss = None + self.discriminator = None + + if price_percentage is not None: + self.price_percentage = price_percentage + if implied_volatility_percentage is not None: + self.implied_volatility_percentage = implied_volatility_percentage + if profit_loss is not None: + self.profit_loss = profit_loss + + @property + def price_percentage(self): + """Gets the price_percentage of this ProfitLossRange. # noqa: E501 + + Percentage change in price # noqa: E501 + + :return: The price_percentage of this ProfitLossRange. # noqa: E501 + :rtype: str + """ + return self._price_percentage + + @price_percentage.setter + def price_percentage(self, price_percentage): + """Sets the price_percentage of this ProfitLossRange. + + Percentage change in price # noqa: E501 + + :param price_percentage: The price_percentage of this ProfitLossRange. # noqa: E501 + :type: str + """ + + self._price_percentage = price_percentage + + @property + def implied_volatility_percentage(self): + """Gets the implied_volatility_percentage of this ProfitLossRange. # noqa: E501 + + Percentage change in implied volatility # noqa: E501 + + :return: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 + :rtype: str + """ + return self._implied_volatility_percentage + + @implied_volatility_percentage.setter + def implied_volatility_percentage(self, implied_volatility_percentage): + """Sets the implied_volatility_percentage of this ProfitLossRange. + + Percentage change in implied volatility # noqa: E501 + + :param implied_volatility_percentage: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 + :type: str + """ + + self._implied_volatility_percentage = implied_volatility_percentage + + @property + def profit_loss(self): + """Gets the profit_loss of this ProfitLossRange. # noqa: E501 + + PNL # noqa: E501 + + :return: The profit_loss of this ProfitLossRange. # noqa: E501 + :rtype: str + """ + return self._profit_loss + + @profit_loss.setter + def profit_loss(self, profit_loss): + """Sets the profit_loss of this ProfitLossRange. + + PNL # noqa: E501 + + :param profit_loss: The profit_loss of this ProfitLossRange. # noqa: E501 + :type: str + """ + + self._profit_loss = profit_loss + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ProfitLossRange): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ProfitLossRange): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py new file mode 100644 index 0000000..44680a5 --- /dev/null +++ b/gate_api/models/rebate_user_info.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RebateUserInfo(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'invite_uid': 'int' + } + + attribute_map = { + 'invite_uid': 'invite_uid' + } + + def __init__(self, invite_uid=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """RebateUserInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._invite_uid = None + self.discriminator = None + + if invite_uid is not None: + self.invite_uid = invite_uid + + @property + def invite_uid(self): + """Gets the invite_uid of this RebateUserInfo. # noqa: E501 + + My inviter's UID # noqa: E501 + + :return: The invite_uid of this RebateUserInfo. # noqa: E501 + :rtype: int + """ + return self._invite_uid + + @invite_uid.setter + def invite_uid(self, invite_uid): + """Sets the invite_uid of this RebateUserInfo. + + My inviter's UID # noqa: E501 + + :param invite_uid: The invite_uid of this RebateUserInfo. # noqa: E501 + :type: int + """ + + self._invite_uid = invite_uid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RebateUserInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RebateUserInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py new file mode 100644 index 0000000..e1d0c9d --- /dev/null +++ b/gate_api/models/repay_currency_res.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayCurrencyRes(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'succeeded': 'bool', + 'label': 'str', + 'message': 'str', + 'currency': 'str', + 'repaid_principal': 'str', + 'repaid_interest': 'str' + } + + attribute_map = { + 'succeeded': 'succeeded', + 'label': 'label', + 'message': 'message', + 'currency': 'currency', + 'repaid_principal': 'repaid_principal', + 'repaid_interest': 'repaid_interest' + } + + def __init__(self, succeeded=None, label=None, message=None, currency=None, repaid_principal=None, repaid_interest=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, str, str, str, str, str, Configuration) -> None + """RepayCurrencyRes - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._succeeded = None + self._label = None + self._message = None + self._currency = None + self._repaid_principal = None + self._repaid_interest = None + self.discriminator = None + + if succeeded is not None: + self.succeeded = succeeded + if label is not None: + self.label = label + if message is not None: + self.message = message + if currency is not None: + self.currency = currency + if repaid_principal is not None: + self.repaid_principal = repaid_principal + if repaid_interest is not None: + self.repaid_interest = repaid_interest + + @property + def succeeded(self): + """Gets the succeeded of this RepayCurrencyRes. # noqa: E501 + + Has the repayment been successful # noqa: E501 + + :return: The succeeded of this RepayCurrencyRes. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this RepayCurrencyRes. + + Has the repayment been successful # noqa: E501 + + :param succeeded: The succeeded of this RepayCurrencyRes. # noqa: E501 + :type: bool + """ + + self._succeeded = succeeded + + @property + def label(self): + """Gets the label of this RepayCurrencyRes. # noqa: E501 + + Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + + :return: The label of this RepayCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this RepayCurrencyRes. + + Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + + :param label: The label of this RepayCurrencyRes. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def message(self): + """Gets the message of this RepayCurrencyRes. # noqa: E501 + + Error description in case of operation failure; empty when successful. # noqa: E501 + + :return: The message of this RepayCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this RepayCurrencyRes. + + Error description in case of operation failure; empty when successful. # noqa: E501 + + :param message: The message of this RepayCurrencyRes. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def currency(self): + """Gets the currency of this RepayCurrencyRes. # noqa: E501 + + Repayment currency # noqa: E501 + + :return: The currency of this RepayCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this RepayCurrencyRes. + + Repayment currency # noqa: E501 + + :param currency: The currency of this RepayCurrencyRes. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def repaid_principal(self): + """Gets the repaid_principal of this RepayCurrencyRes. # noqa: E501 + + Principal # noqa: E501 + + :return: The repaid_principal of this RepayCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._repaid_principal + + @repaid_principal.setter + def repaid_principal(self, repaid_principal): + """Sets the repaid_principal of this RepayCurrencyRes. + + Principal # noqa: E501 + + :param repaid_principal: The repaid_principal of this RepayCurrencyRes. # noqa: E501 + :type: str + """ + + self._repaid_principal = repaid_principal + + @property + def repaid_interest(self): + """Gets the repaid_interest of this RepayCurrencyRes. # noqa: E501 + + Principal # noqa: E501 + + :return: The repaid_interest of this RepayCurrencyRes. # noqa: E501 + :rtype: str + """ + return self._repaid_interest + + @repaid_interest.setter + def repaid_interest(self, repaid_interest): + """Sets the repaid_interest of this RepayCurrencyRes. + + Principal # noqa: E501 + + :param repaid_interest: The repaid_interest of this RepayCurrencyRes. # noqa: E501 + :type: str + """ + + self._repaid_interest = repaid_interest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayCurrencyRes): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayCurrencyRes): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py new file mode 100644 index 0000000..b60f41e --- /dev/null +++ b/gate_api/models/repay_loan.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayLoan(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'repay_amount': 'str', + 'repaid_all': 'bool' + } + + attribute_map = { + 'order_id': 'order_id', + 'repay_amount': 'repay_amount', + 'repaid_all': 'repaid_all' + } + + def __init__(self, order_id=None, repay_amount=None, repaid_all=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, bool, Configuration) -> None + """RepayLoan - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._repay_amount = None + self._repaid_all = None + self.discriminator = None + + self.order_id = order_id + self.repay_amount = repay_amount + self.repaid_all = repaid_all + + @property + def order_id(self): + """Gets the order_id of this RepayLoan. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this RepayLoan. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this RepayLoan. + + Order ID # noqa: E501 + + :param order_id: The order_id of this RepayLoan. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 + raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 + + self._order_id = order_id + + @property + def repay_amount(self): + """Gets the repay_amount of this RepayLoan. # noqa: E501 + + Repayment amount, it is mandatory when making partial repayments # noqa: E501 + + :return: The repay_amount of this RepayLoan. # noqa: E501 + :rtype: str + """ + return self._repay_amount + + @repay_amount.setter + def repay_amount(self, repay_amount): + """Sets the repay_amount of this RepayLoan. + + Repayment amount, it is mandatory when making partial repayments # noqa: E501 + + :param repay_amount: The repay_amount of this RepayLoan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and repay_amount is None: # noqa: E501 + raise ValueError("Invalid value for `repay_amount`, must not be `None`") # noqa: E501 + + self._repay_amount = repay_amount + + @property + def repaid_all(self): + """Gets the repaid_all of this RepayLoan. # noqa: E501 + + Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 + + :return: The repaid_all of this RepayLoan. # noqa: E501 + :rtype: bool + """ + return self._repaid_all + + @repaid_all.setter + def repaid_all(self, repaid_all): + """Sets the repaid_all of this RepayLoan. + + Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 + + :param repaid_all: The repaid_all of this RepayLoan. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and repaid_all is None: # noqa: E501 + raise ValueError("Invalid value for `repaid_all`, must not be `None`") # noqa: E501 + + self._repaid_all = repaid_all + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayLoan): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayLoan): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py new file mode 100644 index 0000000..086aee9 --- /dev/null +++ b/gate_api/models/repay_multi_loan.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayMultiLoan(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'repay_items': 'list[MultiLoanRepayItem]' + } + + attribute_map = { + 'order_id': 'order_id', + 'repay_items': 'repay_items' + } + + def __init__(self, order_id=None, repay_items=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[MultiLoanRepayItem], Configuration) -> None + """RepayMultiLoan - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._repay_items = None + self.discriminator = None + + self.order_id = order_id + self.repay_items = repay_items + + @property + def order_id(self): + """Gets the order_id of this RepayMultiLoan. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this RepayMultiLoan. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this RepayMultiLoan. + + Order ID # noqa: E501 + + :param order_id: The order_id of this RepayMultiLoan. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 + raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 + + self._order_id = order_id + + @property + def repay_items(self): + """Gets the repay_items of this RepayMultiLoan. # noqa: E501 + + Repay Currency Item # noqa: E501 + + :return: The repay_items of this RepayMultiLoan. # noqa: E501 + :rtype: list[MultiLoanRepayItem] + """ + return self._repay_items + + @repay_items.setter + def repay_items(self, repay_items): + """Sets the repay_items of this RepayMultiLoan. + + Repay Currency Item # noqa: E501 + + :param repay_items: The repay_items of this RepayMultiLoan. # noqa: E501 + :type: list[MultiLoanRepayItem] + """ + if self.local_vars_configuration.client_side_validation and repay_items is None: # noqa: E501 + raise ValueError("Invalid value for `repay_items`, must not be `None`") # noqa: E501 + + self._repay_items = repay_items + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayMultiLoan): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayMultiLoan): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py new file mode 100644 index 0000000..048d0e8 --- /dev/null +++ b/gate_api/models/repay_record.py @@ -0,0 +1,459 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'order_id': 'int', + 'record_id': 'int', + 'repaid_amount': 'str', + 'borrow_currency': 'str', + 'collateral_currency': 'str', + 'init_ltv': 'str', + 'borrow_time': 'int', + 'repay_time': 'int', + 'total_interest': 'str', + 'before_left_principal': 'str', + 'after_left_principal': 'str', + 'before_left_collateral': 'str', + 'after_left_collateral': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'record_id': 'record_id', + 'repaid_amount': 'repaid_amount', + 'borrow_currency': 'borrow_currency', + 'collateral_currency': 'collateral_currency', + 'init_ltv': 'init_ltv', + 'borrow_time': 'borrow_time', + 'repay_time': 'repay_time', + 'total_interest': 'total_interest', + 'before_left_principal': 'before_left_principal', + 'after_left_principal': 'after_left_principal', + 'before_left_collateral': 'before_left_collateral', + 'after_left_collateral': 'after_left_collateral' + } + + def __init__(self, order_id=None, record_id=None, repaid_amount=None, borrow_currency=None, collateral_currency=None, init_ltv=None, borrow_time=None, repay_time=None, total_interest=None, before_left_principal=None, after_left_principal=None, before_left_collateral=None, after_left_collateral=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, int, int, str, str, str, str, str, Configuration) -> None + """RepayRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._record_id = None + self._repaid_amount = None + self._borrow_currency = None + self._collateral_currency = None + self._init_ltv = None + self._borrow_time = None + self._repay_time = None + self._total_interest = None + self._before_left_principal = None + self._after_left_principal = None + self._before_left_collateral = None + self._after_left_collateral = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if record_id is not None: + self.record_id = record_id + if repaid_amount is not None: + self.repaid_amount = repaid_amount + if borrow_currency is not None: + self.borrow_currency = borrow_currency + if collateral_currency is not None: + self.collateral_currency = collateral_currency + if init_ltv is not None: + self.init_ltv = init_ltv + if borrow_time is not None: + self.borrow_time = borrow_time + if repay_time is not None: + self.repay_time = repay_time + if total_interest is not None: + self.total_interest = total_interest + if before_left_principal is not None: + self.before_left_principal = before_left_principal + if after_left_principal is not None: + self.after_left_principal = after_left_principal + if before_left_collateral is not None: + self.before_left_collateral = before_left_collateral + if after_left_collateral is not None: + self.after_left_collateral = after_left_collateral + + @property + def order_id(self): + """Gets the order_id of this RepayRecord. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this RepayRecord. # noqa: E501 + :rtype: int + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this RepayRecord. + + Order ID # noqa: E501 + + :param order_id: The order_id of this RepayRecord. # noqa: E501 + :type: int + """ + + self._order_id = order_id + + @property + def record_id(self): + """Gets the record_id of this RepayRecord. # noqa: E501 + + Repayment record ID # noqa: E501 + + :return: The record_id of this RepayRecord. # noqa: E501 + :rtype: int + """ + return self._record_id + + @record_id.setter + def record_id(self, record_id): + """Sets the record_id of this RepayRecord. + + Repayment record ID # noqa: E501 + + :param record_id: The record_id of this RepayRecord. # noqa: E501 + :type: int + """ + + self._record_id = record_id + + @property + def repaid_amount(self): + """Gets the repaid_amount of this RepayRecord. # noqa: E501 + + Repayment amount # noqa: E501 + + :return: The repaid_amount of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._repaid_amount + + @repaid_amount.setter + def repaid_amount(self, repaid_amount): + """Sets the repaid_amount of this RepayRecord. + + Repayment amount # noqa: E501 + + :param repaid_amount: The repaid_amount of this RepayRecord. # noqa: E501 + :type: str + """ + + self._repaid_amount = repaid_amount + + @property + def borrow_currency(self): + """Gets the borrow_currency of this RepayRecord. # noqa: E501 + + Borrowed currency # noqa: E501 + + :return: The borrow_currency of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._borrow_currency + + @borrow_currency.setter + def borrow_currency(self, borrow_currency): + """Sets the borrow_currency of this RepayRecord. + + Borrowed currency # noqa: E501 + + :param borrow_currency: The borrow_currency of this RepayRecord. # noqa: E501 + :type: str + """ + + self._borrow_currency = borrow_currency + + @property + def collateral_currency(self): + """Gets the collateral_currency of this RepayRecord. # noqa: E501 + + Collateral # noqa: E501 + + :return: The collateral_currency of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._collateral_currency + + @collateral_currency.setter + def collateral_currency(self, collateral_currency): + """Sets the collateral_currency of this RepayRecord. + + Collateral # noqa: E501 + + :param collateral_currency: The collateral_currency of this RepayRecord. # noqa: E501 + :type: str + """ + + self._collateral_currency = collateral_currency + + @property + def init_ltv(self): + """Gets the init_ltv of this RepayRecord. # noqa: E501 + + The initial collateralization rate # noqa: E501 + + :return: The init_ltv of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._init_ltv + + @init_ltv.setter + def init_ltv(self, init_ltv): + """Sets the init_ltv of this RepayRecord. + + The initial collateralization rate # noqa: E501 + + :param init_ltv: The init_ltv of this RepayRecord. # noqa: E501 + :type: str + """ + + self._init_ltv = init_ltv + + @property + def borrow_time(self): + """Gets the borrow_time of this RepayRecord. # noqa: E501 + + Borrowing time, timestamp # noqa: E501 + + :return: The borrow_time of this RepayRecord. # noqa: E501 + :rtype: int + """ + return self._borrow_time + + @borrow_time.setter + def borrow_time(self, borrow_time): + """Sets the borrow_time of this RepayRecord. + + Borrowing time, timestamp # noqa: E501 + + :param borrow_time: The borrow_time of this RepayRecord. # noqa: E501 + :type: int + """ + + self._borrow_time = borrow_time + + @property + def repay_time(self): + """Gets the repay_time of this RepayRecord. # noqa: E501 + + Repayment time, timestamp # noqa: E501 + + :return: The repay_time of this RepayRecord. # noqa: E501 + :rtype: int + """ + return self._repay_time + + @repay_time.setter + def repay_time(self, repay_time): + """Sets the repay_time of this RepayRecord. + + Repayment time, timestamp # noqa: E501 + + :param repay_time: The repay_time of this RepayRecord. # noqa: E501 + :type: int + """ + + self._repay_time = repay_time + + @property + def total_interest(self): + """Gets the total_interest of this RepayRecord. # noqa: E501 + + Total interest # noqa: E501 + + :return: The total_interest of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._total_interest + + @total_interest.setter + def total_interest(self, total_interest): + """Sets the total_interest of this RepayRecord. + + Total interest # noqa: E501 + + :param total_interest: The total_interest of this RepayRecord. # noqa: E501 + :type: str + """ + + self._total_interest = total_interest + + @property + def before_left_principal(self): + """Gets the before_left_principal of this RepayRecord. # noqa: E501 + + Principal to be repaid before repayment # noqa: E501 + + :return: The before_left_principal of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._before_left_principal + + @before_left_principal.setter + def before_left_principal(self, before_left_principal): + """Sets the before_left_principal of this RepayRecord. + + Principal to be repaid before repayment # noqa: E501 + + :param before_left_principal: The before_left_principal of this RepayRecord. # noqa: E501 + :type: str + """ + + self._before_left_principal = before_left_principal + + @property + def after_left_principal(self): + """Gets the after_left_principal of this RepayRecord. # noqa: E501 + + Principal to be repaid after repayment # noqa: E501 + + :return: The after_left_principal of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._after_left_principal + + @after_left_principal.setter + def after_left_principal(self, after_left_principal): + """Sets the after_left_principal of this RepayRecord. + + Principal to be repaid after repayment # noqa: E501 + + :param after_left_principal: The after_left_principal of this RepayRecord. # noqa: E501 + :type: str + """ + + self._after_left_principal = after_left_principal + + @property + def before_left_collateral(self): + """Gets the before_left_collateral of this RepayRecord. # noqa: E501 + + Collateral quantity before repayment # noqa: E501 + + :return: The before_left_collateral of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._before_left_collateral + + @before_left_collateral.setter + def before_left_collateral(self, before_left_collateral): + """Sets the before_left_collateral of this RepayRecord. + + Collateral quantity before repayment # noqa: E501 + + :param before_left_collateral: The before_left_collateral of this RepayRecord. # noqa: E501 + :type: str + """ + + self._before_left_collateral = before_left_collateral + + @property + def after_left_collateral(self): + """Gets the after_left_collateral of this RepayRecord. # noqa: E501 + + Collateral quantity after repayment # noqa: E501 + + :return: The after_left_collateral of this RepayRecord. # noqa: E501 + :rtype: str + """ + return self._after_left_collateral + + @after_left_collateral.setter + def after_left_collateral(self, after_left_collateral): + """Sets the after_left_collateral of this RepayRecord. + + Collateral quantity after repayment # noqa: E501 + + :param after_left_collateral: The after_left_collateral of this RepayRecord. # noqa: E501 + :type: str + """ + + self._after_left_collateral = after_left_collateral + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py new file mode 100644 index 0000000..7e78118 --- /dev/null +++ b/gate_api/models/repay_record_currency.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayRecordCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'before_amount': 'str', + 'before_amount_usdt': 'str', + 'after_amount': 'str', + 'after_amount_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'before_amount': 'before_amount', + 'before_amount_usdt': 'before_amount_usdt', + 'after_amount': 'after_amount', + 'after_amount_usdt': 'after_amount_usdt' + } + + def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """RepayRecordCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._before_amount = None + self._before_amount_usdt = None + self._after_amount = None + self._after_amount_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if before_amount is not None: + self.before_amount = before_amount + if before_amount_usdt is not None: + self.before_amount_usdt = before_amount_usdt + if after_amount is not None: + self.after_amount = after_amount + if after_amount_usdt is not None: + self.after_amount_usdt = after_amount_usdt + + @property + def currency(self): + """Gets the currency of this RepayRecordCurrency. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this RepayRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this RepayRecordCurrency. + + Currency # noqa: E501 + + :param currency: The currency of this RepayRecordCurrency. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this RepayRecordCurrency. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this RepayRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this RepayRecordCurrency. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this RepayRecordCurrency. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def before_amount(self): + """Gets the before_amount of this RepayRecordCurrency. # noqa: E501 + + Amount before the operation # noqa: E501 + + :return: The before_amount of this RepayRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._before_amount + + @before_amount.setter + def before_amount(self, before_amount): + """Sets the before_amount of this RepayRecordCurrency. + + Amount before the operation # noqa: E501 + + :param before_amount: The before_amount of this RepayRecordCurrency. # noqa: E501 + :type: str + """ + + self._before_amount = before_amount + + @property + def before_amount_usdt(self): + """Gets the before_amount_usdt of this RepayRecordCurrency. # noqa: E501 + + USDT Amount before the operation. # noqa: E501 + + :return: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._before_amount_usdt + + @before_amount_usdt.setter + def before_amount_usdt(self, before_amount_usdt): + """Sets the before_amount_usdt of this RepayRecordCurrency. + + USDT Amount before the operation. # noqa: E501 + + :param before_amount_usdt: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501 + :type: str + """ + + self._before_amount_usdt = before_amount_usdt + + @property + def after_amount(self): + """Gets the after_amount of this RepayRecordCurrency. # noqa: E501 + + Amount after the operation. # noqa: E501 + + :return: The after_amount of this RepayRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._after_amount + + @after_amount.setter + def after_amount(self, after_amount): + """Sets the after_amount of this RepayRecordCurrency. + + Amount after the operation. # noqa: E501 + + :param after_amount: The after_amount of this RepayRecordCurrency. # noqa: E501 + :type: str + """ + + self._after_amount = after_amount + + @property + def after_amount_usdt(self): + """Gets the after_amount_usdt of this RepayRecordCurrency. # noqa: E501 + + USDT Amount after the operation. # noqa: E501 + + :return: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501 + :rtype: str + """ + return self._after_amount_usdt + + @after_amount_usdt.setter + def after_amount_usdt(self, after_amount_usdt): + """Sets the after_amount_usdt of this RepayRecordCurrency. + + USDT Amount after the operation. # noqa: E501 + + :param after_amount_usdt: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501 + :type: str + """ + + self._after_amount_usdt = after_amount_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayRecordCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayRecordCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py new file mode 100644 index 0000000..ee3603e --- /dev/null +++ b/gate_api/models/repay_record_left_interest.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayRecordLeftInterest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'before_amount': 'str', + 'before_amount_usdt': 'str', + 'after_amount': 'str', + 'after_amount_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'before_amount': 'before_amount', + 'before_amount_usdt': 'before_amount_usdt', + 'after_amount': 'after_amount', + 'after_amount_usdt': 'after_amount_usdt' + } + + def __init__(self, currency=None, index_price=None, before_amount=None, before_amount_usdt=None, after_amount=None, after_amount_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """RepayRecordLeftInterest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._before_amount = None + self._before_amount_usdt = None + self._after_amount = None + self._after_amount_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if before_amount is not None: + self.before_amount = before_amount + if before_amount_usdt is not None: + self.before_amount_usdt = before_amount_usdt + if after_amount is not None: + self.after_amount = after_amount + if after_amount_usdt is not None: + self.after_amount_usdt = after_amount_usdt + + @property + def currency(self): + """Gets the currency of this RepayRecordLeftInterest. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this RepayRecordLeftInterest. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this RepayRecordLeftInterest. + + Currency # noqa: E501 + + :param currency: The currency of this RepayRecordLeftInterest. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this RepayRecordLeftInterest. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this RepayRecordLeftInterest. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this RepayRecordLeftInterest. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this RepayRecordLeftInterest. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def before_amount(self): + """Gets the before_amount of this RepayRecordLeftInterest. # noqa: E501 + + Interest amount before repayment # noqa: E501 + + :return: The before_amount of this RepayRecordLeftInterest. # noqa: E501 + :rtype: str + """ + return self._before_amount + + @before_amount.setter + def before_amount(self, before_amount): + """Sets the before_amount of this RepayRecordLeftInterest. + + Interest amount before repayment # noqa: E501 + + :param before_amount: The before_amount of this RepayRecordLeftInterest. # noqa: E501 + :type: str + """ + + self._before_amount = before_amount + + @property + def before_amount_usdt(self): + """Gets the before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 + + Converted value of interest before repayment in USDT # noqa: E501 + + :return: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 + :rtype: str + """ + return self._before_amount_usdt + + @before_amount_usdt.setter + def before_amount_usdt(self, before_amount_usdt): + """Sets the before_amount_usdt of this RepayRecordLeftInterest. + + Converted value of interest before repayment in USDT # noqa: E501 + + :param before_amount_usdt: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 + :type: str + """ + + self._before_amount_usdt = before_amount_usdt + + @property + def after_amount(self): + """Gets the after_amount of this RepayRecordLeftInterest. # noqa: E501 + + Interest amount after repayment # noqa: E501 + + :return: The after_amount of this RepayRecordLeftInterest. # noqa: E501 + :rtype: str + """ + return self._after_amount + + @after_amount.setter + def after_amount(self, after_amount): + """Sets the after_amount of this RepayRecordLeftInterest. + + Interest amount after repayment # noqa: E501 + + :param after_amount: The after_amount of this RepayRecordLeftInterest. # noqa: E501 + :type: str + """ + + self._after_amount = after_amount + + @property + def after_amount_usdt(self): + """Gets the after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 + + Converted value of interest after repayment in USDT # noqa: E501 + + :return: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 + :rtype: str + """ + return self._after_amount_usdt + + @after_amount_usdt.setter + def after_amount_usdt(self, after_amount_usdt): + """Sets the after_amount_usdt of this RepayRecordLeftInterest. + + Converted value of interest after repayment in USDT # noqa: E501 + + :param after_amount_usdt: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 + :type: str + """ + + self._after_amount_usdt = after_amount_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayRecordLeftInterest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayRecordLeftInterest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py new file mode 100644 index 0000000..e9283cb --- /dev/null +++ b/gate_api/models/repay_record_repaid_currency.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayRecordRepaidCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'repaid_amount': 'str', + 'repaid_principal': 'str', + 'repaid_interest': 'str', + 'repaid_amount_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'repaid_amount': 'repaid_amount', + 'repaid_principal': 'repaid_principal', + 'repaid_interest': 'repaid_interest', + 'repaid_amount_usdt': 'repaid_amount_usdt' + } + + def __init__(self, currency=None, index_price=None, repaid_amount=None, repaid_principal=None, repaid_interest=None, repaid_amount_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """RepayRecordRepaidCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._repaid_amount = None + self._repaid_principal = None + self._repaid_interest = None + self._repaid_amount_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if repaid_amount is not None: + self.repaid_amount = repaid_amount + if repaid_principal is not None: + self.repaid_principal = repaid_principal + if repaid_interest is not None: + self.repaid_interest = repaid_interest + if repaid_amount_usdt is not None: + self.repaid_amount_usdt = repaid_amount_usdt + + @property + def currency(self): + """Gets the currency of this RepayRecordRepaidCurrency. # noqa: E501 + + Repayment currency # noqa: E501 + + :return: The currency of this RepayRecordRepaidCurrency. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this RepayRecordRepaidCurrency. + + Repayment currency # noqa: E501 + + :param currency: The currency of this RepayRecordRepaidCurrency. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this RepayRecordRepaidCurrency. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this RepayRecordRepaidCurrency. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def repaid_amount(self): + """Gets the repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 + + Repayment amount # noqa: E501 + + :return: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 + :rtype: str + """ + return self._repaid_amount + + @repaid_amount.setter + def repaid_amount(self, repaid_amount): + """Sets the repaid_amount of this RepayRecordRepaidCurrency. + + Repayment amount # noqa: E501 + + :param repaid_amount: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 + :type: str + """ + + self._repaid_amount = repaid_amount + + @property + def repaid_principal(self): + """Gets the repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 + + Principal # noqa: E501 + + :return: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 + :rtype: str + """ + return self._repaid_principal + + @repaid_principal.setter + def repaid_principal(self, repaid_principal): + """Sets the repaid_principal of this RepayRecordRepaidCurrency. + + Principal # noqa: E501 + + :param repaid_principal: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 + :type: str + """ + + self._repaid_principal = repaid_principal + + @property + def repaid_interest(self): + """Gets the repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 + + Interest # noqa: E501 + + :return: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 + :rtype: str + """ + return self._repaid_interest + + @repaid_interest.setter + def repaid_interest(self, repaid_interest): + """Sets the repaid_interest of this RepayRecordRepaidCurrency. + + Interest # noqa: E501 + + :param repaid_interest: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 + :type: str + """ + + self._repaid_interest = repaid_interest + + @property + def repaid_amount_usdt(self): + """Gets the repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 + + Value of the repayment amount in USDT # noqa: E501 + + :return: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 + :rtype: str + """ + return self._repaid_amount_usdt + + @repaid_amount_usdt.setter + def repaid_amount_usdt(self, repaid_amount_usdt): + """Sets the repaid_amount_usdt of this RepayRecordRepaidCurrency. + + Value of the repayment amount in USDT # noqa: E501 + + :param repaid_amount_usdt: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 + :type: str + """ + + self._repaid_amount_usdt = repaid_amount_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayRecordRepaidCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayRecordRepaidCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py new file mode 100644 index 0000000..96e8c21 --- /dev/null +++ b/gate_api/models/repay_record_total_interest.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayRecordTotalInterest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'index_price': 'str', + 'amount': 'str', + 'amount_usdt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_price': 'index_price', + 'amount': 'amount', + 'amount_usdt': 'amount_usdt' + } + + def __init__(self, currency=None, index_price=None, amount=None, amount_usdt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """RepayRecordTotalInterest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_price = None + self._amount = None + self._amount_usdt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if index_price is not None: + self.index_price = index_price + if amount is not None: + self.amount = amount + if amount_usdt is not None: + self.amount_usdt = amount_usdt + + @property + def currency(self): + """Gets the currency of this RepayRecordTotalInterest. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this RepayRecordTotalInterest. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this RepayRecordTotalInterest. + + Currency # noqa: E501 + + :param currency: The currency of this RepayRecordTotalInterest. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def index_price(self): + """Gets the index_price of this RepayRecordTotalInterest. # noqa: E501 + + Currency Index Price # noqa: E501 + + :return: The index_price of this RepayRecordTotalInterest. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this RepayRecordTotalInterest. + + Currency Index Price # noqa: E501 + + :param index_price: The index_price of this RepayRecordTotalInterest. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def amount(self): + """Gets the amount of this RepayRecordTotalInterest. # noqa: E501 + + Interest Amount # noqa: E501 + + :return: The amount of this RepayRecordTotalInterest. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this RepayRecordTotalInterest. + + Interest Amount # noqa: E501 + + :param amount: The amount of this RepayRecordTotalInterest. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def amount_usdt(self): + """Gets the amount_usdt of this RepayRecordTotalInterest. # noqa: E501 + + Interest amount converted to USDT # noqa: E501 + + :return: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 + :rtype: str + """ + return self._amount_usdt + + @amount_usdt.setter + def amount_usdt(self, amount_usdt): + """Sets the amount_usdt of this RepayRecordTotalInterest. + + Interest amount converted to USDT # noqa: E501 + + :param amount_usdt: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 + :type: str + """ + + self._amount_usdt = amount_usdt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayRecordTotalInterest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayRecordTotalInterest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py new file mode 100644 index 0000000..498e604 --- /dev/null +++ b/gate_api/models/repay_resp.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RepayResp(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'repaid_principal': 'str', + 'repaid_interest': 'str' + } + + attribute_map = { + 'repaid_principal': 'repaid_principal', + 'repaid_interest': 'repaid_interest' + } + + def __init__(self, repaid_principal=None, repaid_interest=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """RepayResp - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._repaid_principal = None + self._repaid_interest = None + self.discriminator = None + + if repaid_principal is not None: + self.repaid_principal = repaid_principal + if repaid_interest is not None: + self.repaid_interest = repaid_interest + + @property + def repaid_principal(self): + """Gets the repaid_principal of this RepayResp. # noqa: E501 + + Principal # noqa: E501 + + :return: The repaid_principal of this RepayResp. # noqa: E501 + :rtype: str + """ + return self._repaid_principal + + @repaid_principal.setter + def repaid_principal(self, repaid_principal): + """Sets the repaid_principal of this RepayResp. + + Principal # noqa: E501 + + :param repaid_principal: The repaid_principal of this RepayResp. # noqa: E501 + :type: str + """ + + self._repaid_principal = repaid_principal + + @property + def repaid_interest(self): + """Gets the repaid_interest of this RepayResp. # noqa: E501 + + Interest # noqa: E501 + + :return: The repaid_interest of this RepayResp. # noqa: E501 + :rtype: str + """ + return self._repaid_interest + + @repaid_interest.setter + def repaid_interest(self, repaid_interest): + """Sets the repaid_interest of this RepayResp. + + Interest # noqa: E501 + + :param repaid_interest: The repaid_interest of this RepayResp. # noqa: E501 + :type: str + """ + + self._repaid_interest = repaid_interest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepayResp): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepayResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py new file mode 100644 index 0000000..041184a --- /dev/null +++ b/gate_api/models/risk_units.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class RiskUnits(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'symbol': 'str', + 'spot_in_use': 'str', + 'maintain_margin': 'str', + 'initial_margin': 'str', + 'delta': 'str', + 'gamma': 'str', + 'theta': 'str', + 'vega': 'str' + } + + attribute_map = { + 'symbol': 'symbol', + 'spot_in_use': 'spot_in_use', + 'maintain_margin': 'maintain_margin', + 'initial_margin': 'initial_margin', + 'delta': 'delta', + 'gamma': 'gamma', + 'theta': 'theta', + 'vega': 'vega' + } + + def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_margin=None, delta=None, gamma=None, theta=None, vega=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, Configuration) -> None + """RiskUnits - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._symbol = None + self._spot_in_use = None + self._maintain_margin = None + self._initial_margin = None + self._delta = None + self._gamma = None + self._theta = None + self._vega = None + self.discriminator = None + + if symbol is not None: + self.symbol = symbol + if spot_in_use is not None: + self.spot_in_use = spot_in_use + if maintain_margin is not None: + self.maintain_margin = maintain_margin + if initial_margin is not None: + self.initial_margin = initial_margin + if delta is not None: + self.delta = delta + if gamma is not None: + self.gamma = gamma + if theta is not None: + self.theta = theta + if vega is not None: + self.vega = vega + + @property + def symbol(self): + """Gets the symbol of this RiskUnits. # noqa: E501 + + Risk unit flag # noqa: E501 + + :return: The symbol of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._symbol + + @symbol.setter + def symbol(self, symbol): + """Sets the symbol of this RiskUnits. + + Risk unit flag # noqa: E501 + + :param symbol: The symbol of this RiskUnits. # noqa: E501 + :type: str + """ + + self._symbol = symbol + + @property + def spot_in_use(self): + """Gets the spot_in_use of this RiskUnits. # noqa: E501 + + Spot hedging utilization # noqa: E501 + + :return: The spot_in_use of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._spot_in_use + + @spot_in_use.setter + def spot_in_use(self, spot_in_use): + """Sets the spot_in_use of this RiskUnits. + + Spot hedging utilization # noqa: E501 + + :param spot_in_use: The spot_in_use of this RiskUnits. # noqa: E501 + :type: str + """ + + self._spot_in_use = spot_in_use + + @property + def maintain_margin(self): + """Gets the maintain_margin of this RiskUnits. # noqa: E501 + + Maintenance margin for risk unit # noqa: E501 + + :return: The maintain_margin of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._maintain_margin + + @maintain_margin.setter + def maintain_margin(self, maintain_margin): + """Sets the maintain_margin of this RiskUnits. + + Maintenance margin for risk unit # noqa: E501 + + :param maintain_margin: The maintain_margin of this RiskUnits. # noqa: E501 + :type: str + """ + + self._maintain_margin = maintain_margin + + @property + def initial_margin(self): + """Gets the initial_margin of this RiskUnits. # noqa: E501 + + Initial margin for risk unit # noqa: E501 + + :return: The initial_margin of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._initial_margin + + @initial_margin.setter + def initial_margin(self, initial_margin): + """Sets the initial_margin of this RiskUnits. + + Initial margin for risk unit # noqa: E501 + + :param initial_margin: The initial_margin of this RiskUnits. # noqa: E501 + :type: str + """ + + self._initial_margin = initial_margin + + @property + def delta(self): + """Gets the delta of this RiskUnits. # noqa: E501 + + Total Delta of risk unit # noqa: E501 + + :return: The delta of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._delta + + @delta.setter + def delta(self, delta): + """Sets the delta of this RiskUnits. + + Total Delta of risk unit # noqa: E501 + + :param delta: The delta of this RiskUnits. # noqa: E501 + :type: str + """ + + self._delta = delta + + @property + def gamma(self): + """Gets the gamma of this RiskUnits. # noqa: E501 + + Total Gamma of risk unit # noqa: E501 + + :return: The gamma of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._gamma + + @gamma.setter + def gamma(self, gamma): + """Sets the gamma of this RiskUnits. + + Total Gamma of risk unit # noqa: E501 + + :param gamma: The gamma of this RiskUnits. # noqa: E501 + :type: str + """ + + self._gamma = gamma + + @property + def theta(self): + """Gets the theta of this RiskUnits. # noqa: E501 + + Total Theta of risk unit # noqa: E501 + + :return: The theta of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._theta + + @theta.setter + def theta(self, theta): + """Sets the theta of this RiskUnits. + + Total Theta of risk unit # noqa: E501 + + :param theta: The theta of this RiskUnits. # noqa: E501 + :type: str + """ + + self._theta = theta + + @property + def vega(self): + """Gets the vega of this RiskUnits. # noqa: E501 + + Total Vega of risk unit # noqa: E501 + + :return: The vega of this RiskUnits. # noqa: E501 + :rtype: str + """ + return self._vega + + @vega.setter + def vega(self, vega): + """Sets the vega of this RiskUnits. + + Total Vega of risk unit # noqa: E501 + + :param vega: The vega of this RiskUnits. # noqa: E501 + :type: str + """ + + self._vega = vega + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RiskUnits): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RiskUnits): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py new file mode 100644 index 0000000..e5abe91 --- /dev/null +++ b/gate_api/models/saved_address.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SavedAddress(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'chain': 'str', + 'address': 'str', + 'name': 'str', + 'tag': 'str', + 'verified': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'chain': 'chain', + 'address': 'address', + 'name': 'name', + 'tag': 'tag', + 'verified': 'verified' + } + + def __init__(self, currency=None, chain=None, address=None, name=None, tag=None, verified=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """SavedAddress - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._chain = None + self._address = None + self._name = None + self._tag = None + self._verified = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if chain is not None: + self.chain = chain + if address is not None: + self.address = address + if name is not None: + self.name = name + if tag is not None: + self.tag = tag + if verified is not None: + self.verified = verified + + @property + def currency(self): + """Gets the currency of this SavedAddress. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this SavedAddress. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SavedAddress. + + Currency # noqa: E501 + + :param currency: The currency of this SavedAddress. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def chain(self): + """Gets the chain of this SavedAddress. # noqa: E501 + + Chain name # noqa: E501 + + :return: The chain of this SavedAddress. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this SavedAddress. + + Chain name # noqa: E501 + + :param chain: The chain of this SavedAddress. # noqa: E501 + :type: str + """ + + self._chain = chain + + @property + def address(self): + """Gets the address of this SavedAddress. # noqa: E501 + + Address # noqa: E501 + + :return: The address of this SavedAddress. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this SavedAddress. + + Address # noqa: E501 + + :param address: The address of this SavedAddress. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def name(self): + """Gets the name of this SavedAddress. # noqa: E501 + + Name # noqa: E501 + + :return: The name of this SavedAddress. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SavedAddress. + + Name # noqa: E501 + + :param name: The name of this SavedAddress. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tag(self): + """Gets the tag of this SavedAddress. # noqa: E501 + + Tag # noqa: E501 + + :return: The tag of this SavedAddress. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this SavedAddress. + + Tag # noqa: E501 + + :param tag: The tag of this SavedAddress. # noqa: E501 + :type: str + """ + + self._tag = tag + + @property + def verified(self): + """Gets the verified of this SavedAddress. # noqa: E501 + + Whether to pass the verification 0-unverified, 1-verified # noqa: E501 + + :return: The verified of this SavedAddress. # noqa: E501 + :rtype: str + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this SavedAddress. + + Whether to pass the verification 0-unverified, 1-verified # noqa: E501 + + :param verified: The verified of this SavedAddress. # noqa: E501 + :type: str + """ + + self._verified = verified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SavedAddress): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SavedAddress): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py new file mode 100644 index 0000000..3aa0ec8 --- /dev/null +++ b/gate_api/models/small_balance.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SmallBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'available_balance': 'str', + 'estimated_as_btc': 'str', + 'convertible_to_gt': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'available_balance': 'available_balance', + 'estimated_as_btc': 'estimated_as_btc', + 'convertible_to_gt': 'convertible_to_gt' + } + + def __init__(self, currency=None, available_balance=None, estimated_as_btc=None, convertible_to_gt=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """SmallBalance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._available_balance = None + self._estimated_as_btc = None + self._convertible_to_gt = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if available_balance is not None: + self.available_balance = available_balance + if estimated_as_btc is not None: + self.estimated_as_btc = estimated_as_btc + if convertible_to_gt is not None: + self.convertible_to_gt = convertible_to_gt + + @property + def currency(self): + """Gets the currency of this SmallBalance. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this SmallBalance. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SmallBalance. + + Currency # noqa: E501 + + :param currency: The currency of this SmallBalance. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def available_balance(self): + """Gets the available_balance of this SmallBalance. # noqa: E501 + + Available balance # noqa: E501 + + :return: The available_balance of this SmallBalance. # noqa: E501 + :rtype: str + """ + return self._available_balance + + @available_balance.setter + def available_balance(self, available_balance): + """Sets the available_balance of this SmallBalance. + + Available balance # noqa: E501 + + :param available_balance: The available_balance of this SmallBalance. # noqa: E501 + :type: str + """ + + self._available_balance = available_balance + + @property + def estimated_as_btc(self): + """Gets the estimated_as_btc of this SmallBalance. # noqa: E501 + + Estimated as BTC # noqa: E501 + + :return: The estimated_as_btc of this SmallBalance. # noqa: E501 + :rtype: str + """ + return self._estimated_as_btc + + @estimated_as_btc.setter + def estimated_as_btc(self, estimated_as_btc): + """Sets the estimated_as_btc of this SmallBalance. + + Estimated as BTC # noqa: E501 + + :param estimated_as_btc: The estimated_as_btc of this SmallBalance. # noqa: E501 + :type: str + """ + + self._estimated_as_btc = estimated_as_btc + + @property + def convertible_to_gt(self): + """Gets the convertible_to_gt of this SmallBalance. # noqa: E501 + + Estimated conversion to GT # noqa: E501 + + :return: The convertible_to_gt of this SmallBalance. # noqa: E501 + :rtype: str + """ + return self._convertible_to_gt + + @convertible_to_gt.setter + def convertible_to_gt(self, convertible_to_gt): + """Sets the convertible_to_gt of this SmallBalance. + + Estimated conversion to GT # noqa: E501 + + :param convertible_to_gt: The convertible_to_gt of this SmallBalance. # noqa: E501 + :type: str + """ + + self._convertible_to_gt = convertible_to_gt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmallBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SmallBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py new file mode 100644 index 0000000..d770b75 --- /dev/null +++ b/gate_api/models/small_balance_history.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SmallBalanceHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'currency': 'str', + 'amount': 'str', + 'gt_amount': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'id': 'id', + 'currency': 'currency', + 'amount': 'amount', + 'gt_amount': 'gt_amount', + 'create_time': 'create_time' + } + + def __init__(self, id=None, currency=None, amount=None, gt_amount=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, Configuration) -> None + """SmallBalanceHistory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._currency = None + self._amount = None + self._gt_amount = None + self._create_time = None + self.discriminator = None + + if id is not None: + self.id = id + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + if gt_amount is not None: + self.gt_amount = gt_amount + if create_time is not None: + self.create_time = create_time + + @property + def id(self): + """Gets the id of this SmallBalanceHistory. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this SmallBalanceHistory. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SmallBalanceHistory. + + Order ID # noqa: E501 + + :param id: The id of this SmallBalanceHistory. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def currency(self): + """Gets the currency of this SmallBalanceHistory. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this SmallBalanceHistory. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SmallBalanceHistory. + + Currency # noqa: E501 + + :param currency: The currency of this SmallBalanceHistory. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this SmallBalanceHistory. # noqa: E501 + + amount # noqa: E501 + + :return: The amount of this SmallBalanceHistory. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SmallBalanceHistory. + + amount # noqa: E501 + + :param amount: The amount of this SmallBalanceHistory. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def gt_amount(self): + """Gets the gt_amount of this SmallBalanceHistory. # noqa: E501 + + GT amount # noqa: E501 + + :return: The gt_amount of this SmallBalanceHistory. # noqa: E501 + :rtype: str + """ + return self._gt_amount + + @gt_amount.setter + def gt_amount(self, gt_amount): + """Sets the gt_amount of this SmallBalanceHistory. + + GT amount # noqa: E501 + + :param gt_amount: The gt_amount of this SmallBalanceHistory. # noqa: E501 + :type: str + """ + + self._gt_amount = gt_amount + + @property + def create_time(self): + """Gets the create_time of this SmallBalanceHistory. # noqa: E501 + + Exchange time (in seconds) # noqa: E501 + + :return: The create_time of this SmallBalanceHistory. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this SmallBalanceHistory. + + Exchange time (in seconds) # noqa: E501 + + :param create_time: The create_time of this SmallBalanceHistory. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmallBalanceHistory): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SmallBalanceHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py new file mode 100644 index 0000000..42601bf --- /dev/null +++ b/gate_api/models/spot_account.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class 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', + 'refresh_time': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'available': 'available', + 'locked': 'locked', + 'update_id': 'update_id', + 'refresh_time': 'refresh_time' + } + + def __init__(self, currency=None, available=None, locked=None, update_id=None, refresh_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, 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._refresh_time = 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 + if refresh_time is not None: + self.refresh_time = refresh_time + + @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 + + @property + def refresh_time(self): + """Gets the refresh_time of this SpotAccount. # noqa: E501 + + Asset Refresh Time (ms) # noqa: E501 + + :return: The refresh_time of this SpotAccount. # noqa: E501 + :rtype: int + """ + return self._refresh_time + + @refresh_time.setter + def refresh_time(self, refresh_time): + """Sets the refresh_time of this SpotAccount. + + Asset Refresh Time (ms) # noqa: E501 + + :param refresh_time: The refresh_time of this SpotAccount. # noqa: E501 + :type: int + """ + + self._refresh_time = refresh_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, 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_account_book.py b/gate_api/models/spot_account_book.py new file mode 100644 index 0000000..4dea7cd --- /dev/null +++ b/gate_api/models/spot_account_book.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotAccountBook(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'time': 'int', + 'currency': 'str', + 'change': 'str', + 'balance': 'str', + 'type': 'str', + 'code': 'str', + 'text': 'str' + } + + attribute_map = { + 'id': 'id', + 'time': 'time', + 'currency': 'currency', + 'change': 'change', + 'balance': 'balance', + 'type': 'type', + 'code': 'code', + 'text': 'text' + } + + def __init__(self, id=None, time=None, currency=None, change=None, balance=None, type=None, code=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, str, str, str, str, Configuration) -> None + """SpotAccountBook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._time = None + self._currency = None + self._change = None + self._balance = None + self._type = None + self._code = None + self._text = None + self.discriminator = None + + if id is not None: + self.id = id + if time is not None: + self.time = time + if currency is not None: + self.currency = currency + if change is not None: + self.change = change + if balance is not None: + self.balance = balance + if type is not None: + self.type = type + if code is not None: + self.code = code + if text is not None: + self.text = text + + @property + def id(self): + """Gets the id of this SpotAccountBook. # noqa: E501 + + Balance change record ID # noqa: E501 + + :return: The id of this SpotAccountBook. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SpotAccountBook. + + Balance change record ID # noqa: E501 + + :param id: The id of this SpotAccountBook. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def time(self): + """Gets the time of this SpotAccountBook. # noqa: E501 + + The timestamp of the change (in milliseconds) # noqa: E501 + + :return: The time of this SpotAccountBook. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this SpotAccountBook. + + The timestamp of the change (in milliseconds) # noqa: E501 + + :param time: The time of this SpotAccountBook. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def currency(self): + """Gets the currency of this SpotAccountBook. # noqa: E501 + + Currency changed # noqa: E501 + + :return: The currency of this SpotAccountBook. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SpotAccountBook. + + Currency changed # noqa: E501 + + :param currency: The currency of this SpotAccountBook. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def change(self): + """Gets the change of this SpotAccountBook. # noqa: E501 + + Amount changed. Positive value means transferring in, while negative out # noqa: E501 + + :return: The change of this SpotAccountBook. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this SpotAccountBook. + + Amount changed. Positive value means transferring in, while negative out # noqa: E501 + + :param change: The change of this SpotAccountBook. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def balance(self): + """Gets the balance of this SpotAccountBook. # noqa: E501 + + Balance after change # noqa: E501 + + :return: The balance of this SpotAccountBook. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this SpotAccountBook. + + Balance after change # noqa: E501 + + :param balance: The balance of this SpotAccountBook. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def type(self): + """Gets the type of this SpotAccountBook. # noqa: E501 + + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + + :return: The type of this SpotAccountBook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SpotAccountBook. + + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + + :param type: The type of this SpotAccountBook. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def code(self): + """Gets the code of this SpotAccountBook. # noqa: E501 + + Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 + + :return: The code of this SpotAccountBook. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this SpotAccountBook. + + Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 + + :param code: The code of this SpotAccountBook. # noqa: E501 + :type: str + """ + + self._code = code + + @property + def text(self): + """Gets the text of this SpotAccountBook. # noqa: E501 + + Additional information # noqa: E501 + + :return: The text of this SpotAccountBook. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this SpotAccountBook. + + Additional information # noqa: E501 + + :param text: The text of this SpotAccountBook. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotAccountBook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotAccountBook): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py new file mode 100644 index 0000000..7e9773b --- /dev/null +++ b/gate_api/models/spot_currency_chain.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotCurrencyChain(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'addr': 'str', + 'withdraw_disabled': 'bool', + 'withdraw_delayed': 'bool', + 'deposit_disabled': 'bool' + } + + attribute_map = { + 'name': 'name', + 'addr': 'addr', + 'withdraw_disabled': 'withdraw_disabled', + 'withdraw_delayed': 'withdraw_delayed', + 'deposit_disabled': 'deposit_disabled' + } + + def __init__(self, name=None, addr=None, withdraw_disabled=None, withdraw_delayed=None, deposit_disabled=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, bool, bool, bool, Configuration) -> None + """SpotCurrencyChain - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._addr = None + self._withdraw_disabled = None + self._withdraw_delayed = None + self._deposit_disabled = None + self.discriminator = None + + if name is not None: + self.name = name + if addr is not None: + self.addr = addr + if withdraw_disabled is not None: + self.withdraw_disabled = withdraw_disabled + if withdraw_delayed is not None: + self.withdraw_delayed = withdraw_delayed + if deposit_disabled is not None: + self.deposit_disabled = deposit_disabled + + @property + def name(self): + """Gets the name of this SpotCurrencyChain. # noqa: E501 + + Chain name # noqa: E501 + + :return: The name of this SpotCurrencyChain. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SpotCurrencyChain. + + Chain name # noqa: E501 + + :param name: The name of this SpotCurrencyChain. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def addr(self): + """Gets the addr of this SpotCurrencyChain. # noqa: E501 + + token address # noqa: E501 + + :return: The addr of this SpotCurrencyChain. # noqa: E501 + :rtype: str + """ + return self._addr + + @addr.setter + def addr(self, addr): + """Sets the addr of this SpotCurrencyChain. + + token address # noqa: E501 + + :param addr: The addr of this SpotCurrencyChain. # noqa: E501 + :type: str + """ + + self._addr = addr + + @property + def withdraw_disabled(self): + """Gets the withdraw_disabled of this SpotCurrencyChain. # noqa: E501 + + Whether currency's withdrawal is disabled # noqa: E501 + + :return: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 + :rtype: bool + """ + return self._withdraw_disabled + + @withdraw_disabled.setter + def withdraw_disabled(self, withdraw_disabled): + """Sets the withdraw_disabled of this SpotCurrencyChain. + + Whether currency's withdrawal is disabled # noqa: E501 + + :param withdraw_disabled: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 + :type: bool + """ + + self._withdraw_disabled = withdraw_disabled + + @property + def withdraw_delayed(self): + """Gets the withdraw_delayed of this SpotCurrencyChain. # noqa: E501 + + Whether currency's withdrawal is delayed # noqa: E501 + + :return: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 + :rtype: bool + """ + return self._withdraw_delayed + + @withdraw_delayed.setter + def withdraw_delayed(self, withdraw_delayed): + """Sets the withdraw_delayed of this SpotCurrencyChain. + + Whether currency's withdrawal is delayed # noqa: E501 + + :param withdraw_delayed: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 + :type: bool + """ + + self._withdraw_delayed = withdraw_delayed + + @property + def deposit_disabled(self): + """Gets the deposit_disabled of this SpotCurrencyChain. # noqa: E501 + + Whether currency's deposit is disabled # noqa: E501 + + :return: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 + :rtype: bool + """ + return self._deposit_disabled + + @deposit_disabled.setter + def deposit_disabled(self, deposit_disabled): + """Sets the deposit_disabled of this SpotCurrencyChain. + + Whether currency's deposit is disabled # noqa: E501 + + :param deposit_disabled: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 + :type: bool + """ + + self._deposit_disabled = deposit_disabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotCurrencyChain): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotCurrencyChain): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py new file mode 100644 index 0000000..9f0308b --- /dev/null +++ b/gate_api/models/spot_fee.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotFee(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'taker_fee': 'str', + 'maker_fee': 'str', + 'gt_discount': 'bool', + 'gt_taker_fee': 'str', + 'gt_maker_fee': 'str', + 'loan_fee': 'str', + 'point_type': 'str', + 'currency_pair': 'str', + 'debit_fee': 'int' + } + + attribute_map = { + 'user_id': 'user_id', + 'taker_fee': 'taker_fee', + 'maker_fee': 'maker_fee', + 'gt_discount': 'gt_discount', + 'gt_taker_fee': 'gt_taker_fee', + 'gt_maker_fee': 'gt_maker_fee', + 'loan_fee': 'loan_fee', + 'point_type': 'point_type', + 'currency_pair': 'currency_pair', + 'debit_fee': 'debit_fee' + } + + def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=None, gt_taker_fee=None, gt_maker_fee=None, loan_fee=None, point_type=None, currency_pair=None, debit_fee=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, bool, str, str, str, str, str, int, Configuration) -> None + """SpotFee - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._taker_fee = None + self._maker_fee = None + self._gt_discount = None + self._gt_taker_fee = None + self._gt_maker_fee = None + self._loan_fee = None + self._point_type = None + self._currency_pair = None + self._debit_fee = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if taker_fee is not None: + self.taker_fee = taker_fee + if maker_fee is not None: + self.maker_fee = maker_fee + if gt_discount is not None: + self.gt_discount = gt_discount + if gt_taker_fee is not None: + self.gt_taker_fee = gt_taker_fee + if gt_maker_fee is not None: + self.gt_maker_fee = gt_maker_fee + if loan_fee is not None: + self.loan_fee = loan_fee + if point_type is not None: + self.point_type = point_type + if currency_pair is not None: + self.currency_pair = currency_pair + if debit_fee is not None: + self.debit_fee = debit_fee + + @property + def user_id(self): + """Gets the user_id of this SpotFee. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this SpotFee. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SpotFee. + + User ID # noqa: E501 + + :param user_id: The user_id of this SpotFee. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def taker_fee(self): + """Gets the taker_fee of this SpotFee. # noqa: E501 + + taker fee rate # noqa: E501 + + :return: The taker_fee of this SpotFee. # noqa: E501 + :rtype: str + """ + return self._taker_fee + + @taker_fee.setter + def taker_fee(self, taker_fee): + """Sets the taker_fee of this SpotFee. + + taker fee rate # noqa: E501 + + :param taker_fee: The taker_fee of this SpotFee. # noqa: E501 + :type: str + """ + + self._taker_fee = taker_fee + + @property + def maker_fee(self): + """Gets the maker_fee of this SpotFee. # noqa: E501 + + maker fee rate # noqa: E501 + + :return: The maker_fee of this SpotFee. # noqa: E501 + :rtype: str + """ + return self._maker_fee + + @maker_fee.setter + def maker_fee(self, maker_fee): + """Sets the maker_fee of this SpotFee. + + maker fee rate # noqa: E501 + + :param maker_fee: The maker_fee of this SpotFee. # noqa: E501 + :type: str + """ + + self._maker_fee = maker_fee + + @property + def gt_discount(self): + """Gets the gt_discount of this SpotFee. # noqa: E501 + + If GT deduction is enabled # noqa: E501 + + :return: The gt_discount of this SpotFee. # noqa: E501 + :rtype: bool + """ + return self._gt_discount + + @gt_discount.setter + def gt_discount(self, gt_discount): + """Sets the gt_discount of this SpotFee. + + If GT deduction is enabled # noqa: E501 + + :param gt_discount: The gt_discount of this SpotFee. # noqa: E501 + :type: bool + """ + + self._gt_discount = gt_discount + + @property + def gt_taker_fee(self): + """Gets the gt_taker_fee of this SpotFee. # noqa: E501 + + Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :return: The gt_taker_fee of this SpotFee. # noqa: E501 + :rtype: str + """ + return self._gt_taker_fee + + @gt_taker_fee.setter + def gt_taker_fee(self, gt_taker_fee): + """Sets the gt_taker_fee of this SpotFee. + + Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :param gt_taker_fee: The gt_taker_fee of this SpotFee. # noqa: E501 + :type: str + """ + + self._gt_taker_fee = gt_taker_fee + + @property + def gt_maker_fee(self): + """Gets the gt_maker_fee of this SpotFee. # noqa: E501 + + Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :return: The gt_maker_fee of this SpotFee. # noqa: E501 + :rtype: str + """ + return self._gt_maker_fee + + @gt_maker_fee.setter + def gt_maker_fee(self, gt_maker_fee): + """Sets the gt_maker_fee of this SpotFee. + + Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :param gt_maker_fee: The gt_maker_fee of this SpotFee. # noqa: E501 + :type: str + """ + + self._gt_maker_fee = gt_maker_fee + + @property + def loan_fee(self): + """Gets the loan_fee of this SpotFee. # noqa: E501 + + Loan fee rate of margin lending # noqa: E501 + + :return: The loan_fee of this SpotFee. # noqa: E501 + :rtype: str + """ + return self._loan_fee + + @loan_fee.setter + def loan_fee(self, loan_fee): + """Sets the loan_fee of this SpotFee. + + Loan fee rate of margin lending # noqa: E501 + + :param loan_fee: The loan_fee of this SpotFee. # noqa: E501 + :type: str + """ + + self._loan_fee = loan_fee + + @property + def point_type(self): + """Gets the point_type of this SpotFee. # noqa: E501 + + Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + + :return: The point_type of this SpotFee. # noqa: E501 + :rtype: str + """ + return self._point_type + + @point_type.setter + def point_type(self, point_type): + """Sets the point_type of this SpotFee. + + Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + + :param point_type: The point_type of this SpotFee. # noqa: E501 + :type: str + """ + + self._point_type = point_type + + @property + def currency_pair(self): + """Gets the currency_pair of this SpotFee. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this SpotFee. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this SpotFee. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this SpotFee. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def debit_fee(self): + """Gets the debit_fee of this SpotFee. # noqa: E501 + + Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 + + :return: The debit_fee of this SpotFee. # noqa: E501 + :rtype: int + """ + return self._debit_fee + + @debit_fee.setter + def debit_fee(self, debit_fee): + """Sets the debit_fee of this SpotFee. + + Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 + + :param debit_fee: The debit_fee of this SpotFee. # noqa: E501 + :type: int + """ + + self._debit_fee = debit_fee + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotFee): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotFee): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py new file mode 100644 index 0000000..8f6d141 --- /dev/null +++ b/gate_api/models/spot_insurance_history.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotInsuranceHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'balance': 'str', + 'time': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'balance': 'balance', + 'time': 'time' + } + + def __init__(self, currency=None, balance=None, time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, Configuration) -> None + """SpotInsuranceHistory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._balance = None + self._time = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if balance is not None: + self.balance = balance + if time is not None: + self.time = time + + @property + def currency(self): + """Gets the currency of this SpotInsuranceHistory. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this SpotInsuranceHistory. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SpotInsuranceHistory. + + Currency # noqa: E501 + + :param currency: The currency of this SpotInsuranceHistory. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def balance(self): + """Gets the balance of this SpotInsuranceHistory. # noqa: E501 + + balance # noqa: E501 + + :return: The balance of this SpotInsuranceHistory. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this SpotInsuranceHistory. + + balance # noqa: E501 + + :param balance: The balance of this SpotInsuranceHistory. # noqa: E501 + :type: str + """ + + self._balance = balance + + @property + def time(self): + """Gets the time of this SpotInsuranceHistory. # noqa: E501 + + Creation time, timestamp, milliseconds # noqa: E501 + + :return: The time of this SpotInsuranceHistory. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this SpotInsuranceHistory. + + Creation time, timestamp, milliseconds # noqa: E501 + + :param time: The time of this SpotInsuranceHistory. # noqa: E501 + :type: int + """ + + self._time = time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotInsuranceHistory): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotInsuranceHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py new file mode 100644 index 0000000..ba0deed --- /dev/null +++ b/gate_api/models/spot_price_put_order.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotPricePutOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'side': 'str', + 'price': 'str', + 'amount': 'str', + 'account': 'str', + 'time_in_force': 'str', + 'auto_borrow': 'bool', + 'auto_repay': 'bool', + 'text': 'str' + } + + attribute_map = { + 'type': 'type', + 'side': 'side', + 'price': 'price', + 'amount': 'amount', + 'account': 'account', + 'time_in_force': 'time_in_force', + 'auto_borrow': 'auto_borrow', + 'auto_repay': 'auto_repay', + 'text': 'text' + } + + def __init__(self, type='limit', side=None, price=None, amount=None, account='normal', time_in_force='gtc', auto_borrow=False, auto_repay=False, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, bool, bool, str, Configuration) -> None + """SpotPricePutOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._type = None + self._side = None + self._price = None + self._amount = None + self._account = None + self._time_in_force = None + self._auto_borrow = None + self._auto_repay = None + self._text = None + self.discriminator = None + + if type is not None: + self.type = type + self.side = side + self.price = price + self.amount = amount + self.account = account + if time_in_force is not None: + self.time_in_force = time_in_force + if auto_borrow is not None: + self.auto_borrow = auto_borrow + if auto_repay is not None: + self.auto_repay = auto_repay + if text is not None: + self.text = text + + @property + def type(self): + """Gets the type of this SpotPricePutOrder. # noqa: E501 + + Order type,default to `limit` - limit : Limit Order - market : Market Order # noqa: E501 + + :return: The type of this SpotPricePutOrder. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SpotPricePutOrder. + + Order type,default to `limit` - limit : Limit Order - market : Market Order # noqa: E501 + + :param type: The type of this SpotPricePutOrder. # noqa: E501 + :type: str + """ + allowed_values = ["limit", "market"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def side(self): + """Gets the side of this SpotPricePutOrder. # noqa: E501 + + Order side - buy: buy side - sell: sell side # noqa: E501 + + :return: The side of this SpotPricePutOrder. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this SpotPricePutOrder. + + Order side - buy: buy side - sell: sell side # noqa: E501 + + :param side: The side of this SpotPricePutOrder. # 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 price(self): + """Gets the price of this SpotPricePutOrder. # noqa: E501 + + Order price # noqa: E501 + + :return: The price of this SpotPricePutOrder. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this SpotPricePutOrder. + + Order price # noqa: E501 + + :param price: The price of this SpotPricePutOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 + raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 + + self._price = price + + @property + def amount(self): + """Gets the amount of this SpotPricePutOrder. # noqa: E501 + + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + + :return: The amount of this SpotPricePutOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SpotPricePutOrder. + + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + + :param amount: The amount of this SpotPricePutOrder. # 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 account(self): + """Gets the account of this SpotPricePutOrder. # noqa: E501 + + Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 + + :return: The account of this SpotPricePutOrder. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this SpotPricePutOrder. + + Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 + + :param account: The account of this SpotPricePutOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and account is None: # noqa: E501 + raise ValueError("Invalid value for `account`, must not be `None`") # noqa: E501 + allowed_values = ["normal", "margin", "unified"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and account not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `account` ({0}), must be one of {1}" # noqa: E501 + .format(account, allowed_values) + ) + + self._account = account + + @property + def time_in_force(self): + """Gets the time_in_force of this SpotPricePutOrder. # noqa: E501 + + time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only # noqa: E501 + + :return: The time_in_force of this SpotPricePutOrder. # 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 SpotPricePutOrder. + + time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only # noqa: E501 + + :param time_in_force: The time_in_force of this SpotPricePutOrder. # noqa: E501 + :type: str + """ + allowed_values = ["gtc", "ioc"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and time_in_force not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `time_in_force` ({0}), must be one of {1}" # noqa: E501 + .format(time_in_force, allowed_values) + ) + + self._time_in_force = time_in_force + + @property + def auto_borrow(self): + """Gets the auto_borrow of this SpotPricePutOrder. # noqa: E501 + + Whether to borrow coins automatically # noqa: E501 + + :return: The auto_borrow of this SpotPricePutOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_borrow + + @auto_borrow.setter + def auto_borrow(self, auto_borrow): + """Sets the auto_borrow of this SpotPricePutOrder. + + Whether to borrow coins automatically # noqa: E501 + + :param auto_borrow: The auto_borrow of this SpotPricePutOrder. # noqa: E501 + :type: bool + """ + + self._auto_borrow = auto_borrow + + @property + def auto_repay(self): + """Gets the auto_repay of this SpotPricePutOrder. # noqa: E501 + + Whether to repay the loan automatically # noqa: E501 + + :return: The auto_repay of this SpotPricePutOrder. # noqa: E501 + :rtype: bool + """ + return self._auto_repay + + @auto_repay.setter + def auto_repay(self, auto_repay): + """Sets the auto_repay of this SpotPricePutOrder. + + Whether to repay the loan automatically # noqa: E501 + + :param auto_repay: The auto_repay of this SpotPricePutOrder. # noqa: E501 + :type: bool + """ + + self._auto_repay = auto_repay + + @property + def text(self): + """Gets the text of this SpotPricePutOrder. # noqa: E501 + + The source of the order, including: - web: web - api: api - app: app # noqa: E501 + + :return: The text of this SpotPricePutOrder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this SpotPricePutOrder. + + The source of the order, including: - web: web - api: api - app: app # noqa: E501 + + :param text: The text of this SpotPricePutOrder. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotPricePutOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotPricePutOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py new file mode 100644 index 0000000..41f2447 --- /dev/null +++ b/gate_api/models/spot_price_trigger.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotPriceTrigger(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'price': 'str', + 'rule': 'str', + 'expiration': 'int' + } + + attribute_map = { + 'price': 'price', + 'rule': 'rule', + 'expiration': 'expiration' + } + + def __init__(self, price=None, rule=None, expiration=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, Configuration) -> None + """SpotPriceTrigger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._price = None + self._rule = None + self._expiration = None + self.discriminator = None + + self.price = price + self.rule = rule + self.expiration = expiration + + @property + def price(self): + """Gets the price of this SpotPriceTrigger. # noqa: E501 + + Trigger price # noqa: E501 + + :return: The price of this SpotPriceTrigger. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this SpotPriceTrigger. + + Trigger price # noqa: E501 + + :param price: The price of this SpotPriceTrigger. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and price is None: # noqa: E501 + raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 + + self._price = price + + @property + def rule(self): + """Gets the rule of this SpotPriceTrigger. # noqa: E501 + + Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501 + + :return: The rule of this SpotPriceTrigger. # noqa: E501 + :rtype: str + """ + return self._rule + + @rule.setter + def rule(self, rule): + """Sets the rule of this SpotPriceTrigger. + + Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501 + + :param rule: The rule of this SpotPriceTrigger. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and rule is None: # noqa: E501 + raise ValueError("Invalid value for `rule`, must not be `None`") # noqa: E501 + allowed_values = [">=", "<="] # noqa: E501 + if self.local_vars_configuration.client_side_validation and rule not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `rule` ({0}), must be one of {1}" # noqa: E501 + .format(rule, allowed_values) + ) + + self._rule = rule + + @property + def expiration(self): + """Gets the expiration of this SpotPriceTrigger. # noqa: E501 + + How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + + :return: The expiration of this SpotPriceTrigger. # noqa: E501 + :rtype: int + """ + return self._expiration + + @expiration.setter + def expiration(self, expiration): + """Sets the expiration of this SpotPriceTrigger. + + How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + + :param expiration: The expiration of this SpotPriceTrigger. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and expiration is None: # noqa: E501 + raise ValueError("Invalid value for `expiration`, must not be `None`") # noqa: E501 + + self._expiration = expiration + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotPriceTrigger): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotPriceTrigger): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py new file mode 100644 index 0000000..36d9bfe --- /dev/null +++ b/gate_api/models/spot_price_triggered_order.py @@ -0,0 +1,374 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SpotPriceTriggeredOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'SpotPriceTrigger', + 'put': 'SpotPricePutOrder', + 'id': 'int', + 'user': 'int', + 'market': 'str', + 'ctime': 'int', + 'ftime': 'int', + 'fired_order_id': 'int', + 'status': 'str', + 'reason': 'str' + } + + attribute_map = { + 'trigger': 'trigger', + 'put': 'put', + 'id': 'id', + 'user': 'user', + 'market': 'market', + 'ctime': 'ctime', + 'ftime': 'ftime', + 'fired_order_id': 'fired_order_id', + 'status': 'status', + 'reason': 'reason' + } + + def __init__(self, trigger=None, put=None, id=None, user=None, market=None, ctime=None, ftime=None, fired_order_id=None, status=None, reason=None, local_vars_configuration=None): # noqa: E501 + # type: (SpotPriceTrigger, SpotPricePutOrder, int, int, str, int, int, int, str, str, Configuration) -> None + """SpotPriceTriggeredOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._trigger = None + self._put = None + self._id = None + self._user = None + self._market = None + self._ctime = None + self._ftime = None + self._fired_order_id = None + self._status = None + self._reason = None + self.discriminator = None + + self.trigger = trigger + self.put = put + if id is not None: + self.id = id + if user is not None: + self.user = user + self.market = market + if ctime is not None: + self.ctime = ctime + if ftime is not None: + self.ftime = ftime + if fired_order_id is not None: + self.fired_order_id = fired_order_id + if status is not None: + self.status = status + if reason is not None: + self.reason = reason + + @property + def trigger(self): + """Gets the trigger of this SpotPriceTriggeredOrder. # noqa: E501 + + + :return: The trigger of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: SpotPriceTrigger + """ + return self._trigger + + @trigger.setter + def trigger(self, trigger): + """Sets the trigger of this SpotPriceTriggeredOrder. + + + :param trigger: The trigger of this SpotPriceTriggeredOrder. # noqa: E501 + :type: SpotPriceTrigger + """ + if self.local_vars_configuration.client_side_validation and trigger is None: # noqa: E501 + raise ValueError("Invalid value for `trigger`, must not be `None`") # noqa: E501 + + self._trigger = trigger + + @property + def put(self): + """Gets the put of this SpotPriceTriggeredOrder. # noqa: E501 + + + :return: The put of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: SpotPricePutOrder + """ + return self._put + + @put.setter + def put(self, put): + """Sets the put of this SpotPriceTriggeredOrder. + + + :param put: The put of this SpotPriceTriggeredOrder. # noqa: E501 + :type: SpotPricePutOrder + """ + if self.local_vars_configuration.client_side_validation and put is None: # noqa: E501 + raise ValueError("Invalid value for `put`, must not be `None`") # noqa: E501 + + self._put = put + + @property + def id(self): + """Gets the id of this SpotPriceTriggeredOrder. # noqa: E501 + + Auto order ID # noqa: E501 + + :return: The id of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SpotPriceTriggeredOrder. + + Auto order ID # noqa: E501 + + :param id: The id of this SpotPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def user(self): + """Gets the user of this SpotPriceTriggeredOrder. # noqa: E501 + + User ID # noqa: E501 + + :return: The user of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this SpotPriceTriggeredOrder. + + User ID # noqa: E501 + + :param user: The user of this SpotPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._user = user + + @property + def market(self): + """Gets the market of this SpotPriceTriggeredOrder. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The market of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._market + + @market.setter + def market(self, market): + """Sets the market of this SpotPriceTriggeredOrder. + + Currency pair # noqa: E501 + + :param market: The market of this SpotPriceTriggeredOrder. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and market is None: # noqa: E501 + raise ValueError("Invalid value for `market`, must not be `None`") # noqa: E501 + + self._market = market + + @property + def ctime(self): + """Gets the ctime of this SpotPriceTriggeredOrder. # noqa: E501 + + Creation time # noqa: E501 + + :return: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._ctime + + @ctime.setter + def ctime(self, ctime): + """Sets the ctime of this SpotPriceTriggeredOrder. + + Creation time # noqa: E501 + + :param ctime: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._ctime = ctime + + @property + def ftime(self): + """Gets the ftime of this SpotPriceTriggeredOrder. # noqa: E501 + + Finished time # noqa: E501 + + :return: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._ftime + + @ftime.setter + def ftime(self, ftime): + """Sets the ftime of this SpotPriceTriggeredOrder. + + Finished time # noqa: E501 + + :param ftime: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._ftime = ftime + + @property + def fired_order_id(self): + """Gets the fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 + + ID of the newly created order on condition triggered # noqa: E501 + + :return: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: int + """ + return self._fired_order_id + + @fired_order_id.setter + def fired_order_id(self, fired_order_id): + """Sets the fired_order_id of this SpotPriceTriggeredOrder. + + ID of the newly created order on condition triggered # noqa: E501 + + :param fired_order_id: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 + :type: int + """ + + self._fired_order_id = fired_order_id + + @property + def status(self): + """Gets the status of this SpotPriceTriggeredOrder. # noqa: E501 + + Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501 + + :return: The status of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this SpotPriceTriggeredOrder. + + Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501 + + :param status: The status of this SpotPriceTriggeredOrder. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def reason(self): + """Gets the reason of this SpotPriceTriggeredOrder. # noqa: E501 + + Additional remarks on how the order was finished # noqa: E501 + + :return: The reason of this SpotPriceTriggeredOrder. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this SpotPriceTriggeredOrder. + + Additional remarks on how the order was finished # noqa: E501 + + :param reason: The reason of this SpotPriceTriggeredOrder. # noqa: E501 + :type: str + """ + + self._reason = reason + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpotPriceTriggeredOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SpotPriceTriggeredOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py new file mode 100644 index 0000000..70da380 --- /dev/null +++ b/gate_api/models/stp_group.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class StpGroup(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'name': 'str', + 'creator_id': 'int', + 'create_time': 'int' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'creator_id': 'creator_id', + 'create_time': 'create_time' + } + + def __init__(self, id=None, name=None, creator_id=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, int, Configuration) -> None + """StpGroup - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._creator_id = None + self._create_time = None + self.discriminator = None + + if id is not None: + self.id = id + self.name = name + if creator_id is not None: + self.creator_id = creator_id + if create_time is not None: + self.create_time = create_time + + @property + def id(self): + """Gets the id of this StpGroup. # noqa: E501 + + STP Group ID # noqa: E501 + + :return: The id of this StpGroup. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StpGroup. + + STP Group ID # noqa: E501 + + :param id: The id of this StpGroup. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this StpGroup. # noqa: E501 + + STP Group name # noqa: E501 + + :return: The name of this StpGroup. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this StpGroup. + + STP Group name # noqa: E501 + + :param name: The name of this StpGroup. # 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 creator_id(self): + """Gets the creator_id of this StpGroup. # noqa: E501 + + Creator ID # noqa: E501 + + :return: The creator_id of this StpGroup. # noqa: E501 + :rtype: int + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this StpGroup. + + Creator ID # noqa: E501 + + :param creator_id: The creator_id of this StpGroup. # noqa: E501 + :type: int + """ + + self._creator_id = creator_id + + @property + def create_time(self): + """Gets the create_time of this StpGroup. # noqa: E501 + + Creation time # noqa: E501 + + :return: The create_time of this StpGroup. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this StpGroup. + + Creation time # noqa: E501 + + :param create_time: The create_time of this StpGroup. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StpGroup): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StpGroup): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py new file mode 100644 index 0000000..776f7b2 --- /dev/null +++ b/gate_api/models/stp_group_user.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class StpGroupUser(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'stp_id': 'int', + 'create_time': 'int' + } + + attribute_map = { + 'user_id': 'user_id', + 'stp_id': 'stp_id', + 'create_time': 'create_time' + } + + def __init__(self, user_id=None, stp_id=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, Configuration) -> None + """StpGroupUser - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._stp_id = None + self._create_time = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if stp_id is not None: + self.stp_id = stp_id + if create_time is not None: + self.create_time = create_time + + @property + def user_id(self): + """Gets the user_id of this StpGroupUser. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this StpGroupUser. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this StpGroupUser. + + User ID # noqa: E501 + + :param user_id: The user_id of this StpGroupUser. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def stp_id(self): + """Gets the stp_id of this StpGroupUser. # noqa: E501 + + STP Group ID # noqa: E501 + + :return: The stp_id of this StpGroupUser. # noqa: E501 + :rtype: int + """ + return self._stp_id + + @stp_id.setter + def stp_id(self, stp_id): + """Sets the stp_id of this StpGroupUser. + + STP Group ID # noqa: E501 + + :param stp_id: The stp_id of this StpGroupUser. # noqa: E501 + :type: int + """ + + self._stp_id = stp_id + + @property + def create_time(self): + """Gets the create_time of this StpGroupUser. # noqa: E501 + + Creation time # noqa: E501 + + :return: The create_time of this StpGroupUser. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this StpGroupUser. + + Creation time # noqa: E501 + + :param create_time: The create_time of this StpGroupUser. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StpGroupUser): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StpGroupUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py new file mode 100644 index 0000000..4c495b1 --- /dev/null +++ b/gate_api/models/structured_buy.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class StructuredBuy(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pid': 'str', + 'amount': 'str' + } + + attribute_map = { + 'pid': 'pid', + 'amount': 'amount' + } + + def __init__(self, pid=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """StructuredBuy - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pid = None + self._amount = None + self.discriminator = None + + if pid is not None: + self.pid = pid + if amount is not None: + self.amount = amount + + @property + def pid(self): + """Gets the pid of this StructuredBuy. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The pid of this StructuredBuy. # noqa: E501 + :rtype: str + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this StructuredBuy. + + Plan ID # noqa: E501 + + :param pid: The pid of this StructuredBuy. # noqa: E501 + :type: str + """ + + self._pid = pid + + @property + def amount(self): + """Gets the amount of this StructuredBuy. # noqa: E501 + + Purchase Amount # noqa: E501 + + :return: The amount of this StructuredBuy. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this StructuredBuy. + + Purchase Amount # noqa: E501 + + :param amount: The amount of this StructuredBuy. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StructuredBuy): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StructuredBuy): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py new file mode 100644 index 0000000..a051a06 --- /dev/null +++ b/gate_api/models/structured_get_project_list.py @@ -0,0 +1,431 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class StructuredGetProjectList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'type': 'str', + 'name_en': 'str', + 'investment_coin': 'str', + 'investment_period': 'str', + 'min_annual_rate': 'str', + 'mid_annual_rate': 'str', + 'max_annual_rate': 'str', + 'watch_market': 'str', + 'start_time': 'int', + 'end_time': 'int', + 'status': 'str' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'name_en': 'name_en', + 'investment_coin': 'investment_coin', + 'investment_period': 'investment_period', + 'min_annual_rate': 'min_annual_rate', + 'mid_annual_rate': 'mid_annual_rate', + 'max_annual_rate': 'max_annual_rate', + 'watch_market': 'watch_market', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'status': 'status' + } + + def __init__(self, id=None, type=None, name_en=None, investment_coin=None, investment_period=None, min_annual_rate=None, mid_annual_rate=None, max_annual_rate=None, watch_market=None, start_time=None, end_time=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, str, str, str, int, int, str, Configuration) -> None + """StructuredGetProjectList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._type = None + self._name_en = None + self._investment_coin = None + self._investment_period = None + self._min_annual_rate = None + self._mid_annual_rate = None + self._max_annual_rate = None + self._watch_market = None + self._start_time = None + self._end_time = None + self._status = None + self.discriminator = None + + if id is not None: + self.id = id + if type is not None: + self.type = type + if name_en is not None: + self.name_en = name_en + if investment_coin is not None: + self.investment_coin = investment_coin + if investment_period is not None: + self.investment_period = investment_period + if min_annual_rate is not None: + self.min_annual_rate = min_annual_rate + if mid_annual_rate is not None: + self.mid_annual_rate = mid_annual_rate + if max_annual_rate is not None: + self.max_annual_rate = max_annual_rate + if watch_market is not None: + self.watch_market = watch_market + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if status is not None: + self.status = status + + @property + def id(self): + """Gets the id of this StructuredGetProjectList. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The id of this StructuredGetProjectList. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StructuredGetProjectList. + + Plan ID # noqa: E501 + + :param id: The id of this StructuredGetProjectList. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def type(self): + """Gets the type of this StructuredGetProjectList. # noqa: E501 + + product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 + + :return: The type of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this StructuredGetProjectList. + + product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 + + :param type: The type of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def name_en(self): + """Gets the name_en of this StructuredGetProjectList. # noqa: E501 + + name # noqa: E501 + + :return: The name_en of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._name_en + + @name_en.setter + def name_en(self, name_en): + """Sets the name_en of this StructuredGetProjectList. + + name # noqa: E501 + + :param name_en: The name_en of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._name_en = name_en + + @property + def investment_coin(self): + """Gets the investment_coin of this StructuredGetProjectList. # noqa: E501 + + Investment Currency # noqa: E501 + + :return: The investment_coin of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._investment_coin + + @investment_coin.setter + def investment_coin(self, investment_coin): + """Sets the investment_coin of this StructuredGetProjectList. + + Investment Currency # noqa: E501 + + :param investment_coin: The investment_coin of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._investment_coin = investment_coin + + @property + def investment_period(self): + """Gets the investment_period of this StructuredGetProjectList. # noqa: E501 + + Investment term # noqa: E501 + + :return: The investment_period of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._investment_period + + @investment_period.setter + def investment_period(self, investment_period): + """Sets the investment_period of this StructuredGetProjectList. + + Investment term # noqa: E501 + + :param investment_period: The investment_period of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._investment_period = investment_period + + @property + def min_annual_rate(self): + """Gets the min_annual_rate of this StructuredGetProjectList. # noqa: E501 + + Minimum annual rate # noqa: E501 + + :return: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._min_annual_rate + + @min_annual_rate.setter + def min_annual_rate(self, min_annual_rate): + """Sets the min_annual_rate of this StructuredGetProjectList. + + Minimum annual rate # noqa: E501 + + :param min_annual_rate: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._min_annual_rate = min_annual_rate + + @property + def mid_annual_rate(self): + """Gets the mid_annual_rate of this StructuredGetProjectList. # noqa: E501 + + Intermediate annual rate # noqa: E501 + + :return: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._mid_annual_rate + + @mid_annual_rate.setter + def mid_annual_rate(self, mid_annual_rate): + """Sets the mid_annual_rate of this StructuredGetProjectList. + + Intermediate annual rate # noqa: E501 + + :param mid_annual_rate: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._mid_annual_rate = mid_annual_rate + + @property + def max_annual_rate(self): + """Gets the max_annual_rate of this StructuredGetProjectList. # noqa: E501 + + Maximum annual rate # noqa: E501 + + :return: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._max_annual_rate + + @max_annual_rate.setter + def max_annual_rate(self, max_annual_rate): + """Sets the max_annual_rate of this StructuredGetProjectList. + + Maximum annual rate # noqa: E501 + + :param max_annual_rate: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._max_annual_rate = max_annual_rate + + @property + def watch_market(self): + """Gets the watch_market of this StructuredGetProjectList. # noqa: E501 + + Watch market # noqa: E501 + + :return: The watch_market of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._watch_market + + @watch_market.setter + def watch_market(self, watch_market): + """Sets the watch_market of this StructuredGetProjectList. + + Watch market # noqa: E501 + + :param watch_market: The watch_market of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._watch_market = watch_market + + @property + def start_time(self): + """Gets the start_time of this StructuredGetProjectList. # noqa: E501 + + start time # noqa: E501 + + :return: The start_time of this StructuredGetProjectList. # noqa: E501 + :rtype: int + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this StructuredGetProjectList. + + start time # noqa: E501 + + :param start_time: The start_time of this StructuredGetProjectList. # noqa: E501 + :type: int + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this StructuredGetProjectList. # noqa: E501 + + Finished time # noqa: E501 + + :return: The end_time of this StructuredGetProjectList. # noqa: E501 + :rtype: int + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this StructuredGetProjectList. + + Finished time # noqa: E501 + + :param end_time: The end_time of this StructuredGetProjectList. # noqa: E501 + :type: int + """ + + self._end_time = end_time + + @property + def status(self): + """Gets the status of this StructuredGetProjectList. # noqa: E501 + + Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done # noqa: E501 + + :return: The status of this StructuredGetProjectList. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this StructuredGetProjectList. + + Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done # noqa: E501 + + :param status: The status of this StructuredGetProjectList. # noqa: E501 + :type: str + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StructuredGetProjectList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StructuredGetProjectList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py new file mode 100644 index 0000000..43911a9 --- /dev/null +++ b/gate_api/models/structured_order_list.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class StructuredOrderList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'pid': 'str', + 'lock_coin': 'str', + 'amount': 'str', + 'status': 'str', + 'income': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'id': 'id', + 'pid': 'pid', + 'lock_coin': 'lock_coin', + 'amount': 'amount', + 'status': 'status', + 'income': 'income', + 'create_time': 'create_time' + } + + def __init__(self, id=None, pid=None, lock_coin=None, amount=None, status=None, income=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, int, Configuration) -> None + """StructuredOrderList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._pid = None + self._lock_coin = None + self._amount = None + self._status = None + self._income = None + self._create_time = None + self.discriminator = None + + if id is not None: + self.id = id + if pid is not None: + self.pid = pid + if lock_coin is not None: + self.lock_coin = lock_coin + if amount is not None: + self.amount = amount + if status is not None: + self.status = status + if income is not None: + self.income = income + if create_time is not None: + self.create_time = create_time + + @property + def id(self): + """Gets the id of this StructuredOrderList. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this StructuredOrderList. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StructuredOrderList. + + Order ID # noqa: E501 + + :param id: The id of this StructuredOrderList. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def pid(self): + """Gets the pid of this StructuredOrderList. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The pid of this StructuredOrderList. # noqa: E501 + :rtype: str + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this StructuredOrderList. + + Plan ID # noqa: E501 + + :param pid: The pid of this StructuredOrderList. # noqa: E501 + :type: str + """ + + self._pid = pid + + @property + def lock_coin(self): + """Gets the lock_coin of this StructuredOrderList. # noqa: E501 + + Locked coin # noqa: E501 + + :return: The lock_coin of this StructuredOrderList. # noqa: E501 + :rtype: str + """ + return self._lock_coin + + @lock_coin.setter + def lock_coin(self, lock_coin): + """Sets the lock_coin of this StructuredOrderList. + + Locked coin # noqa: E501 + + :param lock_coin: The lock_coin of this StructuredOrderList. # noqa: E501 + :type: str + """ + + self._lock_coin = lock_coin + + @property + def amount(self): + """Gets the amount of this StructuredOrderList. # noqa: E501 + + Locked amount # noqa: E501 + + :return: The amount of this StructuredOrderList. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this StructuredOrderList. + + Locked amount # noqa: E501 + + :param amount: The amount of this StructuredOrderList. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def status(self): + """Gets the status of this StructuredOrderList. # noqa: E501 + + Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE # noqa: E501 + + :return: The status of this StructuredOrderList. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this StructuredOrderList. + + Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE # noqa: E501 + + :param status: The status of this StructuredOrderList. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def income(self): + """Gets the income of this StructuredOrderList. # noqa: E501 + + Income # noqa: E501 + + :return: The income of this StructuredOrderList. # noqa: E501 + :rtype: str + """ + return self._income + + @income.setter + def income(self, income): + """Sets the income of this StructuredOrderList. + + Income # noqa: E501 + + :param income: The income of this StructuredOrderList. # noqa: E501 + :type: str + """ + + self._income = income + + @property + def create_time(self): + """Gets the create_time of this StructuredOrderList. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this StructuredOrderList. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this StructuredOrderList. + + Created time # noqa: E501 + + :param create_time: The create_time of this StructuredOrderList. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StructuredOrderList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StructuredOrderList): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py new file mode 100644 index 0000000..f94b684 --- /dev/null +++ b/gate_api/models/sub_account.py @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'remark': 'str', + 'login_name': 'str', + 'password': 'str', + 'email': 'str', + 'state': 'int', + 'type': 'int', + 'user_id': 'int', + 'create_time': 'int' + } + + attribute_map = { + 'remark': 'remark', + 'login_name': 'login_name', + 'password': 'password', + 'email': 'email', + 'state': 'state', + 'type': 'type', + 'user_id': 'user_id', + 'create_time': 'create_time' + } + + def __init__(self, remark=None, login_name=None, password=None, email=None, state=None, type=None, user_id=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, int, int, int, Configuration) -> None + """SubAccount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._remark = None + self._login_name = None + self._password = None + self._email = None + self._state = None + self._type = None + self._user_id = None + self._create_time = None + self.discriminator = None + + if remark is not None: + self.remark = remark + self.login_name = login_name + if password is not None: + self.password = password + if email is not None: + self.email = email + if state is not None: + self.state = state + if type is not None: + self.type = type + if user_id is not None: + self.user_id = user_id + if create_time is not None: + self.create_time = create_time + + @property + def remark(self): + """Gets the remark of this SubAccount. # noqa: E501 + + custom text # noqa: E501 + + :return: The remark of this SubAccount. # noqa: E501 + :rtype: str + """ + return self._remark + + @remark.setter + def remark(self, remark): + """Sets the remark of this SubAccount. + + custom text # noqa: E501 + + :param remark: The remark of this SubAccount. # noqa: E501 + :type: str + """ + + self._remark = remark + + @property + def login_name(self): + """Gets the login_name of this SubAccount. # noqa: E501 + + Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501 + + :return: The login_name of this SubAccount. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this SubAccount. + + Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501 + + :param login_name: The login_name of this SubAccount. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and login_name is None: # noqa: E501 + raise ValueError("Invalid value for `login_name`, must not be `None`") # noqa: E501 + + self._login_name = login_name + + @property + def password(self): + """Gets the password of this SubAccount. # noqa: E501 + + The sub-account's password. (Default: the same as main account's password) # noqa: E501 + + :return: The password of this SubAccount. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this SubAccount. + + The sub-account's password. (Default: the same as main account's password) # noqa: E501 + + :param password: The password of this SubAccount. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def email(self): + """Gets the email of this SubAccount. # noqa: E501 + + The sub-account's email address. (Default: the same as main account's email address) # noqa: E501 + + :return: The email of this SubAccount. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this SubAccount. + + The sub-account's email address. (Default: the same as main account's email address) # noqa: E501 + + :param email: The email of this SubAccount. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def state(self): + """Gets the state of this SubAccount. # noqa: E501 + + State: 1-normal, 2-locked\" # noqa: E501 + + :return: The state of this SubAccount. # noqa: E501 + :rtype: int + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this SubAccount. + + State: 1-normal, 2-locked\" # noqa: E501 + + :param state: The state of this SubAccount. # noqa: E501 + :type: int + """ + + self._state = state + + @property + def type(self): + """Gets the type of this SubAccount. # noqa: E501 + + \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501 + + :return: The type of this SubAccount. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SubAccount. + + \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501 + + :param type: The type of this SubAccount. # noqa: E501 + :type: int + """ + + self._type = type + + @property + def user_id(self): + """Gets the user_id of this SubAccount. # noqa: E501 + + The user id of the sub-account # noqa: E501 + + :return: The user_id of this SubAccount. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SubAccount. + + The user id of the sub-account # noqa: E501 + + :param user_id: The user_id of this SubAccount. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def create_time(self): + """Gets the create_time of this SubAccount. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this SubAccount. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this SubAccount. + + Created time # noqa: E501 + + :param create_time: The create_time of this SubAccount. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py new file mode 100644 index 0000000..4f321cc --- /dev/null +++ b/gate_api/models/sub_account_balance.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'available': 'dict(str, str)' + } + + attribute_map = { + 'uid': 'uid', + 'available': 'available' + } + + def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 + # type: (str, dict(str, str), Configuration) -> None + """SubAccountBalance - a 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._available = None + self.discriminator = None + + if uid is not None: + self.uid = uid + if available is not None: + self.available = available + + @property + def uid(self): + """Gets the uid of this SubAccountBalance. # noqa: E501 + + User ID # noqa: E501 + + :return: The uid of this SubAccountBalance. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SubAccountBalance. + + User ID # noqa: E501 + + :param uid: The uid of this SubAccountBalance. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def available(self): + """Gets the available of this SubAccountBalance. # noqa: E501 + + Available balances of currencies # noqa: E501 + + :return: The available of this SubAccountBalance. # noqa: E501 + :rtype: dict(str, str) + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this SubAccountBalance. + + Available balances of currencies # noqa: E501 + + :param available: The available of this SubAccountBalance. # noqa: E501 + :type: dict(str, str) + """ + + self._available = available + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccountBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py new file mode 100644 index 0000000..cfb4539 --- /dev/null +++ b/gate_api/models/sub_account_cross_margin_balance.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountCrossMarginBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'available': 'SubCrossMarginAccount' + } + + attribute_map = { + 'uid': 'uid', + 'available': 'available' + } + + def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 + # type: (str, SubCrossMarginAccount, Configuration) -> None + """SubAccountCrossMarginBalance - a 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._available = None + self.discriminator = None + + if uid is not None: + self.uid = uid + if available is not None: + self.available = available + + @property + def uid(self): + """Gets the uid of this SubAccountCrossMarginBalance. # noqa: E501 + + User ID # noqa: E501 + + :return: The uid of this SubAccountCrossMarginBalance. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SubAccountCrossMarginBalance. + + User ID # noqa: E501 + + :param uid: The uid of this SubAccountCrossMarginBalance. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def available(self): + """Gets the available of this SubAccountCrossMarginBalance. # noqa: E501 + + 账户余额信息 # noqa: E501 + + :return: The available of this SubAccountCrossMarginBalance. # noqa: E501 + :rtype: SubCrossMarginAccount + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this SubAccountCrossMarginBalance. + + 账户余额信息 # noqa: E501 + + :param available: The available of this SubAccountCrossMarginBalance. # noqa: E501 + :type: SubCrossMarginAccount + """ + + self._available = available + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccountCrossMarginBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountCrossMarginBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py new file mode 100644 index 0000000..24b1e2b --- /dev/null +++ b/gate_api/models/sub_account_futures_balance.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountFuturesBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'available': 'dict(str, FuturesAccount)' + } + + attribute_map = { + 'uid': 'uid', + 'available': 'available' + } + + def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 + # type: (str, dict(str, FuturesAccount), Configuration) -> None + """SubAccountFuturesBalance - a 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._available = None + self.discriminator = None + + if uid is not None: + self.uid = uid + if available is not None: + self.available = available + + @property + def uid(self): + """Gets the uid of this SubAccountFuturesBalance. # noqa: E501 + + User ID # noqa: E501 + + :return: The uid of this SubAccountFuturesBalance. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SubAccountFuturesBalance. + + User ID # noqa: E501 + + :param uid: The uid of this SubAccountFuturesBalance. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def available(self): + """Gets the available of this SubAccountFuturesBalance. # noqa: E501 + + Futures account balances # noqa: E501 + + :return: The available of this SubAccountFuturesBalance. # noqa: E501 + :rtype: dict(str, FuturesAccount) + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this SubAccountFuturesBalance. + + Futures account balances # noqa: E501 + + :param available: The available of this SubAccountFuturesBalance. # noqa: E501 + :type: dict(str, FuturesAccount) + """ + + self._available = available + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccountFuturesBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountFuturesBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py new file mode 100644 index 0000000..b2b2bae --- /dev/null +++ b/gate_api/models/sub_account_key.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountKey(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'str', + 'mode': 'int', + 'name': 'str', + 'perms': 'list[SubAccountKeyPerms]', + 'ip_whitelist': 'list[str]', + 'key': 'str', + 'state': 'int', + 'created_at': 'int', + 'updated_at': 'int', + 'last_access': 'int' + } + + attribute_map = { + 'user_id': 'user_id', + 'mode': 'mode', + 'name': 'name', + 'perms': 'perms', + 'ip_whitelist': 'ip_whitelist', + 'key': 'key', + 'state': 'state', + 'created_at': 'created_at', + 'updated_at': 'updated_at', + 'last_access': 'last_access' + } + + def __init__(self, user_id=None, mode=None, name=None, perms=None, ip_whitelist=None, key=None, state=None, created_at=None, updated_at=None, last_access=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, list[SubAccountKeyPerms], list[str], str, int, int, int, int, Configuration) -> None + """SubAccountKey - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._mode = None + self._name = None + self._perms = None + self._ip_whitelist = None + self._key = None + self._state = None + self._created_at = None + self._updated_at = None + self._last_access = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if mode is not None: + self.mode = mode + if name is not None: + self.name = name + if perms is not None: + self.perms = perms + if ip_whitelist is not None: + self.ip_whitelist = ip_whitelist + if key is not None: + self.key = key + if state is not None: + self.state = state + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + if last_access is not None: + self.last_access = last_access + + @property + def user_id(self): + """Gets the user_id of this SubAccountKey. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this SubAccountKey. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SubAccountKey. + + User ID # noqa: E501 + + :param user_id: The user_id of this SubAccountKey. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def mode(self): + """Gets the mode of this SubAccountKey. # noqa: E501 + + Mode: 1 - classic 2 - portfolio account # noqa: E501 + + :return: The mode of this SubAccountKey. # noqa: E501 + :rtype: int + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this SubAccountKey. + + Mode: 1 - classic 2 - portfolio account # noqa: E501 + + :param mode: The mode of this SubAccountKey. # noqa: E501 + :type: int + """ + + self._mode = mode + + @property + def name(self): + """Gets the name of this SubAccountKey. # noqa: E501 + + API key name # noqa: E501 + + :return: The name of this SubAccountKey. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SubAccountKey. + + API key name # noqa: E501 + + :param name: The name of this SubAccountKey. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def perms(self): + """Gets the perms of this SubAccountKey. # noqa: E501 + + + :return: The perms of this SubAccountKey. # noqa: E501 + :rtype: list[SubAccountKeyPerms] + """ + return self._perms + + @perms.setter + def perms(self, perms): + """Sets the perms of this SubAccountKey. + + + :param perms: The perms of this SubAccountKey. # noqa: E501 + :type: list[SubAccountKeyPerms] + """ + + self._perms = perms + + @property + def ip_whitelist(self): + """Gets the ip_whitelist of this SubAccountKey. # noqa: E501 + + ip white list (list will be removed if no value is passed) # noqa: E501 + + :return: The ip_whitelist of this SubAccountKey. # noqa: E501 + :rtype: list[str] + """ + return self._ip_whitelist + + @ip_whitelist.setter + def ip_whitelist(self, ip_whitelist): + """Sets the ip_whitelist of this SubAccountKey. + + ip white list (list will be removed if no value is passed) # noqa: E501 + + :param ip_whitelist: The ip_whitelist of this SubAccountKey. # noqa: E501 + :type: list[str] + """ + + self._ip_whitelist = ip_whitelist + + @property + def key(self): + """Gets the key of this SubAccountKey. # noqa: E501 + + API Key # noqa: E501 + + :return: The key of this SubAccountKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this SubAccountKey. + + API Key # noqa: E501 + + :param key: The key of this SubAccountKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def state(self): + """Gets the state of this SubAccountKey. # noqa: E501 + + State 1 - normal 2 - locked 3 - frozen # noqa: E501 + + :return: The state of this SubAccountKey. # noqa: E501 + :rtype: int + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this SubAccountKey. + + State 1 - normal 2 - locked 3 - frozen # noqa: E501 + + :param state: The state of this SubAccountKey. # noqa: E501 + :type: int + """ + + self._state = state + + @property + def created_at(self): + """Gets the created_at of this SubAccountKey. # noqa: E501 + + Creation time # noqa: E501 + + :return: The created_at of this SubAccountKey. # noqa: E501 + :rtype: int + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SubAccountKey. + + Creation time # noqa: E501 + + :param created_at: The created_at of this SubAccountKey. # noqa: E501 + :type: int + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this SubAccountKey. # noqa: E501 + + Last update time # noqa: E501 + + :return: The updated_at of this SubAccountKey. # noqa: E501 + :rtype: int + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this SubAccountKey. + + Last update time # noqa: E501 + + :param updated_at: The updated_at of this SubAccountKey. # noqa: E501 + :type: int + """ + + self._updated_at = updated_at + + @property + def last_access(self): + """Gets the last_access of this SubAccountKey. # noqa: E501 + + Last access time # noqa: E501 + + :return: The last_access of this SubAccountKey. # noqa: E501 + :rtype: int + """ + return self._last_access + + @last_access.setter + def last_access(self, last_access): + """Sets the last_access of this SubAccountKey. + + Last access time # noqa: E501 + + :param last_access: The last_access of this SubAccountKey. # noqa: E501 + :type: int + """ + + self._last_access = last_access + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccountKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py new file mode 100644 index 0000000..f989ba7 --- /dev/null +++ b/gate_api/models/sub_account_key_perms.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountKeyPerms(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'read_only': 'bool' + } + + attribute_map = { + 'name': 'name', + 'read_only': 'read_only' + } + + def __init__(self, name=None, read_only=None, local_vars_configuration=None): # noqa: E501 + # type: (str, bool, Configuration) -> None + """SubAccountKeyPerms - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._read_only = None + self.discriminator = None + + if name is not None: + self.name = name + if read_only is not None: + self.read_only = read_only + + @property + def name(self): + """Gets the name of this SubAccountKeyPerms. # noqa: E501 + + Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy # noqa: E501 + + :return: The name of this SubAccountKeyPerms. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SubAccountKeyPerms. + + Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy # noqa: E501 + + :param name: The name of this SubAccountKeyPerms. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def read_only(self): + """Gets the read_only of this SubAccountKeyPerms. # noqa: E501 + + read only # noqa: E501 + + :return: The read_only of this SubAccountKeyPerms. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this SubAccountKeyPerms. + + read only # noqa: E501 + + :param read_only: The read_only of this SubAccountKeyPerms. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccountKeyPerms): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountKeyPerms): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py new file mode 100644 index 0000000..bb0edf3 --- /dev/null +++ b/gate_api/models/sub_account_margin_balance.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountMarginBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'available': 'list[MarginAccount]' + } + + attribute_map = { + 'uid': 'uid', + 'available': 'available' + } + + def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[MarginAccount], Configuration) -> None + """SubAccountMarginBalance - a 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._available = None + self.discriminator = None + + if uid is not None: + self.uid = uid + if available is not None: + self.available = available + + @property + def uid(self): + """Gets the uid of this SubAccountMarginBalance. # noqa: E501 + + User ID # noqa: E501 + + :return: The uid of this SubAccountMarginBalance. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SubAccountMarginBalance. + + User ID # noqa: E501 + + :param uid: The uid of this SubAccountMarginBalance. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def available(self): + """Gets the available of this SubAccountMarginBalance. # noqa: E501 + + Margin account balances # noqa: E501 + + :return: The available of this SubAccountMarginBalance. # noqa: E501 + :rtype: list[MarginAccount] + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this SubAccountMarginBalance. + + Margin account balances # noqa: E501 + + :param available: The available of this SubAccountMarginBalance. # noqa: E501 + :type: list[MarginAccount] + """ + + self._available = available + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccountMarginBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountMarginBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py new file mode 100644 index 0000000..3880810 --- /dev/null +++ b/gate_api/models/sub_account_to_sub_account.py @@ -0,0 +1,297 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountToSubAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'sub_account_type': 'str', + 'sub_account_from': 'str', + 'sub_account_from_type': 'str', + 'sub_account_to': 'str', + 'sub_account_to_type': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'sub_account_type': 'sub_account_type', + 'sub_account_from': 'sub_account_from', + 'sub_account_from_type': 'sub_account_from_type', + 'sub_account_to': 'sub_account_to', + 'sub_account_to_type': 'sub_account_to_type', + 'amount': 'amount' + } + + def __init__(self, currency=None, sub_account_type=None, sub_account_from=None, sub_account_from_type=None, sub_account_to=None, sub_account_to_type=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, Configuration) -> None + """SubAccountToSubAccount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._sub_account_type = None + self._sub_account_from = None + self._sub_account_from_type = None + self._sub_account_to = None + self._sub_account_to_type = None + self._amount = None + self.discriminator = None + + self.currency = currency + if sub_account_type is not None: + self.sub_account_type = sub_account_type + self.sub_account_from = sub_account_from + self.sub_account_from_type = sub_account_from_type + self.sub_account_to = sub_account_to + self.sub_account_to_type = sub_account_to_type + self.amount = amount + + @property + def currency(self): + """Gets the currency of this SubAccountToSubAccount. # noqa: E501 + + Transfer currency name # noqa: E501 + + :return: The currency of this SubAccountToSubAccount. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SubAccountToSubAccount. + + Transfer currency name # noqa: E501 + + :param currency: The currency of this SubAccountToSubAccount. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def sub_account_type(self): + """Gets the sub_account_type of this SubAccountToSubAccount. # noqa: E501 + + Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 + + :return: The sub_account_type of this SubAccountToSubAccount. # noqa: E501 + :rtype: str + """ + return self._sub_account_type + + @sub_account_type.setter + def sub_account_type(self, sub_account_type): + """Sets the sub_account_type of this SubAccountToSubAccount. + + Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 + + :param sub_account_type: The sub_account_type of this SubAccountToSubAccount. # noqa: E501 + :type: str + """ + + self._sub_account_type = sub_account_type + + @property + def sub_account_from(self): + """Gets the sub_account_from of this SubAccountToSubAccount. # noqa: E501 + + Transfer from the user id of the sub-account # noqa: E501 + + :return: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 + :rtype: str + """ + return self._sub_account_from + + @sub_account_from.setter + def sub_account_from(self, sub_account_from): + """Sets the sub_account_from of this SubAccountToSubAccount. + + Transfer from the user id of the sub-account # noqa: E501 + + :param sub_account_from: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sub_account_from is None: # noqa: E501 + raise ValueError("Invalid value for `sub_account_from`, must not be `None`") # noqa: E501 + + self._sub_account_from = sub_account_from + + @property + def sub_account_from_type(self): + """Gets the sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 + + The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. # noqa: E501 + + :return: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 + :rtype: str + """ + return self._sub_account_from_type + + @sub_account_from_type.setter + def sub_account_from_type(self, sub_account_from_type): + """Sets the sub_account_from_type of this SubAccountToSubAccount. + + The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. # noqa: E501 + + :param sub_account_from_type: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sub_account_from_type is None: # noqa: E501 + raise ValueError("Invalid value for `sub_account_from_type`, must not be `None`") # noqa: E501 + + self._sub_account_from_type = sub_account_from_type + + @property + def sub_account_to(self): + """Gets the sub_account_to of this SubAccountToSubAccount. # noqa: E501 + + Transfer to the user id of the sub-account # noqa: E501 + + :return: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 + :rtype: str + """ + return self._sub_account_to + + @sub_account_to.setter + def sub_account_to(self, sub_account_to): + """Sets the sub_account_to of this SubAccountToSubAccount. + + Transfer to the user id of the sub-account # noqa: E501 + + :param sub_account_to: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sub_account_to is None: # noqa: E501 + raise ValueError("Invalid value for `sub_account_to`, must not be `None`") # noqa: E501 + + self._sub_account_to = sub_account_to + + @property + def sub_account_to_type(self): + """Gets the sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 + + The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 + + :return: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 + :rtype: str + """ + return self._sub_account_to_type + + @sub_account_to_type.setter + def sub_account_to_type(self, sub_account_to_type): + """Sets the sub_account_to_type of this SubAccountToSubAccount. + + The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 + + :param sub_account_to_type: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sub_account_to_type is None: # noqa: E501 + raise ValueError("Invalid value for `sub_account_to_type`, must not be `None`") # noqa: E501 + + self._sub_account_to_type = sub_account_to_type + + @property + def amount(self): + """Gets the amount of this SubAccountToSubAccount. # noqa: E501 + + Transfer amount # noqa: E501 + + :return: The amount of this SubAccountToSubAccount. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SubAccountToSubAccount. + + Transfer amount # noqa: E501 + + :param amount: The amount of this SubAccountToSubAccount. # 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, SubAccountToSubAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountToSubAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py new file mode 100644 index 0000000..0497ece --- /dev/null +++ b/gate_api/models/sub_account_transfer.py @@ -0,0 +1,351 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountTransfer(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'sub_account': 'str', + 'direction': 'str', + 'amount': 'str', + 'uid': 'str', + 'client_order_id': 'str', + 'timest': 'str', + 'source': 'str', + 'sub_account_type': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'sub_account': 'sub_account', + 'direction': 'direction', + 'amount': 'amount', + 'uid': 'uid', + 'client_order_id': 'client_order_id', + 'timest': 'timest', + 'source': 'source', + 'sub_account_type': 'sub_account_type' + } + + def __init__(self, currency=None, sub_account=None, direction=None, amount=None, uid=None, client_order_id=None, timest=None, source=None, sub_account_type='spot', local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None + """SubAccountTransfer - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._sub_account = None + self._direction = None + self._amount = None + self._uid = None + self._client_order_id = None + self._timest = None + self._source = None + self._sub_account_type = None + self.discriminator = None + + self.currency = currency + self.sub_account = sub_account + self.direction = direction + self.amount = amount + if uid is not None: + self.uid = uid + if client_order_id is not None: + self.client_order_id = client_order_id + if timest is not None: + self.timest = timest + if source is not None: + self.source = source + if sub_account_type is not None: + self.sub_account_type = sub_account_type + + @property + def currency(self): + """Gets the currency of this SubAccountTransfer. # noqa: E501 + + Transfer currency name # noqa: E501 + + :return: The currency of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SubAccountTransfer. + + Transfer currency name # noqa: E501 + + :param currency: The currency of this SubAccountTransfer. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def sub_account(self): + """Gets the sub_account of this SubAccountTransfer. # noqa: E501 + + Sub account user ID # noqa: E501 + + :return: The sub_account of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._sub_account + + @sub_account.setter + def sub_account(self, sub_account): + """Sets the sub_account of this SubAccountTransfer. + + Sub account user ID # noqa: E501 + + :param sub_account: The sub_account of this SubAccountTransfer. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sub_account is None: # noqa: E501 + raise ValueError("Invalid value for `sub_account`, must not be `None`") # noqa: E501 + + self._sub_account = sub_account + + @property + def direction(self): + """Gets the direction of this SubAccountTransfer. # noqa: E501 + + Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + + :return: The direction of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this SubAccountTransfer. + + Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + + :param direction: The direction of this SubAccountTransfer. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 + raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 + + self._direction = direction + + @property + def amount(self): + """Gets the amount of this SubAccountTransfer. # noqa: E501 + + Transfer amount # noqa: E501 + + :return: The amount of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SubAccountTransfer. + + Transfer amount # noqa: E501 + + :param amount: The amount of this SubAccountTransfer. # 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 uid(self): + """Gets the uid of this SubAccountTransfer. # noqa: E501 + + Main account user ID # noqa: E501 + + :return: The uid of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SubAccountTransfer. + + Main account user ID # noqa: E501 + + :param uid: The uid of this SubAccountTransfer. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def client_order_id(self): + """Gets the client_order_id of this SubAccountTransfer. # noqa: E501 + + The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + + :return: The client_order_id of this SubAccountTransfer. # 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 SubAccountTransfer. + + The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + + :param client_order_id: The client_order_id of this SubAccountTransfer. # noqa: E501 + :type: str + """ + + self._client_order_id = client_order_id + + @property + def timest(self): + """Gets the timest of this SubAccountTransfer. # noqa: E501 + + Transfer timestamp # noqa: E501 + + :return: The timest of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._timest + + @timest.setter + def timest(self, timest): + """Sets the timest of this SubAccountTransfer. + + Transfer timestamp # noqa: E501 + + :param timest: The timest of this SubAccountTransfer. # noqa: E501 + :type: str + """ + + self._timest = timest + + @property + def source(self): + """Gets the source of this SubAccountTransfer. # noqa: E501 + + Where the operation is initiated from # noqa: E501 + + :return: The source of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this SubAccountTransfer. + + Where the operation is initiated from # noqa: E501 + + :param source: The source of this SubAccountTransfer. # noqa: E501 + :type: str + """ + + self._source = source + + @property + def sub_account_type(self): + """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501 + + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + + :return: The sub_account_type of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._sub_account_type + + @sub_account_type.setter + def sub_account_type(self, sub_account_type): + """Sets the sub_account_type of this SubAccountTransfer. + + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + + :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501 + :type: str + """ + + self._sub_account_type = sub_account_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, SubAccountTransfer): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountTransfer): + 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 new file mode 100644 index 0000000..4678b68 --- /dev/null +++ b/gate_api/models/sub_cross_margin_account.py @@ -0,0 +1,541 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubCrossMarginAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'locked': 'bool', + 'balances': 'dict(str, CrossMarginBalance1)', + 'total': 'str', + 'borrowed': 'str', + 'borrowed_net': 'str', + 'net': 'str', + 'leverage': 'str', + 'interest': 'str', + 'risk': 'str', + 'total_initial_margin': 'str', + 'total_margin_balance': 'str', + 'total_maintenance_margin': 'str', + 'total_initial_margin_rate': 'str', + 'total_maintenance_margin_rate': 'str', + 'total_available_margin': 'str' + } + + attribute_map = { + 'user_id': 'user_id', + 'locked': 'locked', + 'balances': 'balances', + 'total': 'total', + 'borrowed': 'borrowed', + 'borrowed_net': 'borrowed_net', + 'net': 'net', + 'leverage': 'leverage', + 'interest': 'interest', + 'risk': 'risk', + 'total_initial_margin': 'total_initial_margin', + 'total_margin_balance': 'total_margin_balance', + 'total_maintenance_margin': 'total_maintenance_margin', + 'total_initial_margin_rate': 'total_initial_margin_rate', + 'total_maintenance_margin_rate': 'total_maintenance_margin_rate', + 'total_available_margin': 'total_available_margin' + } + + def __init__(self, user_id=None, locked=None, balances=None, total=None, borrowed=None, borrowed_net=None, net=None, leverage=None, interest=None, risk=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, local_vars_configuration=None): # noqa: E501 + # type: (int, bool, dict(str, CrossMarginBalance1), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """SubCrossMarginAccount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._locked = None + self._balances = None + self._total = None + self._borrowed = None + self._borrowed_net = None + self._net = None + self._leverage = None + self._interest = None + self._risk = None + self._total_initial_margin = None + self._total_margin_balance = None + self._total_maintenance_margin = None + self._total_initial_margin_rate = None + self._total_maintenance_margin_rate = None + self._total_available_margin = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if locked is not None: + self.locked = locked + if balances is not None: + self.balances = balances + if total is not None: + self.total = total + if borrowed is not None: + self.borrowed = borrowed + if borrowed_net is not None: + self.borrowed_net = borrowed_net + if net is not None: + self.net = net + if leverage is not None: + self.leverage = leverage + if interest is not None: + self.interest = interest + if risk is not None: + self.risk = risk + if total_initial_margin is not None: + self.total_initial_margin = total_initial_margin + if total_margin_balance is not None: + self.total_margin_balance = total_margin_balance + if total_maintenance_margin is not None: + self.total_maintenance_margin = total_maintenance_margin + if total_initial_margin_rate is not None: + self.total_initial_margin_rate = total_initial_margin_rate + if total_maintenance_margin_rate is not None: + self.total_maintenance_margin_rate = total_maintenance_margin_rate + if total_available_margin is not None: + self.total_available_margin = total_available_margin + + @property + def user_id(self): + """Gets the user_id of this SubCrossMarginAccount. # noqa: E501 + + User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501 + + :return: The user_id of this SubCrossMarginAccount. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SubCrossMarginAccount. + + User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501 + + :param user_id: The user_id of this SubCrossMarginAccount. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def locked(self): + """Gets the locked of this SubCrossMarginAccount. # noqa: E501 + + Whether account is locked # noqa: E501 + + :return: The locked of this SubCrossMarginAccount. # noqa: E501 + :rtype: bool + """ + return self._locked + + @locked.setter + def locked(self, locked): + """Sets the locked of this SubCrossMarginAccount. + + Whether account is locked # noqa: E501 + + :param locked: The locked of this SubCrossMarginAccount. # noqa: E501 + :type: bool + """ + + self._locked = locked + + @property + def balances(self): + """Gets the balances of this SubCrossMarginAccount. # noqa: E501 + + + :return: The balances of this SubCrossMarginAccount. # noqa: E501 + :rtype: dict(str, CrossMarginBalance1) + """ + return self._balances + + @balances.setter + def balances(self, balances): + """Sets the balances of this SubCrossMarginAccount. + + + :param balances: The balances of this SubCrossMarginAccount. # noqa: E501 + :type: dict(str, CrossMarginBalance1) + """ + + self._balances = balances + + @property + def total(self): + """Gets the total of this SubCrossMarginAccount. # noqa: E501 + + Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 + + :return: The total of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this SubCrossMarginAccount. + + Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 + + :param total: The total of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total = total + + @property + def borrowed(self): + """Gets the borrowed of this SubCrossMarginAccount. # noqa: E501 + + Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 + + :return: The borrowed of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this SubCrossMarginAccount. + + Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 + + :param borrowed: The borrowed of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def borrowed_net(self): + """Gets the borrowed_net of this SubCrossMarginAccount. # noqa: E501 + + Total borrowed value in USDT * borrowed factor # noqa: E501 + + :return: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._borrowed_net + + @borrowed_net.setter + def borrowed_net(self, borrowed_net): + """Sets the borrowed_net of this SubCrossMarginAccount. + + Total borrowed value in USDT * borrowed factor # noqa: E501 + + :param borrowed_net: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._borrowed_net = borrowed_net + + @property + def net(self): + """Gets the net of this SubCrossMarginAccount. # noqa: E501 + + Total net assets in USDT # noqa: E501 + + :return: The net of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._net + + @net.setter + def net(self, net): + """Sets the net of this SubCrossMarginAccount. + + Total net assets in USDT # noqa: E501 + + :param net: The net of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._net = net + + @property + def leverage(self): + """Gets the leverage of this SubCrossMarginAccount. # noqa: E501 + + Position leverage # noqa: E501 + + :return: The leverage of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this SubCrossMarginAccount. + + Position leverage # noqa: E501 + + :param leverage: The leverage of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def interest(self): + """Gets the interest of this SubCrossMarginAccount. # noqa: E501 + + Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 + + :return: The interest of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this SubCrossMarginAccount. + + Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 + + :param interest: The interest of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._interest = interest + + @property + def risk(self): + """Gets the risk of this SubCrossMarginAccount. # noqa: E501 + + Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 + + :return: The risk of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._risk + + @risk.setter + def risk(self, risk): + """Sets the risk of this SubCrossMarginAccount. + + Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 + + :param risk: The risk of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._risk = risk + + @property + def total_initial_margin(self): + """Gets the total_initial_margin of this SubCrossMarginAccount. # noqa: E501 + + Total initial margin # noqa: E501 + + :return: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_initial_margin + + @total_initial_margin.setter + def total_initial_margin(self, total_initial_margin): + """Sets the total_initial_margin of this SubCrossMarginAccount. + + Total initial margin # noqa: E501 + + :param total_initial_margin: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_initial_margin = total_initial_margin + + @property + def total_margin_balance(self): + """Gets the total_margin_balance of this SubCrossMarginAccount. # noqa: E501 + + Total margin balance # noqa: E501 + + :return: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_margin_balance + + @total_margin_balance.setter + def total_margin_balance(self, total_margin_balance): + """Sets the total_margin_balance of this SubCrossMarginAccount. + + Total margin balance # noqa: E501 + + :param total_margin_balance: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_margin_balance = total_margin_balance + + @property + def total_maintenance_margin(self): + """Gets the total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 + + Total maintenance margin # noqa: E501 + + :return: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_maintenance_margin + + @total_maintenance_margin.setter + def total_maintenance_margin(self, total_maintenance_margin): + """Sets the total_maintenance_margin of this SubCrossMarginAccount. + + Total maintenance margin # noqa: E501 + + :param total_maintenance_margin: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_maintenance_margin = total_maintenance_margin + + @property + def total_initial_margin_rate(self): + """Gets the total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 + + Total initial margin rate # noqa: E501 + + :return: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_initial_margin_rate + + @total_initial_margin_rate.setter + def total_initial_margin_rate(self, total_initial_margin_rate): + """Sets the total_initial_margin_rate of this SubCrossMarginAccount. + + Total initial margin rate # noqa: E501 + + :param total_initial_margin_rate: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_initial_margin_rate = total_initial_margin_rate + + @property + def total_maintenance_margin_rate(self): + """Gets the total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 + + Total maintenance margin rate # noqa: E501 + + :return: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_maintenance_margin_rate + + @total_maintenance_margin_rate.setter + def total_maintenance_margin_rate(self, total_maintenance_margin_rate): + """Sets the total_maintenance_margin_rate of this SubCrossMarginAccount. + + Total maintenance margin rate # noqa: E501 + + :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_maintenance_margin_rate = total_maintenance_margin_rate + + @property + def total_available_margin(self): + """Gets the total_available_margin of this SubCrossMarginAccount. # noqa: E501 + + Total available margin # noqa: E501 + + :return: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 + :rtype: str + """ + return self._total_available_margin + + @total_available_margin.setter + def total_available_margin(self, total_available_margin): + """Sets the total_available_margin of this SubCrossMarginAccount. + + Total available margin # noqa: E501 + + :param total_available_margin: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 + :type: str + """ + + self._total_available_margin = total_available_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, SubCrossMarginAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubCrossMarginAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py new file mode 100644 index 0000000..8253743 --- /dev/null +++ b/gate_api/models/sub_user_mode.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubUserMode(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'is_unified': 'bool', + 'mode': 'str' + } + + attribute_map = { + 'user_id': 'user_id', + 'is_unified': 'is_unified', + 'mode': 'mode' + } + + def __init__(self, user_id=None, is_unified=None, mode=None, local_vars_configuration=None): # noqa: E501 + # type: (int, bool, str, Configuration) -> None + """SubUserMode - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._is_unified = None + self._mode = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if is_unified is not None: + self.is_unified = is_unified + if mode is not None: + self.mode = mode + + @property + def user_id(self): + """Gets the user_id of this SubUserMode. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this SubUserMode. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SubUserMode. + + User ID # noqa: E501 + + :param user_id: The user_id of this SubUserMode. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def is_unified(self): + """Gets the is_unified of this SubUserMode. # noqa: E501 + + Is it a unified account? # noqa: E501 + + :return: The is_unified of this SubUserMode. # noqa: E501 + :rtype: bool + """ + return self._is_unified + + @is_unified.setter + def is_unified(self, is_unified): + """Sets the is_unified of this SubUserMode. + + Is it a unified account? # noqa: E501 + + :param is_unified: The is_unified of this SubUserMode. # noqa: E501 + :type: bool + """ + + self._is_unified = is_unified + + @property + def mode(self): + """Gets the mode of this SubUserMode. # noqa: E501 + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + + :return: The mode of this SubUserMode. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this SubUserMode. + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + + :param mode: The mode of this SubUserMode. # noqa: E501 + :type: str + """ + + self._mode = mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubUserMode): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubUserMode): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py new file mode 100644 index 0000000..570a069 --- /dev/null +++ b/gate_api/models/system_time.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SystemTime(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'server_time': 'int' + } + + attribute_map = { + 'server_time': 'server_time' + } + + def __init__(self, server_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """SystemTime - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._server_time = None + self.discriminator = None + + if server_time is not None: + self.server_time = server_time + + @property + def server_time(self): + """Gets the server_time of this SystemTime. # noqa: E501 + + Server current time(ms) # noqa: E501 + + :return: The server_time of this SystemTime. # noqa: E501 + :rtype: int + """ + return self._server_time + + @server_time.setter + def server_time(self, server_time): + """Sets the server_time of this SystemTime. + + Server current time(ms) # noqa: E501 + + :param server_time: The server_time of this SystemTime. # noqa: E501 + :type: int + """ + + self._server_time = server_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, SystemTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SystemTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py new file mode 100644 index 0000000..32a0666 --- /dev/null +++ b/gate_api/models/ticker.py @@ -0,0 +1,568 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Ticker(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'last': 'str', + 'lowest_ask': 'str', + 'lowest_size': 'str', + 'highest_bid': 'str', + 'highest_size': 'str', + 'change_percentage': 'str', + 'change_utc0': 'str', + 'change_utc8': 'str', + 'base_volume': 'str', + 'quote_volume': 'str', + 'high_24h': 'str', + 'low_24h': 'str', + 'etf_net_value': 'str', + 'etf_pre_net_value': 'str', + 'etf_pre_timestamp': 'int', + 'etf_leverage': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'last': 'last', + 'lowest_ask': 'lowest_ask', + 'lowest_size': 'lowest_size', + 'highest_bid': 'highest_bid', + 'highest_size': 'highest_size', + 'change_percentage': 'change_percentage', + 'change_utc0': 'change_utc0', + 'change_utc8': 'change_utc8', + 'base_volume': 'base_volume', + 'quote_volume': 'quote_volume', + 'high_24h': 'high_24h', + 'low_24h': 'low_24h', + 'etf_net_value': 'etf_net_value', + 'etf_pre_net_value': 'etf_pre_net_value', + 'etf_pre_timestamp': 'etf_pre_timestamp', + 'etf_leverage': 'etf_leverage' + } + + def __init__(self, currency_pair=None, last=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, change_percentage=None, change_utc0=None, change_utc8=None, base_volume=None, quote_volume=None, high_24h=None, low_24h=None, etf_net_value=None, etf_pre_net_value=None, etf_pre_timestamp=None, etf_leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, str, Configuration) -> None + """Ticker - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._last = None + self._lowest_ask = None + self._lowest_size = None + self._highest_bid = None + self._highest_size = None + self._change_percentage = None + self._change_utc0 = None + self._change_utc8 = None + self._base_volume = None + self._quote_volume = None + self._high_24h = None + self._low_24h = None + self._etf_net_value = None + self._etf_pre_net_value = None + self._etf_pre_timestamp = None + self._etf_leverage = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if last is not None: + self.last = last + if lowest_ask is not None: + self.lowest_ask = lowest_ask + if lowest_size is not None: + self.lowest_size = lowest_size + if highest_bid is not None: + self.highest_bid = highest_bid + if highest_size is not None: + self.highest_size = highest_size + if change_percentage is not None: + self.change_percentage = change_percentage + if change_utc0 is not None: + self.change_utc0 = change_utc0 + if change_utc8 is not None: + self.change_utc8 = change_utc8 + if base_volume is not None: + self.base_volume = base_volume + if quote_volume is not None: + self.quote_volume = quote_volume + if high_24h is not None: + self.high_24h = high_24h + if low_24h is not None: + self.low_24h = low_24h + if etf_net_value is not None: + self.etf_net_value = etf_net_value + self.etf_pre_net_value = etf_pre_net_value + self.etf_pre_timestamp = etf_pre_timestamp + self.etf_leverage = etf_leverage + + @property + def currency_pair(self): + """Gets the currency_pair of this Ticker. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this Ticker. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this Ticker. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this Ticker. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def last(self): + """Gets the last of this Ticker. # noqa: E501 + + Last trading price # noqa: E501 + + :return: The last of this Ticker. # noqa: E501 + :rtype: str + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this Ticker. + + Last trading price # noqa: E501 + + :param last: The last of this Ticker. # noqa: E501 + :type: str + """ + + self._last = last + + @property + def lowest_ask(self): + """Gets the lowest_ask of this Ticker. # noqa: E501 + + Recent lowest ask # noqa: E501 + + :return: The lowest_ask of this Ticker. # noqa: E501 + :rtype: str + """ + return self._lowest_ask + + @lowest_ask.setter + def lowest_ask(self, lowest_ask): + """Sets the lowest_ask of this Ticker. + + Recent lowest ask # noqa: E501 + + :param lowest_ask: The lowest_ask of this Ticker. # noqa: E501 + :type: str + """ + + self._lowest_ask = lowest_ask + + @property + def lowest_size(self): + """Gets the lowest_size of this Ticker. # noqa: E501 + + The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + + :return: The lowest_size of this Ticker. # noqa: E501 + :rtype: str + """ + return self._lowest_size + + @lowest_size.setter + def lowest_size(self, lowest_size): + """Sets the lowest_size of this Ticker. + + The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + + :param lowest_size: The lowest_size of this Ticker. # noqa: E501 + :type: str + """ + + self._lowest_size = lowest_size + + @property + def highest_bid(self): + """Gets the highest_bid of this Ticker. # noqa: E501 + + Recent highest bid # noqa: E501 + + :return: The highest_bid of this Ticker. # noqa: E501 + :rtype: str + """ + return self._highest_bid + + @highest_bid.setter + def highest_bid(self, highest_bid): + """Sets the highest_bid of this Ticker. + + Recent highest bid # noqa: E501 + + :param highest_bid: The highest_bid of this Ticker. # noqa: E501 + :type: str + """ + + self._highest_bid = highest_bid + + @property + def highest_size(self): + """Gets the highest_size of this Ticker. # noqa: E501 + + The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + + :return: The highest_size of this Ticker. # noqa: E501 + :rtype: str + """ + return self._highest_size + + @highest_size.setter + def highest_size(self, highest_size): + """Sets the highest_size of this Ticker. + + The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + + :param highest_size: The highest_size of this Ticker. # noqa: E501 + :type: str + """ + + self._highest_size = highest_size + + @property + def change_percentage(self): + """Gets the change_percentage of this Ticker. # noqa: E501 + + Change percentage in the last 24h # noqa: E501 + + :return: The change_percentage of this Ticker. # noqa: E501 + :rtype: str + """ + return self._change_percentage + + @change_percentage.setter + def change_percentage(self, change_percentage): + """Sets the change_percentage of this Ticker. + + Change percentage in the last 24h # noqa: E501 + + :param change_percentage: The change_percentage of this Ticker. # noqa: E501 + :type: str + """ + + self._change_percentage = change_percentage + + @property + def change_utc0(self): + """Gets the change_utc0 of this Ticker. # noqa: E501 + + utc0 timezone, the percentage change in the last 24 hours # noqa: E501 + + :return: The change_utc0 of this Ticker. # noqa: E501 + :rtype: str + """ + return self._change_utc0 + + @change_utc0.setter + def change_utc0(self, change_utc0): + """Sets the change_utc0 of this Ticker. + + utc0 timezone, the percentage change in the last 24 hours # noqa: E501 + + :param change_utc0: The change_utc0 of this Ticker. # noqa: E501 + :type: str + """ + + self._change_utc0 = change_utc0 + + @property + def change_utc8(self): + """Gets the change_utc8 of this Ticker. # noqa: E501 + + utc8 timezone, the percentage change in the last 24 hours # noqa: E501 + + :return: The change_utc8 of this Ticker. # noqa: E501 + :rtype: str + """ + return self._change_utc8 + + @change_utc8.setter + def change_utc8(self, change_utc8): + """Sets the change_utc8 of this Ticker. + + utc8 timezone, the percentage change in the last 24 hours # noqa: E501 + + :param change_utc8: The change_utc8 of this Ticker. # noqa: E501 + :type: str + """ + + self._change_utc8 = change_utc8 + + @property + def base_volume(self): + """Gets the base_volume of this Ticker. # noqa: E501 + + Base currency trade volume in the last 24h # noqa: E501 + + :return: The base_volume of this Ticker. # noqa: E501 + :rtype: str + """ + return self._base_volume + + @base_volume.setter + def base_volume(self, base_volume): + """Sets the base_volume of this Ticker. + + Base currency trade volume in the last 24h # noqa: E501 + + :param base_volume: The base_volume of this Ticker. # noqa: E501 + :type: str + """ + + self._base_volume = base_volume + + @property + def quote_volume(self): + """Gets the quote_volume of this Ticker. # noqa: E501 + + Quote currency trade volume in the last 24h # noqa: E501 + + :return: The quote_volume of this Ticker. # noqa: E501 + :rtype: str + """ + return self._quote_volume + + @quote_volume.setter + def quote_volume(self, quote_volume): + """Sets the quote_volume of this Ticker. + + Quote currency trade volume in the last 24h # noqa: E501 + + :param quote_volume: The quote_volume of this Ticker. # noqa: E501 + :type: str + """ + + self._quote_volume = quote_volume + + @property + def high_24h(self): + """Gets the high_24h of this Ticker. # noqa: E501 + + Highest price in 24h # noqa: E501 + + :return: The high_24h of this Ticker. # noqa: E501 + :rtype: str + """ + return self._high_24h + + @high_24h.setter + def high_24h(self, high_24h): + """Sets the high_24h of this Ticker. + + Highest price in 24h # noqa: E501 + + :param high_24h: The high_24h of this Ticker. # noqa: E501 + :type: str + """ + + self._high_24h = high_24h + + @property + def low_24h(self): + """Gets the low_24h of this Ticker. # noqa: E501 + + Lowest price in 24h # noqa: E501 + + :return: The low_24h of this Ticker. # noqa: E501 + :rtype: str + """ + return self._low_24h + + @low_24h.setter + def low_24h(self, low_24h): + """Sets the low_24h of this Ticker. + + Lowest price in 24h # noqa: E501 + + :param low_24h: The low_24h of this Ticker. # noqa: E501 + :type: str + """ + + self._low_24h = low_24h + + @property + def etf_net_value(self): + """Gets the etf_net_value of this Ticker. # noqa: E501 + + ETF net value # noqa: E501 + + :return: The etf_net_value of this Ticker. # noqa: E501 + :rtype: str + """ + return self._etf_net_value + + @etf_net_value.setter + def etf_net_value(self, etf_net_value): + """Sets the etf_net_value of this Ticker. + + ETF net value # noqa: E501 + + :param etf_net_value: The etf_net_value of this Ticker. # noqa: E501 + :type: str + """ + + self._etf_net_value = etf_net_value + + @property + def etf_pre_net_value(self): + """Gets the etf_pre_net_value of this Ticker. # noqa: E501 + + ETF previous net value at re-balancing time # noqa: E501 + + :return: The etf_pre_net_value of this Ticker. # noqa: E501 + :rtype: str + """ + return self._etf_pre_net_value + + @etf_pre_net_value.setter + def etf_pre_net_value(self, etf_pre_net_value): + """Sets the etf_pre_net_value of this Ticker. + + ETF previous net value at re-balancing time # noqa: E501 + + :param etf_pre_net_value: The etf_pre_net_value of this Ticker. # noqa: E501 + :type: str + """ + + self._etf_pre_net_value = etf_pre_net_value + + @property + def etf_pre_timestamp(self): + """Gets the etf_pre_timestamp of this Ticker. # noqa: E501 + + ETF previous re-balancing time # noqa: E501 + + :return: The etf_pre_timestamp of this Ticker. # noqa: E501 + :rtype: int + """ + return self._etf_pre_timestamp + + @etf_pre_timestamp.setter + def etf_pre_timestamp(self, etf_pre_timestamp): + """Sets the etf_pre_timestamp of this Ticker. + + ETF previous re-balancing time # noqa: E501 + + :param etf_pre_timestamp: The etf_pre_timestamp of this Ticker. # noqa: E501 + :type: int + """ + + self._etf_pre_timestamp = etf_pre_timestamp + + @property + def etf_leverage(self): + """Gets the etf_leverage of this Ticker. # noqa: E501 + + ETF current leverage # noqa: E501 + + :return: The etf_leverage of this Ticker. # noqa: E501 + :rtype: str + """ + return self._etf_leverage + + @etf_leverage.setter + def etf_leverage(self, etf_leverage): + """Sets the etf_leverage of this Ticker. + + ETF current leverage # noqa: E501 + + :param etf_leverage: The etf_leverage of this Ticker. # noqa: E501 + :type: str + """ + + self._etf_leverage = etf_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, Ticker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Ticker): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py new file mode 100644 index 0000000..0adc29b --- /dev/null +++ b/gate_api/models/total_balance.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TotalBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'AccountBalance', + 'details': 'dict(str, AccountBalance)' + } + + attribute_map = { + 'total': 'total', + 'details': 'details' + } + + def __init__(self, total=None, details=None, local_vars_configuration=None): # noqa: E501 + # type: (AccountBalance, dict(str, AccountBalance), Configuration) -> None + """TotalBalance - a 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._details = None + self.discriminator = None + + if total is not None: + self.total = total + if details is not None: + self.details = details + + @property + def total(self): + """Gets the total of this TotalBalance. # noqa: E501 + + + :return: The total of this TotalBalance. # noqa: E501 + :rtype: AccountBalance + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this TotalBalance. + + + :param total: The total of this TotalBalance. # noqa: E501 + :type: AccountBalance + """ + + self._total = total + + @property + def details(self): + """Gets the details of this TotalBalance. # noqa: E501 + + Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501 + + :return: The details of this TotalBalance. # noqa: E501 + :rtype: dict(str, AccountBalance) + """ + return self._details + + @details.setter + def details(self, details): + """Sets the details of this TotalBalance. + + Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501 + + :param details: The details of this TotalBalance. # noqa: E501 + :type: dict(str, AccountBalance) + """ + + self._details = details + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TotalBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TotalBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py new file mode 100644 index 0000000..cffe9a0 --- /dev/null +++ b/gate_api/models/trade.py @@ -0,0 +1,555 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Trade(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'create_time': 'str', + 'create_time_ms': 'str', + 'currency_pair': 'str', + 'side': 'str', + 'role': 'str', + 'amount': 'str', + 'price': 'str', + 'order_id': 'str', + 'fee': 'str', + 'fee_currency': 'str', + 'point_fee': 'str', + 'gt_fee': 'str', + 'amend_text': 'str', + 'sequence_id': 'str', + 'text': 'str' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'create_time', + 'create_time_ms': 'create_time_ms', + 'currency_pair': 'currency_pair', + 'side': 'side', + 'role': 'role', + 'amount': 'amount', + 'price': 'price', + 'order_id': 'order_id', + 'fee': 'fee', + 'fee_currency': 'fee_currency', + 'point_fee': 'point_fee', + 'gt_fee': 'gt_fee', + 'amend_text': 'amend_text', + 'sequence_id': 'sequence_id', + 'text': 'text' + } + + def __init__(self, id=None, create_time=None, create_time_ms=None, currency_pair=None, side=None, role=None, amount=None, price=None, order_id=None, fee=None, fee_currency=None, point_fee=None, gt_fee=None, amend_text=None, sequence_id=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """Trade - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._create_time = None + self._create_time_ms = None + self._currency_pair = None + self._side = None + self._role = None + self._amount = None + self._price = None + self._order_id = None + self._fee = None + self._fee_currency = None + self._point_fee = None + self._gt_fee = None + self._amend_text = None + self._sequence_id = None + self._text = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if create_time_ms is not None: + self.create_time_ms = create_time_ms + if currency_pair is not None: + self.currency_pair = currency_pair + if side is not None: + self.side = side + if role is not None: + self.role = role + if amount is not None: + self.amount = amount + if price is not None: + self.price = price + if order_id is not None: + self.order_id = order_id + if fee is not None: + self.fee = fee + if fee_currency is not None: + self.fee_currency = fee_currency + if point_fee is not None: + self.point_fee = point_fee + if gt_fee is not None: + self.gt_fee = gt_fee + if amend_text is not None: + self.amend_text = amend_text + if sequence_id is not None: + self.sequence_id = sequence_id + if text is not None: + self.text = text + + @property + def id(self): + """Gets the id of this Trade. # noqa: E501 + + Trade ID # noqa: E501 + + :return: The id of this Trade. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Trade. + + Trade ID # noqa: E501 + + :param id: The id of this Trade. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this Trade. # noqa: E501 + + Trading time # noqa: E501 + + :return: The create_time of this Trade. # noqa: E501 + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Trade. + + Trading time # noqa: E501 + + :param create_time: The create_time of this Trade. # noqa: E501 + :type: str + """ + + self._create_time = create_time + + @property + def create_time_ms(self): + """Gets the create_time_ms of this Trade. # noqa: E501 + + Trading time, with millisecond precision # noqa: E501 + + :return: The create_time_ms of this Trade. # noqa: E501 + :rtype: str + """ + return self._create_time_ms + + @create_time_ms.setter + def create_time_ms(self, create_time_ms): + """Sets the create_time_ms of this Trade. + + Trading time, with millisecond precision # noqa: E501 + + :param create_time_ms: The create_time_ms of this Trade. # noqa: E501 + :type: str + """ + + self._create_time_ms = create_time_ms + + @property + def currency_pair(self): + """Gets the currency_pair of this Trade. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this Trade. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this Trade. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this Trade. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def side(self): + """Gets the side of this Trade. # noqa: E501 + + Order side # noqa: E501 + + :return: The side of this Trade. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this Trade. + + Order side # noqa: E501 + + :param side: The side of this Trade. # noqa: E501 + :type: str + """ + 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 role(self): + """Gets the role of this Trade. # noqa: E501 + + Trade role. No value in public endpoints # noqa: E501 + + :return: The role of this Trade. # noqa: E501 + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this Trade. + + Trade role. No value in public endpoints # noqa: E501 + + :param role: The role of this Trade. # noqa: E501 + :type: str + """ + allowed_values = ["taker", "maker"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 + .format(role, allowed_values) + ) + + self._role = role + + @property + def amount(self): + """Gets the amount of this Trade. # noqa: E501 + + Trade amount # noqa: E501 + + :return: The amount of this Trade. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Trade. + + Trade amount # noqa: E501 + + :param amount: The amount of this Trade. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def price(self): + """Gets the price of this Trade. # noqa: E501 + + Order price # noqa: E501 + + :return: The price of this Trade. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this Trade. + + Order price # noqa: E501 + + :param price: The price of this Trade. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def order_id(self): + """Gets the order_id of this Trade. # noqa: E501 + + Related order ID. No value in public endpoints # noqa: E501 + + :return: The order_id of this Trade. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this Trade. + + Related order ID. No value in public endpoints # noqa: E501 + + :param order_id: The order_id of this Trade. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def fee(self): + """Gets the fee of this Trade. # noqa: E501 + + Fee deducted. No value in public endpoints # noqa: E501 + + :return: The fee of this Trade. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this Trade. + + Fee deducted. No value in public endpoints # noqa: E501 + + :param fee: The fee of this Trade. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def fee_currency(self): + """Gets the fee_currency of this Trade. # noqa: E501 + + Fee currency unit. No value in public endpoints # noqa: E501 + + :return: The fee_currency of this Trade. # noqa: E501 + :rtype: str + """ + return self._fee_currency + + @fee_currency.setter + def fee_currency(self, fee_currency): + """Sets the fee_currency of this Trade. + + Fee currency unit. No value in public endpoints # noqa: E501 + + :param fee_currency: The fee_currency of this Trade. # noqa: E501 + :type: str + """ + + self._fee_currency = fee_currency + + @property + def point_fee(self): + """Gets the point_fee of this Trade. # noqa: E501 + + Points used to deduct fee. No value in public endpoints # noqa: E501 + + :return: The point_fee of this Trade. # noqa: E501 + :rtype: str + """ + return self._point_fee + + @point_fee.setter + def point_fee(self, point_fee): + """Sets the point_fee of this Trade. + + Points used to deduct fee. No value in public endpoints # noqa: E501 + + :param point_fee: The point_fee of this Trade. # noqa: E501 + :type: str + """ + + self._point_fee = point_fee + + @property + def gt_fee(self): + """Gets the gt_fee of this Trade. # noqa: E501 + + GT used to deduct fee. No value in public endpoints # noqa: E501 + + :return: The gt_fee of this Trade. # noqa: E501 + :rtype: str + """ + return self._gt_fee + + @gt_fee.setter + def gt_fee(self, gt_fee): + """Sets the gt_fee of this Trade. + + GT used to deduct fee. No value in public endpoints # noqa: E501 + + :param gt_fee: The gt_fee of this Trade. # noqa: E501 + :type: str + """ + + self._gt_fee = gt_fee + + @property + def amend_text(self): + """Gets the amend_text of this Trade. # noqa: E501 + + The custom data that the user remarked when amending the order # noqa: E501 + + :return: The amend_text of this Trade. # noqa: E501 + :rtype: str + """ + return self._amend_text + + @amend_text.setter + def amend_text(self, amend_text): + """Sets the amend_text of this Trade. + + The custom data that the user remarked when amending the order # noqa: E501 + + :param amend_text: The amend_text of this Trade. # noqa: E501 + :type: str + """ + + self._amend_text = amend_text + + @property + def sequence_id(self): + """Gets the sequence_id of this Trade. # noqa: E501 + + Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market # noqa: E501 + + :return: The sequence_id of this Trade. # noqa: E501 + :rtype: str + """ + return self._sequence_id + + @sequence_id.setter + def sequence_id(self, sequence_id): + """Sets the sequence_id of this Trade. + + Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market # noqa: E501 + + :param sequence_id: The sequence_id of this Trade. # noqa: E501 + :type: str + """ + + self._sequence_id = sequence_id + + @property + def text(self): + """Gets the text of this Trade. # noqa: E501 + + User defined information. No value in public endpoints # noqa: E501 + + :return: The text of this Trade. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this Trade. + + User defined information. No value in public endpoints # noqa: E501 + + :param text: The text of this Trade. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Trade): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Trade): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py new file mode 100644 index 0000000..47b0c08 --- /dev/null +++ b/gate_api/models/trade_fee.py @@ -0,0 +1,459 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TradeFee(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'taker_fee': 'str', + 'maker_fee': 'str', + 'gt_discount': 'bool', + 'gt_taker_fee': 'str', + 'gt_maker_fee': 'str', + 'loan_fee': 'str', + 'point_type': 'str', + 'futures_taker_fee': 'str', + 'futures_maker_fee': 'str', + 'delivery_taker_fee': 'str', + 'delivery_maker_fee': 'str', + 'debit_fee': 'int' + } + + attribute_map = { + 'user_id': 'user_id', + 'taker_fee': 'taker_fee', + 'maker_fee': 'maker_fee', + 'gt_discount': 'gt_discount', + 'gt_taker_fee': 'gt_taker_fee', + 'gt_maker_fee': 'gt_maker_fee', + 'loan_fee': 'loan_fee', + 'point_type': 'point_type', + 'futures_taker_fee': 'futures_taker_fee', + 'futures_maker_fee': 'futures_maker_fee', + 'delivery_taker_fee': 'delivery_taker_fee', + 'delivery_maker_fee': 'delivery_maker_fee', + 'debit_fee': 'debit_fee' + } + + def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=None, gt_taker_fee=None, gt_maker_fee=None, loan_fee=None, point_type=None, futures_taker_fee=None, futures_maker_fee=None, delivery_taker_fee=None, delivery_maker_fee=None, debit_fee=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, bool, str, str, str, str, str, str, str, str, int, Configuration) -> None + """TradeFee - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._taker_fee = None + self._maker_fee = None + self._gt_discount = None + self._gt_taker_fee = None + self._gt_maker_fee = None + self._loan_fee = None + self._point_type = None + self._futures_taker_fee = None + self._futures_maker_fee = None + self._delivery_taker_fee = None + self._delivery_maker_fee = None + self._debit_fee = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if taker_fee is not None: + self.taker_fee = taker_fee + if maker_fee is not None: + self.maker_fee = maker_fee + if gt_discount is not None: + self.gt_discount = gt_discount + if gt_taker_fee is not None: + self.gt_taker_fee = gt_taker_fee + if gt_maker_fee is not None: + self.gt_maker_fee = gt_maker_fee + if loan_fee is not None: + self.loan_fee = loan_fee + if point_type is not None: + self.point_type = point_type + if futures_taker_fee is not None: + self.futures_taker_fee = futures_taker_fee + if futures_maker_fee is not None: + self.futures_maker_fee = futures_maker_fee + if delivery_taker_fee is not None: + self.delivery_taker_fee = delivery_taker_fee + if delivery_maker_fee is not None: + self.delivery_maker_fee = delivery_maker_fee + if debit_fee is not None: + self.debit_fee = debit_fee + + @property + def user_id(self): + """Gets the user_id of this TradeFee. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this TradeFee. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this TradeFee. + + User ID # noqa: E501 + + :param user_id: The user_id of this TradeFee. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def taker_fee(self): + """Gets the taker_fee of this TradeFee. # noqa: E501 + + taker fee rate # noqa: E501 + + :return: The taker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._taker_fee + + @taker_fee.setter + def taker_fee(self, taker_fee): + """Sets the taker_fee of this TradeFee. + + taker fee rate # noqa: E501 + + :param taker_fee: The taker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._taker_fee = taker_fee + + @property + def maker_fee(self): + """Gets the maker_fee of this TradeFee. # noqa: E501 + + maker fee rate # noqa: E501 + + :return: The maker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._maker_fee + + @maker_fee.setter + def maker_fee(self, maker_fee): + """Sets the maker_fee of this TradeFee. + + maker fee rate # noqa: E501 + + :param maker_fee: The maker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._maker_fee = maker_fee + + @property + def gt_discount(self): + """Gets the gt_discount of this TradeFee. # noqa: E501 + + If GT deduction is enabled # noqa: E501 + + :return: The gt_discount of this TradeFee. # noqa: E501 + :rtype: bool + """ + return self._gt_discount + + @gt_discount.setter + def gt_discount(self, gt_discount): + """Sets the gt_discount of this TradeFee. + + If GT deduction is enabled # noqa: E501 + + :param gt_discount: The gt_discount of this TradeFee. # noqa: E501 + :type: bool + """ + + self._gt_discount = gt_discount + + @property + def gt_taker_fee(self): + """Gets the gt_taker_fee of this TradeFee. # noqa: E501 + + Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :return: The gt_taker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._gt_taker_fee + + @gt_taker_fee.setter + def gt_taker_fee(self, gt_taker_fee): + """Sets the gt_taker_fee of this TradeFee. + + Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :param gt_taker_fee: The gt_taker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._gt_taker_fee = gt_taker_fee + + @property + def gt_maker_fee(self): + """Gets the gt_maker_fee of this TradeFee. # noqa: E501 + + Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :return: The gt_maker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._gt_maker_fee + + @gt_maker_fee.setter + def gt_maker_fee(self, gt_maker_fee): + """Sets the gt_maker_fee of this TradeFee. + + Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + + :param gt_maker_fee: The gt_maker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._gt_maker_fee = gt_maker_fee + + @property + def loan_fee(self): + """Gets the loan_fee of this TradeFee. # noqa: E501 + + Loan fee rate of margin lending # noqa: E501 + + :return: The loan_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._loan_fee + + @loan_fee.setter + def loan_fee(self, loan_fee): + """Sets the loan_fee of this TradeFee. + + Loan fee rate of margin lending # noqa: E501 + + :param loan_fee: The loan_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._loan_fee = loan_fee + + @property + def point_type(self): + """Gets the point_type of this TradeFee. # noqa: E501 + + Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + + :return: The point_type of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._point_type + + @point_type.setter + def point_type(self, point_type): + """Sets the point_type of this TradeFee. + + Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + + :param point_type: The point_type of this TradeFee. # noqa: E501 + :type: str + """ + + self._point_type = point_type + + @property + def futures_taker_fee(self): + """Gets the futures_taker_fee of this TradeFee. # noqa: E501 + + Futures trading taker fee # noqa: E501 + + :return: The futures_taker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._futures_taker_fee + + @futures_taker_fee.setter + def futures_taker_fee(self, futures_taker_fee): + """Sets the futures_taker_fee of this TradeFee. + + Futures trading taker fee # noqa: E501 + + :param futures_taker_fee: The futures_taker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._futures_taker_fee = futures_taker_fee + + @property + def futures_maker_fee(self): + """Gets the futures_maker_fee of this TradeFee. # noqa: E501 + + Future trading maker fee # noqa: E501 + + :return: The futures_maker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._futures_maker_fee + + @futures_maker_fee.setter + def futures_maker_fee(self, futures_maker_fee): + """Sets the futures_maker_fee of this TradeFee. + + Future trading maker fee # noqa: E501 + + :param futures_maker_fee: The futures_maker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._futures_maker_fee = futures_maker_fee + + @property + def delivery_taker_fee(self): + """Gets the delivery_taker_fee of this TradeFee. # noqa: E501 + + Delivery trading taker fee # noqa: E501 + + :return: The delivery_taker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._delivery_taker_fee + + @delivery_taker_fee.setter + def delivery_taker_fee(self, delivery_taker_fee): + """Sets the delivery_taker_fee of this TradeFee. + + Delivery trading taker fee # noqa: E501 + + :param delivery_taker_fee: The delivery_taker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._delivery_taker_fee = delivery_taker_fee + + @property + def delivery_maker_fee(self): + """Gets the delivery_maker_fee of this TradeFee. # noqa: E501 + + Delivery trading maker fee # noqa: E501 + + :return: The delivery_maker_fee of this TradeFee. # noqa: E501 + :rtype: str + """ + return self._delivery_maker_fee + + @delivery_maker_fee.setter + def delivery_maker_fee(self, delivery_maker_fee): + """Sets the delivery_maker_fee of this TradeFee. + + Delivery trading maker fee # noqa: E501 + + :param delivery_maker_fee: The delivery_maker_fee of this TradeFee. # noqa: E501 + :type: str + """ + + self._delivery_maker_fee = delivery_maker_fee + + @property + def debit_fee(self): + """Gets the debit_fee of this TradeFee. # noqa: E501 + + Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 + + :return: The debit_fee of this TradeFee. # noqa: E501 + :rtype: int + """ + return self._debit_fee + + @debit_fee.setter + def debit_fee(self, debit_fee): + """Sets the debit_fee of this TradeFee. + + Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates # noqa: E501 + + :param debit_fee: The debit_fee of this TradeFee. # noqa: E501 + :type: int + """ + + self._debit_fee = debit_fee + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TradeFee): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TradeFee): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py new file mode 100644 index 0000000..8b3da4d --- /dev/null +++ b/gate_api/models/transaction_id.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TransactionID(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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': 'int' + } + + attribute_map = { + 'tx_id': 'tx_id' + } + + def __init__(self, tx_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """TransactionID - a 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.discriminator = None + + if tx_id is not None: + self.tx_id = tx_id + + @property + def tx_id(self): + """Gets the tx_id of this TransactionID. # noqa: E501 + + Order id # noqa: E501 + + :return: The tx_id of this TransactionID. # noqa: E501 + :rtype: int + """ + return self._tx_id + + @tx_id.setter + def tx_id(self, tx_id): + """Sets the tx_id of this TransactionID. + + Order id # noqa: E501 + + :param tx_id: The tx_id of this TransactionID. # noqa: E501 + :type: int + """ + + self._tx_id = tx_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, TransactionID): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransactionID): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py new file mode 100644 index 0000000..0e49717 --- /dev/null +++ b/gate_api/models/transfer.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Transfer(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + '_from': 'str', + 'to': 'str', + 'amount': 'str', + 'currency_pair': 'str', + 'settle': 'str' + } + + attribute_map = { + 'currency': 'currency', + '_from': 'from', + 'to': 'to', + 'amount': 'amount', + 'currency_pair': 'currency_pair', + 'settle': 'settle' + } + + def __init__(self, currency=None, _from=None, to=None, amount=None, currency_pair=None, settle=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """Transfer - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self.__from = None + self._to = None + self._amount = None + self._currency_pair = None + self._settle = None + self.discriminator = None + + self.currency = currency + self._from = _from + self.to = to + self.amount = amount + if currency_pair is not None: + self.currency_pair = currency_pair + if settle is not None: + self.settle = settle + + @property + def currency(self): + """Gets the currency of this Transfer. # noqa: E501 + + Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501 + + :return: The currency of this Transfer. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Transfer. + + Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501 + + :param currency: The currency of this Transfer. # 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 _from(self): + """Gets the _from of this Transfer. # noqa: E501 + + Account to transfer from # noqa: E501 + + :return: The _from of this Transfer. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this Transfer. + + Account to transfer from # noqa: E501 + + :param _from: The _from of this Transfer. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and _from is None: # noqa: E501 + raise ValueError("Invalid value for `_from`, must not be `None`") # noqa: E501 + allowed_values = ["spot", "margin", "futures", "delivery", "options"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and _from not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `_from` ({0}), must be one of {1}" # noqa: E501 + .format(_from, allowed_values) + ) + + self.__from = _from + + @property + def to(self): + """Gets the to of this Transfer. # noqa: E501 + + Account to transfer to # noqa: E501 + + :return: The to of this Transfer. # noqa: E501 + :rtype: str + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this Transfer. + + Account to transfer to # noqa: E501 + + :param to: The to of this Transfer. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + allowed_values = ["spot", "margin", "futures", "delivery", "options"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and to not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `to` ({0}), must be one of {1}" # noqa: E501 + .format(to, allowed_values) + ) + + self._to = to + + @property + def amount(self): + """Gets the amount of this Transfer. # noqa: E501 + + Transfer amount # noqa: E501 + + :return: The amount of this Transfer. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Transfer. + + Transfer amount # noqa: E501 + + :param amount: The amount of this Transfer. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def currency_pair(self): + """Gets the currency_pair of this Transfer. # noqa: E501 + + Margin currency pair. Required if transfer from or to margin account # noqa: E501 + + :return: The currency_pair of this Transfer. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this Transfer. + + Margin currency pair. Required if transfer from or to margin account # noqa: E501 + + :param currency_pair: The currency_pair of this Transfer. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def settle(self): + """Gets the settle of this Transfer. # noqa: E501 + + Futures settle currency. Required if transferring from or to futures account # noqa: E501 + + :return: The settle of this Transfer. # noqa: E501 + :rtype: str + """ + return self._settle + + @settle.setter + def settle(self, settle): + """Sets the settle of this Transfer. + + Futures settle currency. Required if transferring from or to futures account # noqa: E501 + + :param settle: The settle of this Transfer. # 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, Transfer): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Transfer): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py new file mode 100644 index 0000000..e086de6 --- /dev/null +++ b/gate_api/models/transfer_order_status.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TransferOrderStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tx_id': 'str', + 'status': 'str' + } + + attribute_map = { + 'tx_id': 'tx_id', + 'status': 'status' + } + + def __init__(self, tx_id=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """TransferOrderStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tx_id = None + self._status = None + self.discriminator = None + + if tx_id is not None: + self.tx_id = tx_id + if status is not None: + self.status = status + + @property + def tx_id(self): + """Gets the tx_id of this TransferOrderStatus. # noqa: E501 + + Order id # noqa: E501 + + :return: The tx_id of this TransferOrderStatus. # noqa: E501 + :rtype: str + """ + return self._tx_id + + @tx_id.setter + def tx_id(self, tx_id): + """Sets the tx_id of this TransferOrderStatus. + + Order id # noqa: E501 + + :param tx_id: The tx_id of this TransferOrderStatus. # noqa: E501 + :type: str + """ + + self._tx_id = tx_id + + @property + def status(self): + """Gets the status of this TransferOrderStatus. # noqa: E501 + + Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) # noqa: E501 + + :return: The status of this TransferOrderStatus. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this TransferOrderStatus. + + Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) # noqa: E501 + + :param status: The status of this TransferOrderStatus. # noqa: E501 + :type: str + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransferOrderStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransferOrderStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py new file mode 100644 index 0000000..4676e0f --- /dev/null +++ b/gate_api/models/transferables_result.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TransferablesResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """TransferablesResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + + @property + def currency(self): + """Gets the currency of this TransferablesResult. # noqa: E501 + + Currency detail # noqa: E501 + + :return: The currency of this TransferablesResult. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this TransferablesResult. + + Currency detail # noqa: E501 + + :param currency: The currency of this TransferablesResult. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this TransferablesResult. # noqa: E501 + + The maximum amount that can be transferred out # noqa: E501 + + :return: The amount of this TransferablesResult. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this TransferablesResult. + + The maximum amount that can be transferred out # noqa: E501 + + :param amount: The amount of this TransferablesResult. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransferablesResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransferablesResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py new file mode 100644 index 0000000..4681081 --- /dev/null +++ b/gate_api/models/trigger_order_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TriggerOrderResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """TriggerOrderResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this TriggerOrderResponse. # noqa: E501 + + Auto order ID # noqa: E501 + + :return: The id of this TriggerOrderResponse. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TriggerOrderResponse. + + Auto order ID # noqa: E501 + + :param id: The id of this TriggerOrderResponse. # noqa: E501 + :type: int + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TriggerOrderResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TriggerOrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py new file mode 100644 index 0000000..d8d64f3 --- /dev/null +++ b/gate_api/models/trigger_time.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class TriggerTime(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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_time': 'int' + } + + attribute_map = { + 'trigger_time': 'triggerTime' + } + + def __init__(self, trigger_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """TriggerTime - a 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_time = None + self.discriminator = None + + if trigger_time is not None: + self.trigger_time = trigger_time + + @property + def trigger_time(self): + """Gets the trigger_time of this TriggerTime. # noqa: E501 + + Timestamp of the end of the countdown, in milliseconds # noqa: E501 + + :return: The trigger_time of this TriggerTime. # noqa: E501 + :rtype: int + """ + return self._trigger_time + + @trigger_time.setter + def trigger_time(self, trigger_time): + """Sets the trigger_time of this TriggerTime. + + Timestamp of the end of the countdown, in milliseconds # noqa: E501 + + :param trigger_time: The trigger_time of this TriggerTime. # noqa: E501 + :type: int + """ + + self._trigger_time = trigger_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, TriggerTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TriggerTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py new file mode 100644 index 0000000..ff523de --- /dev/null +++ b/gate_api/models/uid_push_order.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UidPushOrder(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'push_uid': 'int', + 'receive_uid': 'int', + 'currency': 'str', + 'amount': 'str', + 'create_time': 'int', + 'status': 'str', + 'message': 'str', + 'transaction_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'push_uid': 'push_uid', + 'receive_uid': 'receive_uid', + 'currency': 'currency', + 'amount': 'amount', + 'create_time': 'create_time', + 'status': 'status', + 'message': 'message', + 'transaction_type': 'transaction_type' + } + + def __init__(self, id=None, push_uid=None, receive_uid=None, currency=None, amount=None, create_time=None, status=None, message=None, transaction_type=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, str, str, int, str, str, str, Configuration) -> None + """UidPushOrder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._push_uid = None + self._receive_uid = None + self._currency = None + self._amount = None + self._create_time = None + self._status = None + self._message = None + self._transaction_type = None + self.discriminator = None + + if id is not None: + self.id = id + if push_uid is not None: + self.push_uid = push_uid + if receive_uid is not None: + self.receive_uid = receive_uid + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + if create_time is not None: + self.create_time = create_time + if status is not None: + self.status = status + if message is not None: + self.message = message + if transaction_type is not None: + self.transaction_type = transaction_type + + @property + def id(self): + """Gets the id of this UidPushOrder. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this UidPushOrder. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UidPushOrder. + + Order ID # noqa: E501 + + :param id: The id of this UidPushOrder. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def push_uid(self): + """Gets the push_uid of this UidPushOrder. # noqa: E501 + + Initiator User ID # noqa: E501 + + :return: The push_uid of this UidPushOrder. # noqa: E501 + :rtype: int + """ + return self._push_uid + + @push_uid.setter + def push_uid(self, push_uid): + """Sets the push_uid of this UidPushOrder. + + Initiator User ID # noqa: E501 + + :param push_uid: The push_uid of this UidPushOrder. # noqa: E501 + :type: int + """ + + self._push_uid = push_uid + + @property + def receive_uid(self): + """Gets the receive_uid of this UidPushOrder. # noqa: E501 + + Recipient User ID # noqa: E501 + + :return: The receive_uid of this UidPushOrder. # noqa: E501 + :rtype: int + """ + return self._receive_uid + + @receive_uid.setter + def receive_uid(self, receive_uid): + """Sets the receive_uid of this UidPushOrder. + + Recipient User ID # noqa: E501 + + :param receive_uid: The receive_uid of this UidPushOrder. # noqa: E501 + :type: int + """ + + self._receive_uid = receive_uid + + @property + def currency(self): + """Gets the currency of this UidPushOrder. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UidPushOrder. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UidPushOrder. + + Currency name # noqa: E501 + + :param currency: The currency of this UidPushOrder. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UidPushOrder. # noqa: E501 + + Transfer amount # noqa: E501 + + :return: The amount of this UidPushOrder. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UidPushOrder. + + Transfer amount # noqa: E501 + + :param amount: The amount of this UidPushOrder. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def create_time(self): + """Gets the create_time of this UidPushOrder. # noqa: E501 + + Creation time # noqa: E501 + + :return: The create_time of this UidPushOrder. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UidPushOrder. + + Creation time # noqa: E501 + + :param create_time: The create_time of this UidPushOrder. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def status(self): + """Gets the status of this UidPushOrder. # noqa: E501 + + Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 + + :return: The status of this UidPushOrder. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this UidPushOrder. + + Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 + + :param status: The status of this UidPushOrder. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def message(self): + """Gets the message of this UidPushOrder. # noqa: E501 + + PENDING Reason Tips # noqa: E501 + + :return: The message of this UidPushOrder. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this UidPushOrder. + + PENDING Reason Tips # noqa: E501 + + :param message: The message of this UidPushOrder. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def transaction_type(self): + """Gets the transaction_type of this UidPushOrder. # noqa: E501 + + Order Type # noqa: E501 + + :return: The transaction_type of this UidPushOrder. # noqa: E501 + :rtype: str + """ + return self._transaction_type + + @transaction_type.setter + def transaction_type(self, transaction_type): + """Sets the transaction_type of this UidPushOrder. + + Order Type # noqa: E501 + + :param transaction_type: The transaction_type of this UidPushOrder. # noqa: E501 + :type: str + """ + + self._transaction_type = transaction_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UidPushOrder): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UidPushOrder): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py new file mode 100644 index 0000000..20cc498 --- /dev/null +++ b/gate_api/models/uid_push_withdrawal.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UidPushWithdrawal(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'receive_uid': 'int', + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'receive_uid': 'receive_uid', + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, receive_uid=None, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, Configuration) -> None + """UidPushWithdrawal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._receive_uid = None + self._currency = None + self._amount = None + self.discriminator = None + + self.receive_uid = receive_uid + self.currency = currency + self.amount = amount + + @property + def receive_uid(self): + """Gets the receive_uid of this UidPushWithdrawal. # noqa: E501 + + Recipient UID # noqa: E501 + + :return: The receive_uid of this UidPushWithdrawal. # noqa: E501 + :rtype: int + """ + return self._receive_uid + + @receive_uid.setter + def receive_uid(self, receive_uid): + """Sets the receive_uid of this UidPushWithdrawal. + + Recipient UID # noqa: E501 + + :param receive_uid: The receive_uid of this UidPushWithdrawal. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and receive_uid is None: # noqa: E501 + raise ValueError("Invalid value for `receive_uid`, must not be `None`") # noqa: E501 + + self._receive_uid = receive_uid + + @property + def currency(self): + """Gets the currency of this UidPushWithdrawal. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UidPushWithdrawal. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UidPushWithdrawal. + + Currency name # noqa: E501 + + :param currency: The currency of this UidPushWithdrawal. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UidPushWithdrawal. # noqa: E501 + + Transfer amount # noqa: E501 + + :return: The amount of this UidPushWithdrawal. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UidPushWithdrawal. + + Transfer amount # noqa: E501 + + :param amount: The amount of this UidPushWithdrawal. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UidPushWithdrawal): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UidPushWithdrawal): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py new file mode 100644 index 0000000..8ca17ee --- /dev/null +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UidPushWithdrawalResp(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """UidPushWithdrawalResp - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this UidPushWithdrawalResp. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this UidPushWithdrawalResp. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UidPushWithdrawalResp. + + Order ID # noqa: E501 + + :param id: The id of this UidPushWithdrawalResp. # noqa: E501 + :type: int + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UidPushWithdrawalResp): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UidPushWithdrawalResp): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py new file mode 100644 index 0000000..df2d2b5 --- /dev/null +++ b/gate_api/models/uni_currency.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'min_lend_amount': 'str', + 'max_lend_amount': 'str', + 'max_rate': 'str', + 'min_rate': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'min_lend_amount': 'min_lend_amount', + 'max_lend_amount': 'max_lend_amount', + 'max_rate': 'max_rate', + 'min_rate': 'min_rate' + } + + def __init__(self, currency=None, min_lend_amount=None, max_lend_amount=None, max_rate=None, min_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """UniCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._min_lend_amount = None + self._max_lend_amount = None + self._max_rate = None + self._min_rate = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if min_lend_amount is not None: + self.min_lend_amount = min_lend_amount + if max_lend_amount is not None: + self.max_lend_amount = max_lend_amount + if max_rate is not None: + self.max_rate = max_rate + if min_rate is not None: + self.min_rate = min_rate + + @property + def currency(self): + """Gets the currency of this UniCurrency. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UniCurrency. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniCurrency. + + Currency name # noqa: E501 + + :param currency: The currency of this UniCurrency. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def min_lend_amount(self): + """Gets the min_lend_amount of this UniCurrency. # noqa: E501 + + The minimum lending amount, in the unit of the currency. # noqa: E501 + + :return: The min_lend_amount of this UniCurrency. # noqa: E501 + :rtype: str + """ + return self._min_lend_amount + + @min_lend_amount.setter + def min_lend_amount(self, min_lend_amount): + """Sets the min_lend_amount of this UniCurrency. + + The minimum lending amount, in the unit of the currency. # noqa: E501 + + :param min_lend_amount: The min_lend_amount of this UniCurrency. # noqa: E501 + :type: str + """ + + self._min_lend_amount = min_lend_amount + + @property + def max_lend_amount(self): + """Gets the max_lend_amount of this UniCurrency. # noqa: E501 + + The total maximum lending amount, in USDT # noqa: E501 + + :return: The max_lend_amount of this UniCurrency. # noqa: E501 + :rtype: str + """ + return self._max_lend_amount + + @max_lend_amount.setter + def max_lend_amount(self, max_lend_amount): + """Sets the max_lend_amount of this UniCurrency. + + The total maximum lending amount, in USDT # noqa: E501 + + :param max_lend_amount: The max_lend_amount of this UniCurrency. # noqa: E501 + :type: str + """ + + self._max_lend_amount = max_lend_amount + + @property + def max_rate(self): + """Gets the max_rate of this UniCurrency. # noqa: E501 + + Maximum rate (Hourly) # noqa: E501 + + :return: The max_rate of this UniCurrency. # noqa: E501 + :rtype: str + """ + return self._max_rate + + @max_rate.setter + def max_rate(self, max_rate): + """Sets the max_rate of this UniCurrency. + + Maximum rate (Hourly) # noqa: E501 + + :param max_rate: The max_rate of this UniCurrency. # noqa: E501 + :type: str + """ + + self._max_rate = max_rate + + @property + def min_rate(self): + """Gets the min_rate of this UniCurrency. # noqa: E501 + + Minimum rate (Hourly) # noqa: E501 + + :return: The min_rate of this UniCurrency. # noqa: E501 + :rtype: str + """ + return self._min_rate + + @min_rate.setter + def min_rate(self, min_rate): + """Sets the min_rate of this UniCurrency. + + Minimum rate (Hourly) # noqa: E501 + + :param min_rate: The min_rate of this UniCurrency. # noqa: E501 + :type: str + """ + + self._min_rate = min_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, UniCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py new file mode 100644 index 0000000..fc5b64b --- /dev/null +++ b/gate_api/models/uni_currency_interest.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniCurrencyInterest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'interest_status': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'interest_status': 'interest_status' + } + + def __init__(self, currency=None, interest_status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UniCurrencyInterest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._interest_status = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if interest_status is not None: + self.interest_status = interest_status + + @property + def currency(self): + """Gets the currency of this UniCurrencyInterest. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UniCurrencyInterest. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniCurrencyInterest. + + Currency # noqa: E501 + + :param currency: The currency of this UniCurrencyInterest. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def interest_status(self): + """Gets the interest_status of this UniCurrencyInterest. # noqa: E501 + + Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + + :return: The interest_status of this UniCurrencyInterest. # noqa: E501 + :rtype: str + """ + return self._interest_status + + @interest_status.setter + def interest_status(self, interest_status): + """Sets the interest_status of this UniCurrencyInterest. + + Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + + :param interest_status: The interest_status of this UniCurrencyInterest. # noqa: E501 + :type: str + """ + + self._interest_status = interest_status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniCurrencyInterest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniCurrencyInterest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py new file mode 100644 index 0000000..226fa8e --- /dev/null +++ b/gate_api/models/uni_currency_pair.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniCurrencyPair(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'base_min_borrow_amount': 'str', + 'quote_min_borrow_amount': 'str', + 'leverage': 'str' + } + + attribute_map = { + 'currency_pair': 'currency_pair', + 'base_min_borrow_amount': 'base_min_borrow_amount', + 'quote_min_borrow_amount': 'quote_min_borrow_amount', + 'leverage': 'leverage' + } + + def __init__(self, currency_pair=None, base_min_borrow_amount=None, quote_min_borrow_amount=None, leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None + """UniCurrencyPair - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency_pair = None + self._base_min_borrow_amount = None + self._quote_min_borrow_amount = None + self._leverage = None + self.discriminator = None + + if currency_pair is not None: + self.currency_pair = currency_pair + if base_min_borrow_amount is not None: + self.base_min_borrow_amount = base_min_borrow_amount + if quote_min_borrow_amount is not None: + self.quote_min_borrow_amount = quote_min_borrow_amount + if leverage is not None: + self.leverage = leverage + + @property + def currency_pair(self): + """Gets the currency_pair of this UniCurrencyPair. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this UniCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this UniCurrencyPair. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this UniCurrencyPair. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def base_min_borrow_amount(self): + """Gets the base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 + + Minimum borrow amount of base currency # noqa: E501 + + :return: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._base_min_borrow_amount + + @base_min_borrow_amount.setter + def base_min_borrow_amount(self, base_min_borrow_amount): + """Sets the base_min_borrow_amount of this UniCurrencyPair. + + Minimum borrow amount of base currency # noqa: E501 + + :param base_min_borrow_amount: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 + :type: str + """ + + self._base_min_borrow_amount = base_min_borrow_amount + + @property + def quote_min_borrow_amount(self): + """Gets the quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 + + Minimum borrow amount of quote currency # noqa: E501 + + :return: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._quote_min_borrow_amount + + @quote_min_borrow_amount.setter + def quote_min_borrow_amount(self, quote_min_borrow_amount): + """Sets the quote_min_borrow_amount of this UniCurrencyPair. + + Minimum borrow amount of quote currency # noqa: E501 + + :param quote_min_borrow_amount: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 + :type: str + """ + + self._quote_min_borrow_amount = quote_min_borrow_amount + + @property + def leverage(self): + """Gets the leverage of this UniCurrencyPair. # noqa: E501 + + Position leverage # noqa: E501 + + :return: The leverage of this UniCurrencyPair. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this UniCurrencyPair. + + Position leverage # noqa: E501 + + :param leverage: The leverage of this UniCurrencyPair. # 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, UniCurrencyPair): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniCurrencyPair): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_interest_mode.py b/gate_api/models/uni_interest_mode.py new file mode 100644 index 0000000..56ec36f --- /dev/null +++ b/gate_api/models/uni_interest_mode.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniInterestMode(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'status': 'bool' + } + + attribute_map = { + 'currency': 'currency', + 'status': 'status' + } + + def __init__(self, currency=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, bool, Configuration) -> None + """UniInterestMode - a 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._status = None + self.discriminator = None + + self.currency = currency + self.status = status + + @property + def currency(self): + """Gets the currency of this UniInterestMode. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UniInterestMode. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniInterestMode. + + Currency # noqa: E501 + + :param currency: The currency of this UniInterestMode. # 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 status(self): + """Gets the status of this UniInterestMode. # noqa: E501 + + Interest toggle settings, true - interest reinvestment, false - regular dividend # noqa: E501 + + :return: The status of this UniInterestMode. # noqa: E501 + :rtype: bool + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this UniInterestMode. + + Interest toggle settings, true - interest reinvestment, false - regular dividend # noqa: E501 + + :param status: The status of this UniInterestMode. # noqa: E501 + :type: bool + """ + 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, UniInterestMode): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniInterestMode): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py new file mode 100644 index 0000000..1fcf11e --- /dev/null +++ b/gate_api/models/uni_interest_record.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniInterestRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'status': 'int', + 'currency': 'str', + 'actual_rate': 'str', + 'interest': 'str', + 'interest_status': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'status': 'status', + 'currency': 'currency', + 'actual_rate': 'actual_rate', + 'interest': 'interest', + 'interest_status': 'interest_status', + 'create_time': 'create_time' + } + + def __init__(self, status=None, currency=None, actual_rate=None, interest=None, interest_status=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, int, Configuration) -> None + """UniInterestRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._status = None + self._currency = None + self._actual_rate = None + self._interest = None + self._interest_status = None + self._create_time = None + self.discriminator = None + + if status is not None: + self.status = status + if currency is not None: + self.currency = currency + if actual_rate is not None: + self.actual_rate = actual_rate + if interest is not None: + self.interest = interest + if interest_status is not None: + self.interest_status = interest_status + if create_time is not None: + self.create_time = create_time + + @property + def status(self): + """Gets the status of this UniInterestRecord. # noqa: E501 + + Status: 0 - fail, 1 - success # noqa: E501 + + :return: The status of this UniInterestRecord. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this UniInterestRecord. + + Status: 0 - fail, 1 - success # noqa: E501 + + :param status: The status of this UniInterestRecord. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def currency(self): + """Gets the currency of this UniInterestRecord. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UniInterestRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniInterestRecord. + + Currency # noqa: E501 + + :param currency: The currency of this UniInterestRecord. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def actual_rate(self): + """Gets the actual_rate of this UniInterestRecord. # noqa: E501 + + Actual Rate # noqa: E501 + + :return: The actual_rate of this UniInterestRecord. # noqa: E501 + :rtype: str + """ + return self._actual_rate + + @actual_rate.setter + def actual_rate(self, actual_rate): + """Sets the actual_rate of this UniInterestRecord. + + Actual Rate # noqa: E501 + + :param actual_rate: The actual_rate of this UniInterestRecord. # noqa: E501 + :type: str + """ + + self._actual_rate = actual_rate + + @property + def interest(self): + """Gets the interest of this UniInterestRecord. # noqa: E501 + + Interest # noqa: E501 + + :return: The interest of this UniInterestRecord. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this UniInterestRecord. + + Interest # noqa: E501 + + :param interest: The interest of this UniInterestRecord. # noqa: E501 + :type: str + """ + + self._interest = interest + + @property + def interest_status(self): + """Gets the interest_status of this UniInterestRecord. # noqa: E501 + + Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + + :return: The interest_status of this UniInterestRecord. # noqa: E501 + :rtype: str + """ + return self._interest_status + + @interest_status.setter + def interest_status(self, interest_status): + """Sets the interest_status of this UniInterestRecord. + + Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + + :param interest_status: The interest_status of this UniInterestRecord. # noqa: E501 + :type: str + """ + + self._interest_status = interest_status + + @property + def create_time(self): + """Gets the create_time of this UniInterestRecord. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this UniInterestRecord. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UniInterestRecord. + + Created time # noqa: E501 + + :param create_time: The create_time of this UniInterestRecord. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniInterestRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniInterestRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py new file mode 100644 index 0000000..0e2be68 --- /dev/null +++ b/gate_api/models/uni_lend.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniLend(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'current_amount': 'str', + 'amount': 'str', + 'lent_amount': 'str', + 'frozen_amount': 'str', + 'min_rate': 'str', + 'interest_status': 'str', + 'reinvest_left_amount': 'str', + 'create_time': 'int', + 'update_time': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'current_amount': 'current_amount', + 'amount': 'amount', + 'lent_amount': 'lent_amount', + 'frozen_amount': 'frozen_amount', + 'min_rate': 'min_rate', + 'interest_status': 'interest_status', + 'reinvest_left_amount': 'reinvest_left_amount', + 'create_time': 'create_time', + 'update_time': 'update_time' + } + + def __init__(self, currency=None, current_amount=None, amount=None, lent_amount=None, frozen_amount=None, min_rate=None, interest_status=None, reinvest_left_amount=None, create_time=None, update_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, int, int, Configuration) -> None + """UniLend - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._current_amount = None + self._amount = None + self._lent_amount = None + self._frozen_amount = None + self._min_rate = None + self._interest_status = None + self._reinvest_left_amount = None + self._create_time = None + self._update_time = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if current_amount is not None: + self.current_amount = current_amount + if amount is not None: + self.amount = amount + if lent_amount is not None: + self.lent_amount = lent_amount + if frozen_amount is not None: + self.frozen_amount = frozen_amount + if min_rate is not None: + self.min_rate = min_rate + if interest_status is not None: + self.interest_status = interest_status + if reinvest_left_amount is not None: + self.reinvest_left_amount = reinvest_left_amount + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + + @property + def currency(self): + """Gets the currency of this UniLend. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UniLend. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniLend. + + Currency # noqa: E501 + + :param currency: The currency of this UniLend. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def current_amount(self): + """Gets the current_amount of this UniLend. # noqa: E501 + + Current amount # noqa: E501 + + :return: The current_amount of this UniLend. # noqa: E501 + :rtype: str + """ + return self._current_amount + + @current_amount.setter + def current_amount(self, current_amount): + """Sets the current_amount of this UniLend. + + Current amount # noqa: E501 + + :param current_amount: The current_amount of this UniLend. # noqa: E501 + :type: str + """ + + self._current_amount = current_amount + + @property + def amount(self): + """Gets the amount of this UniLend. # noqa: E501 + + Total amount # noqa: E501 + + :return: The amount of this UniLend. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UniLend. + + Total amount # noqa: E501 + + :param amount: The amount of this UniLend. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def lent_amount(self): + """Gets the lent_amount of this UniLend. # noqa: E501 + + Lent amount # noqa: E501 + + :return: The lent_amount of this UniLend. # noqa: E501 + :rtype: str + """ + return self._lent_amount + + @lent_amount.setter + def lent_amount(self, lent_amount): + """Sets the lent_amount of this UniLend. + + Lent amount # noqa: E501 + + :param lent_amount: The lent_amount of this UniLend. # noqa: E501 + :type: str + """ + + self._lent_amount = lent_amount + + @property + def frozen_amount(self): + """Gets the frozen_amount of this UniLend. # noqa: E501 + + Frozen amount # noqa: E501 + + :return: The frozen_amount of this UniLend. # noqa: E501 + :rtype: str + """ + return self._frozen_amount + + @frozen_amount.setter + def frozen_amount(self, frozen_amount): + """Sets the frozen_amount of this UniLend. + + Frozen amount # noqa: E501 + + :param frozen_amount: The frozen_amount of this UniLend. # noqa: E501 + :type: str + """ + + self._frozen_amount = frozen_amount + + @property + def min_rate(self): + """Gets the min_rate of this UniLend. # noqa: E501 + + Minimum interest rate # noqa: E501 + + :return: The min_rate of this UniLend. # noqa: E501 + :rtype: str + """ + return self._min_rate + + @min_rate.setter + def min_rate(self, min_rate): + """Sets the min_rate of this UniLend. + + Minimum interest rate # noqa: E501 + + :param min_rate: The min_rate of this UniLend. # noqa: E501 + :type: str + """ + + self._min_rate = min_rate + + @property + def interest_status(self): + """Gets the interest_status of this UniLend. # noqa: E501 + + Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + + :return: The interest_status of this UniLend. # noqa: E501 + :rtype: str + """ + return self._interest_status + + @interest_status.setter + def interest_status(self, interest_status): + """Sets the interest_status of this UniLend. + + Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + + :param interest_status: The interest_status of this UniLend. # noqa: E501 + :type: str + """ + + self._interest_status = interest_status + + @property + def reinvest_left_amount(self): + """Gets the reinvest_left_amount of this UniLend. # noqa: E501 + + Amount not reinvested # noqa: E501 + + :return: The reinvest_left_amount of this UniLend. # noqa: E501 + :rtype: str + """ + return self._reinvest_left_amount + + @reinvest_left_amount.setter + def reinvest_left_amount(self, reinvest_left_amount): + """Sets the reinvest_left_amount of this UniLend. + + Amount not reinvested # noqa: E501 + + :param reinvest_left_amount: The reinvest_left_amount of this UniLend. # noqa: E501 + :type: str + """ + + self._reinvest_left_amount = reinvest_left_amount + + @property + def create_time(self): + """Gets the create_time of this UniLend. # noqa: E501 + + Created time of the lending order # noqa: E501 + + :return: The create_time of this UniLend. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UniLend. + + Created time of the lending order # noqa: E501 + + :param create_time: The create_time of this UniLend. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this UniLend. # noqa: E501 + + Upated time of the lending order # noqa: E501 + + :return: The update_time of this UniLend. # noqa: E501 + :rtype: int + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this UniLend. + + Upated time of the lending order # noqa: E501 + + :param update_time: The update_time of this UniLend. # noqa: E501 + :type: int + """ + + self._update_time = update_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniLend): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniLend): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py new file mode 100644 index 0000000..ccbfa43 --- /dev/null +++ b/gate_api/models/uni_lend_interest.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniLendInterest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'interest': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'interest': 'interest' + } + + def __init__(self, currency=None, interest=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UniLendInterest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._interest = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if interest is not None: + self.interest = interest + + @property + def currency(self): + """Gets the currency of this UniLendInterest. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UniLendInterest. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniLendInterest. + + Currency # noqa: E501 + + :param currency: The currency of this UniLendInterest. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def interest(self): + """Gets the interest of this UniLendInterest. # noqa: E501 + + Interest # noqa: E501 + + :return: The interest of this UniLendInterest. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this UniLendInterest. + + Interest # noqa: E501 + + :param interest: The interest of this UniLendInterest. # noqa: E501 + :type: str + """ + + self._interest = interest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniLendInterest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniLendInterest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py new file mode 100644 index 0000000..14095af --- /dev/null +++ b/gate_api/models/uni_lend_record.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniLendRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str', + 'last_wallet_amount': 'str', + 'last_lent_amount': 'str', + 'last_frozen_amount': 'str', + 'type': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount', + 'last_wallet_amount': 'last_wallet_amount', + 'last_lent_amount': 'last_lent_amount', + 'last_frozen_amount': 'last_frozen_amount', + 'type': 'type', + 'create_time': 'create_time' + } + + def __init__(self, currency=None, amount=None, last_wallet_amount=None, last_lent_amount=None, last_frozen_amount=None, type=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, int, Configuration) -> None + """UniLendRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self._last_wallet_amount = None + self._last_lent_amount = None + self._last_frozen_amount = None + self._type = None + self._create_time = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + if last_wallet_amount is not None: + self.last_wallet_amount = last_wallet_amount + if last_lent_amount is not None: + self.last_lent_amount = last_lent_amount + if last_frozen_amount is not None: + self.last_frozen_amount = last_frozen_amount + if type is not None: + self.type = type + if create_time is not None: + self.create_time = create_time + + @property + def currency(self): + """Gets the currency of this UniLendRecord. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UniLendRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniLendRecord. + + Currency name # noqa: E501 + + :param currency: The currency of this UniLendRecord. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UniLendRecord. # noqa: E501 + + current amount # noqa: E501 + + :return: The amount of this UniLendRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UniLendRecord. + + current amount # noqa: E501 + + :param amount: The amount of this UniLendRecord. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def last_wallet_amount(self): + """Gets the last_wallet_amount of this UniLendRecord. # noqa: E501 + + Last wallet amount # noqa: E501 + + :return: The last_wallet_amount of this UniLendRecord. # noqa: E501 + :rtype: str + """ + return self._last_wallet_amount + + @last_wallet_amount.setter + def last_wallet_amount(self, last_wallet_amount): + """Sets the last_wallet_amount of this UniLendRecord. + + Last wallet amount # noqa: E501 + + :param last_wallet_amount: The last_wallet_amount of this UniLendRecord. # noqa: E501 + :type: str + """ + + self._last_wallet_amount = last_wallet_amount + + @property + def last_lent_amount(self): + """Gets the last_lent_amount of this UniLendRecord. # noqa: E501 + + Last lent amount # noqa: E501 + + :return: The last_lent_amount of this UniLendRecord. # noqa: E501 + :rtype: str + """ + return self._last_lent_amount + + @last_lent_amount.setter + def last_lent_amount(self, last_lent_amount): + """Sets the last_lent_amount of this UniLendRecord. + + Last lent amount # noqa: E501 + + :param last_lent_amount: The last_lent_amount of this UniLendRecord. # noqa: E501 + :type: str + """ + + self._last_lent_amount = last_lent_amount + + @property + def last_frozen_amount(self): + """Gets the last_frozen_amount of this UniLendRecord. # noqa: E501 + + Last frozen amount # noqa: E501 + + :return: The last_frozen_amount of this UniLendRecord. # noqa: E501 + :rtype: str + """ + return self._last_frozen_amount + + @last_frozen_amount.setter + def last_frozen_amount(self, last_frozen_amount): + """Sets the last_frozen_amount of this UniLendRecord. + + Last frozen amount # noqa: E501 + + :param last_frozen_amount: The last_frozen_amount of this UniLendRecord. # noqa: E501 + :type: str + """ + + self._last_frozen_amount = last_frozen_amount + + @property + def type(self): + """Gets the type of this UniLendRecord. # noqa: E501 + + Record type: lend - lend, redeem - redeem # noqa: E501 + + :return: The type of this UniLendRecord. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UniLendRecord. + + Record type: lend - lend, redeem - redeem # noqa: E501 + + :param type: The type of this UniLendRecord. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def create_time(self): + """Gets the create_time of this UniLendRecord. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this UniLendRecord. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UniLendRecord. + + Created time # noqa: E501 + + :param create_time: The create_time of this UniLendRecord. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniLendRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniLendRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py new file mode 100644 index 0000000..0ae80fd --- /dev/null +++ b/gate_api/models/uni_loan.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniLoan(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'currency_pair': 'str', + 'amount': 'str', + 'type': 'str', + 'create_time': 'int', + 'update_time': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'currency_pair': 'currency_pair', + 'amount': 'amount', + 'type': 'type', + 'create_time': 'create_time', + 'update_time': 'update_time' + } + + def __init__(self, currency=None, currency_pair=None, amount=None, type=None, create_time=None, update_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, int, Configuration) -> None + """UniLoan - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._currency_pair = None + self._amount = None + self._type = None + self._create_time = None + self._update_time = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if currency_pair is not None: + self.currency_pair = currency_pair + if amount is not None: + self.amount = amount + if type is not None: + self.type = type + if create_time is not None: + self.create_time = create_time + if update_time is not None: + self.update_time = update_time + + @property + def currency(self): + """Gets the currency of this UniLoan. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UniLoan. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniLoan. + + Currency # noqa: E501 + + :param currency: The currency of this UniLoan. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def currency_pair(self): + """Gets the currency_pair of this UniLoan. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this UniLoan. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this UniLoan. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this UniLoan. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def amount(self): + """Gets the amount of this UniLoan. # noqa: E501 + + amount # noqa: E501 + + :return: The amount of this UniLoan. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UniLoan. + + amount # noqa: E501 + + :param amount: The amount of this UniLoan. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def type(self): + """Gets the type of this UniLoan. # noqa: E501 + + Loan type, platform - platform, margin - margin # noqa: E501 + + :return: The type of this UniLoan. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UniLoan. + + Loan type, platform - platform, margin - margin # noqa: E501 + + :param type: The type of this UniLoan. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def create_time(self): + """Gets the create_time of this UniLoan. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this UniLoan. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UniLoan. + + Created time # noqa: E501 + + :param create_time: The create_time of this UniLoan. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this UniLoan. # noqa: E501 + + Updated time # noqa: E501 + + :return: The update_time of this UniLoan. # noqa: E501 + :rtype: int + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this UniLoan. + + Updated time # noqa: E501 + + :param update_time: The update_time of this UniLoan. # noqa: E501 + :type: int + """ + + self._update_time = update_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniLoan): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniLoan): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py new file mode 100644 index 0000000..2327f01 --- /dev/null +++ b/gate_api/models/uni_loan_interest_record.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniLoanInterestRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'currency_pair': 'str', + 'actual_rate': 'str', + 'interest': 'str', + 'status': 'int', + 'type': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'currency_pair': 'currency_pair', + 'actual_rate': 'actual_rate', + 'interest': 'interest', + 'status': 'status', + 'type': 'type', + 'create_time': 'create_time' + } + + def __init__(self, currency=None, currency_pair=None, actual_rate=None, interest=None, status=None, type=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, str, int, Configuration) -> None + """UniLoanInterestRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._currency_pair = None + self._actual_rate = None + self._interest = None + self._status = None + self._type = None + self._create_time = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if currency_pair is not None: + self.currency_pair = currency_pair + if actual_rate is not None: + self.actual_rate = actual_rate + if interest is not None: + self.interest = interest + if status is not None: + self.status = status + if type is not None: + self.type = type + if create_time is not None: + self.create_time = create_time + + @property + def currency(self): + """Gets the currency of this UniLoanInterestRecord. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UniLoanInterestRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniLoanInterestRecord. + + Currency name # noqa: E501 + + :param currency: The currency of this UniLoanInterestRecord. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def currency_pair(self): + """Gets the currency_pair of this UniLoanInterestRecord. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this UniLoanInterestRecord. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this UniLoanInterestRecord. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this UniLoanInterestRecord. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def actual_rate(self): + """Gets the actual_rate of this UniLoanInterestRecord. # noqa: E501 + + Actual rate # noqa: E501 + + :return: The actual_rate of this UniLoanInterestRecord. # noqa: E501 + :rtype: str + """ + return self._actual_rate + + @actual_rate.setter + def actual_rate(self, actual_rate): + """Sets the actual_rate of this UniLoanInterestRecord. + + Actual rate # noqa: E501 + + :param actual_rate: The actual_rate of this UniLoanInterestRecord. # noqa: E501 + :type: str + """ + + self._actual_rate = actual_rate + + @property + def interest(self): + """Gets the interest of this UniLoanInterestRecord. # noqa: E501 + + Interest # noqa: E501 + + :return: The interest of this UniLoanInterestRecord. # noqa: E501 + :rtype: str + """ + return self._interest + + @interest.setter + def interest(self, interest): + """Sets the interest of this UniLoanInterestRecord. + + Interest # noqa: E501 + + :param interest: The interest of this UniLoanInterestRecord. # noqa: E501 + :type: str + """ + + self._interest = interest + + @property + def status(self): + """Gets the status of this UniLoanInterestRecord. # noqa: E501 + + Status: 0 - fail, 1 - success # noqa: E501 + + :return: The status of this UniLoanInterestRecord. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this UniLoanInterestRecord. + + Status: 0 - fail, 1 - success # noqa: E501 + + :param status: The status of this UniLoanInterestRecord. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def type(self): + """Gets the type of this UniLoanInterestRecord. # noqa: E501 + + Type, platform - platform,margin - margin # noqa: E501 + + :return: The type of this UniLoanInterestRecord. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UniLoanInterestRecord. + + Type, platform - platform,margin - margin # noqa: E501 + + :param type: The type of this UniLoanInterestRecord. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def create_time(self): + """Gets the create_time of this UniLoanInterestRecord. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this UniLoanInterestRecord. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UniLoanInterestRecord. + + Created time # noqa: E501 + + :param create_time: The create_time of this UniLoanInterestRecord. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniLoanInterestRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniLoanInterestRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py new file mode 100644 index 0000000..900a247 --- /dev/null +++ b/gate_api/models/uni_loan_record.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UniLoanRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'currency_pair': 'str', + 'currency': 'str', + 'amount': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'type': 'type', + 'currency_pair': 'currency_pair', + 'currency': 'currency', + 'amount': 'amount', + 'create_time': 'create_time' + } + + def __init__(self, type=None, currency_pair=None, currency=None, amount=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, Configuration) -> None + """UniLoanRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._type = None + self._currency_pair = None + self._currency = None + self._amount = None + self._create_time = None + self.discriminator = None + + if type is not None: + self.type = type + if currency_pair is not None: + self.currency_pair = currency_pair + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + if create_time is not None: + self.create_time = create_time + + @property + def type(self): + """Gets the type of this UniLoanRecord. # noqa: E501 + + type: borrow - borrow, repay - repay # noqa: E501 + + :return: The type of this UniLoanRecord. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UniLoanRecord. + + type: borrow - borrow, repay - repay # noqa: E501 + + :param type: The type of this UniLoanRecord. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def currency_pair(self): + """Gets the currency_pair of this UniLoanRecord. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this UniLoanRecord. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this UniLoanRecord. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this UniLoanRecord. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def currency(self): + """Gets the currency of this UniLoanRecord. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UniLoanRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UniLoanRecord. + + Currency # noqa: E501 + + :param currency: The currency of this UniLoanRecord. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UniLoanRecord. # noqa: E501 + + The amount of lending or repaying # noqa: E501 + + :return: The amount of this UniLoanRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UniLoanRecord. + + The amount of lending or repaying # noqa: E501 + + :param amount: The amount of this UniLoanRecord. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def create_time(self): + """Gets the create_time of this UniLoanRecord. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this UniLoanRecord. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UniLoanRecord. + + Created time # noqa: E501 + + :param create_time: The create_time of this UniLoanRecord. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniLoanRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UniLoanRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py new file mode 100644 index 0000000..3ae2673 --- /dev/null +++ b/gate_api/models/unified_account.py @@ -0,0 +1,625 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedAccount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'refresh_time': 'int', + 'locked': 'bool', + 'balances': 'dict(str, UnifiedBalance)', + 'total': 'str', + 'borrowed': 'str', + 'total_initial_margin': 'str', + 'total_margin_balance': 'str', + 'total_maintenance_margin': 'str', + 'total_initial_margin_rate': 'str', + 'total_maintenance_margin_rate': 'str', + 'total_available_margin': 'str', + 'unified_account_total': 'str', + 'unified_account_total_liab': 'str', + 'unified_account_total_equity': 'str', + 'leverage': 'str', + 'spot_order_loss': 'str', + 'spot_hedge': 'bool', + 'use_funding': 'bool' + } + + attribute_map = { + 'user_id': 'user_id', + 'refresh_time': 'refresh_time', + 'locked': 'locked', + 'balances': 'balances', + 'total': 'total', + 'borrowed': 'borrowed', + 'total_initial_margin': 'total_initial_margin', + 'total_margin_balance': 'total_margin_balance', + 'total_maintenance_margin': 'total_maintenance_margin', + 'total_initial_margin_rate': 'total_initial_margin_rate', + 'total_maintenance_margin_rate': 'total_maintenance_margin_rate', + 'total_available_margin': 'total_available_margin', + 'unified_account_total': 'unified_account_total', + 'unified_account_total_liab': 'unified_account_total_liab', + 'unified_account_total_equity': 'unified_account_total_equity', + 'leverage': 'leverage', + 'spot_order_loss': 'spot_order_loss', + 'spot_hedge': 'spot_hedge', + 'use_funding': 'use_funding' + } + + def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, unified_account_total=None, unified_account_total_liab=None, unified_account_total_equity=None, leverage=None, spot_order_loss=None, spot_hedge=None, use_funding=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, bool, dict(str, UnifiedBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, bool, bool, Configuration) -> None + """UnifiedAccount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._refresh_time = None + self._locked = None + self._balances = None + self._total = None + self._borrowed = None + self._total_initial_margin = None + self._total_margin_balance = None + self._total_maintenance_margin = None + self._total_initial_margin_rate = None + self._total_maintenance_margin_rate = None + self._total_available_margin = None + self._unified_account_total = None + self._unified_account_total_liab = None + self._unified_account_total_equity = None + self._leverage = None + self._spot_order_loss = None + self._spot_hedge = None + self._use_funding = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if refresh_time is not None: + self.refresh_time = refresh_time + if locked is not None: + self.locked = locked + if balances is not None: + self.balances = balances + if total is not None: + self.total = total + if borrowed is not None: + self.borrowed = borrowed + if total_initial_margin is not None: + self.total_initial_margin = total_initial_margin + if total_margin_balance is not None: + self.total_margin_balance = total_margin_balance + if total_maintenance_margin is not None: + self.total_maintenance_margin = total_maintenance_margin + if total_initial_margin_rate is not None: + self.total_initial_margin_rate = total_initial_margin_rate + if total_maintenance_margin_rate is not None: + self.total_maintenance_margin_rate = total_maintenance_margin_rate + if total_available_margin is not None: + self.total_available_margin = total_available_margin + if unified_account_total is not None: + self.unified_account_total = unified_account_total + if unified_account_total_liab is not None: + self.unified_account_total_liab = unified_account_total_liab + if unified_account_total_equity is not None: + self.unified_account_total_equity = unified_account_total_equity + if leverage is not None: + self.leverage = leverage + if spot_order_loss is not None: + self.spot_order_loss = spot_order_loss + if spot_hedge is not None: + self.spot_hedge = spot_hedge + if use_funding is not None: + self.use_funding = use_funding + + @property + def user_id(self): + """Gets the user_id of this UnifiedAccount. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this UnifiedAccount. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this UnifiedAccount. + + User ID # noqa: E501 + + :param user_id: The user_id of this UnifiedAccount. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def refresh_time(self): + """Gets the refresh_time of this UnifiedAccount. # noqa: E501 + + Time of the most recent refresh # noqa: E501 + + :return: The refresh_time of this UnifiedAccount. # noqa: E501 + :rtype: int + """ + return self._refresh_time + + @refresh_time.setter + def refresh_time(self, refresh_time): + """Sets the refresh_time of this UnifiedAccount. + + Time of the most recent refresh # noqa: E501 + + :param refresh_time: The refresh_time of this UnifiedAccount. # noqa: E501 + :type: int + """ + + self._refresh_time = refresh_time + + @property + def locked(self): + """Gets the locked of this UnifiedAccount. # noqa: E501 + + Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode # noqa: E501 + + :return: The locked of this UnifiedAccount. # noqa: E501 + :rtype: bool + """ + return self._locked + + @locked.setter + def locked(self, locked): + """Sets the locked of this UnifiedAccount. + + Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode # noqa: E501 + + :param locked: The locked of this UnifiedAccount. # noqa: E501 + :type: bool + """ + + self._locked = locked + + @property + def balances(self): + """Gets the balances of this UnifiedAccount. # noqa: E501 + + + :return: The balances of this UnifiedAccount. # noqa: E501 + :rtype: dict(str, UnifiedBalance) + """ + return self._balances + + @balances.setter + def balances(self, balances): + """Sets the balances of this UnifiedAccount. + + + :param balances: The balances of this UnifiedAccount. # noqa: E501 + :type: dict(str, UnifiedBalance) + """ + + self._balances = balances + + @property + def total(self): + """Gets the total of this UnifiedAccount. # noqa: E501 + + Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 + + :return: The total of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this UnifiedAccount. + + Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 + + :param total: The total of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._total = total + + @property + def borrowed(self): + """Gets the borrowed of this UnifiedAccount. # noqa: E501 + + The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. # noqa: E501 + + :return: The borrowed of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this UnifiedAccount. + + The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. # noqa: E501 + + :param borrowed: The borrowed of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def total_initial_margin(self): + """Gets the total_initial_margin of this UnifiedAccount. # noqa: E501 + + Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The total_initial_margin of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._total_initial_margin + + @total_initial_margin.setter + def total_initial_margin(self, total_initial_margin): + """Sets the total_initial_margin of this UnifiedAccount. + + Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param total_initial_margin: The total_initial_margin of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._total_initial_margin = total_initial_margin + + @property + def total_margin_balance(self): + """Gets the total_margin_balance of this UnifiedAccount. # noqa: E501 + + Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The total_margin_balance of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._total_margin_balance + + @total_margin_balance.setter + def total_margin_balance(self, total_margin_balance): + """Sets the total_margin_balance of this UnifiedAccount. + + Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param total_margin_balance: The total_margin_balance of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._total_margin_balance = total_margin_balance + + @property + def total_maintenance_margin(self): + """Gets the total_maintenance_margin of this UnifiedAccount. # noqa: E501 + + Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The total_maintenance_margin of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._total_maintenance_margin + + @total_maintenance_margin.setter + def total_maintenance_margin(self, total_maintenance_margin): + """Sets the total_maintenance_margin of this UnifiedAccount. + + Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 + + :param total_maintenance_margin: The total_maintenance_margin of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._total_maintenance_margin = total_maintenance_margin + + @property + def total_initial_margin_rate(self): + """Gets the total_initial_margin_rate of this UnifiedAccount. # noqa: E501 + + Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._total_initial_margin_rate + + @total_initial_margin_rate.setter + def total_initial_margin_rate(self, total_initial_margin_rate): + """Sets the total_initial_margin_rate of this UnifiedAccount. + + Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param total_initial_margin_rate: The total_initial_margin_rate of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._total_initial_margin_rate = total_initial_margin_rate + + @property + def total_maintenance_margin_rate(self): + """Gets the total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 + + Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._total_maintenance_margin_rate + + @total_maintenance_margin_rate.setter + def total_maintenance_margin_rate(self, total_maintenance_margin_rate): + """Sets the total_maintenance_margin_rate of this UnifiedAccount. + + Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._total_maintenance_margin_rate = total_maintenance_margin_rate + + @property + def total_available_margin(self): + """Gets the total_available_margin of this UnifiedAccount. # noqa: E501 + + Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The total_available_margin of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._total_available_margin + + @total_available_margin.setter + def total_available_margin(self, total_available_margin): + """Sets the total_available_margin of this UnifiedAccount. + + Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param total_available_margin: The total_available_margin of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._total_available_margin = total_available_margin + + @property + def unified_account_total(self): + """Gets the unified_account_total of this UnifiedAccount. # noqa: E501 + + Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + + :return: The unified_account_total of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._unified_account_total + + @unified_account_total.setter + def unified_account_total(self, unified_account_total): + """Sets the unified_account_total of this UnifiedAccount. + + Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + + :param unified_account_total: The unified_account_total of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._unified_account_total = unified_account_total + + @property + def unified_account_total_liab(self): + """Gets the unified_account_total_liab of this UnifiedAccount. # noqa: E501 + + Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._unified_account_total_liab + + @unified_account_total_liab.setter + def unified_account_total_liab(self, unified_account_total_liab): + """Sets the unified_account_total_liab of this UnifiedAccount. + + Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode # noqa: E501 + + :param unified_account_total_liab: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._unified_account_total_liab = unified_account_total_liab + + @property + def unified_account_total_equity(self): + """Gets the unified_account_total_equity of this UnifiedAccount. # noqa: E501 + + Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + + :return: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._unified_account_total_equity + + @unified_account_total_equity.setter + def unified_account_total_equity(self, unified_account_total_equity): + """Sets the unified_account_total_equity of this UnifiedAccount. + + Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + + :param unified_account_total_equity: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._unified_account_total_equity = unified_account_total_equity + + @property + def leverage(self): + """Gets the leverage of this UnifiedAccount. # noqa: E501 + + Actual leverage, valid in cross-currency margin/combined margin mode # noqa: E501 + + :return: The leverage of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this UnifiedAccount. + + Actual leverage, valid in cross-currency margin/combined margin mode # noqa: E501 + + :param leverage: The leverage of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + @property + def spot_order_loss(self): + """Gets the spot_order_loss of this UnifiedAccount. # noqa: E501 + + Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The spot_order_loss of this UnifiedAccount. # noqa: E501 + :rtype: str + """ + return self._spot_order_loss + + @spot_order_loss.setter + def spot_order_loss(self, spot_order_loss): + """Sets the spot_order_loss of this UnifiedAccount. + + Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param spot_order_loss: The spot_order_loss of this UnifiedAccount. # noqa: E501 + :type: str + """ + + self._spot_order_loss = spot_order_loss + + @property + def spot_hedge(self): + """Gets the spot_hedge of this UnifiedAccount. # noqa: E501 + + Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + + :return: The spot_hedge of this UnifiedAccount. # noqa: E501 + :rtype: bool + """ + return self._spot_hedge + + @spot_hedge.setter + def spot_hedge(self, spot_hedge): + """Sets the spot_hedge of this UnifiedAccount. + + Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + + :param spot_hedge: The spot_hedge of this UnifiedAccount. # noqa: E501 + :type: bool + """ + + self._spot_hedge = spot_hedge + + @property + def use_funding(self): + """Gets the use_funding of this UnifiedAccount. # noqa: E501 + + Whether to use funds as margin # noqa: E501 + + :return: The use_funding of this UnifiedAccount. # noqa: E501 + :rtype: bool + """ + return self._use_funding + + @use_funding.setter + def use_funding(self, use_funding): + """Sets the use_funding of this UnifiedAccount. + + Whether to use funds as margin # noqa: E501 + + :param use_funding: The use_funding of this UnifiedAccount. # noqa: E501 + :type: bool + """ + + self._use_funding = use_funding + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py new file mode 100644 index 0000000..e92f393 --- /dev/null +++ b/gate_api/models/unified_balance.py @@ -0,0 +1,627 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedBalance(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'available': 'str', + 'freeze': 'str', + 'borrowed': 'str', + 'negative_liab': 'str', + 'futures_pos_liab': 'str', + 'equity': 'str', + 'total_freeze': 'str', + 'total_liab': 'str', + 'spot_in_use': 'str', + 'funding': 'str', + 'funding_version': 'str', + 'cross_balance': 'str', + 'iso_balance': 'str', + 'im': 'str', + 'mm': 'str', + 'imr': 'str', + 'mmr': 'str', + 'margin_balance': 'str', + 'available_margin': 'str' + } + + attribute_map = { + 'available': 'available', + 'freeze': 'freeze', + 'borrowed': 'borrowed', + 'negative_liab': 'negative_liab', + 'futures_pos_liab': 'futures_pos_liab', + 'equity': 'equity', + 'total_freeze': 'total_freeze', + 'total_liab': 'total_liab', + 'spot_in_use': 'spot_in_use', + 'funding': 'funding', + 'funding_version': 'funding_version', + 'cross_balance': 'cross_balance', + 'iso_balance': 'iso_balance', + 'im': 'im', + 'mm': 'mm', + 'imr': 'imr', + 'mmr': 'mmr', + 'margin_balance': 'margin_balance', + 'available_margin': 'available_margin' + } + + def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, spot_in_use=None, funding=None, funding_version=None, cross_balance=None, iso_balance=None, im=None, mm=None, imr=None, mmr=None, margin_balance=None, available_margin=None, 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, Configuration) -> None + """UnifiedBalance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._available = None + self._freeze = None + self._borrowed = None + self._negative_liab = None + self._futures_pos_liab = None + self._equity = None + self._total_freeze = None + self._total_liab = None + self._spot_in_use = None + self._funding = None + self._funding_version = None + self._cross_balance = None + self._iso_balance = None + self._im = None + self._mm = None + self._imr = None + self._mmr = None + self._margin_balance = None + self._available_margin = None + self.discriminator = None + + if available is not None: + self.available = available + if freeze is not None: + self.freeze = freeze + if borrowed is not None: + self.borrowed = borrowed + if negative_liab is not None: + self.negative_liab = negative_liab + if futures_pos_liab is not None: + self.futures_pos_liab = futures_pos_liab + if equity is not None: + self.equity = equity + if total_freeze is not None: + self.total_freeze = total_freeze + if total_liab is not None: + self.total_liab = total_liab + if spot_in_use is not None: + self.spot_in_use = spot_in_use + if funding is not None: + self.funding = funding + if funding_version is not None: + self.funding_version = funding_version + if cross_balance is not None: + self.cross_balance = cross_balance + if iso_balance is not None: + self.iso_balance = iso_balance + if im is not None: + self.im = im + if mm is not None: + self.mm = mm + if imr is not None: + self.imr = imr + if mmr is not None: + self.mmr = mmr + if margin_balance is not None: + self.margin_balance = margin_balance + if available_margin is not None: + self.available_margin = available_margin + + @property + def available(self): + """Gets the available of this UnifiedBalance. # noqa: E501 + + Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes # noqa: E501 + + :return: The available of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this UnifiedBalance. + + Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes # noqa: E501 + + :param available: The available of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def freeze(self): + """Gets the freeze of this UnifiedBalance. # noqa: E501 + + The locked amount is valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + + :return: The freeze of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._freeze + + @freeze.setter + def freeze(self, freeze): + """Sets the freeze of this UnifiedBalance. + + The locked amount is valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + + :param freeze: The freeze of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._freeze = freeze + + @property + def borrowed(self): + """Gets the borrowed of this UnifiedBalance. # noqa: E501 + + Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The borrowed of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._borrowed + + @borrowed.setter + def borrowed(self, borrowed): + """Sets the borrowed of this UnifiedBalance. + + Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param borrowed: The borrowed of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._borrowed = borrowed + + @property + def negative_liab(self): + """Gets the negative_liab of this UnifiedBalance. # noqa: E501 + + Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The negative_liab of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._negative_liab + + @negative_liab.setter + def negative_liab(self, negative_liab): + """Sets the negative_liab of this UnifiedBalance. + + Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 + + :param negative_liab: The negative_liab of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._negative_liab = negative_liab + + @property + def futures_pos_liab(self): + """Gets the futures_pos_liab of this UnifiedBalance. # noqa: E501 + + Contract opening position borrowing currency (abandoned, to be offline field) # noqa: E501 + + :return: The futures_pos_liab of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._futures_pos_liab + + @futures_pos_liab.setter + def futures_pos_liab(self, futures_pos_liab): + """Sets the futures_pos_liab of this UnifiedBalance. + + Contract opening position borrowing currency (abandoned, to be offline field) # noqa: E501 + + :param futures_pos_liab: The futures_pos_liab of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._futures_pos_liab = futures_pos_liab + + @property + def equity(self): + """Gets the equity of this UnifiedBalance. # noqa: E501 + + Equity, valid in single currency margin/cross currency margin/combined margin mode # noqa: E501 + + :return: The equity of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._equity + + @equity.setter + def equity(self, equity): + """Sets the equity of this UnifiedBalance. + + Equity, valid in single currency margin/cross currency margin/combined margin mode # noqa: E501 + + :param equity: The equity of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._equity = equity + + @property + def total_freeze(self): + """Gets the total_freeze of this UnifiedBalance. # noqa: E501 + + Total occupancy (discarded, to be offline field) # noqa: E501 + + :return: The total_freeze of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._total_freeze + + @total_freeze.setter + def total_freeze(self, total_freeze): + """Sets the total_freeze of this UnifiedBalance. + + Total occupancy (discarded, to be offline field) # noqa: E501 + + :param total_freeze: The total_freeze of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._total_freeze = total_freeze + + @property + def total_liab(self): + """Gets the total_liab of this UnifiedBalance. # noqa: E501 + + Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :return: The total_liab of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._total_liab + + @total_liab.setter + def total_liab(self, total_liab): + """Sets the total_liab of this UnifiedBalance. + + Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + + :param total_liab: The total_liab of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._total_liab = total_liab + + @property + def spot_in_use(self): + """Gets the spot_in_use of this UnifiedBalance. # noqa: E501 + + The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes # noqa: E501 + + :return: The spot_in_use of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._spot_in_use + + @spot_in_use.setter + def spot_in_use(self, spot_in_use): + """Sets the spot_in_use of this UnifiedBalance. + + The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes # noqa: E501 + + :param spot_in_use: The spot_in_use of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._spot_in_use = spot_in_use + + @property + def funding(self): + """Gets the funding of this UnifiedBalance. # noqa: E501 + + Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch # noqa: E501 + + :return: The funding of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._funding + + @funding.setter + def funding(self, funding): + """Sets the funding of this UnifiedBalance. + + Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch # noqa: E501 + + :param funding: The funding of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._funding = funding + + @property + def funding_version(self): + """Gets the funding_version of this UnifiedBalance. # noqa: E501 + + Funding version # noqa: E501 + + :return: The funding_version of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._funding_version + + @funding_version.setter + def funding_version(self, funding_version): + """Sets the funding_version of this UnifiedBalance. + + Funding version # noqa: E501 + + :param funding_version: The funding_version of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._funding_version = funding_version + + @property + def cross_balance(self): + """Gets the cross_balance of this UnifiedBalance. # noqa: E501 + + Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 + + :return: The cross_balance of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._cross_balance + + @cross_balance.setter + def cross_balance(self, cross_balance): + """Sets the cross_balance of this UnifiedBalance. + + Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 + + :param cross_balance: The cross_balance of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._cross_balance = cross_balance + + @property + def iso_balance(self): + """Gets the iso_balance of this UnifiedBalance. # noqa: E501 + + Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :return: The iso_balance of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._iso_balance + + @iso_balance.setter + def iso_balance(self, iso_balance): + """Sets the iso_balance of this UnifiedBalance. + + Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :param iso_balance: The iso_balance of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._iso_balance = iso_balance + + @property + def im(self): + """Gets the im of this UnifiedBalance. # noqa: E501 + + Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :return: The im of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._im + + @im.setter + def im(self, im): + """Sets the im of this UnifiedBalance. + + Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :param im: The im of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._im = im + + @property + def mm(self): + """Gets the mm of this UnifiedBalance. # noqa: E501 + + The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. # noqa: E501 + + :return: The mm of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._mm + + @mm.setter + def mm(self, mm): + """Sets the mm of this UnifiedBalance. + + The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. # noqa: E501 + + :param mm: The mm of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._mm = mm + + @property + def imr(self): + """Gets the imr of this UnifiedBalance. # noqa: E501 + + Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :return: The imr of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._imr + + @imr.setter + def imr(self, imr): + """Sets the imr of this UnifiedBalance. + + Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :param imr: The imr of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._imr = imr + + @property + def mmr(self): + """Gets the mmr of this UnifiedBalance. # noqa: E501 + + Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :return: The mmr of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._mmr + + @mmr.setter + def mmr(self, mmr): + """Sets the mmr of this UnifiedBalance. + + Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :param mmr: The mmr of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._mmr = mmr + + @property + def margin_balance(self): + """Gets the margin_balance of this UnifiedBalance. # noqa: E501 + + Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 + + :return: The margin_balance of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._margin_balance + + @margin_balance.setter + def margin_balance(self, margin_balance): + """Sets the margin_balance of this UnifiedBalance. + + Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode # noqa: E501 + + :param margin_balance: The margin_balance of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._margin_balance = margin_balance + + @property + def available_margin(self): + """Gets the available_margin of this UnifiedBalance. # noqa: E501 + + Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :return: The available_margin of this UnifiedBalance. # noqa: E501 + :rtype: str + """ + return self._available_margin + + @available_margin.setter + def available_margin(self, available_margin): + """Sets the available_margin of this UnifiedBalance. + + Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + + :param available_margin: The available_margin of this UnifiedBalance. # noqa: E501 + :type: str + """ + + self._available_margin = available_margin + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedBalance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedBalance): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py new file mode 100644 index 0000000..d61ad46 --- /dev/null +++ b/gate_api/models/unified_borrowable.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedBorrowable(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UnifiedBorrowable - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + + @property + def currency(self): + """Gets the currency of this UnifiedBorrowable. # noqa: E501 + + Currency detail # noqa: E501 + + :return: The currency of this UnifiedBorrowable. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedBorrowable. + + Currency detail # noqa: E501 + + :param currency: The currency of this UnifiedBorrowable. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UnifiedBorrowable. # noqa: E501 + + Max borrowable amount # noqa: E501 + + :return: The amount of this UnifiedBorrowable. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UnifiedBorrowable. + + Max borrowable amount # noqa: E501 + + :param amount: The amount of this UnifiedBorrowable. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedBorrowable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedBorrowable): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/unified_borrowable1.py new file mode 100644 index 0000000..34e43cf --- /dev/null +++ b/gate_api/models/unified_borrowable1.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedBorrowable1(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UnifiedBorrowable1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + + @property + def currency(self): + """Gets the currency of this UnifiedBorrowable1. # noqa: E501 + + Currency detail # noqa: E501 + + :return: The currency of this UnifiedBorrowable1. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedBorrowable1. + + Currency detail # noqa: E501 + + :param currency: The currency of this UnifiedBorrowable1. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UnifiedBorrowable1. # noqa: E501 + + The maximum amount to borrow # noqa: E501 + + :return: The amount of this UnifiedBorrowable1. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UnifiedBorrowable1. + + The maximum amount to borrow # noqa: E501 + + :param amount: The amount of this UnifiedBorrowable1. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedBorrowable1): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedBorrowable1): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py new file mode 100644 index 0000000..c32a202 --- /dev/null +++ b/gate_api/models/unified_currency.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedCurrency(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'prec': 'str', + 'min_borrow_amount': 'str', + 'user_max_borrow_amount': 'str', + 'total_max_borrow_amount': 'str', + 'loan_status': 'str' + } + + attribute_map = { + 'name': 'name', + 'prec': 'prec', + 'min_borrow_amount': 'min_borrow_amount', + 'user_max_borrow_amount': 'user_max_borrow_amount', + 'total_max_borrow_amount': 'total_max_borrow_amount', + 'loan_status': 'loan_status' + } + + def __init__(self, name=None, prec=None, min_borrow_amount=None, user_max_borrow_amount=None, total_max_borrow_amount=None, loan_status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """UnifiedCurrency - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._prec = None + self._min_borrow_amount = None + self._user_max_borrow_amount = None + self._total_max_borrow_amount = None + self._loan_status = None + self.discriminator = None + + if name is not None: + self.name = name + if prec is not None: + self.prec = prec + if min_borrow_amount is not None: + self.min_borrow_amount = min_borrow_amount + if user_max_borrow_amount is not None: + self.user_max_borrow_amount = user_max_borrow_amount + if total_max_borrow_amount is not None: + self.total_max_borrow_amount = total_max_borrow_amount + if loan_status is not None: + self.loan_status = loan_status + + @property + def name(self): + """Gets the name of this UnifiedCurrency. # noqa: E501 + + Currency name # noqa: E501 + + :return: The name of this UnifiedCurrency. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UnifiedCurrency. + + Currency name # noqa: E501 + + :param name: The name of this UnifiedCurrency. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prec(self): + """Gets the prec of this UnifiedCurrency. # noqa: E501 + + Currency precision # noqa: E501 + + :return: The prec of this UnifiedCurrency. # noqa: E501 + :rtype: str + """ + return self._prec + + @prec.setter + def prec(self, prec): + """Sets the prec of this UnifiedCurrency. + + Currency precision # noqa: E501 + + :param prec: The prec of this UnifiedCurrency. # noqa: E501 + :type: str + """ + + self._prec = prec + + @property + def min_borrow_amount(self): + """Gets the min_borrow_amount of this UnifiedCurrency. # noqa: E501 + + The minimum debit limit is the unit of currency # noqa: E501 + + :return: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 + :rtype: str + """ + return self._min_borrow_amount + + @min_borrow_amount.setter + def min_borrow_amount(self, min_borrow_amount): + """Sets the min_borrow_amount of this UnifiedCurrency. + + The minimum debit limit is the unit of currency # noqa: E501 + + :param min_borrow_amount: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 + :type: str + """ + + self._min_borrow_amount = min_borrow_amount + + @property + def user_max_borrow_amount(self): + """Gets the user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 + + The minimum debit limit is the unit of currency # noqa: E501 + + :return: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 + :rtype: str + """ + return self._user_max_borrow_amount + + @user_max_borrow_amount.setter + def user_max_borrow_amount(self, user_max_borrow_amount): + """Sets the user_max_borrow_amount of this UnifiedCurrency. + + The minimum debit limit is the unit of currency # noqa: E501 + + :param user_max_borrow_amount: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 + :type: str + """ + + self._user_max_borrow_amount = user_max_borrow_amount + + @property + def total_max_borrow_amount(self): + """Gets the total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 + + The maximum debit limit for the platform is USDT # noqa: E501 + + :return: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 + :rtype: str + """ + return self._total_max_borrow_amount + + @total_max_borrow_amount.setter + def total_max_borrow_amount(self, total_max_borrow_amount): + """Sets the total_max_borrow_amount of this UnifiedCurrency. + + The maximum debit limit for the platform is USDT # noqa: E501 + + :param total_max_borrow_amount: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 + :type: str + """ + + self._total_max_borrow_amount = total_max_borrow_amount + + @property + def loan_status(self): + """Gets the loan_status of this UnifiedCurrency. # noqa: E501 + + Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending # noqa: E501 + + :return: The loan_status of this UnifiedCurrency. # noqa: E501 + :rtype: str + """ + return self._loan_status + + @loan_status.setter + def loan_status(self, loan_status): + """Sets the loan_status of this UnifiedCurrency. + + Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending # noqa: E501 + + :param loan_status: The loan_status of this UnifiedCurrency. # noqa: E501 + :type: str + """ + + self._loan_status = loan_status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedCurrency): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedCurrency): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py new file mode 100644 index 0000000..4c608ee --- /dev/null +++ b/gate_api/models/unified_discount.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedDiscount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'discount_tiers': 'list[UnifiedDiscountTiers]' + } + + attribute_map = { + 'currency': 'currency', + 'discount_tiers': 'discount_tiers' + } + + def __init__(self, currency=None, discount_tiers=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[UnifiedDiscountTiers], Configuration) -> None + """UnifiedDiscount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._discount_tiers = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if discount_tiers is not None: + self.discount_tiers = discount_tiers + + @property + def currency(self): + """Gets the currency of this UnifiedDiscount. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedDiscount. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedDiscount. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedDiscount. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def discount_tiers(self): + """Gets the discount_tiers of this UnifiedDiscount. # noqa: E501 + + Tiered discount # noqa: E501 + + :return: The discount_tiers of this UnifiedDiscount. # noqa: E501 + :rtype: list[UnifiedDiscountTiers] + """ + return self._discount_tiers + + @discount_tiers.setter + def discount_tiers(self, discount_tiers): + """Sets the discount_tiers of this UnifiedDiscount. + + Tiered discount # noqa: E501 + + :param discount_tiers: The discount_tiers of this UnifiedDiscount. # noqa: E501 + :type: list[UnifiedDiscountTiers] + """ + + self._discount_tiers = discount_tiers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedDiscount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedDiscount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py new file mode 100644 index 0000000..524f165 --- /dev/null +++ b/gate_api/models/unified_discount_tiers.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedDiscountTiers(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tier': 'str', + 'discount': 'str', + 'lower_limit': 'str', + 'upper_limit': 'str', + 'leverage': 'str' + } + + attribute_map = { + 'tier': 'tier', + 'discount': 'discount', + 'lower_limit': 'lower_limit', + 'upper_limit': 'upper_limit', + 'leverage': 'leverage' + } + + def __init__(self, tier=None, discount=None, lower_limit=None, upper_limit=None, leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """UnifiedDiscountTiers - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tier = None + self._discount = None + self._lower_limit = None + self._upper_limit = None + self._leverage = None + self.discriminator = None + + if tier is not None: + self.tier = tier + if discount is not None: + self.discount = discount + if lower_limit is not None: + self.lower_limit = lower_limit + if upper_limit is not None: + self.upper_limit = upper_limit + if leverage is not None: + self.leverage = leverage + + @property + def tier(self): + """Gets the tier of this UnifiedDiscountTiers. # noqa: E501 + + Tier # noqa: E501 + + :return: The tier of this UnifiedDiscountTiers. # noqa: E501 + :rtype: str + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this UnifiedDiscountTiers. + + Tier # noqa: E501 + + :param tier: The tier of this UnifiedDiscountTiers. # noqa: E501 + :type: str + """ + + self._tier = tier + + @property + def discount(self): + """Gets the discount of this UnifiedDiscountTiers. # noqa: E501 + + Discount # noqa: E501 + + :return: The discount of this UnifiedDiscountTiers. # noqa: E501 + :rtype: str + """ + return self._discount + + @discount.setter + def discount(self, discount): + """Sets the discount of this UnifiedDiscountTiers. + + Discount # noqa: E501 + + :param discount: The discount of this UnifiedDiscountTiers. # noqa: E501 + :type: str + """ + + self._discount = discount + + @property + def lower_limit(self): + """Gets the lower_limit of this UnifiedDiscountTiers. # noqa: E501 + + Lower limit # noqa: E501 + + :return: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 + :rtype: str + """ + return self._lower_limit + + @lower_limit.setter + def lower_limit(self, lower_limit): + """Sets the lower_limit of this UnifiedDiscountTiers. + + Lower limit # noqa: E501 + + :param lower_limit: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 + :type: str + """ + + self._lower_limit = lower_limit + + @property + def upper_limit(self): + """Gets the upper_limit of this UnifiedDiscountTiers. # noqa: E501 + + Upper limit,+ indicates positive infinity # noqa: E501 + + :return: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 + :rtype: str + """ + return self._upper_limit + + @upper_limit.setter + def upper_limit(self, upper_limit): + """Sets the upper_limit of this UnifiedDiscountTiers. + + Upper limit,+ indicates positive infinity # noqa: E501 + + :param upper_limit: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 + :type: str + """ + + self._upper_limit = upper_limit + + @property + def leverage(self): + """Gets the leverage of this UnifiedDiscountTiers. # noqa: E501 + + Position leverage # noqa: E501 + + :return: The leverage of this UnifiedDiscountTiers. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this UnifiedDiscountTiers. + + Position leverage # noqa: E501 + + :param leverage: The leverage of this UnifiedDiscountTiers. # noqa: E501 + :type: str + """ + + self._leverage = leverage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedDiscountTiers): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedDiscountTiers): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py new file mode 100644 index 0000000..70b0100 --- /dev/null +++ b/gate_api/models/unified_history_loan_rate.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedHistoryLoanRate(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'tier': 'str', + 'tier_up_rate': 'str', + 'rates': 'list[UnifiedHistoryLoanRateRates]' + } + + attribute_map = { + 'currency': 'currency', + 'tier': 'tier', + 'tier_up_rate': 'tier_up_rate', + 'rates': 'rates' + } + + def __init__(self, currency=None, tier=None, tier_up_rate=None, rates=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, list[UnifiedHistoryLoanRateRates], Configuration) -> None + """UnifiedHistoryLoanRate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._tier = None + self._tier_up_rate = None + self._rates = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if tier is not None: + self.tier = tier + if tier_up_rate is not None: + self.tier_up_rate = tier_up_rate + if rates is not None: + self.rates = rates + + @property + def currency(self): + """Gets the currency of this UnifiedHistoryLoanRate. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedHistoryLoanRate. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedHistoryLoanRate. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedHistoryLoanRate. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def tier(self): + """Gets the tier of this UnifiedHistoryLoanRate. # noqa: E501 + + The VIP level of the floating rate required # noqa: E501 + + :return: The tier of this UnifiedHistoryLoanRate. # noqa: E501 + :rtype: str + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this UnifiedHistoryLoanRate. + + The VIP level of the floating rate required # noqa: E501 + + :param tier: The tier of this UnifiedHistoryLoanRate. # noqa: E501 + :type: str + """ + + self._tier = tier + + @property + def tier_up_rate(self): + """Gets the tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 + + VIP level corresponding floating rate # noqa: E501 + + :return: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 + :rtype: str + """ + return self._tier_up_rate + + @tier_up_rate.setter + def tier_up_rate(self, tier_up_rate): + """Sets the tier_up_rate of this UnifiedHistoryLoanRate. + + VIP level corresponding floating rate # noqa: E501 + + :param tier_up_rate: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 + :type: str + """ + + self._tier_up_rate = tier_up_rate + + @property + def rates(self): + """Gets the rates of this UnifiedHistoryLoanRate. # noqa: E501 + + Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in time # noqa: E501 + + :return: The rates of this UnifiedHistoryLoanRate. # noqa: E501 + :rtype: list[UnifiedHistoryLoanRateRates] + """ + return self._rates + + @rates.setter + def rates(self, rates): + """Sets the rates of this UnifiedHistoryLoanRate. + + Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in time # noqa: E501 + + :param rates: The rates of this UnifiedHistoryLoanRate. # noqa: E501 + :type: list[UnifiedHistoryLoanRateRates] + """ + + self._rates = rates + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedHistoryLoanRate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedHistoryLoanRate): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py new file mode 100644 index 0000000..4099a31 --- /dev/null +++ b/gate_api/models/unified_history_loan_rate_rates.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedHistoryLoanRateRates(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'time': 'int', + 'rate': 'str' + } + + attribute_map = { + 'time': 'time', + 'rate': 'rate' + } + + def __init__(self, time=None, rate=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, Configuration) -> None + """UnifiedHistoryLoanRateRates - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._time = None + self._rate = None + self.discriminator = None + + if time is not None: + self.time = time + if rate is not None: + self.rate = rate + + @property + def time(self): + """Gets the time of this UnifiedHistoryLoanRateRates. # noqa: E501 + + The hourly timestamp corresponding to the interest rate, in milliseconds # noqa: E501 + + :return: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this UnifiedHistoryLoanRateRates. + + The hourly timestamp corresponding to the interest rate, in milliseconds # noqa: E501 + + :param time: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def rate(self): + """Gets the rate of this UnifiedHistoryLoanRateRates. # noqa: E501 + + Historical interest rates for this hour # noqa: E501 + + :return: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 + :rtype: str + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this UnifiedHistoryLoanRateRates. + + Historical interest rates for this hour # noqa: E501 + + :param rate: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 + :type: str + """ + + self._rate = rate + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedHistoryLoanRateRates): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedHistoryLoanRateRates): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py new file mode 100644 index 0000000..ce1c491 --- /dev/null +++ b/gate_api/models/unified_leverage_config.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedLeverageConfig(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'current_leverage': 'str', + 'min_leverage': 'str', + 'max_leverage': 'str', + 'debit': 'str', + 'available_margin': 'str', + 'borrowable': 'str', + 'except_leverage_borrowable': 'str' + } + + attribute_map = { + 'current_leverage': 'current_leverage', + 'min_leverage': 'min_leverage', + 'max_leverage': 'max_leverage', + 'debit': 'debit', + 'available_margin': 'available_margin', + 'borrowable': 'borrowable', + 'except_leverage_borrowable': 'except_leverage_borrowable' + } + + def __init__(self, current_leverage=None, min_leverage=None, max_leverage=None, debit=None, available_margin=None, borrowable=None, except_leverage_borrowable=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, Configuration) -> None + """UnifiedLeverageConfig - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._current_leverage = None + self._min_leverage = None + self._max_leverage = None + self._debit = None + self._available_margin = None + self._borrowable = None + self._except_leverage_borrowable = None + self.discriminator = None + + if current_leverage is not None: + self.current_leverage = current_leverage + if min_leverage is not None: + self.min_leverage = min_leverage + if max_leverage is not None: + self.max_leverage = max_leverage + if debit is not None: + self.debit = debit + if available_margin is not None: + self.available_margin = available_margin + if borrowable is not None: + self.borrowable = borrowable + if except_leverage_borrowable is not None: + self.except_leverage_borrowable = except_leverage_borrowable + + @property + def current_leverage(self): + """Gets the current_leverage of this UnifiedLeverageConfig. # noqa: E501 + + Current leverage ratio # noqa: E501 + + :return: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 + :rtype: str + """ + return self._current_leverage + + @current_leverage.setter + def current_leverage(self, current_leverage): + """Sets the current_leverage of this UnifiedLeverageConfig. + + Current leverage ratio # noqa: E501 + + :param current_leverage: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 + :type: str + """ + + self._current_leverage = current_leverage + + @property + def min_leverage(self): + """Gets the min_leverage of this UnifiedLeverageConfig. # noqa: E501 + + Minimum adjustable leverage ratio # noqa: E501 + + :return: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 + :rtype: str + """ + return self._min_leverage + + @min_leverage.setter + def min_leverage(self, min_leverage): + """Sets the min_leverage of this UnifiedLeverageConfig. + + Minimum adjustable leverage ratio # noqa: E501 + + :param min_leverage: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 + :type: str + """ + + self._min_leverage = min_leverage + + @property + def max_leverage(self): + """Gets the max_leverage of this UnifiedLeverageConfig. # noqa: E501 + + Maximum adjustable leverage ratio # noqa: E501 + + :return: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 + :rtype: str + """ + return self._max_leverage + + @max_leverage.setter + def max_leverage(self, max_leverage): + """Sets the max_leverage of this UnifiedLeverageConfig. + + Maximum adjustable leverage ratio # noqa: E501 + + :param max_leverage: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 + :type: str + """ + + self._max_leverage = max_leverage + + @property + def debit(self): + """Gets the debit of this UnifiedLeverageConfig. # noqa: E501 + + Current liabilities # noqa: E501 + + :return: The debit of this UnifiedLeverageConfig. # noqa: E501 + :rtype: str + """ + return self._debit + + @debit.setter + def debit(self, debit): + """Sets the debit of this UnifiedLeverageConfig. + + Current liabilities # noqa: E501 + + :param debit: The debit of this UnifiedLeverageConfig. # noqa: E501 + :type: str + """ + + self._debit = debit + + @property + def available_margin(self): + """Gets the available_margin of this UnifiedLeverageConfig. # noqa: E501 + + Available Margin # noqa: E501 + + :return: The available_margin of this UnifiedLeverageConfig. # noqa: E501 + :rtype: str + """ + return self._available_margin + + @available_margin.setter + def available_margin(self, available_margin): + """Sets the available_margin of this UnifiedLeverageConfig. + + Available Margin # noqa: E501 + + :param available_margin: The available_margin of this UnifiedLeverageConfig. # noqa: E501 + :type: str + """ + + self._available_margin = available_margin + + @property + def borrowable(self): + """Gets the borrowable of this UnifiedLeverageConfig. # noqa: E501 + + The current leverage you can choose is # noqa: E501 + + :return: The borrowable of this UnifiedLeverageConfig. # noqa: E501 + :rtype: str + """ + return self._borrowable + + @borrowable.setter + def borrowable(self, borrowable): + """Sets the borrowable of this UnifiedLeverageConfig. + + The current leverage you can choose is # noqa: E501 + + :param borrowable: The borrowable of this UnifiedLeverageConfig. # noqa: E501 + :type: str + """ + + self._borrowable = borrowable + + @property + def except_leverage_borrowable(self): + """Gets the except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 + + The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller # noqa: E501 + + :return: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 + :rtype: str + """ + return self._except_leverage_borrowable + + @except_leverage_borrowable.setter + def except_leverage_borrowable(self, except_leverage_borrowable): + """Sets the except_leverage_borrowable of this UnifiedLeverageConfig. + + The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller # noqa: E501 + + :param except_leverage_borrowable: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 + :type: str + """ + + self._except_leverage_borrowable = except_leverage_borrowable + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedLeverageConfig): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedLeverageConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py new file mode 100644 index 0000000..849e7b2 --- /dev/null +++ b/gate_api/models/unified_leverage_setting.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedLeverageSetting(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'leverage': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'leverage': 'leverage' + } + + def __init__(self, currency=None, leverage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UnifiedLeverageSetting - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._leverage = None + self.discriminator = None + + self.currency = currency + self.leverage = leverage + + @property + def currency(self): + """Gets the currency of this UnifiedLeverageSetting. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedLeverageSetting. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedLeverageSetting. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedLeverageSetting. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def leverage(self): + """Gets the leverage of this UnifiedLeverageSetting. # noqa: E501 + + multiple # noqa: E501 + + :return: The leverage of this UnifiedLeverageSetting. # noqa: E501 + :rtype: str + """ + return self._leverage + + @leverage.setter + def leverage(self, leverage): + """Sets the leverage of this UnifiedLeverageSetting. + + multiple # noqa: E501 + + :param leverage: The leverage of this UnifiedLeverageSetting. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and leverage is None: # noqa: E501 + raise ValueError("Invalid value for `leverage`, must not be `None`") # noqa: E501 + + self._leverage = leverage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedLeverageSetting): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedLeverageSetting): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py new file mode 100644 index 0000000..c7a9e03 --- /dev/null +++ b/gate_api/models/unified_loan.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedLoan(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'type': 'str', + 'amount': 'str', + 'repaid_all': 'bool', + 'text': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'type': 'type', + 'amount': 'amount', + 'repaid_all': 'repaid_all', + 'text': 'text' + } + + def __init__(self, currency=None, type=None, amount=None, repaid_all=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, bool, str, Configuration) -> None + """UnifiedLoan - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._type = None + self._amount = None + self._repaid_all = None + self._text = None + self.discriminator = None + + self.currency = currency + self.type = type + self.amount = amount + if repaid_all is not None: + self.repaid_all = repaid_all + if text is not None: + self.text = text + + @property + def currency(self): + """Gets the currency of this UnifiedLoan. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UnifiedLoan. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedLoan. + + Currency # noqa: E501 + + :param currency: The currency of this UnifiedLoan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def type(self): + """Gets the type of this UnifiedLoan. # noqa: E501 + + type: borrow - borrow, repay - repay # noqa: E501 + + :return: The type of this UnifiedLoan. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UnifiedLoan. + + type: borrow - borrow, repay - repay # noqa: E501 + + :param type: The type of this UnifiedLoan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["borrow", "repay"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def amount(self): + """Gets the amount of this UnifiedLoan. # noqa: E501 + + The amount of lending or repaying # noqa: E501 + + :return: The amount of this UnifiedLoan. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UnifiedLoan. + + The amount of lending or repaying # noqa: E501 + + :param amount: The amount of this UnifiedLoan. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def repaid_all(self): + """Gets the repaid_all of this UnifiedLoan. # noqa: E501 + + Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. # noqa: E501 + + :return: The repaid_all of this UnifiedLoan. # noqa: E501 + :rtype: bool + """ + return self._repaid_all + + @repaid_all.setter + def repaid_all(self, repaid_all): + """Sets the repaid_all of this UnifiedLoan. + + Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. # noqa: E501 + + :param repaid_all: The repaid_all of this UnifiedLoan. # noqa: E501 + :type: bool + """ + + self._repaid_all = repaid_all + + @property + def text(self): + """Gets the text of this UnifiedLoan. # noqa: E501 + + User defined custom ID # noqa: E501 + + :return: The text of this UnifiedLoan. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this UnifiedLoan. + + User defined custom ID # noqa: E501 + + :param text: The text of this UnifiedLoan. # 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, UnifiedLoan): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedLoan): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py new file mode 100644 index 0000000..d3b1ef8 --- /dev/null +++ b/gate_api/models/unified_loan_record.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedLoanRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'type': 'str', + 'repayment_type': 'str', + 'borrow_type': 'str', + 'currency_pair': 'str', + 'currency': 'str', + 'amount': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'repayment_type': 'repayment_type', + 'borrow_type': 'borrow_type', + 'currency_pair': 'currency_pair', + 'currency': 'currency', + 'amount': 'amount', + 'create_time': 'create_time' + } + + def __init__(self, id=None, type=None, repayment_type=None, borrow_type=None, currency_pair=None, currency=None, amount=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, str, int, Configuration) -> None + """UnifiedLoanRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._type = None + self._repayment_type = None + self._borrow_type = None + self._currency_pair = None + self._currency = None + self._amount = None + self._create_time = None + self.discriminator = None + + if id is not None: + self.id = id + if type is not None: + self.type = type + if repayment_type is not None: + self.repayment_type = repayment_type + if borrow_type is not None: + self.borrow_type = borrow_type + if currency_pair is not None: + self.currency_pair = currency_pair + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + if create_time is not None: + self.create_time = create_time + + @property + def id(self): + """Gets the id of this UnifiedLoanRecord. # noqa: E501 + + id # noqa: E501 + + :return: The id of this UnifiedLoanRecord. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UnifiedLoanRecord. + + id # noqa: E501 + + :param id: The id of this UnifiedLoanRecord. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def type(self): + """Gets the type of this UnifiedLoanRecord. # noqa: E501 + + type: borrow - borrow, repay - repay # noqa: E501 + + :return: The type of this UnifiedLoanRecord. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UnifiedLoanRecord. + + type: borrow - borrow, repay - repay # noqa: E501 + + :param type: The type of this UnifiedLoanRecord. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def repayment_type(self): + """Gets the repayment_type of this UnifiedLoanRecord. # noqa: E501 + + Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 + + :return: The repayment_type of this UnifiedLoanRecord. # noqa: E501 + :rtype: str + """ + return self._repayment_type + + @repayment_type.setter + def repayment_type(self, repayment_type): + """Sets the repayment_type of this UnifiedLoanRecord. + + Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 + + :param repayment_type: The repayment_type of this UnifiedLoanRecord. # noqa: E501 + :type: str + """ + + self._repayment_type = repayment_type + + @property + def borrow_type(self): + """Gets the borrow_type of this UnifiedLoanRecord. # noqa: E501 + + Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment # noqa: E501 + + :return: The borrow_type of this UnifiedLoanRecord. # noqa: E501 + :rtype: str + """ + return self._borrow_type + + @borrow_type.setter + def borrow_type(self, borrow_type): + """Sets the borrow_type of this UnifiedLoanRecord. + + Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment # noqa: E501 + + :param borrow_type: The borrow_type of this UnifiedLoanRecord. # noqa: E501 + :type: str + """ + + self._borrow_type = borrow_type + + @property + def currency_pair(self): + """Gets the currency_pair of this UnifiedLoanRecord. # noqa: E501 + + Currency pair # noqa: E501 + + :return: The currency_pair of this UnifiedLoanRecord. # noqa: E501 + :rtype: str + """ + return self._currency_pair + + @currency_pair.setter + def currency_pair(self, currency_pair): + """Sets the currency_pair of this UnifiedLoanRecord. + + Currency pair # noqa: E501 + + :param currency_pair: The currency_pair of this UnifiedLoanRecord. # noqa: E501 + :type: str + """ + + self._currency_pair = currency_pair + + @property + def currency(self): + """Gets the currency of this UnifiedLoanRecord. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this UnifiedLoanRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedLoanRecord. + + Currency # noqa: E501 + + :param currency: The currency of this UnifiedLoanRecord. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UnifiedLoanRecord. # noqa: E501 + + The amount of lending or repaying # noqa: E501 + + :return: The amount of this UnifiedLoanRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UnifiedLoanRecord. + + The amount of lending or repaying # noqa: E501 + + :param amount: The amount of this UnifiedLoanRecord. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def create_time(self): + """Gets the create_time of this UnifiedLoanRecord. # noqa: E501 + + Created time # noqa: E501 + + :return: The create_time of this UnifiedLoanRecord. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UnifiedLoanRecord. + + Created time # noqa: E501 + + :param create_time: The create_time of this UnifiedLoanRecord. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedLoanRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedLoanRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py new file mode 100644 index 0000000..7ecabfe --- /dev/null +++ b/gate_api/models/unified_loan_result.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedLoanResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tran_id': 'int' + } + + attribute_map = { + 'tran_id': 'tran_id' + } + + def __init__(self, tran_id=None, local_vars_configuration=None): # noqa: E501 + # type: (int, Configuration) -> None + """UnifiedLoanResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tran_id = None + self.discriminator = None + + if tran_id is not None: + self.tran_id = tran_id + + @property + def tran_id(self): + """Gets the tran_id of this UnifiedLoanResult. # noqa: E501 + + Transaction id # noqa: E501 + + :return: The tran_id of this UnifiedLoanResult. # noqa: E501 + :rtype: int + """ + return self._tran_id + + @tran_id.setter + def tran_id(self, tran_id): + """Sets the tran_id of this UnifiedLoanResult. + + Transaction id # noqa: E501 + + :param tran_id: The tran_id of this UnifiedLoanResult. # noqa: E501 + :type: int + """ + + self._tran_id = tran_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedLoanResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedLoanResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py new file mode 100644 index 0000000..2cf4e6d --- /dev/null +++ b/gate_api/models/unified_margin_tiers.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedMarginTiers(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'margin_tiers': 'list[MarginTiers]' + } + + attribute_map = { + 'currency': 'currency', + 'margin_tiers': 'margin_tiers' + } + + def __init__(self, currency=None, margin_tiers=None, local_vars_configuration=None): # noqa: E501 + # type: (str, list[MarginTiers], Configuration) -> None + """UnifiedMarginTiers - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._margin_tiers = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if margin_tiers is not None: + self.margin_tiers = margin_tiers + + @property + def currency(self): + """Gets the currency of this UnifiedMarginTiers. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this UnifiedMarginTiers. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedMarginTiers. + + Currency name # noqa: E501 + + :param currency: The currency of this UnifiedMarginTiers. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def margin_tiers(self): + """Gets the margin_tiers of this UnifiedMarginTiers. # noqa: E501 + + Margin tiers # noqa: E501 + + :return: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 + :rtype: list[MarginTiers] + """ + return self._margin_tiers + + @margin_tiers.setter + def margin_tiers(self, margin_tiers): + """Sets the margin_tiers of this UnifiedMarginTiers. + + Margin tiers # noqa: E501 + + :param margin_tiers: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 + :type: list[MarginTiers] + """ + + self._margin_tiers = margin_tiers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedMarginTiers): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedMarginTiers): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py new file mode 100644 index 0000000..41f6476 --- /dev/null +++ b/gate_api/models/unified_mode_set.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedModeSet(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mode': 'str', + 'settings': 'UnifiedSettings' + } + + attribute_map = { + 'mode': 'mode', + 'settings': 'settings' + } + + def __init__(self, mode=None, settings=None, local_vars_configuration=None): # noqa: E501 + # type: (str, UnifiedSettings, Configuration) -> None + """UnifiedModeSet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._mode = None + self._settings = None + self.discriminator = None + + self.mode = mode + if settings is not None: + self.settings = settings + + @property + def mode(self): + """Gets the mode of this UnifiedModeSet. # noqa: E501 + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model # noqa: E501 + + :return: The mode of this UnifiedModeSet. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this UnifiedModeSet. + + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model # noqa: E501 + + :param mode: The mode of this UnifiedModeSet. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501 + raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501 + + self._mode = mode + + @property + def settings(self): + """Gets the settings of this UnifiedModeSet. # noqa: E501 + + + :return: The settings of this UnifiedModeSet. # noqa: E501 + :rtype: UnifiedSettings + """ + return self._settings + + @settings.setter + def settings(self, settings): + """Sets the settings of this UnifiedModeSet. + + + :param settings: The settings of this UnifiedModeSet. # noqa: E501 + :type: UnifiedSettings + """ + + self._settings = settings + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedModeSet): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedModeSet): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py new file mode 100644 index 0000000..2cb0816 --- /dev/null +++ b/gate_api/models/unified_portfolio_input.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedPortfolioInput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'spot_balances': 'list[MockSpotBalance]', + 'spot_orders': 'list[MockSpotOrder]', + 'futures_positions': 'list[MockFuturesPosition]', + 'futures_orders': 'list[MockFuturesOrder]', + 'options_positions': 'list[MockOptionsPosition]', + 'options_orders': 'list[MockOptionsOrder]', + 'spot_hedge': 'bool' + } + + attribute_map = { + 'spot_balances': 'spot_balances', + 'spot_orders': 'spot_orders', + 'futures_positions': 'futures_positions', + 'futures_orders': 'futures_orders', + 'options_positions': 'options_positions', + 'options_orders': 'options_orders', + 'spot_hedge': 'spot_hedge' + } + + def __init__(self, spot_balances=None, spot_orders=None, futures_positions=None, futures_orders=None, options_positions=None, options_orders=None, spot_hedge=None, local_vars_configuration=None): # noqa: E501 + # type: (list[MockSpotBalance], list[MockSpotOrder], list[MockFuturesPosition], list[MockFuturesOrder], list[MockOptionsPosition], list[MockOptionsOrder], bool, Configuration) -> None + """UnifiedPortfolioInput - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._spot_balances = None + self._spot_orders = None + self._futures_positions = None + self._futures_orders = None + self._options_positions = None + self._options_orders = None + self._spot_hedge = None + self.discriminator = None + + if spot_balances is not None: + self.spot_balances = spot_balances + if spot_orders is not None: + self.spot_orders = spot_orders + if futures_positions is not None: + self.futures_positions = futures_positions + if futures_orders is not None: + self.futures_orders = futures_orders + if options_positions is not None: + self.options_positions = options_positions + if options_orders is not None: + self.options_orders = options_orders + if spot_hedge is not None: + self.spot_hedge = spot_hedge + + @property + def spot_balances(self): + """Gets the spot_balances of this UnifiedPortfolioInput. # noqa: E501 + + Spot # noqa: E501 + + :return: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 + :rtype: list[MockSpotBalance] + """ + return self._spot_balances + + @spot_balances.setter + def spot_balances(self, spot_balances): + """Sets the spot_balances of this UnifiedPortfolioInput. + + Spot # noqa: E501 + + :param spot_balances: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 + :type: list[MockSpotBalance] + """ + + self._spot_balances = spot_balances + + @property + def spot_orders(self): + """Gets the spot_orders of this UnifiedPortfolioInput. # noqa: E501 + + Spot orders # noqa: E501 + + :return: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 + :rtype: list[MockSpotOrder] + """ + return self._spot_orders + + @spot_orders.setter + def spot_orders(self, spot_orders): + """Sets the spot_orders of this UnifiedPortfolioInput. + + Spot orders # noqa: E501 + + :param spot_orders: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 + :type: list[MockSpotOrder] + """ + + self._spot_orders = spot_orders + + @property + def futures_positions(self): + """Gets the futures_positions of this UnifiedPortfolioInput. # noqa: E501 + + Futures positions # noqa: E501 + + :return: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 + :rtype: list[MockFuturesPosition] + """ + return self._futures_positions + + @futures_positions.setter + def futures_positions(self, futures_positions): + """Sets the futures_positions of this UnifiedPortfolioInput. + + Futures positions # noqa: E501 + + :param futures_positions: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 + :type: list[MockFuturesPosition] + """ + + self._futures_positions = futures_positions + + @property + def futures_orders(self): + """Gets the futures_orders of this UnifiedPortfolioInput. # noqa: E501 + + Futures order # noqa: E501 + + :return: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 + :rtype: list[MockFuturesOrder] + """ + return self._futures_orders + + @futures_orders.setter + def futures_orders(self, futures_orders): + """Sets the futures_orders of this UnifiedPortfolioInput. + + Futures order # noqa: E501 + + :param futures_orders: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 + :type: list[MockFuturesOrder] + """ + + self._futures_orders = futures_orders + + @property + def options_positions(self): + """Gets the options_positions of this UnifiedPortfolioInput. # noqa: E501 + + Options positions # noqa: E501 + + :return: The options_positions of this UnifiedPortfolioInput. # noqa: E501 + :rtype: list[MockOptionsPosition] + """ + return self._options_positions + + @options_positions.setter + def options_positions(self, options_positions): + """Sets the options_positions of this UnifiedPortfolioInput. + + Options positions # noqa: E501 + + :param options_positions: The options_positions of this UnifiedPortfolioInput. # noqa: E501 + :type: list[MockOptionsPosition] + """ + + self._options_positions = options_positions + + @property + def options_orders(self): + """Gets the options_orders of this UnifiedPortfolioInput. # noqa: E501 + + Option orders # noqa: E501 + + :return: The options_orders of this UnifiedPortfolioInput. # noqa: E501 + :rtype: list[MockOptionsOrder] + """ + return self._options_orders + + @options_orders.setter + def options_orders(self, options_orders): + """Sets the options_orders of this UnifiedPortfolioInput. + + Option orders # noqa: E501 + + :param options_orders: The options_orders of this UnifiedPortfolioInput. # noqa: E501 + :type: list[MockOptionsOrder] + """ + + self._options_orders = options_orders + + @property + def spot_hedge(self): + """Gets the spot_hedge of this UnifiedPortfolioInput. # noqa: E501 + + Whether to enable spot hedging. # noqa: E501 + + :return: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501 + :rtype: bool + """ + return self._spot_hedge + + @spot_hedge.setter + def spot_hedge(self, spot_hedge): + """Sets the spot_hedge of this UnifiedPortfolioInput. + + Whether to enable spot hedging. # noqa: E501 + + :param spot_hedge: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501 + :type: bool + """ + + self._spot_hedge = spot_hedge + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedPortfolioInput): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedPortfolioInput): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py new file mode 100644 index 0000000..cf656e4 --- /dev/null +++ b/gate_api/models/unified_portfolio_output.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedPortfolioOutput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'maintain_margin_total': 'str', + 'initial_margin_total': 'str', + 'calculate_time': 'int', + 'risk_unit': 'list[MockRiskUnit]' + } + + attribute_map = { + 'maintain_margin_total': 'maintain_margin_total', + 'initial_margin_total': 'initial_margin_total', + 'calculate_time': 'calculate_time', + 'risk_unit': 'risk_unit' + } + + def __init__(self, maintain_margin_total=None, initial_margin_total=None, calculate_time=None, risk_unit=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, int, list[MockRiskUnit], Configuration) -> None + """UnifiedPortfolioOutput - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._maintain_margin_total = None + self._initial_margin_total = None + self._calculate_time = None + self._risk_unit = None + self.discriminator = None + + if maintain_margin_total is not None: + self.maintain_margin_total = maintain_margin_total + if initial_margin_total is not None: + self.initial_margin_total = initial_margin_total + if calculate_time is not None: + self.calculate_time = calculate_time + if risk_unit is not None: + self.risk_unit = risk_unit + + @property + def maintain_margin_total(self): + """Gets the maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 + + Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. # noqa: E501 + + :return: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 + :rtype: str + """ + return self._maintain_margin_total + + @maintain_margin_total.setter + def maintain_margin_total(self, maintain_margin_total): + """Sets the maintain_margin_total of this UnifiedPortfolioOutput. + + Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. # noqa: E501 + + :param maintain_margin_total: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 + :type: str + """ + + self._maintain_margin_total = maintain_margin_total + + @property + def initial_margin_total(self): + """Gets the initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 + + Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. # noqa: E501 + + :return: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 + :rtype: str + """ + return self._initial_margin_total + + @initial_margin_total.setter + def initial_margin_total(self, initial_margin_total): + """Sets the initial_margin_total of this UnifiedPortfolioOutput. + + Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. # noqa: E501 + + :param initial_margin_total: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 + :type: str + """ + + self._initial_margin_total = initial_margin_total + + @property + def calculate_time(self): + """Gets the calculate_time of this UnifiedPortfolioOutput. # noqa: E501 + + Calculate time # noqa: E501 + + :return: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 + :rtype: int + """ + return self._calculate_time + + @calculate_time.setter + def calculate_time(self, calculate_time): + """Sets the calculate_time of this UnifiedPortfolioOutput. + + Calculate time # noqa: E501 + + :param calculate_time: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 + :type: int + """ + + self._calculate_time = calculate_time + + @property + def risk_unit(self): + """Gets the risk_unit of this UnifiedPortfolioOutput. # noqa: E501 + + Risk unit # noqa: E501 + + :return: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 + :rtype: list[MockRiskUnit] + """ + return self._risk_unit + + @risk_unit.setter + def risk_unit(self, risk_unit): + """Sets the risk_unit of this UnifiedPortfolioOutput. + + Risk unit # noqa: E501 + + :param risk_unit: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 + :type: list[MockRiskUnit] + """ + + self._risk_unit = risk_unit + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedPortfolioOutput): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedPortfolioOutput): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py new file mode 100644 index 0000000..df9d67c --- /dev/null +++ b/gate_api/models/unified_risk_units.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedRiskUnits(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'spot_hedge': 'bool', + 'risk_units': 'list[RiskUnits]' + } + + attribute_map = { + 'user_id': 'user_id', + 'spot_hedge': 'spot_hedge', + 'risk_units': 'risk_units' + } + + def __init__(self, user_id=None, spot_hedge=None, risk_units=None, local_vars_configuration=None): # noqa: E501 + # type: (int, bool, list[RiskUnits], Configuration) -> None + """UnifiedRiskUnits - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._spot_hedge = None + self._risk_units = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if spot_hedge is not None: + self.spot_hedge = spot_hedge + if risk_units is not None: + self.risk_units = risk_units + + @property + def user_id(self): + """Gets the user_id of this UnifiedRiskUnits. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this UnifiedRiskUnits. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this UnifiedRiskUnits. + + User ID # noqa: E501 + + :param user_id: The user_id of this UnifiedRiskUnits. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def spot_hedge(self): + """Gets the spot_hedge of this UnifiedRiskUnits. # noqa: E501 + + Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + + :return: The spot_hedge of this UnifiedRiskUnits. # noqa: E501 + :rtype: bool + """ + return self._spot_hedge + + @spot_hedge.setter + def spot_hedge(self, spot_hedge): + """Sets the spot_hedge of this UnifiedRiskUnits. + + Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + + :param spot_hedge: The spot_hedge of this UnifiedRiskUnits. # noqa: E501 + :type: bool + """ + + self._spot_hedge = spot_hedge + + @property + def risk_units(self): + """Gets the risk_units of this UnifiedRiskUnits. # noqa: E501 + + Risk unit # noqa: E501 + + :return: The risk_units of this UnifiedRiskUnits. # noqa: E501 + :rtype: list[RiskUnits] + """ + return self._risk_units + + @risk_units.setter + def risk_units(self, risk_units): + """Sets the risk_units of this UnifiedRiskUnits. + + Risk unit # noqa: E501 + + :param risk_units: The risk_units of this UnifiedRiskUnits. # noqa: E501 + :type: list[RiskUnits] + """ + + self._risk_units = risk_units + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedRiskUnits): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedRiskUnits): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py new file mode 100644 index 0000000..a70dec2 --- /dev/null +++ b/gate_api/models/unified_settings.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedSettings(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'usdt_futures': 'bool', + 'spot_hedge': 'bool', + 'use_funding': 'bool', + 'options': 'bool' + } + + attribute_map = { + 'usdt_futures': 'usdt_futures', + 'spot_hedge': 'spot_hedge', + 'use_funding': 'use_funding', + 'options': 'options' + } + + def __init__(self, usdt_futures=None, spot_hedge=None, use_funding=None, options=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, bool, bool, bool, Configuration) -> None + """UnifiedSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._usdt_futures = None + self._spot_hedge = None + self._use_funding = None + self._options = None + self.discriminator = None + + if usdt_futures is not None: + self.usdt_futures = usdt_futures + if spot_hedge is not None: + self.spot_hedge = spot_hedge + if use_funding is not None: + self.use_funding = use_funding + if options is not None: + self.options = options + + @property + def usdt_futures(self): + """Gets the usdt_futures of this UnifiedSettings. # noqa: E501 + + USDT contract switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + + :return: The usdt_futures of this UnifiedSettings. # noqa: E501 + :rtype: bool + """ + return self._usdt_futures + + @usdt_futures.setter + def usdt_futures(self, usdt_futures): + """Sets the usdt_futures of this UnifiedSettings. + + USDT contract switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + + :param usdt_futures: The usdt_futures of this UnifiedSettings. # noqa: E501 + :type: bool + """ + + self._usdt_futures = usdt_futures + + @property + def spot_hedge(self): + """Gets the spot_hedge of this UnifiedSettings. # noqa: E501 + + Spot hedging switch. # noqa: E501 + + :return: The spot_hedge of this UnifiedSettings. # noqa: E501 + :rtype: bool + """ + return self._spot_hedge + + @spot_hedge.setter + def spot_hedge(self, spot_hedge): + """Sets the spot_hedge of this UnifiedSettings. + + Spot hedging switch. # noqa: E501 + + :param spot_hedge: The spot_hedge of this UnifiedSettings. # noqa: E501 + :type: bool + """ + + self._spot_hedge = spot_hedge + + @property + def use_funding(self): + """Gets the use_funding of this UnifiedSettings. # noqa: E501 + + switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin # noqa: E501 + + :return: The use_funding of this UnifiedSettings. # noqa: E501 + :rtype: bool + """ + return self._use_funding + + @use_funding.setter + def use_funding(self, use_funding): + """Sets the use_funding of this UnifiedSettings. + + switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin # noqa: E501 + + :param use_funding: The use_funding of this UnifiedSettings. # noqa: E501 + :type: bool + """ + + self._use_funding = use_funding + + @property + def options(self): + """Gets the options of this UnifiedSettings. # noqa: E501 + + Option switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + + :return: The options of this UnifiedSettings. # noqa: E501 + :rtype: bool + """ + return self._options + + @options.setter + def options(self, options): + """Sets the options of this UnifiedSettings. + + Option switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + + :param options: The options of this UnifiedSettings. # noqa: E501 + :type: bool + """ + + self._options = options + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedSettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py new file mode 100644 index 0000000..cfdb6ce --- /dev/null +++ b/gate_api/models/unified_transferable.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedTransferable(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'amount': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'amount': 'amount' + } + + def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UnifiedTransferable - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._amount = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if amount is not None: + self.amount = amount + + @property + def currency(self): + """Gets the currency of this UnifiedTransferable. # noqa: E501 + + Currency detail # noqa: E501 + + :return: The currency of this UnifiedTransferable. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this UnifiedTransferable. + + Currency detail # noqa: E501 + + :param currency: The currency of this UnifiedTransferable. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this UnifiedTransferable. # noqa: E501 + + The maximum amount that can be transferred out # noqa: E501 + + :return: The amount of this UnifiedTransferable. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this UnifiedTransferable. + + The maximum amount that can be transferred out # noqa: E501 + + :param amount: The amount of this UnifiedTransferable. # noqa: E501 + :type: str + """ + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedTransferable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedTransferable): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py new file mode 100644 index 0000000..579ed3d --- /dev/null +++ b/gate_api/models/user_ltv_info.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UserLtvInfo(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'collateral_currency': 'str', + 'borrow_currency': 'str', + 'init_ltv': 'str', + 'alert_ltv': 'str', + 'liquidate_ltv': 'str', + 'min_borrow_amount': 'str', + 'left_borrowable_amount': 'str' + } + + attribute_map = { + 'collateral_currency': 'collateral_currency', + 'borrow_currency': 'borrow_currency', + 'init_ltv': 'init_ltv', + 'alert_ltv': 'alert_ltv', + 'liquidate_ltv': 'liquidate_ltv', + 'min_borrow_amount': 'min_borrow_amount', + 'left_borrowable_amount': 'left_borrowable_amount' + } + + def __init__(self, collateral_currency=None, borrow_currency=None, init_ltv=None, alert_ltv=None, liquidate_ltv=None, min_borrow_amount=None, left_borrowable_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, Configuration) -> None + """UserLtvInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._collateral_currency = None + self._borrow_currency = None + self._init_ltv = None + self._alert_ltv = None + self._liquidate_ltv = None + self._min_borrow_amount = None + self._left_borrowable_amount = None + self.discriminator = None + + if collateral_currency is not None: + self.collateral_currency = collateral_currency + if borrow_currency is not None: + self.borrow_currency = borrow_currency + if init_ltv is not None: + self.init_ltv = init_ltv + if alert_ltv is not None: + self.alert_ltv = alert_ltv + if liquidate_ltv is not None: + self.liquidate_ltv = liquidate_ltv + if min_borrow_amount is not None: + self.min_borrow_amount = min_borrow_amount + if left_borrowable_amount is not None: + self.left_borrowable_amount = left_borrowable_amount + + @property + def collateral_currency(self): + """Gets the collateral_currency of this UserLtvInfo. # noqa: E501 + + Collateral # noqa: E501 + + :return: The collateral_currency of this UserLtvInfo. # noqa: E501 + :rtype: str + """ + return self._collateral_currency + + @collateral_currency.setter + def collateral_currency(self, collateral_currency): + """Sets the collateral_currency of this UserLtvInfo. + + Collateral # noqa: E501 + + :param collateral_currency: The collateral_currency of this UserLtvInfo. # noqa: E501 + :type: str + """ + + self._collateral_currency = collateral_currency + + @property + def borrow_currency(self): + """Gets the borrow_currency of this UserLtvInfo. # noqa: E501 + + Borrowed currency # noqa: E501 + + :return: The borrow_currency of this UserLtvInfo. # noqa: E501 + :rtype: str + """ + return self._borrow_currency + + @borrow_currency.setter + def borrow_currency(self, borrow_currency): + """Sets the borrow_currency of this UserLtvInfo. + + Borrowed currency # noqa: E501 + + :param borrow_currency: The borrow_currency of this UserLtvInfo. # noqa: E501 + :type: str + """ + + self._borrow_currency = borrow_currency + + @property + def init_ltv(self): + """Gets the init_ltv of this UserLtvInfo. # noqa: E501 + + The initial collateralization rate # noqa: E501 + + :return: The init_ltv of this UserLtvInfo. # noqa: E501 + :rtype: str + """ + return self._init_ltv + + @init_ltv.setter + def init_ltv(self, init_ltv): + """Sets the init_ltv of this UserLtvInfo. + + The initial collateralization rate # noqa: E501 + + :param init_ltv: The init_ltv of this UserLtvInfo. # noqa: E501 + :type: str + """ + + self._init_ltv = init_ltv + + @property + def alert_ltv(self): + """Gets the alert_ltv of this UserLtvInfo. # noqa: E501 + + Warning collateralization ratio # noqa: E501 + + :return: The alert_ltv of this UserLtvInfo. # noqa: E501 + :rtype: str + """ + return self._alert_ltv + + @alert_ltv.setter + def alert_ltv(self, alert_ltv): + """Sets the alert_ltv of this UserLtvInfo. + + Warning collateralization ratio # noqa: E501 + + :param alert_ltv: The alert_ltv of this UserLtvInfo. # noqa: E501 + :type: str + """ + + self._alert_ltv = alert_ltv + + @property + def liquidate_ltv(self): + """Gets the liquidate_ltv of this UserLtvInfo. # noqa: E501 + + The liquidation collateralization rate # noqa: E501 + + :return: The liquidate_ltv of this UserLtvInfo. # noqa: E501 + :rtype: str + """ + return self._liquidate_ltv + + @liquidate_ltv.setter + def liquidate_ltv(self, liquidate_ltv): + """Sets the liquidate_ltv of this UserLtvInfo. + + The liquidation collateralization rate # noqa: E501 + + :param liquidate_ltv: The liquidate_ltv of this UserLtvInfo. # noqa: E501 + :type: str + """ + + self._liquidate_ltv = liquidate_ltv + + @property + def min_borrow_amount(self): + """Gets the min_borrow_amount of this UserLtvInfo. # noqa: E501 + + Minimum borrowable amount for the loan currency # noqa: E501 + + :return: The min_borrow_amount of this UserLtvInfo. # noqa: E501 + :rtype: str + """ + return self._min_borrow_amount + + @min_borrow_amount.setter + def min_borrow_amount(self, min_borrow_amount): + """Sets the min_borrow_amount of this UserLtvInfo. + + Minimum borrowable amount for the loan currency # noqa: E501 + + :param min_borrow_amount: The min_borrow_amount of this UserLtvInfo. # noqa: E501 + :type: str + """ + + self._min_borrow_amount = min_borrow_amount + + @property + def left_borrowable_amount(self): + """Gets the left_borrowable_amount of this UserLtvInfo. # noqa: E501 + + Remaining borrowable amount for the loan currency # noqa: E501 + + :return: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 + :rtype: str + """ + return self._left_borrowable_amount + + @left_borrowable_amount.setter + def left_borrowable_amount(self, left_borrowable_amount): + """Sets the left_borrowable_amount of this UserLtvInfo. + + Remaining borrowable amount for the loan currency # noqa: E501 + + :param left_borrowable_amount: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 + :type: str + """ + + self._left_borrowable_amount = left_borrowable_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, UserLtvInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserLtvInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py new file mode 100644 index 0000000..a43517d --- /dev/null +++ b/gate_api/models/user_sub.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UserSub(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'uid': 'int', + 'belong': 'str', + 'type': 'int', + 'ref_uid': 'int' + } + + attribute_map = { + 'uid': 'uid', + 'belong': 'belong', + 'type': 'type', + 'ref_uid': 'ref_uid' + } + + def __init__(self, uid=None, belong=None, type=None, ref_uid=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, int, Configuration) -> None + """UserSub - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._uid = None + self._belong = None + self._type = None + self._ref_uid = None + self.discriminator = None + + if uid is not None: + self.uid = uid + if belong is not None: + self.belong = belong + if type is not None: + self.type = type + if ref_uid is not None: + self.ref_uid = ref_uid + + @property + def uid(self): + """Gets the uid of this UserSub. # noqa: E501 + + User ID # noqa: E501 + + :return: The uid of this UserSub. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this UserSub. + + User ID # noqa: E501 + + :param uid: The uid of this UserSub. # noqa: E501 + :type: int + """ + + self._uid = uid + + @property + def belong(self): + """Gets the belong of this UserSub. # noqa: E501 + + The system to which the user belongs (partner referral). If empty, it means not belonging to any system. # noqa: E501 + + :return: The belong of this UserSub. # noqa: E501 + :rtype: str + """ + return self._belong + + @belong.setter + def belong(self, belong): + """Sets the belong of this UserSub. + + The system to which the user belongs (partner referral). If empty, it means not belonging to any system. # noqa: E501 + + :param belong: The belong of this UserSub. # noqa: E501 + :type: str + """ + + self._belong = belong + + @property + def type(self): + """Gets the type of this UserSub. # noqa: E501 + + Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 + + :return: The type of this UserSub. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UserSub. + + Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 + + :param type: The type of this UserSub. # noqa: E501 + :type: int + """ + + self._type = type + + @property + def ref_uid(self): + """Gets the ref_uid of this UserSub. # noqa: E501 + + Inviter user ID # noqa: E501 + + :return: The ref_uid of this UserSub. # noqa: E501 + :rtype: int + """ + return self._ref_uid + + @ref_uid.setter + def ref_uid(self, ref_uid): + """Sets the ref_uid of this UserSub. + + Inviter user ID # noqa: E501 + + :param ref_uid: The ref_uid of this UserSub. # noqa: E501 + :type: int + """ + + self._ref_uid = ref_uid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserSub): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserSub): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py new file mode 100644 index 0000000..6f85275 --- /dev/null +++ b/gate_api/models/user_sub_relation.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UserSubRelation(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'list': 'list[UserSub]' + } + + attribute_map = { + 'list': 'list' + } + + def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 + # type: (list[UserSub], Configuration) -> None + """UserSubRelation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._list = None + self.discriminator = None + + if list is not None: + self.list = list + + @property + def list(self): + """Gets the list of this UserSubRelation. # noqa: E501 + + Subordinate relationship list # noqa: E501 + + :return: The list of this UserSubRelation. # noqa: E501 + :rtype: list[UserSub] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this UserSubRelation. + + Subordinate relationship list # noqa: E501 + + :param list: The list of this UserSubRelation. # noqa: E501 + :type: list[UserSub] + """ + + self._list = list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserSubRelation): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserSubRelation): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py new file mode 100644 index 0000000..26a1bb3 --- /dev/null +++ b/gate_api/models/user_total_amount.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UserTotalAmount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'borrow_amount': 'str', + 'collateral_amount': 'str' + } + + attribute_map = { + 'borrow_amount': 'borrow_amount', + 'collateral_amount': 'collateral_amount' + } + + def __init__(self, borrow_amount=None, collateral_amount=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """UserTotalAmount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._borrow_amount = None + self._collateral_amount = None + self.discriminator = None + + if borrow_amount is not None: + self.borrow_amount = borrow_amount + if collateral_amount is not None: + self.collateral_amount = collateral_amount + + @property + def borrow_amount(self): + """Gets the borrow_amount of this UserTotalAmount. # noqa: E501 + + Total borrowing amount, calculated in USDT # noqa: E501 + + :return: The borrow_amount of this UserTotalAmount. # noqa: E501 + :rtype: str + """ + return self._borrow_amount + + @borrow_amount.setter + def borrow_amount(self, borrow_amount): + """Sets the borrow_amount of this UserTotalAmount. + + Total borrowing amount, calculated in USDT # noqa: E501 + + :param borrow_amount: The borrow_amount of this UserTotalAmount. # noqa: E501 + :type: str + """ + + self._borrow_amount = borrow_amount + + @property + def collateral_amount(self): + """Gets the collateral_amount of this UserTotalAmount. # noqa: E501 + + Total collateral amount, calculated in USDT # noqa: E501 + + :return: The collateral_amount of this UserTotalAmount. # noqa: E501 + :rtype: str + """ + return self._collateral_amount + + @collateral_amount.setter + def collateral_amount(self, collateral_amount): + """Sets the collateral_amount of this UserTotalAmount. + + Total collateral amount, calculated in USDT # noqa: E501 + + :param collateral_amount: The collateral_amount of this UserTotalAmount. # noqa: E501 + :type: str + """ + + self._collateral_amount = collateral_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, UserTotalAmount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserTotalAmount): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py new file mode 100644 index 0000000..b91f1ba --- /dev/null +++ b/gate_api/models/withdraw_status.py @@ -0,0 +1,431 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class WithdrawStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'name': 'str', + 'name_cn': 'str', + 'deposit': 'str', + 'withdraw_percent': 'str', + 'withdraw_fix': 'str', + 'withdraw_day_limit': 'str', + 'withdraw_amount_mini': 'str', + 'withdraw_day_limit_remain': 'str', + 'withdraw_eachtime_limit': 'str', + 'withdraw_fix_on_chains': 'dict(str, str)', + 'withdraw_percent_on_chains': 'dict(str, str)' + } + + attribute_map = { + 'currency': 'currency', + 'name': 'name', + 'name_cn': 'name_cn', + 'deposit': 'deposit', + 'withdraw_percent': 'withdraw_percent', + 'withdraw_fix': 'withdraw_fix', + 'withdraw_day_limit': 'withdraw_day_limit', + 'withdraw_amount_mini': 'withdraw_amount_mini', + 'withdraw_day_limit_remain': 'withdraw_day_limit_remain', + 'withdraw_eachtime_limit': 'withdraw_eachtime_limit', + 'withdraw_fix_on_chains': 'withdraw_fix_on_chains', + 'withdraw_percent_on_chains': 'withdraw_percent_on_chains' + } + + def __init__(self, currency=None, name=None, name_cn=None, deposit=None, withdraw_percent=None, withdraw_fix=None, withdraw_day_limit=None, withdraw_amount_mini=None, withdraw_day_limit_remain=None, withdraw_eachtime_limit=None, withdraw_fix_on_chains=None, withdraw_percent_on_chains=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, dict(str, str), dict(str, str), Configuration) -> None + """WithdrawStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._name = None + self._name_cn = None + self._deposit = None + self._withdraw_percent = None + self._withdraw_fix = None + self._withdraw_day_limit = None + self._withdraw_amount_mini = None + self._withdraw_day_limit_remain = None + self._withdraw_eachtime_limit = None + self._withdraw_fix_on_chains = None + self._withdraw_percent_on_chains = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if name is not None: + self.name = name + if name_cn is not None: + self.name_cn = name_cn + if deposit is not None: + self.deposit = deposit + if withdraw_percent is not None: + self.withdraw_percent = withdraw_percent + if withdraw_fix is not None: + self.withdraw_fix = withdraw_fix + if withdraw_day_limit is not None: + self.withdraw_day_limit = withdraw_day_limit + if withdraw_amount_mini is not None: + self.withdraw_amount_mini = withdraw_amount_mini + if withdraw_day_limit_remain is not None: + self.withdraw_day_limit_remain = withdraw_day_limit_remain + if withdraw_eachtime_limit is not None: + self.withdraw_eachtime_limit = withdraw_eachtime_limit + if withdraw_fix_on_chains is not None: + self.withdraw_fix_on_chains = withdraw_fix_on_chains + if withdraw_percent_on_chains is not None: + self.withdraw_percent_on_chains = withdraw_percent_on_chains + + @property + def currency(self): + """Gets the currency of this WithdrawStatus. # noqa: E501 + + Currency # noqa: E501 + + :return: The currency of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this WithdrawStatus. + + Currency # noqa: E501 + + :param currency: The currency of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def name(self): + """Gets the name of this WithdrawStatus. # noqa: E501 + + Currency name # noqa: E501 + + :return: The name of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WithdrawStatus. + + Currency name # noqa: E501 + + :param name: The name of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def name_cn(self): + """Gets the name_cn of this WithdrawStatus. # noqa: E501 + + Currency Chinese name # noqa: E501 + + :return: The name_cn of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._name_cn + + @name_cn.setter + def name_cn(self, name_cn): + """Sets the name_cn of this WithdrawStatus. + + Currency Chinese name # noqa: E501 + + :param name_cn: The name_cn of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._name_cn = name_cn + + @property + def deposit(self): + """Gets the deposit of this WithdrawStatus. # noqa: E501 + + Deposits fee # noqa: E501 + + :return: The deposit of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._deposit + + @deposit.setter + def deposit(self, deposit): + """Sets the deposit of this WithdrawStatus. + + Deposits fee # noqa: E501 + + :param deposit: The deposit of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._deposit = deposit + + @property + def withdraw_percent(self): + """Gets the withdraw_percent of this WithdrawStatus. # noqa: E501 + + Withdrawal fee rate percentage # noqa: E501 + + :return: The withdraw_percent of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._withdraw_percent + + @withdraw_percent.setter + def withdraw_percent(self, withdraw_percent): + """Sets the withdraw_percent of this WithdrawStatus. + + Withdrawal fee rate percentage # noqa: E501 + + :param withdraw_percent: The withdraw_percent of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._withdraw_percent = withdraw_percent + + @property + def withdraw_fix(self): + """Gets the withdraw_fix of this WithdrawStatus. # noqa: E501 + + Fixed withdrawal fee # noqa: E501 + + :return: The withdraw_fix of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._withdraw_fix + + @withdraw_fix.setter + def withdraw_fix(self, withdraw_fix): + """Sets the withdraw_fix of this WithdrawStatus. + + Fixed withdrawal fee # noqa: E501 + + :param withdraw_fix: The withdraw_fix of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._withdraw_fix = withdraw_fix + + @property + def withdraw_day_limit(self): + """Gets the withdraw_day_limit of this WithdrawStatus. # noqa: E501 + + Daily allowed withdrawal amount # noqa: E501 + + :return: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._withdraw_day_limit + + @withdraw_day_limit.setter + def withdraw_day_limit(self, withdraw_day_limit): + """Sets the withdraw_day_limit of this WithdrawStatus. + + Daily allowed withdrawal amount # noqa: E501 + + :param withdraw_day_limit: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._withdraw_day_limit = withdraw_day_limit + + @property + def withdraw_amount_mini(self): + """Gets the withdraw_amount_mini of this WithdrawStatus. # noqa: E501 + + Minimum withdrawal amount # noqa: E501 + + :return: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._withdraw_amount_mini + + @withdraw_amount_mini.setter + def withdraw_amount_mini(self, withdraw_amount_mini): + """Sets the withdraw_amount_mini of this WithdrawStatus. + + Minimum withdrawal amount # noqa: E501 + + :param withdraw_amount_mini: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._withdraw_amount_mini = withdraw_amount_mini + + @property + def withdraw_day_limit_remain(self): + """Gets the withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 + + Daily withdrawal amount left # noqa: E501 + + :return: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._withdraw_day_limit_remain + + @withdraw_day_limit_remain.setter + def withdraw_day_limit_remain(self, withdraw_day_limit_remain): + """Sets the withdraw_day_limit_remain of this WithdrawStatus. + + Daily withdrawal amount left # noqa: E501 + + :param withdraw_day_limit_remain: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._withdraw_day_limit_remain = withdraw_day_limit_remain + + @property + def withdraw_eachtime_limit(self): + """Gets the withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 + + Maximum amount for each withdrawal # noqa: E501 + + :return: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 + :rtype: str + """ + return self._withdraw_eachtime_limit + + @withdraw_eachtime_limit.setter + def withdraw_eachtime_limit(self, withdraw_eachtime_limit): + """Sets the withdraw_eachtime_limit of this WithdrawStatus. + + Maximum amount for each withdrawal # noqa: E501 + + :param withdraw_eachtime_limit: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 + :type: str + """ + + self._withdraw_eachtime_limit = withdraw_eachtime_limit + + @property + def withdraw_fix_on_chains(self): + """Gets the withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 + + Fixed withdrawal fee on multiple chains # noqa: E501 + + :return: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 + :rtype: dict(str, str) + """ + return self._withdraw_fix_on_chains + + @withdraw_fix_on_chains.setter + def withdraw_fix_on_chains(self, withdraw_fix_on_chains): + """Sets the withdraw_fix_on_chains of this WithdrawStatus. + + Fixed withdrawal fee on multiple chains # noqa: E501 + + :param withdraw_fix_on_chains: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 + :type: dict(str, str) + """ + + self._withdraw_fix_on_chains = withdraw_fix_on_chains + + @property + def withdraw_percent_on_chains(self): + """Gets the withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 + + Percentage withdrawal fee on multiple chains # noqa: E501 + + :return: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 + :rtype: dict(str, str) + """ + return self._withdraw_percent_on_chains + + @withdraw_percent_on_chains.setter + def withdraw_percent_on_chains(self, withdraw_percent_on_chains): + """Sets the withdraw_percent_on_chains of this WithdrawStatus. + + Percentage withdrawal fee on multiple chains # noqa: E501 + + :param withdraw_percent_on_chains: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 + :type: dict(str, str) + """ + + self._withdraw_percent_on_chains = withdraw_percent_on_chains + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WithdrawStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WithdrawStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py new file mode 100644 index 0000000..1d57e4b --- /dev/null +++ b/gate_api/models/withdrawal_record.py @@ -0,0 +1,462 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class WithdrawalRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'txid': 'str', + 'block_number': 'str', + 'withdraw_order_id': 'str', + 'timestamp': 'str', + 'amount': 'str', + 'fee': 'str', + 'currency': 'str', + 'fail_reason': 'str', + 'timestamp2': 'str', + 'memo': 'str', + 'status': 'str', + 'chain': 'str' + } + + attribute_map = { + 'id': 'id', + 'txid': 'txid', + 'block_number': 'block_number', + 'withdraw_order_id': 'withdraw_order_id', + 'timestamp': 'timestamp', + 'amount': 'amount', + 'fee': 'fee', + 'currency': 'currency', + 'fail_reason': 'fail_reason', + 'timestamp2': 'timestamp2', + 'memo': 'memo', + 'status': 'status', + 'chain': 'chain' + } + + def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None, timestamp=None, amount=None, fee=None, currency=None, fail_reason=None, timestamp2=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """WithdrawalRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._txid = None + self._block_number = None + self._withdraw_order_id = None + self._timestamp = None + self._amount = None + self._fee = None + self._currency = None + self._fail_reason = None + self._timestamp2 = None + self._memo = None + self._status = None + self._chain = None + self.discriminator = None + + if id is not None: + self.id = id + if txid is not None: + self.txid = txid + if block_number is not None: + self.block_number = block_number + if withdraw_order_id is not None: + self.withdraw_order_id = withdraw_order_id + if timestamp is not None: + self.timestamp = timestamp + self.amount = amount + if fee is not None: + self.fee = fee + self.currency = currency + if fail_reason is not None: + self.fail_reason = fail_reason + if timestamp2 is not None: + self.timestamp2 = timestamp2 + if memo is not None: + self.memo = memo + if status is not None: + self.status = status + self.chain = chain + + @property + def id(self): + """Gets the id of this WithdrawalRecord. # noqa: E501 + + Record ID # noqa: E501 + + :return: The id of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WithdrawalRecord. + + Record ID # noqa: E501 + + :param id: The id of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def txid(self): + """Gets the txid of this WithdrawalRecord. # noqa: E501 + + Hash record of the withdrawal # noqa: E501 + + :return: The txid of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._txid + + @txid.setter + def txid(self, txid): + """Sets the txid of this WithdrawalRecord. + + Hash record of the withdrawal # noqa: E501 + + :param txid: The txid of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._txid = txid + + @property + def block_number(self): + """Gets the block_number of this WithdrawalRecord. # noqa: E501 + + 区块编号 # noqa: E501 + + :return: The block_number of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._block_number + + @block_number.setter + def block_number(self, block_number): + """Sets the block_number of this WithdrawalRecord. + + 区块编号 # noqa: E501 + + :param block_number: The block_number of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._block_number = block_number + + @property + def withdraw_order_id(self): + """Gets the withdraw_order_id of this WithdrawalRecord. # noqa: E501 + + Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :return: The withdraw_order_id of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._withdraw_order_id + + @withdraw_order_id.setter + def withdraw_order_id(self, withdraw_order_id): + """Sets the withdraw_order_id of this WithdrawalRecord. + + Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + + :param withdraw_order_id: The withdraw_order_id of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._withdraw_order_id = withdraw_order_id + + @property + def timestamp(self): + """Gets the timestamp of this WithdrawalRecord. # noqa: E501 + + Operation time # noqa: E501 + + :return: The timestamp of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this WithdrawalRecord. + + Operation time # noqa: E501 + + :param timestamp: The timestamp of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._timestamp = timestamp + + @property + def amount(self): + """Gets the amount of this WithdrawalRecord. # noqa: E501 + + Currency amount # noqa: E501 + + :return: The amount of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this WithdrawalRecord. + + Currency amount # noqa: E501 + + :param amount: The amount of this WithdrawalRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def fee(self): + """Gets the fee of this WithdrawalRecord. # noqa: E501 + + fee # noqa: E501 + + :return: The fee of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._fee + + @fee.setter + def fee(self, fee): + """Sets the fee of this WithdrawalRecord. + + fee # noqa: E501 + + :param fee: The fee of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._fee = fee + + @property + def currency(self): + """Gets the currency of this WithdrawalRecord. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this WithdrawalRecord. + + Currency name # noqa: E501 + + :param currency: The currency of this WithdrawalRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def fail_reason(self): + """Gets the fail_reason of this WithdrawalRecord. # noqa: E501 + + The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty # noqa: E501 + + :return: The fail_reason of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._fail_reason + + @fail_reason.setter + def fail_reason(self, fail_reason): + """Sets the fail_reason of this WithdrawalRecord. + + The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty # noqa: E501 + + :param fail_reason: The fail_reason of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._fail_reason = fail_reason + + @property + def timestamp2(self): + """Gets the timestamp2 of this WithdrawalRecord. # noqa: E501 + + The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success # noqa: E501 + + :return: The timestamp2 of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._timestamp2 + + @timestamp2.setter + def timestamp2(self, timestamp2): + """Sets the timestamp2 of this WithdrawalRecord. + + The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success # noqa: E501 + + :param timestamp2: The timestamp2 of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._timestamp2 = timestamp2 + + @property + def memo(self): + """Gets the memo of this WithdrawalRecord. # noqa: E501 + + Additional remarks with regards to the withdrawal # noqa: E501 + + :return: The memo of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._memo + + @memo.setter + def memo(self, memo): + """Sets the memo of this WithdrawalRecord. + + Additional remarks with regards to the withdrawal # noqa: E501 + + :param memo: The memo of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._memo = memo + + @property + def status(self): + """Gets the status of this WithdrawalRecord. # noqa: E501 + + Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review # noqa: E501 + + :return: The status of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this WithdrawalRecord. + + Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review # noqa: E501 + + :param status: The status of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def chain(self): + """Gets the chain of this WithdrawalRecord. # noqa: E501 + + Name of the chain used in withdrawals # noqa: E501 + + :return: The chain of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this WithdrawalRecord. + + Name of the chain used in withdrawals # noqa: E501 + + :param chain: The chain of this WithdrawalRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and chain is None: # noqa: E501 + raise ValueError("Invalid value for `chain`, must not be `None`") # noqa: E501 + + self._chain = chain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WithdrawalRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WithdrawalRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/rest.py b/gate_api/rest.py new file mode 100644 index 0000000..66d4dfc --- /dev/null +++ b/gate_api/rest.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode +import urllib3 + +from gate_api.exceptions import ApiException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..2bad2b3 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="gateio" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="gateapi-python" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..eb358ef --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +certifi >= 14.05.14 +future; python_version<="2.7" +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..4d8daf3 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,13 @@ +[metadata] +long_description = file: README.md +long_description_content_type = text/markdown +classifiers: + License :: OSI Approved :: Apache Software License + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 +maintainer = gateio +maintainer_email = dev@mail.gate.io + +[flake8] +max-line-length=99 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..3ee355d --- /dev/null +++ b/setup.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "gate-api" +VERSION = "6.97.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="Gate API v4", + author="Gate API support", + author_email="support@mail.gate.io", + url="https://github.com/gateio/gateapi-python", + keywords=["OpenAPI", "OpenAPI-Generator", "Gate API v4"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + license="Apache License 2.0" +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..4ed3991 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,3 @@ +pytest~=4.6.7 # needed for python 2.7+3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..2be77d1 --- /dev/null +++ b/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=gate_api From ac5bb7dfcd5b321e396bd0848f24293c7e8d0f87 Mon Sep 17 00:00:00 2001 From: gateio Date: Thu, 8 May 2025 09:32:40 +0000 Subject: [PATCH 03/20] update to v6.97.2 --- README.md | 4 ++-- docs/EarnUniApi.md | 4 ++-- gate_api/__init__.py | 2 +- gate_api/api/earn_uni_api.py | 4 ++-- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 ++-- setup.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 56dc3b4..0c8e2d0 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.97.0 -- Package version: 6.97.0 +- API version: 4.97.2 +- Package version: 6.97.2 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index b2f546d..c5221d5 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -693,7 +693,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:22+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -757,7 +757,7 @@ Name | Type | Description | Notes ### 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-05-08 09:22+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/gate_api/__init__.py b/gate_api/__init__.py index 1cf893c..0c4ed4b 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.97.0" +__version__ = "6.97.2" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 0921f96..d660bda 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1215,7 +1215,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:22+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1242,7 +1242,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:22+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) diff --git a/gate_api/api_client.py b/gate_api/api_client.py index e70cb8e..d40bf17 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/6.97.0/python' + self.user_agent = 'OpenAPI-Generator/6.97.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 5c6998d..6b525b1 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: 4.97.0\n"\ - "SDK Package Version: 6.97.0".\ + "Version of the API: 4.97.2\n"\ + "SDK Package Version: 6.97.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/setup.py b/setup.py index 3ee355d..cc35165 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.97.0" +VERSION = "6.97.2" # To install the library, run the following # # python setup.py install From 116299d130b207c06ad23aad5efb11566b601e78 Mon Sep 17 00:00:00 2001 From: gateio Date: Fri, 23 May 2025 13:32:58 +0000 Subject: [PATCH 04/20] update to v6.97.4 --- README.md | 7 +- docs/DeliveryApi.md | 4 +- docs/DeliveryTicker.md | 32 + docs/EarnUniApi.md | 4 +- docs/FuturesOrder.md | 2 +- docs/FuturesTicker.md | 2 - docs/PlaceDualInvestmentOrder.md | 2 - docs/SpotAccount.md | 1 - docs/WithdrawalRecord.md | 1 + gate_api/__init__.py | 5 +- gate_api/api/account_api.py | 2 +- gate_api/api/collateral_loan_api.py | 2 +- gate_api/api/delivery_api.py | 8 +- gate_api/api/earn_api.py | 2 +- gate_api/api/earn_uni_api.py | 6 +- gate_api/api/flash_swap_api.py | 2 +- gate_api/api/futures_api.py | 2 +- gate_api/api/margin_api.py | 2 +- gate_api/api/margin_uni_api.py | 2 +- gate_api/api/multi_collateral_loan_api.py | 2 +- gate_api/api/options_api.py | 2 +- gate_api/api/rebate_api.py | 2 +- gate_api/api/spot_api.py | 2 +- gate_api/api/sub_account_api.py | 2 +- gate_api/api/unified_api.py | 2 +- gate_api/api/wallet_api.py | 2 +- gate_api/api/withdrawal_api.py | 2 +- gate_api/api_client.py | 4 +- gate_api/configuration.py | 6 +- gate_api/exceptions.py | 2 +- gate_api/models/__init__.py | 3 +- gate_api/models/account_balance.py | 2 +- gate_api/models/account_detail.py | 2 +- gate_api/models/account_detail_key.py | 2 +- gate_api/models/account_rate_limit.py | 2 +- gate_api/models/agency_commission.py | 2 +- gate_api/models/agency_commission_history.py | 2 +- gate_api/models/agency_transaction.py | 2 +- gate_api/models/agency_transaction_history.py | 2 +- gate_api/models/auto_repay_setting.py | 2 +- gate_api/models/batch_amend_item.py | 2 +- gate_api/models/batch_amend_order_req.py | 2 +- gate_api/models/batch_futures_order.py | 2 +- gate_api/models/batch_order.py | 2 +- gate_api/models/borrow_currency_info.py | 2 +- gate_api/models/broker_commission.py | 2 +- gate_api/models/broker_commission1.py | 2 +- gate_api/models/broker_transaction.py | 2 +- gate_api/models/broker_transaction1.py | 2 +- gate_api/models/cancel_batch_order.py | 2 +- gate_api/models/cancel_order_result.py | 2 +- gate_api/models/collateral_adjust.py | 2 +- gate_api/models/collateral_adjust_res.py | 2 +- gate_api/models/collateral_align.py | 2 +- gate_api/models/collateral_currency.py | 2 +- gate_api/models/collateral_currency_info.py | 2 +- gate_api/models/collateral_currency_res.py | 2 +- gate_api/models/collateral_current_rate.py | 2 +- gate_api/models/collateral_fix_rate.py | 2 +- gate_api/models/collateral_loan_currency.py | 2 +- gate_api/models/collateral_ltv.py | 2 +- gate_api/models/collateral_order.py | 2 +- gate_api/models/collateral_record.py | 2 +- gate_api/models/contract.py | 2 +- gate_api/models/contract_stat.py | 2 +- gate_api/models/convert_small_balance.py | 2 +- .../countdown_cancel_all_futures_task.py | 2 +- .../countdown_cancel_all_options_task.py | 2 +- .../models/countdown_cancel_all_spot_task.py | 2 +- gate_api/models/create_collateral_order.py | 2 +- .../models/create_multi_collateral_order.py | 2 +- gate_api/models/create_uni_lend.py | 2 +- gate_api/models/create_uni_loan.py | 2 +- gate_api/models/cross_margin_account.py | 2 +- gate_api/models/cross_margin_account_book.py | 2 +- gate_api/models/cross_margin_balance.py | 2 +- gate_api/models/cross_margin_balance1.py | 2 +- gate_api/models/cross_margin_currency.py | 2 +- gate_api/models/cross_margin_loan.py | 2 +- gate_api/models/cross_margin_repay_request.py | 2 +- gate_api/models/cross_margin_repayment.py | 2 +- gate_api/models/cross_margin_transferable.py | 2 +- gate_api/models/currency.py | 2 +- gate_api/models/currency_chain.py | 2 +- gate_api/models/currency_pair.py | 2 +- gate_api/models/currency_quota.py | 2 +- gate_api/models/debit_fee.py | 2 +- gate_api/models/delivery_candlestick.py | 2 +- gate_api/models/delivery_contract.py | 2 +- gate_api/models/delivery_settlement.py | 2 +- gate_api/models/delivery_ticker.py | 739 ++++++++++++++++++ gate_api/models/deposit_address.py | 2 +- gate_api/models/deposit_record.py | 2 +- gate_api/models/dual_get_orders.py | 2 +- gate_api/models/dual_get_plans.py | 2 +- gate_api/models/eth2_rate_list.py | 2 +- gate_api/models/eth2_swap.py | 2 +- gate_api/models/flash_swap_currency_pair.py | 2 +- gate_api/models/flash_swap_order.py | 2 +- gate_api/models/flash_swap_order_preview.py | 2 +- gate_api/models/flash_swap_order_request.py | 2 +- gate_api/models/flash_swap_preview_request.py | 2 +- gate_api/models/funding_account.py | 2 +- gate_api/models/funding_rate_record.py | 2 +- gate_api/models/future_cancel_order_result.py | 2 +- gate_api/models/futures_account.py | 2 +- gate_api/models/futures_account_book.py | 2 +- gate_api/models/futures_account_history.py | 2 +- gate_api/models/futures_auto_deleverage.py | 2 +- .../futures_batch_amend_order_request.py | 2 +- gate_api/models/futures_candlestick.py | 2 +- gate_api/models/futures_fee.py | 2 +- gate_api/models/futures_index_constituents.py | 2 +- gate_api/models/futures_initial_order.py | 2 +- gate_api/models/futures_limit_risk_tiers.py | 2 +- gate_api/models/futures_liq_order.py | 2 +- gate_api/models/futures_liquidate.py | 2 +- gate_api/models/futures_order.py | 6 +- gate_api/models/futures_order_amendment.py | 2 +- gate_api/models/futures_order_book.py | 2 +- gate_api/models/futures_order_book_item.py | 2 +- gate_api/models/futures_premium_index.py | 2 +- gate_api/models/futures_price_trigger.py | 2 +- .../models/futures_price_triggered_order.py | 2 +- gate_api/models/futures_ticker.py | 62 +- gate_api/models/futures_trade.py | 2 +- gate_api/models/index_constituent.py | 2 +- gate_api/models/inline_object.py | 2 +- gate_api/models/inline_response200.py | 2 +- gate_api/models/insurance_record.py | 2 +- gate_api/models/ledger_record.py | 2 +- gate_api/models/liquidate_order.py | 2 +- gate_api/models/margin_account.py | 2 +- gate_api/models/margin_account_book.py | 2 +- gate_api/models/margin_account_currency.py | 2 +- gate_api/models/margin_leverage_tier.py | 2 +- gate_api/models/margin_market_leverage.py | 2 +- gate_api/models/margin_tiers.py | 2 +- gate_api/models/margin_transferable.py | 2 +- gate_api/models/max_uni_borrowable.py | 2 +- gate_api/models/mock_futures_order.py | 2 +- gate_api/models/mock_futures_position.py | 2 +- gate_api/models/mock_margin_result.py | 2 +- gate_api/models/mock_options_order.py | 2 +- gate_api/models/mock_options_position.py | 2 +- gate_api/models/mock_risk_unit.py | 2 +- gate_api/models/mock_spot_balance.py | 2 +- gate_api/models/mock_spot_order.py | 2 +- gate_api/models/multi_chain_address_item.py | 2 +- gate_api/models/multi_collateral_currency.py | 2 +- gate_api/models/multi_collateral_item.py | 2 +- gate_api/models/multi_collateral_order.py | 2 +- gate_api/models/multi_collateral_record.py | 2 +- .../multi_collateral_record_currency.py | 2 +- gate_api/models/multi_loan_item.py | 2 +- gate_api/models/multi_loan_repay_item.py | 2 +- gate_api/models/multi_repay_record.py | 2 +- gate_api/models/multi_repay_resp.py | 2 +- gate_api/models/my_futures_trade.py | 2 +- .../models/my_futures_trade_time_range.py | 2 +- gate_api/models/open_orders.py | 2 +- gate_api/models/options_account.py | 2 +- gate_api/models/options_account_book.py | 2 +- gate_api/models/options_candlestick.py | 2 +- gate_api/models/options_contract.py | 2 +- gate_api/models/options_mmp.py | 2 +- gate_api/models/options_mmp_reset.py | 2 +- gate_api/models/options_my_settlements.py | 2 +- gate_api/models/options_my_trade.py | 2 +- gate_api/models/options_order.py | 2 +- gate_api/models/options_position.py | 2 +- gate_api/models/options_position_close.py | 2 +- .../models/options_position_close_order.py | 2 +- gate_api/models/options_settlement.py | 2 +- gate_api/models/options_ticker.py | 2 +- gate_api/models/options_underlying.py | 2 +- gate_api/models/options_underlying_ticker.py | 2 +- gate_api/models/order.py | 2 +- gate_api/models/order_book.py | 2 +- gate_api/models/order_cancel.py | 2 +- gate_api/models/order_patch.py | 2 +- gate_api/models/order_resp.py | 2 +- gate_api/models/partner_commission_history.py | 2 +- gate_api/models/partner_sub.py | 2 +- gate_api/models/partner_sub_list.py | 2 +- .../models/partner_transaction_history.py | 2 +- gate_api/models/patch_uni_lend.py | 2 +- .../models/place_dual_investment_order.py | 62 +- gate_api/models/position.py | 2 +- gate_api/models/position_close.py | 2 +- gate_api/models/position_close_order.py | 2 +- gate_api/models/profit_loss_range.py | 2 +- gate_api/models/rebate_user_info.py | 2 +- gate_api/models/repay_currency_res.py | 2 +- gate_api/models/repay_loan.py | 2 +- gate_api/models/repay_multi_loan.py | 2 +- gate_api/models/repay_record.py | 2 +- gate_api/models/repay_record_currency.py | 2 +- gate_api/models/repay_record_left_interest.py | 2 +- .../models/repay_record_repaid_currency.py | 2 +- .../models/repay_record_total_interest.py | 2 +- gate_api/models/repay_resp.py | 2 +- gate_api/models/risk_units.py | 2 +- gate_api/models/saved_address.py | 2 +- gate_api/models/small_balance.py | 2 +- gate_api/models/small_balance_history.py | 2 +- gate_api/models/spot_account.py | 38 +- gate_api/models/spot_account_book.py | 2 +- gate_api/models/spot_currency_chain.py | 2 +- gate_api/models/spot_fee.py | 2 +- gate_api/models/spot_insurance_history.py | 2 +- gate_api/models/spot_price_put_order.py | 2 +- gate_api/models/spot_price_trigger.py | 2 +- gate_api/models/spot_price_triggered_order.py | 2 +- gate_api/models/stp_group.py | 2 +- gate_api/models/stp_group_user.py | 2 +- gate_api/models/structured_buy.py | 2 +- .../models/structured_get_project_list.py | 2 +- gate_api/models/structured_order_list.py | 2 +- gate_api/models/sub_account.py | 2 +- gate_api/models/sub_account_balance.py | 2 +- .../sub_account_cross_margin_balance.py | 2 +- .../models/sub_account_futures_balance.py | 2 +- gate_api/models/sub_account_key.py | 2 +- gate_api/models/sub_account_key_perms.py | 2 +- gate_api/models/sub_account_margin_balance.py | 2 +- gate_api/models/sub_account_to_sub_account.py | 2 +- gate_api/models/sub_account_transfer.py | 2 +- gate_api/models/sub_cross_margin_account.py | 2 +- gate_api/models/sub_user_mode.py | 2 +- gate_api/models/system_time.py | 2 +- gate_api/models/ticker.py | 2 +- gate_api/models/total_balance.py | 2 +- gate_api/models/trade.py | 2 +- gate_api/models/trade_fee.py | 2 +- gate_api/models/transaction_id.py | 2 +- gate_api/models/transfer.py | 2 +- gate_api/models/transfer_order_status.py | 2 +- gate_api/models/transferables_result.py | 2 +- gate_api/models/trigger_order_response.py | 2 +- gate_api/models/trigger_time.py | 2 +- gate_api/models/uid_push_order.py | 2 +- gate_api/models/uid_push_withdrawal.py | 2 +- gate_api/models/uid_push_withdrawal_resp.py | 2 +- gate_api/models/uni_currency.py | 2 +- gate_api/models/uni_currency_interest.py | 2 +- gate_api/models/uni_currency_pair.py | 2 +- gate_api/models/uni_interest_mode.py | 2 +- gate_api/models/uni_interest_record.py | 2 +- gate_api/models/uni_lend.py | 2 +- gate_api/models/uni_lend_interest.py | 2 +- gate_api/models/uni_lend_record.py | 2 +- gate_api/models/uni_loan.py | 2 +- gate_api/models/uni_loan_interest_record.py | 2 +- gate_api/models/uni_loan_record.py | 2 +- gate_api/models/unified_account.py | 2 +- gate_api/models/unified_balance.py | 2 +- gate_api/models/unified_borrowable.py | 2 +- gate_api/models/unified_borrowable1.py | 2 +- gate_api/models/unified_currency.py | 2 +- gate_api/models/unified_discount.py | 2 +- gate_api/models/unified_discount_tiers.py | 2 +- gate_api/models/unified_history_loan_rate.py | 2 +- .../models/unified_history_loan_rate_rates.py | 2 +- gate_api/models/unified_leverage_config.py | 2 +- gate_api/models/unified_leverage_setting.py | 2 +- gate_api/models/unified_loan.py | 2 +- gate_api/models/unified_loan_record.py | 2 +- gate_api/models/unified_loan_result.py | 2 +- gate_api/models/unified_margin_tiers.py | 2 +- gate_api/models/unified_mode_set.py | 2 +- gate_api/models/unified_portfolio_input.py | 2 +- gate_api/models/unified_portfolio_output.py | 2 +- gate_api/models/unified_risk_units.py | 2 +- gate_api/models/unified_settings.py | 2 +- gate_api/models/unified_transferable.py | 2 +- gate_api/models/user_ltv_info.py | 2 +- gate_api/models/user_sub.py | 2 +- gate_api/models/user_sub_relation.py | 2 +- gate_api/models/user_total_amount.py | 2 +- gate_api/models/withdraw_status.py | 2 +- gate_api/models/withdrawal_record.py | 34 +- gate_api/rest.py | 2 +- setup.cfg | 2 +- setup.py | 4 +- 285 files changed, 1108 insertions(+), 450 deletions(-) create mode 100644 docs/DeliveryTicker.md create mode 100644 gate_api/models/delivery_ticker.py diff --git a/README.md b/README.md index 0c8e2d0..ea297c1 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # gate-api -Welcome to Gate.io API +Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.97.2 -- Package version: 6.97.2 +- API version: 4.97.4 +- Package version: 6.97.4 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) @@ -457,6 +457,7 @@ Class | Method | HTTP request | Description - [DeliveryCandlestick](docs/DeliveryCandlestick.md) - [DeliveryContract](docs/DeliveryContract.md) - [DeliverySettlement](docs/DeliverySettlement.md) + - [DeliveryTicker](docs/DeliveryTicker.md) - [DepositAddress](docs/DepositAddress.md) - [DepositRecord](docs/DepositRecord.md) - [DualGetOrders](docs/DualGetOrders.md) diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md index 53808de..9635459 100644 --- a/docs/DeliveryApi.md +++ b/docs/DeliveryApi.md @@ -360,7 +360,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_tickers** -> list[FuturesTicker] list_delivery_tickers(settle, contract=contract) +> list[DeliveryTicker] list_delivery_tickers(settle, contract=contract) List futures tickers @@ -401,7 +401,7 @@ Name | Type | Description | Notes ### Return type -[**list[FuturesTicker]**](FuturesTicker.md) +[**list[DeliveryTicker]**](DeliveryTicker.md) ### Authorization diff --git a/docs/DeliveryTicker.md b/docs/DeliveryTicker.md new file mode 100644 index 0000000..c9772f4 --- /dev/null +++ b/docs/DeliveryTicker.md @@ -0,0 +1,32 @@ +# DeliveryTicker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contract** | **str** | Futures contract | [optional] +**last** | **str** | Last trading price | [optional] +**change_percentage** | **str** | Change percentage. | [optional] +**total_size** | **str** | Contract total size | [optional] +**low_24h** | **str** | Lowest trading price in recent 24h | [optional] +**high_24h** | **str** | Highest trading price in recent 24h | [optional] +**volume_24h** | **str** | Trade size in recent 24h | [optional] +**volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency | [optional] +**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency | [optional] +**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency | [optional] +**mark_price** | **str** | Recent mark price | [optional] +**funding_rate** | **str** | Funding rate | [optional] +**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] +**index_price** | **str** | Index price | [optional] +**quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] +**basis_rate** | **str** | Basis rate | [optional] +**basis_value** | **str** | Basis value | [optional] +**lowest_ask** | **str** | Recent lowest ask | [optional] +**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] +**highest_bid** | **str** | Recent highest bid | [optional] +**highest_size** | **str** | The latest buyer's highest price order volume | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index c5221d5..e17df86 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -693,7 +693,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:32+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-23 13:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -757,7 +757,7 @@ Name | Type | Description | Notes ### 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-05-08 09:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-23 13:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/FuturesOrder.md b/docs/FuturesOrder.md index 66b4eeb..f077b2b 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] **left** | **int** | Size left to be traded | [optional] [readonly] **fill_price** | **str** | Fill price of the order | [optional] [readonly] -**text** | **str** | Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance | [optional] +**text** | **str** | Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-xxx: a. Liquidation under the classic account’s new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-xxx: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance | [optional] **tkfr** | **str** | Taker fee | [optional] [readonly] **mkfr** | **str** | Maker fee | [optional] [readonly] **refu** | **int** | Reference user ID | [optional] [readonly] diff --git a/docs/FuturesTicker.md b/docs/FuturesTicker.md index d6683a1..fabe441 100644 --- a/docs/FuturesTicker.md +++ b/docs/FuturesTicker.md @@ -20,8 +20,6 @@ Name | Type | Description | Notes **funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] **index_price** | **str** | Index price | [optional] **quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] -**basis_rate** | **str** | Basis rate | [optional] -**basis_value** | **str** | Basis value | [optional] **lowest_ask** | **str** | Recent lowest ask | [optional] **lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] **highest_bid** | **str** | Recent highest bid | [optional] diff --git a/docs/PlaceDualInvestmentOrder.md b/docs/PlaceDualInvestmentOrder.md index 55944b5..716835c 100644 --- a/docs/PlaceDualInvestmentOrder.md +++ b/docs/PlaceDualInvestmentOrder.md @@ -5,8 +5,6 @@ Dual Investment order Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **plan_id** | **str** | Plan ID | -**copies** | **str** | The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. | [optional] -**is_max** | **int** | Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. | [optional] **amount** | **str** | Subscription amount, mutually exclusive with the copies field | **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md index 5fd9ad7..6bb761e 100644 --- a/docs/SpotAccount.md +++ b/docs/SpotAccount.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **available** | **str** | Available amount | [optional] **locked** | **str** | Locked amount, used in trading | [optional] **update_id** | **int** | Version number | [optional] -**refresh_time** | **int** | Asset Refresh Time (ms) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md index 80a4cce..c75276e 100644 --- a/docs/WithdrawalRecord.md +++ b/docs/WithdrawalRecord.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **amount** | **str** | Currency amount | **fee** | **str** | fee | [optional] [readonly] **currency** | **str** | Currency name | +**address** | **str** | 提现地址 | [optional] **fail_reason** | **str** | The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty | [optional] **timestamp2** | **str** | The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success | [optional] **memo** | **str** | Additional remarks with regards to the withdrawal | [optional] diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 0c4ed4b..126e8d2 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -5,7 +5,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.97.2" +__version__ = "6.97.4" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi @@ -103,6 +103,7 @@ from gate_api.models.delivery_candlestick import DeliveryCandlestick from gate_api.models.delivery_contract import DeliveryContract from gate_api.models.delivery_settlement import DeliverySettlement +from gate_api.models.delivery_ticker import DeliveryTicker from gate_api.models.deposit_address import DepositAddress from gate_api.models.deposit_record import DepositRecord from gate_api.models.dual_get_orders import DualGetOrders diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py index 6827757..2431e57 100644 --- a/gate_api/api/account_api.py +++ b/gate_api/api/account_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py index 861d48e..9e09bc7 100644 --- a/gate_api/api/collateral_loan_api.py +++ b/gate_api/api/collateral_loan_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/delivery_api.py b/gate_api/api/delivery_api.py index c0c689f..10cb221 100644 --- a/gate_api/api/delivery_api.py +++ b/gate_api/api/delivery_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -719,7 +719,7 @@ def list_delivery_tickers(self, settle, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.FuturesTicker] + :rtype: list[gate_api.DeliveryTicker] :return: If the method is called asynchronously, returns the request thread. """ @@ -746,7 +746,7 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.FuturesTicker], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.DeliveryTicker], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -810,7 +810,7 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[FuturesTicker]', # noqa: E501 + response_type='list[DeliveryTicker]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index debcadf..9ac2cba 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index d660bda..d9bde6f 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -1215,7 +1215,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:32+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-23 13:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1242,7 +1242,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:32+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-23 13:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py index a01a23c..1942daa 100644 --- a/gate_api/api/flash_swap_api.py +++ b/gate_api/api/flash_swap_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index 7f80fab..17034f0 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py index 395c9b8..2535f54 100644 --- a/gate_api/api/margin_api.py +++ b/gate_api/api/margin_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py index 1ceca59..bf37237 100644 --- a/gate_api/api/margin_uni_api.py +++ b/gate_api/api/margin_uni_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index 8cea842..3077a14 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py index b5f74f7..0caab31 100644 --- a/gate_api/api/options_api.py +++ b/gate_api/api/options_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index 9136c26..3c33194 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py index fd8ae80..d3ef652 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/sub_account_api.py b/gate_api/api/sub_account_api.py index 3ab7b07..a709388 100644 --- a/gate_api/api/sub_account_api.py +++ b/gate_api/api/sub_account_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index d1b37bd..50b5bb0 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py index 726ba97..551bda5 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py index 318623a..1eae9e1 100644 --- a/gate_api/api/withdrawal_api.py +++ b/gate_api/api/withdrawal_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/api_client.py b/gate_api/api_client.py index d40bf17..3947b87 100644 --- a/gate_api/api_client.py +++ b/gate_api/api_client.py @@ -2,7 +2,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -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/6.97.2/python' + self.user_agent = 'OpenAPI-Generator/6.97.4/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 6b525b1..8049d18 100644 --- a/gate_api/configuration.py +++ b/gate_api/configuration.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -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: 4.97.2\n"\ - "SDK Package Version: 6.97.2".\ + "Version of the API: 4.97.4\n"\ + "SDK Package Version: 6.97.4".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py index e890184..4c5be07 100644 --- a/gate_api/exceptions.py +++ b/gate_api/exceptions.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py index 2fb1061..a3959cf 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -4,7 +4,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -73,6 +73,7 @@ from gate_api.models.delivery_candlestick import DeliveryCandlestick from gate_api.models.delivery_contract import DeliveryContract from gate_api.models.delivery_settlement import DeliverySettlement +from gate_api.models.delivery_ticker import DeliveryTicker from gate_api.models.deposit_address import DepositAddress from gate_api.models.deposit_record import DepositRecord from gate_api.models.dual_get_orders import DualGetOrders diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py index 03dfc20..b94e9f4 100644 --- a/gate_api/models/account_balance.py +++ b/gate_api/models/account_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py index 914531f..091274e 100644 --- a/gate_api/models/account_detail.py +++ b/gate_api/models/account_detail.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py index 75cde18..aa06492 100644 --- a/gate_api/models/account_detail_key.py +++ b/gate_api/models/account_detail_key.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py index 24b19e8..9040c3f 100644 --- a/gate_api/models/account_rate_limit.py +++ b/gate_api/models/account_rate_limit.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py index c55dad8..8051cae 100644 --- a/gate_api/models/agency_commission.py +++ b/gate_api/models/agency_commission.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py index 59c4540..36bd809 100644 --- a/gate_api/models/agency_commission_history.py +++ b/gate_api/models/agency_commission_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py index ffba857..e3e1757 100644 --- a/gate_api/models/agency_transaction.py +++ b/gate_api/models/agency_transaction.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py index 63f4d6b..d71fc23 100644 --- a/gate_api/models/agency_transaction_history.py +++ b/gate_api/models/agency_transaction_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py index 8b3fe3c..a79f630 100644 --- a/gate_api/models/auto_repay_setting.py +++ b/gate_api/models/auto_repay_setting.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py index ae56f80..9f503a6 100644 --- a/gate_api/models/batch_amend_item.py +++ b/gate_api/models/batch_amend_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py index e6ab0e6..d8dd594 100644 --- a/gate_api/models/batch_amend_order_req.py +++ b/gate_api/models/batch_amend_order_req.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py index 0d8529a..5628881 100644 --- a/gate_api/models/batch_futures_order.py +++ b/gate_api/models/batch_futures_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py index a90d329..362392e 100644 --- a/gate_api/models/batch_order.py +++ b/gate_api/models/batch_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py index 58762be..9383b42 100644 --- a/gate_api/models/borrow_currency_info.py +++ b/gate_api/models/borrow_currency_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py index e6f2d36..dfe04a7 100644 --- a/gate_api/models/broker_commission.py +++ b/gate_api/models/broker_commission.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py index 3c60c83..ae06559 100644 --- a/gate_api/models/broker_commission1.py +++ b/gate_api/models/broker_commission1.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py index 96ce328..d24e01f 100644 --- a/gate_api/models/broker_transaction.py +++ b/gate_api/models/broker_transaction.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py index 3e507d1..9239c29 100644 --- a/gate_api/models/broker_transaction1.py +++ b/gate_api/models/broker_transaction1.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py index d8e5f13..09c5146 100644 --- a/gate_api/models/cancel_batch_order.py +++ b/gate_api/models/cancel_batch_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py index d4be89f..3aff0c6 100644 --- a/gate_api/models/cancel_order_result.py +++ b/gate_api/models/cancel_order_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py index 3ed0b11..ad97e3a 100644 --- a/gate_api/models/collateral_adjust.py +++ b/gate_api/models/collateral_adjust.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py index 4f0e933..f3b76c9 100644 --- a/gate_api/models/collateral_adjust_res.py +++ b/gate_api/models/collateral_adjust_res.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py index 3b77762..eec78fb 100644 --- a/gate_api/models/collateral_align.py +++ b/gate_api/models/collateral_align.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py index 47f69b4..977d60d 100644 --- a/gate_api/models/collateral_currency.py +++ b/gate_api/models/collateral_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py index 2671b11..7dd36c5 100644 --- a/gate_api/models/collateral_currency_info.py +++ b/gate_api/models/collateral_currency_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py index 585b8a6..11a8cf5 100644 --- a/gate_api/models/collateral_currency_res.py +++ b/gate_api/models/collateral_currency_res.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py index 0031fc0..cf4db09 100644 --- a/gate_api/models/collateral_current_rate.py +++ b/gate_api/models/collateral_current_rate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py index f11afc2..e910881 100644 --- a/gate_api/models/collateral_fix_rate.py +++ b/gate_api/models/collateral_fix_rate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py index 90120f4..32d33d8 100644 --- a/gate_api/models/collateral_loan_currency.py +++ b/gate_api/models/collateral_loan_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py index daee385..bf3f891 100644 --- a/gate_api/models/collateral_ltv.py +++ b/gate_api/models/collateral_ltv.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py index da2b478..aa062ff 100644 --- a/gate_api/models/collateral_order.py +++ b/gate_api/models/collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py index 36d8f8f..c6e0cb9 100644 --- a/gate_api/models/collateral_record.py +++ b/gate_api/models/collateral_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index 0af2632..9af37ee 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index 450c573..4a17976 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py index e254254..539ec27 100644 --- a/gate_api/models/convert_small_balance.py +++ b/gate_api/models/convert_small_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py index 4501ba2..6d418dd 100644 --- a/gate_api/models/countdown_cancel_all_futures_task.py +++ b/gate_api/models/countdown_cancel_all_futures_task.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py index 62cc503..814ccd7 100644 --- a/gate_api/models/countdown_cancel_all_options_task.py +++ b/gate_api/models/countdown_cancel_all_options_task.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py index f2764ab..5f338bb 100644 --- a/gate_api/models/countdown_cancel_all_spot_task.py +++ b/gate_api/models/countdown_cancel_all_spot_task.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py index b82beab..2cffae4 100644 --- a/gate_api/models/create_collateral_order.py +++ b/gate_api/models/create_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py index 84e5e21..6b52002 100644 --- a/gate_api/models/create_multi_collateral_order.py +++ b/gate_api/models/create_multi_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py index b45bd6b..e3b7191 100644 --- a/gate_api/models/create_uni_lend.py +++ b/gate_api/models/create_uni_lend.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py index 419b667..2807ef8 100644 --- a/gate_api/models/create_uni_loan.py +++ b/gate_api/models/create_uni_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_account.py b/gate_api/models/cross_margin_account.py index e76d6ed..77b5a23 100644 --- a/gate_api/models/cross_margin_account.py +++ b/gate_api/models/cross_margin_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_account_book.py b/gate_api/models/cross_margin_account_book.py index faf0dd2..5e69447 100644 --- a/gate_api/models/cross_margin_account_book.py +++ b/gate_api/models/cross_margin_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py index b3c766a..a29eff3 100644 --- a/gate_api/models/cross_margin_balance.py +++ b/gate_api/models/cross_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_balance1.py b/gate_api/models/cross_margin_balance1.py index 354247d..a03f8ae 100644 --- a/gate_api/models/cross_margin_balance1.py +++ b/gate_api/models/cross_margin_balance1.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_currency.py b/gate_api/models/cross_margin_currency.py index 3b9f37a..02a5e76 100644 --- a/gate_api/models/cross_margin_currency.py +++ b/gate_api/models/cross_margin_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py index 9a09c9e..76dfbe6 100644 --- a/gate_api/models/cross_margin_loan.py +++ b/gate_api/models/cross_margin_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_repay_request.py b/gate_api/models/cross_margin_repay_request.py index 406a95d..f980cc2 100644 --- a/gate_api/models/cross_margin_repay_request.py +++ b/gate_api/models/cross_margin_repay_request.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py index dcbb97b..be207d3 100644 --- a/gate_api/models/cross_margin_repayment.py +++ b/gate_api/models/cross_margin_repayment.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_transferable.py b/gate_api/models/cross_margin_transferable.py index 531070e..c44d312 100644 --- a/gate_api/models/cross_margin_transferable.py +++ b/gate_api/models/cross_margin_transferable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py index 449bdc7..d46aa58 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py index 1f4eb6d..75bce54 100644 --- a/gate_api/models/currency_chain.py +++ b/gate_api/models/currency_chain.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index e6195f7..fe291f8 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py index 58a945d..538c62e 100644 --- a/gate_api/models/currency_quota.py +++ b/gate_api/models/currency_quota.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py index 24b86ad..4ee1c3b 100644 --- a/gate_api/models/debit_fee.py +++ b/gate_api/models/debit_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py index 8bbd1ba..3abb195 100644 --- a/gate_api/models/delivery_candlestick.py +++ b/gate_api/models/delivery_candlestick.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py index ee2632c..7d6f6b7 100644 --- a/gate_api/models/delivery_contract.py +++ b/gate_api/models/delivery_contract.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py index bc01b64..03022b7 100644 --- a/gate_api/models/delivery_settlement.py +++ b/gate_api/models/delivery_settlement.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_ticker.py b/gate_api/models/delivery_ticker.py new file mode 100644 index 0000000..45d2846 --- /dev/null +++ b/gate_api/models/delivery_ticker.py @@ -0,0 +1,739 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class DeliveryTicker(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'contract': 'str', + 'last': 'str', + 'change_percentage': 'str', + 'total_size': 'str', + 'low_24h': 'str', + 'high_24h': 'str', + 'volume_24h': 'str', + 'volume_24h_btc': 'str', + 'volume_24h_usd': 'str', + 'volume_24h_base': 'str', + 'volume_24h_quote': 'str', + 'volume_24h_settle': 'str', + 'mark_price': 'str', + 'funding_rate': 'str', + 'funding_rate_indicative': 'str', + 'index_price': 'str', + 'quanto_base_rate': 'str', + 'basis_rate': 'str', + 'basis_value': 'str', + 'lowest_ask': 'str', + 'lowest_size': 'str', + 'highest_bid': 'str', + 'highest_size': 'str' + } + + attribute_map = { + 'contract': 'contract', + 'last': 'last', + 'change_percentage': 'change_percentage', + 'total_size': 'total_size', + 'low_24h': 'low_24h', + 'high_24h': 'high_24h', + 'volume_24h': 'volume_24h', + 'volume_24h_btc': 'volume_24h_btc', + 'volume_24h_usd': 'volume_24h_usd', + 'volume_24h_base': 'volume_24h_base', + 'volume_24h_quote': 'volume_24h_quote', + 'volume_24h_settle': 'volume_24h_settle', + 'mark_price': 'mark_price', + 'funding_rate': 'funding_rate', + 'funding_rate_indicative': 'funding_rate_indicative', + 'index_price': 'index_price', + 'quanto_base_rate': 'quanto_base_rate', + 'basis_rate': 'basis_rate', + 'basis_value': 'basis_value', + 'lowest_ask': 'lowest_ask', + 'lowest_size': 'lowest_size', + 'highest_bid': 'highest_bid', + 'highest_size': 'highest_size' + } + + def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, basis_rate=None, basis_value=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """DeliveryTicker - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._contract = None + self._last = None + self._change_percentage = None + self._total_size = None + self._low_24h = None + self._high_24h = None + self._volume_24h = None + self._volume_24h_btc = None + self._volume_24h_usd = None + self._volume_24h_base = None + self._volume_24h_quote = None + self._volume_24h_settle = None + self._mark_price = None + self._funding_rate = None + self._funding_rate_indicative = None + self._index_price = None + self._quanto_base_rate = None + self._basis_rate = None + self._basis_value = None + self._lowest_ask = None + self._lowest_size = None + self._highest_bid = None + self._highest_size = None + self.discriminator = None + + if contract is not None: + self.contract = contract + if last is not None: + self.last = last + if change_percentage is not None: + self.change_percentage = change_percentage + if total_size is not None: + self.total_size = total_size + if low_24h is not None: + self.low_24h = low_24h + if high_24h is not None: + self.high_24h = high_24h + if volume_24h is not None: + self.volume_24h = volume_24h + if volume_24h_btc is not None: + self.volume_24h_btc = volume_24h_btc + if volume_24h_usd is not None: + self.volume_24h_usd = volume_24h_usd + if volume_24h_base is not None: + self.volume_24h_base = volume_24h_base + if volume_24h_quote is not None: + self.volume_24h_quote = volume_24h_quote + if volume_24h_settle is not None: + self.volume_24h_settle = volume_24h_settle + if mark_price is not None: + self.mark_price = mark_price + if funding_rate is not None: + self.funding_rate = funding_rate + if funding_rate_indicative is not None: + self.funding_rate_indicative = funding_rate_indicative + if index_price is not None: + self.index_price = index_price + if quanto_base_rate is not None: + self.quanto_base_rate = quanto_base_rate + if basis_rate is not None: + self.basis_rate = basis_rate + if basis_value is not None: + self.basis_value = basis_value + if lowest_ask is not None: + self.lowest_ask = lowest_ask + if lowest_size is not None: + self.lowest_size = lowest_size + if highest_bid is not None: + self.highest_bid = highest_bid + if highest_size is not None: + self.highest_size = highest_size + + @property + def contract(self): + """Gets the contract of this DeliveryTicker. # noqa: E501 + + Futures contract # noqa: E501 + + :return: The contract of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this DeliveryTicker. + + Futures contract # noqa: E501 + + :param contract: The contract of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._contract = contract + + @property + def last(self): + """Gets the last of this DeliveryTicker. # noqa: E501 + + Last trading price # noqa: E501 + + :return: The last of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this DeliveryTicker. + + Last trading price # noqa: E501 + + :param last: The last of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._last = last + + @property + def change_percentage(self): + """Gets the change_percentage of this DeliveryTicker. # noqa: E501 + + Change percentage. # noqa: E501 + + :return: The change_percentage of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._change_percentage + + @change_percentage.setter + def change_percentage(self, change_percentage): + """Sets the change_percentage of this DeliveryTicker. + + Change percentage. # noqa: E501 + + :param change_percentage: The change_percentage of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._change_percentage = change_percentage + + @property + def total_size(self): + """Gets the total_size of this DeliveryTicker. # noqa: E501 + + Contract total size # noqa: E501 + + :return: The total_size of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._total_size + + @total_size.setter + def total_size(self, total_size): + """Sets the total_size of this DeliveryTicker. + + Contract total size # noqa: E501 + + :param total_size: The total_size of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._total_size = total_size + + @property + def low_24h(self): + """Gets the low_24h of this DeliveryTicker. # noqa: E501 + + Lowest trading price in recent 24h # noqa: E501 + + :return: The low_24h of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._low_24h + + @low_24h.setter + def low_24h(self, low_24h): + """Sets the low_24h of this DeliveryTicker. + + Lowest trading price in recent 24h # noqa: E501 + + :param low_24h: The low_24h of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._low_24h = low_24h + + @property + def high_24h(self): + """Gets the high_24h of this DeliveryTicker. # noqa: E501 + + Highest trading price in recent 24h # noqa: E501 + + :return: The high_24h of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._high_24h + + @high_24h.setter + def high_24h(self, high_24h): + """Sets the high_24h of this DeliveryTicker. + + Highest trading price in recent 24h # noqa: E501 + + :param high_24h: The high_24h of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._high_24h = high_24h + + @property + def volume_24h(self): + """Gets the volume_24h of this DeliveryTicker. # noqa: E501 + + Trade size in recent 24h # noqa: E501 + + :return: The volume_24h of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h + + @volume_24h.setter + def volume_24h(self, volume_24h): + """Sets the volume_24h of this DeliveryTicker. + + Trade size in recent 24h # noqa: E501 + + :param volume_24h: The volume_24h of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._volume_24h = volume_24h + + @property + def volume_24h_btc(self): + """Gets the volume_24h_btc of this DeliveryTicker. # noqa: E501 + + Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :return: The volume_24h_btc of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_btc + + @volume_24h_btc.setter + def volume_24h_btc(self, volume_24h_btc): + """Sets the volume_24h_btc of this DeliveryTicker. + + Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :param volume_24h_btc: The volume_24h_btc of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_btc = volume_24h_btc + + @property + def volume_24h_usd(self): + """Gets the volume_24h_usd of this DeliveryTicker. # noqa: E501 + + Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :return: The volume_24h_usd of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_usd + + @volume_24h_usd.setter + def volume_24h_usd(self, volume_24h_usd): + """Sets the volume_24h_usd of this DeliveryTicker. + + Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + + :param volume_24h_usd: The volume_24h_usd of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_usd = volume_24h_usd + + @property + def volume_24h_base(self): + """Gets the volume_24h_base of this DeliveryTicker. # noqa: E501 + + Trade volume in recent 24h, in base currency # noqa: E501 + + :return: The volume_24h_base of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_base + + @volume_24h_base.setter + def volume_24h_base(self, volume_24h_base): + """Sets the volume_24h_base of this DeliveryTicker. + + Trade volume in recent 24h, in base currency # noqa: E501 + + :param volume_24h_base: The volume_24h_base of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_base = volume_24h_base + + @property + def volume_24h_quote(self): + """Gets the volume_24h_quote of this DeliveryTicker. # noqa: E501 + + Trade volume in recent 24h, in quote currency # noqa: E501 + + :return: The volume_24h_quote of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_quote + + @volume_24h_quote.setter + def volume_24h_quote(self, volume_24h_quote): + """Sets the volume_24h_quote of this DeliveryTicker. + + Trade volume in recent 24h, in quote currency # noqa: E501 + + :param volume_24h_quote: The volume_24h_quote of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_quote = volume_24h_quote + + @property + def volume_24h_settle(self): + """Gets the volume_24h_settle of this DeliveryTicker. # noqa: E501 + + Trade volume in recent 24h, in settle currency # noqa: E501 + + :return: The volume_24h_settle of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._volume_24h_settle + + @volume_24h_settle.setter + def volume_24h_settle(self, volume_24h_settle): + """Sets the volume_24h_settle of this DeliveryTicker. + + Trade volume in recent 24h, in settle currency # noqa: E501 + + :param volume_24h_settle: The volume_24h_settle of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._volume_24h_settle = volume_24h_settle + + @property + def mark_price(self): + """Gets the mark_price of this DeliveryTicker. # noqa: E501 + + Recent mark price # noqa: E501 + + :return: The mark_price of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this DeliveryTicker. + + Recent mark price # noqa: E501 + + :param mark_price: The mark_price of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._mark_price = mark_price + + @property + def funding_rate(self): + """Gets the funding_rate of this DeliveryTicker. # noqa: E501 + + Funding rate # noqa: E501 + + :return: The funding_rate of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._funding_rate + + @funding_rate.setter + def funding_rate(self, funding_rate): + """Sets the funding_rate of this DeliveryTicker. + + Funding rate # noqa: E501 + + :param funding_rate: The funding_rate of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._funding_rate = funding_rate + + @property + def funding_rate_indicative(self): + """Gets the funding_rate_indicative of this DeliveryTicker. # noqa: E501 + + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + + :return: The funding_rate_indicative of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._funding_rate_indicative + + @funding_rate_indicative.setter + def funding_rate_indicative(self, funding_rate_indicative): + """Sets the funding_rate_indicative of this DeliveryTicker. + + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + + :param funding_rate_indicative: The funding_rate_indicative of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._funding_rate_indicative = funding_rate_indicative + + @property + def index_price(self): + """Gets the index_price of this DeliveryTicker. # noqa: E501 + + Index price # noqa: E501 + + :return: The index_price of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._index_price + + @index_price.setter + def index_price(self, index_price): + """Sets the index_price of this DeliveryTicker. + + Index price # noqa: E501 + + :param index_price: The index_price of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._index_price = index_price + + @property + def quanto_base_rate(self): + """Gets the quanto_base_rate of this DeliveryTicker. # noqa: E501 + + Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501 + + :return: The quanto_base_rate of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._quanto_base_rate + + @quanto_base_rate.setter + def quanto_base_rate(self, quanto_base_rate): + """Sets the quanto_base_rate of this DeliveryTicker. + + Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types # noqa: E501 + + :param quanto_base_rate: The quanto_base_rate of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._quanto_base_rate = quanto_base_rate + + @property + def basis_rate(self): + """Gets the basis_rate of this DeliveryTicker. # noqa: E501 + + Basis rate # noqa: E501 + + :return: The basis_rate of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._basis_rate + + @basis_rate.setter + def basis_rate(self, basis_rate): + """Sets the basis_rate of this DeliveryTicker. + + Basis rate # noqa: E501 + + :param basis_rate: The basis_rate of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._basis_rate = basis_rate + + @property + def basis_value(self): + """Gets the basis_value of this DeliveryTicker. # noqa: E501 + + Basis value # noqa: E501 + + :return: The basis_value of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._basis_value + + @basis_value.setter + def basis_value(self, basis_value): + """Sets the basis_value of this DeliveryTicker. + + Basis value # noqa: E501 + + :param basis_value: The basis_value of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._basis_value = basis_value + + @property + def lowest_ask(self): + """Gets the lowest_ask of this DeliveryTicker. # noqa: E501 + + Recent lowest ask # noqa: E501 + + :return: The lowest_ask of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._lowest_ask + + @lowest_ask.setter + def lowest_ask(self, lowest_ask): + """Sets the lowest_ask of this DeliveryTicker. + + Recent lowest ask # noqa: E501 + + :param lowest_ask: The lowest_ask of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._lowest_ask = lowest_ask + + @property + def lowest_size(self): + """Gets the lowest_size of this DeliveryTicker. # noqa: E501 + + The latest seller's lowest price order quantity # noqa: E501 + + :return: The lowest_size of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._lowest_size + + @lowest_size.setter + def lowest_size(self, lowest_size): + """Sets the lowest_size of this DeliveryTicker. + + The latest seller's lowest price order quantity # noqa: E501 + + :param lowest_size: The lowest_size of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._lowest_size = lowest_size + + @property + def highest_bid(self): + """Gets the highest_bid of this DeliveryTicker. # noqa: E501 + + Recent highest bid # noqa: E501 + + :return: The highest_bid of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._highest_bid + + @highest_bid.setter + def highest_bid(self, highest_bid): + """Sets the highest_bid of this DeliveryTicker. + + Recent highest bid # noqa: E501 + + :param highest_bid: The highest_bid of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._highest_bid = highest_bid + + @property + def highest_size(self): + """Gets the highest_size of this DeliveryTicker. # noqa: E501 + + The latest buyer's highest price order volume # noqa: E501 + + :return: The highest_size of this DeliveryTicker. # noqa: E501 + :rtype: str + """ + return self._highest_size + + @highest_size.setter + def highest_size(self, highest_size): + """Sets the highest_size of this DeliveryTicker. + + The latest buyer's highest price order volume # noqa: E501 + + :param highest_size: The highest_size of this DeliveryTicker. # noqa: E501 + :type: str + """ + + self._highest_size = highest_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeliveryTicker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeliveryTicker): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py index 9601ce8..3e09d33 100644 --- a/gate_api/models/deposit_address.py +++ b/gate_api/models/deposit_address.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py index 0112725..9d9a997 100644 --- a/gate_api/models/deposit_record.py +++ b/gate_api/models/deposit_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py index f6b5a2f..7b7ec9d 100644 --- a/gate_api/models/dual_get_orders.py +++ b/gate_api/models/dual_get_orders.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py index e1319ed..7ca3655 100644 --- a/gate_api/models/dual_get_plans.py +++ b/gate_api/models/dual_get_plans.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py index 3e78f7c..f601981 100644 --- a/gate_api/models/eth2_rate_list.py +++ b/gate_api/models/eth2_rate_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py index 23a2a8e..dbc1701 100644 --- a/gate_api/models/eth2_swap.py +++ b/gate_api/models/eth2_swap.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py index fe52683..0365efa 100644 --- a/gate_api/models/flash_swap_currency_pair.py +++ b/gate_api/models/flash_swap_currency_pair.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py index e50d55f..20ba6d5 100644 --- a/gate_api/models/flash_swap_order.py +++ b/gate_api/models/flash_swap_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py index b0e582c..eca5c3c 100644 --- a/gate_api/models/flash_swap_order_preview.py +++ b/gate_api/models/flash_swap_order_preview.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py index 7ce00f8..157eb1c 100644 --- a/gate_api/models/flash_swap_order_request.py +++ b/gate_api/models/flash_swap_order_request.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py index 1905832..c7323c2 100644 --- a/gate_api/models/flash_swap_preview_request.py +++ b/gate_api/models/flash_swap_preview_request.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py index 19cbfb6..2fbe907 100644 --- a/gate_api/models/funding_account.py +++ b/gate_api/models/funding_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py index 840509d..731975f 100644 --- a/gate_api/models/funding_rate_record.py +++ b/gate_api/models/funding_rate_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py index 836de56..630ed67 100644 --- a/gate_api/models/future_cancel_order_result.py +++ b/gate_api/models/future_cancel_order_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py index e1a6095..dcca681 100644 --- a/gate_api/models/futures_account.py +++ b/gate_api/models/futures_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py index 558f5e9..5427c99 100644 --- a/gate_api/models/futures_account_book.py +++ b/gate_api/models/futures_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py index 86fa0c3..28bcaa5 100644 --- a/gate_api/models/futures_account_history.py +++ b/gate_api/models/futures_account_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py index 2a70fbf..74e61ee 100644 --- a/gate_api/models/futures_auto_deleverage.py +++ b/gate_api/models/futures_auto_deleverage.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py index a421bca..afba007 100644 --- a/gate_api/models/futures_batch_amend_order_request.py +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py index 70af555..76be842 100644 --- a/gate_api/models/futures_candlestick.py +++ b/gate_api/models/futures_candlestick.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py index a05f42e..d06684f 100644 --- a/gate_api/models/futures_fee.py +++ b/gate_api/models/futures_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py index d0a158d..a9ae015 100644 --- a/gate_api/models/futures_index_constituents.py +++ b/gate_api/models/futures_index_constituents.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py index ff355ca..498ae76 100644 --- a/gate_api/models/futures_initial_order.py +++ b/gate_api/models/futures_initial_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py index 6afde67..05ee4ee 100644 --- a/gate_api/models/futures_limit_risk_tiers.py +++ b/gate_api/models/futures_limit_risk_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py index 50ded5d..e289507 100644 --- a/gate_api/models/futures_liq_order.py +++ b/gate_api/models/futures_liq_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py index 99727e4..1af57ee 100644 --- a/gate_api/models/futures_liquidate.py +++ b/gate_api/models/futures_liquidate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index 01811aa..c9438fd 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -621,7 +621,7 @@ def fill_price(self, fill_price): def text(self): """Gets the text of this FuturesOrder. # noqa: E501 - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance # noqa: E501 + Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-xxx: a. Liquidation under the classic account’s new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-xxx: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 :return: The text of this FuturesOrder. # noqa: E501 :rtype: str @@ -632,7 +632,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesOrder. - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: ⽼Classic mode position forced closing - liq-xxx: a. The new classic model of forced closing positions, including position-by-position, one-way full position, and two-way full position non-held position. b. The unified account single currency margin model of forced closing positions by position - hedge-liq-xxx: New classic model two-way full position hedging part of forced closing, that is, close long and short positions at the same time - pm_liquidate: Unified account cross-currency margin model for forced closing positions - cob_margin_liquidate: Unified account combination margin model for forced closing position - scm_liquidate: Unified account single currency margin mode position forced closing - insurance: insurance # noqa: E501 + Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-xxx: a. Liquidation under the classic account’s new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-xxx: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 :param text: The text of this FuturesOrder. # noqa: E501 :type: str diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py index d50351e..b571efe 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py index 31fb88a..3c7770f 100644 --- a/gate_api/models/futures_order_book.py +++ b/gate_api/models/futures_order_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py index 365905c..61f5d19 100644 --- a/gate_api/models/futures_order_book_item.py +++ b/gate_api/models/futures_order_book_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py index 9552be5..5f8a66f 100644 --- a/gate_api/models/futures_premium_index.py +++ b/gate_api/models/futures_premium_index.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py index 89b9d36..1e14afa 100644 --- a/gate_api/models/futures_price_trigger.py +++ b/gate_api/models/futures_price_trigger.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index 09a9106..2d33599 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py index a4b8467..6a5bd18 100644 --- a/gate_api/models/futures_ticker.py +++ b/gate_api/models/futures_ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -50,8 +50,6 @@ class FuturesTicker(object): 'funding_rate_indicative': 'str', 'index_price': 'str', 'quanto_base_rate': 'str', - 'basis_rate': 'str', - 'basis_value': 'str', 'lowest_ask': 'str', 'lowest_size': 'str', 'highest_bid': 'str', @@ -76,16 +74,14 @@ class FuturesTicker(object): 'funding_rate_indicative': 'funding_rate_indicative', 'index_price': 'index_price', 'quanto_base_rate': 'quanto_base_rate', - 'basis_rate': 'basis_rate', - 'basis_value': 'basis_value', 'lowest_ask': 'lowest_ask', 'lowest_size': 'lowest_size', 'highest_bid': 'highest_bid', 'highest_size': 'highest_size' } - def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, basis_rate=None, basis_value=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, 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 """FuturesTicker - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -108,8 +104,6 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= self._funding_rate_indicative = None self._index_price = None self._quanto_base_rate = None - self._basis_rate = None - self._basis_value = None self._lowest_ask = None self._lowest_size = None self._highest_bid = None @@ -150,10 +144,6 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= self.index_price = index_price if quanto_base_rate is not None: self.quanto_base_rate = quanto_base_rate - if basis_rate is not None: - self.basis_rate = basis_rate - if basis_value is not None: - self.basis_value = basis_value if lowest_ask is not None: self.lowest_ask = lowest_ask if lowest_size is not None: @@ -554,52 +544,6 @@ def quanto_base_rate(self, quanto_base_rate): self._quanto_base_rate = quanto_base_rate - @property - def basis_rate(self): - """Gets the basis_rate of this FuturesTicker. # noqa: E501 - - Basis rate # noqa: E501 - - :return: The basis_rate of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._basis_rate - - @basis_rate.setter - def basis_rate(self, basis_rate): - """Sets the basis_rate of this FuturesTicker. - - Basis rate # noqa: E501 - - :param basis_rate: The basis_rate of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._basis_rate = basis_rate - - @property - def basis_value(self): - """Gets the basis_value of this FuturesTicker. # noqa: E501 - - Basis value # noqa: E501 - - :return: The basis_value of this FuturesTicker. # noqa: E501 - :rtype: str - """ - return self._basis_value - - @basis_value.setter - def basis_value(self, basis_value): - """Sets the basis_value of this FuturesTicker. - - Basis value # noqa: E501 - - :param basis_value: The basis_value of this FuturesTicker. # noqa: E501 - :type: str - """ - - self._basis_value = basis_value - @property def lowest_ask(self): """Gets the lowest_ask of this FuturesTicker. # noqa: E501 diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py index c28ab4e..4ee47fd 100644 --- a/gate_api/models/futures_trade.py +++ b/gate_api/models/futures_trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py index fff7594..ece1741 100644 --- a/gate_api/models/index_constituent.py +++ b/gate_api/models/index_constituent.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_object.py b/gate_api/models/inline_object.py index 7e83658..2993042 100644 --- a/gate_api/models/inline_object.py +++ b/gate_api/models/inline_object.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py index 3b33b35..b2a3e9a 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py index ac2ace6..873dad7 100644 --- a/gate_api/models/insurance_record.py +++ b/gate_api/models/insurance_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py index fead07b..e7a5398 100644 --- a/gate_api/models/ledger_record.py +++ b/gate_api/models/ledger_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py index 08b3ae6..8bd7c2f 100644 --- a/gate_api/models/liquidate_order.py +++ b/gate_api/models/liquidate_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py index f805980..3e2a4a7 100644 --- a/gate_api/models/margin_account.py +++ b/gate_api/models/margin_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py index 044bd9a..ed7f926 100644 --- a/gate_api/models/margin_account_book.py +++ b/gate_api/models/margin_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py index 7c727fd..4ffd56d 100644 --- a/gate_api/models/margin_account_currency.py +++ b/gate_api/models/margin_account_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py index 7628994..42f67f7 100644 --- a/gate_api/models/margin_leverage_tier.py +++ b/gate_api/models/margin_leverage_tier.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py index b8c8dda..22c1208 100644 --- a/gate_api/models/margin_market_leverage.py +++ b/gate_api/models/margin_market_leverage.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py index 7ba2e3b..5246158 100644 --- a/gate_api/models/margin_tiers.py +++ b/gate_api/models/margin_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py index 475eb4a..5c1a0ef 100644 --- a/gate_api/models/margin_transferable.py +++ b/gate_api/models/margin_transferable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py index 308cd25..cf26283 100644 --- a/gate_api/models/max_uni_borrowable.py +++ b/gate_api/models/max_uni_borrowable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py index 7686660..3946d72 100644 --- a/gate_api/models/mock_futures_order.py +++ b/gate_api/models/mock_futures_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py index c6e645c..2432c73 100644 --- a/gate_api/models/mock_futures_position.py +++ b/gate_api/models/mock_futures_position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py index 232b895..73879e8 100644 --- a/gate_api/models/mock_margin_result.py +++ b/gate_api/models/mock_margin_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py index 4c9548e..a122c78 100644 --- a/gate_api/models/mock_options_order.py +++ b/gate_api/models/mock_options_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py index 79b310d..2ee7ca4 100644 --- a/gate_api/models/mock_options_position.py +++ b/gate_api/models/mock_options_position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py index 4c32074..aa53d7c 100644 --- a/gate_api/models/mock_risk_unit.py +++ b/gate_api/models/mock_risk_unit.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py index a5b3c90..8a0d6c3 100644 --- a/gate_api/models/mock_spot_balance.py +++ b/gate_api/models/mock_spot_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py index 94ee0e6..fae9295 100644 --- a/gate_api/models/mock_spot_order.py +++ b/gate_api/models/mock_spot_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py index b8731b1..c8cb099 100644 --- a/gate_api/models/multi_chain_address_item.py +++ b/gate_api/models/multi_chain_address_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py index a350a96..ea78d2e 100644 --- a/gate_api/models/multi_collateral_currency.py +++ b/gate_api/models/multi_collateral_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py index ddc6772..a4cb3cb 100644 --- a/gate_api/models/multi_collateral_item.py +++ b/gate_api/models/multi_collateral_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py index 514007b..3a6f4a6 100644 --- a/gate_api/models/multi_collateral_order.py +++ b/gate_api/models/multi_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py index e9f621d..e46aa11 100644 --- a/gate_api/models/multi_collateral_record.py +++ b/gate_api/models/multi_collateral_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py index 40ac61e..a915c5d 100644 --- a/gate_api/models/multi_collateral_record_currency.py +++ b/gate_api/models/multi_collateral_record_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py index d237838..9c406bf 100644 --- a/gate_api/models/multi_loan_item.py +++ b/gate_api/models/multi_loan_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py index 822936b..453192d 100644 --- a/gate_api/models/multi_loan_repay_item.py +++ b/gate_api/models/multi_loan_repay_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py index 9684714..fbf5c87 100644 --- a/gate_api/models/multi_repay_record.py +++ b/gate_api/models/multi_repay_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py index 75586d8..906a614 100644 --- a/gate_api/models/multi_repay_resp.py +++ b/gate_api/models/multi_repay_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py index 311039b..a9d7141 100644 --- a/gate_api/models/my_futures_trade.py +++ b/gate_api/models/my_futures_trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py index 58b5d4b..609edd2 100644 --- a/gate_api/models/my_futures_trade_time_range.py +++ b/gate_api/models/my_futures_trade_time_range.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py index 2b5d58c..74d8355 100644 --- a/gate_api/models/open_orders.py +++ b/gate_api/models/open_orders.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py index a3f2875..156a152 100644 --- a/gate_api/models/options_account.py +++ b/gate_api/models/options_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py index e843486..20b2cf5 100644 --- a/gate_api/models/options_account_book.py +++ b/gate_api/models/options_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py index 6a42d98..04bea96 100644 --- a/gate_api/models/options_candlestick.py +++ b/gate_api/models/options_candlestick.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py index 7338171..19594ae 100644 --- a/gate_api/models/options_contract.py +++ b/gate_api/models/options_contract.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py index 6cace49..8ce85a9 100644 --- a/gate_api/models/options_mmp.py +++ b/gate_api/models/options_mmp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py index 5e3583a..c258eac 100644 --- a/gate_api/models/options_mmp_reset.py +++ b/gate_api/models/options_mmp_reset.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py index f1eb838..cba1071 100644 --- a/gate_api/models/options_my_settlements.py +++ b/gate_api/models/options_my_settlements.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py index 1da411f..4f40269 100644 --- a/gate_api/models/options_my_trade.py +++ b/gate_api/models/options_my_trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py index d3306f3..315ae97 100644 --- a/gate_api/models/options_order.py +++ b/gate_api/models/options_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py index b1465be..fb58b31 100644 --- a/gate_api/models/options_position.py +++ b/gate_api/models/options_position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py index be9d2eb..5575dbe 100644 --- a/gate_api/models/options_position_close.py +++ b/gate_api/models/options_position_close.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py index 01f5dc7..9f9ad27 100644 --- a/gate_api/models/options_position_close_order.py +++ b/gate_api/models/options_position_close_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py index c82e5d6..12980e3 100644 --- a/gate_api/models/options_settlement.py +++ b/gate_api/models/options_settlement.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py index 2369175..2a7edc9 100644 --- a/gate_api/models/options_ticker.py +++ b/gate_api/models/options_ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py index f150247..5a3c33d 100644 --- a/gate_api/models/options_underlying.py +++ b/gate_api/models/options_underlying.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py index df43bcb..26ab38a 100644 --- a/gate_api/models/options_underlying_ticker.py +++ b/gate_api/models/options_underlying_ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order.py b/gate_api/models/order.py index 0f7bfd8..04ffa8a 100644 --- a/gate_api/models/order.py +++ b/gate_api/models/order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py index c554292..00b3b39 100644 --- a/gate_api/models/order_book.py +++ b/gate_api/models/order_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py index 53343cd..2455e87 100644 --- a/gate_api/models/order_cancel.py +++ b/gate_api/models/order_cancel.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py index 098f7eb..4987b8b 100644 --- a/gate_api/models/order_patch.py +++ b/gate_api/models/order_patch.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py index 73a0d80..33daa46 100644 --- a/gate_api/models/order_resp.py +++ b/gate_api/models/order_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py index 2a39879..4a25646 100644 --- a/gate_api/models/partner_commission_history.py +++ b/gate_api/models/partner_commission_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py index e908461..0105741 100644 --- a/gate_api/models/partner_sub.py +++ b/gate_api/models/partner_sub.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py index 735084d..41304a0 100644 --- a/gate_api/models/partner_sub_list.py +++ b/gate_api/models/partner_sub_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py index 50cc3c8..4d6d183 100644 --- a/gate_api/models/partner_transaction_history.py +++ b/gate_api/models/partner_transaction_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py index dba7451..746dea4 100644 --- a/gate_api/models/patch_uni_lend.py +++ b/gate_api/models/patch_uni_lend.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py index 24968d5..d35eead 100644 --- a/gate_api/models/place_dual_investment_order.py +++ b/gate_api/models/place_dual_investment_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -34,39 +34,29 @@ class PlaceDualInvestmentOrder(object): """ openapi_types = { 'plan_id': 'str', - 'copies': 'str', - 'is_max': 'int', 'amount': 'str', 'text': 'str' } attribute_map = { 'plan_id': 'plan_id', - 'copies': 'copies', - 'is_max': 'is_max', 'amount': 'amount', 'text': 'text' } - def __init__(self, plan_id=None, copies=None, is_max=None, amount=None, text=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, int, str, str, Configuration) -> None + def __init__(self, plan_id=None, amount=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, Configuration) -> None """PlaceDualInvestmentOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._plan_id = None - self._copies = None - self._is_max = None self._amount = None self._text = None self.discriminator = None self.plan_id = plan_id - if copies is not None: - self.copies = copies - if is_max is not None: - self.is_max = is_max self.amount = amount if text is not None: self.text = text @@ -96,52 +86,6 @@ def plan_id(self, plan_id): self._plan_id = plan_id - @property - def copies(self): - """Gets the copies of this PlaceDualInvestmentOrder. # noqa: E501 - - The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. # 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. - - The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 - - :param copies: The copies of this PlaceDualInvestmentOrder. # noqa: E501 - :type: str - """ - - self._copies = copies - - @property - def is_max(self): - """Gets the is_max of this PlaceDualInvestmentOrder. # noqa: E501 - - Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 - - :return: The is_max of this PlaceDualInvestmentOrder. # noqa: E501 - :rtype: int - """ - return self._is_max - - @is_max.setter - def is_max(self, is_max): - """Sets the is_max of this PlaceDualInvestmentOrder. - - Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. # noqa: E501 - - :param is_max: The is_max of this PlaceDualInvestmentOrder. # noqa: E501 - :type: int - """ - - self._is_max = is_max - @property def amount(self): """Gets the amount of this PlaceDualInvestmentOrder. # noqa: E501 diff --git a/gate_api/models/position.py b/gate_api/models/position.py index 0c4d905..988a83d 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py index cdca838..a04a97e 100644 --- a/gate_api/models/position_close.py +++ b/gate_api/models/position_close.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py index c4a4bd3..c9039cd 100644 --- a/gate_api/models/position_close_order.py +++ b/gate_api/models/position_close_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py index d433429..075bf61 100644 --- a/gate_api/models/profit_loss_range.py +++ b/gate_api/models/profit_loss_range.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py index 44680a5..8167171 100644 --- a/gate_api/models/rebate_user_info.py +++ b/gate_api/models/rebate_user_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py index e1d0c9d..854f316 100644 --- a/gate_api/models/repay_currency_res.py +++ b/gate_api/models/repay_currency_res.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py index b60f41e..d518e47 100644 --- a/gate_api/models/repay_loan.py +++ b/gate_api/models/repay_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py index 086aee9..d308f41 100644 --- a/gate_api/models/repay_multi_loan.py +++ b/gate_api/models/repay_multi_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py index 048d0e8..c1670ae 100644 --- a/gate_api/models/repay_record.py +++ b/gate_api/models/repay_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py index 7e78118..56f2e88 100644 --- a/gate_api/models/repay_record_currency.py +++ b/gate_api/models/repay_record_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py index ee3603e..83f2005 100644 --- a/gate_api/models/repay_record_left_interest.py +++ b/gate_api/models/repay_record_left_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py index e9283cb..33e0709 100644 --- a/gate_api/models/repay_record_repaid_currency.py +++ b/gate_api/models/repay_record_repaid_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py index 96e8c21..880dc16 100644 --- a/gate_api/models/repay_record_total_interest.py +++ b/gate_api/models/repay_record_total_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py index 498e604..eeed503 100644 --- a/gate_api/models/repay_resp.py +++ b/gate_api/models/repay_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py index 041184a..b7ba96e 100644 --- a/gate_api/models/risk_units.py +++ b/gate_api/models/risk_units.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py index e5abe91..4a21db0 100644 --- a/gate_api/models/saved_address.py +++ b/gate_api/models/saved_address.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py index 3aa0ec8..1022115 100644 --- a/gate_api/models/small_balance.py +++ b/gate_api/models/small_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py index d770b75..449f203 100644 --- a/gate_api/models/small_balance_history.py +++ b/gate_api/models/small_balance_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py index 42601bf..c14e3ae 100644 --- a/gate_api/models/spot_account.py +++ b/gate_api/models/spot_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -36,20 +36,18 @@ class SpotAccount(object): 'currency': 'str', 'available': 'str', 'locked': 'str', - 'update_id': 'int', - 'refresh_time': 'int' + 'update_id': 'int' } attribute_map = { 'currency': 'currency', 'available': 'available', 'locked': 'locked', - 'update_id': 'update_id', - 'refresh_time': 'refresh_time' + 'update_id': 'update_id' } - def __init__(self, currency=None, available=None, locked=None, update_id=None, refresh_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, int, int, Configuration) -> None + 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() @@ -59,7 +57,6 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, r self._available = None self._locked = None self._update_id = None - self._refresh_time = None self.discriminator = None if currency is not None: @@ -70,8 +67,6 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, r self.locked = locked if update_id is not None: self.update_id = update_id - if refresh_time is not None: - self.refresh_time = refresh_time @property def currency(self): @@ -165,29 +160,6 @@ def update_id(self, update_id): self._update_id = update_id - @property - def refresh_time(self): - """Gets the refresh_time of this SpotAccount. # noqa: E501 - - Asset Refresh Time (ms) # noqa: E501 - - :return: The refresh_time of this SpotAccount. # noqa: E501 - :rtype: int - """ - return self._refresh_time - - @refresh_time.setter - def refresh_time(self, refresh_time): - """Sets the refresh_time of this SpotAccount. - - Asset Refresh Time (ms) # noqa: E501 - - :param refresh_time: The refresh_time of this SpotAccount. # noqa: E501 - :type: int - """ - - self._refresh_time = refresh_time - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py index 4dea7cd..b31c625 100644 --- a/gate_api/models/spot_account_book.py +++ b/gate_api/models/spot_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py index 7e9773b..317494d 100644 --- a/gate_api/models/spot_currency_chain.py +++ b/gate_api/models/spot_currency_chain.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py index 9f0308b..6fddcb7 100644 --- a/gate_api/models/spot_fee.py +++ b/gate_api/models/spot_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py index 8f6d141..3802bb8 100644 --- a/gate_api/models/spot_insurance_history.py +++ b/gate_api/models/spot_insurance_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py index ba0deed..e1fbc64 100644 --- a/gate_api/models/spot_price_put_order.py +++ b/gate_api/models/spot_price_put_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py index 41f2447..888d766 100644 --- a/gate_api/models/spot_price_trigger.py +++ b/gate_api/models/spot_price_trigger.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py index 36d9bfe..a803bbf 100644 --- a/gate_api/models/spot_price_triggered_order.py +++ b/gate_api/models/spot_price_triggered_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py index 70da380..58e2b97 100644 --- a/gate_api/models/stp_group.py +++ b/gate_api/models/stp_group.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py index 776f7b2..9146866 100644 --- a/gate_api/models/stp_group_user.py +++ b/gate_api/models/stp_group_user.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py index 4c495b1..08cfd6c 100644 --- a/gate_api/models/structured_buy.py +++ b/gate_api/models/structured_buy.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py index a051a06..b0d6001 100644 --- a/gate_api/models/structured_get_project_list.py +++ b/gate_api/models/structured_get_project_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py index 43911a9..167d45d 100644 --- a/gate_api/models/structured_order_list.py +++ b/gate_api/models/structured_order_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py index f94b684..1855685 100644 --- a/gate_api/models/sub_account.py +++ b/gate_api/models/sub_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py index 4f321cc..fac0f54 100644 --- a/gate_api/models/sub_account_balance.py +++ b/gate_api/models/sub_account_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py index cfb4539..41d0a80 100644 --- a/gate_api/models/sub_account_cross_margin_balance.py +++ b/gate_api/models/sub_account_cross_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py index 24b1e2b..137dac4 100644 --- a/gate_api/models/sub_account_futures_balance.py +++ b/gate_api/models/sub_account_futures_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py index b2b2bae..ac86f85 100644 --- a/gate_api/models/sub_account_key.py +++ b/gate_api/models/sub_account_key.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py index f989ba7..6b309fd 100644 --- a/gate_api/models/sub_account_key_perms.py +++ b/gate_api/models/sub_account_key_perms.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py index bb0edf3..efdc5aa 100644 --- a/gate_api/models/sub_account_margin_balance.py +++ b/gate_api/models/sub_account_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py index 3880810..b2cca71 100644 --- a/gate_api/models/sub_account_to_sub_account.py +++ b/gate_api/models/sub_account_to_sub_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py index 0497ece..aef2e8c 100644 --- a/gate_api/models/sub_account_transfer.py +++ b/gate_api/models/sub_account_transfer.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py index 4678b68..d207a72 100644 --- a/gate_api/models/sub_cross_margin_account.py +++ b/gate_api/models/sub_cross_margin_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py index 8253743..9872c47 100644 --- a/gate_api/models/sub_user_mode.py +++ b/gate_api/models/sub_user_mode.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py index 570a069..c3d4893 100644 --- a/gate_api/models/system_time.py +++ b/gate_api/models/system_time.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py index 32a0666..df8cd3d 100644 --- a/gate_api/models/ticker.py +++ b/gate_api/models/ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py index 0adc29b..77383c5 100644 --- a/gate_api/models/total_balance.py +++ b/gate_api/models/total_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py index cffe9a0..37ba1e4 100644 --- a/gate_api/models/trade.py +++ b/gate_api/models/trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py index 47b0c08..3ccbbcb 100644 --- a/gate_api/models/trade_fee.py +++ b/gate_api/models/trade_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py index 8b3da4d..e7b27e0 100644 --- a/gate_api/models/transaction_id.py +++ b/gate_api/models/transaction_id.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py index 0e49717..0ee973d 100644 --- a/gate_api/models/transfer.py +++ b/gate_api/models/transfer.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py index e086de6..c6b58d0 100644 --- a/gate_api/models/transfer_order_status.py +++ b/gate_api/models/transfer_order_status.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py index 4676e0f..99a9d9c 100644 --- a/gate_api/models/transferables_result.py +++ b/gate_api/models/transferables_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py index 4681081..9f1bfbb 100644 --- a/gate_api/models/trigger_order_response.py +++ b/gate_api/models/trigger_order_response.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py index d8d64f3..c353483 100644 --- a/gate_api/models/trigger_time.py +++ b/gate_api/models/trigger_time.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py index ff523de..22fd014 100644 --- a/gate_api/models/uid_push_order.py +++ b/gate_api/models/uid_push_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py index 20cc498..141366f 100644 --- a/gate_api/models/uid_push_withdrawal.py +++ b/gate_api/models/uid_push_withdrawal.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py index 8ca17ee..18cfbbf 100644 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py index df2d2b5..eab3946 100644 --- a/gate_api/models/uni_currency.py +++ b/gate_api/models/uni_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py index fc5b64b..e7e16e1 100644 --- a/gate_api/models/uni_currency_interest.py +++ b/gate_api/models/uni_currency_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py index 226fa8e..4230745 100644 --- a/gate_api/models/uni_currency_pair.py +++ b/gate_api/models/uni_currency_pair.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_interest_mode.py b/gate_api/models/uni_interest_mode.py index 56ec36f..d59ee73 100644 --- a/gate_api/models/uni_interest_mode.py +++ b/gate_api/models/uni_interest_mode.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py index 1fcf11e..6f72aeb 100644 --- a/gate_api/models/uni_interest_record.py +++ b/gate_api/models/uni_interest_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py index 0e2be68..2ab0e21 100644 --- a/gate_api/models/uni_lend.py +++ b/gate_api/models/uni_lend.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py index ccbfa43..af24f4d 100644 --- a/gate_api/models/uni_lend_interest.py +++ b/gate_api/models/uni_lend_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py index 14095af..33beb51 100644 --- a/gate_api/models/uni_lend_record.py +++ b/gate_api/models/uni_lend_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py index 0ae80fd..05602ec 100644 --- a/gate_api/models/uni_loan.py +++ b/gate_api/models/uni_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py index 2327f01..8692fe7 100644 --- a/gate_api/models/uni_loan_interest_record.py +++ b/gate_api/models/uni_loan_interest_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py index 900a247..4e66127 100644 --- a/gate_api/models/uni_loan_record.py +++ b/gate_api/models/uni_loan_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index 3ae2673..647938b 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index e92f393..dfe2d2e 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py index d61ad46..8d0f838 100644 --- a/gate_api/models/unified_borrowable.py +++ b/gate_api/models/unified_borrowable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/unified_borrowable1.py index 34e43cf..0030d15 100644 --- a/gate_api/models/unified_borrowable1.py +++ b/gate_api/models/unified_borrowable1.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py index c32a202..8f244ee 100644 --- a/gate_api/models/unified_currency.py +++ b/gate_api/models/unified_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py index 4c608ee..284b118 100644 --- a/gate_api/models/unified_discount.py +++ b/gate_api/models/unified_discount.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py index 524f165..7aabe4a 100644 --- a/gate_api/models/unified_discount_tiers.py +++ b/gate_api/models/unified_discount_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py index 70b0100..1678126 100644 --- a/gate_api/models/unified_history_loan_rate.py +++ b/gate_api/models/unified_history_loan_rate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py index 4099a31..33ff7ed 100644 --- a/gate_api/models/unified_history_loan_rate_rates.py +++ b/gate_api/models/unified_history_loan_rate_rates.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py index ce1c491..b1779d7 100644 --- a/gate_api/models/unified_leverage_config.py +++ b/gate_api/models/unified_leverage_config.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py index 849e7b2..5418cfc 100644 --- a/gate_api/models/unified_leverage_setting.py +++ b/gate_api/models/unified_leverage_setting.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py index c7a9e03..17bef51 100644 --- a/gate_api/models/unified_loan.py +++ b/gate_api/models/unified_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py index d3b1ef8..13f31e4 100644 --- a/gate_api/models/unified_loan_record.py +++ b/gate_api/models/unified_loan_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py index 7ecabfe..ae78012 100644 --- a/gate_api/models/unified_loan_result.py +++ b/gate_api/models/unified_loan_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py index 2cf4e6d..9983ac4 100644 --- a/gate_api/models/unified_margin_tiers.py +++ b/gate_api/models/unified_margin_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py index 41f6476..c230f30 100644 --- a/gate_api/models/unified_mode_set.py +++ b/gate_api/models/unified_mode_set.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py index 2cb0816..31af02b 100644 --- a/gate_api/models/unified_portfolio_input.py +++ b/gate_api/models/unified_portfolio_input.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py index cf656e4..21e1c97 100644 --- a/gate_api/models/unified_portfolio_output.py +++ b/gate_api/models/unified_portfolio_output.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py index df9d67c..bf4bb1c 100644 --- a/gate_api/models/unified_risk_units.py +++ b/gate_api/models/unified_risk_units.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py index a70dec2..106fd88 100644 --- a/gate_api/models/unified_settings.py +++ b/gate_api/models/unified_settings.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py index cfdb6ce..cf97142 100644 --- a/gate_api/models/unified_transferable.py +++ b/gate_api/models/unified_transferable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py index 579ed3d..45c8358 100644 --- a/gate_api/models/user_ltv_info.py +++ b/gate_api/models/user_ltv_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py index a43517d..9d2264a 100644 --- a/gate_api/models/user_sub.py +++ b/gate_api/models/user_sub.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py index 6f85275..291093a 100644 --- a/gate_api/models/user_sub_relation.py +++ b/gate_api/models/user_sub_relation.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py index 26a1bb3..0d681d4 100644 --- a/gate_api/models/user_total_amount.py +++ b/gate_api/models/user_total_amount.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py index b91f1ba..3228646 100644 --- a/gate_api/models/withdraw_status.py +++ b/gate_api/models/withdraw_status.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index 1d57e4b..323c70b 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -41,6 +41,7 @@ class WithdrawalRecord(object): 'amount': 'str', 'fee': 'str', 'currency': 'str', + 'address': 'str', 'fail_reason': 'str', 'timestamp2': 'str', 'memo': 'str', @@ -57,6 +58,7 @@ class WithdrawalRecord(object): 'amount': 'amount', 'fee': 'fee', 'currency': 'currency', + 'address': 'address', 'fail_reason': 'fail_reason', 'timestamp2': 'timestamp2', 'memo': 'memo', @@ -64,8 +66,8 @@ class WithdrawalRecord(object): 'chain': 'chain' } - def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None, timestamp=None, amount=None, fee=None, currency=None, fail_reason=None, timestamp2=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None, timestamp=None, amount=None, fee=None, currency=None, address=None, fail_reason=None, timestamp2=None, memo=None, status=None, chain=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None """WithdrawalRecord - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -79,6 +81,7 @@ def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None self._amount = None self._fee = None self._currency = None + self._address = None self._fail_reason = None self._timestamp2 = None self._memo = None @@ -100,6 +103,8 @@ def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None if fee is not None: self.fee = fee self.currency = currency + if address is not None: + self.address = address if fail_reason is not None: self.fail_reason = fail_reason if timestamp2 is not None: @@ -298,6 +303,29 @@ def currency(self, currency): self._currency = currency + @property + def address(self): + """Gets the address of this WithdrawalRecord. # noqa: E501 + + 提现地址 # noqa: E501 + + :return: The address of this WithdrawalRecord. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this WithdrawalRecord. + + 提现地址 # noqa: E501 + + :param address: The address of this WithdrawalRecord. # noqa: E501 + :type: str + """ + + self._address = address + @property def fail_reason(self): """Gets the fail_reason of this WithdrawalRecord. # noqa: E501 diff --git a/gate_api/rest.py b/gate_api/rest.py index 66d4dfc..41b28cb 100644 --- a/gate_api/rest.py +++ b/gate_api/rest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech diff --git a/setup.cfg b/setup.cfg index 4d8daf3..10e85f2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,7 +6,7 @@ classifiers: Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 -maintainer = gateio +maintainer = gate maintainer_email = dev@mail.gate.io [flake8] diff --git a/setup.py b/setup.py index cc35165..e74630b 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Generated by: https://openapi-generator.tech @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.97.2" +VERSION = "6.97.4" # To install the library, run the following # # python setup.py install From 2c73971c8b5eaf34310e546f7ebc74ba10fe66ca Mon Sep 17 00:00:00 2001 From: Gate <32661171+gateio@users.noreply.github.com> Date: Sat, 24 May 2025 21:31:04 +0800 Subject: [PATCH 05/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea297c1..e078bd0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - API version: 4.97.4 - Package version: 6.97.4 - Build package: org.openapitools.codegen.languages.PythonClientCodegen -For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) +For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) ## Versioning From 3f0158c0a7e7118ab4327d1d965039ae79f3af83 Mon Sep 17 00:00:00 2001 From: gateio Date: Wed, 4 Jun 2025 01:35:05 +0000 Subject: [PATCH 06/20] update to v6.98.0 --- README.md | 8 +- docs/CurrencyPair.md | 2 + docs/EarnUniApi.md | 70 +++++- docs/InlineResponse200.md | 2 +- docs/InlineResponse2001.md | 11 + docs/SubAccountTransfer.md | 13 +- docs/UnifiedApi.md | 13 +- docs/WithdrawalRecord.md | 2 +- gate_api/__init__.py | 3 +- gate_api/api/earn_uni_api.py | 109 +++++++++- gate_api/api/unified_api.py | 2 +- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 +- gate_api/models/__init__.py | 1 + gate_api/models/currency_pair.py | 64 +++++- gate_api/models/inline_response200.py | 30 +-- gate_api/models/inline_response2001.py | 149 +++++++++++++ gate_api/models/sub_account_transfer.py | 274 +++++++++++++----------- gate_api/models/withdrawal_record.py | 4 +- setup.py | 2 +- 20 files changed, 589 insertions(+), 176 deletions(-) create mode 100644 docs/InlineResponse2001.md create mode 100644 gate_api/models/inline_response2001.py diff --git a/README.md b/README.md index e078bd0..7dccb09 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,10 @@ APIv4 provides spot, margin and futures trading operations. There are public API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.97.4 -- Package version: 6.97.4 +- API version: 4.98.0 +- Package version: 6.98.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen -For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) +For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) ## Versioning @@ -117,6 +117,7 @@ Class | Method | HTTP request | Description *EarnUniApi* | [**switch_interest_reinvest**](docs/EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle *EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status *EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart +*EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate *MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets *MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market *MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate @@ -496,6 +497,7 @@ Class | Method | HTTP request | Description - [IndexConstituent](docs/IndexConstituent.md) - [InlineObject](docs/InlineObject.md) - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) - [InsuranceRecord](docs/InsuranceRecord.md) - [LedgerRecord](docs/LedgerRecord.md) - [LiquidateOrder](docs/LiquidateOrder.md) diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md index 10cea9c..8d4c3bd 100644 --- a/docs/CurrencyPair.md +++ b/docs/CurrencyPair.md @@ -19,7 +19,9 @@ Name | Type | Description | Notes **trade_status** | **str** | How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold | [optional] **sell_start** | **int** | Sell start unix timestamp in seconds | [optional] **buy_start** | **int** | Buy start unix timestamp in seconds | [optional] +**delisting_time** | **int** | Expected time to remove the shelves, Unix timestamp in seconds | [optional] **type** | **str** | Trading pair type, normal: normal, premarket: pre-market | [optional] +**trade_url** | **str** | Transaction link | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index e17df86..024f0a5 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -15,6 +15,7 @@ Method | HTTP request | Description [**switch_interest_reinvest**](EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle [**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status [**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart +[**list_uni_rate**](EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate # **list_uni_currencies** @@ -693,7 +694,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-23 13:32+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -757,7 +758,72 @@ Name | Type | Description | Notes ### 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-05-23 13:32+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@li.org> Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_uni_rate** +> list[InlineResponse2001] list_uni_rate() + +Currency estimate annualized interest rate + +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnUniApi(api_client) + +try: + # Currency estimate annualized interest rate + api_response = api_instance.list_uni_rate() + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnUniApi->list_uni_rate: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[InlineResponse2001]**](InlineResponse2001.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/InlineResponse200.md b/docs/InlineResponse200.md index 3ac1603..30030f5 100644 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **int** | | [optional] -**vaule** | **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/InlineResponse2001.md b/docs/InlineResponse2001.md new file mode 100644 index 0000000..31a5f58 --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,11 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | | [optional] +**est_rate** | **str** | Unconverted percentage | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md index 511b3d3..731f561 100644 --- a/docs/SubAccountTransfer.md +++ b/docs/SubAccountTransfer.md @@ -3,15 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Transfer currency name | +**timest** | **str** | Transfer timestamp | [optional] [readonly] +**uid** | **str** | Main account user ID | [optional] [readonly] **sub_account** | **str** | Sub account user ID | -**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | +**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] +**currency** | **str** | Transfer currency name | **amount** | **str** | Transfer amount | -**uid** | **str** | Main account user ID | [optional] [readonly] -**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] -**timest** | **str** | Transfer timestamp | [optional] [readonly] +**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | **source** | **str** | Where the operation is initiated from | [optional] [readonly] -**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] +**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] +**status** | **str** | Sub-account transfer record status, currently only success | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md index 8ac0611..c300e08 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -1360,23 +1360,14 @@ get historical lending rates ### 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) @@ -1412,7 +1403,7 @@ Name | Type | Description | Notes ### Authorization -[apiv4](../README.md#apiv4) +No authorization required ### HTTP request headers diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md index c75276e..cc72eb0 100644 --- a/docs/WithdrawalRecord.md +++ b/docs/WithdrawalRecord.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **amount** | **str** | Currency amount | **fee** | **str** | fee | [optional] [readonly] **currency** | **str** | Currency name | -**address** | **str** | 提现地址 | [optional] +**address** | **str** | Withdrawal address | [optional] **fail_reason** | **str** | The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty | [optional] **timestamp2** | **str** | The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success | [optional] **memo** | **str** | Additional remarks with regards to the withdrawal | [optional] diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 126e8d2..717ef13 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.97.4" +__version__ = "6.98.0" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi @@ -142,6 +142,7 @@ from gate_api.models.index_constituent import IndexConstituent from gate_api.models.inline_object import InlineObject from gate_api.models.inline_response200 import InlineResponse200 +from gate_api.models.inline_response2001 import InlineResponse2001 from gate_api.models.insurance_record import InsuranceRecord from gate_api.models.ledger_record import LedgerRecord from gate_api.models.liquidate_order import LiquidateOrder diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index d9bde6f..f1a6139 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1215,7 +1215,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-23 13:32+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1242,7 +1242,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-23 13:32+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1343,3 +1343,108 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + + def list_uni_rate(self, **kwargs): # noqa: E501 + """Currency estimate annualized interest rate # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_rate(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.InlineResponse2001] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_uni_rate_with_http_info(**kwargs) # noqa: E501 + + def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 + """Currency estimate annualized interest rate # noqa: E501 + + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_uni_rate_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.InlineResponse2001], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_uni_rate" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/uni/rate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InlineResponse2001]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index 50b5bb0..e139009 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -2447,7 +2447,7 @@ def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E50 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( '/unified/history_loan_rate', 'GET', diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 3947b87..276a669 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/6.97.4/python' + self.user_agent = 'OpenAPI-Generator/6.98.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 8049d18..5018433 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: 4.97.4\n"\ - "SDK Package Version: 6.97.4".\ + "Version of the API: 4.98.0\n"\ + "SDK Package Version: 6.98.0".\ 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 a3959cf..8390b27 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -112,6 +112,7 @@ from gate_api.models.index_constituent import IndexConstituent from gate_api.models.inline_object import InlineObject from gate_api.models.inline_response200 import InlineResponse200 +from gate_api.models.inline_response2001 import InlineResponse2001 from gate_api.models.insurance_record import InsuranceRecord from gate_api.models.ledger_record import LedgerRecord from gate_api.models.liquidate_order import LiquidateOrder diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index fe291f8..328e83c 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -48,7 +48,9 @@ class CurrencyPair(object): 'trade_status': 'str', 'sell_start': 'int', 'buy_start': 'int', - 'type': 'str' + 'delisting_time': 'int', + 'type': 'str', + 'trade_url': 'str' } attribute_map = { @@ -67,11 +69,13 @@ class CurrencyPair(object): 'trade_status': 'trade_status', 'sell_start': 'sell_start', 'buy_start': 'buy_start', - 'type': 'type' + 'delisting_time': 'delisting_time', + 'type': 'type', + 'trade_url': 'trade_url' } - def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=None, fee=None, min_base_amount=None, min_quote_amount=None, max_base_amount=None, max_quote_amount=None, amount_precision=None, precision=None, trade_status=None, sell_start=None, buy_start=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, int, int, str, int, int, str, Configuration) -> None + def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=None, fee=None, min_base_amount=None, min_quote_amount=None, max_base_amount=None, max_quote_amount=None, amount_precision=None, precision=None, trade_status=None, sell_start=None, buy_start=None, delisting_time=None, type=None, trade_url=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, int, int, str, int, int, int, str, str, Configuration) -> None """CurrencyPair - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -92,7 +96,9 @@ def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=No self._trade_status = None self._sell_start = None self._buy_start = None + self._delisting_time = None self._type = None + self._trade_url = None self.discriminator = None if id is not None: @@ -125,8 +131,12 @@ def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=No self.sell_start = sell_start if buy_start is not None: self.buy_start = buy_start + if delisting_time is not None: + self.delisting_time = delisting_time if type is not None: self.type = type + if trade_url is not None: + self.trade_url = trade_url @property def id(self): @@ -479,6 +489,29 @@ def buy_start(self, buy_start): self._buy_start = buy_start + @property + def delisting_time(self): + """Gets the delisting_time of this CurrencyPair. # noqa: E501 + + Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501 + + :return: The delisting_time of this CurrencyPair. # noqa: E501 + :rtype: int + """ + return self._delisting_time + + @delisting_time.setter + def delisting_time(self, delisting_time): + """Sets the delisting_time of this CurrencyPair. + + Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501 + + :param delisting_time: The delisting_time of this CurrencyPair. # noqa: E501 + :type: int + """ + + self._delisting_time = delisting_time + @property def type(self): """Gets the type of this CurrencyPair. # noqa: E501 @@ -502,6 +535,29 @@ def type(self, type): self._type = type + @property + def trade_url(self): + """Gets the trade_url of this CurrencyPair. # noqa: E501 + + Transaction link # noqa: E501 + + :return: The trade_url of this CurrencyPair. # noqa: E501 + :rtype: str + """ + return self._trade_url + + @trade_url.setter + def trade_url(self, trade_url): + """Sets the trade_url of this CurrencyPair. + + Transaction link # noqa: E501 + + :param trade_url: The trade_url of this CurrencyPair. # noqa: E501 + :type: str + """ + + self._trade_url = trade_url + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py index b2a3e9a..947d48a 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -34,15 +34,15 @@ class InlineResponse200(object): """ openapi_types = { 'time': 'int', - 'vaule': 'str' + 'value': 'str' } attribute_map = { 'time': 'time', - 'vaule': 'vaule' + 'value': 'value' } - def __init__(self, time=None, vaule=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, time=None, value=None, local_vars_configuration=None): # noqa: E501 # type: (int, str, Configuration) -> None """InlineResponse200 - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: @@ -50,13 +50,13 @@ def __init__(self, time=None, vaule=None, local_vars_configuration=None): # noq self.local_vars_configuration = local_vars_configuration self._time = None - self._vaule = None + self._value = None self.discriminator = None if time is not None: self.time = time - if vaule is not None: - self.vaule = vaule + if value is not None: + self.value = value @property def time(self): @@ -80,25 +80,25 @@ def time(self, time): self._time = time @property - def vaule(self): - """Gets the vaule of this InlineResponse200. # noqa: E501 + def value(self): + """Gets the value of this InlineResponse200. # noqa: E501 - :return: The vaule of this InlineResponse200. # noqa: E501 + :return: The value of this InlineResponse200. # noqa: E501 :rtype: str """ - return self._vaule + return self._value - @vaule.setter - def vaule(self, vaule): - """Sets the vaule of this InlineResponse200. + @value.setter + def value(self, value): + """Sets the value of this InlineResponse200. - :param vaule: The vaule of this InlineResponse200. # noqa: E501 + :param value: The value of this InlineResponse200. # noqa: E501 :type: str """ - self._vaule = vaule + self._value = value def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py new file mode 100644 index 0000000..ba17db5 --- /dev/null +++ b/gate_api/models/inline_response2001.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class InlineResponse2001(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'est_rate': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'est_rate': 'est_rate' + } + + def __init__(self, currency=None, est_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """InlineResponse2001 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._est_rate = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if est_rate is not None: + self.est_rate = est_rate + + @property + def currency(self): + """Gets the currency of this InlineResponse2001. # noqa: E501 + + + :return: The currency of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this InlineResponse2001. + + + :param currency: The currency of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def est_rate(self): + """Gets the est_rate of this InlineResponse2001. # noqa: E501 + + Unconverted percentage # noqa: E501 + + :return: The est_rate of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._est_rate + + @est_rate.setter + def est_rate(self, est_rate): + """Sets the est_rate of this InlineResponse2001. + + Unconverted percentage # noqa: E501 + + :param est_rate: The est_rate of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._est_rate = est_rate + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2001): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineResponse2001): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py index aef2e8c..ec6fade 100644 --- a/gate_api/models/sub_account_transfer.py +++ b/gate_api/models/sub_account_transfer.py @@ -33,86 +33,112 @@ class SubAccountTransfer(object): and the value is json key in definition. """ openapi_types = { - 'currency': 'str', + 'timest': 'str', + 'uid': 'str', 'sub_account': 'str', - 'direction': 'str', + 'sub_account_type': 'str', + 'currency': 'str', 'amount': 'str', - 'uid': 'str', - 'client_order_id': 'str', - 'timest': 'str', + 'direction': 'str', 'source': 'str', - 'sub_account_type': 'str' + 'client_order_id': 'str', + 'status': 'str' } attribute_map = { - 'currency': 'currency', + 'timest': 'timest', + 'uid': 'uid', 'sub_account': 'sub_account', - 'direction': 'direction', + 'sub_account_type': 'sub_account_type', + 'currency': 'currency', 'amount': 'amount', - 'uid': 'uid', - 'client_order_id': 'client_order_id', - 'timest': 'timest', + 'direction': 'direction', 'source': 'source', - 'sub_account_type': 'sub_account_type' + 'client_order_id': 'client_order_id', + 'status': 'status' } - def __init__(self, currency=None, sub_account=None, direction=None, amount=None, uid=None, client_order_id=None, timest=None, source=None, sub_account_type='spot', local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, timest=None, uid=None, sub_account=None, sub_account_type='spot', currency=None, amount=None, direction=None, source=None, client_order_id=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None """SubAccountTransfer - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._currency = None + self._timest = None + self._uid = None self._sub_account = None - self._direction = None + self._sub_account_type = None + self._currency = None self._amount = None - self._uid = None - self._client_order_id = None - self._timest = None + self._direction = None self._source = None - self._sub_account_type = None + self._client_order_id = None + self._status = None self.discriminator = None - self.currency = currency - self.sub_account = sub_account - self.direction = direction - self.amount = amount - if uid is not None: - self.uid = uid - if client_order_id is not None: - self.client_order_id = client_order_id if timest is not None: self.timest = timest - if source is not None: - self.source = source + if uid is not None: + self.uid = uid + self.sub_account = sub_account if sub_account_type is not None: self.sub_account_type = sub_account_type + self.currency = currency + self.amount = amount + self.direction = direction + if source is not None: + self.source = source + if client_order_id is not None: + self.client_order_id = client_order_id + if status is not None: + self.status = status @property - def currency(self): - """Gets the currency of this SubAccountTransfer. # noqa: E501 + def timest(self): + """Gets the timest of this SubAccountTransfer. # noqa: E501 - Transfer currency name # noqa: E501 + Transfer timestamp # noqa: E501 - :return: The currency of this SubAccountTransfer. # noqa: E501 + :return: The timest of this SubAccountTransfer. # noqa: E501 :rtype: str """ - return self._currency + return self._timest - @currency.setter - def currency(self, currency): - """Sets the currency of this SubAccountTransfer. + @timest.setter + def timest(self, timest): + """Sets the timest of this SubAccountTransfer. - Transfer currency name # noqa: E501 + Transfer timestamp # noqa: E501 - :param currency: The currency of this SubAccountTransfer. # noqa: E501 + :param timest: The timest of this SubAccountTransfer. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - self._currency = currency + self._timest = timest + + @property + def uid(self): + """Gets the uid of this SubAccountTransfer. # noqa: E501 + + Main account user ID # noqa: E501 + + :return: The uid of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SubAccountTransfer. + + Main account user ID # noqa: E501 + + :param uid: The uid of this SubAccountTransfer. # noqa: E501 + :type: str + """ + + self._uid = uid @property def sub_account(self): @@ -140,29 +166,52 @@ def sub_account(self, sub_account): self._sub_account = sub_account @property - def direction(self): - """Gets the direction of this SubAccountTransfer. # noqa: E501 + def sub_account_type(self): + """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501 - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 - :return: The direction of this SubAccountTransfer. # noqa: E501 + :return: The sub_account_type of this SubAccountTransfer. # noqa: E501 :rtype: str """ - return self._direction + return self._sub_account_type - @direction.setter - def direction(self, direction): - """Sets the direction of this SubAccountTransfer. + @sub_account_type.setter + def sub_account_type(self, sub_account_type): + """Sets the sub_account_type of this SubAccountTransfer. - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 - :param direction: The direction of this SubAccountTransfer. # noqa: E501 + :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501 :type: str """ - if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 - raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 - self._direction = direction + self._sub_account_type = sub_account_type + + @property + def currency(self): + """Gets the currency of this SubAccountTransfer. # noqa: E501 + + Transfer currency name # noqa: E501 + + :return: The currency of this SubAccountTransfer. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SubAccountTransfer. + + Transfer currency name # noqa: E501 + + :param currency: The currency of this SubAccountTransfer. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency @property def amount(self): @@ -190,119 +239,98 @@ def amount(self, amount): self._amount = amount @property - def uid(self): - """Gets the uid of this SubAccountTransfer. # noqa: E501 - - Main account user ID # noqa: E501 - - :return: The uid of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this SubAccountTransfer. - - Main account user ID # noqa: E501 - - :param uid: The uid of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._uid = uid - - @property - def client_order_id(self): - """Gets the client_order_id of this SubAccountTransfer. # noqa: E501 + def direction(self): + """Gets the direction of this SubAccountTransfer. # noqa: E501 - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 - :return: The client_order_id of this SubAccountTransfer. # noqa: E501 + :return: The direction of this SubAccountTransfer. # noqa: E501 :rtype: str """ - return self._client_order_id + return self._direction - @client_order_id.setter - def client_order_id(self, client_order_id): - """Sets the client_order_id of this SubAccountTransfer. + @direction.setter + def direction(self, direction): + """Sets the direction of this SubAccountTransfer. - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 - :param client_order_id: The client_order_id of this SubAccountTransfer. # noqa: E501 + :param direction: The direction of this SubAccountTransfer. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 + raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 - self._client_order_id = client_order_id + self._direction = direction @property - def timest(self): - """Gets the timest of this SubAccountTransfer. # noqa: E501 + def source(self): + """Gets the source of this SubAccountTransfer. # noqa: E501 - Transfer timestamp # noqa: E501 + Where the operation is initiated from # noqa: E501 - :return: The timest of this SubAccountTransfer. # noqa: E501 + :return: The source of this SubAccountTransfer. # noqa: E501 :rtype: str """ - return self._timest + return self._source - @timest.setter - def timest(self, timest): - """Sets the timest of this SubAccountTransfer. + @source.setter + def source(self, source): + """Sets the source of this SubAccountTransfer. - Transfer timestamp # noqa: E501 + Where the operation is initiated from # noqa: E501 - :param timest: The timest of this SubAccountTransfer. # noqa: E501 + :param source: The source of this SubAccountTransfer. # noqa: E501 :type: str """ - self._timest = timest + self._source = source @property - def source(self): - """Gets the source of this SubAccountTransfer. # noqa: E501 + def client_order_id(self): + """Gets the client_order_id of this SubAccountTransfer. # noqa: E501 - Where the operation is initiated from # noqa: E501 + The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 - :return: The source of this SubAccountTransfer. # noqa: E501 + :return: The client_order_id of this SubAccountTransfer. # noqa: E501 :rtype: str """ - return self._source + return self._client_order_id - @source.setter - def source(self, source): - """Sets the source of this SubAccountTransfer. + @client_order_id.setter + def client_order_id(self, client_order_id): + """Sets the client_order_id of this SubAccountTransfer. - Where the operation is initiated from # noqa: E501 + The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 - :param source: The source of this SubAccountTransfer. # noqa: E501 + :param client_order_id: The client_order_id of this SubAccountTransfer. # noqa: E501 :type: str """ - self._source = source + self._client_order_id = client_order_id @property - def sub_account_type(self): - """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501 + def status(self): + """Gets the status of this SubAccountTransfer. # noqa: E501 - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + Sub-account transfer record status, currently only success # noqa: E501 - :return: The sub_account_type of this SubAccountTransfer. # noqa: E501 + :return: The status of this SubAccountTransfer. # noqa: E501 :rtype: str """ - return self._sub_account_type + return self._status - @sub_account_type.setter - def sub_account_type(self, sub_account_type): - """Sets the sub_account_type of this SubAccountTransfer. + @status.setter + def status(self, status): + """Sets the status of this SubAccountTransfer. - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + Sub-account transfer record status, currently only success # noqa: E501 - :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501 + :param status: The status of this SubAccountTransfer. # noqa: E501 :type: str """ - self._sub_account_type = sub_account_type + self._status = status def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index 323c70b..5cbee82 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -307,7 +307,7 @@ def currency(self, currency): def address(self): """Gets the address of this WithdrawalRecord. # noqa: E501 - 提现地址 # noqa: E501 + Withdrawal address # noqa: E501 :return: The address of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -318,7 +318,7 @@ def address(self): def address(self, address): """Sets the address of this WithdrawalRecord. - 提现地址 # noqa: E501 + Withdrawal address # noqa: E501 :param address: The address of this WithdrawalRecord. # noqa: E501 :type: str diff --git a/setup.py b/setup.py index e74630b..af0bc69 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.97.4" +VERSION = "6.98.0" # To install the library, run the following # # python setup.py install From 1419b5599d2cb0fbccc014511dcc8eb8245aca21 Mon Sep 17 00:00:00 2001 From: gateio Date: Tue, 17 Jun 2025 09:53:40 +0000 Subject: [PATCH 07/20] update to v6.99.0 --- README.md | 39 +- docs/CrossMarginAccount.md | 26 - docs/CrossMarginAccountBook.md | 15 - docs/CrossMarginBalance.md | 5 - docs/CrossMarginBalance1.md | 13 - docs/CrossMarginCurrency.md | 19 - docs/CrossMarginRepayRequest.md | 11 - docs/CrossMarginTransferable.md | 11 - docs/EarnUniApi.md | 75 +- docs/MarginApi.md | 1046 ++------- docs/MarginUniApi.md | 220 +- docs/SpotAccount.md | 1 + docs/SpotApi.md | 2 +- docs/SubCrossMarginAccount.md | 2 +- docs/UniInterestMode.md | 12 - gate_api/__init__.py | 11 +- gate_api/api/account_api.py | 2 +- gate_api/api/collateral_loan_api.py | 2 +- gate_api/api/delivery_api.py | 2 +- gate_api/api/earn_api.py | 2 +- gate_api/api/earn_uni_api.py | 122 +- gate_api/api/flash_swap_api.py | 2 +- gate_api/api/futures_api.py | 2 +- gate_api/api/margin_api.py | 1902 +++-------------- gate_api/api/margin_uni_api.py | 436 ++-- gate_api/api/multi_collateral_loan_api.py | 2 +- gate_api/api/options_api.py | 2 +- gate_api/api/rebate_api.py | 2 +- gate_api/api/spot_api.py | 6 +- gate_api/api/sub_account_api.py | 2 +- gate_api/api/unified_api.py | 2 +- gate_api/api/wallet_api.py | 2 +- gate_api/api/withdrawal_api.py | 2 +- gate_api/api_client.py | 4 +- gate_api/configuration.py | 6 +- gate_api/exceptions.py | 2 +- gate_api/models/__init__.py | 9 +- gate_api/models/account_balance.py | 2 +- gate_api/models/account_detail.py | 2 +- gate_api/models/account_detail_key.py | 2 +- gate_api/models/account_rate_limit.py | 2 +- gate_api/models/agency_commission.py | 2 +- gate_api/models/agency_commission_history.py | 2 +- gate_api/models/agency_transaction.py | 2 +- gate_api/models/agency_transaction_history.py | 2 +- gate_api/models/auto_repay_setting.py | 2 +- gate_api/models/batch_amend_item.py | 2 +- gate_api/models/batch_amend_order_req.py | 2 +- gate_api/models/batch_futures_order.py | 2 +- gate_api/models/batch_order.py | 2 +- gate_api/models/borrow_currency_info.py | 2 +- gate_api/models/broker_commission.py | 2 +- gate_api/models/broker_commission1.py | 2 +- gate_api/models/broker_transaction.py | 2 +- gate_api/models/broker_transaction1.py | 2 +- gate_api/models/cancel_batch_order.py | 2 +- gate_api/models/cancel_order_result.py | 2 +- gate_api/models/collateral_adjust.py | 2 +- gate_api/models/collateral_adjust_res.py | 2 +- gate_api/models/collateral_align.py | 2 +- gate_api/models/collateral_currency.py | 2 +- gate_api/models/collateral_currency_info.py | 2 +- gate_api/models/collateral_currency_res.py | 2 +- gate_api/models/collateral_current_rate.py | 2 +- gate_api/models/collateral_fix_rate.py | 2 +- gate_api/models/collateral_loan_currency.py | 2 +- gate_api/models/collateral_ltv.py | 2 +- gate_api/models/collateral_order.py | 2 +- gate_api/models/collateral_record.py | 2 +- gate_api/models/contract.py | 2 +- gate_api/models/contract_stat.py | 2 +- gate_api/models/convert_small_balance.py | 2 +- .../countdown_cancel_all_futures_task.py | 2 +- .../countdown_cancel_all_options_task.py | 2 +- .../models/countdown_cancel_all_spot_task.py | 2 +- gate_api/models/create_collateral_order.py | 2 +- .../models/create_multi_collateral_order.py | 2 +- gate_api/models/create_uni_lend.py | 2 +- gate_api/models/create_uni_loan.py | 2 +- gate_api/models/cross_margin_account.py | 569 ----- gate_api/models/cross_margin_account_book.py | 263 --- gate_api/models/cross_margin_balance.py | 150 +- gate_api/models/cross_margin_balance1.py | 207 -- gate_api/models/cross_margin_currency.py | 375 ---- gate_api/models/cross_margin_loan.py | 2 +- gate_api/models/cross_margin_repay_request.py | 153 -- gate_api/models/cross_margin_repayment.py | 2 +- gate_api/models/cross_margin_transferable.py | 151 -- gate_api/models/currency.py | 2 +- gate_api/models/currency_chain.py | 2 +- gate_api/models/currency_pair.py | 2 +- gate_api/models/currency_quota.py | 2 +- gate_api/models/debit_fee.py | 2 +- gate_api/models/delivery_candlestick.py | 2 +- gate_api/models/delivery_contract.py | 2 +- gate_api/models/delivery_settlement.py | 2 +- gate_api/models/delivery_ticker.py | 2 +- gate_api/models/deposit_address.py | 2 +- gate_api/models/deposit_record.py | 2 +- gate_api/models/dual_get_orders.py | 2 +- gate_api/models/dual_get_plans.py | 2 +- gate_api/models/eth2_rate_list.py | 2 +- gate_api/models/eth2_swap.py | 2 +- gate_api/models/flash_swap_currency_pair.py | 2 +- gate_api/models/flash_swap_order.py | 2 +- gate_api/models/flash_swap_order_preview.py | 2 +- gate_api/models/flash_swap_order_request.py | 2 +- gate_api/models/flash_swap_preview_request.py | 2 +- gate_api/models/funding_account.py | 2 +- gate_api/models/funding_rate_record.py | 2 +- gate_api/models/future_cancel_order_result.py | 2 +- gate_api/models/futures_account.py | 2 +- gate_api/models/futures_account_book.py | 2 +- gate_api/models/futures_account_history.py | 2 +- gate_api/models/futures_auto_deleverage.py | 2 +- .../futures_batch_amend_order_request.py | 2 +- gate_api/models/futures_candlestick.py | 2 +- gate_api/models/futures_fee.py | 2 +- gate_api/models/futures_index_constituents.py | 2 +- gate_api/models/futures_initial_order.py | 2 +- gate_api/models/futures_limit_risk_tiers.py | 2 +- gate_api/models/futures_liq_order.py | 2 +- gate_api/models/futures_liquidate.py | 2 +- gate_api/models/futures_order.py | 2 +- gate_api/models/futures_order_amendment.py | 2 +- gate_api/models/futures_order_book.py | 2 +- gate_api/models/futures_order_book_item.py | 2 +- gate_api/models/futures_premium_index.py | 2 +- gate_api/models/futures_price_trigger.py | 2 +- .../models/futures_price_triggered_order.py | 2 +- gate_api/models/futures_ticker.py | 2 +- gate_api/models/futures_trade.py | 2 +- gate_api/models/index_constituent.py | 2 +- gate_api/models/inline_object.py | 2 +- gate_api/models/inline_response200.py | 2 +- gate_api/models/inline_response2001.py | 2 +- gate_api/models/insurance_record.py | 2 +- gate_api/models/ledger_record.py | 2 +- gate_api/models/liquidate_order.py | 2 +- gate_api/models/margin_account.py | 2 +- gate_api/models/margin_account_book.py | 2 +- gate_api/models/margin_account_currency.py | 2 +- gate_api/models/margin_leverage_tier.py | 2 +- gate_api/models/margin_market_leverage.py | 2 +- gate_api/models/margin_tiers.py | 2 +- gate_api/models/margin_transferable.py | 2 +- gate_api/models/max_uni_borrowable.py | 2 +- gate_api/models/mock_futures_order.py | 2 +- gate_api/models/mock_futures_position.py | 2 +- gate_api/models/mock_margin_result.py | 2 +- gate_api/models/mock_options_order.py | 2 +- gate_api/models/mock_options_position.py | 2 +- gate_api/models/mock_risk_unit.py | 2 +- gate_api/models/mock_spot_balance.py | 2 +- gate_api/models/mock_spot_order.py | 2 +- gate_api/models/multi_chain_address_item.py | 2 +- gate_api/models/multi_collateral_currency.py | 2 +- gate_api/models/multi_collateral_item.py | 2 +- gate_api/models/multi_collateral_order.py | 2 +- gate_api/models/multi_collateral_record.py | 2 +- .../multi_collateral_record_currency.py | 2 +- gate_api/models/multi_loan_item.py | 2 +- gate_api/models/multi_loan_repay_item.py | 2 +- gate_api/models/multi_repay_record.py | 2 +- gate_api/models/multi_repay_resp.py | 2 +- gate_api/models/my_futures_trade.py | 2 +- .../models/my_futures_trade_time_range.py | 2 +- gate_api/models/open_orders.py | 2 +- gate_api/models/options_account.py | 2 +- gate_api/models/options_account_book.py | 2 +- gate_api/models/options_candlestick.py | 2 +- gate_api/models/options_contract.py | 2 +- gate_api/models/options_mmp.py | 2 +- gate_api/models/options_mmp_reset.py | 2 +- gate_api/models/options_my_settlements.py | 2 +- gate_api/models/options_my_trade.py | 2 +- gate_api/models/options_order.py | 2 +- gate_api/models/options_position.py | 2 +- gate_api/models/options_position_close.py | 2 +- .../models/options_position_close_order.py | 2 +- gate_api/models/options_settlement.py | 2 +- gate_api/models/options_ticker.py | 2 +- gate_api/models/options_underlying.py | 2 +- gate_api/models/options_underlying_ticker.py | 2 +- gate_api/models/order.py | 2 +- gate_api/models/order_book.py | 2 +- gate_api/models/order_cancel.py | 2 +- gate_api/models/order_patch.py | 2 +- gate_api/models/order_resp.py | 2 +- gate_api/models/partner_commission_history.py | 2 +- gate_api/models/partner_sub.py | 2 +- gate_api/models/partner_sub_list.py | 2 +- .../models/partner_transaction_history.py | 2 +- gate_api/models/patch_uni_lend.py | 2 +- .../models/place_dual_investment_order.py | 2 +- gate_api/models/position.py | 2 +- gate_api/models/position_close.py | 2 +- gate_api/models/position_close_order.py | 2 +- gate_api/models/profit_loss_range.py | 2 +- gate_api/models/rebate_user_info.py | 2 +- gate_api/models/repay_currency_res.py | 2 +- gate_api/models/repay_loan.py | 2 +- gate_api/models/repay_multi_loan.py | 2 +- gate_api/models/repay_record.py | 2 +- gate_api/models/repay_record_currency.py | 2 +- gate_api/models/repay_record_left_interest.py | 2 +- .../models/repay_record_repaid_currency.py | 2 +- .../models/repay_record_total_interest.py | 2 +- gate_api/models/repay_resp.py | 2 +- gate_api/models/risk_units.py | 2 +- gate_api/models/saved_address.py | 2 +- gate_api/models/small_balance.py | 2 +- gate_api/models/small_balance_history.py | 2 +- gate_api/models/spot_account.py | 38 +- gate_api/models/spot_account_book.py | 2 +- gate_api/models/spot_currency_chain.py | 2 +- gate_api/models/spot_fee.py | 2 +- gate_api/models/spot_insurance_history.py | 2 +- gate_api/models/spot_price_put_order.py | 2 +- gate_api/models/spot_price_trigger.py | 2 +- gate_api/models/spot_price_triggered_order.py | 2 +- gate_api/models/stp_group.py | 2 +- gate_api/models/stp_group_user.py | 2 +- gate_api/models/structured_buy.py | 2 +- .../models/structured_get_project_list.py | 2 +- gate_api/models/structured_order_list.py | 2 +- gate_api/models/sub_account.py | 2 +- gate_api/models/sub_account_balance.py | 2 +- .../sub_account_cross_margin_balance.py | 2 +- .../models/sub_account_futures_balance.py | 2 +- gate_api/models/sub_account_key.py | 2 +- gate_api/models/sub_account_key_perms.py | 2 +- gate_api/models/sub_account_margin_balance.py | 2 +- gate_api/models/sub_account_to_sub_account.py | 2 +- gate_api/models/sub_account_transfer.py | 2 +- gate_api/models/sub_cross_margin_account.py | 10 +- gate_api/models/sub_user_mode.py | 2 +- gate_api/models/system_time.py | 2 +- gate_api/models/ticker.py | 2 +- gate_api/models/total_balance.py | 2 +- gate_api/models/trade.py | 2 +- gate_api/models/trade_fee.py | 2 +- gate_api/models/transaction_id.py | 2 +- gate_api/models/transfer.py | 2 +- gate_api/models/transfer_order_status.py | 2 +- gate_api/models/transferables_result.py | 2 +- gate_api/models/trigger_order_response.py | 2 +- gate_api/models/trigger_time.py | 2 +- gate_api/models/uid_push_order.py | 2 +- gate_api/models/uid_push_withdrawal.py | 2 +- gate_api/models/uid_push_withdrawal_resp.py | 2 +- gate_api/models/uni_currency.py | 2 +- gate_api/models/uni_currency_interest.py | 2 +- gate_api/models/uni_currency_pair.py | 2 +- gate_api/models/uni_interest_mode.py | 153 -- gate_api/models/uni_interest_record.py | 2 +- gate_api/models/uni_lend.py | 2 +- gate_api/models/uni_lend_interest.py | 2 +- gate_api/models/uni_lend_record.py | 2 +- gate_api/models/uni_loan.py | 2 +- gate_api/models/uni_loan_interest_record.py | 2 +- gate_api/models/uni_loan_record.py | 2 +- gate_api/models/unified_account.py | 2 +- gate_api/models/unified_balance.py | 2 +- gate_api/models/unified_borrowable.py | 2 +- gate_api/models/unified_borrowable1.py | 2 +- gate_api/models/unified_currency.py | 2 +- gate_api/models/unified_discount.py | 2 +- gate_api/models/unified_discount_tiers.py | 2 +- gate_api/models/unified_history_loan_rate.py | 2 +- .../models/unified_history_loan_rate_rates.py | 2 +- gate_api/models/unified_leverage_config.py | 2 +- gate_api/models/unified_leverage_setting.py | 2 +- gate_api/models/unified_loan.py | 2 +- gate_api/models/unified_loan_record.py | 2 +- gate_api/models/unified_loan_result.py | 2 +- gate_api/models/unified_margin_tiers.py | 2 +- gate_api/models/unified_mode_set.py | 2 +- gate_api/models/unified_portfolio_input.py | 2 +- gate_api/models/unified_portfolio_output.py | 2 +- gate_api/models/unified_risk_units.py | 2 +- gate_api/models/unified_settings.py | 2 +- gate_api/models/unified_transferable.py | 2 +- gate_api/models/user_ltv_info.py | 2 +- gate_api/models/user_sub.py | 2 +- gate_api/models/user_sub_relation.py | 2 +- gate_api/models/user_total_amount.py | 2 +- gate_api/models/withdraw_status.py | 2 +- gate_api/models/withdrawal_record.py | 2 +- gate_api/rest.py | 2 +- setup.py | 6 +- 291 files changed, 1121 insertions(+), 5461 deletions(-) delete mode 100644 docs/CrossMarginAccount.md delete mode 100644 docs/CrossMarginAccountBook.md delete mode 100644 docs/CrossMarginBalance1.md delete mode 100644 docs/CrossMarginCurrency.md delete mode 100644 docs/CrossMarginRepayRequest.md delete mode 100644 docs/CrossMarginTransferable.md delete mode 100644 docs/UniInterestMode.md delete mode 100644 gate_api/models/cross_margin_account.py delete mode 100644 gate_api/models/cross_margin_account_book.py delete mode 100644 gate_api/models/cross_margin_balance1.py delete mode 100644 gate_api/models/cross_margin_currency.py delete mode 100644 gate_api/models/cross_margin_repay_request.py delete mode 100644 gate_api/models/cross_margin_transferable.py delete mode 100644 gate_api/models/uni_interest_mode.py diff --git a/README.md b/README.md index 7dccb09..73ab507 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.98.0 -- Package version: 6.98.0 +- API version: 4.99.0 +- Package version: 6.99.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) @@ -114,18 +114,17 @@ Class | Method | HTTP request | Description *EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending *EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency *EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records -*EarnUniApi* | [**switch_interest_reinvest**](docs/EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle *EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status *EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart *EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate *MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market -*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate *MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans *MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay +*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable +*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market +*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate *MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records *MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records -*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable *SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts *SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account *SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account @@ -268,28 +267,17 @@ Class | Method | HTTP request | Description *FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order *FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order *MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list +*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market +*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient +*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple +*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list *MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history *MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list *MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting *MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting *MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -*MarginApi* | [**list_cross_margin_currencies**](docs/MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) -*MarginApi* | [**get_cross_margin_currency**](docs/MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) -*MarginApi* | [**get_cross_margin_account**](docs/MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) -*MarginApi* | [**list_cross_margin_account_book**](docs/MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) *MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) -*MarginApi* | [**create_cross_margin_loan**](docs/MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) -*MarginApi* | [**get_cross_margin_loan**](docs/MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) *MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) -*MarginApi* | [**repay_cross_margin_loan**](docs/MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) -*MarginApi* | [**get_cross_margin_interest_records**](docs/MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) -*MarginApi* | [**get_cross_margin_transferable**](docs/MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) -*MarginApi* | [**get_cross_margin_estimate_rate**](docs/MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) -*MarginApi* | [**get_cross_margin_borrowable**](docs/MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) -*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list *MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders *MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order *MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail @@ -441,15 +429,9 @@ Class | Method | HTTP request | Description - [CreateMultiCollateralOrder](docs/CreateMultiCollateralOrder.md) - [CreateUniLend](docs/CreateUniLend.md) - [CreateUniLoan](docs/CreateUniLoan.md) - - [CrossMarginAccount](docs/CrossMarginAccount.md) - - [CrossMarginAccountBook](docs/CrossMarginAccountBook.md) - [CrossMarginBalance](docs/CrossMarginBalance.md) - - [CrossMarginBalance1](docs/CrossMarginBalance1.md) - - [CrossMarginCurrency](docs/CrossMarginCurrency.md) - [CrossMarginLoan](docs/CrossMarginLoan.md) - - [CrossMarginRepayRequest](docs/CrossMarginRepayRequest.md) - [CrossMarginRepayment](docs/CrossMarginRepayment.md) - - [CrossMarginTransferable](docs/CrossMarginTransferable.md) - [Currency](docs/Currency.md) - [CurrencyChain](docs/CurrencyChain.md) - [CurrencyPair](docs/CurrencyPair.md) @@ -616,7 +598,6 @@ Class | Method | HTTP request | Description - [UniCurrency](docs/UniCurrency.md) - [UniCurrencyInterest](docs/UniCurrencyInterest.md) - [UniCurrencyPair](docs/UniCurrencyPair.md) - - [UniInterestMode](docs/UniInterestMode.md) - [UniInterestRecord](docs/UniInterestRecord.md) - [UniLend](docs/UniLend.md) - [UniLendInterest](docs/UniLendInterest.md) @@ -666,6 +647,6 @@ For details, refer to: ## Author -support@mail.gate.io +support@mail.gate.com diff --git a/docs/CrossMarginAccount.md b/docs/CrossMarginAccount.md deleted file mode 100644 index 64dc282..0000000 --- a/docs/CrossMarginAccount.md +++ /dev/null @@ -1,26 +0,0 @@ -# CrossMarginAccount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**refresh_time** | **int** | Time of the most recent refresh | [optional] -**locked** | **bool** | Whether account is locked | [optional] -**balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional] -**total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] -**borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] -**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] -**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] -**total_initial_margin** | **str** | Total initial margin | [optional] -**total_margin_balance** | **str** | Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) | [optional] -**total_maintenance_margin** | **str** | Total maintenance margin | [optional] -**total_initial_margin_rate** | **str** | Total initial margin rate | [optional] -**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional] -**total_available_margin** | **str** | Total available margin | [optional] -**portfolio_margin_total** | **str** | Total amount of the portfolio margin account | [optional] -**portfolio_margin_total_liab** | **str** | Total liabilities of the portfolio margin account | [optional] -**portfolio_margin_total_equity** | **str** | Total equity of the portfolio margin account | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginAccountBook.md b/docs/CrossMarginAccountBook.md deleted file mode 100644 index d02b52f..0000000 --- a/docs/CrossMarginAccountBook.md +++ /dev/null @@ -1,15 +0,0 @@ -# CrossMarginAccountBook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID | [optional] -**time** | **int** | The timestamp of the change (in milliseconds) | [optional] -**currency** | **str** | Currency changed | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginBalance.md b/docs/CrossMarginBalance.md index 275fa85..d2a1945 100644 --- a/docs/CrossMarginBalance.md +++ b/docs/CrossMarginBalance.md @@ -7,11 +7,6 @@ Name | Type | Description | Notes **freeze** | **str** | Locked amount | [optional] **borrowed** | **str** | Borrowed amount | [optional] **interest** | **str** | Unpaid interests | [optional] -**negative_liab** | **str** | Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] | [optional] -**futures_pos_liab** | **str** | Borrowing to Open Positions in Futures | [optional] -**equity** | **str** | Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl | [optional] -**total_freeze** | **str** | Total freeze. Formula: freeze + position_initial_margin + order_margin | [optional] -**total_liab** | **str** | Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossMarginBalance1.md b/docs/CrossMarginBalance1.md deleted file mode 100644 index 2db2a14..0000000 --- a/docs/CrossMarginBalance1.md +++ /dev/null @@ -1,13 +0,0 @@ -# CrossMarginBalance1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**available** | **str** | Available amount | [optional] -**freeze** | **str** | Locked amount | [optional] -**borrowed** | **str** | Borrowed amount | [optional] -**interest** | **str** | Unpaid interests | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginCurrency.md b/docs/CrossMarginCurrency.md deleted file mode 100644 index 0e3038a..0000000 --- a/docs/CrossMarginCurrency.md +++ /dev/null @@ -1,19 +0,0 @@ -# CrossMarginCurrency - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Currency name | [optional] -**rate** | **str** | Minimum lending rate (hourly rate) | [optional] -**prec** | **str** | Currency precision | [optional] -**discount** | **str** | Currency value discount, which is used in total value calculation | [optional] -**min_borrow_amount** | **str** | Minimum currency borrow amount. Unit is currency itself | [optional] -**user_max_borrow_amount** | **str** | Maximum borrow value allowed per user, in USDT | [optional] -**total_max_borrow_amount** | **str** | Maximum borrow value allowed for this currency, in USDT | [optional] -**price** | **str** | Price change between this currency and USDT | [optional] -**loanable** | **bool** | Whether currency is borrowed | [optional] -**status** | **int** | status - `0` : disable - `1` : enable | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CrossMarginRepayRequest.md b/docs/CrossMarginRepayRequest.md deleted file mode 100644 index 9c1ca05..0000000 --- a/docs/CrossMarginRepayRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CrossMarginRepayRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency | -**amount** | **str** | Repayment 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/CrossMarginTransferable.md b/docs/CrossMarginTransferable.md deleted file mode 100644 index 4e2b0d6..0000000 --- a/docs/CrossMarginTransferable.md +++ /dev/null @@ -1,11 +0,0 @@ -# CrossMarginTransferable - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | Max transferable amount | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index 024f0a5..4a0ef05 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending [**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency [**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records -[**switch_interest_reinvest**](EarnUniApi.md#switch_interest_reinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle [**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status [**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart [**list_uni_rate**](EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate @@ -556,72 +555,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) -# **switch_interest_reinvest** -> switch_interest_reinvest(uni_interest_mode) - -Set interest reinvestment toggle - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.EarnUniApi(api_client) -uni_interest_mode = gate_api.UniInterestMode() # UniInterestMode | - -try: - # Set interest reinvestment toggle - api_instance.switch_interest_reinvest(uni_interest_mode) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling EarnUniApi->switch_interest_reinvest: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uni_interest_mode** | [**UniInterestMode**](UniInterestMode.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | 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_uni_interest_status** > UniCurrencyInterest get_uni_interest_status(currency) @@ -694,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -758,7 +691,7 @@ Name | Type | Description | Notes ### 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-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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) @@ -767,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -823,7 +756,7 @@ This endpoint does not need any parameter. ### 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-06-04 01:34+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/MarginApi.md b/docs/MarginApi.md index 8dc54de..1d98803 100644 --- a/docs/MarginApi.md +++ b/docs/MarginApi.md @@ -5,28 +5,17 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list +[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market +[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient +[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple +[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list [**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history [**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list [**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting [**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting [**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -[**list_cross_margin_currencies**](MarginApi.md#list_cross_margin_currencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) -[**get_cross_margin_currency**](MarginApi.md#get_cross_margin_currency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) -[**get_cross_margin_account**](MarginApi.md#get_cross_margin_account) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) -[**list_cross_margin_account_book**](MarginApi.md#list_cross_margin_account_book) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) [**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) -[**create_cross_margin_loan**](MarginApi.md#create_cross_margin_loan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) -[**get_cross_margin_loan**](MarginApi.md#get_cross_margin_loan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) [**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) -[**repay_cross_margin_loan**](MarginApi.md#repay_cross_margin_loan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) -[**get_cross_margin_interest_records**](MarginApi.md#get_cross_margin_interest_records) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) -[**get_cross_margin_transferable**](MarginApi.md#get_cross_margin_transferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) -[**get_cross_margin_estimate_rate**](MarginApi.md#get_cross_margin_estimate_rate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) -[**get_cross_margin_borrowable**](MarginApi.md#get_cross_margin_borrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) -[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list # **list_margin_accounts** @@ -96,12 +85,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_margin_account_book** -> list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) - -List margin account balance change history +# **get_user_margin_tier** +> list[MarginLeverageTier] get_user_margin_tier(currency_pair) -Only transferals from and to margin account are provided for now. Time range allows 30 days at most +Check the user's own leverage lending gradient in the current market ### Example @@ -127,39 +114,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) -currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) -type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +currency_pair = 'BTC_USDT' # str | Currency pair try: - # List margin account balance change history - api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) + # Check the user's own leverage lending gradient in the current market + api_response = api_instance.get_user_margin_tier(currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->list_margin_account_book: %s\n" % e) + print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] - **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **currency_pair** | **str**| Currency pair | ### Return type -[**list[MarginAccountBook]**](MarginAccountBook.md) +[**list[MarginLeverageTier]**](MarginLeverageTier.md) ### Authorization @@ -173,64 +148,55 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_funding_accounts** -> list[FundingAccount] list_funding_accounts(currency=currency) +# **get_market_margin_tier** +> list[MarginLeverageTier] get_market_margin_tier(currency_pair) -Funding account list +Query the current market leverage lending gradient ### Example -* Api Key Authentication (apiv4): ```python from __future__ import print_function import gate_api from gate_api.exceptions import ApiException, GateApiException # Defining the host is optional and defaults to https://api.gateio.ws/api/v4 # See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" + host = "https://api.gateio.ws/api/v4" ) api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency_pair = 'BTC_USDT' # str | Currency pair try: - # Funding account list - api_response = api_instance.list_funding_accounts(currency=currency) + # Query the current market leverage lending gradient + api_response = api_instance.get_market_margin_tier(currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->list_funding_accounts: %s\n" % e) + print("Exception when calling MarginApi->get_market_margin_tier: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency_pair** | **str**| Currency pair | ### Return type -[**list[FundingAccount]**](FundingAccount.md) +[**list[MarginLeverageTier]**](MarginLeverageTier.md) ### Authorization -[apiv4](../README.md#apiv4) +No authorization required ### HTTP request headers @@ -240,14 +206,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_auto_repay_status** -> AutoRepaySetting get_auto_repay_status() +# **set_user_market_leverage** +> set_user_market_leverage(margin_market_leverage) -Retrieve user auto repayment setting +Set the user market leverage multiple ### Example @@ -273,23 +239,26 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) +margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | try: - # Retrieve user auto repayment setting - api_response = api_instance.get_auto_repay_status() - print(api_response) + # Set the user market leverage multiple + api_instance.set_user_market_leverage(margin_market_leverage) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->get_auto_repay_status: %s\n" % e) + print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| | ### Return type -[**AutoRepaySetting**](AutoRepaySetting.md) +void (empty response body) ### Authorization @@ -297,20 +266,22 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting | - | +**204** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **set_auto_repay** -> AutoRepaySetting set_auto_repay(status) +# **list_margin_user_account** +> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) -Update user's auto repayment setting +Query the user's leverage account list + +Support querying risk rate per position account and margin rate per position account ### Example @@ -336,27 +307,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled +currency_pair = 'BTC_USDT' # str | Currency pair (optional) try: - # Update user's auto repayment setting - api_response = api_instance.set_auto_repay(status) + # Query the user's leverage account list + api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->set_auto_repay: %s\n" % e) + print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled | + **currency_pair** | **str**| Currency pair | [optional] ### Return type -[**AutoRepaySetting**](AutoRepaySetting.md) +[**list[MarginAccount]**](MarginAccount.md) ### Authorization @@ -370,14 +341,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting | - | +**200** | List retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_margin_transferable** -> MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) +# **list_margin_account_book** +> list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) -Get the max transferable amount for a specific margin currency +List margin account balance change history + +Only transferals from and to margin account are provided for now. Time range allows 30 days at most ### Example @@ -403,29 +376,39 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency -currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) +currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) +type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) try: - # Get the max transferable amount for a specific margin currency - api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) + # List margin account balance change history + api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->get_margin_transferable: %s\n" % e) + print("Exception when calling MarginApi->list_margin_account_book: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] + **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] + **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] ### Return type -[**MarginTransferable**](MarginTransferable.md) +[**list[MarginAccountBook]**](MarginAccountBook.md) ### Authorization @@ -439,51 +422,64 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | List retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_cross_margin_currencies** -> list[CrossMarginCurrency] list_cross_margin_currencies() +# **list_funding_accounts** +> list[FundingAccount] list_funding_accounts(currency=currency) -Currencies supported by cross margin.(deprecated) +Funding account list ### Example +* Api Key Authentication (apiv4): ```python from __future__ import print_function import gate_api from gate_api.exceptions import ApiException, GateApiException # Defining the host is optional and defaults to https://api.gateio.ws/api/v4 # See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" ) api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) try: - # Currencies supported by cross margin.(deprecated) - api_response = api_instance.list_cross_margin_currencies() + # Funding account list + api_response = api_instance.list_funding_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 MarginApi->list_cross_margin_currencies: %s\n" % e) + print("Exception when calling MarginApi->list_funding_accounts: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] ### Return type -[**list[CrossMarginCurrency]**](CrossMarginCurrency.md) +[**list[FundingAccount]**](FundingAccount.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers @@ -497,51 +493,56 @@ 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) -# **get_cross_margin_currency** -> CrossMarginCurrency get_cross_margin_currency(currency) +# **get_auto_repay_status** +> AutoRepaySetting get_auto_repay_status() -Retrieve detail of one single currency supported by cross margin. (deprecated) +Retrieve user auto repayment 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" + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" ) api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Currency name try: - # Retrieve detail of one single currency supported by cross margin. (deprecated) - api_response = api_instance.get_cross_margin_currency(currency) + # Retrieve user auto repayment setting + api_response = api_instance.get_auto_repay_status() print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_currency: %s\n" % e) + print("Exception when calling MarginApi->get_auto_repay_status: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | +This endpoint does not need any parameter. ### Return type -[**CrossMarginCurrency**](CrossMarginCurrency.md) +[**AutoRepaySetting**](AutoRepaySetting.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers @@ -551,14 +552,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Current auto repayment setting | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_cross_margin_account** -> CrossMarginAccount get_cross_margin_account() +# **set_auto_repay** +> AutoRepaySetting set_auto_repay(status) -Retrieve cross margin account. (deprecated) +Update user's auto repayment setting ### Example @@ -584,23 +585,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) +status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled try: - # Retrieve cross margin account. (deprecated) - api_response = api_instance.get_cross_margin_account() + # Update user's auto repayment setting + api_response = api_instance.set_auto_repay(status) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_account: %s\n" % e) + print("Exception when calling MarginApi->set_auto_repay: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled | ### Return type -[**CrossMarginAccount**](CrossMarginAccount.md) +[**AutoRepaySetting**](AutoRepaySetting.md) ### Authorization @@ -614,16 +619,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Current auto repayment setting | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_cross_margin_account_book** -> list[CrossMarginAccountBook] list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type) - -Retrieve cross margin account change history. (deprecated) +# **get_margin_transferable** +> MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) -The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. +Get the max transferable amount for a specific margin currency ### Example @@ -649,37 +652,29 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'currency_example' # str | Filter by currency (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -type = 'borrow' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) +currency = 'BTC' # str | Retrieve data of the specified currency +currency_pair = 'BTC_USDT' # str | Currency pair (optional) try: - # Retrieve cross margin account change history. (deprecated) - api_response = api_instance.list_cross_margin_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type) + # Get the max transferable amount for a specific margin currency + api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->list_cross_margin_account_book: %s\n" % e) + print("Exception when calling MarginApi->get_margin_transferable: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] + **currency** | **str**| Retrieve data of the specified currency | + **currency_pair** | **str**| Currency pair | [optional] ### Return type -[**list[CrossMarginAccountBook]**](CrossMarginAccountBook.md) +[**MarginTransferable**](MarginTransferable.md) ### Authorization @@ -693,7 +688,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -774,148 +769,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) -# **create_cross_margin_loan** -> CrossMarginLoan create_cross_margin_loan(cross_margin_loan) +# **list_cross_margin_repayments** +> list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) -Create a cross margin borrow loan. (deprecated) +Retrieve cross margin repayments. (deprecated) -Borrow amount cannot be less than currency minimum borrow amount - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -cross_margin_loan = gate_api.CrossMarginLoan() # CrossMarginLoan | - -try: - # Create a cross margin borrow loan. (deprecated) - api_response = api_instance.create_cross_margin_loan(cross_margin_loan) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->create_cross_margin_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cross_margin_loan** | [**CrossMarginLoan**](CrossMarginLoan.md)| | - -### Return type - -[**CrossMarginLoan**](CrossMarginLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully borrowed | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_loan** -> CrossMarginLoan get_cross_margin_loan(loan_id) - -Retrieve single borrow loan detail. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -loan_id = '12345' # str | Borrow loan ID - -try: - # Retrieve single borrow loan detail. (deprecated) - api_response = api_instance.get_cross_margin_loan(loan_id) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loan_id** | **str**| Borrow loan ID | - -### Return type - -[**CrossMarginLoan**](CrossMarginLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_cross_margin_repayments** -> list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) - -Retrieve cross margin repayments. (deprecated) - -Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. +Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. ### Example @@ -987,610 +846,3 @@ 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) -# **repay_cross_margin_loan** -> list[CrossMarginLoan] repay_cross_margin_loan(cross_margin_repay_request) - -Cross margin repayments. (deprecated) - -When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -cross_margin_repay_request = gate_api.CrossMarginRepayRequest() # CrossMarginRepayRequest | - -try: - # Cross margin repayments. (deprecated) - api_response = api_instance.repay_cross_margin_loan(cross_margin_repay_request) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->repay_cross_margin_loan: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cross_margin_repay_request** | [**CrossMarginRepayRequest**](CrossMarginRepayRequest.md)| | - -### Return type - -[**list[CrossMarginLoan]**](CrossMarginLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Loan repaid | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_interest_records** -> list[UniLoanInterestRecord] get_cross_margin_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) - -Interest records for the cross margin account. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) - -try: - # Interest records for the cross margin account. (deprecated) - api_response = api_instance.get_cross_margin_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_interest_records: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] - -### Return type - -[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_transferable** -> CrossMarginTransferable get_cross_margin_transferable(currency) - -Get the max transferable amount for a specific cross margin currency. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency - -try: - # Get the max transferable amount for a specific cross margin currency. (deprecated) - api_response = api_instance.get_cross_margin_transferable(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_transferable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - -### Return type - -[**CrossMarginTransferable**](CrossMarginTransferable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_estimate_rate** -> dict(str, str) get_cross_margin_estimate_rate(currencies) - -Estimated interest rates. (deprecated) - -Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name - -try: - # Estimated interest rates. (deprecated) - api_response = api_instance.get_cross_margin_estimate_rate(currencies) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_estimate_rate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | - -### Return type - -**dict(str, str)** - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_cross_margin_borrowable** -> UnifiedBorrowable get_cross_margin_borrowable(currency) - -Get the max borrowable amount for a specific cross margin currency. (deprecated) - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency - -try: - # Get the max borrowable amount for a specific cross margin currency. (deprecated) - api_response = api_instance.get_cross_margin_borrowable(currency) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_cross_margin_borrowable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - -### Return type - -[**UnifiedBorrowable**](UnifiedBorrowable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_user_margin_tier** -> list[MarginLeverageTier] get_user_margin_tier(currency_pair) - -Check the user's own leverage lending gradient in the current market - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair - -try: - # Check the user's own leverage lending gradient in the current market - api_response = api_instance.get_user_margin_tier(currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - -### Return type - -[**list[MarginLeverageTier]**](MarginLeverageTier.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_market_margin_tier** -> list[MarginLeverageTier] get_market_margin_tier(currency_pair) - -Query the current market leverage lending gradient - -### Example - -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair - -try: - # Query the current market leverage lending gradient - api_response = api_instance.get_market_margin_tier(currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->get_market_margin_tier: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - -### Return type - -[**list[MarginLeverageTier]**](MarginLeverageTier.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **set_user_market_leverage** -> set_user_market_leverage(margin_market_leverage) - -Set the user market leverage multiple - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | - -try: - # Set the user market leverage multiple - api_instance.set_user_market_leverage(margin_market_leverage) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | 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_margin_user_account** -> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) - -Query the user's leverage account list - -Support querying risk rate per position account and margin rate per position account - -### Example - -* Api Key Authentication (apiv4): -```python -from __future__ import print_function -import gate_api -from gate_api.exceptions import ApiException, GateApiException -# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 -# See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization -configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" -) - -api_client = gate_api.ApiClient(configuration) -# Create an instance of the API class -api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) - -try: - # Query the user's leverage account list - api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - -### Return type - -[**list[MarginAccount]**](MarginAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md index 355a750..788bbdd 100644 --- a/docs/MarginUniApi.md +++ b/docs/MarginUniApi.md @@ -5,13 +5,13 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market -[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate [**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans [**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay +[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable +[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market +[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate [**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records [**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records -[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable # **list_uni_currency_pairs** @@ -68,51 +68,66 @@ 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) -# **get_uni_currency_pair** -> UniCurrencyPair get_uni_currency_pair(currency_pair) +# **list_uni_loans** +> list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) -Get detail of lending market +List loans ### Example +* Api Key Authentication (apiv4): ```python from __future__ import print_function import gate_api from gate_api.exceptions import ApiException, GateApiException # Defining the host is optional and defaults to https://api.gateio.ws/api/v4 # See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" + 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.MarginUniApi(api_client) -currency_pair = 'AE_USDT' # str | Currency pair +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) try: - # Get detail of lending market - api_response = api_instance.get_uni_currency_pair(currency_pair) + # List loans + api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->get_uni_currency_pair: %s\n" % e) + print("Exception when calling MarginUniApi->list_uni_loans: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] ### Return type -[**UniCurrencyPair**](UniCurrencyPair.md) +[**list[UniLoan]**](UniLoan.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers @@ -126,12 +141,10 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_margin_uni_estimate_rate** -> dict(str, str) get_margin_uni_estimate_rate(currencies) - -Estimate interest Rate +# **create_uni_loan** +> create_uni_loan(create_uni_loan) -Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. +Borrow or repay ### Example @@ -157,27 +170,26 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name +create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | try: - # Estimate interest Rate - api_response = api_instance.get_margin_uni_estimate_rate(currencies) - print(api_response) + # Borrow or repay + api_instance.create_uni_loan(create_uni_loan) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->get_margin_uni_estimate_rate: %s\n" % e) + print("Exception when calling MarginUniApi->create_uni_loan: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | + **create_uni_loan** | [**CreateUniLoan**](CreateUniLoan.md)| | ### Return type -**dict(str, str)** +void (empty response body) ### Authorization @@ -185,20 +197,20 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**204** | Operated successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_uni_loans** -> list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) +# **get_uni_borrowable** +> MaxUniBorrowable get_uni_borrowable(currency, currency_pair) -List loans +Get maximum borrowable ### Example @@ -224,33 +236,29 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency = 'BTC' # str | Retrieve data of the specified currency +currency_pair = 'BTC_USDT' # str | Currency pair try: - # List loans - api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) + # Get maximum borrowable + api_response = api_instance.get_uni_borrowable(currency, 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 MarginUniApi->list_uni_loans: %s\n" % e) + print("Exception when calling MarginUniApi->get_uni_borrowable: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency** | **str**| Retrieve data of the specified currency | + **currency_pair** | **str**| Currency pair | ### Return type -[**list[UniLoan]**](UniLoan.md) +[**MaxUniBorrowable**](MaxUniBorrowable.md) ### Authorization @@ -268,76 +276,70 @@ 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_uni_loan** -> create_uni_loan(create_uni_loan) +# **get_uni_currency_pair** +> UniCurrencyPair get_uni_currency_pair(currency_pair) -Borrow or repay +Get detail of lending market ### 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.MarginUniApi(api_client) -create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | +currency_pair = 'AE_USDT' # str | Currency pair try: - # Borrow or repay - api_instance.create_uni_loan(create_uni_loan) + # Get detail of lending market + api_response = api_instance.get_uni_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 MarginUniApi->create_uni_loan: %s\n" % e) + print("Exception when calling MarginUniApi->get_uni_currency_pair: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_uni_loan** | [**CreateUniLoan**](CreateUniLoan.md)| | + **currency_pair** | **str**| Currency pair | ### Return type -void (empty response body) +[**UniCurrencyPair**](UniCurrencyPair.md) ### Authorization -[apiv4](../README.md#apiv4) +No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined + - **Content-Type**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_uni_loan_records** -> list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) +# **get_margin_uni_estimate_rate** +> dict(str, str) get_margin_uni_estimate_rate(currencies) -Get load records +Estimate interest Rate + +Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. ### Example @@ -363,35 +365,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -type = 'type_example' # str | type: borrow - borrow, repay - repay (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name try: - # Get load records - api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) + # Estimate interest Rate + api_response = api_instance.get_margin_uni_estimate_rate(currencies) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->list_uni_loan_records: %s\n" % e) + print("Exception when calling MarginUniApi->get_margin_uni_estimate_rate: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| type: borrow - borrow, repay - repay | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **currency_pair** | **str**| Currency pair | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | ### Return type -[**list[UniLoanRecord]**](UniLoanRecord.md) +**dict(str, str)** ### Authorization @@ -409,10 +403,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_uni_loan_interest_records** -> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) +# **list_uni_loan_records** +> list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) -List interest records +Get load records ### Example @@ -438,37 +432,35 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) +type = 'type_example' # str | type: borrow - borrow, repay - repay (optional) currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) try: - # List interest records - api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) + # Get load records + api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->list_uni_loan_interest_records: %s\n" % e) + print("Exception when calling MarginUniApi->list_uni_loan_records: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] + **type** | **str**| type: borrow - borrow, repay - repay | [optional] **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency_pair** | **str**| Currency pair | [optional] **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] ### Return type -[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) +[**list[UniLoanRecord]**](UniLoanRecord.md) ### Authorization @@ -486,10 +478,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_uni_borrowable** -> MaxUniBorrowable get_uni_borrowable(currency, currency_pair) +# **list_uni_loan_interest_records** +> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) -Get maximum borrowable +List interest records ### Example @@ -515,29 +507,37 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency -currency_pair = 'BTC_USDT' # str | Currency pair +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) try: - # Get maximum borrowable - api_response = api_instance.get_uni_borrowable(currency, currency_pair) + # List interest records + api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->get_uni_borrowable: %s\n" % e) + print("Exception when calling MarginUniApi->list_uni_loan_interest_records: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] ### Return type -[**MaxUniBorrowable**](MaxUniBorrowable.md) +[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) ### Authorization diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md index 6bb761e..5fd9ad7 100644 --- a/docs/SpotAccount.md +++ b/docs/SpotAccount.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **available** | **str** | Available amount | [optional] **locked** | **str** | Locked amount, used in trading | [optional] **update_id** | **int** | Version number | [optional] +**refresh_time** | **int** | Asset Refresh Time (ms) | [optional] [[Back to Model list]](../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 31944e8..5026926 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -1486,7 +1486,7 @@ Name | Type | Description | Notes Amend an order -By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation +By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, it supports modifying the price or quantity (choose one of two), and also supports modifying the price and quantity at the same time About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation ### Example diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md index de0d009..24a1bb4 100644 --- a/docs/SubCrossMarginAccount.md +++ b/docs/SubCrossMarginAccount.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_id** | **int** | User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account | [optional] **locked** | **bool** | Whether account is locked | [optional] -**balances** | [**dict(str, CrossMarginBalance1)**](CrossMarginBalance1.md) | | [optional] +**balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional] **total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] **borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] **borrowed_net** | **str** | Total borrowed value in USDT * borrowed factor | [optional] diff --git a/docs/UniInterestMode.md b/docs/UniInterestMode.md deleted file mode 100644 index 8084354..0000000 --- a/docs/UniInterestMode.md +++ /dev/null @@ -1,12 +0,0 @@ -# UniInterestMode - -Lend & Earn interest reinvestment toggle -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency | -**status** | **bool** | Interest toggle settings, true - interest reinvestment, false - regular dividend | - -[[Back to Model 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 717ef13..116b074 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -7,14 +7,14 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import -__version__ = "6.98.0" +__version__ = "6.99.0" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi @@ -86,15 +86,9 @@ from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder from gate_api.models.create_uni_lend import CreateUniLend from gate_api.models.create_uni_loan import CreateUniLoan -from gate_api.models.cross_margin_account import CrossMarginAccount -from gate_api.models.cross_margin_account_book import CrossMarginAccountBook from gate_api.models.cross_margin_balance import CrossMarginBalance -from gate_api.models.cross_margin_balance1 import CrossMarginBalance1 -from gate_api.models.cross_margin_currency import CrossMarginCurrency from gate_api.models.cross_margin_loan import CrossMarginLoan -from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest from gate_api.models.cross_margin_repayment import CrossMarginRepayment -from gate_api.models.cross_margin_transferable import CrossMarginTransferable from gate_api.models.currency import Currency from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair @@ -261,7 +255,6 @@ from gate_api.models.uni_currency import UniCurrency from gate_api.models.uni_currency_interest import UniCurrencyInterest from gate_api.models.uni_currency_pair import UniCurrencyPair -from gate_api.models.uni_interest_mode import UniInterestMode from gate_api.models.uni_interest_record import UniInterestRecord from gate_api.models.uni_lend import UniLend from gate_api.models.uni_lend_interest import UniLendInterest diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py index 2431e57..32126cb 100644 --- a/gate_api/api/account_api.py +++ b/gate_api/api/account_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py index 9e09bc7..c1eb931 100644 --- a/gate_api/api/collateral_loan_api.py +++ b/gate_api/api/collateral_loan_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/delivery_api.py b/gate_api/api/delivery_api.py index 10cb221..84ed844 100644 --- a/gate_api/api/delivery_api.py +++ b/gate_api/api/delivery_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index 9ac2cba..5f0aae0 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index f1a6139..99817ae 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -988,118 +988,6 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def switch_interest_reinvest(self, uni_interest_mode, **kwargs): # noqa: E501 - """Set interest reinvestment toggle # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.switch_interest_reinvest(uni_interest_mode, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UniInterestMode uni_interest_mode: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.switch_interest_reinvest_with_http_info(uni_interest_mode, **kwargs) # noqa: E501 - - def switch_interest_reinvest_with_http_info(self, uni_interest_mode, **kwargs): # noqa: E501 - """Set interest reinvestment toggle # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.switch_interest_reinvest_with_http_info(uni_interest_mode, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param UniInterestMode uni_interest_mode: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: None - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'uni_interest_mode' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method switch_interest_reinvest" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'uni_interest_mode' is set - if self.api_client.client_side_validation and ('uni_interest_mode' not in local_var_params or # noqa: E501 - local_var_params['uni_interest_mode'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `uni_interest_mode` when calling `switch_interest_reinvest`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'uni_interest_mode' in local_var_params: - body_params = local_var_params['uni_interest_mode'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/earn/uni/interest_reinvest', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 """query currency interest compounding status # noqa: E501 @@ -1215,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1242,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1347,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1371,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-04 01:34+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py index 1942daa..632d25e 100644 --- a/gate_api/api/flash_swap_api.py +++ b/gate_api/api/flash_swap_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index 17034f0..b98a33d 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py index 2535f54..082ec39 100644 --- a/gate_api/api/margin_api.py +++ b/gate_api/api/margin_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -144,1319 +144,16 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_margin_account_book(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 - - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_account_book(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.MarginAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 - - def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 - - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_account_book_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.MarginAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'currency_pair', - 'type', - '_from', - 'to', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_margin_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - 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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[MarginAccountBook]', # noqa: E501 - auth_settings=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_funding_accounts(self, **kwargs): # noqa: E501 - """Funding account 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_funding_accounts(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.FundingAccount] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 - - def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Funding account 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_funding_accounts_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param _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.FundingAccount], 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_funding_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( - '/margin/funding_accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[FundingAccount]', # noqa: E501 - auth_settings=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_auto_repay_status(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment 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_auto_repay_status(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.AutoRepaySetting - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 - - def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_auto_repay_status_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.AutoRepaySetting, 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_auto_repay_status" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/auto_repay', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AutoRepaySetting', # noqa: E501 - auth_settings=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_auto_repay(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment 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.set_auto_repay(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.AutoRepaySetting - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 - - def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_auto_repay_with_http_info(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method set_auto_repay" % k - ) - 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 `set_auto_repay`") # 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 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/auto_repay', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AutoRepaySetting', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_margin_transferable(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_transferable(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.MarginTransferable - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 - - def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_transferable_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.MarginTransferable, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'currency_pair' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_margin_transferable" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_margin_transferable`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/transferable', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='MarginTransferable', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_cross_margin_currencies(self, **kwargs): # noqa: E501 - """Currencies supported by cross margin.(deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginCurrency] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_cross_margin_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_cross_margin_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Currencies supported by cross margin.(deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginCurrency], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_currencies" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginCurrency]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_currency(self, currency, **kwargs): # noqa: E501 - """Retrieve detail of one single currency supported by cross margin. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_currency(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginCurrency - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_currency_with_http_info(currency, **kwargs) # noqa: E501 - - def get_cross_margin_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Retrieve detail of one single currency supported by cross margin. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_currency_with_http_info(currency, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginCurrency, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_currency" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_currency`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'currency' in local_var_params: - path_params['currency'] = local_var_params['currency'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/currencies/{currency}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginCurrency', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_account(self, **kwargs): # noqa: E501 - """Retrieve cross margin account. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_account(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginAccount - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_cross_margin_account_with_http_info(**kwargs) # noqa: E501 - - def get_cross_margin_account_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin account. (deprecated) # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_account_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginAccount, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_account" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginAccount', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_cross_margin_account_book(self, **kwargs): # noqa: E501 - """Retrieve cross margin account change history. (deprecated) # noqa: E501 - - The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_account_book(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginAccountBook] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_cross_margin_account_book_with_http_info(**kwargs) # noqa: E501 - - def list_cross_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin account change history. (deprecated) # noqa: E501 - - The record query time range is not allowed to exceed 30 days. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_account_book_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Filter by currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginAccountBook], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - '_from', - 'to', - 'page', - 'limit', - 'type' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginAccountBook]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated) # noqa: E501 - - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_loans(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) - :param str currency: Filter by currency - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginLoan] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501 - - def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated) # noqa: E501 - - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_loans_with_http_info(status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) - :param str currency: Filter by currency - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'status', - 'currency', - 'limit', - 'offset', - 'reverse' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_loans" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'status' is set - if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 - local_var_params['status'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `status` when calling `list_cross_margin_loans`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_loans`, must be a value greater than or equal to `0`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 - query_params.append(('status', local_var_params['status'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 - query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/loans', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[CrossMarginLoan]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_cross_margin_loan(self, cross_margin_loan, **kwargs): # noqa: E501 - """Create a cross margin borrow loan. (deprecated) # noqa: E501 - - Borrow amount cannot be less than currency minimum borrow amount # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cross_margin_loan(cross_margin_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CrossMarginLoan cross_margin_loan: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.CrossMarginLoan - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_cross_margin_loan_with_http_info(cross_margin_loan, **kwargs) # noqa: E501 - - def create_cross_margin_loan_with_http_info(self, cross_margin_loan, **kwargs): # noqa: E501 - """Create a cross margin borrow loan. (deprecated) # noqa: E501 - - Borrow amount cannot be less than currency minimum borrow amount # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cross_margin_loan_with_http_info(cross_margin_loan, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param CrossMarginLoan cross_margin_loan: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'cross_margin_loan' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_cross_margin_loan" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'cross_margin_loan' is set - if self.api_client.client_side_validation and ('cross_margin_loan' not in local_var_params or # noqa: E501 - local_var_params['cross_margin_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `cross_margin_loan` when calling `create_cross_margin_loan`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'cross_margin_loan' in local_var_params: - body_params = local_var_params['cross_margin_loan'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/margin/cross/loans', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='CrossMarginLoan', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_cross_margin_loan(self, loan_id, **kwargs): # noqa: E501 - """Retrieve single borrow loan detail. (deprecated) # noqa: E501 + def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 + """Check the user's own leverage lending gradient in the current market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_loan(loan_id, async_req=True) + >>> thread = api.get_user_margin_tier(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str loan_id: Borrow loan ID (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1464,23 +161,23 @@ def get_cross_margin_loan(self, loan_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.CrossMarginLoan + :rtype: list[gate_api.MarginLeverageTier] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_cross_margin_loan_with_http_info(loan_id, **kwargs) # noqa: E501 + return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 - def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 - """Retrieve single borrow loan detail. (deprecated) # noqa: E501 + def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Check the user's own leverage lending gradient in the current market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_loan_with_http_info(loan_id, async_req=True) + >>> thread = api.get_user_margin_tier_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str loan_id: Borrow loan ID (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1490,7 +187,7 @@ def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginLoan, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1498,7 +195,7 @@ def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'loan_id' + 'currency_pair' ] all_params.extend( [ @@ -1513,22 +210,22 @@ def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_loan" % k + " to method get_user_margin_tier" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'loan_id' is set - if self.api_client.client_side_validation and ('loan_id' not in local_var_params or # noqa: E501 - local_var_params['loan_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `loan_id` when calling `get_cross_margin_loan`") # noqa: E501 + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_user_margin_tier`") # noqa: E501 collection_formats = {} path_params = {} - if 'loan_id' in local_var_params: - path_params['loan_id'] = local_var_params['loan_id'] # noqa: E501 query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 header_params = {} @@ -1544,14 +241,14 @@ def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/cross/loans/{loan_id}', 'GET', + '/margin/user/loan_margin_tiers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CrossMarginLoan', # noqa: E501 + response_type='list[MarginLeverageTier]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1559,21 +256,16 @@ def get_cross_margin_loan_with_http_info(self, loan_id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_cross_margin_repayments(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated) # noqa: E501 + def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 + """Query the current market leverage lending gradient # noqa: E501 - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_repayments(async_req=True) + >>> thread = api.get_market_margin_tier(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: - :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1581,28 +273,23 @@ def list_cross_margin_repayments(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.CrossMarginRepayment] + :rtype: list[gate_api.MarginLeverageTier] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501 + return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 - def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated) # noqa: E501 + def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Query the current market leverage lending gradient # noqa: E501 - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_cross_margin_repayments_with_http_info(async_req=True) + >>> thread = api.get_market_margin_tier_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: - :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1612,7 +299,7 @@ def list_cross_margin_repayments_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.CrossMarginRepayment], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1620,11 +307,7 @@ def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency', - 'loan_id', - 'limit', - 'offset', - 'reverse' + 'currency_pair' ] all_params.extend( [ @@ -1639,32 +322,22 @@ def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_cross_margin_repayments" % k + " to method get_market_margin_tier" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_market_margin_tier`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501 - query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 - query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 + 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 = {} @@ -1677,17 +350,17 @@ def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/margin/cross/repayments', 'GET', + '/margin/loan_margin_tiers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[CrossMarginRepayment]', # noqa: E501 + response_type='list[MarginLeverageTier]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1695,17 +368,16 @@ def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def repay_cross_margin_loan(self, cross_margin_repay_request, **kwargs): # noqa: E501 - """Cross margin repayments. (deprecated) # noqa: E501 + def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 + """Set the user market leverage multiple # noqa: E501 - When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_cross_margin_loan(cross_margin_repay_request, async_req=True) + >>> thread = api.set_user_market_leverage(margin_market_leverage, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CrossMarginRepayRequest cross_margin_repay_request: (required) + :param MarginMarketLeverage margin_market_leverage: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1713,24 +385,23 @@ def repay_cross_margin_loan(self, cross_margin_repay_request, **kwargs): # noqa number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.CrossMarginLoan] + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, **kwargs) # noqa: E501 + return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 - def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **kwargs): # noqa: E501 - """Cross margin repayments. (deprecated) # noqa: E501 + def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 + """Set the user market leverage multiple # noqa: E501 - When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred.When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repay_cross_margin_loan_with_http_info(cross_margin_repay_request, async_req=True) + >>> thread = api.set_user_market_leverage_with_http_info(margin_market_leverage, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CrossMarginRepayRequest cross_margin_repay_request: (required) + :param MarginMarketLeverage margin_market_leverage: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1740,7 +411,7 @@ def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **k number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict)) + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ @@ -1748,7 +419,7 @@ def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **k local_var_params = locals() all_params = [ - 'cross_margin_repay_request' + 'margin_market_leverage' ] all_params.extend( [ @@ -1763,14 +434,14 @@ def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **k if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method repay_cross_margin_loan" % k + " to method set_user_market_leverage" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'cross_margin_repay_request' is set - if self.api_client.client_side_validation and ('cross_margin_repay_request' not in local_var_params or # noqa: E501 - local_var_params['cross_margin_repay_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `cross_margin_repay_request` when calling `repay_cross_margin_loan`") # noqa: E501 + # verify the required parameter 'margin_market_leverage' is set + if self.api_client.client_side_validation and ('margin_market_leverage' not in local_var_params or # noqa: E501 + local_var_params['margin_market_leverage'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `margin_market_leverage` when calling `set_user_market_leverage`") # noqa: E501 collection_formats = {} @@ -1784,12 +455,8 @@ def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **k local_var_files = {} body_params = None - if 'cross_margin_repay_request' in local_var_params: - body_params = local_var_params['cross_margin_repay_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - + if 'margin_market_leverage' in local_var_params: + body_params = local_var_params['margin_market_leverage'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -1798,14 +465,14 @@ def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **k auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/cross/repayments', 'POST', + '/margin/leverage/user_market_setting', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[CrossMarginLoan]', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1813,20 +480,17 @@ def repay_cross_margin_loan_with_http_info(self, cross_margin_repay_request, **k _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_cross_margin_interest_records(self, **kwargs): # noqa: E501 - """Interest records for the cross margin account. (deprecated) # noqa: E501 + def list_margin_user_account(self, **kwargs): # noqa: E501 + """Query the user's leverage account list # noqa: E501 + Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_interest_records(async_req=True) + >>> thread = api.list_margin_user_account(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp + :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. @@ -1834,27 +498,24 @@ def get_cross_margin_interest_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.UniLoanInterestRecord] + :rtype: list[gate_api.MarginAccount] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_cross_margin_interest_records_with_http_info(**kwargs) # noqa: E501 + return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 - def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """Interest records for the cross margin account. (deprecated) # noqa: E501 + def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 + """Query the user's leverage account list # noqa: E501 + Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_interest_records_with_http_info(async_req=True) + >>> thread = api.list_margin_user_account_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp + :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 @@ -1864,7 +525,7 @@ def get_cross_margin_interest_records_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.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginAccount], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1872,11 +533,7 @@ def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E local_var_params = locals() all_params = [ - 'currency', - 'page', - 'limit', - '_from', - 'to' + 'currency_pair' ] all_params.extend( [ @@ -1891,32 +548,18 @@ def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_interest_records" % k + " to method list_margin_user_account" % k ) local_var_params[k] = v del local_var_params['kwargs'] - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `get_cross_margin_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 + if '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 = {} @@ -1932,14 +575,14 @@ def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/cross/interest_records', 'GET', + '/margin/user/account', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UniLoanInterestRecord]', # noqa: E501 + response_type='list[MarginAccount]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1947,16 +590,23 @@ def get_cross_margin_interest_records_with_http_info(self, **kwargs): # noqa: E _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_cross_margin_transferable(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific cross margin currency. (deprecated) # noqa: E501 + def list_margin_account_book(self, **kwargs): # noqa: E501 + """List margin account balance change history # noqa: E501 + Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_transferable(currency, async_req=True) + >>> thread = api.list_margin_account_book(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) + :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. + :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1964,23 +614,30 @@ def get_cross_margin_transferable(self, currency, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.CrossMarginTransferable + :rtype: list[gate_api.MarginAccountBook] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_cross_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 + return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 - def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific cross margin currency. (deprecated) # noqa: E501 + def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 + """List margin account balance change history # noqa: E501 + Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_transferable_with_http_info(currency, async_req=True) + >>> thread = api.list_margin_account_book_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) + :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. + :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1990,7 +647,7 @@ def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # n number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.CrossMarginTransferable, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginAccountBook], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1998,7 +655,13 @@ def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # n local_var_params = locals() all_params = [ - 'currency' + 'currency', + 'currency_pair', + 'type', + '_from', + 'to', + 'page', + 'limit' ] all_params.extend( [ @@ -2013,15 +676,17 @@ def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # n if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_transferable" % k + " to method list_margin_account_book" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_transferable`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} @@ -2029,6 +694,18 @@ def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # n query_params = [] if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + 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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -2044,14 +721,14 @@ def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # n auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/cross/transferable', 'GET', + '/margin/account_book', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='CrossMarginTransferable', # noqa: E501 + response_type='list[MarginAccountBook]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -2059,17 +736,16 @@ def get_cross_margin_transferable_with_http_info(self, currency, **kwargs): # n _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_cross_margin_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Estimated interest rates. (deprecated) # noqa: E501 + def list_funding_accounts(self, **kwargs): # noqa: E501 + """Funding account list # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_estimate_rate(currencies, async_req=True) + >>> thread = api.list_funding_accounts(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param str currency: Retrieve data of the specified currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2077,24 +753,23 @@ def get_cross_margin_estimate_rate(self, currencies, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: dict + :rtype: list[gate_api.FundingAccount] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_cross_margin_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 + return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 - def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Estimated interest rates. (deprecated) # noqa: E501 + def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 + """Funding account list # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_cross_margin_estimate_rate_with_http_info(currencies, async_req=True) + >>> thread = api.list_funding_accounts_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param str currency: Retrieve data of the specified currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2104,7 +779,7 @@ def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.FundingAccount], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2112,7 +787,7 @@ def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): local_var_params = locals() all_params = [ - 'currencies' + 'currency' ] all_params.extend( [ @@ -2127,29 +802,18 @@ def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_estimate_rate" % k + " to method list_funding_accounts" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_cross_margin_estimate_rate`") # noqa: E501 - - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) > 10): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) < 1): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_cross_margin_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 + collection_formats = {} path_params = {} query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - collection_formats['currencies'] = 'multi' # noqa: E501 + 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 = {} @@ -2165,14 +829,14 @@ def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/cross/estimate_rate', 'GET', + '/margin/funding_accounts', '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='list[FundingAccount]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -2180,16 +844,15 @@ def get_cross_margin_estimate_rate_with_http_info(self, currencies, **kwargs): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_cross_margin_borrowable(self, currency, **kwargs): # noqa: E501 - """Get the max borrowable amount for a specific cross margin currency. (deprecated) # noqa: E501 + def get_auto_repay_status(self, **kwargs): # noqa: E501 + """Retrieve user auto repayment 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_cross_margin_borrowable(currency, async_req=True) + >>> thread = api.get_auto_repay_status(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2197,23 +860,22 @@ def get_cross_margin_borrowable(self, currency, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.UnifiedBorrowable + :rtype: gate_api.AutoRepaySetting :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_cross_margin_borrowable_with_http_info(currency, **kwargs) # noqa: E501 + return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 - def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max borrowable amount for a specific cross margin currency. (deprecated) # noqa: E501 + def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve user auto repayment 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_cross_margin_borrowable_with_http_info(currency, async_req=True) + >>> thread = api.get_auto_repay_status_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2223,7 +885,7 @@ def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noq number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedBorrowable, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2231,7 +893,6 @@ def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noq local_var_params = locals() all_params = [ - 'currency' ] all_params.extend( [ @@ -2246,22 +907,16 @@ def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noq if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_cross_margin_borrowable" % k + " to method get_auto_repay_status" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_cross_margin_borrowable`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 header_params = {} @@ -2277,14 +932,14 @@ def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noq auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/cross/borrowable', 'GET', + '/margin/auto_repay', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='UnifiedBorrowable', # noqa: E501 + response_type='AutoRepaySetting', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -2292,16 +947,16 @@ def get_cross_margin_borrowable_with_http_info(self, currency, **kwargs): # noq _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 + def set_auto_repay(self, status, **kwargs): # noqa: E501 + """Update user's auto repayment 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_user_margin_tier(currency_pair, async_req=True) + >>> thread = api.set_auto_repay(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2309,23 +964,23 @@ def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.MarginLeverageTier] + :rtype: gate_api.AutoRepaySetting :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 + return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 - def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 + def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 + """Update user's auto repayment 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_user_margin_tier_with_http_info(currency_pair, async_req=True) + >>> thread = api.set_auto_repay_with_http_info(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2335,7 +990,7 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2343,7 +998,7 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: local_var_params = locals() all_params = [ - 'currency_pair' + 'status' ] all_params.extend( [ @@ -2358,22 +1013,22 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_margin_tier" % k + " to method set_auto_repay" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_user_margin_tier`") # noqa: E501 + # 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 `set_auto_repay`") # 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 header_params = {} @@ -2389,14 +1044,14 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/user/loan_margin_tiers', 'GET', + '/margin/auto_repay', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[MarginLeverageTier]', # noqa: E501 + response_type='AutoRepaySetting', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -2404,16 +1059,17 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # noqa: E501 + def get_margin_transferable(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific margin currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_market_margin_tier(currency_pair, async_req=True) + >>> thread = api.get_margin_transferable(currency, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2421,23 +1077,24 @@ def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.MarginLeverageTier] + :rtype: gate_api.MarginTransferable :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 + return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 - def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # noqa: E501 + def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific margin currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_market_margin_tier_with_http_info(currency_pair, async_req=True) + >>> thread = api.get_margin_transferable_with_http_info(currency, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2447,7 +1104,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **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.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.MarginTransferable, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2455,6 +1112,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq local_var_params = locals() all_params = [ + 'currency', 'currency_pair' ] all_params.extend( @@ -2470,20 +1128,22 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_market_margin_tier" % k + " to method get_margin_transferable" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_market_margin_tier`") # noqa: E501 + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_margin_transferable`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 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 @@ -2498,17 +1158,17 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/loan_margin_tiers', 'GET', + '/margin/transferable', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[MarginLeverageTier]', # noqa: E501 + response_type='MarginTransferable', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -2516,16 +1176,21 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # noqa: E501 + def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 + """List cross margin borrow history. (deprecated) # noqa: E501 + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_user_market_leverage(margin_market_leverage, async_req=True) + >>> thread = api.list_cross_margin_loans(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param MarginMarketLeverage margin_market_leverage: (required) + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) + :param str currency: Filter by currency + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2533,23 +1198,28 @@ def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: list[gate_api.CrossMarginLoan] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 + return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501 - def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # noqa: E501 + def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501 + """List cross margin borrow history. (deprecated) # noqa: E501 + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_user_market_leverage_with_http_info(margin_market_leverage, async_req=True) + >>> thread = api.list_cross_margin_loans_with_http_info(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param MarginMarketLeverage margin_market_leverage: (required) + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) + :param str currency: Filter by currency + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2559,7 +1229,7 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: tuple(list[gate_api.CrossMarginLoan], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2567,7 +1237,11 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar local_var_params = locals() all_params = [ - 'margin_market_leverage' + 'status', + 'currency', + 'limit', + 'offset', + 'reverse' ] all_params.extend( [ @@ -2582,20 +1256,36 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method set_user_market_leverage" % k + " to method list_cross_margin_loans" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'margin_market_leverage' is set - if self.api_client.client_side_validation and ('margin_market_leverage' not in local_var_params or # noqa: E501 - local_var_params['margin_market_leverage'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `margin_market_leverage` when calling `set_user_market_leverage`") # noqa: E501 + # verify the required parameter 'status' is set + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `status` when calling `list_cross_margin_loans`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_loans`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_loans`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 + query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 header_params = {} @@ -2603,24 +1293,22 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar local_var_files = {} body_params = None - if 'margin_market_leverage' in local_var_params: - body_params = local_var_params['margin_market_leverage'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/leverage/user_market_setting', 'POST', + '/margin/cross/loans', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='list[CrossMarginLoan]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -2628,17 +1316,21 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_margin_user_account(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 + def list_cross_margin_repayments(self, **kwargs): # noqa: E501 + """Retrieve cross margin repayments. (deprecated) # noqa: E501 - Support querying risk rate per position account and margin rate per position account # noqa: E501 + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_user_account(async_req=True) + >>> thread = api.list_cross_margin_repayments(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :param str currency: + :param str loan_id: + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2646,24 +1338,28 @@ def list_margin_user_account(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.MarginAccount] + :rtype: list[gate_api.CrossMarginRepayment] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 + return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501 - def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 + def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve cross margin repayments. (deprecated) # noqa: E501 - Support querying risk rate per position account and margin rate per position account # noqa: E501 + Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_user_account_with_http_info(async_req=True) + >>> thread = api.list_cross_margin_repayments_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :param str currency: + :param str loan_id: + :param int limit: Maximum number of records to be returned in a single list + :param int offset: List offset, starting from 0 + :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2673,7 +1369,7 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.MarginAccount], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.CrossMarginRepayment], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2681,7 +1377,11 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency_pair' + 'currency', + 'loan_id', + 'limit', + 'offset', + 'reverse' ] all_params.extend( [ @@ -2696,18 +1396,32 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_margin_user_account" % k + " to method list_cross_margin_repayments" % k ) local_var_params[k] = v del local_var_params['kwargs'] + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_cross_margin_repayments`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency_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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'loan_id' in local_var_params and local_var_params['loan_id'] is not None: # noqa: E501 + query_params.append(('loan_id', local_var_params['loan_id'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'reverse' in local_var_params and local_var_params['reverse'] is not None: # noqa: E501 + query_params.append(('reverse', local_var_params['reverse'])) # noqa: E501 header_params = {} @@ -2723,14 +1437,14 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/user/account', 'GET', + '/margin/cross/repayments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[MarginAccount]', # noqa: E501 + response_type='list[CrossMarginRepayment]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py index bf37237..ee6f869 100644 --- a/gate_api/api/margin_uni_api.py +++ b/gate_api/api/margin_uni_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -139,16 +139,19 @@ def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 + def list_uni_loans(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency_pair(currency_pair, async_req=True) + >>> thread = api.list_uni_loans(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -156,23 +159,26 @@ def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.UniCurrencyPair + :rtype: list[gate_api.UniLoan] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 + return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 - def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 + def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency_pair_with_http_info(currency_pair, async_req=True) + >>> thread = api.list_uni_loans_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -182,7 +188,7 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.UniCurrencyPair, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -190,7 +196,10 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa local_var_params = locals() all_params = [ - 'currency_pair' + 'currency_pair', + 'currency', + 'page', + 'limit' ] all_params.extend( [ @@ -205,22 +214,30 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_uni_currency_pair" % k + " to method list_uni_loans" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} - if 'currency_pair' in local_var_params: - path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 query_params = [] + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -233,17 +250,17 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/currency_pairs/{currency_pair}', 'GET', + '/margin/uni/loans', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='UniCurrencyPair', # noqa: E501 + response_type='list[UniLoan]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -251,17 +268,16 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 + def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True) + >>> thread = api.create_uni_loan(create_uni_loan, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param CreateUniLoan create_uni_loan: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -269,24 +285,23 @@ def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: dict + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 + return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 - def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 + def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True) + >>> thread = api.create_uni_loan_with_http_info(create_uni_loan, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param CreateUniLoan create_uni_loan: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -296,7 +311,7 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ @@ -304,7 +319,7 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # local_var_params = locals() all_params = [ - 'currencies' + 'create_uni_loan' ] all_params.extend( [ @@ -319,29 +334,20 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_margin_uni_estimate_rate" % k + " to method create_uni_loan" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`") # noqa: E501 + # verify the required parameter 'create_uni_loan' is set + if self.api_client.client_side_validation and ('create_uni_loan' not in local_var_params or # noqa: E501 + local_var_params['create_uni_loan'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_uni_loan` when calling `create_uni_loan`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) > 10): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) < 1): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - collection_formats['currencies'] = 'multi' # noqa: E501 header_params = {} @@ -349,22 +355,24 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( + if 'create_uni_loan' in local_var_params: + body_params = local_var_params['create_uni_loan'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/estimate_rate', 'GET', + '/margin/uni/loans', 'POST', 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=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 @@ -372,19 +380,17 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_uni_loans(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 + """Get maximum borrowable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loans(async_req=True) + >>> thread = api.get_uni_borrowable(currency, currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -392,26 +398,24 @@ def list_uni_loans(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.UniLoan] + :rtype: gate_api.MaxUniBorrowable :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 + return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 - def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 + """Get maximum borrowable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loans_with_http_info(async_req=True) + >>> thread = api.get_uni_borrowable_with_http_info(currency, currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -421,7 +425,7 @@ def list_uni_loans_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.UniLoan], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.MaxUniBorrowable, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -429,10 +433,8 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency_pair', 'currency', - 'page', - 'limit' + 'currency_pair' ] all_params.extend( [ @@ -447,30 +449,28 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_uni_loans" % k + " to method get_uni_borrowable" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_borrowable`") # noqa: E501 + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_borrowable`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} 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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '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 = {} @@ -486,14 +486,14 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/loans', 'GET', + '/margin/uni/borrowable', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UniLoan]', # noqa: E501 + response_type='MaxUniBorrowable', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -501,16 +501,16 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 + """Get detail of lending market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_loan(create_uni_loan, async_req=True) + >>> thread = api.get_uni_currency_pair(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CreateUniLoan create_uni_loan: (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -518,23 +518,23 @@ def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: gate_api.UniCurrencyPair :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 + return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 - def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Get detail of lending market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_loan_with_http_info(create_uni_loan, async_req=True) + >>> thread = api.get_uni_currency_pair_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CreateUniLoan create_uni_loan: (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -544,7 +544,7 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: tuple(gate_api.UniCurrencyPair, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -552,7 +552,7 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 local_var_params = locals() all_params = [ - 'create_uni_loan' + 'currency_pair' ] all_params.extend( [ @@ -567,18 +567,20 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_uni_loan" % k + " to method get_uni_currency_pair" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'create_uni_loan' is set - if self.api_client.client_side_validation and ('create_uni_loan' not in local_var_params or # noqa: E501 - local_var_params['create_uni_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_uni_loan` when calling `create_uni_loan`") # noqa: E501 + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`") # noqa: E501 collection_formats = {} path_params = {} + if 'currency_pair' in local_var_params: + path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 query_params = [] @@ -588,24 +590,22 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'create_uni_loan' in local_var_params: - body_params = local_var_params['create_uni_loan'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/margin/uni/loans', 'POST', + '/margin/uni/currency_pairs/{currency_pair}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='UniCurrencyPair', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -613,20 +613,17 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_uni_loan_records(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 + """Estimate interest Rate # noqa: E501 + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_records(async_req=True) + >>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency - :param str currency_pair: Currency pair - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param list[str] currencies: An array of up to 10 specifying the currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -634,27 +631,24 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.UniLoanRecord] + :rtype: dict :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 + return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 - def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Estimate interest Rate # noqa: E501 + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_records_with_http_info(async_req=True) + >>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency - :param str currency_pair: Currency pair - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param list[str] currencies: An array of up to 10 specifying the currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -664,7 +658,7 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -672,11 +666,7 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'type', - 'currency', - 'currency_pair', - 'page', - 'limit' + 'currencies' ] all_params.extend( [ @@ -691,32 +681,29 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_uni_loan_records" % k + " to method get_margin_uni_estimate_rate" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) > 10): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) < 1): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if '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 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + collection_formats['currencies'] = 'multi' # noqa: E501 header_params = {} @@ -732,14 +719,14 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/loan_records', 'GET', + '/margin/uni/estimate_rate', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UniLoanRecord]', # noqa: E501 + 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 @@ -747,21 +734,20 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + def list_uni_loan_records(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_interest_records(async_req=True) + >>> thread = api.list_uni_loan_records(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :param str type: type: borrow - borrow, repay - repay :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -769,28 +755,27 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.UniLoanInterestRecord] + :rtype: list[gate_api.UniLoanRecord] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 + return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 - def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_interest_records_with_http_info(async_req=True) + >>> thread = api.list_uni_loan_records_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :param str type: type: borrow - borrow, repay - repay :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -800,7 +785,7 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniLoanRecord], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -808,12 +793,11 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency_pair', + 'type', 'currency', + 'currency_pair', 'page', - 'limit', - '_from', - 'to' + 'limit' ] all_params.extend( [ @@ -828,34 +812,32 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_uni_loan_interest_records" % k + " to method list_uni_loan_records" % k ) local_var_params[k] = v del local_var_params['kwargs'] if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `1000`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} 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 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if '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 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 header_params = {} @@ -871,14 +853,14 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/interest_records', 'GET', + '/margin/uni/loan_records', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UniLoanInterestRecord]', # noqa: E501 + response_type='list[UniLoanRecord]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -886,17 +868,21 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 + def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_borrowable(currency, currency_pair, async_req=True) + >>> thread = api.list_uni_loan_interest_records(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -904,24 +890,28 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.MaxUniBorrowable + :rtype: list[gate_api.UniLoanInterestRecord] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 + return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 - def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 + def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_borrowable_with_http_info(currency, currency_pair, async_req=True) + >>> thread = api.list_uni_loan_interest_records_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -931,7 +921,7 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.MaxUniBorrowable, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -939,8 +929,12 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): local_var_params = locals() all_params = [ + 'currency_pair', 'currency', - 'currency_pair' + 'page', + 'limit', + '_from', + 'to' ] all_params.extend( [ @@ -955,28 +949,34 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_uni_borrowable" % k + " to method list_uni_loan_interest_records" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_borrowable`") # noqa: E501 - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_borrowable`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 header_params = {} @@ -992,14 +992,14 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/borrowable', 'GET', + '/margin/uni/interest_records', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='MaxUniBorrowable', # noqa: E501 + response_type='list[UniLoanInterestRecord]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index 3077a14..e7df4ec 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py index 0caab31..8a46b29 100644 --- a/gate_api/api/options_api.py +++ b/gate_api/api/options_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index 3c33194..d1c59e2 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py index d3ef652..5ab8901 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -2647,7 +2647,7 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 """Amend an order # noqa: E501 - By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 + By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, it supports modifying the price or quantity (choose one of two), and also supports modifying the price and quantity at the same time About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_order(order_id, order_patch, async_req=True) @@ -2676,7 +2676,7 @@ def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: E501 """Amend an order # noqa: E501 - By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, only the price or quantity modification (choose one of two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 + By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, it supports modifying the price or quantity (choose one of two), and also supports modifying the price and quantity at the same time About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_order_with_http_info(order_id, order_patch, async_req=True) diff --git a/gate_api/api/sub_account_api.py b/gate_api/api/sub_account_api.py index a709388..0b6c230 100644 --- a/gate_api/api/sub_account_api.py +++ b/gate_api/api/sub_account_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index e139009..f976b83 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py index 551bda5..71de718 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py index 1eae9e1..eb12d52 100644 --- a/gate_api/api/withdrawal_api.py +++ b/gate_api/api/withdrawal_api.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 276a669..09d71f2 100644 --- a/gate_api/api_client.py +++ b/gate_api/api_client.py @@ -4,7 +4,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -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/6.98.0/python' + self.user_agent = 'OpenAPI-Generator/6.99.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 5018433..bf67b04 100644 --- a/gate_api/configuration.py +++ b/gate_api/configuration.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -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: 4.98.0\n"\ - "SDK Package Version: 6.98.0".\ + "Version of the API: 4.99.0\n"\ + "SDK Package Version: 6.99.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py index 4c5be07..541b24f 100644 --- a/gate_api/exceptions.py +++ b/gate_api/exceptions.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py index 8390b27..481b591 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -6,7 +6,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -56,15 +56,9 @@ from gate_api.models.create_multi_collateral_order import CreateMultiCollateralOrder from gate_api.models.create_uni_lend import CreateUniLend from gate_api.models.create_uni_loan import CreateUniLoan -from gate_api.models.cross_margin_account import CrossMarginAccount -from gate_api.models.cross_margin_account_book import CrossMarginAccountBook from gate_api.models.cross_margin_balance import CrossMarginBalance -from gate_api.models.cross_margin_balance1 import CrossMarginBalance1 -from gate_api.models.cross_margin_currency import CrossMarginCurrency from gate_api.models.cross_margin_loan import CrossMarginLoan -from gate_api.models.cross_margin_repay_request import CrossMarginRepayRequest from gate_api.models.cross_margin_repayment import CrossMarginRepayment -from gate_api.models.cross_margin_transferable import CrossMarginTransferable from gate_api.models.currency import Currency from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair @@ -231,7 +225,6 @@ from gate_api.models.uni_currency import UniCurrency from gate_api.models.uni_currency_interest import UniCurrencyInterest from gate_api.models.uni_currency_pair import UniCurrencyPair -from gate_api.models.uni_interest_mode import UniInterestMode from gate_api.models.uni_interest_record import UniInterestRecord from gate_api.models.uni_lend import UniLend from gate_api.models.uni_lend_interest import UniLendInterest diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py index b94e9f4..5fffa34 100644 --- a/gate_api/models/account_balance.py +++ b/gate_api/models/account_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py index 091274e..4998498 100644 --- a/gate_api/models/account_detail.py +++ b/gate_api/models/account_detail.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py index aa06492..3e8b0f4 100644 --- a/gate_api/models/account_detail_key.py +++ b/gate_api/models/account_detail_key.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py index 9040c3f..95db086 100644 --- a/gate_api/models/account_rate_limit.py +++ b/gate_api/models/account_rate_limit.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py index 8051cae..5982127 100644 --- a/gate_api/models/agency_commission.py +++ b/gate_api/models/agency_commission.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py index 36bd809..ecc9c5f 100644 --- a/gate_api/models/agency_commission_history.py +++ b/gate_api/models/agency_commission_history.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py index e3e1757..fd56e73 100644 --- a/gate_api/models/agency_transaction.py +++ b/gate_api/models/agency_transaction.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py index d71fc23..3d38802 100644 --- a/gate_api/models/agency_transaction_history.py +++ b/gate_api/models/agency_transaction_history.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py index a79f630..c62f47c 100644 --- a/gate_api/models/auto_repay_setting.py +++ b/gate_api/models/auto_repay_setting.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py index 9f503a6..bc32d64 100644 --- a/gate_api/models/batch_amend_item.py +++ b/gate_api/models/batch_amend_item.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py index d8dd594..09b664c 100644 --- a/gate_api/models/batch_amend_order_req.py +++ b/gate_api/models/batch_amend_order_req.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py index 5628881..6fa6c57 100644 --- a/gate_api/models/batch_futures_order.py +++ b/gate_api/models/batch_futures_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py index 362392e..354a2cc 100644 --- a/gate_api/models/batch_order.py +++ b/gate_api/models/batch_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py index 9383b42..b142099 100644 --- a/gate_api/models/borrow_currency_info.py +++ b/gate_api/models/borrow_currency_info.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py index dfe04a7..959f1c2 100644 --- a/gate_api/models/broker_commission.py +++ b/gate_api/models/broker_commission.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py index ae06559..a5bcbbe 100644 --- a/gate_api/models/broker_commission1.py +++ b/gate_api/models/broker_commission1.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py index d24e01f..3b5f9d9 100644 --- a/gate_api/models/broker_transaction.py +++ b/gate_api/models/broker_transaction.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py index 9239c29..9177e28 100644 --- a/gate_api/models/broker_transaction1.py +++ b/gate_api/models/broker_transaction1.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py index 09c5146..4a09540 100644 --- a/gate_api/models/cancel_batch_order.py +++ b/gate_api/models/cancel_batch_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py index 3aff0c6..76503c4 100644 --- a/gate_api/models/cancel_order_result.py +++ b/gate_api/models/cancel_order_result.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py index ad97e3a..cd4e49a 100644 --- a/gate_api/models/collateral_adjust.py +++ b/gate_api/models/collateral_adjust.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py index f3b76c9..3fa8742 100644 --- a/gate_api/models/collateral_adjust_res.py +++ b/gate_api/models/collateral_adjust_res.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py index eec78fb..f2f9751 100644 --- a/gate_api/models/collateral_align.py +++ b/gate_api/models/collateral_align.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py index 977d60d..5d2a6a3 100644 --- a/gate_api/models/collateral_currency.py +++ b/gate_api/models/collateral_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py index 7dd36c5..21b21af 100644 --- a/gate_api/models/collateral_currency_info.py +++ b/gate_api/models/collateral_currency_info.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py index 11a8cf5..eef42b0 100644 --- a/gate_api/models/collateral_currency_res.py +++ b/gate_api/models/collateral_currency_res.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py index cf4db09..32578f1 100644 --- a/gate_api/models/collateral_current_rate.py +++ b/gate_api/models/collateral_current_rate.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py index e910881..9268b39 100644 --- a/gate_api/models/collateral_fix_rate.py +++ b/gate_api/models/collateral_fix_rate.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py index 32d33d8..f32d6b2 100644 --- a/gate_api/models/collateral_loan_currency.py +++ b/gate_api/models/collateral_loan_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py index bf3f891..89f30c8 100644 --- a/gate_api/models/collateral_ltv.py +++ b/gate_api/models/collateral_ltv.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py index aa062ff..a3ea9d1 100644 --- a/gate_api/models/collateral_order.py +++ b/gate_api/models/collateral_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py index c6e0cb9..f6356ef 100644 --- a/gate_api/models/collateral_record.py +++ b/gate_api/models/collateral_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index 9af37ee..3f9760b 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index 4a17976..110e6de 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py index 539ec27..ecffd40 100644 --- a/gate_api/models/convert_small_balance.py +++ b/gate_api/models/convert_small_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py index 6d418dd..2acd11c 100644 --- a/gate_api/models/countdown_cancel_all_futures_task.py +++ b/gate_api/models/countdown_cancel_all_futures_task.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py index 814ccd7..9a5adfc 100644 --- a/gate_api/models/countdown_cancel_all_options_task.py +++ b/gate_api/models/countdown_cancel_all_options_task.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py index 5f338bb..f6cec97 100644 --- a/gate_api/models/countdown_cancel_all_spot_task.py +++ b/gate_api/models/countdown_cancel_all_spot_task.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py index 2cffae4..caa5b86 100644 --- a/gate_api/models/create_collateral_order.py +++ b/gate_api/models/create_collateral_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py index 6b52002..d09b926 100644 --- a/gate_api/models/create_multi_collateral_order.py +++ b/gate_api/models/create_multi_collateral_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py index e3b7191..688fa56 100644 --- a/gate_api/models/create_uni_lend.py +++ b/gate_api/models/create_uni_lend.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py index 2807ef8..875050e 100644 --- a/gate_api/models/create_uni_loan.py +++ b/gate_api/models/create_uni_loan.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/cross_margin_account.py b/gate_api/models/cross_margin_account.py deleted file mode 100644 index 77b5a23..0000000 --- a/gate_api/models/cross_margin_account.py +++ /dev/null @@ -1,569 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginAccount(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'int', - 'refresh_time': 'int', - 'locked': 'bool', - 'balances': 'dict(str, CrossMarginBalance)', - 'total': 'str', - 'borrowed': 'str', - 'interest': 'str', - 'risk': 'str', - 'total_initial_margin': 'str', - 'total_margin_balance': 'str', - 'total_maintenance_margin': 'str', - 'total_initial_margin_rate': 'str', - 'total_maintenance_margin_rate': 'str', - 'total_available_margin': 'str', - 'portfolio_margin_total': 'str', - 'portfolio_margin_total_liab': 'str', - 'portfolio_margin_total_equity': 'str' - } - - attribute_map = { - 'user_id': 'user_id', - 'refresh_time': 'refresh_time', - 'locked': 'locked', - 'balances': 'balances', - 'total': 'total', - 'borrowed': 'borrowed', - 'interest': 'interest', - 'risk': 'risk', - 'total_initial_margin': 'total_initial_margin', - 'total_margin_balance': 'total_margin_balance', - 'total_maintenance_margin': 'total_maintenance_margin', - 'total_initial_margin_rate': 'total_initial_margin_rate', - 'total_maintenance_margin_rate': 'total_maintenance_margin_rate', - 'total_available_margin': 'total_available_margin', - 'portfolio_margin_total': 'portfolio_margin_total', - 'portfolio_margin_total_liab': 'portfolio_margin_total_liab', - 'portfolio_margin_total_equity': 'portfolio_margin_total_equity' - } - - def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, interest=None, risk=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, portfolio_margin_total=None, portfolio_margin_total_liab=None, portfolio_margin_total_equity=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, bool, dict(str, CrossMarginBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None - """CrossMarginAccount - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._refresh_time = None - self._locked = None - self._balances = None - self._total = None - self._borrowed = None - self._interest = None - self._risk = None - self._total_initial_margin = None - self._total_margin_balance = None - self._total_maintenance_margin = None - self._total_initial_margin_rate = None - self._total_maintenance_margin_rate = None - self._total_available_margin = None - self._portfolio_margin_total = None - self._portfolio_margin_total_liab = None - self._portfolio_margin_total_equity = None - self.discriminator = None - - if user_id is not None: - self.user_id = user_id - if refresh_time is not None: - self.refresh_time = refresh_time - if locked is not None: - self.locked = locked - if balances is not None: - self.balances = balances - if total is not None: - self.total = total - if borrowed is not None: - self.borrowed = borrowed - if interest is not None: - self.interest = interest - if risk is not None: - self.risk = risk - if total_initial_margin is not None: - self.total_initial_margin = total_initial_margin - if total_margin_balance is not None: - self.total_margin_balance = total_margin_balance - if total_maintenance_margin is not None: - self.total_maintenance_margin = total_maintenance_margin - if total_initial_margin_rate is not None: - self.total_initial_margin_rate = total_initial_margin_rate - if total_maintenance_margin_rate is not None: - self.total_maintenance_margin_rate = total_maintenance_margin_rate - if total_available_margin is not None: - self.total_available_margin = total_available_margin - if portfolio_margin_total is not None: - self.portfolio_margin_total = portfolio_margin_total - if portfolio_margin_total_liab is not None: - self.portfolio_margin_total_liab = portfolio_margin_total_liab - if portfolio_margin_total_equity is not None: - self.portfolio_margin_total_equity = portfolio_margin_total_equity - - @property - def user_id(self): - """Gets the user_id of this CrossMarginAccount. # noqa: E501 - - User ID # noqa: E501 - - :return: The user_id of this CrossMarginAccount. # noqa: E501 - :rtype: int - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this CrossMarginAccount. - - User ID # noqa: E501 - - :param user_id: The user_id of this CrossMarginAccount. # noqa: E501 - :type: int - """ - - self._user_id = user_id - - @property - def refresh_time(self): - """Gets the refresh_time of this CrossMarginAccount. # noqa: E501 - - Time of the most recent refresh # noqa: E501 - - :return: The refresh_time of this CrossMarginAccount. # noqa: E501 - :rtype: int - """ - return self._refresh_time - - @refresh_time.setter - def refresh_time(self, refresh_time): - """Sets the refresh_time of this CrossMarginAccount. - - Time of the most recent refresh # noqa: E501 - - :param refresh_time: The refresh_time of this CrossMarginAccount. # noqa: E501 - :type: int - """ - - self._refresh_time = refresh_time - - @property - def locked(self): - """Gets the locked of this CrossMarginAccount. # noqa: E501 - - Whether account is locked # noqa: E501 - - :return: The locked of this CrossMarginAccount. # noqa: E501 - :rtype: bool - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this CrossMarginAccount. - - Whether account is locked # noqa: E501 - - :param locked: The locked of this CrossMarginAccount. # noqa: E501 - :type: bool - """ - - self._locked = locked - - @property - def balances(self): - """Gets the balances of this CrossMarginAccount. # noqa: E501 - - - :return: The balances of this CrossMarginAccount. # noqa: E501 - :rtype: dict(str, CrossMarginBalance) - """ - return self._balances - - @balances.setter - def balances(self, balances): - """Sets the balances of this CrossMarginAccount. - - - :param balances: The balances of this CrossMarginAccount. # noqa: E501 - :type: dict(str, CrossMarginBalance) - """ - - self._balances = balances - - @property - def total(self): - """Gets the total of this CrossMarginAccount. # noqa: E501 - - Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 - - :return: The total of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this CrossMarginAccount. - - Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` # noqa: E501 - - :param total: The total of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total = total - - @property - def borrowed(self): - """Gets the borrowed of this CrossMarginAccount. # noqa: E501 - - Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 - - :return: The borrowed of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this CrossMarginAccount. - - Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` # noqa: E501 - - :param borrowed: The borrowed of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def interest(self): - """Gets the interest of this CrossMarginAccount. # noqa: E501 - - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 - - :return: The interest of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this CrossMarginAccount. - - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 - - :param interest: The interest of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._interest = interest - - @property - def risk(self): - """Gets the risk of this CrossMarginAccount. # noqa: E501 - - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 - - :return: The risk of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._risk - - @risk.setter - def risk(self, risk): - """Sets the risk of this CrossMarginAccount. - - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 - - :param risk: The risk of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._risk = risk - - @property - def total_initial_margin(self): - """Gets the total_initial_margin of this CrossMarginAccount. # noqa: E501 - - Total initial margin # noqa: E501 - - :return: The total_initial_margin of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin - - @total_initial_margin.setter - def total_initial_margin(self, total_initial_margin): - """Sets the total_initial_margin of this CrossMarginAccount. - - Total initial margin # noqa: E501 - - :param total_initial_margin: The total_initial_margin of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin = total_initial_margin - - @property - def total_margin_balance(self): - """Gets the total_margin_balance of this CrossMarginAccount. # noqa: E501 - - Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501 - - :return: The total_margin_balance of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_margin_balance - - @total_margin_balance.setter - def total_margin_balance(self, total_margin_balance): - """Sets the total_margin_balance of this CrossMarginAccount. - - Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) # noqa: E501 - - :param total_margin_balance: The total_margin_balance of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_margin_balance = total_margin_balance - - @property - def total_maintenance_margin(self): - """Gets the total_maintenance_margin of this CrossMarginAccount. # noqa: E501 - - Total maintenance margin # noqa: E501 - - :return: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin - - @total_maintenance_margin.setter - def total_maintenance_margin(self, total_maintenance_margin): - """Sets the total_maintenance_margin of this CrossMarginAccount. - - Total maintenance margin # noqa: E501 - - :param total_maintenance_margin: The total_maintenance_margin of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin = total_maintenance_margin - - @property - def total_initial_margin_rate(self): - """Gets the total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 - - Total initial margin rate # noqa: E501 - - :return: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_initial_margin_rate - - @total_initial_margin_rate.setter - def total_initial_margin_rate(self, total_initial_margin_rate): - """Sets the total_initial_margin_rate of this CrossMarginAccount. - - Total initial margin rate # noqa: E501 - - :param total_initial_margin_rate: The total_initial_margin_rate of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_initial_margin_rate = total_initial_margin_rate - - @property - def total_maintenance_margin_rate(self): - """Gets the total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 - - Total maintenance margin rate # noqa: E501 - - :return: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_maintenance_margin_rate - - @total_maintenance_margin_rate.setter - def total_maintenance_margin_rate(self, total_maintenance_margin_rate): - """Sets the total_maintenance_margin_rate of this CrossMarginAccount. - - Total maintenance margin rate # noqa: E501 - - :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_maintenance_margin_rate = total_maintenance_margin_rate - - @property - def total_available_margin(self): - """Gets the total_available_margin of this CrossMarginAccount. # noqa: E501 - - Total available margin # noqa: E501 - - :return: The total_available_margin of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._total_available_margin - - @total_available_margin.setter - def total_available_margin(self, total_available_margin): - """Sets the total_available_margin of this CrossMarginAccount. - - Total available margin # noqa: E501 - - :param total_available_margin: The total_available_margin of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._total_available_margin = total_available_margin - - @property - def portfolio_margin_total(self): - """Gets the portfolio_margin_total of this CrossMarginAccount. # noqa: E501 - - Total amount of the portfolio margin account # noqa: E501 - - :return: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._portfolio_margin_total - - @portfolio_margin_total.setter - def portfolio_margin_total(self, portfolio_margin_total): - """Sets the portfolio_margin_total of this CrossMarginAccount. - - Total amount of the portfolio margin account # noqa: E501 - - :param portfolio_margin_total: The portfolio_margin_total of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._portfolio_margin_total = portfolio_margin_total - - @property - def portfolio_margin_total_liab(self): - """Gets the portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 - - Total liabilities of the portfolio margin account # noqa: E501 - - :return: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._portfolio_margin_total_liab - - @portfolio_margin_total_liab.setter - def portfolio_margin_total_liab(self, portfolio_margin_total_liab): - """Sets the portfolio_margin_total_liab of this CrossMarginAccount. - - Total liabilities of the portfolio margin account # noqa: E501 - - :param portfolio_margin_total_liab: The portfolio_margin_total_liab of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._portfolio_margin_total_liab = portfolio_margin_total_liab - - @property - def portfolio_margin_total_equity(self): - """Gets the portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 - - Total equity of the portfolio margin account # noqa: E501 - - :return: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 - :rtype: str - """ - return self._portfolio_margin_total_equity - - @portfolio_margin_total_equity.setter - def portfolio_margin_total_equity(self, portfolio_margin_total_equity): - """Sets the portfolio_margin_total_equity of this CrossMarginAccount. - - Total equity of the portfolio margin account # noqa: E501 - - :param portfolio_margin_total_equity: The portfolio_margin_total_equity of this CrossMarginAccount. # noqa: E501 - :type: str - """ - - self._portfolio_margin_total_equity = portfolio_margin_total_equity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginAccount): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginAccount): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_account_book.py b/gate_api/models/cross_margin_account_book.py deleted file mode 100644 index 5e69447..0000000 --- a/gate_api/models/cross_margin_account_book.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginAccountBook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'time': 'int', - 'currency': 'str', - 'change': 'str', - 'balance': 'str', - 'type': 'str' - } - - attribute_map = { - 'id': 'id', - 'time': 'time', - 'currency': 'currency', - 'change': 'change', - 'balance': 'balance', - 'type': 'type' - } - - def __init__(self, id=None, time=None, currency=None, change=None, balance=None, type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, str, str, str, Configuration) -> None - """CrossMarginAccountBook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._time = None - self._currency = None - self._change = None - self._balance = None - self._type = None - self.discriminator = None - - if id is not None: - self.id = id - if time is not None: - self.time = time - if currency is not None: - self.currency = currency - if change is not None: - self.change = change - if balance is not None: - self.balance = balance - if type is not None: - self.type = type - - @property - def id(self): - """Gets the id of this CrossMarginAccountBook. # noqa: E501 - - Balance change record ID # noqa: E501 - - :return: The id of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CrossMarginAccountBook. - - Balance change record ID # noqa: E501 - - :param id: The id of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def time(self): - """Gets the time of this CrossMarginAccountBook. # noqa: E501 - - The timestamp of the change (in milliseconds) # noqa: E501 - - :return: The time of this CrossMarginAccountBook. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this CrossMarginAccountBook. - - The timestamp of the change (in milliseconds) # noqa: E501 - - :param time: The time of this CrossMarginAccountBook. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def currency(self): - """Gets the currency of this CrossMarginAccountBook. # noqa: E501 - - Currency changed # noqa: E501 - - :return: The currency of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginAccountBook. - - Currency changed # noqa: E501 - - :param currency: The currency of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def change(self): - """Gets the change of this CrossMarginAccountBook. # noqa: E501 - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :return: The change of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this CrossMarginAccountBook. - - Amount changed. Positive value means transferring in, while negative out # noqa: E501 - - :param change: The change of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def balance(self): - """Gets the balance of this CrossMarginAccountBook. # noqa: E501 - - Balance after change # noqa: E501 - - :return: The balance of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this CrossMarginAccountBook. - - Balance after change # noqa: E501 - - :param balance: The balance of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._balance = balance - - @property - def type(self): - """Gets the type of this CrossMarginAccountBook. # noqa: E501 - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :return: The type of this CrossMarginAccountBook. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CrossMarginAccountBook. - - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 - - :param type: The type of this CrossMarginAccountBook. # noqa: E501 - :type: str - """ - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginAccountBook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginAccountBook): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py index a29eff3..e68e9ed 100644 --- a/gate_api/models/cross_margin_balance.py +++ b/gate_api/models/cross_margin_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -36,28 +36,18 @@ class CrossMarginBalance(object): 'available': 'str', 'freeze': 'str', 'borrowed': 'str', - 'interest': 'str', - 'negative_liab': 'str', - 'futures_pos_liab': 'str', - 'equity': 'str', - 'total_freeze': 'str', - 'total_liab': 'str' + 'interest': 'str' } attribute_map = { 'available': 'available', 'freeze': 'freeze', 'borrowed': 'borrowed', - 'interest': 'interest', - 'negative_liab': 'negative_liab', - 'futures_pos_liab': 'futures_pos_liab', - 'equity': 'equity', - 'total_freeze': 'total_freeze', - 'total_liab': 'total_liab' + 'interest': 'interest' } - def __init__(self, available=None, freeze=None, borrowed=None, interest=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, available=None, freeze=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, Configuration) -> None """CrossMarginBalance - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -67,11 +57,6 @@ def __init__(self, available=None, freeze=None, borrowed=None, interest=None, ne self._freeze = None self._borrowed = None self._interest = None - self._negative_liab = None - self._futures_pos_liab = None - self._equity = None - self._total_freeze = None - self._total_liab = None self.discriminator = None if available is not None: @@ -82,16 +67,6 @@ def __init__(self, available=None, freeze=None, borrowed=None, interest=None, ne self.borrowed = borrowed if interest is not None: self.interest = interest - if negative_liab is not None: - self.negative_liab = negative_liab - if futures_pos_liab is not None: - self.futures_pos_liab = futures_pos_liab - if equity is not None: - self.equity = equity - if total_freeze is not None: - self.total_freeze = total_freeze - if total_liab is not None: - self.total_liab = total_liab @property def available(self): @@ -185,121 +160,6 @@ def interest(self, interest): self._interest = interest - @property - def negative_liab(self): - """Gets the negative_liab of this CrossMarginBalance. # noqa: E501 - - Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501 - - :return: The negative_liab of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._negative_liab - - @negative_liab.setter - def negative_liab(self, negative_liab): - """Sets the negative_liab of this CrossMarginBalance. - - Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] # noqa: E501 - - :param negative_liab: The negative_liab of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._negative_liab = negative_liab - - @property - def futures_pos_liab(self): - """Gets the futures_pos_liab of this CrossMarginBalance. # noqa: E501 - - Borrowing to Open Positions in Futures # noqa: E501 - - :return: The futures_pos_liab of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._futures_pos_liab - - @futures_pos_liab.setter - def futures_pos_liab(self, futures_pos_liab): - """Sets the futures_pos_liab of this CrossMarginBalance. - - Borrowing to Open Positions in Futures # noqa: E501 - - :param futures_pos_liab: The futures_pos_liab of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._futures_pos_liab = futures_pos_liab - - @property - def equity(self): - """Gets the equity of this CrossMarginBalance. # noqa: E501 - - Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501 - - :return: The equity of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._equity - - @equity.setter - def equity(self, equity): - """Sets the equity of this CrossMarginBalance. - - Equity. Formula: available + freeze - borrowed + futures account's total + unrealized_pnl # noqa: E501 - - :param equity: The equity of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._equity = equity - - @property - def total_freeze(self): - """Gets the total_freeze of this CrossMarginBalance. # noqa: E501 - - Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501 - - :return: The total_freeze of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._total_freeze - - @total_freeze.setter - def total_freeze(self, total_freeze): - """Sets the total_freeze of this CrossMarginBalance. - - Total freeze. Formula: freeze + position_initial_margin + order_margin # noqa: E501 - - :param total_freeze: The total_freeze of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._total_freeze = total_freeze - - @property - def total_liab(self): - """Gets the total_liab of this CrossMarginBalance. # noqa: E501 - - Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501 - - :return: The total_liab of this CrossMarginBalance. # noqa: E501 - :rtype: str - """ - return self._total_liab - - @total_liab.setter - def total_liab(self, total_liab): - """Sets the total_liab of this CrossMarginBalance. - - Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab # noqa: E501 - - :param total_liab: The total_liab of this CrossMarginBalance. # noqa: E501 - :type: str - """ - - self._total_liab = total_liab - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/cross_margin_balance1.py b/gate_api/models/cross_margin_balance1.py deleted file mode 100644 index a03f8ae..0000000 --- a/gate_api/models/cross_margin_balance1.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginBalance1(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'available': 'str', - 'freeze': 'str', - 'borrowed': 'str', - 'interest': 'str' - } - - attribute_map = { - 'available': 'available', - 'freeze': 'freeze', - 'borrowed': 'borrowed', - 'interest': 'interest' - } - - def __init__(self, available=None, freeze=None, borrowed=None, interest=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, Configuration) -> None - """CrossMarginBalance1 - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._available = None - self._freeze = None - self._borrowed = None - self._interest = None - self.discriminator = None - - if available is not None: - self.available = available - if freeze is not None: - self.freeze = freeze - if borrowed is not None: - self.borrowed = borrowed - if interest is not None: - self.interest = interest - - @property - def available(self): - """Gets the available of this CrossMarginBalance1. # noqa: E501 - - Available amount # noqa: E501 - - :return: The available of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this CrossMarginBalance1. - - Available amount # noqa: E501 - - :param available: The available of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def freeze(self): - """Gets the freeze of this CrossMarginBalance1. # noqa: E501 - - Locked amount # noqa: E501 - - :return: The freeze of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._freeze - - @freeze.setter - def freeze(self, freeze): - """Sets the freeze of this CrossMarginBalance1. - - Locked amount # noqa: E501 - - :param freeze: The freeze of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._freeze = freeze - - @property - def borrowed(self): - """Gets the borrowed of this CrossMarginBalance1. # noqa: E501 - - Borrowed amount # noqa: E501 - - :return: The borrowed of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._borrowed - - @borrowed.setter - def borrowed(self, borrowed): - """Sets the borrowed of this CrossMarginBalance1. - - Borrowed amount # noqa: E501 - - :param borrowed: The borrowed of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._borrowed = borrowed - - @property - def interest(self): - """Gets the interest of this CrossMarginBalance1. # noqa: E501 - - Unpaid interests # noqa: E501 - - :return: The interest of this CrossMarginBalance1. # noqa: E501 - :rtype: str - """ - return self._interest - - @interest.setter - def interest(self, interest): - """Sets the interest of this CrossMarginBalance1. - - Unpaid interests # noqa: E501 - - :param interest: The interest of this CrossMarginBalance1. # noqa: E501 - :type: str - """ - - self._interest = interest - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginBalance1): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginBalance1): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_currency.py b/gate_api/models/cross_margin_currency.py deleted file mode 100644 index 02a5e76..0000000 --- a/gate_api/models/cross_margin_currency.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginCurrency(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'rate': 'str', - 'prec': 'str', - 'discount': 'str', - 'min_borrow_amount': 'str', - 'user_max_borrow_amount': 'str', - 'total_max_borrow_amount': 'str', - 'price': 'str', - 'loanable': 'bool', - 'status': 'int' - } - - attribute_map = { - 'name': 'name', - 'rate': 'rate', - 'prec': 'prec', - 'discount': 'discount', - 'min_borrow_amount': 'min_borrow_amount', - 'user_max_borrow_amount': 'user_max_borrow_amount', - 'total_max_borrow_amount': 'total_max_borrow_amount', - 'price': 'price', - 'loanable': 'loanable', - 'status': 'status' - } - - def __init__(self, name=None, rate=None, prec=None, discount=None, min_borrow_amount=None, user_max_borrow_amount=None, total_max_borrow_amount=None, price=None, loanable=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, bool, int, Configuration) -> None - """CrossMarginCurrency - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._rate = None - self._prec = None - self._discount = None - self._min_borrow_amount = None - self._user_max_borrow_amount = None - self._total_max_borrow_amount = None - self._price = None - self._loanable = None - self._status = None - self.discriminator = None - - if name is not None: - self.name = name - if rate is not None: - self.rate = rate - if prec is not None: - self.prec = prec - if discount is not None: - self.discount = discount - if min_borrow_amount is not None: - self.min_borrow_amount = min_borrow_amount - if user_max_borrow_amount is not None: - self.user_max_borrow_amount = user_max_borrow_amount - if total_max_borrow_amount is not None: - self.total_max_borrow_amount = total_max_borrow_amount - if price is not None: - self.price = price - if loanable is not None: - self.loanable = loanable - if status is not None: - self.status = status - - @property - def name(self): - """Gets the name of this CrossMarginCurrency. # noqa: E501 - - Currency name # noqa: E501 - - :return: The name of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this CrossMarginCurrency. - - Currency name # noqa: E501 - - :param name: The name of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def rate(self): - """Gets the rate of this CrossMarginCurrency. # noqa: E501 - - Minimum lending rate (hourly rate) # noqa: E501 - - :return: The rate of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._rate - - @rate.setter - def rate(self, rate): - """Sets the rate of this CrossMarginCurrency. - - Minimum lending rate (hourly rate) # noqa: E501 - - :param rate: The rate of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._rate = rate - - @property - def prec(self): - """Gets the prec of this CrossMarginCurrency. # noqa: E501 - - Currency precision # noqa: E501 - - :return: The prec of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._prec - - @prec.setter - def prec(self, prec): - """Sets the prec of this CrossMarginCurrency. - - Currency precision # noqa: E501 - - :param prec: The prec of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._prec = prec - - @property - def discount(self): - """Gets the discount of this CrossMarginCurrency. # noqa: E501 - - Currency value discount, which is used in total value calculation # noqa: E501 - - :return: The discount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._discount - - @discount.setter - def discount(self, discount): - """Sets the discount of this CrossMarginCurrency. - - Currency value discount, which is used in total value calculation # noqa: E501 - - :param discount: The discount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._discount = discount - - @property - def min_borrow_amount(self): - """Gets the min_borrow_amount of this CrossMarginCurrency. # noqa: E501 - - Minimum currency borrow amount. Unit is currency itself # noqa: E501 - - :return: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._min_borrow_amount - - @min_borrow_amount.setter - def min_borrow_amount(self, min_borrow_amount): - """Sets the min_borrow_amount of this CrossMarginCurrency. - - Minimum currency borrow amount. Unit is currency itself # noqa: E501 - - :param min_borrow_amount: The min_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._min_borrow_amount = min_borrow_amount - - @property - def user_max_borrow_amount(self): - """Gets the user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - - Maximum borrow value allowed per user, in USDT # noqa: E501 - - :return: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._user_max_borrow_amount - - @user_max_borrow_amount.setter - def user_max_borrow_amount(self, user_max_borrow_amount): - """Sets the user_max_borrow_amount of this CrossMarginCurrency. - - Maximum borrow value allowed per user, in USDT # noqa: E501 - - :param user_max_borrow_amount: The user_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._user_max_borrow_amount = user_max_borrow_amount - - @property - def total_max_borrow_amount(self): - """Gets the total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - - Maximum borrow value allowed for this currency, in USDT # noqa: E501 - - :return: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._total_max_borrow_amount - - @total_max_borrow_amount.setter - def total_max_borrow_amount(self, total_max_borrow_amount): - """Sets the total_max_borrow_amount of this CrossMarginCurrency. - - Maximum borrow value allowed for this currency, in USDT # noqa: E501 - - :param total_max_borrow_amount: The total_max_borrow_amount of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._total_max_borrow_amount = total_max_borrow_amount - - @property - def price(self): - """Gets the price of this CrossMarginCurrency. # noqa: E501 - - Price change between this currency and USDT # noqa: E501 - - :return: The price of this CrossMarginCurrency. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this CrossMarginCurrency. - - Price change between this currency and USDT # noqa: E501 - - :param price: The price of this CrossMarginCurrency. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def loanable(self): - """Gets the loanable of this CrossMarginCurrency. # noqa: E501 - - Whether currency is borrowed # noqa: E501 - - :return: The loanable of this CrossMarginCurrency. # noqa: E501 - :rtype: bool - """ - return self._loanable - - @loanable.setter - def loanable(self, loanable): - """Sets the loanable of this CrossMarginCurrency. - - Whether currency is borrowed # noqa: E501 - - :param loanable: The loanable of this CrossMarginCurrency. # noqa: E501 - :type: bool - """ - - self._loanable = loanable - - @property - def status(self): - """Gets the status of this CrossMarginCurrency. # noqa: E501 - - status - `0` : disable - `1` : enable # noqa: E501 - - :return: The status of this CrossMarginCurrency. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this CrossMarginCurrency. - - status - `0` : disable - `1` : enable # noqa: E501 - - :param status: The status of this CrossMarginCurrency. # noqa: E501 - :type: int - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginCurrency): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginCurrency): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py index 76dfbe6..104574e 100644 --- a/gate_api/models/cross_margin_loan.py +++ b/gate_api/models/cross_margin_loan.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/cross_margin_repay_request.py b/gate_api/models/cross_margin_repay_request.py deleted file mode 100644 index f980cc2..0000000 --- a/gate_api/models/cross_margin_repay_request.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginRepayRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """CrossMarginRepayRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - self.currency = currency - self.amount = amount - - @property - def currency(self): - """Gets the currency of this CrossMarginRepayRequest. # noqa: E501 - - Repayment currency # noqa: E501 - - :return: The currency of this CrossMarginRepayRequest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginRepayRequest. - - Repayment currency # noqa: E501 - - :param currency: The currency of this CrossMarginRepayRequest. # 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 CrossMarginRepayRequest. # noqa: E501 - - Repayment amount # noqa: E501 - - :return: The amount of this CrossMarginRepayRequest. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CrossMarginRepayRequest. - - Repayment amount # noqa: E501 - - :param amount: The amount of this CrossMarginRepayRequest. # 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, CrossMarginRepayRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginRepayRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py index be207d3..471e171 100644 --- a/gate_api/models/cross_margin_repayment.py +++ b/gate_api/models/cross_margin_repayment.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/cross_margin_transferable.py b/gate_api/models/cross_margin_transferable.py deleted file mode 100644 index c44d312..0000000 --- a/gate_api/models/cross_margin_transferable.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class CrossMarginTransferable(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'amount': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'amount': 'amount' - } - - def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None - """CrossMarginTransferable - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._amount = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if amount is not None: - self.amount = amount - - @property - def currency(self): - """Gets the currency of this CrossMarginTransferable. # noqa: E501 - - Currency detail # noqa: E501 - - :return: The currency of this CrossMarginTransferable. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CrossMarginTransferable. - - Currency detail # noqa: E501 - - :param currency: The currency of this CrossMarginTransferable. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def amount(self): - """Gets the amount of this CrossMarginTransferable. # noqa: E501 - - Max transferable amount # noqa: E501 - - :return: The amount of this CrossMarginTransferable. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CrossMarginTransferable. - - Max transferable amount # noqa: E501 - - :param amount: The amount of this CrossMarginTransferable. # noqa: E501 - :type: str - """ - - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CrossMarginTransferable): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CrossMarginTransferable): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py index d46aa58..0abc3aa 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py index 75bce54..4f7af01 100644 --- a/gate_api/models/currency_chain.py +++ b/gate_api/models/currency_chain.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index 328e83c..c3c5682 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py index 538c62e..592f1cc 100644 --- a/gate_api/models/currency_quota.py +++ b/gate_api/models/currency_quota.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py index 4ee1c3b..5965656 100644 --- a/gate_api/models/debit_fee.py +++ b/gate_api/models/debit_fee.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py index 3abb195..1b9a920 100644 --- a/gate_api/models/delivery_candlestick.py +++ b/gate_api/models/delivery_candlestick.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py index 7d6f6b7..cd5c9e6 100644 --- a/gate_api/models/delivery_contract.py +++ b/gate_api/models/delivery_contract.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py index 03022b7..57445ab 100644 --- a/gate_api/models/delivery_settlement.py +++ b/gate_api/models/delivery_settlement.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/delivery_ticker.py b/gate_api/models/delivery_ticker.py index 45d2846..f21680e 100644 --- a/gate_api/models/delivery_ticker.py +++ b/gate_api/models/delivery_ticker.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py index 3e09d33..79b3dfc 100644 --- a/gate_api/models/deposit_address.py +++ b/gate_api/models/deposit_address.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py index 9d9a997..a0c5229 100644 --- a/gate_api/models/deposit_record.py +++ b/gate_api/models/deposit_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py index 7b7ec9d..8df72f8 100644 --- a/gate_api/models/dual_get_orders.py +++ b/gate_api/models/dual_get_orders.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py index 7ca3655..4fd8a1e 100644 --- a/gate_api/models/dual_get_plans.py +++ b/gate_api/models/dual_get_plans.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py index f601981..2490020 100644 --- a/gate_api/models/eth2_rate_list.py +++ b/gate_api/models/eth2_rate_list.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py index dbc1701..e38c869 100644 --- a/gate_api/models/eth2_swap.py +++ b/gate_api/models/eth2_swap.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py index 0365efa..1c8d588 100644 --- a/gate_api/models/flash_swap_currency_pair.py +++ b/gate_api/models/flash_swap_currency_pair.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py index 20ba6d5..de6f73c 100644 --- a/gate_api/models/flash_swap_order.py +++ b/gate_api/models/flash_swap_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py index eca5c3c..4793ff5 100644 --- a/gate_api/models/flash_swap_order_preview.py +++ b/gate_api/models/flash_swap_order_preview.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py index 157eb1c..880ff67 100644 --- a/gate_api/models/flash_swap_order_request.py +++ b/gate_api/models/flash_swap_order_request.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py index c7323c2..93696ed 100644 --- a/gate_api/models/flash_swap_preview_request.py +++ b/gate_api/models/flash_swap_preview_request.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py index 2fbe907..3ec9497 100644 --- a/gate_api/models/funding_account.py +++ b/gate_api/models/funding_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py index 731975f..ac80327 100644 --- a/gate_api/models/funding_rate_record.py +++ b/gate_api/models/funding_rate_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py index 630ed67..dbcc368 100644 --- a/gate_api/models/future_cancel_order_result.py +++ b/gate_api/models/future_cancel_order_result.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py index dcca681..be66bc2 100644 --- a/gate_api/models/futures_account.py +++ b/gate_api/models/futures_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py index 5427c99..fe94fd3 100644 --- a/gate_api/models/futures_account_book.py +++ b/gate_api/models/futures_account_book.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py index 28bcaa5..061e15a 100644 --- a/gate_api/models/futures_account_history.py +++ b/gate_api/models/futures_account_history.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py index 74e61ee..bc4585b 100644 --- a/gate_api/models/futures_auto_deleverage.py +++ b/gate_api/models/futures_auto_deleverage.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py index afba007..a1519b9 100644 --- a/gate_api/models/futures_batch_amend_order_request.py +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py index 76be842..8dfb415 100644 --- a/gate_api/models/futures_candlestick.py +++ b/gate_api/models/futures_candlestick.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py index d06684f..761f5a2 100644 --- a/gate_api/models/futures_fee.py +++ b/gate_api/models/futures_fee.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py index a9ae015..61cb171 100644 --- a/gate_api/models/futures_index_constituents.py +++ b/gate_api/models/futures_index_constituents.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py index 498ae76..61ced9b 100644 --- a/gate_api/models/futures_initial_order.py +++ b/gate_api/models/futures_initial_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py index 05ee4ee..fab3cd8 100644 --- a/gate_api/models/futures_limit_risk_tiers.py +++ b/gate_api/models/futures_limit_risk_tiers.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py index e289507..e9653bf 100644 --- a/gate_api/models/futures_liq_order.py +++ b/gate_api/models/futures_liq_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py index 1af57ee..a18e3a7 100644 --- a/gate_api/models/futures_liquidate.py +++ b/gate_api/models/futures_liquidate.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index c9438fd..982a32d 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py index b571efe..1cbac0b 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py index 3c7770f..a24143e 100644 --- a/gate_api/models/futures_order_book.py +++ b/gate_api/models/futures_order_book.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py index 61f5d19..fd84559 100644 --- a/gate_api/models/futures_order_book_item.py +++ b/gate_api/models/futures_order_book_item.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py index 5f8a66f..d73835e 100644 --- a/gate_api/models/futures_premium_index.py +++ b/gate_api/models/futures_premium_index.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py index 1e14afa..aa7e8cf 100644 --- a/gate_api/models/futures_price_trigger.py +++ b/gate_api/models/futures_price_trigger.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index 2d33599..d91ac5a 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py index 6a5bd18..7e06b5e 100644 --- a/gate_api/models/futures_ticker.py +++ b/gate_api/models/futures_ticker.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py index 4ee47fd..2028223 100644 --- a/gate_api/models/futures_trade.py +++ b/gate_api/models/futures_trade.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py index ece1741..cbda3a1 100644 --- a/gate_api/models/index_constituent.py +++ b/gate_api/models/index_constituent.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/inline_object.py b/gate_api/models/inline_object.py index 2993042..d2d9d4f 100644 --- a/gate_api/models/inline_object.py +++ b/gate_api/models/inline_object.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py index 947d48a..247ce7a 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py index ba17db5..0dafc0a 100644 --- a/gate_api/models/inline_response2001.py +++ b/gate_api/models/inline_response2001.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py index 873dad7..b8ea7e6 100644 --- a/gate_api/models/insurance_record.py +++ b/gate_api/models/insurance_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py index e7a5398..34dbf63 100644 --- a/gate_api/models/ledger_record.py +++ b/gate_api/models/ledger_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py index 8bd7c2f..e40e58c 100644 --- a/gate_api/models/liquidate_order.py +++ b/gate_api/models/liquidate_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py index 3e2a4a7..c8cef98 100644 --- a/gate_api/models/margin_account.py +++ b/gate_api/models/margin_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py index ed7f926..a8f4637 100644 --- a/gate_api/models/margin_account_book.py +++ b/gate_api/models/margin_account_book.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py index 4ffd56d..9bcc069 100644 --- a/gate_api/models/margin_account_currency.py +++ b/gate_api/models/margin_account_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py index 42f67f7..4994e32 100644 --- a/gate_api/models/margin_leverage_tier.py +++ b/gate_api/models/margin_leverage_tier.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py index 22c1208..9ce53dd 100644 --- a/gate_api/models/margin_market_leverage.py +++ b/gate_api/models/margin_market_leverage.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py index 5246158..6d88f5a 100644 --- a/gate_api/models/margin_tiers.py +++ b/gate_api/models/margin_tiers.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py index 5c1a0ef..003d8bc 100644 --- a/gate_api/models/margin_transferable.py +++ b/gate_api/models/margin_transferable.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py index cf26283..0bc4d8d 100644 --- a/gate_api/models/max_uni_borrowable.py +++ b/gate_api/models/max_uni_borrowable.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py index 3946d72..5d2fe84 100644 --- a/gate_api/models/mock_futures_order.py +++ b/gate_api/models/mock_futures_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py index 2432c73..7e1d073 100644 --- a/gate_api/models/mock_futures_position.py +++ b/gate_api/models/mock_futures_position.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py index 73879e8..9b4aaa5 100644 --- a/gate_api/models/mock_margin_result.py +++ b/gate_api/models/mock_margin_result.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py index a122c78..2b1d611 100644 --- a/gate_api/models/mock_options_order.py +++ b/gate_api/models/mock_options_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py index 2ee7ca4..8ccf62b 100644 --- a/gate_api/models/mock_options_position.py +++ b/gate_api/models/mock_options_position.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py index aa53d7c..07dd316 100644 --- a/gate_api/models/mock_risk_unit.py +++ b/gate_api/models/mock_risk_unit.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py index 8a0d6c3..5a20682 100644 --- a/gate_api/models/mock_spot_balance.py +++ b/gate_api/models/mock_spot_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py index fae9295..c69333b 100644 --- a/gate_api/models/mock_spot_order.py +++ b/gate_api/models/mock_spot_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py index c8cb099..d84fe63 100644 --- a/gate_api/models/multi_chain_address_item.py +++ b/gate_api/models/multi_chain_address_item.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py index ea78d2e..3eee4df 100644 --- a/gate_api/models/multi_collateral_currency.py +++ b/gate_api/models/multi_collateral_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py index a4cb3cb..11a6ba2 100644 --- a/gate_api/models/multi_collateral_item.py +++ b/gate_api/models/multi_collateral_item.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py index 3a6f4a6..fa211bf 100644 --- a/gate_api/models/multi_collateral_order.py +++ b/gate_api/models/multi_collateral_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py index e46aa11..c76fb4d 100644 --- a/gate_api/models/multi_collateral_record.py +++ b/gate_api/models/multi_collateral_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py index a915c5d..b1a3e66 100644 --- a/gate_api/models/multi_collateral_record_currency.py +++ b/gate_api/models/multi_collateral_record_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py index 9c406bf..425ae47 100644 --- a/gate_api/models/multi_loan_item.py +++ b/gate_api/models/multi_loan_item.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py index 453192d..d4807aa 100644 --- a/gate_api/models/multi_loan_repay_item.py +++ b/gate_api/models/multi_loan_repay_item.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py index fbf5c87..00522d1 100644 --- a/gate_api/models/multi_repay_record.py +++ b/gate_api/models/multi_repay_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py index 906a614..91dc1d4 100644 --- a/gate_api/models/multi_repay_resp.py +++ b/gate_api/models/multi_repay_resp.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py index a9d7141..f2eded6 100644 --- a/gate_api/models/my_futures_trade.py +++ b/gate_api/models/my_futures_trade.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py index 609edd2..3bdecdb 100644 --- a/gate_api/models/my_futures_trade_time_range.py +++ b/gate_api/models/my_futures_trade_time_range.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py index 74d8355..1095f22 100644 --- a/gate_api/models/open_orders.py +++ b/gate_api/models/open_orders.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py index 156a152..1047d96 100644 --- a/gate_api/models/options_account.py +++ b/gate_api/models/options_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py index 20b2cf5..ba9ef3f 100644 --- a/gate_api/models/options_account_book.py +++ b/gate_api/models/options_account_book.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py index 04bea96..a0d7693 100644 --- a/gate_api/models/options_candlestick.py +++ b/gate_api/models/options_candlestick.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py index 19594ae..b27358c 100644 --- a/gate_api/models/options_contract.py +++ b/gate_api/models/options_contract.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py index 8ce85a9..dd89324 100644 --- a/gate_api/models/options_mmp.py +++ b/gate_api/models/options_mmp.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py index c258eac..608b0c3 100644 --- a/gate_api/models/options_mmp_reset.py +++ b/gate_api/models/options_mmp_reset.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py index cba1071..ca045a9 100644 --- a/gate_api/models/options_my_settlements.py +++ b/gate_api/models/options_my_settlements.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py index 4f40269..496af0e 100644 --- a/gate_api/models/options_my_trade.py +++ b/gate_api/models/options_my_trade.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py index 315ae97..4452fe4 100644 --- a/gate_api/models/options_order.py +++ b/gate_api/models/options_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py index fb58b31..de678fe 100644 --- a/gate_api/models/options_position.py +++ b/gate_api/models/options_position.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py index 5575dbe..2a90d9f 100644 --- a/gate_api/models/options_position_close.py +++ b/gate_api/models/options_position_close.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py index 9f9ad27..2ea8345 100644 --- a/gate_api/models/options_position_close_order.py +++ b/gate_api/models/options_position_close_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py index 12980e3..59f5e02 100644 --- a/gate_api/models/options_settlement.py +++ b/gate_api/models/options_settlement.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py index 2a7edc9..d80d3f3 100644 --- a/gate_api/models/options_ticker.py +++ b/gate_api/models/options_ticker.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py index 5a3c33d..8f3a5a4 100644 --- a/gate_api/models/options_underlying.py +++ b/gate_api/models/options_underlying.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py index 26ab38a..b5d084e 100644 --- a/gate_api/models/options_underlying_ticker.py +++ b/gate_api/models/options_underlying_ticker.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/order.py b/gate_api/models/order.py index 04ffa8a..5b554f5 100644 --- a/gate_api/models/order.py +++ b/gate_api/models/order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py index 00b3b39..06606bf 100644 --- a/gate_api/models/order_book.py +++ b/gate_api/models/order_book.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py index 2455e87..57fbf49 100644 --- a/gate_api/models/order_cancel.py +++ b/gate_api/models/order_cancel.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py index 4987b8b..76bce21 100644 --- a/gate_api/models/order_patch.py +++ b/gate_api/models/order_patch.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py index 33daa46..113ca58 100644 --- a/gate_api/models/order_resp.py +++ b/gate_api/models/order_resp.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py index 4a25646..c7e1682 100644 --- a/gate_api/models/partner_commission_history.py +++ b/gate_api/models/partner_commission_history.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py index 0105741..2914ed7 100644 --- a/gate_api/models/partner_sub.py +++ b/gate_api/models/partner_sub.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py index 41304a0..4cda806 100644 --- a/gate_api/models/partner_sub_list.py +++ b/gate_api/models/partner_sub_list.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py index 4d6d183..a107a4a 100644 --- a/gate_api/models/partner_transaction_history.py +++ b/gate_api/models/partner_transaction_history.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py index 746dea4..81cbcfd 100644 --- a/gate_api/models/patch_uni_lend.py +++ b/gate_api/models/patch_uni_lend.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py index d35eead..4b5ad5b 100644 --- a/gate_api/models/place_dual_investment_order.py +++ b/gate_api/models/place_dual_investment_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/position.py b/gate_api/models/position.py index 988a83d..47b7700 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py index a04a97e..b490bca 100644 --- a/gate_api/models/position_close.py +++ b/gate_api/models/position_close.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py index c9039cd..5faed2d 100644 --- a/gate_api/models/position_close_order.py +++ b/gate_api/models/position_close_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py index 075bf61..e325f6e 100644 --- a/gate_api/models/profit_loss_range.py +++ b/gate_api/models/profit_loss_range.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py index 8167171..d46b61e 100644 --- a/gate_api/models/rebate_user_info.py +++ b/gate_api/models/rebate_user_info.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py index 854f316..a10dca7 100644 --- a/gate_api/models/repay_currency_res.py +++ b/gate_api/models/repay_currency_res.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py index d518e47..7f2a758 100644 --- a/gate_api/models/repay_loan.py +++ b/gate_api/models/repay_loan.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py index d308f41..ceb72f5 100644 --- a/gate_api/models/repay_multi_loan.py +++ b/gate_api/models/repay_multi_loan.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py index c1670ae..972de41 100644 --- a/gate_api/models/repay_record.py +++ b/gate_api/models/repay_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py index 56f2e88..f35f56b 100644 --- a/gate_api/models/repay_record_currency.py +++ b/gate_api/models/repay_record_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py index 83f2005..e5ff874 100644 --- a/gate_api/models/repay_record_left_interest.py +++ b/gate_api/models/repay_record_left_interest.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py index 33e0709..57ccac0 100644 --- a/gate_api/models/repay_record_repaid_currency.py +++ b/gate_api/models/repay_record_repaid_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py index 880dc16..e2583ab 100644 --- a/gate_api/models/repay_record_total_interest.py +++ b/gate_api/models/repay_record_total_interest.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py index eeed503..2c83dc6 100644 --- a/gate_api/models/repay_resp.py +++ b/gate_api/models/repay_resp.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py index b7ba96e..8c056d6 100644 --- a/gate_api/models/risk_units.py +++ b/gate_api/models/risk_units.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py index 4a21db0..4359123 100644 --- a/gate_api/models/saved_address.py +++ b/gate_api/models/saved_address.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py index 1022115..cccd91a 100644 --- a/gate_api/models/small_balance.py +++ b/gate_api/models/small_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py index 449f203..3a6dc0d 100644 --- a/gate_api/models/small_balance_history.py +++ b/gate_api/models/small_balance_history.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py index c14e3ae..d050186 100644 --- a/gate_api/models/spot_account.py +++ b/gate_api/models/spot_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -36,18 +36,20 @@ class SpotAccount(object): 'currency': 'str', 'available': 'str', 'locked': 'str', - 'update_id': 'int' + 'update_id': 'int', + 'refresh_time': 'int' } attribute_map = { 'currency': 'currency', 'available': 'available', 'locked': 'locked', - 'update_id': 'update_id' + 'update_id': 'update_id', + 'refresh_time': 'refresh_time' } - 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 + def __init__(self, currency=None, available=None, locked=None, update_id=None, refresh_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, int, Configuration) -> None """SpotAccount - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -57,6 +59,7 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, l self._available = None self._locked = None self._update_id = None + self._refresh_time = None self.discriminator = None if currency is not None: @@ -67,6 +70,8 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, l self.locked = locked if update_id is not None: self.update_id = update_id + if refresh_time is not None: + self.refresh_time = refresh_time @property def currency(self): @@ -160,6 +165,29 @@ def update_id(self, update_id): self._update_id = update_id + @property + def refresh_time(self): + """Gets the refresh_time of this SpotAccount. # noqa: E501 + + Asset Refresh Time (ms) # noqa: E501 + + :return: The refresh_time of this SpotAccount. # noqa: E501 + :rtype: int + """ + return self._refresh_time + + @refresh_time.setter + def refresh_time(self, refresh_time): + """Sets the refresh_time of this SpotAccount. + + Asset Refresh Time (ms) # noqa: E501 + + :param refresh_time: The refresh_time of this SpotAccount. # noqa: E501 + :type: int + """ + + self._refresh_time = refresh_time + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py index b31c625..901158f 100644 --- a/gate_api/models/spot_account_book.py +++ b/gate_api/models/spot_account_book.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py index 317494d..33be448 100644 --- a/gate_api/models/spot_currency_chain.py +++ b/gate_api/models/spot_currency_chain.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py index 6fddcb7..76e7859 100644 --- a/gate_api/models/spot_fee.py +++ b/gate_api/models/spot_fee.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py index 3802bb8..b415d06 100644 --- a/gate_api/models/spot_insurance_history.py +++ b/gate_api/models/spot_insurance_history.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py index e1fbc64..8a34590 100644 --- a/gate_api/models/spot_price_put_order.py +++ b/gate_api/models/spot_price_put_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py index 888d766..eda7675 100644 --- a/gate_api/models/spot_price_trigger.py +++ b/gate_api/models/spot_price_trigger.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py index a803bbf..791a40b 100644 --- a/gate_api/models/spot_price_triggered_order.py +++ b/gate_api/models/spot_price_triggered_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py index 58e2b97..de740f3 100644 --- a/gate_api/models/stp_group.py +++ b/gate_api/models/stp_group.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py index 9146866..d8168cb 100644 --- a/gate_api/models/stp_group_user.py +++ b/gate_api/models/stp_group_user.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py index 08cfd6c..708a9b7 100644 --- a/gate_api/models/structured_buy.py +++ b/gate_api/models/structured_buy.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py index b0d6001..029e244 100644 --- a/gate_api/models/structured_get_project_list.py +++ b/gate_api/models/structured_get_project_list.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py index 167d45d..5d9299a 100644 --- a/gate_api/models/structured_order_list.py +++ b/gate_api/models/structured_order_list.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py index 1855685..0deb712 100644 --- a/gate_api/models/sub_account.py +++ b/gate_api/models/sub_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py index fac0f54..00d1637 100644 --- a/gate_api/models/sub_account_balance.py +++ b/gate_api/models/sub_account_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py index 41d0a80..84e232a 100644 --- a/gate_api/models/sub_account_cross_margin_balance.py +++ b/gate_api/models/sub_account_cross_margin_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py index 137dac4..c38936d 100644 --- a/gate_api/models/sub_account_futures_balance.py +++ b/gate_api/models/sub_account_futures_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py index ac86f85..e1a6bc4 100644 --- a/gate_api/models/sub_account_key.py +++ b/gate_api/models/sub_account_key.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py index 6b309fd..c611522 100644 --- a/gate_api/models/sub_account_key_perms.py +++ b/gate_api/models/sub_account_key_perms.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py index efdc5aa..e539a26 100644 --- a/gate_api/models/sub_account_margin_balance.py +++ b/gate_api/models/sub_account_margin_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py index b2cca71..d517792 100644 --- a/gate_api/models/sub_account_to_sub_account.py +++ b/gate_api/models/sub_account_to_sub_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py index ec6fade..67bdea6 100644 --- a/gate_api/models/sub_account_transfer.py +++ b/gate_api/models/sub_account_transfer.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py index d207a72..01f087b 100644 --- a/gate_api/models/sub_cross_margin_account.py +++ b/gate_api/models/sub_cross_margin_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -35,7 +35,7 @@ class SubCrossMarginAccount(object): openapi_types = { 'user_id': 'int', 'locked': 'bool', - 'balances': 'dict(str, CrossMarginBalance1)', + 'balances': 'dict(str, CrossMarginBalance)', 'total': 'str', 'borrowed': 'str', 'borrowed_net': 'str', @@ -71,7 +71,7 @@ class SubCrossMarginAccount(object): } def __init__(self, user_id=None, locked=None, balances=None, total=None, borrowed=None, borrowed_net=None, net=None, leverage=None, interest=None, risk=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, local_vars_configuration=None): # noqa: E501 - # type: (int, bool, dict(str, CrossMarginBalance1), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + # type: (int, bool, dict(str, CrossMarginBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None """SubCrossMarginAccount - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -180,7 +180,7 @@ def balances(self): :return: The balances of this SubCrossMarginAccount. # noqa: E501 - :rtype: dict(str, CrossMarginBalance1) + :rtype: dict(str, CrossMarginBalance) """ return self._balances @@ -190,7 +190,7 @@ def balances(self, balances): :param balances: The balances of this SubCrossMarginAccount. # noqa: E501 - :type: dict(str, CrossMarginBalance1) + :type: dict(str, CrossMarginBalance) """ self._balances = balances diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py index 9872c47..f8c1231 100644 --- a/gate_api/models/sub_user_mode.py +++ b/gate_api/models/sub_user_mode.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py index c3d4893..008419d 100644 --- a/gate_api/models/system_time.py +++ b/gate_api/models/system_time.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py index df8cd3d..74ed298 100644 --- a/gate_api/models/ticker.py +++ b/gate_api/models/ticker.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py index 77383c5..c682b06 100644 --- a/gate_api/models/total_balance.py +++ b/gate_api/models/total_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py index 37ba1e4..bb1b937 100644 --- a/gate_api/models/trade.py +++ b/gate_api/models/trade.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py index 3ccbbcb..ce00a67 100644 --- a/gate_api/models/trade_fee.py +++ b/gate_api/models/trade_fee.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py index e7b27e0..037d79e 100644 --- a/gate_api/models/transaction_id.py +++ b/gate_api/models/transaction_id.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py index 0ee973d..9b837cd 100644 --- a/gate_api/models/transfer.py +++ b/gate_api/models/transfer.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py index c6b58d0..849521c 100644 --- a/gate_api/models/transfer_order_status.py +++ b/gate_api/models/transfer_order_status.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py index 99a9d9c..7eb84bf 100644 --- a/gate_api/models/transferables_result.py +++ b/gate_api/models/transferables_result.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py index 9f1bfbb..519d3a6 100644 --- a/gate_api/models/trigger_order_response.py +++ b/gate_api/models/trigger_order_response.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py index c353483..e2cd41b 100644 --- a/gate_api/models/trigger_time.py +++ b/gate_api/models/trigger_time.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py index 22fd014..a0781d3 100644 --- a/gate_api/models/uid_push_order.py +++ b/gate_api/models/uid_push_order.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py index 141366f..5b4ad8f 100644 --- a/gate_api/models/uid_push_withdrawal.py +++ b/gate_api/models/uid_push_withdrawal.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py index 18cfbbf..685aede 100644 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py index eab3946..29d7c68 100644 --- a/gate_api/models/uni_currency.py +++ b/gate_api/models/uni_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py index e7e16e1..53d47a2 100644 --- a/gate_api/models/uni_currency_interest.py +++ b/gate_api/models/uni_currency_interest.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py index 4230745..f0c4974 100644 --- a/gate_api/models/uni_currency_pair.py +++ b/gate_api/models/uni_currency_pair.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_interest_mode.py b/gate_api/models/uni_interest_mode.py deleted file mode 100644 index d59ee73..0000000 --- a/gate_api/models/uni_interest_mode.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class UniInterestMode(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'status': 'bool' - } - - attribute_map = { - 'currency': 'currency', - 'status': 'status' - } - - def __init__(self, currency=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, bool, Configuration) -> None - """UniInterestMode - a 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._status = None - self.discriminator = None - - self.currency = currency - self.status = status - - @property - def currency(self): - """Gets the currency of this UniInterestMode. # noqa: E501 - - Currency # noqa: E501 - - :return: The currency of this UniInterestMode. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this UniInterestMode. - - Currency # noqa: E501 - - :param currency: The currency of this UniInterestMode. # 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 status(self): - """Gets the status of this UniInterestMode. # noqa: E501 - - Interest toggle settings, true - interest reinvestment, false - regular dividend # noqa: E501 - - :return: The status of this UniInterestMode. # noqa: E501 - :rtype: bool - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this UniInterestMode. - - Interest toggle settings, true - interest reinvestment, false - regular dividend # noqa: E501 - - :param status: The status of this UniInterestMode. # noqa: E501 - :type: bool - """ - 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, UniInterestMode): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UniInterestMode): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py index 6f72aeb..bc95310 100644 --- a/gate_api/models/uni_interest_record.py +++ b/gate_api/models/uni_interest_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py index 2ab0e21..63f1bac 100644 --- a/gate_api/models/uni_lend.py +++ b/gate_api/models/uni_lend.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py index af24f4d..dece9e9 100644 --- a/gate_api/models/uni_lend_interest.py +++ b/gate_api/models/uni_lend_interest.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py index 33beb51..a9125e0 100644 --- a/gate_api/models/uni_lend_record.py +++ b/gate_api/models/uni_lend_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py index 05602ec..5939b8e 100644 --- a/gate_api/models/uni_loan.py +++ b/gate_api/models/uni_loan.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py index 8692fe7..08c1fd6 100644 --- a/gate_api/models/uni_loan_interest_record.py +++ b/gate_api/models/uni_loan_interest_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py index 4e66127..a44e12b 100644 --- a/gate_api/models/uni_loan_record.py +++ b/gate_api/models/uni_loan_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index 647938b..9ae58a3 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index dfe2d2e..8d78ce7 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py index 8d0f838..c68fce3 100644 --- a/gate_api/models/unified_borrowable.py +++ b/gate_api/models/unified_borrowable.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/unified_borrowable1.py index 0030d15..0cacf7c 100644 --- a/gate_api/models/unified_borrowable1.py +++ b/gate_api/models/unified_borrowable1.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py index 8f244ee..e6c03a9 100644 --- a/gate_api/models/unified_currency.py +++ b/gate_api/models/unified_currency.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py index 284b118..e2f9001 100644 --- a/gate_api/models/unified_discount.py +++ b/gate_api/models/unified_discount.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py index 7aabe4a..f9d3d98 100644 --- a/gate_api/models/unified_discount_tiers.py +++ b/gate_api/models/unified_discount_tiers.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py index 1678126..5f5451c 100644 --- a/gate_api/models/unified_history_loan_rate.py +++ b/gate_api/models/unified_history_loan_rate.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py index 33ff7ed..83dbf53 100644 --- a/gate_api/models/unified_history_loan_rate_rates.py +++ b/gate_api/models/unified_history_loan_rate_rates.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py index b1779d7..2f7ea37 100644 --- a/gate_api/models/unified_leverage_config.py +++ b/gate_api/models/unified_leverage_config.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py index 5418cfc..094adb2 100644 --- a/gate_api/models/unified_leverage_setting.py +++ b/gate_api/models/unified_leverage_setting.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py index 17bef51..b4b38f1 100644 --- a/gate_api/models/unified_loan.py +++ b/gate_api/models/unified_loan.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py index 13f31e4..740f850 100644 --- a/gate_api/models/unified_loan_record.py +++ b/gate_api/models/unified_loan_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py index ae78012..dc235fb 100644 --- a/gate_api/models/unified_loan_result.py +++ b/gate_api/models/unified_loan_result.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py index 9983ac4..7d2d71c 100644 --- a/gate_api/models/unified_margin_tiers.py +++ b/gate_api/models/unified_margin_tiers.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py index c230f30..625e0ba 100644 --- a/gate_api/models/unified_mode_set.py +++ b/gate_api/models/unified_mode_set.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py index 31af02b..b9553d4 100644 --- a/gate_api/models/unified_portfolio_input.py +++ b/gate_api/models/unified_portfolio_input.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py index 21e1c97..055dc0b 100644 --- a/gate_api/models/unified_portfolio_output.py +++ b/gate_api/models/unified_portfolio_output.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py index bf4bb1c..f8414b7 100644 --- a/gate_api/models/unified_risk_units.py +++ b/gate_api/models/unified_risk_units.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py index 106fd88..248fa40 100644 --- a/gate_api/models/unified_settings.py +++ b/gate_api/models/unified_settings.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py index cf97142..85b9294 100644 --- a/gate_api/models/unified_transferable.py +++ b/gate_api/models/unified_transferable.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py index 45c8358..8a2f61e 100644 --- a/gate_api/models/user_ltv_info.py +++ b/gate_api/models/user_ltv_info.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py index 9d2264a..03808e2 100644 --- a/gate_api/models/user_sub.py +++ b/gate_api/models/user_sub.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py index 291093a..bfdce09 100644 --- a/gate_api/models/user_sub_relation.py +++ b/gate_api/models/user_sub_relation.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py index 0d681d4..5d69dcd 100644 --- a/gate_api/models/user_total_amount.py +++ b/gate_api/models/user_total_amount.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py index 3228646..943a39c 100644 --- a/gate_api/models/withdraw_status.py +++ b/gate_api/models/withdraw_status.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index 5cbee82..19ddb55 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/gate_api/rest.py b/gate_api/rest.py index 41b28cb..9cf2ba3 100644 --- a/gate_api/rest.py +++ b/gate_api/rest.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ diff --git a/setup.py b/setup.py index af0bc69..fe4d434 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - Contact: support@mail.gate.io + Contact: support@mail.gate.com Generated by: https://openapi-generator.tech """ @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.98.0" +VERSION = "6.99.0" # To install the library, run the following # # python setup.py install @@ -28,7 +28,7 @@ version=VERSION, description="Gate API v4", author="Gate API support", - author_email="support@mail.gate.io", + author_email="support@mail.gate.com", url="https://github.com/gateio/gateapi-python", keywords=["OpenAPI", "OpenAPI-Generator", "Gate API v4"], install_requires=REQUIRES, From 8d8f29d611ace251a3194e356a6b89b3114e920d Mon Sep 17 00:00:00 2001 From: gateio Date: Tue, 1 Jul 2025 13:02:14 +0000 Subject: [PATCH 08/20] update to v6.100.0 --- README.md | 44 +- docs/AccountBookResponse.md | 15 + docs/AccountsResponse.md | 15 + docs/AlphaApi.md | 566 +++++++++ docs/BrokerCommission1.md | 1 + docs/BrokerCommissionSubBrokerInfo.md | 14 + docs/BrokerTransaction1.md | 1 + docs/Contract.md | 2 + docs/Currency2.md | 16 + docs/EarnApi.md | 135 +++ docs/EarnUniApi.md | 8 +- docs/FindCoin.md | 11 + docs/FuturesApi.md | 8 +- ...eObject.md => FuturesPositionCrossMode.md} | 2 +- docs/MarginApi.md | 260 ++--- docs/MarginUniApi.md | 220 ++-- docs/OrderResponse.md | 23 + docs/PlaceOrderRequest.md | 16 + docs/PlaceOrderResponse.md | 18 + docs/QuoteRequest.md | 15 + docs/QuoteResponse.md | 20 + docs/SubAccountApi.md | 4 +- docs/SubAccountKey.md | 2 +- docs/SubAccountTransfer.md | 6 +- docs/SubAccountTransferRecordItem.md | 19 + docs/SwapCoin.md | 14 + docs/Ticker2.md | 14 + docs/WalletApi.md | 4 +- gate_api/__init__.py | 20 +- gate_api/api/__init__.py | 1 + gate_api/api/account_api.py | 2 +- gate_api/api/alpha_api.py | 1025 +++++++++++++++++ gate_api/api/collateral_loan_api.py | 2 +- gate_api/api/delivery_api.py | 2 +- gate_api/api/earn_api.py | 230 +++- gate_api/api/earn_uni_api.py | 10 +- gate_api/api/flash_swap_api.py | 2 +- gate_api/api/futures_api.py | 30 +- gate_api/api/margin_api.py | 416 +++---- gate_api/api/margin_uni_api.py | 436 +++---- gate_api/api/multi_collateral_loan_api.py | 2 +- gate_api/api/options_api.py | 2 +- gate_api/api/rebate_api.py | 2 +- gate_api/api/spot_api.py | 2 +- gate_api/api/sub_account_api.py | 8 +- gate_api/api/unified_api.py | 2 +- gate_api/api/wallet_api.py | 8 +- gate_api/api/withdrawal_api.py | 2 +- gate_api/api_client.py | 4 +- gate_api/configuration.py | 6 +- gate_api/exceptions.py | 2 +- gate_api/models/__init__.py | 17 +- gate_api/models/account_balance.py | 2 +- gate_api/models/account_book_response.py | 235 ++++ gate_api/models/account_detail.py | 2 +- gate_api/models/account_detail_key.py | 2 +- gate_api/models/account_rate_limit.py | 2 +- gate_api/models/accounts_response.py | 235 ++++ gate_api/models/agency_commission.py | 2 +- gate_api/models/agency_commission_history.py | 2 +- gate_api/models/agency_transaction.py | 2 +- gate_api/models/agency_transaction_history.py | 2 +- gate_api/models/auto_repay_setting.py | 2 +- gate_api/models/batch_amend_item.py | 2 +- gate_api/models/batch_amend_order_req.py | 2 +- gate_api/models/batch_futures_order.py | 2 +- gate_api/models/batch_order.py | 2 +- gate_api/models/borrow_currency_info.py | 2 +- gate_api/models/broker_commission.py | 2 +- gate_api/models/broker_commission1.py | 36 +- .../broker_commission_sub_broker_info.py | 207 ++++ gate_api/models/broker_transaction.py | 2 +- gate_api/models/broker_transaction1.py | 36 +- gate_api/models/cancel_batch_order.py | 2 +- gate_api/models/cancel_order_result.py | 2 +- gate_api/models/collateral_adjust.py | 2 +- gate_api/models/collateral_adjust_res.py | 2 +- gate_api/models/collateral_align.py | 2 +- gate_api/models/collateral_currency.py | 2 +- gate_api/models/collateral_currency_info.py | 2 +- gate_api/models/collateral_currency_res.py | 2 +- gate_api/models/collateral_current_rate.py | 2 +- gate_api/models/collateral_fix_rate.py | 2 +- gate_api/models/collateral_loan_currency.py | 2 +- gate_api/models/collateral_ltv.py | 2 +- gate_api/models/collateral_order.py | 2 +- gate_api/models/collateral_record.py | 2 +- gate_api/models/contract.py | 66 +- gate_api/models/contract_stat.py | 2 +- gate_api/models/convert_small_balance.py | 2 +- .../countdown_cancel_all_futures_task.py | 2 +- .../countdown_cancel_all_options_task.py | 2 +- .../models/countdown_cancel_all_spot_task.py | 2 +- gate_api/models/create_collateral_order.py | 2 +- .../models/create_multi_collateral_order.py | 2 +- gate_api/models/create_uni_lend.py | 2 +- gate_api/models/create_uni_loan.py | 2 +- gate_api/models/cross_margin_balance.py | 2 +- gate_api/models/cross_margin_loan.py | 2 +- gate_api/models/cross_margin_repayment.py | 2 +- gate_api/models/currency.py | 2 +- gate_api/models/currency2.py | 291 +++++ gate_api/models/currency_chain.py | 2 +- gate_api/models/currency_pair.py | 2 +- gate_api/models/currency_quota.py | 2 +- gate_api/models/debit_fee.py | 2 +- gate_api/models/delivery_candlestick.py | 2 +- gate_api/models/delivery_contract.py | 2 +- gate_api/models/delivery_settlement.py | 2 +- gate_api/models/delivery_ticker.py | 2 +- gate_api/models/deposit_address.py | 2 +- gate_api/models/deposit_record.py | 2 +- gate_api/models/dual_get_orders.py | 2 +- gate_api/models/dual_get_plans.py | 2 +- gate_api/models/eth2_rate_list.py | 2 +- gate_api/models/eth2_swap.py | 2 +- gate_api/models/find_coin.py | 151 +++ gate_api/models/flash_swap_currency_pair.py | 2 +- gate_api/models/flash_swap_order.py | 2 +- gate_api/models/flash_swap_order_preview.py | 2 +- gate_api/models/flash_swap_order_request.py | 2 +- gate_api/models/flash_swap_preview_request.py | 2 +- gate_api/models/funding_account.py | 2 +- gate_api/models/funding_rate_record.py | 2 +- gate_api/models/future_cancel_order_result.py | 2 +- gate_api/models/futures_account.py | 2 +- gate_api/models/futures_account_book.py | 2 +- gate_api/models/futures_account_history.py | 2 +- gate_api/models/futures_auto_deleverage.py | 2 +- .../futures_batch_amend_order_request.py | 2 +- gate_api/models/futures_candlestick.py | 2 +- gate_api/models/futures_fee.py | 2 +- gate_api/models/futures_index_constituents.py | 2 +- gate_api/models/futures_initial_order.py | 2 +- gate_api/models/futures_limit_risk_tiers.py | 2 +- gate_api/models/futures_liq_order.py | 2 +- gate_api/models/futures_liquidate.py | 2 +- gate_api/models/futures_order.py | 2 +- gate_api/models/futures_order_amendment.py | 2 +- gate_api/models/futures_order_book.py | 2 +- gate_api/models/futures_order_book_item.py | 2 +- ...ject.py => futures_position_cross_mode.py} | 26 +- gate_api/models/futures_premium_index.py | 2 +- gate_api/models/futures_price_trigger.py | 2 +- .../models/futures_price_triggered_order.py | 2 +- gate_api/models/futures_ticker.py | 2 +- gate_api/models/futures_trade.py | 2 +- gate_api/models/index_constituent.py | 2 +- gate_api/models/inline_response200.py | 2 +- gate_api/models/inline_response2001.py | 2 +- gate_api/models/insurance_record.py | 2 +- gate_api/models/ledger_record.py | 2 +- gate_api/models/liquidate_order.py | 2 +- gate_api/models/margin_account.py | 2 +- gate_api/models/margin_account_book.py | 2 +- gate_api/models/margin_account_currency.py | 2 +- gate_api/models/margin_leverage_tier.py | 2 +- gate_api/models/margin_market_leverage.py | 2 +- gate_api/models/margin_tiers.py | 2 +- gate_api/models/margin_transferable.py | 2 +- gate_api/models/max_uni_borrowable.py | 2 +- gate_api/models/mock_futures_order.py | 2 +- gate_api/models/mock_futures_position.py | 2 +- gate_api/models/mock_margin_result.py | 2 +- gate_api/models/mock_options_order.py | 2 +- gate_api/models/mock_options_position.py | 2 +- gate_api/models/mock_risk_unit.py | 2 +- gate_api/models/mock_spot_balance.py | 2 +- gate_api/models/mock_spot_order.py | 2 +- gate_api/models/multi_chain_address_item.py | 2 +- gate_api/models/multi_collateral_currency.py | 2 +- gate_api/models/multi_collateral_item.py | 2 +- gate_api/models/multi_collateral_order.py | 2 +- gate_api/models/multi_collateral_record.py | 2 +- .../multi_collateral_record_currency.py | 2 +- gate_api/models/multi_loan_item.py | 2 +- gate_api/models/multi_loan_repay_item.py | 2 +- gate_api/models/multi_repay_record.py | 2 +- gate_api/models/multi_repay_resp.py | 2 +- gate_api/models/my_futures_trade.py | 2 +- .../models/my_futures_trade_time_range.py | 2 +- gate_api/models/open_orders.py | 2 +- gate_api/models/options_account.py | 2 +- gate_api/models/options_account_book.py | 2 +- gate_api/models/options_candlestick.py | 2 +- gate_api/models/options_contract.py | 2 +- gate_api/models/options_mmp.py | 2 +- gate_api/models/options_mmp_reset.py | 2 +- gate_api/models/options_my_settlements.py | 2 +- gate_api/models/options_my_trade.py | 2 +- gate_api/models/options_order.py | 2 +- gate_api/models/options_position.py | 2 +- gate_api/models/options_position_close.py | 2 +- .../models/options_position_close_order.py | 2 +- gate_api/models/options_settlement.py | 2 +- gate_api/models/options_ticker.py | 2 +- gate_api/models/options_underlying.py | 2 +- gate_api/models/options_underlying_ticker.py | 2 +- gate_api/models/order.py | 2 +- gate_api/models/order_book.py | 2 +- gate_api/models/order_cancel.py | 2 +- gate_api/models/order_patch.py | 2 +- gate_api/models/order_resp.py | 2 +- gate_api/models/order_response.py | 459 ++++++++ gate_api/models/partner_commission_history.py | 2 +- gate_api/models/partner_sub.py | 2 +- gate_api/models/partner_sub_list.py | 2 +- .../models/partner_transaction_history.py | 2 +- gate_api/models/patch_uni_lend.py | 2 +- .../models/place_dual_investment_order.py | 2 +- gate_api/models/place_order_request.py | 268 +++++ gate_api/models/place_order_response.py | 319 +++++ gate_api/models/position.py | 2 +- gate_api/models/position_close.py | 2 +- gate_api/models/position_close_order.py | 2 +- gate_api/models/profit_loss_range.py | 2 +- gate_api/models/quote_request.py | 239 ++++ gate_api/models/quote_response.py | 375 ++++++ gate_api/models/rebate_user_info.py | 2 +- gate_api/models/repay_currency_res.py | 2 +- gate_api/models/repay_loan.py | 2 +- gate_api/models/repay_multi_loan.py | 2 +- gate_api/models/repay_record.py | 2 +- gate_api/models/repay_record_currency.py | 2 +- gate_api/models/repay_record_left_interest.py | 2 +- .../models/repay_record_repaid_currency.py | 2 +- .../models/repay_record_total_interest.py | 2 +- gate_api/models/repay_resp.py | 2 +- gate_api/models/risk_units.py | 2 +- gate_api/models/saved_address.py | 2 +- gate_api/models/small_balance.py | 2 +- gate_api/models/small_balance_history.py | 2 +- gate_api/models/spot_account.py | 2 +- gate_api/models/spot_account_book.py | 2 +- gate_api/models/spot_currency_chain.py | 2 +- gate_api/models/spot_fee.py | 2 +- gate_api/models/spot_insurance_history.py | 2 +- gate_api/models/spot_price_put_order.py | 2 +- gate_api/models/spot_price_trigger.py | 2 +- gate_api/models/spot_price_triggered_order.py | 2 +- gate_api/models/stp_group.py | 2 +- gate_api/models/stp_group_user.py | 2 +- gate_api/models/structured_buy.py | 2 +- .../models/structured_get_project_list.py | 2 +- gate_api/models/structured_order_list.py | 2 +- gate_api/models/sub_account.py | 2 +- gate_api/models/sub_account_balance.py | 2 +- .../sub_account_cross_margin_balance.py | 2 +- .../models/sub_account_futures_balance.py | 2 +- gate_api/models/sub_account_key.py | 10 +- gate_api/models/sub_account_key_perms.py | 2 +- gate_api/models/sub_account_margin_balance.py | 2 +- gate_api/models/sub_account_to_sub_account.py | 2 +- gate_api/models/sub_account_transfer.py | 126 +- .../sub_account_transfer_record_item.py | 379 ++++++ gate_api/models/sub_cross_margin_account.py | 2 +- gate_api/models/sub_user_mode.py | 2 +- gate_api/models/swap_coin.py | 210 ++++ gate_api/models/system_time.py | 2 +- gate_api/models/ticker.py | 2 +- gate_api/models/ticker2.py | 235 ++++ gate_api/models/total_balance.py | 2 +- gate_api/models/trade.py | 2 +- gate_api/models/trade_fee.py | 2 +- gate_api/models/transaction_id.py | 2 +- gate_api/models/transfer.py | 2 +- gate_api/models/transfer_order_status.py | 2 +- gate_api/models/transferables_result.py | 2 +- gate_api/models/trigger_order_response.py | 2 +- gate_api/models/trigger_time.py | 2 +- gate_api/models/uid_push_order.py | 2 +- gate_api/models/uid_push_withdrawal.py | 2 +- gate_api/models/uid_push_withdrawal_resp.py | 2 +- gate_api/models/uni_currency.py | 2 +- gate_api/models/uni_currency_interest.py | 2 +- gate_api/models/uni_currency_pair.py | 2 +- gate_api/models/uni_interest_record.py | 2 +- gate_api/models/uni_lend.py | 2 +- gate_api/models/uni_lend_interest.py | 2 +- gate_api/models/uni_lend_record.py | 2 +- gate_api/models/uni_loan.py | 2 +- gate_api/models/uni_loan_interest_record.py | 2 +- gate_api/models/uni_loan_record.py | 2 +- gate_api/models/unified_account.py | 2 +- gate_api/models/unified_balance.py | 2 +- gate_api/models/unified_borrowable.py | 2 +- gate_api/models/unified_borrowable1.py | 2 +- gate_api/models/unified_currency.py | 2 +- gate_api/models/unified_discount.py | 2 +- gate_api/models/unified_discount_tiers.py | 2 +- gate_api/models/unified_history_loan_rate.py | 2 +- .../models/unified_history_loan_rate_rates.py | 2 +- gate_api/models/unified_leverage_config.py | 2 +- gate_api/models/unified_leverage_setting.py | 2 +- gate_api/models/unified_loan.py | 2 +- gate_api/models/unified_loan_record.py | 2 +- gate_api/models/unified_loan_result.py | 2 +- gate_api/models/unified_margin_tiers.py | 2 +- gate_api/models/unified_mode_set.py | 2 +- gate_api/models/unified_portfolio_input.py | 2 +- gate_api/models/unified_portfolio_output.py | 2 +- gate_api/models/unified_risk_units.py | 2 +- gate_api/models/unified_settings.py | 2 +- gate_api/models/unified_transferable.py | 2 +- gate_api/models/user_ltv_info.py | 2 +- gate_api/models/user_sub.py | 2 +- gate_api/models/user_sub_relation.py | 2 +- gate_api/models/user_total_amount.py | 2 +- gate_api/models/withdraw_status.py | 2 +- gate_api/models/withdrawal_record.py | 2 +- gate_api/rest.py | 2 +- setup.py | 4 +- 312 files changed, 6954 insertions(+), 1139 deletions(-) create mode 100644 docs/AccountBookResponse.md create mode 100644 docs/AccountsResponse.md create mode 100644 docs/AlphaApi.md create mode 100644 docs/BrokerCommissionSubBrokerInfo.md create mode 100644 docs/Currency2.md create mode 100644 docs/FindCoin.md rename docs/{InlineObject.md => FuturesPositionCrossMode.md} (93%) create mode 100644 docs/OrderResponse.md create mode 100644 docs/PlaceOrderRequest.md create mode 100644 docs/PlaceOrderResponse.md create mode 100644 docs/QuoteRequest.md create mode 100644 docs/QuoteResponse.md create mode 100644 docs/SubAccountTransferRecordItem.md create mode 100644 docs/SwapCoin.md create mode 100644 docs/Ticker2.md create mode 100644 gate_api/api/alpha_api.py create mode 100644 gate_api/models/account_book_response.py create mode 100644 gate_api/models/accounts_response.py create mode 100644 gate_api/models/broker_commission_sub_broker_info.py create mode 100644 gate_api/models/currency2.py create mode 100644 gate_api/models/find_coin.py rename gate_api/models/{inline_object.py => futures_position_cross_mode.py} (81%) create mode 100644 gate_api/models/order_response.py create mode 100644 gate_api/models/place_order_request.py create mode 100644 gate_api/models/place_order_response.py create mode 100644 gate_api/models/quote_request.py create mode 100644 gate_api/models/quote_response.py create mode 100644 gate_api/models/sub_account_transfer_record_item.py create mode 100644 gate_api/models/swap_coin.py create mode 100644 gate_api/models/ticker2.py diff --git a/README.md b/README.md index 73ab507..addad48 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,11 @@ Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. + This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.99.0 -- Package version: 6.99.0 +- API version: 4.100.0 +- Package version: 6.100.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) @@ -118,13 +119,13 @@ Class | Method | HTTP request | Description *EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart *EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate *MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans -*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay -*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable *MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market *MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate +*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans +*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay *MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records *MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records +*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable *SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts *SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account *SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account @@ -166,6 +167,14 @@ Class | Method | HTTP request | Description *AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group *AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. *AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. +*AlphaApi* | [**list_alpha_accounts**](docs/AlphaApi.md#list_alpha_accounts) | **GET** /alpha/accounts | API for Alpha Accounts +*AlphaApi* | [**list_alpha_account_book**](docs/AlphaApi.md#list_alpha_account_book) | **GET** /alpha/account_book | Alpha Asset Transaction API +*AlphaApi* | [**quote_alpha_order**](docs/AlphaApi.md#quote_alpha_order) | **POST** /alpha/quote | Alpha Quotation API +*AlphaApi* | [**list_alpha_order**](docs/AlphaApi.md#list_alpha_order) | **GET** /alpha/orders | Alpha 查询订单列表接口 +*AlphaApi* | [**place_alpha_order**](docs/AlphaApi.md#place_alpha_order) | **POST** /alpha/orders | Alpha Order Placement API +*AlphaApi* | [**get_alpha_order**](docs/AlphaApi.md#get_alpha_order) | **GET** /alpha/order | Alpha 查询单个订单接口 +*AlphaApi* | [**list_alpha_currencies**](docs/AlphaApi.md#list_alpha_currencies) | **GET** /alpha/currencies | 查询币种信息 +*AlphaApi* | [**list_alpha_tickers**](docs/AlphaApi.md#list_alpha_tickers) | **GET** /alpha/tickers | 查询币种ticker *CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders *CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order *CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order @@ -213,6 +222,8 @@ Class | Method | HTTP request | Description *EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List *EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List *EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order +*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | 链上赚币币种 +*EarnApi* | [**swap_staking_coin**](docs/EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins *FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap *FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders *FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order @@ -267,15 +278,15 @@ Class | Method | HTTP request | Description *FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order *FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order *MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list -*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list *MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history *MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list *MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting *MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting *MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency +*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market +*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient +*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple +*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list *MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) *MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) *MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders @@ -388,9 +399,11 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AccountBalance](docs/AccountBalance.md) + - [AccountBookResponse](docs/AccountBookResponse.md) - [AccountDetail](docs/AccountDetail.md) - [AccountDetailKey](docs/AccountDetailKey.md) - [AccountRateLimit](docs/AccountRateLimit.md) + - [AccountsResponse](docs/AccountsResponse.md) - [AgencyCommission](docs/AgencyCommission.md) - [AgencyCommissionHistory](docs/AgencyCommissionHistory.md) - [AgencyTransaction](docs/AgencyTransaction.md) @@ -403,6 +416,7 @@ Class | Method | HTTP request | Description - [BorrowCurrencyInfo](docs/BorrowCurrencyInfo.md) - [BrokerCommission](docs/BrokerCommission.md) - [BrokerCommission1](docs/BrokerCommission1.md) + - [BrokerCommissionSubBrokerInfo](docs/BrokerCommissionSubBrokerInfo.md) - [BrokerTransaction](docs/BrokerTransaction.md) - [BrokerTransaction1](docs/BrokerTransaction1.md) - [CancelBatchOrder](docs/CancelBatchOrder.md) @@ -433,6 +447,7 @@ Class | Method | HTTP request | Description - [CrossMarginLoan](docs/CrossMarginLoan.md) - [CrossMarginRepayment](docs/CrossMarginRepayment.md) - [Currency](docs/Currency.md) + - [Currency2](docs/Currency2.md) - [CurrencyChain](docs/CurrencyChain.md) - [CurrencyPair](docs/CurrencyPair.md) - [CurrencyQuota](docs/CurrencyQuota.md) @@ -447,6 +462,7 @@ Class | Method | HTTP request | Description - [DualGetPlans](docs/DualGetPlans.md) - [Eth2RateList](docs/Eth2RateList.md) - [Eth2Swap](docs/Eth2Swap.md) + - [FindCoin](docs/FindCoin.md) - [FlashSwapCurrencyPair](docs/FlashSwapCurrencyPair.md) - [FlashSwapOrder](docs/FlashSwapOrder.md) - [FlashSwapOrderPreview](docs/FlashSwapOrderPreview.md) @@ -471,13 +487,13 @@ Class | Method | HTTP request | Description - [FuturesOrderAmendment](docs/FuturesOrderAmendment.md) - [FuturesOrderBook](docs/FuturesOrderBook.md) - [FuturesOrderBookItem](docs/FuturesOrderBookItem.md) + - [FuturesPositionCrossMode](docs/FuturesPositionCrossMode.md) - [FuturesPremiumIndex](docs/FuturesPremiumIndex.md) - [FuturesPriceTrigger](docs/FuturesPriceTrigger.md) - [FuturesPriceTriggeredOrder](docs/FuturesPriceTriggeredOrder.md) - [FuturesTicker](docs/FuturesTicker.md) - [FuturesTrade](docs/FuturesTrade.md) - [IndexConstituent](docs/IndexConstituent.md) - - [InlineObject](docs/InlineObject.md) - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) - [InsuranceRecord](docs/InsuranceRecord.md) @@ -533,16 +549,21 @@ Class | Method | HTTP request | Description - [OrderCancel](docs/OrderCancel.md) - [OrderPatch](docs/OrderPatch.md) - [OrderResp](docs/OrderResp.md) + - [OrderResponse](docs/OrderResponse.md) - [PartnerCommissionHistory](docs/PartnerCommissionHistory.md) - [PartnerSub](docs/PartnerSub.md) - [PartnerSubList](docs/PartnerSubList.md) - [PartnerTransactionHistory](docs/PartnerTransactionHistory.md) - [PatchUniLend](docs/PatchUniLend.md) - [PlaceDualInvestmentOrder](docs/PlaceDualInvestmentOrder.md) + - [PlaceOrderRequest](docs/PlaceOrderRequest.md) + - [PlaceOrderResponse](docs/PlaceOrderResponse.md) - [Position](docs/Position.md) - [PositionClose](docs/PositionClose.md) - [PositionCloseOrder](docs/PositionCloseOrder.md) - [ProfitLossRange](docs/ProfitLossRange.md) + - [QuoteRequest](docs/QuoteRequest.md) + - [QuoteResponse](docs/QuoteResponse.md) - [RebateUserInfo](docs/RebateUserInfo.md) - [RepayCurrencyRes](docs/RepayCurrencyRes.md) - [RepayLoan](docs/RepayLoan.md) @@ -579,10 +600,13 @@ Class | Method | HTTP request | Description - [SubAccountMarginBalance](docs/SubAccountMarginBalance.md) - [SubAccountToSubAccount](docs/SubAccountToSubAccount.md) - [SubAccountTransfer](docs/SubAccountTransfer.md) + - [SubAccountTransferRecordItem](docs/SubAccountTransferRecordItem.md) - [SubCrossMarginAccount](docs/SubCrossMarginAccount.md) - [SubUserMode](docs/SubUserMode.md) + - [SwapCoin](docs/SwapCoin.md) - [SystemTime](docs/SystemTime.md) - [Ticker](docs/Ticker.md) + - [Ticker2](docs/Ticker2.md) - [TotalBalance](docs/TotalBalance.md) - [Trade](docs/Trade.md) - [TradeFee](docs/TradeFee.md) diff --git a/docs/AccountBookResponse.md b/docs/AccountBookResponse.md new file mode 100644 index 0000000..f281b4e --- /dev/null +++ b/docs/AccountBookResponse.md @@ -0,0 +1,15 @@ +# AccountBookResponse + +Quotation Response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] +**time** | **int** | 操作时间戳 | [optional] +**currency** | **str** | Currency name | [optional] +**change** | **str** | Change amount | [optional] +**balance** | **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/AccountsResponse.md b/docs/AccountsResponse.md new file mode 100644 index 0000000..eaf7a6b --- /dev/null +++ b/docs/AccountsResponse.md @@ -0,0 +1,15 @@ +# AccountsResponse + +Quotation Response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency name | [optional] +**available** | **str** | Available Balance | [optional] +**locked** | **str** | 锁定余额 | [optional] +**token_address** | **str** | token 地址 | [optional] +**chain** | **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/AlphaApi.md b/docs/AlphaApi.md new file mode 100644 index 0000000..92a4279 --- /dev/null +++ b/docs/AlphaApi.md @@ -0,0 +1,566 @@ +# gate_api.AlphaApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_alpha_accounts**](AlphaApi.md#list_alpha_accounts) | **GET** /alpha/accounts | API for Alpha Accounts +[**list_alpha_account_book**](AlphaApi.md#list_alpha_account_book) | **GET** /alpha/account_book | Alpha Asset Transaction API +[**quote_alpha_order**](AlphaApi.md#quote_alpha_order) | **POST** /alpha/quote | Alpha Quotation API +[**list_alpha_order**](AlphaApi.md#list_alpha_order) | **GET** /alpha/orders | Alpha 查询订单列表接口 +[**place_alpha_order**](AlphaApi.md#place_alpha_order) | **POST** /alpha/orders | Alpha Order Placement API +[**get_alpha_order**](AlphaApi.md#get_alpha_order) | **GET** /alpha/order | Alpha 查询单个订单接口 +[**list_alpha_currencies**](AlphaApi.md#list_alpha_currencies) | **GET** /alpha/currencies | 查询币种信息 +[**list_alpha_tickers**](AlphaApi.md#list_alpha_tickers) | **GET** /alpha/tickers | 查询币种ticker + + +# **list_alpha_accounts** +> list[AccountsResponse] list_alpha_accounts() + +API for Alpha Accounts + +Query Position Assets + +### 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.AlphaApi(api_client) + +try: + # API for Alpha Accounts + api_response = api_instance.list_alpha_accounts() + 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 AlphaApi->list_alpha_accounts: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[AccountsResponse]**](AccountsResponse.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** | 查询持仓成功 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_alpha_account_book** +> list[AccountBookResponse] list_alpha_account_book(_from, to=to, page=page, limit=limit) + +Alpha Asset Transaction API + +Query Asset Transactions + +### 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.AlphaApi(api_client) +_from = 56 # int | Start timestamp of the query +to = 56 # int | Time range ending, default to current time (optional) +page = 56 # int | Page number (optional) +limit = 56 # int | The maximum number of items per page is 100 (optional) + +try: + # Alpha Asset Transaction API + api_response = api_instance.list_alpha_account_book(_from, to=to, page=page, limit=limit) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AlphaApi->list_alpha_account_book: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_from** | **int**| Start timestamp of the query | + **to** | **int**| Time range ending, default to current time | [optional] + **page** | **int**| Page number | [optional] + **limit** | **int**| The maximum number of items per page is 100 | [optional] + +### Return type + +[**list[AccountBookResponse]**](AccountBookResponse.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** | 查询流水成功 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **quote_alpha_order** +> QuoteResponse quote_alpha_order(quote_request) + +Alpha Quotation API + +The quote_id returned by the quotation API is valid for one minute.You must place the order within this time window;otherwise, the quote will expire and a new quotation request 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.AlphaApi(api_client) +quote_request = gate_api.QuoteRequest() # QuoteRequest | + +try: + # Alpha Quotation API + api_response = api_instance.quote_alpha_order(quote_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 AlphaApi->quote_alpha_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **quote_request** | [**QuoteRequest**](QuoteRequest.md)| | + +### Return type + +[**QuoteResponse**](QuoteResponse.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** | 询价成功 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_alpha_order** +> list[OrderResponse] list_alpha_order(currency, side, status, _from=_from, to=to, limit=limit, page=page) + +Alpha 查询订单列表接口 + +### 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.AlphaApi(api_client) +currency = 'memeboxsst' # str | Trading Symbol +side = 'buy' # str | 买单或者卖单 - buy - sell +status = 2 # int | Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete +_from = 1627706330 # int | 查询订单的起始时间 (optional) +to = 1635329650 # int | 查询订单的结束时间,不指定则默认为当前时间 (optional) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) + +try: + # Alpha 查询订单列表接口 + api_response = api_instance.list_alpha_order(currency, side, status, _from=_from, to=to, limit=limit, page=page) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AlphaApi->list_alpha_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Trading Symbol | + **side** | **str**| 买单或者卖单 - buy - sell | + **status** | **int**| Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete | + **_from** | **int**| 查询订单的起始时间 | [optional] + **to** | **int**| 查询订单的结束时间,不指定则默认为当前时间 | [optional] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] + +### Return type + +[**list[OrderResponse]**](OrderResponse.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **place_alpha_order** +> PlaceOrderResponse place_alpha_order(place_order_request) + +Alpha Order Placement API + +### 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.AlphaApi(api_client) +place_order_request = gate_api.PlaceOrderRequest() # PlaceOrderRequest | + +try: + # Alpha Order Placement API + api_response = api_instance.place_alpha_order(place_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 AlphaApi->place_alpha_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **place_order_request** | [**PlaceOrderRequest**](PlaceOrderRequest.md)| | + +### Return type + +[**PlaceOrderResponse**](PlaceOrderResponse.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_alpha_order** +> OrderResponse get_alpha_order(order_id) + +Alpha 查询单个订单接口 + +### 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.AlphaApi(api_client) +order_id = 'fdaf12321' # str | Order ID + +try: + # Alpha 查询单个订单接口 + api_response = api_instance.get_alpha_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 AlphaApi->get_alpha_order: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **str**| Order ID | + +### Return type + +[**OrderResponse**](OrderResponse.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** | 订单查询成功 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_alpha_currencies** +> list[Currency2] list_alpha_currencies(currency=currency, limit=limit, page=page) + +查询币种信息 + +When the currency parameter is provided, query and return information for the specified currency. When the currency parameter is not provided, return a paginated list of currencies. + +### 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.AlphaApi(api_client) +currency = 'memeboxtrump' # str | 根据币种符号查询币种信息 (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) + +try: + # 查询币种信息 + api_response = api_instance.list_alpha_currencies(currency=currency, limit=limit, page=page) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AlphaApi->list_alpha_currencies: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| 根据币种符号查询币种信息 | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] + +### Return type + +[**list[Currency2]**](Currency2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_alpha_tickers** +> list[Ticker2] list_alpha_tickers(currency=currency, limit=limit, page=page) + +查询币种ticker + +When the currency parameter is provided, query and return information for the specified ticker, When the currency parameter is not provided, return a paginated list of tickers. + +### 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.AlphaApi(api_client) +currency = 'memeboxtrump' # str | Retrieve data of the specified currency (optional) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) + +try: + # 查询币种ticker + api_response = api_instance.list_alpha_tickers(currency=currency, limit=limit, page=page) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling AlphaApi->list_alpha_tickers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **str**| Retrieve data of the specified currency | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] + +### Return type + +[**list[Ticker2]**](Ticker2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BrokerCommission1.md b/docs/BrokerCommission1.md index c515dea..f3850b8 100644 --- a/docs/BrokerCommission1.md +++ b/docs/BrokerCommission1.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **rebate_fee** | **str** | The income from rebates, converted to USDT | [optional] **source** | **str** | Rebate Type: Spot、Futures、Options | [optional] **currency_pair** | **str** | Currency pair | [optional] +**sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.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/BrokerCommissionSubBrokerInfo.md b/docs/BrokerCommissionSubBrokerInfo.md new file mode 100644 index 0000000..c91f6c9 --- /dev/null +++ b/docs/BrokerCommissionSubBrokerInfo.md @@ -0,0 +1,14 @@ +# BrokerCommissionSubBrokerInfo + +The sub broker info +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | The sub broker user ID | [optional] +**original_commission_rate** | **str** | The sub broker original commission rate | [optional] +**relative_commission_rate** | **str** | The sub broker relative commission rate | [optional] +**commission_rate** | **str** | The sub broker actual commission rate | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BrokerTransaction1.md b/docs/BrokerTransaction1.md index 299b892..cc4444e 100644 --- a/docs/BrokerTransaction1.md +++ b/docs/BrokerTransaction1.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **amount** | **str** | Commission Amount | [optional] **fee_asset** | **str** | Fee currency | [optional] **source** | **str** | Rebate Type: Spot、Futures、Options | [optional] +**sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.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/Contract.md b/docs/Contract.md index d4bce26..65ea3fd 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -40,6 +40,8 @@ Name | Type | Description | Notes **enable_credit** | **bool** | Whether portfolio margin account is enabled | [optional] **create_time** | **float** | Created time of the contract | [optional] **funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional] +**status** | **str** | Contract Status Types include: prelaunch, trading, delisting, delisted | [optional] +**launch_time** | **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/Currency2.md b/docs/Currency2.md new file mode 100644 index 0000000..c85442f --- /dev/null +++ b/docs/Currency2.md @@ -0,0 +1,16 @@ +# Currency2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency symbol | [optional] +**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] +**status** | **int** | 币种交易状态 - `1` : 正常交易 - `2` : 暂停交易 - `3` : 下架 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EarnApi.md b/docs/EarnApi.md index ccd605f..95150d6 100644 --- a/docs/EarnApi.md +++ b/docs/EarnApi.md @@ -12,6 +12,8 @@ Method | HTTP request | Description [**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List [**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List [**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order +[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | 链上赚币币种 +[**swap_staking_coin**](EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins # **swap_eth2** @@ -545,3 +547,136 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **find_coin** +> list[str] find_coin(find_coin) + +链上赚币币种 + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) +find_coin = gate_api.FindCoin() # FindCoin | + +try: + # 链上赚币币种 + api_response = api_instance.find_coin(find_coin) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->find_coin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **find_coin** | [**FindCoin**](FindCoin.md)| | + +### Return type + +**list[str]** + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **swap_staking_coin** +> swap_staking_coin(swap_coin) + +On-chain Token Swap for Earned Coins + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.EarnApi(api_client) +swap_coin = gate_api.SwapCoin() # SwapCoin | + +try: + # On-chain Token Swap for Earned Coins + api_instance.swap_staking_coin(swap_coin) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling EarnApi->swap_staking_coin: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **swap_coin** | [**SwapCoin**](SwapCoin.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | swap success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index 4a0ef05..a2c85a7 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### 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-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### 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-06-17 09:53+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/FindCoin.md b/docs/FindCoin.md new file mode 100644 index 0000000..b3ce7d1 --- /dev/null +++ b/docs/FindCoin.md @@ -0,0 +1,11 @@ +# FindCoin + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | Currency | [optional] +**cointype** | **str** | Coin Type swap-Voucher lock-Locked | [optional] + +[[Back to Model list]](../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 6021286..a8732ae 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -1335,7 +1335,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_cross_mode** -> Position update_position_cross_mode(settle, inline_object) +> Position update_position_cross_mode(settle, futures_position_cross_mode) Switch to the full position-by-store mode @@ -1364,11 +1364,11 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency -inline_object = gate_api.InlineObject() # InlineObject | +futures_position_cross_mode = gate_api.FuturesPositionCrossMode() # FuturesPositionCrossMode | try: # Switch to the full position-by-store mode - api_response = api_instance.update_position_cross_mode(settle, inline_object) + api_response = api_instance.update_position_cross_mode(settle, futures_position_cross_mode) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1381,7 +1381,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | - **inline_object** | [**InlineObject**](InlineObject.md)| | + **futures_position_cross_mode** | [**FuturesPositionCrossMode**](FuturesPositionCrossMode.md)| | ### Return type diff --git a/docs/InlineObject.md b/docs/FuturesPositionCrossMode.md similarity index 93% rename from docs/InlineObject.md rename to docs/FuturesPositionCrossMode.md index 269f136..8efbf19 100644 --- a/docs/InlineObject.md +++ b/docs/FuturesPositionCrossMode.md @@ -1,4 +1,4 @@ -# InlineObject +# FuturesPositionCrossMode ## Properties Name | Type | Description | Notes diff --git a/docs/MarginApi.md b/docs/MarginApi.md index 1d98803..070c5f7 100644 --- a/docs/MarginApi.md +++ b/docs/MarginApi.md @@ -5,15 +5,15 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list -[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list [**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history [**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list [**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting [**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting [**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency +[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market +[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient +[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple +[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list [**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) [**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) @@ -85,10 +85,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_margin_tier** -> list[MarginLeverageTier] get_user_margin_tier(currency_pair) +# **list_margin_account_book** +> list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) -Check the user's own leverage lending gradient in the current market +List margin account balance change history + +Only transferals from and to margin account are provided for now. Time range allows 30 days at most ### Example @@ -114,27 +116,39 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair +currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) +currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) +type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) +_from = 1627706330 # int | Start timestamp of the query (optional) +to = 1635329650 # int | Time range ending, default to current time (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) try: - # Check the user's own leverage lending gradient in the current market - api_response = api_instance.get_user_margin_tier(currency_pair) + # List margin account balance change history + api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e) + print("Exception when calling MarginApi->list_margin_account_book: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] + **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] + **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] + **_from** | **int**| Start timestamp of the query | [optional] + **to** | **int**| Time range ending, default to current time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] ### Return type -[**list[MarginLeverageTier]**](MarginLeverageTier.md) +[**list[MarginAccountBook]**](MarginAccountBook.md) ### Authorization @@ -148,55 +162,64 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | List retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_market_margin_tier** -> list[MarginLeverageTier] get_market_margin_tier(currency_pair) +# **list_funding_accounts** +> list[FundingAccount] list_funding_accounts(currency=currency) -Query the current market leverage lending gradient +Funding account list ### Example +* Api Key Authentication (apiv4): ```python from __future__ import print_function import gate_api from gate_api.exceptions import ApiException, GateApiException # Defining the host is optional and defaults to https://api.gateio.ws/api/v4 # See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" ) api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair +currency = 'BTC' # str | Retrieve data of the specified currency (optional) try: - # Query the current market leverage lending gradient - api_response = api_instance.get_market_margin_tier(currency_pair) + # Funding account list + api_response = api_instance.list_funding_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 MarginApi->get_market_margin_tier: %s\n" % e) + print("Exception when calling MarginApi->list_funding_accounts: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency** | **str**| Retrieve data of the specified currency | [optional] ### Return type -[**list[MarginLeverageTier]**](MarginLeverageTier.md) +[**list[FundingAccount]**](FundingAccount.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers @@ -206,14 +229,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | List retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **set_user_market_leverage** -> set_user_market_leverage(margin_market_leverage) +# **get_auto_repay_status** +> AutoRepaySetting get_auto_repay_status() -Set the user market leverage multiple +Retrieve user auto repayment setting ### Example @@ -239,26 +262,23 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | try: - # Set the user market leverage multiple - api_instance.set_user_market_leverage(margin_market_leverage) + # Retrieve user auto repayment setting + api_response = api_instance.get_auto_repay_status() + print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e) + print("Exception when calling MarginApi->get_auto_repay_status: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| | +This endpoint does not need any parameter. ### Return type -void (empty response body) +[**AutoRepaySetting**](AutoRepaySetting.md) ### Authorization @@ -266,22 +286,20 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined + - **Content-Type**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Success | - | +**200** | Current auto repayment setting | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_margin_user_account** -> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) - -Query the user's leverage account list +# **set_auto_repay** +> AutoRepaySetting set_auto_repay(status) -Support querying risk rate per position account and margin rate per position account +Update user's auto repayment setting ### Example @@ -307,27 +325,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) +status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled try: - # Query the user's leverage account list - api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) + # Update user's auto repayment setting + api_response = api_instance.set_auto_repay(status) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e) + print("Exception when calling MarginApi->set_auto_repay: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] + **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled | ### Return type -[**list[MarginAccount]**](MarginAccount.md) +[**AutoRepaySetting**](AutoRepaySetting.md) ### Authorization @@ -341,16 +359,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | Current auto repayment setting | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_margin_account_book** -> list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) - -List margin account balance change history +# **get_margin_transferable** +> MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) -Only transferals from and to margin account are provided for now. Time range allows 30 days at most +Get the max transferable amount for a specific margin currency ### Example @@ -376,39 +392,29 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) -currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) -type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +currency = 'BTC' # str | Retrieve data of the specified currency +currency_pair = 'BTC_USDT' # str | Currency pair (optional) try: - # List margin account balance change history - api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) + # Get the max transferable amount for a specific margin currency + api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->list_margin_account_book: %s\n" % e) + print("Exception when calling MarginApi->get_margin_transferable: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] - **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **currency** | **str**| Retrieve data of the specified currency | + **currency_pair** | **str**| Currency pair | [optional] ### Return type -[**list[MarginAccountBook]**](MarginAccountBook.md) +[**MarginTransferable**](MarginTransferable.md) ### Authorization @@ -422,14 +428,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_funding_accounts** -> list[FundingAccount] list_funding_accounts(currency=currency) +# **get_user_margin_tier** +> list[MarginLeverageTier] get_user_margin_tier(currency_pair) -Funding account list +Check the user's own leverage lending gradient in the current market ### Example @@ -455,27 +461,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency_pair = 'BTC_USDT' # str | Currency pair try: - # Funding account list - api_response = api_instance.list_funding_accounts(currency=currency) + # Check the user's own leverage lending gradient in the current market + api_response = api_instance.get_user_margin_tier(currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->list_funding_accounts: %s\n" % e) + print("Exception when calling MarginApi->get_user_margin_tier: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency_pair** | **str**| Currency pair | ### Return type -[**list[FundingAccount]**](FundingAccount.md) +[**list[MarginLeverageTier]**](MarginLeverageTier.md) ### Authorization @@ -489,60 +495,55 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_auto_repay_status** -> AutoRepaySetting get_auto_repay_status() +# **get_market_margin_tier** +> list[MarginLeverageTier] get_market_margin_tier(currency_pair) -Retrieve user auto repayment setting +Query the current market leverage lending gradient ### Example -* Api Key Authentication (apiv4): ```python from __future__ import print_function import gate_api from gate_api.exceptions import ApiException, GateApiException # Defining the host is optional and defaults to https://api.gateio.ws/api/v4 # See configuration.py for a list of all supported configuration parameters. -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure APIv4 key authorization configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4", - key = "YOU_API_KEY", - secret = "YOUR_API_SECRET" + host = "https://api.gateio.ws/api/v4" ) api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) +currency_pair = 'BTC_USDT' # str | Currency pair try: - # Retrieve user auto repayment setting - api_response = api_instance.get_auto_repay_status() + # Query the current market leverage lending gradient + api_response = api_instance.get_market_margin_tier(currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->get_auto_repay_status: %s\n" % e) + print("Exception when calling MarginApi->get_market_margin_tier: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency_pair** | **str**| Currency pair | ### Return type -[**AutoRepaySetting**](AutoRepaySetting.md) +[**list[MarginLeverageTier]**](MarginLeverageTier.md) ### Authorization -[apiv4](../README.md#apiv4) +No authorization required ### HTTP request headers @@ -552,14 +553,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **set_auto_repay** -> AutoRepaySetting set_auto_repay(status) +# **set_user_market_leverage** +> set_user_market_leverage(margin_market_leverage) -Update user's auto repayment setting +Set the user market leverage multiple ### Example @@ -585,27 +586,26 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled +margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | try: - # Update user's auto repayment setting - api_response = api_instance.set_auto_repay(status) - print(api_response) + # Set the user market leverage multiple + api_instance.set_user_market_leverage(margin_market_leverage) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->set_auto_repay: %s\n" % e) + print("Exception when calling MarginApi->set_user_market_leverage: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled | + **margin_market_leverage** | [**MarginMarketLeverage**](MarginMarketLeverage.md)| | ### Return type -[**AutoRepaySetting**](AutoRepaySetting.md) +void (empty response body) ### Authorization @@ -613,20 +613,22 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting | - | +**204** | 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_margin_transferable** -> MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) +# **list_margin_user_account** +> list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) -Get the max transferable amount for a specific margin currency +Query the user's leverage account list + +Support querying risk rate per position account and margin rate per position account ### Example @@ -652,29 +654,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency currency_pair = 'BTC_USDT' # str | Currency pair (optional) try: - # Get the max transferable amount for a specific margin currency - api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) + # Query the user's leverage account list + api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginApi->get_margin_transferable: %s\n" % e) + print("Exception when calling MarginApi->list_margin_user_account: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | **currency_pair** | **str**| Currency pair | [optional] ### Return type -[**MarginTransferable**](MarginTransferable.md) +[**list[MarginAccount]**](MarginAccount.md) ### Authorization @@ -688,7 +688,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | List retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md index 788bbdd..355a750 100644 --- a/docs/MarginUniApi.md +++ b/docs/MarginUniApi.md @@ -5,13 +5,13 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans -[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay -[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable [**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market [**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate +[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans +[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay [**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records [**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records +[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable # **list_uni_currency_pairs** @@ -68,66 +68,51 @@ 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_uni_loans** -> list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) +# **get_uni_currency_pair** +> UniCurrencyPair get_uni_currency_pair(currency_pair) -List loans +Get detail of lending market ### 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.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency_pair = 'AE_USDT' # str | Currency pair try: - # List loans - api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) + # Get detail of lending market + api_response = api_instance.get_uni_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 MarginUniApi->list_uni_loans: %s\n" % e) + print("Exception when calling MarginUniApi->get_uni_currency_pair: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency_pair** | **str**| Currency pair | ### Return type -[**list[UniLoan]**](UniLoan.md) +[**UniCurrencyPair**](UniCurrencyPair.md) ### Authorization -[apiv4](../README.md#apiv4) +No authorization required ### HTTP request headers @@ -141,10 +126,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) -# **create_uni_loan** -> create_uni_loan(create_uni_loan) +# **get_margin_uni_estimate_rate** +> dict(str, str) get_margin_uni_estimate_rate(currencies) -Borrow or repay +Estimate interest Rate + +Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. ### Example @@ -170,26 +157,27 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name try: - # Borrow or repay - api_instance.create_uni_loan(create_uni_loan) + # Estimate interest Rate + api_response = api_instance.get_margin_uni_estimate_rate(currencies) + print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->create_uni_loan: %s\n" % e) + print("Exception when calling MarginUniApi->get_margin_uni_estimate_rate: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_uni_loan** | [**CreateUniLoan**](CreateUniLoan.md)| | + **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | ### Return type -void (empty response body) +**dict(str, str)** ### Authorization @@ -197,20 +185,20 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: Not defined + - **Content-Type**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_uni_borrowable** -> MaxUniBorrowable get_uni_borrowable(currency, currency_pair) +# **list_uni_loans** +> list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) -Get maximum borrowable +List loans ### Example @@ -236,29 +224,33 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency -currency_pair = 'BTC_USDT' # str | Currency pair +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) try: - # Get maximum borrowable - api_response = api_instance.get_uni_borrowable(currency, currency_pair) + # List loans + api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->get_uni_borrowable: %s\n" % e) + print("Exception when calling MarginUniApi->list_uni_loans: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] ### Return type -[**MaxUniBorrowable**](MaxUniBorrowable.md) +[**list[UniLoan]**](UniLoan.md) ### Authorization @@ -276,70 +268,76 @@ 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_uni_currency_pair** -> UniCurrencyPair get_uni_currency_pair(currency_pair) +# **create_uni_loan** +> create_uni_loan(create_uni_loan) -Get detail of lending market +Borrow or repay ### Example +* Api Key Authentication (apiv4): ```python from __future__ import print_function import gate_api from gate_api.exceptions import ApiException, GateApiException # Defining the host is optional and defaults to https://api.gateio.ws/api/v4 # See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization configuration = gate_api.Configuration( - host = "https://api.gateio.ws/api/v4" + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" ) api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'AE_USDT' # str | Currency pair +create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | try: - # Get detail of lending market - api_response = api_instance.get_uni_currency_pair(currency_pair) - print(api_response) + # Borrow or repay + api_instance.create_uni_loan(create_uni_loan) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->get_uni_currency_pair: %s\n" % e) + print("Exception when calling MarginUniApi->create_uni_loan: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **create_uni_loan** | [**CreateUniLoan**](CreateUniLoan.md)| | ### Return type -[**UniCurrencyPair**](UniCurrencyPair.md) +void (empty response body) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**204** | Operated 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_margin_uni_estimate_rate** -> dict(str, str) get_margin_uni_estimate_rate(currencies) - -Estimate interest Rate +# **list_uni_loan_records** +> list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) -Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. +Get load records ### Example @@ -365,27 +363,35 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name +type = 'type_example' # str | type: borrow - borrow, repay - repay (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) try: - # Estimate interest Rate - api_response = api_instance.get_margin_uni_estimate_rate(currencies) + # Get load records + api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->get_margin_uni_estimate_rate: %s\n" % e) + print("Exception when calling MarginUniApi->list_uni_loan_records: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | + **type** | **str**| type: borrow - borrow, repay - repay | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency_pair** | **str**| Currency pair | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] ### Return type -**dict(str, str)** +[**list[UniLoanRecord]**](UniLoanRecord.md) ### Authorization @@ -403,10 +409,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_uni_loan_records** -> list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) +# **list_uni_loan_interest_records** +> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) -Get load records +List interest records ### Example @@ -432,35 +438,37 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -type = 'type_example' # str | type: borrow - borrow, repay - repay (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Retrieve data of the specified currency (optional) page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1547706332 # int | Start timestamp (optional) +to = 1547706332 # int | End timestamp (optional) try: - # Get load records - api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) + # List interest records + api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: - print("Exception when calling MarginUniApi->list_uni_loan_records: %s\n" % e) + print("Exception when calling MarginUniApi->list_uni_loan_interest_records: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| type: borrow - borrow, repay - repay | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Retrieve data of the specified currency | [optional] **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp | [optional] + **to** | **int**| End timestamp | [optional] ### Return type -[**list[UniLoanRecord]**](UniLoanRecord.md) +[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) ### Authorization @@ -478,10 +486,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_uni_loan_interest_records** -> list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) +# **get_uni_borrowable** +> MaxUniBorrowable get_uni_borrowable(currency, currency_pair) -List interest records +Get maximum borrowable ### Example @@ -507,37 +515,29 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +currency = 'BTC' # str | Retrieve data of the specified currency +currency_pair = 'BTC_USDT' # str | Currency pair try: - # List interest records - api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) + # Get maximum borrowable + api_response = api_instance.get_uni_borrowable(currency, 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 MarginUniApi->list_uni_loan_interest_records: %s\n" % e) + print("Exception when calling MarginUniApi->get_uni_borrowable: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **currency** | **str**| Retrieve data of the specified currency | + **currency_pair** | **str**| Currency pair | ### Return type -[**list[UniLoanInterestRecord]**](UniLoanInterestRecord.md) +[**MaxUniBorrowable**](MaxUniBorrowable.md) ### Authorization diff --git a/docs/OrderResponse.md b/docs/OrderResponse.md new file mode 100644 index 0000000..7100bbd --- /dev/null +++ b/docs/OrderResponse.md @@ -0,0 +1,23 @@ +# OrderResponse + +下单返回 +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | [optional] +**tx_hash** | **str** | Transaction Hash | [optional] +**side** | **str** | 买单或者卖单 - buy - sell | [optional] +**usdt_amount** | **str** | Amount | [optional] +**currency** | **str** | 币 | [optional] +**currency_amount** | **str** | Currency amount | [optional] +**status** | **int** | Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete | [optional] +**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | [optional] +**chain** | **str** | 链 | [optional] +**gas_fee** | **str** | Miner Fee (USDT-based) | [optional] +**transaction_fee** | **str** | Trading Fee (USDT-based) | [optional] +**failed_reason** | **str** | Failure reason (if any) | [optional] +**create_time** | **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/PlaceOrderRequest.md b/docs/PlaceOrderRequest.md new file mode 100644 index 0000000..6008a4f --- /dev/null +++ b/docs/PlaceOrderRequest.md @@ -0,0 +1,16 @@ +# PlaceOrderRequest + +下单请求 +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Trading Symbol | +**side** | **str** | 买单或者卖单 - buy - sell | +**amount** | **str** | Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency | +**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | +**slippage** | **str** | Slippage value of 10 represents a 10% tolerance | [optional] +**quote_id** | **str** | The quote_id returned by the quotation 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/PlaceOrderResponse.md b/docs/PlaceOrderResponse.md new file mode 100644 index 0000000..547ee83 --- /dev/null +++ b/docs/PlaceOrderResponse.md @@ -0,0 +1,18 @@ +# PlaceOrderResponse + +下单返回 +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | Order ID | [optional] +**status** | **int** | Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete | [optional] +**side** | **str** | 买单或者卖单 - buy - sell | [optional] +**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | [optional] +**create_time** | **int** | 创建时间 (时间戳) | [optional] +**amount** | **str** | Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency | [optional] +**token_address** | **str** | 币地址 | [optional] +**chain** | **str** | Chain 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/QuoteRequest.md b/docs/QuoteRequest.md new file mode 100644 index 0000000..1ac95e2 --- /dev/null +++ b/docs/QuoteRequest.md @@ -0,0 +1,15 @@ +# QuoteRequest + +Quotation Request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Trading Symbol | +**side** | **str** | 买单或者卖单 - buy - sell | +**amount** | **str** | Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency | +**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | +**slippage** | **str** | Slippage value of 10 represents a 10% tolerance | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QuoteResponse.md b/docs/QuoteResponse.md new file mode 100644 index 0000000..1e222f3 --- /dev/null +++ b/docs/QuoteResponse.md @@ -0,0 +1,20 @@ +# QuoteResponse + +Quotation Response +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_id** | **str** | The quotation ID (quote_id) is used for placing orders and is valid for 1 minute | [optional] +**min_amount** | **str** | 最小下单量 | [optional] +**max_amount** | **str** | 最大下单量 | [optional] +**price** | **str** | Coin Price (USDT-based) | [optional] +**slippage** | **str** | Slippage | [optional] +**estimate_gas_fee_amount_usdt** | **str** | Estimated Network Fee (USDT-based) | [optional] +**order_fee** | **str** | Slippage value of 10 represents a 10% tolerance | [optional] +**target_token_min_amount** | **str** | 最小获得数量 | [optional] +**target_token_max_amount** | **str** | 最大获得数量 | [optional] +**error_type** | **int** | Failure Type - `0` : Success - `1` : Exceeds maximum value - `2` : Below minimum 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/SubAccountApi.md b/docs/SubAccountApi.md index 3f938a3..065553b 100644 --- a/docs/SubAccountApi.md +++ b/docs/SubAccountApi.md @@ -286,7 +286,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_sub_account_keys** -> list[SubAccountKey] create_sub_account_keys(user_id, sub_account_key) +> SubAccountKey create_sub_account_keys(user_id, sub_account_key) Create API Key of the sub-account @@ -336,7 +336,7 @@ Name | Type | Description | Notes ### Return type -[**list[SubAccountKey]**](SubAccountKey.md) +[**SubAccountKey**](SubAccountKey.md) ### Authorization diff --git a/docs/SubAccountKey.md b/docs/SubAccountKey.md index dfce92b..9ae041d 100644 --- a/docs/SubAccountKey.md +++ b/docs/SubAccountKey.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **str** | User ID | [optional] [readonly] +**user_id** | **int** | User ID | [optional] [readonly] **mode** | **int** | Mode: 1 - classic 2 - portfolio account | [optional] **name** | **str** | API key name | [optional] **perms** | [**list[SubAccountKeyPerms]**](SubAccountKeyPerms.md) | | [optional] diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md index 731f561..21e855c 100644 --- a/docs/SubAccountTransfer.md +++ b/docs/SubAccountTransfer.md @@ -3,16 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timest** | **str** | Transfer timestamp | [optional] [readonly] -**uid** | **str** | Main account user ID | [optional] [readonly] **sub_account** | **str** | Sub account user ID | -**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] +**sub_account_type** | **str** | 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 | [optional] [default to 'spot'] **currency** | **str** | Transfer currency name | **amount** | **str** | Transfer amount | **direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | -**source** | **str** | Where the operation is initiated from | [optional] [readonly] **client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] -**status** | **str** | Sub-account transfer record status, currently only success | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountTransferRecordItem.md b/docs/SubAccountTransferRecordItem.md new file mode 100644 index 0000000..91815ac --- /dev/null +++ b/docs/SubAccountTransferRecordItem.md @@ -0,0 +1,19 @@ +# SubAccountTransferRecordItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timest** | **str** | Transfer timestamp | [optional] [readonly] +**uid** | **str** | Main account user ID | [optional] [readonly] +**sub_account** | **str** | Sub account user ID | +**sub_account_type** | **str** | 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 | [optional] [default to 'spot'] +**currency** | **str** | Transfer currency name | +**amount** | **str** | Transfer amount | +**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | +**source** | **str** | Where the operation is initiated from | [optional] [readonly] +**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] +**status** | **str** | Sub-account transfer record status, currently only success | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SwapCoin.md b/docs/SwapCoin.md new file mode 100644 index 0000000..984adbf --- /dev/null +++ b/docs/SwapCoin.md @@ -0,0 +1,14 @@ +# SwapCoin + +Blockchain Mining +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | Currency | +**side** | **str** | 0 - Stake 1 - Redeem | +**amount** | **str** | Size | +**pid** | **int** | DeFi-type Mining Protocol Identifier | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Ticker2.md b/docs/Ticker2.md new file mode 100644 index 0000000..6e31e37 --- /dev/null +++ b/docs/Ticker2.md @@ -0,0 +1,14 @@ +# Ticker2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency symbol | [optional] +**last** | **str** | Last trading price | [optional] +**change** | **str** | Change percentage in the last 24h | [optional] +**volume** | **str** | 24h Trading Volume (USDT) | [optional] +**market_cap** | **str** | Current Coin Market 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/WalletApi.md b/docs/WalletApi.md index e46a1e4..a74886c 100644 --- a/docs/WalletApi.md +++ b/docs/WalletApi.md @@ -382,7 +382,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_transfers** -> list[SubAccountTransfer] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) +> list[SubAccountTransferRecordItem] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) Retrieve transfer records between main and sub accounts @@ -440,7 +440,7 @@ Name | Type | Description | Notes ### Return type -[**list[SubAccountTransfer]**](SubAccountTransfer.md) +[**list[SubAccountTransferRecordItem]**](SubAccountTransferRecordItem.md) ### Authorization diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 116b074..dec83d9 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -5,7 +5,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.99.0" +__version__ = "6.100.0" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi @@ -22,6 +22,7 @@ from gate_api.api.sub_account_api import SubAccountApi from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi +from gate_api.api.alpha_api import AlphaApi from gate_api.api.collateral_loan_api import CollateralLoanApi from gate_api.api.delivery_api import DeliveryApi from gate_api.api.earn_api import EarnApi @@ -45,9 +46,11 @@ from gate_api.exceptions import ApiException # import models into sdk package from gate_api.models.account_balance import AccountBalance +from gate_api.models.account_book_response import AccountBookResponse from gate_api.models.account_detail import AccountDetail from gate_api.models.account_detail_key import AccountDetailKey from gate_api.models.account_rate_limit import AccountRateLimit +from gate_api.models.accounts_response import AccountsResponse from gate_api.models.agency_commission import AgencyCommission from gate_api.models.agency_commission_history import AgencyCommissionHistory from gate_api.models.agency_transaction import AgencyTransaction @@ -60,6 +63,7 @@ from gate_api.models.borrow_currency_info import BorrowCurrencyInfo from gate_api.models.broker_commission import BrokerCommission from gate_api.models.broker_commission1 import BrokerCommission1 +from gate_api.models.broker_commission_sub_broker_info import BrokerCommissionSubBrokerInfo from gate_api.models.broker_transaction import BrokerTransaction from gate_api.models.broker_transaction1 import BrokerTransaction1 from gate_api.models.cancel_batch_order import CancelBatchOrder @@ -90,6 +94,7 @@ from gate_api.models.cross_margin_loan import CrossMarginLoan from gate_api.models.cross_margin_repayment import CrossMarginRepayment from gate_api.models.currency import Currency +from gate_api.models.currency2 import Currency2 from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota @@ -104,6 +109,7 @@ from gate_api.models.dual_get_plans import DualGetPlans from gate_api.models.eth2_rate_list import Eth2RateList from gate_api.models.eth2_swap import Eth2Swap +from gate_api.models.find_coin import FindCoin from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair from gate_api.models.flash_swap_order import FlashSwapOrder from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview @@ -128,13 +134,13 @@ from gate_api.models.futures_order_amendment import FuturesOrderAmendment from gate_api.models.futures_order_book import FuturesOrderBook from gate_api.models.futures_order_book_item import FuturesOrderBookItem +from gate_api.models.futures_position_cross_mode import FuturesPositionCrossMode from gate_api.models.futures_premium_index import FuturesPremiumIndex from gate_api.models.futures_price_trigger import FuturesPriceTrigger from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.index_constituent import IndexConstituent -from gate_api.models.inline_object import InlineObject from gate_api.models.inline_response200 import InlineResponse200 from gate_api.models.inline_response2001 import InlineResponse2001 from gate_api.models.insurance_record import InsuranceRecord @@ -190,16 +196,21 @@ from gate_api.models.order_cancel import OrderCancel from gate_api.models.order_patch import OrderPatch from gate_api.models.order_resp import OrderResp +from gate_api.models.order_response import OrderResponse from gate_api.models.partner_commission_history import PartnerCommissionHistory from gate_api.models.partner_sub import PartnerSub from gate_api.models.partner_sub_list import PartnerSubList from gate_api.models.partner_transaction_history import PartnerTransactionHistory from gate_api.models.patch_uni_lend import PatchUniLend from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder +from gate_api.models.place_order_request import PlaceOrderRequest +from gate_api.models.place_order_response import PlaceOrderResponse from gate_api.models.position import Position from gate_api.models.position_close import PositionClose from gate_api.models.position_close_order import PositionCloseOrder from gate_api.models.profit_loss_range import ProfitLossRange +from gate_api.models.quote_request import QuoteRequest +from gate_api.models.quote_response import QuoteResponse from gate_api.models.rebate_user_info import RebateUserInfo from gate_api.models.repay_currency_res import RepayCurrencyRes from gate_api.models.repay_loan import RepayLoan @@ -236,10 +247,13 @@ from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount from gate_api.models.sub_account_transfer import SubAccountTransfer +from gate_api.models.sub_account_transfer_record_item import SubAccountTransferRecordItem from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount from gate_api.models.sub_user_mode import SubUserMode +from gate_api.models.swap_coin import SwapCoin from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker +from gate_api.models.ticker2 import Ticker2 from gate_api.models.total_balance import TotalBalance from gate_api.models.trade import Trade from gate_api.models.trade_fee import TradeFee diff --git a/gate_api/api/__init__.py b/gate_api/api/__init__.py index 6cd727a..ba8b516 100644 --- a/gate_api/api/__init__.py +++ b/gate_api/api/__init__.py @@ -8,6 +8,7 @@ from gate_api.api.sub_account_api import SubAccountApi from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi +from gate_api.api.alpha_api import AlphaApi from gate_api.api.collateral_loan_api import CollateralLoanApi from gate_api.api.delivery_api import DeliveryApi from gate_api.api.earn_api import EarnApi diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py index 32126cb..03cfb42 100644 --- a/gate_api/api/account_api.py +++ b/gate_api/api/account_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/alpha_api.py b/gate_api/api/alpha_api.py new file mode 100644 index 0000000..581a2ea --- /dev/null +++ b/gate_api/api/alpha_api.py @@ -0,0 +1,1025 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from gate_api.api_client import ApiClient +from gate_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AlphaApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_alpha_accounts(self, **kwargs): # noqa: E501 + """API for Alpha Accounts # noqa: E501 + + Query Position Assets # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_alpha_accounts(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.AccountsResponse] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_alpha_accounts_with_http_info(**kwargs) # noqa: E501 + + def list_alpha_accounts_with_http_info(self, **kwargs): # noqa: E501 + """API for Alpha Accounts # noqa: E501 + + Query Position Assets # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_alpha_accounts_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.AccountsResponse], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_alpha_accounts" % 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( + '/alpha/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AccountsResponse]', # noqa: E501 + auth_settings=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_alpha_account_book(self, _from, **kwargs): # noqa: E501 + """Alpha Asset Transaction API # noqa: E501 + + Query Asset Transactions # 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_alpha_account_book(_from, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start timestamp of the query (required) + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: The maximum number of items per page is 100 + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.AccountBookResponse] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_alpha_account_book_with_http_info(_from, **kwargs) # noqa: E501 + + def list_alpha_account_book_with_http_info(self, _from, **kwargs): # noqa: E501 + """Alpha Asset Transaction API # noqa: E501 + + Query Asset Transactions # 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_alpha_account_book_with_http_info(_from, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param int _from: Start timestamp of the query (required) + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: The maximum number of items per page is 100 + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.AccountBookResponse], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '_from', + 'to', + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_alpha_account_book" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter '_from' is set + if self.api_client.client_side_validation and ('_from' not in local_var_params or # noqa: E501 + local_var_params['_from'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_from` when calling `list_alpha_account_book`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if '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( + '/alpha/account_book', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AccountBookResponse]', # noqa: E501 + auth_settings=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 quote_alpha_order(self, quote_request, **kwargs): # noqa: E501 + """Alpha Quotation API # noqa: E501 + + The quote_id returned by the quotation API is valid for one minute.You must place the order within this time window;otherwise, the quote will expire and a new quotation request is required # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.quote_alpha_order(quote_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param QuoteRequest quote_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.QuoteResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.quote_alpha_order_with_http_info(quote_request, **kwargs) # noqa: E501 + + def quote_alpha_order_with_http_info(self, quote_request, **kwargs): # noqa: E501 + """Alpha Quotation API # noqa: E501 + + The quote_id returned by the quotation API is valid for one minute.You must place the order within this time window;otherwise, the quote will expire and a new quotation request is required # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.quote_alpha_order_with_http_info(quote_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param QuoteRequest quote_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.QuoteResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'quote_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 quote_alpha_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'quote_request' is set + if self.api_client.client_side_validation and ('quote_request' not in local_var_params or # noqa: E501 + local_var_params['quote_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `quote_request` when calling `quote_alpha_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'quote_request' in local_var_params: + body_params = local_var_params['quote_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( + '/alpha/quote', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='QuoteResponse', # noqa: E501 + auth_settings=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_alpha_order(self, currency, side, status, **kwargs): # noqa: E501 + """Alpha 查询订单列表接口 # 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_alpha_order(currency, side, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Trading Symbol (required) + :param str side: 买单或者卖单 - buy - sell (required) + :param int status: Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete (required) + :param int _from: 查询订单的起始时间 + :param int to: 查询订单的结束时间,不指定则默认为当前时间 + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int page: Page number + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OrderResponse] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_alpha_order_with_http_info(currency, side, status, **kwargs) # noqa: E501 + + def list_alpha_order_with_http_info(self, currency, side, status, **kwargs): # noqa: E501 + """Alpha 查询订单列表接口 # 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_alpha_order_with_http_info(currency, side, status, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Trading Symbol (required) + :param str side: 买单或者卖单 - buy - sell (required) + :param int status: Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete (required) + :param int _from: 查询订单的起始时间 + :param int to: 查询订单的结束时间,不指定则默认为当前时间 + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int page: Page number + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.OrderResponse], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'side', + 'status', + '_from', + 'to', + 'limit', + 'page' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_alpha_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `list_alpha_order`") # noqa: E501 + # verify the required parameter 'side' is set + if self.api_client.client_side_validation and ('side' not in local_var_params or # noqa: E501 + local_var_params['side'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `side` when calling `list_alpha_order`") # 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_alpha_order`") # 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_alpha_order`, 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_alpha_order`, 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_alpha_order`, 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 '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 '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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/alpha/orders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OrderResponse]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def place_alpha_order(self, place_order_request, **kwargs): # noqa: E501 + """Alpha Order Placement API # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_alpha_order(place_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PlaceOrderRequest place_order_request: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.PlaceOrderResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.place_alpha_order_with_http_info(place_order_request, **kwargs) # noqa: E501 + + def place_alpha_order_with_http_info(self, place_order_request, **kwargs): # noqa: E501 + """Alpha Order Placement API # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.place_alpha_order_with_http_info(place_order_request, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param PlaceOrderRequest place_order_request: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.PlaceOrderResponse, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'place_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 place_alpha_order" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'place_order_request' is set + if self.api_client.client_side_validation and ('place_order_request' not in local_var_params or # noqa: E501 + local_var_params['place_order_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `place_order_request` when calling `place_alpha_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'place_order_request' in local_var_params: + body_params = local_var_params['place_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( + '/alpha/orders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PlaceOrderResponse', # noqa: E501 + auth_settings=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_alpha_order(self, order_id, **kwargs): # noqa: E501 + """Alpha 查询单个订单接口 # 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_alpha_order(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Order ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.OrderResponse + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_alpha_order_with_http_info(order_id, **kwargs) # noqa: E501 + + def get_alpha_order_with_http_info(self, order_id, **kwargs): # noqa: E501 + """Alpha 查询单个订单接口 # 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_alpha_order_with_http_info(order_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str order_id: Order ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.OrderResponse, 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_alpha_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_alpha_order`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 + query_params.append(('order_id', local_var_params['order_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/alpha/order', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrderResponse', # noqa: E501 + auth_settings=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_alpha_currencies(self, **kwargs): # noqa: E501 + """查询币种信息 # noqa: E501 + + When the currency parameter is provided, query and return information for the specified currency. When the currency parameter is not provided, return a paginated list of currencies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_alpha_currencies(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: 根据币种符号查询币种信息 + :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Currency2] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_alpha_currencies_with_http_info(**kwargs) # noqa: E501 + + def list_alpha_currencies_with_http_info(self, **kwargs): # noqa: E501 + """查询币种信息 # noqa: E501 + + When the currency parameter is provided, query and return information for the specified currency. When the currency parameter is not provided, return a paginated list of currencies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_alpha_currencies_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: 根据币种符号查询币种信息 + :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Currency2], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'limit', + 'page' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_alpha_currencies" % 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'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_alpha_currencies`, 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_alpha_currencies`, 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_alpha_currencies`, 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/alpha/currencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Currency2]', # noqa: E501 + auth_settings=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_alpha_tickers(self, **kwargs): # noqa: E501 + """查询币种ticker # noqa: E501 + + When the currency parameter is provided, query and return information for the specified ticker, When the currency parameter is not provided, return a paginated list of tickers. # 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_alpha_tickers(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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.Ticker2] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_alpha_tickers_with_http_info(**kwargs) # noqa: E501 + + def list_alpha_tickers_with_http_info(self, **kwargs): # noqa: E501 + """查询币种ticker # noqa: E501 + + When the currency parameter is provided, query and return information for the specified ticker, When the currency parameter is not provided, return a paginated list of tickers. # 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_alpha_tickers_with_http_info(async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str currency: Retrieve data of the specified currency + :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Ticker2], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'currency', + 'limit', + 'page' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_alpha_tickers" % 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'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_alpha_tickers`, 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_alpha_tickers`, 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_alpha_tickers`, 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/alpha/tickers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Ticker2]', # noqa: E501 + auth_settings=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/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py index c1eb931..3beff6e 100644 --- a/gate_api/api/collateral_loan_api.py +++ b/gate_api/api/collateral_loan_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/delivery_api.py b/gate_api/api/delivery_api.py index 84ed844..7073438 100644 --- a/gate_api/api/delivery_api.py +++ b/gate_api/api/delivery_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index 5f0aae0..50ba250 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -975,3 +975,231 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + + def find_coin(self, find_coin, **kwargs): # noqa: E501 + """链上赚币币种 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_coin(find_coin, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FindCoin find_coin: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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[str] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.find_coin_with_http_info(find_coin, **kwargs) # noqa: E501 + + def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 + """链上赚币币种 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_coin_with_http_info(find_coin, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param FindCoin find_coin: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for 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[str], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'find_coin' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method find_coin" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'find_coin' is set + if self.api_client.client_side_validation and ('find_coin' not in local_var_params or # noqa: E501 + local_var_params['find_coin'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `find_coin` when calling `find_coin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'find_coin' in local_var_params: + body_params = local_var_params['find_coin'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/staking/coins', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[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 swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501 + """On-chain Token Swap for Earned Coins # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.swap_staking_coin(swap_coin, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SwapCoin swap_coin: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.swap_staking_coin_with_http_info(swap_coin, **kwargs) # noqa: E501 + + def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 + """On-chain Token Swap for Earned Coins # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.swap_staking_coin_with_http_info(swap_coin, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param SwapCoin swap_coin: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: None + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'swap_coin' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method swap_staking_coin" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'swap_coin' is set + if self.api_client.client_side_validation and ('swap_coin' not in local_var_params or # noqa: E501 + local_var_params['swap_coin'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `swap_coin` when calling `swap_staking_coin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'swap_coin' in local_var_params: + body_params = local_var_params['swap_coin'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/earn/staking/swap', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=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) diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 99817ae..1adeb09 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-06-17 09:53+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py index 632d25e..ac7a940 100644 --- a/gate_api/api/flash_swap_api.py +++ b/gate_api/api/flash_swap_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index b98a33d..ccd4113 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -2562,17 +2562,17 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_position_cross_mode(self, settle, inline_object, **kwargs): # noqa: E501 + def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501 """Switch to the full position-by-store mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_position_cross_mode(settle, inline_object, async_req=True) + >>> thread = api.update_position_cross_mode(settle, futures_position_cross_mode, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param InlineObject inline_object: (required) + :param FuturesPositionCrossMode futures_position_cross_mode: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2585,19 +2585,19 @@ def update_position_cross_mode(self, settle, inline_object, **kwargs): # noqa: returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.update_position_cross_mode_with_http_info(settle, inline_object, **kwargs) # noqa: E501 + return self.update_position_cross_mode_with_http_info(settle, futures_position_cross_mode, **kwargs) # noqa: E501 - def update_position_cross_mode_with_http_info(self, settle, inline_object, **kwargs): # noqa: E501 + def update_position_cross_mode_with_http_info(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501 """Switch to the full position-by-store mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_position_cross_mode_with_http_info(settle, inline_object, async_req=True) + >>> thread = api.update_position_cross_mode_with_http_info(settle, futures_position_cross_mode, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) - :param InlineObject inline_object: (required) + :param FuturesPositionCrossMode futures_position_cross_mode: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2616,7 +2616,7 @@ def update_position_cross_mode_with_http_info(self, settle, inline_object, **kwa all_params = [ 'settle', - 'inline_object' + 'futures_position_cross_mode' ] all_params.extend( [ @@ -2639,10 +2639,10 @@ def update_position_cross_mode_with_http_info(self, settle, inline_object, **kwa if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 local_var_params['settle'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `settle` when calling `update_position_cross_mode`") # noqa: E501 - # verify the required parameter 'inline_object' is set - if self.api_client.client_side_validation and ('inline_object' not in local_var_params or # noqa: E501 - local_var_params['inline_object'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `inline_object` when calling `update_position_cross_mode`") # noqa: E501 + # verify the required parameter 'futures_position_cross_mode' is set + if self.api_client.client_side_validation and ('futures_position_cross_mode' not in local_var_params or # noqa: E501 + local_var_params['futures_position_cross_mode'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `futures_position_cross_mode` when calling `update_position_cross_mode`") # noqa: E501 collection_formats = {} @@ -2658,8 +2658,8 @@ def update_position_cross_mode_with_http_info(self, settle, inline_object, **kwa local_var_files = {} body_params = None - if 'inline_object' in local_var_params: - body_params = local_var_params['inline_object'] + if 'futures_position_cross_mode' in local_var_params: + body_params = local_var_params['futures_position_cross_mode'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py index 082ec39..f37561f 100644 --- a/gate_api/api/margin_api.py +++ b/gate_api/api/margin_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -144,16 +144,23 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 + def list_margin_account_book(self, **kwargs): # noqa: E501 + """List margin account balance change history # noqa: E501 + Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_margin_tier(currency_pair, async_req=True) + >>> thread = api.list_margin_account_book(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. + :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -161,23 +168,30 @@ def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.MarginLeverageTier] + :rtype: list[gate_api.MarginAccountBook] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 + return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 - def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 + def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 + """List margin account balance change history # noqa: E501 + Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_margin_tier_with_http_info(currency_pair, async_req=True) + >>> thread = api.list_margin_account_book_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. + :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. + :param int _from: Start timestamp of the query + :param int to: Time range ending, default to current time + :param int page: Page number + :param int limit: Maximum number of records to be returned in a single list :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -187,7 +201,7 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginAccountBook], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -195,7 +209,13 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: local_var_params = locals() all_params = [ - 'currency_pair' + 'currency', + 'currency_pair', + 'type', + '_from', + 'to', + 'page', + 'limit' ] all_params.extend( [ @@ -210,22 +230,36 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_margin_tier" % k + " to method list_margin_account_book" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_user_margin_tier`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + 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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -241,14 +275,14 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/user/loan_margin_tiers', 'GET', + '/margin/account_book', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[MarginLeverageTier]', # noqa: E501 + response_type='list[MarginAccountBook]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -256,16 +290,16 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # noqa: E501 + def list_funding_accounts(self, **kwargs): # noqa: E501 + """Funding account 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_market_margin_tier(currency_pair, async_req=True) + >>> thread = api.list_funding_accounts(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency: Retrieve data of the specified currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -273,23 +307,23 @@ def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.MarginLeverageTier] + :rtype: list[gate_api.FundingAccount] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 + return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 - def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # noqa: E501 + def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 + """Funding account 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_market_margin_tier_with_http_info(currency_pair, async_req=True) + >>> thread = api.list_funding_accounts_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency: Retrieve data of the specified currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -299,7 +333,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **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.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.FundingAccount], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -307,7 +341,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq local_var_params = locals() all_params = [ - 'currency_pair' + 'currency' ] all_params.extend( [ @@ -322,22 +356,18 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_market_margin_tier" % k + " to method list_funding_accounts" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_market_margin_tier`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + 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 = {} @@ -350,17 +380,17 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/loan_margin_tiers', 'GET', + '/margin/funding_accounts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[MarginLeverageTier]', # noqa: E501 + response_type='list[FundingAccount]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -368,16 +398,15 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # noqa: E501 + def get_auto_repay_status(self, **kwargs): # noqa: E501 + """Retrieve user auto repayment 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.set_user_market_leverage(margin_market_leverage, async_req=True) + >>> thread = api.get_auto_repay_status(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param MarginMarketLeverage margin_market_leverage: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -385,23 +414,22 @@ def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: gate_api.AutoRepaySetting :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 + return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 - def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # noqa: E501 + def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve user auto repayment 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.set_user_market_leverage_with_http_info(margin_market_leverage, async_req=True) + >>> thread = api.get_auto_repay_status_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param MarginMarketLeverage margin_market_leverage: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -411,7 +439,7 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: tuple(gate_api.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -419,7 +447,6 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar local_var_params = locals() all_params = [ - 'margin_market_leverage' ] all_params.extend( [ @@ -434,14 +461,10 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method set_user_market_leverage" % k + " to method get_auto_repay_status" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'margin_market_leverage' is set - if self.api_client.client_side_validation and ('margin_market_leverage' not in local_var_params or # noqa: E501 - local_var_params['margin_market_leverage'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `margin_market_leverage` when calling `set_user_market_leverage`") # noqa: E501 collection_formats = {} @@ -455,24 +478,22 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar local_var_files = {} body_params = None - if 'margin_market_leverage' in local_var_params: - body_params = local_var_params['margin_market_leverage'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/leverage/user_market_setting', 'POST', + '/margin/auto_repay', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='AutoRepaySetting', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -480,17 +501,16 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_margin_user_account(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 + def set_auto_repay(self, status, **kwargs): # noqa: E501 + """Update user's auto repayment setting # noqa: E501 - Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_user_account(async_req=True) + >>> thread = api.set_auto_repay(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -498,24 +518,23 @@ def list_margin_user_account(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.MarginAccount] + :rtype: gate_api.AutoRepaySetting :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 + return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 - def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 + def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 + """Update user's auto repayment setting # noqa: E501 - Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_user_account_with_http_info(async_req=True) + >>> thread = api.set_auto_repay_with_http_info(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -525,7 +544,7 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.MarginAccount], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -533,7 +552,7 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency_pair' + 'status' ] all_params.extend( [ @@ -548,18 +567,22 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_margin_user_account" % k + " to method set_auto_repay" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'status' is set + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `status` when calling `set_auto_repay`") # noqa: E501 collection_formats = {} 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 header_params = {} @@ -575,14 +598,14 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/user/account', 'GET', + '/margin/auto_repay', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[MarginAccount]', # noqa: E501 + response_type='AutoRepaySetting', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -590,23 +613,17 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_margin_account_book(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 + def get_margin_transferable(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific margin currency # noqa: E501 - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_account_book(async_req=True) + >>> thread = api.get_margin_transferable(currency, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -614,30 +631,24 @@ def list_margin_account_book(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.MarginAccountBook] + :rtype: gate_api.MarginTransferable :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 + return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 - def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 + def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 + """Get the max transferable amount for a specific margin currency # noqa: E501 - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_margin_account_book_with_http_info(async_req=True) + >>> thread = api.get_margin_transferable_with_http_info(currency, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -647,7 +658,7 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.MarginAccountBook], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.MarginTransferable, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -656,12 +667,7 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 all_params = [ 'currency', - 'currency_pair', - 'type', - '_from', - 'to', - 'page', - 'limit' + 'currency_pair' ] all_params.extend( [ @@ -676,17 +682,15 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_margin_account_book" % k + " to method get_margin_transferable" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_margin_transferable`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value less than or equal to `500`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_margin_account_book`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} @@ -696,16 +700,6 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('currency', local_var_params['currency'])) # noqa: E501 if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - if '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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -721,14 +715,14 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/account_book', 'GET', + '/margin/transferable', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[MarginAccountBook]', # noqa: E501 + response_type='MarginTransferable', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -736,16 +730,16 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_funding_accounts(self, **kwargs): # noqa: E501 - """Funding account list # noqa: E501 + def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 + """Check the user's own leverage lending gradient in the current market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_funding_accounts(async_req=True) + >>> thread = api.get_user_margin_tier(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -753,23 +747,23 @@ def list_funding_accounts(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.FundingAccount] + :rtype: list[gate_api.MarginLeverageTier] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 + return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 - def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Funding account list # noqa: E501 + def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Check the user's own leverage lending gradient in the current market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_funding_accounts_with_http_info(async_req=True) + >>> thread = api.get_user_margin_tier_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -779,7 +773,7 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.FundingAccount], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -787,7 +781,7 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency' + 'currency_pair' ] all_params.extend( [ @@ -802,18 +796,22 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_funding_accounts" % k + " to method get_user_margin_tier" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_user_margin_tier`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 + query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 header_params = {} @@ -829,14 +827,14 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/funding_accounts', 'GET', + '/margin/user/loan_margin_tiers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[FundingAccount]', # noqa: E501 + response_type='list[MarginLeverageTier]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -844,15 +842,16 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_auto_repay_status(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting # noqa: E501 + def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 + """Query the current market leverage lending gradient # 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_auto_repay_status(async_req=True) + >>> thread = api.get_market_margin_tier(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -860,22 +859,23 @@ def get_auto_repay_status(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.AutoRepaySetting + :rtype: list[gate_api.MarginLeverageTier] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 + return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 - def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting # noqa: E501 + def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Query the current market leverage lending gradient # 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_auto_repay_status_with_http_info(async_req=True) + >>> thread = api.get_market_margin_tier_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -885,7 +885,7 @@ def get_auto_repay_status_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.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginLeverageTier], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -893,6 +893,7 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ + 'currency_pair' ] all_params.extend( [ @@ -907,16 +908,22 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_auto_repay_status" % k + " to method get_market_margin_tier" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_market_margin_tier`") # noqa: E501 collection_formats = {} path_params = {} 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 = {} @@ -929,17 +936,17 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/margin/auto_repay', 'GET', + '/margin/loan_margin_tiers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='AutoRepaySetting', # noqa: E501 + response_type='list[MarginLeverageTier]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -947,16 +954,16 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def set_auto_repay(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting # noqa: E501 + def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 + """Set the user market leverage multiple # 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_auto_repay(status, async_req=True) + >>> thread = api.set_user_market_leverage(margin_market_leverage, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) + :param MarginMarketLeverage margin_market_leverage: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -964,23 +971,23 @@ def set_auto_repay(self, status, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.AutoRepaySetting + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 + return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 - def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting # noqa: E501 + def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 + """Set the user market leverage multiple # 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_auto_repay_with_http_info(status, async_req=True) + >>> thread = api.set_user_market_leverage_with_http_info(margin_market_leverage, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) + :param MarginMarketLeverage margin_market_leverage: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -990,7 +997,7 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.AutoRepaySetting, status_code(int), headers(HTTPHeaderDict)) + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ @@ -998,7 +1005,7 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'status' + 'margin_market_leverage' ] all_params.extend( [ @@ -1013,22 +1020,20 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method set_auto_repay" % k + " to method set_user_market_leverage" % 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 `set_auto_repay`") # noqa: E501 + # verify the required parameter 'margin_market_leverage' is set + if self.api_client.client_side_validation and ('margin_market_leverage' not in local_var_params or # noqa: E501 + local_var_params['margin_market_leverage'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `margin_market_leverage` when calling `set_user_market_leverage`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if '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 header_params = {} @@ -1036,22 +1041,24 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( + if 'margin_market_leverage' in local_var_params: + body_params = local_var_params['margin_market_leverage'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/auto_repay', 'POST', + '/margin/leverage/user_market_setting', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='AutoRepaySetting', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1059,16 +1066,16 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_margin_transferable(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 + def list_margin_user_account(self, **kwargs): # noqa: E501 + """Query the user's leverage account list # noqa: E501 + Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_transferable(currency, async_req=True) + >>> thread = api.list_margin_user_account(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) :param str currency_pair: Currency pair :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1077,23 +1084,23 @@ def get_margin_transferable(self, currency, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.MarginTransferable + :rtype: list[gate_api.MarginAccount] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 + return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 - def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 + def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 + """Query the user's leverage account list # noqa: E501 + Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_transferable_with_http_info(currency, async_req=True) + >>> thread = api.list_margin_user_account_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) :param str currency_pair: Currency pair :param _return_http_data_only: response data without head status code and headers @@ -1104,7 +1111,7 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.MarginTransferable, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.MarginAccount], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1112,7 +1119,6 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E local_var_params = locals() all_params = [ - 'currency', 'currency_pair' ] all_params.extend( @@ -1128,22 +1134,16 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_margin_transferable" % k + " to method list_margin_user_account" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_margin_transferable`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 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 @@ -1161,14 +1161,14 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/transferable', 'GET', + '/margin/user/account', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='MarginTransferable', # noqa: E501 + response_type='list[MarginAccount]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py index ee6f869..c9d80f0 100644 --- a/gate_api/api/margin_uni_api.py +++ b/gate_api/api/margin_uni_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -139,19 +139,16 @@ def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_uni_loans(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 + """Get detail of lending market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loans(async_req=True) + >>> thread = api.get_uni_currency_pair(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -159,26 +156,23 @@ def list_uni_loans(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.UniLoan] + :rtype: gate_api.UniCurrencyPair :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 + return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 - def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 + """Get detail of lending market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loans_with_http_info(async_req=True) + >>> thread = api.get_uni_currency_pair_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -188,7 +182,7 @@ def list_uni_loans_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.UniLoan], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.UniCurrencyPair, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -196,10 +190,7 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency_pair', - 'currency', - 'page', - 'limit' + 'currency_pair' ] all_params.extend( [ @@ -214,30 +205,22 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_uni_loans" % k + " to method get_uni_currency_pair" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} + if 'currency_pair' in local_var_params: + path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 query_params = [] - if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 - query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -250,17 +233,17 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/margin/uni/loans', 'GET', + '/margin/uni/currency_pairs/{currency_pair}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UniLoan]', # noqa: E501 + response_type='UniCurrencyPair', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -268,16 +251,17 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 + """Estimate interest Rate # noqa: E501 + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_loan(create_uni_loan, async_req=True) + >>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CreateUniLoan create_uni_loan: (required) + :param list[str] currencies: An array of up to 10 specifying the currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -285,23 +269,24 @@ def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: dict :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 + return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 - def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 + """Estimate interest Rate # noqa: E501 + Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_uni_loan_with_http_info(create_uni_loan, async_req=True) + >>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param CreateUniLoan create_uni_loan: (required) + :param list[str] currencies: An array of up to 10 specifying the currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -311,7 +296,7 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -319,7 +304,7 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 local_var_params = locals() all_params = [ - 'create_uni_loan' + 'currencies' ] all_params.extend( [ @@ -334,20 +319,29 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_uni_loan" % k + " to method get_margin_uni_estimate_rate" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'create_uni_loan' is set - if self.api_client.client_side_validation and ('create_uni_loan' not in local_var_params or # noqa: E501 - local_var_params['create_uni_loan'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_uni_loan` when calling `create_uni_loan`") # noqa: E501 + # verify the required parameter 'currencies' is set + if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 + local_var_params['currencies'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) > 10): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 + if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 + len(local_var_params['currencies']) < 1): # noqa: E501 + raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 + query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 + collection_formats['currencies'] = 'multi' # noqa: E501 header_params = {} @@ -355,24 +349,22 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'create_uni_loan' in local_var_params: - body_params = local_var_params['create_uni_loan'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/loans', 'POST', + '/margin/uni/estimate_rate', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='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 @@ -380,17 +372,19 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 + def list_uni_loans(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_borrowable(currency, currency_pair, async_req=True) + >>> thread = api.list_uni_loans(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -398,24 +392,26 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.MaxUniBorrowable + :rtype: list[gate_api.UniLoan] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 + return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 - def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 + def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 + """List loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_borrowable_with_http_info(currency, currency_pair, async_req=True) + >>> thread = api.list_uni_loans_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -425,7 +421,7 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.MaxUniBorrowable, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniLoan], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -433,8 +429,10 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): local_var_params = locals() all_params = [ + 'currency_pair', 'currency', - 'currency_pair' + 'page', + 'limit' ] all_params.extend( [ @@ -449,28 +447,30 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_uni_borrowable" % k + " to method list_uni_loans" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_borrowable`") # noqa: E501 - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_borrowable`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loans`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 if 'currency_pair' in local_var_params and local_var_params['currency_pair'] is not None: # noqa: E501 query_params.append(('currency_pair', local_var_params['currency_pair'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -486,14 +486,14 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/borrowable', 'GET', + '/margin/uni/loans', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='MaxUniBorrowable', # noqa: E501 + response_type='list[UniLoan]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -501,16 +501,16 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 + def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency_pair(currency_pair, async_req=True) + >>> thread = api.create_uni_loan(create_uni_loan, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param CreateUniLoan create_uni_loan: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -518,23 +518,23 @@ def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: gate_api.UniCurrencyPair + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 + return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 - def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 + def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 + """Borrow or repay # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_uni_currency_pair_with_http_info(currency_pair, async_req=True) + >>> thread = api.create_uni_loan_with_http_info(create_uni_loan, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param CreateUniLoan create_uni_loan: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -544,7 +544,7 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.UniCurrencyPair, status_code(int), headers(HTTPHeaderDict)) + :rtype: None :return: If the method is called asynchronously, returns the request thread. """ @@ -552,7 +552,7 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa local_var_params = locals() all_params = [ - 'currency_pair' + 'create_uni_loan' ] all_params.extend( [ @@ -567,20 +567,18 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_uni_currency_pair" % k + " to method create_uni_loan" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currency_pair' is set - if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 - local_var_params['currency_pair'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_currency_pair`") # noqa: E501 + # verify the required parameter 'create_uni_loan' is set + if self.api_client.client_side_validation and ('create_uni_loan' not in local_var_params or # noqa: E501 + local_var_params['create_uni_loan'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_uni_loan` when calling `create_uni_loan`") # noqa: E501 collection_formats = {} path_params = {} - if 'currency_pair' in local_var_params: - path_params['currency_pair'] = local_var_params['currency_pair'] # noqa: E501 query_params = [] @@ -590,22 +588,24 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( + if 'create_uni_loan' in local_var_params: + body_params = local_var_params['create_uni_loan'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/currency_pairs/{currency_pair}', 'GET', + '/margin/uni/loans', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='UniCurrencyPair', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -613,17 +613,20 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 + def list_uni_loan_records(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True) + >>> thread = api.list_uni_loan_records(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param str type: type: borrow - borrow, repay - repay + :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -631,24 +634,27 @@ def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: dict + :rtype: list[gate_api.UniLoanRecord] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 + return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 - def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 + def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 + """Get load records # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True) + >>> thread = api.list_uni_loan_records_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param str type: type: borrow - borrow, repay - repay + :param str currency: Retrieve data of the specified currency + :param str currency_pair: Currency pair + :param int page: Page number + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -658,7 +664,7 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(dict, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniLoanRecord], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -666,7 +672,11 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # local_var_params = locals() all_params = [ - 'currencies' + 'type', + 'currency', + 'currency_pair', + 'page', + 'limit' ] all_params.extend( [ @@ -681,29 +691,32 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_margin_uni_estimate_rate" % k + " to method list_uni_loan_records" % k ) local_var_params[k] = v del local_var_params['kwargs'] - # verify the required parameter 'currencies' is set - if self.api_client.client_side_validation and ('currencies' not in local_var_params or # noqa: E501 - local_var_params['currencies'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currencies` when calling `get_margin_uni_estimate_rate`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) > 10): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be less than or equal to `10`") # noqa: E501 - if self.api_client.client_side_validation and ('currencies' in local_var_params and # noqa: E501 - len(local_var_params['currencies']) < 1): # noqa: E501 - raise ApiValueError("Invalid value for parameter `currencies` when calling `get_margin_uni_estimate_rate`, number of items must be greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'currencies' in local_var_params and local_var_params['currencies'] is not None: # noqa: E501 - query_params.append(('currencies', local_var_params['currencies'])) # noqa: E501 - collection_formats['currencies'] = 'multi' # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if '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 '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 = {} @@ -719,14 +732,14 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/estimate_rate', 'GET', + '/margin/uni/loan_records', '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='list[UniLoanRecord]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -734,20 +747,21 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_uni_loan_records(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_records(async_req=True) + >>> thread = api.list_uni_loan_interest_records(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -755,27 +769,28 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.UniLoanRecord] + :rtype: list[gate_api.UniLoanInterestRecord] :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 + return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 - def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 + """List interest records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_records_with_http_info(async_req=True) + >>> thread = api.list_uni_loan_interest_records_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp + :param int to: End timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -785,7 +800,7 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -793,11 +808,12 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'type', - 'currency', 'currency_pair', + 'currency', 'page', - 'limit' + 'limit', + '_from', + 'to' ] all_params.extend( [ @@ -812,32 +828,34 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_uni_loan_records" % k + " to method list_uni_loan_interest_records" % k ) local_var_params[k] = v del local_var_params['kwargs'] if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value less than or equal to `100`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `1000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_records`, must be a value greater than or equal to `1`") # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 - query_params.append(('currency', local_var_params['currency'])) # noqa: E501 if '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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 + query_params.append(('currency', local_var_params['currency'])) # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 header_params = {} @@ -853,14 +871,14 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/loan_records', 'GET', + '/margin/uni/interest_records', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UniLoanRecord]', # noqa: E501 + response_type='list[UniLoanInterestRecord]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -868,21 +886,17 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 + """Get maximum borrowable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_interest_records(async_req=True) + >>> thread = api.get_uni_borrowable(currency, currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -890,28 +904,24 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.UniLoanInterestRecord] + :rtype: gate_api.MaxUniBorrowable :return: If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 + return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 - def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 + """Get maximum borrowable # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_uni_loan_interest_records_with_http_info(async_req=True) + >>> thread = api.get_uni_borrowable_with_http_info(currency, currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param str currency: Retrieve data of the specified currency (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -921,7 +931,7 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.UniLoanInterestRecord], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.MaxUniBorrowable, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -929,12 +939,8 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'currency_pair', 'currency', - 'page', - 'limit', - '_from', - 'to' + 'currency_pair' ] all_params.extend( [ @@ -949,34 +955,28 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 if k not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_uni_loan_interest_records" % k + " to method get_uni_borrowable" % k ) local_var_params[k] = v del local_var_params['kwargs'] + # verify the required parameter 'currency' is set + if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 + local_var_params['currency'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency` when calling `get_uni_borrowable`") # noqa: E501 + # verify the required parameter 'currency_pair' is set + if self.api_client.client_side_validation and ('currency_pair' not in local_var_params or # noqa: E501 + local_var_params['currency_pair'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `currency_pair` when calling `get_uni_borrowable`") # noqa: E501 - if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `page` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_uni_loan_interest_records`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} 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 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 query_params.append(('currency', local_var_params['currency'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 + if '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 = {} @@ -992,14 +992,14 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['apiv4'] # noqa: E501 return self.api_client.call_api( - '/margin/uni/interest_records', 'GET', + '/margin/uni/borrowable', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UniLoanInterestRecord]', # noqa: E501 + response_type='MaxUniBorrowable', # noqa: E501 auth_settings=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/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index e7df4ec..a115672 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py index 8a46b29..8a7e981 100644 --- a/gate_api/api/options_api.py +++ b/gate_api/api/options_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index d1c59e2..7fe79dc 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py index 5ab8901..3f6d78c 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/sub_account_api.py b/gate_api/api/sub_account_api.py index 0b6c230..ff015c8 100644 --- a/gate_api/api/sub_account_api.py +++ b/gate_api/api/sub_account_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -502,7 +502,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.SubAccountKey] + :rtype: gate_api.SubAccountKey :return: If the method is called asynchronously, returns the request thread. """ @@ -529,7 +529,7 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.SubAccountKey], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(gate_api.SubAccountKey, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -601,7 +601,7 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='list[SubAccountKey]', # noqa: E501 + response_type='SubAccountKey', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index f976b83..cec183f 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py index 71de718..1870943 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -687,7 +687,7 @@ def list_sub_account_transfers(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[gate_api.SubAccountTransfer] + :rtype: list[gate_api.SubAccountTransferRecordItem] :return: If the method is called asynchronously, returns the request thread. """ @@ -718,7 +718,7 @@ def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[gate_api.SubAccountTransfer], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.SubAccountTransferRecordItem], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -793,7 +793,7 @@ def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[SubAccountTransfer]', # noqa: E501 + response_type='list[SubAccountTransferRecordItem]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py index eb12d52..4cb4eee 100644 --- a/gate_api/api/withdrawal_api.py +++ b/gate_api/api/withdrawal_api.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 09d71f2..c8f9007 100644 --- a/gate_api/api_client.py +++ b/gate_api/api_client.py @@ -2,7 +2,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -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/6.99.0/python' + self.user_agent = 'OpenAPI-Generator/6.100.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index bf67b04..e5812f1 100644 --- a/gate_api/configuration.py +++ b/gate_api/configuration.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -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: 4.99.0\n"\ - "SDK Package Version: 6.99.0".\ + "Version of the API: 4.100.0\n"\ + "SDK Package Version: 6.100.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py index 541b24f..37171b2 100644 --- a/gate_api/exceptions.py +++ b/gate_api/exceptions.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py index 481b591..4aa139f 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -4,7 +4,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -15,9 +15,11 @@ # import models into model package from gate_api.models.account_balance import AccountBalance +from gate_api.models.account_book_response import AccountBookResponse from gate_api.models.account_detail import AccountDetail from gate_api.models.account_detail_key import AccountDetailKey from gate_api.models.account_rate_limit import AccountRateLimit +from gate_api.models.accounts_response import AccountsResponse from gate_api.models.agency_commission import AgencyCommission from gate_api.models.agency_commission_history import AgencyCommissionHistory from gate_api.models.agency_transaction import AgencyTransaction @@ -30,6 +32,7 @@ from gate_api.models.borrow_currency_info import BorrowCurrencyInfo from gate_api.models.broker_commission import BrokerCommission from gate_api.models.broker_commission1 import BrokerCommission1 +from gate_api.models.broker_commission_sub_broker_info import BrokerCommissionSubBrokerInfo from gate_api.models.broker_transaction import BrokerTransaction from gate_api.models.broker_transaction1 import BrokerTransaction1 from gate_api.models.cancel_batch_order import CancelBatchOrder @@ -60,6 +63,7 @@ from gate_api.models.cross_margin_loan import CrossMarginLoan from gate_api.models.cross_margin_repayment import CrossMarginRepayment from gate_api.models.currency import Currency +from gate_api.models.currency2 import Currency2 from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota @@ -74,6 +78,7 @@ from gate_api.models.dual_get_plans import DualGetPlans from gate_api.models.eth2_rate_list import Eth2RateList from gate_api.models.eth2_swap import Eth2Swap +from gate_api.models.find_coin import FindCoin from gate_api.models.flash_swap_currency_pair import FlashSwapCurrencyPair from gate_api.models.flash_swap_order import FlashSwapOrder from gate_api.models.flash_swap_order_preview import FlashSwapOrderPreview @@ -98,13 +103,13 @@ from gate_api.models.futures_order_amendment import FuturesOrderAmendment from gate_api.models.futures_order_book import FuturesOrderBook from gate_api.models.futures_order_book_item import FuturesOrderBookItem +from gate_api.models.futures_position_cross_mode import FuturesPositionCrossMode from gate_api.models.futures_premium_index import FuturesPremiumIndex from gate_api.models.futures_price_trigger import FuturesPriceTrigger from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.index_constituent import IndexConstituent -from gate_api.models.inline_object import InlineObject from gate_api.models.inline_response200 import InlineResponse200 from gate_api.models.inline_response2001 import InlineResponse2001 from gate_api.models.insurance_record import InsuranceRecord @@ -160,16 +165,21 @@ from gate_api.models.order_cancel import OrderCancel from gate_api.models.order_patch import OrderPatch from gate_api.models.order_resp import OrderResp +from gate_api.models.order_response import OrderResponse from gate_api.models.partner_commission_history import PartnerCommissionHistory from gate_api.models.partner_sub import PartnerSub from gate_api.models.partner_sub_list import PartnerSubList from gate_api.models.partner_transaction_history import PartnerTransactionHistory from gate_api.models.patch_uni_lend import PatchUniLend from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder +from gate_api.models.place_order_request import PlaceOrderRequest +from gate_api.models.place_order_response import PlaceOrderResponse from gate_api.models.position import Position from gate_api.models.position_close import PositionClose from gate_api.models.position_close_order import PositionCloseOrder from gate_api.models.profit_loss_range import ProfitLossRange +from gate_api.models.quote_request import QuoteRequest +from gate_api.models.quote_response import QuoteResponse from gate_api.models.rebate_user_info import RebateUserInfo from gate_api.models.repay_currency_res import RepayCurrencyRes from gate_api.models.repay_loan import RepayLoan @@ -206,10 +216,13 @@ from gate_api.models.sub_account_margin_balance import SubAccountMarginBalance from gate_api.models.sub_account_to_sub_account import SubAccountToSubAccount from gate_api.models.sub_account_transfer import SubAccountTransfer +from gate_api.models.sub_account_transfer_record_item import SubAccountTransferRecordItem from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount from gate_api.models.sub_user_mode import SubUserMode +from gate_api.models.swap_coin import SwapCoin from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker +from gate_api.models.ticker2 import Ticker2 from gate_api.models.total_balance import TotalBalance from gate_api.models.trade import Trade from gate_api.models.trade_fee import TradeFee diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py index 5fffa34..c9e2f82 100644 --- a/gate_api/models/account_balance.py +++ b/gate_api/models/account_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_book_response.py b/gate_api/models/account_book_response.py new file mode 100644 index 0000000..16d3d44 --- /dev/null +++ b/gate_api/models/account_book_response.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AccountBookResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'time': 'int', + 'currency': 'str', + 'change': 'str', + 'balance': 'str' + } + + attribute_map = { + 'id': 'id', + 'time': 'time', + 'currency': 'currency', + 'change': 'change', + 'balance': 'balance' + } + + def __init__(self, id=None, time=None, currency=None, change=None, balance=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, Configuration) -> None + """AccountBookResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._time = None + self._currency = None + self._change = None + self._balance = None + self.discriminator = None + + if id is not None: + self.id = id + if time is not None: + self.time = time + if currency is not None: + self.currency = currency + if change is not None: + self.change = change + if balance is not None: + self.balance = balance + + @property + def id(self): + """Gets the id of this AccountBookResponse. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this AccountBookResponse. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AccountBookResponse. + + Order ID # noqa: E501 + + :param id: The id of this AccountBookResponse. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def time(self): + """Gets the time of this AccountBookResponse. # noqa: E501 + + 操作时间戳 # noqa: E501 + + :return: The time of this AccountBookResponse. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this AccountBookResponse. + + 操作时间戳 # noqa: E501 + + :param time: The time of this AccountBookResponse. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def currency(self): + """Gets the currency of this AccountBookResponse. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this AccountBookResponse. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this AccountBookResponse. + + Currency name # noqa: E501 + + :param currency: The currency of this AccountBookResponse. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def change(self): + """Gets the change of this AccountBookResponse. # noqa: E501 + + Change amount # noqa: E501 + + :return: The change of this AccountBookResponse. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this AccountBookResponse. + + Change amount # noqa: E501 + + :param change: The change of this AccountBookResponse. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def balance(self): + """Gets the balance of this AccountBookResponse. # noqa: E501 + + 变更后余额 # noqa: E501 + + :return: The balance of this AccountBookResponse. # noqa: E501 + :rtype: str + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this AccountBookResponse. + + 变更后余额 # noqa: E501 + + :param balance: The balance of this AccountBookResponse. # noqa: E501 + :type: str + """ + + self._balance = 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, AccountBookResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountBookResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py index 4998498..9ea7e58 100644 --- a/gate_api/models/account_detail.py +++ b/gate_api/models/account_detail.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py index 3e8b0f4..e333cd4 100644 --- a/gate_api/models/account_detail_key.py +++ b/gate_api/models/account_detail_key.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py index 95db086..7c49f39 100644 --- a/gate_api/models/account_rate_limit.py +++ b/gate_api/models/account_rate_limit.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/accounts_response.py b/gate_api/models/accounts_response.py new file mode 100644 index 0000000..4b9622e --- /dev/null +++ b/gate_api/models/accounts_response.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class AccountsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'token_address': 'str', + 'chain': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'available': 'available', + 'locked': 'locked', + 'token_address': 'token_address', + 'chain': 'chain' + } + + def __init__(self, currency=None, available=None, locked=None, token_address=None, chain=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """AccountsResponse - a 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._token_address = None + self._chain = 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 token_address is not None: + self.token_address = token_address + if chain is not None: + self.chain = chain + + @property + def currency(self): + """Gets the currency of this AccountsResponse. # noqa: E501 + + Currency name # noqa: E501 + + :return: The currency of this AccountsResponse. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this AccountsResponse. + + Currency name # noqa: E501 + + :param currency: The currency of this AccountsResponse. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def available(self): + """Gets the available of this AccountsResponse. # noqa: E501 + + Available Balance # noqa: E501 + + :return: The available of this AccountsResponse. # noqa: E501 + :rtype: str + """ + return self._available + + @available.setter + def available(self, available): + """Sets the available of this AccountsResponse. + + Available Balance # noqa: E501 + + :param available: The available of this AccountsResponse. # noqa: E501 + :type: str + """ + + self._available = available + + @property + def locked(self): + """Gets the locked of this AccountsResponse. # noqa: E501 + + 锁定余额 # noqa: E501 + + :return: The locked of this AccountsResponse. # noqa: E501 + :rtype: str + """ + return self._locked + + @locked.setter + def locked(self, locked): + """Sets the locked of this AccountsResponse. + + 锁定余额 # noqa: E501 + + :param locked: The locked of this AccountsResponse. # noqa: E501 + :type: str + """ + + self._locked = locked + + @property + def token_address(self): + """Gets the token_address of this AccountsResponse. # noqa: E501 + + token 地址 # noqa: E501 + + :return: The token_address of this AccountsResponse. # noqa: E501 + :rtype: str + """ + return self._token_address + + @token_address.setter + def token_address(self, token_address): + """Sets the token_address of this AccountsResponse. + + token 地址 # noqa: E501 + + :param token_address: The token_address of this AccountsResponse. # noqa: E501 + :type: str + """ + + self._token_address = token_address + + @property + def chain(self): + """Gets the chain of this AccountsResponse. # noqa: E501 + + 区块链名称 # noqa: E501 + + :return: The chain of this AccountsResponse. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this AccountsResponse. + + 区块链名称 # noqa: E501 + + :param chain: The chain of this AccountsResponse. # noqa: E501 + :type: str + """ + + self._chain = chain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py index 5982127..61b99f4 100644 --- a/gate_api/models/agency_commission.py +++ b/gate_api/models/agency_commission.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py index ecc9c5f..66f5eae 100644 --- a/gate_api/models/agency_commission_history.py +++ b/gate_api/models/agency_commission_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py index fd56e73..deaddd7 100644 --- a/gate_api/models/agency_transaction.py +++ b/gate_api/models/agency_transaction.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py index 3d38802..e13e117 100644 --- a/gate_api/models/agency_transaction_history.py +++ b/gate_api/models/agency_transaction_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py index c62f47c..949d95f 100644 --- a/gate_api/models/auto_repay_setting.py +++ b/gate_api/models/auto_repay_setting.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py index bc32d64..31506bc 100644 --- a/gate_api/models/batch_amend_item.py +++ b/gate_api/models/batch_amend_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py index 09b664c..6700166 100644 --- a/gate_api/models/batch_amend_order_req.py +++ b/gate_api/models/batch_amend_order_req.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py index 6fa6c57..70a18fe 100644 --- a/gate_api/models/batch_futures_order.py +++ b/gate_api/models/batch_futures_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py index 354a2cc..55c5094 100644 --- a/gate_api/models/batch_order.py +++ b/gate_api/models/batch_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py index b142099..b87d5d1 100644 --- a/gate_api/models/borrow_currency_info.py +++ b/gate_api/models/borrow_currency_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py index 959f1c2..f976342 100644 --- a/gate_api/models/broker_commission.py +++ b/gate_api/models/broker_commission.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py index a5bcbbe..f8e6734 100644 --- a/gate_api/models/broker_commission1.py +++ b/gate_api/models/broker_commission1.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -41,7 +41,8 @@ class BrokerCommission1(object): 'fee_asset': 'str', 'rebate_fee': 'str', 'source': 'str', - 'currency_pair': 'str' + 'currency_pair': 'str', + 'sub_broker_info': 'BrokerCommissionSubBrokerInfo' } attribute_map = { @@ -53,11 +54,12 @@ class BrokerCommission1(object): 'fee_asset': 'fee_asset', 'rebate_fee': 'rebate_fee', 'source': 'source', - 'currency_pair': 'currency_pair' + 'currency_pair': 'currency_pair', + 'sub_broker_info': 'sub_broker_info' } - def __init__(self, commission_time=None, user_id=None, group_name=None, amount=None, fee=None, fee_asset=None, rebate_fee=None, source=None, currency_pair=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, commission_time=None, user_id=None, group_name=None, amount=None, fee=None, fee_asset=None, rebate_fee=None, source=None, currency_pair=None, sub_broker_info=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, Configuration) -> None """BrokerCommission1 - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -72,6 +74,7 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, amount=N self._rebate_fee = None self._source = None self._currency_pair = None + self._sub_broker_info = None self.discriminator = None if commission_time is not None: @@ -92,6 +95,8 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, amount=N self.source = source if currency_pair is not None: self.currency_pair = currency_pair + if sub_broker_info is not None: + self.sub_broker_info = sub_broker_info @property def commission_time(self): @@ -300,6 +305,27 @@ def currency_pair(self, currency_pair): self._currency_pair = currency_pair + @property + def sub_broker_info(self): + """Gets the sub_broker_info of this BrokerCommission1. # noqa: E501 + + + :return: The sub_broker_info of this BrokerCommission1. # noqa: E501 + :rtype: BrokerCommissionSubBrokerInfo + """ + return self._sub_broker_info + + @sub_broker_info.setter + def sub_broker_info(self, sub_broker_info): + """Sets the sub_broker_info of this BrokerCommission1. + + + :param sub_broker_info: The sub_broker_info of this BrokerCommission1. # noqa: E501 + :type: BrokerCommissionSubBrokerInfo + """ + + self._sub_broker_info = sub_broker_info + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/broker_commission_sub_broker_info.py b/gate_api/models/broker_commission_sub_broker_info.py new file mode 100644 index 0000000..95e249b --- /dev/null +++ b/gate_api/models/broker_commission_sub_broker_info.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class BrokerCommissionSubBrokerInfo(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'user_id': 'int', + 'original_commission_rate': 'str', + 'relative_commission_rate': 'str', + 'commission_rate': 'str' + } + + attribute_map = { + 'user_id': 'user_id', + 'original_commission_rate': 'original_commission_rate', + 'relative_commission_rate': 'relative_commission_rate', + 'commission_rate': 'commission_rate' + } + + def __init__(self, user_id=None, original_commission_rate=None, relative_commission_rate=None, commission_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, Configuration) -> None + """BrokerCommissionSubBrokerInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._user_id = None + self._original_commission_rate = None + self._relative_commission_rate = None + self._commission_rate = None + self.discriminator = None + + if user_id is not None: + self.user_id = user_id + if original_commission_rate is not None: + self.original_commission_rate = original_commission_rate + if relative_commission_rate is not None: + self.relative_commission_rate = relative_commission_rate + if commission_rate is not None: + self.commission_rate = commission_rate + + @property + def user_id(self): + """Gets the user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 + + The sub broker user ID # noqa: E501 + + :return: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this BrokerCommissionSubBrokerInfo. + + The sub broker user ID # noqa: E501 + + :param user_id: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def original_commission_rate(self): + """Gets the original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + + The sub broker original commission rate # noqa: E501 + + :return: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :rtype: str + """ + return self._original_commission_rate + + @original_commission_rate.setter + def original_commission_rate(self, original_commission_rate): + """Sets the original_commission_rate of this BrokerCommissionSubBrokerInfo. + + The sub broker original commission rate # noqa: E501 + + :param original_commission_rate: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :type: str + """ + + self._original_commission_rate = original_commission_rate + + @property + def relative_commission_rate(self): + """Gets the relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + + The sub broker relative commission rate # noqa: E501 + + :return: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :rtype: str + """ + return self._relative_commission_rate + + @relative_commission_rate.setter + def relative_commission_rate(self, relative_commission_rate): + """Sets the relative_commission_rate of this BrokerCommissionSubBrokerInfo. + + The sub broker relative commission rate # noqa: E501 + + :param relative_commission_rate: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :type: str + """ + + self._relative_commission_rate = relative_commission_rate + + @property + def commission_rate(self): + """Gets the commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + + The sub broker actual commission rate # noqa: E501 + + :return: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :rtype: str + """ + return self._commission_rate + + @commission_rate.setter + def commission_rate(self, commission_rate): + """Sets the commission_rate of this BrokerCommissionSubBrokerInfo. + + The sub broker actual commission rate # noqa: E501 + + :param commission_rate: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 + :type: str + """ + + self._commission_rate = commission_rate + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BrokerCommissionSubBrokerInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BrokerCommissionSubBrokerInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py index 3b5f9d9..b61be3d 100644 --- a/gate_api/models/broker_transaction.py +++ b/gate_api/models/broker_transaction.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py index 9177e28..9ee5327 100644 --- a/gate_api/models/broker_transaction1.py +++ b/gate_api/models/broker_transaction1.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -40,7 +40,8 @@ class BrokerTransaction1(object): 'currency_pair': 'str', 'amount': 'str', 'fee_asset': 'str', - 'source': 'str' + 'source': 'str', + 'sub_broker_info': 'BrokerCommissionSubBrokerInfo' } attribute_map = { @@ -51,11 +52,12 @@ class BrokerTransaction1(object): 'currency_pair': 'currency_pair', 'amount': 'amount', 'fee_asset': 'fee_asset', - 'source': 'source' + 'source': 'source', + 'sub_broker_info': 'sub_broker_info' } - def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, currency_pair=None, amount=None, fee_asset=None, source=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, Configuration) -> None + def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, currency_pair=None, amount=None, fee_asset=None, source=None, sub_broker_info=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, Configuration) -> None """BrokerTransaction1 - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -69,6 +71,7 @@ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=Non self._amount = None self._fee_asset = None self._source = None + self._sub_broker_info = None self.discriminator = None if transaction_time is not None: @@ -87,6 +90,8 @@ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=Non self.fee_asset = fee_asset if source is not None: self.source = source + if sub_broker_info is not None: + self.sub_broker_info = sub_broker_info @property def transaction_time(self): @@ -272,6 +277,27 @@ def source(self, source): self._source = source + @property + def sub_broker_info(self): + """Gets the sub_broker_info of this BrokerTransaction1. # noqa: E501 + + + :return: The sub_broker_info of this BrokerTransaction1. # noqa: E501 + :rtype: BrokerCommissionSubBrokerInfo + """ + return self._sub_broker_info + + @sub_broker_info.setter + def sub_broker_info(self, sub_broker_info): + """Sets the sub_broker_info of this BrokerTransaction1. + + + :param sub_broker_info: The sub_broker_info of this BrokerTransaction1. # noqa: E501 + :type: BrokerCommissionSubBrokerInfo + """ + + self._sub_broker_info = sub_broker_info + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py index 4a09540..ddabbbf 100644 --- a/gate_api/models/cancel_batch_order.py +++ b/gate_api/models/cancel_batch_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py index 76503c4..68063e6 100644 --- a/gate_api/models/cancel_order_result.py +++ b/gate_api/models/cancel_order_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py index cd4e49a..d89dccb 100644 --- a/gate_api/models/collateral_adjust.py +++ b/gate_api/models/collateral_adjust.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py index 3fa8742..d8c5d22 100644 --- a/gate_api/models/collateral_adjust_res.py +++ b/gate_api/models/collateral_adjust_res.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py index f2f9751..bd5bd38 100644 --- a/gate_api/models/collateral_align.py +++ b/gate_api/models/collateral_align.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py index 5d2a6a3..93f73b7 100644 --- a/gate_api/models/collateral_currency.py +++ b/gate_api/models/collateral_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py index 21b21af..6c946d2 100644 --- a/gate_api/models/collateral_currency_info.py +++ b/gate_api/models/collateral_currency_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py index eef42b0..58dce85 100644 --- a/gate_api/models/collateral_currency_res.py +++ b/gate_api/models/collateral_currency_res.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py index 32578f1..4c9e81b 100644 --- a/gate_api/models/collateral_current_rate.py +++ b/gate_api/models/collateral_current_rate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py index 9268b39..725b004 100644 --- a/gate_api/models/collateral_fix_rate.py +++ b/gate_api/models/collateral_fix_rate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py index f32d6b2..af6aa68 100644 --- a/gate_api/models/collateral_loan_currency.py +++ b/gate_api/models/collateral_loan_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py index 89f30c8..9e86b8e 100644 --- a/gate_api/models/collateral_ltv.py +++ b/gate_api/models/collateral_ltv.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py index a3ea9d1..62a8e8a 100644 --- a/gate_api/models/collateral_order.py +++ b/gate_api/models/collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py index f6356ef..7c36536 100644 --- a/gate_api/models/collateral_record.py +++ b/gate_api/models/collateral_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index 3f9760b..6c50d39 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -68,7 +68,9 @@ class Contract(object): 'enable_bonus': 'bool', 'enable_credit': 'bool', 'create_time': 'float', - 'funding_cap_ratio': 'str' + 'funding_cap_ratio': 'str', + 'status': 'str', + 'launch_time': 'int' } attribute_map = { @@ -107,11 +109,13 @@ class Contract(object): 'enable_bonus': 'enable_bonus', 'enable_credit': 'enable_credit', 'create_time': 'create_time', - 'funding_cap_ratio': 'funding_cap_ratio' + 'funding_cap_ratio': 'funding_cap_ratio', + 'status': 'status', + 'launch_time': 'launch_time' } - def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, funding_rate=None, funding_interval=None, funding_next_apply=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, enable_bonus=None, enable_credit=None, create_time=None, funding_cap_ratio=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, str, Configuration) -> None + def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, funding_rate=None, funding_interval=None, funding_next_apply=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, enable_bonus=None, enable_credit=None, create_time=None, funding_cap_ratio=None, status=None, launch_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, str, str, int, Configuration) -> None """Contract - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -153,6 +157,8 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self._enable_credit = None self._create_time = None self._funding_cap_ratio = None + self._status = None + self._launch_time = None self.discriminator = None if name is not None: @@ -227,6 +233,10 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self.create_time = create_time if funding_cap_ratio is not None: self.funding_cap_ratio = funding_cap_ratio + if status is not None: + self.status = status + if launch_time is not None: + self.launch_time = launch_time @property def name(self): @@ -1068,6 +1078,52 @@ def funding_cap_ratio(self, funding_cap_ratio): self._funding_cap_ratio = funding_cap_ratio + @property + def status(self): + """Gets the status of this Contract. # noqa: E501 + + Contract Status Types include: prelaunch, trading, delisting, delisted # noqa: E501 + + :return: The status of this Contract. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Contract. + + Contract Status Types include: prelaunch, trading, delisting, delisted # noqa: E501 + + :param status: The status of this Contract. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def launch_time(self): + """Gets the launch_time of this Contract. # noqa: E501 + + 合约开盘时间 # noqa: E501 + + :return: The launch_time of this Contract. # noqa: E501 + :rtype: int + """ + return self._launch_time + + @launch_time.setter + def launch_time(self, launch_time): + """Sets the launch_time of this Contract. + + 合约开盘时间 # noqa: E501 + + :param launch_time: The launch_time of this Contract. # noqa: E501 + :type: int + """ + + self._launch_time = launch_time + 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 110e6de..b90ca94 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py index ecffd40..d4856cf 100644 --- a/gate_api/models/convert_small_balance.py +++ b/gate_api/models/convert_small_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py index 2acd11c..2b29585 100644 --- a/gate_api/models/countdown_cancel_all_futures_task.py +++ b/gate_api/models/countdown_cancel_all_futures_task.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py index 9a5adfc..5c56f5e 100644 --- a/gate_api/models/countdown_cancel_all_options_task.py +++ b/gate_api/models/countdown_cancel_all_options_task.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py index f6cec97..8a79bd5 100644 --- a/gate_api/models/countdown_cancel_all_spot_task.py +++ b/gate_api/models/countdown_cancel_all_spot_task.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py index caa5b86..185122a 100644 --- a/gate_api/models/create_collateral_order.py +++ b/gate_api/models/create_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py index d09b926..41edc85 100644 --- a/gate_api/models/create_multi_collateral_order.py +++ b/gate_api/models/create_multi_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py index 688fa56..708d506 100644 --- a/gate_api/models/create_uni_lend.py +++ b/gate_api/models/create_uni_lend.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py index 875050e..c95c199 100644 --- a/gate_api/models/create_uni_loan.py +++ b/gate_api/models/create_uni_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py index e68e9ed..b52cce6 100644 --- a/gate_api/models/cross_margin_balance.py +++ b/gate_api/models/cross_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py index 104574e..65d0cf4 100644 --- a/gate_api/models/cross_margin_loan.py +++ b/gate_api/models/cross_margin_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py index 471e171..f3a5e98 100644 --- a/gate_api/models/cross_margin_repayment.py +++ b/gate_api/models/cross_margin_repayment.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py index 0abc3aa..c1f7c4c 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency2.py b/gate_api/models/currency2.py new file mode 100644 index 0000000..cc158c3 --- /dev/null +++ b/gate_api/models/currency2.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Currency2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'name': 'str', + 'chain': 'str', + 'address': 'str', + 'amount_precision': 'int', + 'precision': 'int', + 'status': 'int' + } + + attribute_map = { + 'currency': 'currency', + 'name': 'name', + 'chain': 'chain', + 'address': 'address', + 'amount_precision': 'amount_precision', + 'precision': 'precision', + 'status': 'status' + } + + def __init__(self, currency=None, name=None, chain=None, address=None, amount_precision=None, precision=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, int, int, int, Configuration) -> None + """Currency2 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._name = None + self._chain = None + self._address = None + self._amount_precision = None + self._precision = None + self._status = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if name is not None: + self.name = name + if chain is not None: + self.chain = chain + if address is not None: + self.address = address + if amount_precision is not None: + self.amount_precision = amount_precision + if precision is not None: + self.precision = precision + if status is not None: + self.status = status + + @property + def currency(self): + """Gets the currency of this Currency2. # noqa: E501 + + Currency symbol # noqa: E501 + + :return: The currency of this Currency2. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Currency2. + + Currency symbol # noqa: E501 + + :param currency: The currency of this Currency2. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def name(self): + """Gets the name of this Currency2. # noqa: E501 + + Currency name # noqa: E501 + + :return: The name of this Currency2. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Currency2. + + Currency name # noqa: E501 + + :param name: The name of this Currency2. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def chain(self): + """Gets the chain of this Currency2. # noqa: E501 + + The main chain corresponding to the coin # noqa: E501 + + :return: The chain of this Currency2. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this Currency2. + + The main chain corresponding to the coin # noqa: E501 + + :param chain: The chain of this Currency2. # noqa: E501 + :type: str + """ + + self._chain = chain + + @property + def address(self): + """Gets the address of this Currency2. # noqa: E501 + + Contract Address # noqa: E501 + + :return: The address of this Currency2. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this Currency2. + + Contract Address # noqa: E501 + + :param address: The address of this Currency2. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def amount_precision(self): + """Gets the amount_precision of this Currency2. # noqa: E501 + + Amount scale # noqa: E501 + + :return: The amount_precision of this Currency2. # noqa: E501 + :rtype: int + """ + return self._amount_precision + + @amount_precision.setter + def amount_precision(self, amount_precision): + """Sets the amount_precision of this Currency2. + + Amount scale # noqa: E501 + + :param amount_precision: The amount_precision of this Currency2. # noqa: E501 + :type: int + """ + + self._amount_precision = amount_precision + + @property + def precision(self): + """Gets the precision of this Currency2. # noqa: E501 + + Price scale # noqa: E501 + + :return: The precision of this Currency2. # noqa: E501 + :rtype: int + """ + return self._precision + + @precision.setter + def precision(self, precision): + """Sets the precision of this Currency2. + + Price scale # noqa: E501 + + :param precision: The precision of this Currency2. # noqa: E501 + :type: int + """ + + self._precision = precision + + @property + def status(self): + """Gets the status of this Currency2. # noqa: E501 + + 币种交易状态 - `1` : 正常交易 - `2` : 暂停交易 - `3` : 下架 # noqa: E501 + + :return: The status of this Currency2. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Currency2. + + 币种交易状态 - `1` : 正常交易 - `2` : 暂停交易 - `3` : 下架 # noqa: E501 + + :param status: The status of this Currency2. # noqa: E501 + :type: int + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Currency2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Currency2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py index 4f7af01..cb4d707 100644 --- a/gate_api/models/currency_chain.py +++ b/gate_api/models/currency_chain.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index c3c5682..72c9bb4 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py index 592f1cc..413359e 100644 --- a/gate_api/models/currency_quota.py +++ b/gate_api/models/currency_quota.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py index 5965656..b3be63a 100644 --- a/gate_api/models/debit_fee.py +++ b/gate_api/models/debit_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py index 1b9a920..f1342ef 100644 --- a/gate_api/models/delivery_candlestick.py +++ b/gate_api/models/delivery_candlestick.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py index cd5c9e6..b59d4e9 100644 --- a/gate_api/models/delivery_contract.py +++ b/gate_api/models/delivery_contract.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py index 57445ab..c52f9dc 100644 --- a/gate_api/models/delivery_settlement.py +++ b/gate_api/models/delivery_settlement.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_ticker.py b/gate_api/models/delivery_ticker.py index f21680e..e0a8d36 100644 --- a/gate_api/models/delivery_ticker.py +++ b/gate_api/models/delivery_ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py index 79b3dfc..4946b95 100644 --- a/gate_api/models/deposit_address.py +++ b/gate_api/models/deposit_address.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py index a0c5229..c9381d8 100644 --- a/gate_api/models/deposit_record.py +++ b/gate_api/models/deposit_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py index 8df72f8..a7c42bc 100644 --- a/gate_api/models/dual_get_orders.py +++ b/gate_api/models/dual_get_orders.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py index 4fd8a1e..b501a56 100644 --- a/gate_api/models/dual_get_plans.py +++ b/gate_api/models/dual_get_plans.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py index 2490020..79ea7cf 100644 --- a/gate_api/models/eth2_rate_list.py +++ b/gate_api/models/eth2_rate_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py index e38c869..643de0b 100644 --- a/gate_api/models/eth2_swap.py +++ b/gate_api/models/eth2_swap.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/find_coin.py b/gate_api/models/find_coin.py new file mode 100644 index 0000000..d677e9c --- /dev/null +++ b/gate_api/models/find_coin.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FindCoin(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'coin': 'str', + 'cointype': 'str' + } + + attribute_map = { + 'coin': 'coin', + 'cointype': 'cointype' + } + + def __init__(self, coin=None, cointype=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """FindCoin - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._coin = None + self._cointype = None + self.discriminator = None + + if coin is not None: + self.coin = coin + if cointype is not None: + self.cointype = cointype + + @property + def coin(self): + """Gets the coin of this FindCoin. # noqa: E501 + + Currency # noqa: E501 + + :return: The coin of this FindCoin. # noqa: E501 + :rtype: str + """ + return self._coin + + @coin.setter + def coin(self, coin): + """Sets the coin of this FindCoin. + + Currency # noqa: E501 + + :param coin: The coin of this FindCoin. # noqa: E501 + :type: str + """ + + self._coin = coin + + @property + def cointype(self): + """Gets the cointype of this FindCoin. # noqa: E501 + + Coin Type swap-Voucher lock-Locked # noqa: E501 + + :return: The cointype of this FindCoin. # noqa: E501 + :rtype: str + """ + return self._cointype + + @cointype.setter + def cointype(self, cointype): + """Sets the cointype of this FindCoin. + + Coin Type swap-Voucher lock-Locked # noqa: E501 + + :param cointype: The cointype of this FindCoin. # noqa: E501 + :type: str + """ + + self._cointype = cointype + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FindCoin): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FindCoin): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py index 1c8d588..278bfef 100644 --- a/gate_api/models/flash_swap_currency_pair.py +++ b/gate_api/models/flash_swap_currency_pair.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py index de6f73c..ff42e04 100644 --- a/gate_api/models/flash_swap_order.py +++ b/gate_api/models/flash_swap_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py index 4793ff5..3330a5a 100644 --- a/gate_api/models/flash_swap_order_preview.py +++ b/gate_api/models/flash_swap_order_preview.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py index 880ff67..71587e1 100644 --- a/gate_api/models/flash_swap_order_request.py +++ b/gate_api/models/flash_swap_order_request.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py index 93696ed..7f3b76b 100644 --- a/gate_api/models/flash_swap_preview_request.py +++ b/gate_api/models/flash_swap_preview_request.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py index 3ec9497..ea61f30 100644 --- a/gate_api/models/funding_account.py +++ b/gate_api/models/funding_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py index ac80327..fa1ffd2 100644 --- a/gate_api/models/funding_rate_record.py +++ b/gate_api/models/funding_rate_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py index dbcc368..ad66393 100644 --- a/gate_api/models/future_cancel_order_result.py +++ b/gate_api/models/future_cancel_order_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py index be66bc2..480cac8 100644 --- a/gate_api/models/futures_account.py +++ b/gate_api/models/futures_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py index fe94fd3..c0c118b 100644 --- a/gate_api/models/futures_account_book.py +++ b/gate_api/models/futures_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py index 061e15a..3c6eabf 100644 --- a/gate_api/models/futures_account_history.py +++ b/gate_api/models/futures_account_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py index bc4585b..66e5f52 100644 --- a/gate_api/models/futures_auto_deleverage.py +++ b/gate_api/models/futures_auto_deleverage.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py index a1519b9..2058f2c 100644 --- a/gate_api/models/futures_batch_amend_order_request.py +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py index 8dfb415..17a4b23 100644 --- a/gate_api/models/futures_candlestick.py +++ b/gate_api/models/futures_candlestick.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py index 761f5a2..1b1d45d 100644 --- a/gate_api/models/futures_fee.py +++ b/gate_api/models/futures_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py index 61cb171..0fba456 100644 --- a/gate_api/models/futures_index_constituents.py +++ b/gate_api/models/futures_index_constituents.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py index 61ced9b..5cf4aeb 100644 --- a/gate_api/models/futures_initial_order.py +++ b/gate_api/models/futures_initial_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py index fab3cd8..cef5f15 100644 --- a/gate_api/models/futures_limit_risk_tiers.py +++ b/gate_api/models/futures_limit_risk_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py index e9653bf..0ba0dbe 100644 --- a/gate_api/models/futures_liq_order.py +++ b/gate_api/models/futures_liq_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py index a18e3a7..c476264 100644 --- a/gate_api/models/futures_liquidate.py +++ b/gate_api/models/futures_liquidate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index 982a32d..6f8c52a 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py index 1cbac0b..4f75c50 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py index a24143e..b435df6 100644 --- a/gate_api/models/futures_order_book.py +++ b/gate_api/models/futures_order_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py index fd84559..3dce8de 100644 --- a/gate_api/models/futures_order_book_item.py +++ b/gate_api/models/futures_order_book_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_object.py b/gate_api/models/futures_position_cross_mode.py similarity index 81% rename from gate_api/models/inline_object.py rename to gate_api/models/futures_position_cross_mode.py index d2d9d4f..66bfd50 100644 --- a/gate_api/models/inline_object.py +++ b/gate_api/models/futures_position_cross_mode.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -18,7 +18,7 @@ from gate_api.configuration import Configuration -class InlineObject(object): +class FuturesPositionCrossMode(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -44,7 +44,7 @@ class InlineObject(object): def __init__(self, mode=None, contract=None, local_vars_configuration=None): # noqa: E501 # type: (str, str, Configuration) -> None - """InlineObject - a model defined in OpenAPI""" # noqa: E501 + """FuturesPositionCrossMode - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -58,22 +58,22 @@ def __init__(self, mode=None, contract=None, local_vars_configuration=None): # @property def mode(self): - """Gets the mode of this InlineObject. # noqa: E501 + """Gets the mode of this FuturesPositionCrossMode. # noqa: E501 Full position-by-position model, ISOLATED-by-position, CROSS-full position # noqa: E501 - :return: The mode of this InlineObject. # noqa: E501 + :return: The mode of this FuturesPositionCrossMode. # noqa: E501 :rtype: str """ return self._mode @mode.setter def mode(self, mode): - """Sets the mode of this InlineObject. + """Sets the mode of this FuturesPositionCrossMode. Full position-by-position model, ISOLATED-by-position, CROSS-full position # noqa: E501 - :param mode: The mode of this InlineObject. # noqa: E501 + :param mode: The mode of this FuturesPositionCrossMode. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501 @@ -83,22 +83,22 @@ def mode(self, mode): @property def contract(self): - """Gets the contract of this InlineObject. # noqa: E501 + """Gets the contract of this FuturesPositionCrossMode. # noqa: E501 Contract Market # noqa: E501 - :return: The contract of this InlineObject. # noqa: E501 + :return: The contract of this FuturesPositionCrossMode. # noqa: E501 :rtype: str """ return self._contract @contract.setter def contract(self, contract): - """Sets the contract of this InlineObject. + """Sets the contract of this FuturesPositionCrossMode. Contract Market # noqa: E501 - :param contract: The contract of this InlineObject. # noqa: E501 + :param contract: The contract of this FuturesPositionCrossMode. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 @@ -140,14 +140,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineObject): + if not isinstance(other, FuturesPositionCrossMode): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, InlineObject): + if not isinstance(other, FuturesPositionCrossMode): return True return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py index d73835e..bb8ccfd 100644 --- a/gate_api/models/futures_premium_index.py +++ b/gate_api/models/futures_premium_index.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py index aa7e8cf..ec76a9a 100644 --- a/gate_api/models/futures_price_trigger.py +++ b/gate_api/models/futures_price_trigger.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index d91ac5a..6ec9cdb 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py index 7e06b5e..e2eb8d0 100644 --- a/gate_api/models/futures_ticker.py +++ b/gate_api/models/futures_ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py index 2028223..9bdfbd2 100644 --- a/gate_api/models/futures_trade.py +++ b/gate_api/models/futures_trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py index cbda3a1..32b81dc 100644 --- a/gate_api/models/index_constituent.py +++ b/gate_api/models/index_constituent.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py index 247ce7a..58c26cf 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py index 0dafc0a..77430d5 100644 --- a/gate_api/models/inline_response2001.py +++ b/gate_api/models/inline_response2001.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py index b8ea7e6..fa57ff5 100644 --- a/gate_api/models/insurance_record.py +++ b/gate_api/models/insurance_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py index 34dbf63..5f54624 100644 --- a/gate_api/models/ledger_record.py +++ b/gate_api/models/ledger_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py index e40e58c..398c733 100644 --- a/gate_api/models/liquidate_order.py +++ b/gate_api/models/liquidate_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py index c8cef98..8b5e8b0 100644 --- a/gate_api/models/margin_account.py +++ b/gate_api/models/margin_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py index a8f4637..4da48d2 100644 --- a/gate_api/models/margin_account_book.py +++ b/gate_api/models/margin_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py index 9bcc069..53d70e3 100644 --- a/gate_api/models/margin_account_currency.py +++ b/gate_api/models/margin_account_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py index 4994e32..a376c91 100644 --- a/gate_api/models/margin_leverage_tier.py +++ b/gate_api/models/margin_leverage_tier.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py index 9ce53dd..71a0790 100644 --- a/gate_api/models/margin_market_leverage.py +++ b/gate_api/models/margin_market_leverage.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py index 6d88f5a..072f81b 100644 --- a/gate_api/models/margin_tiers.py +++ b/gate_api/models/margin_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py index 003d8bc..f4212ca 100644 --- a/gate_api/models/margin_transferable.py +++ b/gate_api/models/margin_transferable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py index 0bc4d8d..ca6d123 100644 --- a/gate_api/models/max_uni_borrowable.py +++ b/gate_api/models/max_uni_borrowable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py index 5d2fe84..ca6d147 100644 --- a/gate_api/models/mock_futures_order.py +++ b/gate_api/models/mock_futures_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py index 7e1d073..89d7ce9 100644 --- a/gate_api/models/mock_futures_position.py +++ b/gate_api/models/mock_futures_position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py index 9b4aaa5..ccd53be 100644 --- a/gate_api/models/mock_margin_result.py +++ b/gate_api/models/mock_margin_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py index 2b1d611..03e581a 100644 --- a/gate_api/models/mock_options_order.py +++ b/gate_api/models/mock_options_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py index 8ccf62b..b053c01 100644 --- a/gate_api/models/mock_options_position.py +++ b/gate_api/models/mock_options_position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py index 07dd316..ee538db 100644 --- a/gate_api/models/mock_risk_unit.py +++ b/gate_api/models/mock_risk_unit.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py index 5a20682..d5ef033 100644 --- a/gate_api/models/mock_spot_balance.py +++ b/gate_api/models/mock_spot_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py index c69333b..3cd12b0 100644 --- a/gate_api/models/mock_spot_order.py +++ b/gate_api/models/mock_spot_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py index d84fe63..9f5752a 100644 --- a/gate_api/models/multi_chain_address_item.py +++ b/gate_api/models/multi_chain_address_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py index 3eee4df..babb72e 100644 --- a/gate_api/models/multi_collateral_currency.py +++ b/gate_api/models/multi_collateral_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py index 11a6ba2..825ad05 100644 --- a/gate_api/models/multi_collateral_item.py +++ b/gate_api/models/multi_collateral_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py index fa211bf..671f393 100644 --- a/gate_api/models/multi_collateral_order.py +++ b/gate_api/models/multi_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py index c76fb4d..34e274d 100644 --- a/gate_api/models/multi_collateral_record.py +++ b/gate_api/models/multi_collateral_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py index b1a3e66..85faea2 100644 --- a/gate_api/models/multi_collateral_record_currency.py +++ b/gate_api/models/multi_collateral_record_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py index 425ae47..a45f28e 100644 --- a/gate_api/models/multi_loan_item.py +++ b/gate_api/models/multi_loan_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py index d4807aa..fbe0be8 100644 --- a/gate_api/models/multi_loan_repay_item.py +++ b/gate_api/models/multi_loan_repay_item.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py index 00522d1..2c1b29c 100644 --- a/gate_api/models/multi_repay_record.py +++ b/gate_api/models/multi_repay_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py index 91dc1d4..67f314c 100644 --- a/gate_api/models/multi_repay_resp.py +++ b/gate_api/models/multi_repay_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py index f2eded6..ad1fb79 100644 --- a/gate_api/models/my_futures_trade.py +++ b/gate_api/models/my_futures_trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py index 3bdecdb..0200f24 100644 --- a/gate_api/models/my_futures_trade_time_range.py +++ b/gate_api/models/my_futures_trade_time_range.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py index 1095f22..39a0584 100644 --- a/gate_api/models/open_orders.py +++ b/gate_api/models/open_orders.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py index 1047d96..99a30a8 100644 --- a/gate_api/models/options_account.py +++ b/gate_api/models/options_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py index ba9ef3f..8fc1c6e 100644 --- a/gate_api/models/options_account_book.py +++ b/gate_api/models/options_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py index a0d7693..17d7dac 100644 --- a/gate_api/models/options_candlestick.py +++ b/gate_api/models/options_candlestick.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py index b27358c..fecbd82 100644 --- a/gate_api/models/options_contract.py +++ b/gate_api/models/options_contract.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py index dd89324..c6347fa 100644 --- a/gate_api/models/options_mmp.py +++ b/gate_api/models/options_mmp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py index 608b0c3..b2055d1 100644 --- a/gate_api/models/options_mmp_reset.py +++ b/gate_api/models/options_mmp_reset.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py index ca045a9..54ca6de 100644 --- a/gate_api/models/options_my_settlements.py +++ b/gate_api/models/options_my_settlements.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py index 496af0e..64f48f8 100644 --- a/gate_api/models/options_my_trade.py +++ b/gate_api/models/options_my_trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py index 4452fe4..9ac0cd1 100644 --- a/gate_api/models/options_order.py +++ b/gate_api/models/options_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py index de678fe..df4c3a6 100644 --- a/gate_api/models/options_position.py +++ b/gate_api/models/options_position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py index 2a90d9f..04da9db 100644 --- a/gate_api/models/options_position_close.py +++ b/gate_api/models/options_position_close.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py index 2ea8345..e889022 100644 --- a/gate_api/models/options_position_close_order.py +++ b/gate_api/models/options_position_close_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py index 59f5e02..5f75ba4 100644 --- a/gate_api/models/options_settlement.py +++ b/gate_api/models/options_settlement.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py index d80d3f3..12fe046 100644 --- a/gate_api/models/options_ticker.py +++ b/gate_api/models/options_ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py index 8f3a5a4..61e49de 100644 --- a/gate_api/models/options_underlying.py +++ b/gate_api/models/options_underlying.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py index b5d084e..99059c1 100644 --- a/gate_api/models/options_underlying_ticker.py +++ b/gate_api/models/options_underlying_ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order.py b/gate_api/models/order.py index 5b554f5..36b8420 100644 --- a/gate_api/models/order.py +++ b/gate_api/models/order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py index 06606bf..6fc2a0a 100644 --- a/gate_api/models/order_book.py +++ b/gate_api/models/order_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py index 57fbf49..caa6904 100644 --- a/gate_api/models/order_cancel.py +++ b/gate_api/models/order_cancel.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py index 76bce21..6374355 100644 --- a/gate_api/models/order_patch.py +++ b/gate_api/models/order_patch.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py index 113ca58..5665ffd 100644 --- a/gate_api/models/order_resp.py +++ b/gate_api/models/order_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_response.py b/gate_api/models/order_response.py new file mode 100644 index 0000000..ac59644 --- /dev/null +++ b/gate_api/models/order_response.py @@ -0,0 +1,459 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class OrderResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'tx_hash': 'str', + 'side': 'str', + 'usdt_amount': 'str', + 'currency': 'str', + 'currency_amount': 'str', + 'status': 'int', + 'gas_mode': 'str', + 'chain': 'str', + 'gas_fee': 'str', + 'transaction_fee': 'str', + 'failed_reason': 'str', + 'create_time': 'int' + } + + attribute_map = { + 'order_id': 'order_id', + 'tx_hash': 'tx_hash', + 'side': 'side', + 'usdt_amount': 'usdt_amount', + 'currency': 'currency', + 'currency_amount': 'currency_amount', + 'status': 'status', + 'gas_mode': 'gas_mode', + 'chain': 'chain', + 'gas_fee': 'gas_fee', + 'transaction_fee': 'transaction_fee', + 'failed_reason': 'failed_reason', + 'create_time': 'create_time' + } + + def __init__(self, order_id=None, tx_hash=None, side=None, usdt_amount=None, currency=None, currency_amount=None, status=None, gas_mode=None, chain=None, gas_fee=None, transaction_fee=None, failed_reason=None, create_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, int, str, str, str, str, str, int, Configuration) -> None + """OrderResponse - a 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._tx_hash = None + self._side = None + self._usdt_amount = None + self._currency = None + self._currency_amount = None + self._status = None + self._gas_mode = None + self._chain = None + self._gas_fee = None + self._transaction_fee = None + self._failed_reason = None + self._create_time = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if tx_hash is not None: + self.tx_hash = tx_hash + if side is not None: + self.side = side + if usdt_amount is not None: + self.usdt_amount = usdt_amount + if currency is not None: + self.currency = currency + if currency_amount is not None: + self.currency_amount = currency_amount + if status is not None: + self.status = status + if gas_mode is not None: + self.gas_mode = gas_mode + if chain is not None: + self.chain = chain + if gas_fee is not None: + self.gas_fee = gas_fee + if transaction_fee is not None: + self.transaction_fee = transaction_fee + if failed_reason is not None: + self.failed_reason = failed_reason + if create_time is not None: + self.create_time = create_time + + @property + def order_id(self): + """Gets the order_id of this OrderResponse. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this OrderResponse. + + Order ID # noqa: E501 + + :param order_id: The order_id of this OrderResponse. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def tx_hash(self): + """Gets the tx_hash of this OrderResponse. # noqa: E501 + + Transaction Hash # noqa: E501 + + :return: The tx_hash of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._tx_hash + + @tx_hash.setter + def tx_hash(self, tx_hash): + """Sets the tx_hash of this OrderResponse. + + Transaction Hash # noqa: E501 + + :param tx_hash: The tx_hash of this OrderResponse. # noqa: E501 + :type: str + """ + + self._tx_hash = tx_hash + + @property + def side(self): + """Gets the side of this OrderResponse. # noqa: E501 + + 买单或者卖单 - buy - sell # noqa: E501 + + :return: The side of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this OrderResponse. + + 买单或者卖单 - buy - sell # noqa: E501 + + :param side: The side of this OrderResponse. # noqa: E501 + :type: str + """ + + self._side = side + + @property + def usdt_amount(self): + """Gets the usdt_amount of this OrderResponse. # noqa: E501 + + Amount # noqa: E501 + + :return: The usdt_amount of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._usdt_amount + + @usdt_amount.setter + def usdt_amount(self, usdt_amount): + """Sets the usdt_amount of this OrderResponse. + + Amount # noqa: E501 + + :param usdt_amount: The usdt_amount of this OrderResponse. # noqa: E501 + :type: str + """ + + self._usdt_amount = usdt_amount + + @property + def currency(self): + """Gets the currency of this OrderResponse. # noqa: E501 + + 币 # noqa: E501 + + :return: The currency of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this OrderResponse. + + 币 # noqa: E501 + + :param currency: The currency of this OrderResponse. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def currency_amount(self): + """Gets the currency_amount of this OrderResponse. # noqa: E501 + + Currency amount # noqa: E501 + + :return: The currency_amount of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._currency_amount + + @currency_amount.setter + def currency_amount(self, currency_amount): + """Sets the currency_amount of this OrderResponse. + + Currency amount # noqa: E501 + + :param currency_amount: The currency_amount of this OrderResponse. # noqa: E501 + :type: str + """ + + self._currency_amount = currency_amount + + @property + def status(self): + """Gets the status of this OrderResponse. # noqa: E501 + + Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 + + :return: The status of this OrderResponse. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this OrderResponse. + + Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 + + :param status: The status of this OrderResponse. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def gas_mode(self): + """Gets the gas_mode of this OrderResponse. # noqa: E501 + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :return: The gas_mode of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._gas_mode + + @gas_mode.setter + def gas_mode(self, gas_mode): + """Sets the gas_mode of this OrderResponse. + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :param gas_mode: The gas_mode of this OrderResponse. # noqa: E501 + :type: str + """ + + self._gas_mode = gas_mode + + @property + def chain(self): + """Gets the chain of this OrderResponse. # noqa: E501 + + 链 # noqa: E501 + + :return: The chain of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this OrderResponse. + + 链 # noqa: E501 + + :param chain: The chain of this OrderResponse. # noqa: E501 + :type: str + """ + + self._chain = chain + + @property + def gas_fee(self): + """Gets the gas_fee of this OrderResponse. # noqa: E501 + + Miner Fee (USDT-based) # noqa: E501 + + :return: The gas_fee of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._gas_fee + + @gas_fee.setter + def gas_fee(self, gas_fee): + """Sets the gas_fee of this OrderResponse. + + Miner Fee (USDT-based) # noqa: E501 + + :param gas_fee: The gas_fee of this OrderResponse. # noqa: E501 + :type: str + """ + + self._gas_fee = gas_fee + + @property + def transaction_fee(self): + """Gets the transaction_fee of this OrderResponse. # noqa: E501 + + Trading Fee (USDT-based) # noqa: E501 + + :return: The transaction_fee of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._transaction_fee + + @transaction_fee.setter + def transaction_fee(self, transaction_fee): + """Sets the transaction_fee of this OrderResponse. + + Trading Fee (USDT-based) # noqa: E501 + + :param transaction_fee: The transaction_fee of this OrderResponse. # noqa: E501 + :type: str + """ + + self._transaction_fee = transaction_fee + + @property + def failed_reason(self): + """Gets the failed_reason of this OrderResponse. # noqa: E501 + + Failure reason (if any) # noqa: E501 + + :return: The failed_reason of this OrderResponse. # noqa: E501 + :rtype: str + """ + return self._failed_reason + + @failed_reason.setter + def failed_reason(self, failed_reason): + """Sets the failed_reason of this OrderResponse. + + Failure reason (if any) # noqa: E501 + + :param failed_reason: The failed_reason of this OrderResponse. # noqa: E501 + :type: str + """ + + self._failed_reason = failed_reason + + @property + def create_time(self): + """Gets the create_time of this OrderResponse. # noqa: E501 + + 创建时间(时间戳) # noqa: E501 + + :return: The create_time of this OrderResponse. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this OrderResponse. + + 创建时间(时间戳) # noqa: E501 + + :param create_time: The create_time of this OrderResponse. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrderResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py index c7e1682..3742254 100644 --- a/gate_api/models/partner_commission_history.py +++ b/gate_api/models/partner_commission_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py index 2914ed7..faaa4b6 100644 --- a/gate_api/models/partner_sub.py +++ b/gate_api/models/partner_sub.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py index 4cda806..d6bcb29 100644 --- a/gate_api/models/partner_sub_list.py +++ b/gate_api/models/partner_sub_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py index a107a4a..b626807 100644 --- a/gate_api/models/partner_transaction_history.py +++ b/gate_api/models/partner_transaction_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py index 81cbcfd..dffb051 100644 --- a/gate_api/models/patch_uni_lend.py +++ b/gate_api/models/patch_uni_lend.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py index 4b5ad5b..fe58e28 100644 --- a/gate_api/models/place_dual_investment_order.py +++ b/gate_api/models/place_dual_investment_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/place_order_request.py b/gate_api/models/place_order_request.py new file mode 100644 index 0000000..cbba4c9 --- /dev/null +++ b/gate_api/models/place_order_request.py @@ -0,0 +1,268 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PlaceOrderRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'side': 'str', + 'amount': 'str', + 'gas_mode': 'str', + 'slippage': 'str', + 'quote_id': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'side': 'side', + 'amount': 'amount', + 'gas_mode': 'gas_mode', + 'slippage': 'slippage', + 'quote_id': 'quote_id' + } + + def __init__(self, currency=None, side=None, amount=None, gas_mode=None, slippage=None, quote_id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None + """PlaceOrderRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._side = None + self._amount = None + self._gas_mode = None + self._slippage = None + self._quote_id = None + self.discriminator = None + + self.currency = currency + self.side = side + self.amount = amount + self.gas_mode = gas_mode + if slippage is not None: + self.slippage = slippage + self.quote_id = quote_id + + @property + def currency(self): + """Gets the currency of this PlaceOrderRequest. # noqa: E501 + + Trading Symbol # noqa: E501 + + :return: The currency of this PlaceOrderRequest. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this PlaceOrderRequest. + + Trading Symbol # noqa: E501 + + :param currency: The currency of this PlaceOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def side(self): + """Gets the side of this PlaceOrderRequest. # noqa: E501 + + 买单或者卖单 - buy - sell # noqa: E501 + + :return: The side of this PlaceOrderRequest. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this PlaceOrderRequest. + + 买单或者卖单 - buy - sell # noqa: E501 + + :param side: The side of this PlaceOrderRequest. # 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 PlaceOrderRequest. # noqa: E501 + + Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 + + :return: The amount of this PlaceOrderRequest. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this PlaceOrderRequest. + + Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 + + :param amount: The amount of this PlaceOrderRequest. # 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 gas_mode(self): + """Gets the gas_mode of this PlaceOrderRequest. # noqa: E501 + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :return: The gas_mode of this PlaceOrderRequest. # noqa: E501 + :rtype: str + """ + return self._gas_mode + + @gas_mode.setter + def gas_mode(self, gas_mode): + """Sets the gas_mode of this PlaceOrderRequest. + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :param gas_mode: The gas_mode of this PlaceOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and gas_mode is None: # noqa: E501 + raise ValueError("Invalid value for `gas_mode`, must not be `None`") # noqa: E501 + + self._gas_mode = gas_mode + + @property + def slippage(self): + """Gets the slippage of this PlaceOrderRequest. # noqa: E501 + + Slippage value of 10 represents a 10% tolerance # noqa: E501 + + :return: The slippage of this PlaceOrderRequest. # noqa: E501 + :rtype: str + """ + return self._slippage + + @slippage.setter + def slippage(self, slippage): + """Sets the slippage of this PlaceOrderRequest. + + Slippage value of 10 represents a 10% tolerance # noqa: E501 + + :param slippage: The slippage of this PlaceOrderRequest. # noqa: E501 + :type: str + """ + + self._slippage = slippage + + @property + def quote_id(self): + """Gets the quote_id of this PlaceOrderRequest. # noqa: E501 + + The quote_id returned by the quotation API # noqa: E501 + + :return: The quote_id of this PlaceOrderRequest. # noqa: E501 + :rtype: str + """ + return self._quote_id + + @quote_id.setter + def quote_id(self, quote_id): + """Sets the quote_id of this PlaceOrderRequest. + + The quote_id returned by the quotation API # noqa: E501 + + :param quote_id: The quote_id of this PlaceOrderRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and quote_id is None: # noqa: E501 + raise ValueError("Invalid value for `quote_id`, must not be `None`") # noqa: E501 + + self._quote_id = quote_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, PlaceOrderRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PlaceOrderRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/place_order_response.py b/gate_api/models/place_order_response.py new file mode 100644 index 0000000..ce20301 --- /dev/null +++ b/gate_api/models/place_order_response.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class PlaceOrderResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'status': 'int', + 'side': 'str', + 'gas_mode': 'str', + 'create_time': 'int', + 'amount': 'str', + 'token_address': 'str', + 'chain': 'str' + } + + attribute_map = { + 'order_id': 'order_id', + 'status': 'status', + 'side': 'side', + 'gas_mode': 'gas_mode', + 'create_time': 'create_time', + 'amount': 'amount', + 'token_address': 'token_address', + 'chain': 'chain' + } + + def __init__(self, order_id=None, status=None, side=None, gas_mode=None, create_time=None, amount=None, token_address=None, chain=None, local_vars_configuration=None): # noqa: E501 + # type: (str, int, str, str, int, str, str, str, Configuration) -> None + """PlaceOrderResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._order_id = None + self._status = None + self._side = None + self._gas_mode = None + self._create_time = None + self._amount = None + self._token_address = None + self._chain = None + self.discriminator = None + + if order_id is not None: + self.order_id = order_id + if status is not None: + self.status = status + if side is not None: + self.side = side + if gas_mode is not None: + self.gas_mode = gas_mode + if create_time is not None: + self.create_time = create_time + if amount is not None: + self.amount = amount + if token_address is not None: + self.token_address = token_address + if chain is not None: + self.chain = chain + + @property + def order_id(self): + """Gets the order_id of this PlaceOrderResponse. # noqa: E501 + + Order ID # noqa: E501 + + :return: The order_id of this PlaceOrderResponse. # noqa: E501 + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this PlaceOrderResponse. + + Order ID # noqa: E501 + + :param order_id: The order_id of this PlaceOrderResponse. # noqa: E501 + :type: str + """ + + self._order_id = order_id + + @property + def status(self): + """Gets the status of this PlaceOrderResponse. # noqa: E501 + + Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 + + :return: The status of this PlaceOrderResponse. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this PlaceOrderResponse. + + Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 + + :param status: The status of this PlaceOrderResponse. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def side(self): + """Gets the side of this PlaceOrderResponse. # noqa: E501 + + 买单或者卖单 - buy - sell # noqa: E501 + + :return: The side of this PlaceOrderResponse. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this PlaceOrderResponse. + + 买单或者卖单 - buy - sell # noqa: E501 + + :param side: The side of this PlaceOrderResponse. # noqa: E501 + :type: str + """ + + self._side = side + + @property + def gas_mode(self): + """Gets the gas_mode of this PlaceOrderResponse. # noqa: E501 + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :return: The gas_mode of this PlaceOrderResponse. # noqa: E501 + :rtype: str + """ + return self._gas_mode + + @gas_mode.setter + def gas_mode(self, gas_mode): + """Sets the gas_mode of this PlaceOrderResponse. + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :param gas_mode: The gas_mode of this PlaceOrderResponse. # noqa: E501 + :type: str + """ + + self._gas_mode = gas_mode + + @property + def create_time(self): + """Gets the create_time of this PlaceOrderResponse. # noqa: E501 + + 创建时间 (时间戳) # noqa: E501 + + :return: The create_time of this PlaceOrderResponse. # noqa: E501 + :rtype: int + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this PlaceOrderResponse. + + 创建时间 (时间戳) # noqa: E501 + + :param create_time: The create_time of this PlaceOrderResponse. # noqa: E501 + :type: int + """ + + self._create_time = create_time + + @property + def amount(self): + """Gets the amount of this PlaceOrderResponse. # noqa: E501 + + Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 + + :return: The amount of this PlaceOrderResponse. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this PlaceOrderResponse. + + Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 + + :param amount: The amount of this PlaceOrderResponse. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def token_address(self): + """Gets the token_address of this PlaceOrderResponse. # noqa: E501 + + 币地址 # noqa: E501 + + :return: The token_address of this PlaceOrderResponse. # noqa: E501 + :rtype: str + """ + return self._token_address + + @token_address.setter + def token_address(self, token_address): + """Sets the token_address of this PlaceOrderResponse. + + 币地址 # noqa: E501 + + :param token_address: The token_address of this PlaceOrderResponse. # noqa: E501 + :type: str + """ + + self._token_address = token_address + + @property + def chain(self): + """Gets the chain of this PlaceOrderResponse. # noqa: E501 + + Chain name # noqa: E501 + + :return: The chain of this PlaceOrderResponse. # noqa: E501 + :rtype: str + """ + return self._chain + + @chain.setter + def chain(self, chain): + """Sets the chain of this PlaceOrderResponse. + + Chain name # noqa: E501 + + :param chain: The chain of this PlaceOrderResponse. # noqa: E501 + :type: str + """ + + self._chain = chain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PlaceOrderResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PlaceOrderResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/position.py b/gate_api/models/position.py index 47b7700..1075a2c 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py index b490bca..2b4bd6b 100644 --- a/gate_api/models/position_close.py +++ b/gate_api/models/position_close.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py index 5faed2d..25aac1e 100644 --- a/gate_api/models/position_close_order.py +++ b/gate_api/models/position_close_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py index e325f6e..094b979 100644 --- a/gate_api/models/profit_loss_range.py +++ b/gate_api/models/profit_loss_range.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/quote_request.py b/gate_api/models/quote_request.py new file mode 100644 index 0000000..7a28af0 --- /dev/null +++ b/gate_api/models/quote_request.py @@ -0,0 +1,239 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class QuoteRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'currency': 'str', + 'side': 'str', + 'amount': 'str', + 'gas_mode': 'str', + 'slippage': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'side': 'side', + 'amount': 'amount', + 'gas_mode': 'gas_mode', + 'slippage': 'slippage' + } + + def __init__(self, currency=None, side=None, amount=None, gas_mode=None, slippage=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """QuoteRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._side = None + self._amount = None + self._gas_mode = None + self._slippage = None + self.discriminator = None + + self.currency = currency + self.side = side + self.amount = amount + self.gas_mode = gas_mode + if slippage is not None: + self.slippage = slippage + + @property + def currency(self): + """Gets the currency of this QuoteRequest. # noqa: E501 + + Trading Symbol # noqa: E501 + + :return: The currency of this QuoteRequest. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this QuoteRequest. + + Trading Symbol # noqa: E501 + + :param currency: The currency of this QuoteRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def side(self): + """Gets the side of this QuoteRequest. # noqa: E501 + + 买单或者卖单 - buy - sell # noqa: E501 + + :return: The side of this QuoteRequest. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this QuoteRequest. + + 买单或者卖单 - buy - sell # noqa: E501 + + :param side: The side of this QuoteRequest. # 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 QuoteRequest. # noqa: E501 + + Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 + + :return: The amount of this QuoteRequest. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this QuoteRequest. + + Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 + + :param amount: The amount of this QuoteRequest. # 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 gas_mode(self): + """Gets the gas_mode of this QuoteRequest. # noqa: E501 + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :return: The gas_mode of this QuoteRequest. # noqa: E501 + :rtype: str + """ + return self._gas_mode + + @gas_mode.setter + def gas_mode(self, gas_mode): + """Sets the gas_mode of this QuoteRequest. + + Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 + + :param gas_mode: The gas_mode of this QuoteRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and gas_mode is None: # noqa: E501 + raise ValueError("Invalid value for `gas_mode`, must not be `None`") # noqa: E501 + + self._gas_mode = gas_mode + + @property + def slippage(self): + """Gets the slippage of this QuoteRequest. # noqa: E501 + + Slippage value of 10 represents a 10% tolerance # noqa: E501 + + :return: The slippage of this QuoteRequest. # noqa: E501 + :rtype: str + """ + return self._slippage + + @slippage.setter + def slippage(self, slippage): + """Sets the slippage of this QuoteRequest. + + Slippage value of 10 represents a 10% tolerance # noqa: E501 + + :param slippage: The slippage of this QuoteRequest. # noqa: E501 + :type: str + """ + + self._slippage = slippage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, QuoteRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, QuoteRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/quote_response.py b/gate_api/models/quote_response.py new file mode 100644 index 0000000..8c5488c --- /dev/null +++ b/gate_api/models/quote_response.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class QuoteResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'quote_id': 'str', + 'min_amount': 'str', + 'max_amount': 'str', + 'price': 'str', + 'slippage': 'str', + 'estimate_gas_fee_amount_usdt': 'str', + 'order_fee': 'str', + 'target_token_min_amount': 'str', + 'target_token_max_amount': 'str', + 'error_type': 'int' + } + + attribute_map = { + 'quote_id': 'quote_id', + 'min_amount': 'min_amount', + 'max_amount': 'max_amount', + 'price': 'price', + 'slippage': 'slippage', + 'estimate_gas_fee_amount_usdt': 'estimate_gas_fee_amount_usdt', + 'order_fee': 'order_fee', + 'target_token_min_amount': 'target_token_min_amount', + 'target_token_max_amount': 'target_token_max_amount', + 'error_type': 'error_type' + } + + def __init__(self, quote_id=None, min_amount=None, max_amount=None, price=None, slippage=None, estimate_gas_fee_amount_usdt=None, order_fee=None, target_token_min_amount=None, target_token_max_amount=None, error_type=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, int, Configuration) -> None + """QuoteResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._quote_id = None + self._min_amount = None + self._max_amount = None + self._price = None + self._slippage = None + self._estimate_gas_fee_amount_usdt = None + self._order_fee = None + self._target_token_min_amount = None + self._target_token_max_amount = None + self._error_type = None + self.discriminator = None + + if quote_id is not None: + self.quote_id = quote_id + if min_amount is not None: + self.min_amount = min_amount + if max_amount is not None: + self.max_amount = max_amount + if price is not None: + self.price = price + if slippage is not None: + self.slippage = slippage + if estimate_gas_fee_amount_usdt is not None: + self.estimate_gas_fee_amount_usdt = estimate_gas_fee_amount_usdt + if order_fee is not None: + self.order_fee = order_fee + if target_token_min_amount is not None: + self.target_token_min_amount = target_token_min_amount + if target_token_max_amount is not None: + self.target_token_max_amount = target_token_max_amount + if error_type is not None: + self.error_type = error_type + + @property + def quote_id(self): + """Gets the quote_id of this QuoteResponse. # noqa: E501 + + The quotation ID (quote_id) is used for placing orders and is valid for 1 minute # noqa: E501 + + :return: The quote_id of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._quote_id + + @quote_id.setter + def quote_id(self, quote_id): + """Sets the quote_id of this QuoteResponse. + + The quotation ID (quote_id) is used for placing orders and is valid for 1 minute # noqa: E501 + + :param quote_id: The quote_id of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._quote_id = quote_id + + @property + def min_amount(self): + """Gets the min_amount of this QuoteResponse. # noqa: E501 + + 最小下单量 # noqa: E501 + + :return: The min_amount of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._min_amount + + @min_amount.setter + def min_amount(self, min_amount): + """Sets the min_amount of this QuoteResponse. + + 最小下单量 # noqa: E501 + + :param min_amount: The min_amount of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._min_amount = min_amount + + @property + def max_amount(self): + """Gets the max_amount of this QuoteResponse. # noqa: E501 + + 最大下单量 # noqa: E501 + + :return: The max_amount of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._max_amount + + @max_amount.setter + def max_amount(self, max_amount): + """Sets the max_amount of this QuoteResponse. + + 最大下单量 # noqa: E501 + + :param max_amount: The max_amount of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._max_amount = max_amount + + @property + def price(self): + """Gets the price of this QuoteResponse. # noqa: E501 + + Coin Price (USDT-based) # noqa: E501 + + :return: The price of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this QuoteResponse. + + Coin Price (USDT-based) # noqa: E501 + + :param price: The price of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._price = price + + @property + def slippage(self): + """Gets the slippage of this QuoteResponse. # noqa: E501 + + Slippage # noqa: E501 + + :return: The slippage of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._slippage + + @slippage.setter + def slippage(self, slippage): + """Sets the slippage of this QuoteResponse. + + Slippage # noqa: E501 + + :param slippage: The slippage of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._slippage = slippage + + @property + def estimate_gas_fee_amount_usdt(self): + """Gets the estimate_gas_fee_amount_usdt of this QuoteResponse. # noqa: E501 + + Estimated Network Fee (USDT-based) # noqa: E501 + + :return: The estimate_gas_fee_amount_usdt of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._estimate_gas_fee_amount_usdt + + @estimate_gas_fee_amount_usdt.setter + def estimate_gas_fee_amount_usdt(self, estimate_gas_fee_amount_usdt): + """Sets the estimate_gas_fee_amount_usdt of this QuoteResponse. + + Estimated Network Fee (USDT-based) # noqa: E501 + + :param estimate_gas_fee_amount_usdt: The estimate_gas_fee_amount_usdt of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._estimate_gas_fee_amount_usdt = estimate_gas_fee_amount_usdt + + @property + def order_fee(self): + """Gets the order_fee of this QuoteResponse. # noqa: E501 + + Slippage value of 10 represents a 10% tolerance # noqa: E501 + + :return: The order_fee of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._order_fee + + @order_fee.setter + def order_fee(self, order_fee): + """Sets the order_fee of this QuoteResponse. + + Slippage value of 10 represents a 10% tolerance # noqa: E501 + + :param order_fee: The order_fee of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._order_fee = order_fee + + @property + def target_token_min_amount(self): + """Gets the target_token_min_amount of this QuoteResponse. # noqa: E501 + + 最小获得数量 # noqa: E501 + + :return: The target_token_min_amount of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._target_token_min_amount + + @target_token_min_amount.setter + def target_token_min_amount(self, target_token_min_amount): + """Sets the target_token_min_amount of this QuoteResponse. + + 最小获得数量 # noqa: E501 + + :param target_token_min_amount: The target_token_min_amount of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._target_token_min_amount = target_token_min_amount + + @property + def target_token_max_amount(self): + """Gets the target_token_max_amount of this QuoteResponse. # noqa: E501 + + 最大获得数量 # noqa: E501 + + :return: The target_token_max_amount of this QuoteResponse. # noqa: E501 + :rtype: str + """ + return self._target_token_max_amount + + @target_token_max_amount.setter + def target_token_max_amount(self, target_token_max_amount): + """Sets the target_token_max_amount of this QuoteResponse. + + 最大获得数量 # noqa: E501 + + :param target_token_max_amount: The target_token_max_amount of this QuoteResponse. # noqa: E501 + :type: str + """ + + self._target_token_max_amount = target_token_max_amount + + @property + def error_type(self): + """Gets the error_type of this QuoteResponse. # noqa: E501 + + Failure Type - `0` : Success - `1` : Exceeds maximum value - `2` : Below minimum value # noqa: E501 + + :return: The error_type of this QuoteResponse. # noqa: E501 + :rtype: int + """ + return self._error_type + + @error_type.setter + def error_type(self, error_type): + """Sets the error_type of this QuoteResponse. + + Failure Type - `0` : Success - `1` : Exceeds maximum value - `2` : Below minimum value # noqa: E501 + + :param error_type: The error_type of this QuoteResponse. # noqa: E501 + :type: int + """ + + self._error_type = error_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, QuoteResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, QuoteResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py index d46b61e..815890d 100644 --- a/gate_api/models/rebate_user_info.py +++ b/gate_api/models/rebate_user_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py index a10dca7..aaeb6fc 100644 --- a/gate_api/models/repay_currency_res.py +++ b/gate_api/models/repay_currency_res.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py index 7f2a758..423adeb 100644 --- a/gate_api/models/repay_loan.py +++ b/gate_api/models/repay_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py index ceb72f5..be30f07 100644 --- a/gate_api/models/repay_multi_loan.py +++ b/gate_api/models/repay_multi_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py index 972de41..29bf35a 100644 --- a/gate_api/models/repay_record.py +++ b/gate_api/models/repay_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py index f35f56b..e7c1d0a 100644 --- a/gate_api/models/repay_record_currency.py +++ b/gate_api/models/repay_record_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py index e5ff874..b3cb294 100644 --- a/gate_api/models/repay_record_left_interest.py +++ b/gate_api/models/repay_record_left_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py index 57ccac0..ce253ae 100644 --- a/gate_api/models/repay_record_repaid_currency.py +++ b/gate_api/models/repay_record_repaid_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py index e2583ab..cdcd00c 100644 --- a/gate_api/models/repay_record_total_interest.py +++ b/gate_api/models/repay_record_total_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py index 2c83dc6..1d473ad 100644 --- a/gate_api/models/repay_resp.py +++ b/gate_api/models/repay_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py index 8c056d6..980eb57 100644 --- a/gate_api/models/risk_units.py +++ b/gate_api/models/risk_units.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py index 4359123..4b8b61d 100644 --- a/gate_api/models/saved_address.py +++ b/gate_api/models/saved_address.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py index cccd91a..0e52a80 100644 --- a/gate_api/models/small_balance.py +++ b/gate_api/models/small_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py index 3a6dc0d..74f589b 100644 --- a/gate_api/models/small_balance_history.py +++ b/gate_api/models/small_balance_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py index d050186..556ca16 100644 --- a/gate_api/models/spot_account.py +++ b/gate_api/models/spot_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py index 901158f..76a5aac 100644 --- a/gate_api/models/spot_account_book.py +++ b/gate_api/models/spot_account_book.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py index 33be448..f28bc27 100644 --- a/gate_api/models/spot_currency_chain.py +++ b/gate_api/models/spot_currency_chain.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py index 76e7859..526d532 100644 --- a/gate_api/models/spot_fee.py +++ b/gate_api/models/spot_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py index b415d06..b7f4535 100644 --- a/gate_api/models/spot_insurance_history.py +++ b/gate_api/models/spot_insurance_history.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py index 8a34590..76cb247 100644 --- a/gate_api/models/spot_price_put_order.py +++ b/gate_api/models/spot_price_put_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py index eda7675..267fcae 100644 --- a/gate_api/models/spot_price_trigger.py +++ b/gate_api/models/spot_price_trigger.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py index 791a40b..177d810 100644 --- a/gate_api/models/spot_price_triggered_order.py +++ b/gate_api/models/spot_price_triggered_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py index de740f3..ec41552 100644 --- a/gate_api/models/stp_group.py +++ b/gate_api/models/stp_group.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py index d8168cb..f61b279 100644 --- a/gate_api/models/stp_group_user.py +++ b/gate_api/models/stp_group_user.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py index 708a9b7..e42874d 100644 --- a/gate_api/models/structured_buy.py +++ b/gate_api/models/structured_buy.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py index 029e244..b2e9ff9 100644 --- a/gate_api/models/structured_get_project_list.py +++ b/gate_api/models/structured_get_project_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py index 5d9299a..1debe61 100644 --- a/gate_api/models/structured_order_list.py +++ b/gate_api/models/structured_order_list.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py index 0deb712..7f92754 100644 --- a/gate_api/models/sub_account.py +++ b/gate_api/models/sub_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py index 00d1637..df7a6a6 100644 --- a/gate_api/models/sub_account_balance.py +++ b/gate_api/models/sub_account_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py index 84e232a..fc2a7fb 100644 --- a/gate_api/models/sub_account_cross_margin_balance.py +++ b/gate_api/models/sub_account_cross_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py index c38936d..7e2e7e2 100644 --- a/gate_api/models/sub_account_futures_balance.py +++ b/gate_api/models/sub_account_futures_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py index e1a6bc4..1008dea 100644 --- a/gate_api/models/sub_account_key.py +++ b/gate_api/models/sub_account_key.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -33,7 +33,7 @@ class SubAccountKey(object): and the value is json key in definition. """ openapi_types = { - 'user_id': 'str', + 'user_id': 'int', 'mode': 'int', 'name': 'str', 'perms': 'list[SubAccountKeyPerms]', @@ -59,7 +59,7 @@ class SubAccountKey(object): } def __init__(self, user_id=None, mode=None, name=None, perms=None, ip_whitelist=None, key=None, state=None, created_at=None, updated_at=None, last_access=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, list[SubAccountKeyPerms], list[str], str, int, int, int, int, Configuration) -> None + # type: (int, int, str, list[SubAccountKeyPerms], list[str], str, int, int, int, int, Configuration) -> None """SubAccountKey - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -105,7 +105,7 @@ def user_id(self): User ID # noqa: E501 :return: The user_id of this SubAccountKey. # noqa: E501 - :rtype: str + :rtype: int """ return self._user_id @@ -116,7 +116,7 @@ def user_id(self, user_id): User ID # noqa: E501 :param user_id: The user_id of this SubAccountKey. # noqa: E501 - :type: str + :type: int """ self._user_id = user_id diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py index c611522..c0fb7d2 100644 --- a/gate_api/models/sub_account_key_perms.py +++ b/gate_api/models/sub_account_key_perms.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py index e539a26..fb09c2a 100644 --- a/gate_api/models/sub_account_margin_balance.py +++ b/gate_api/models/sub_account_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py index d517792..1f5652d 100644 --- a/gate_api/models/sub_account_to_sub_account.py +++ b/gate_api/models/sub_account_to_sub_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py index 67bdea6..1230df5 100644 --- a/gate_api/models/sub_account_transfer.py +++ b/gate_api/models/sub_account_transfer.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -33,112 +33,46 @@ class SubAccountTransfer(object): and the value is json key in definition. """ openapi_types = { - 'timest': 'str', - 'uid': 'str', 'sub_account': 'str', 'sub_account_type': 'str', 'currency': 'str', 'amount': 'str', 'direction': 'str', - 'source': 'str', - 'client_order_id': 'str', - 'status': 'str' + 'client_order_id': 'str' } attribute_map = { - 'timest': 'timest', - 'uid': 'uid', 'sub_account': 'sub_account', 'sub_account_type': 'sub_account_type', 'currency': 'currency', 'amount': 'amount', 'direction': 'direction', - 'source': 'source', - 'client_order_id': 'client_order_id', - 'status': 'status' + 'client_order_id': 'client_order_id' } - def __init__(self, timest=None, uid=None, sub_account=None, sub_account_type='spot', currency=None, amount=None, direction=None, source=None, client_order_id=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, sub_account=None, sub_account_type='spot', currency=None, amount=None, direction=None, client_order_id=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, Configuration) -> None """SubAccountTransfer - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._timest = None - self._uid = None self._sub_account = None self._sub_account_type = None self._currency = None self._amount = None self._direction = None - self._source = None self._client_order_id = None - self._status = None self.discriminator = None - if timest is not None: - self.timest = timest - if uid is not None: - self.uid = uid self.sub_account = sub_account if sub_account_type is not None: self.sub_account_type = sub_account_type self.currency = currency self.amount = amount self.direction = direction - if source is not None: - self.source = source if client_order_id is not None: self.client_order_id = client_order_id - if status is not None: - self.status = status - - @property - def timest(self): - """Gets the timest of this SubAccountTransfer. # noqa: E501 - - Transfer timestamp # noqa: E501 - - :return: The timest of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._timest - - @timest.setter - def timest(self, timest): - """Sets the timest of this SubAccountTransfer. - - Transfer timestamp # noqa: E501 - - :param timest: The timest of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._timest = timest - - @property - def uid(self): - """Gets the uid of this SubAccountTransfer. # noqa: E501 - - Main account user ID # noqa: E501 - - :return: The uid of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this SubAccountTransfer. - - Main account user ID # noqa: E501 - - :param uid: The uid of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._uid = uid @property def sub_account(self): @@ -169,7 +103,7 @@ def sub_account(self, sub_account): def sub_account_type(self): """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501 - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 :return: The sub_account_type of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -180,7 +114,7 @@ def sub_account_type(self): def sub_account_type(self, sub_account_type): """Sets the sub_account_type of this SubAccountTransfer. - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501 :type: str @@ -263,29 +197,6 @@ def direction(self, direction): self._direction = direction - @property - def source(self): - """Gets the source of this SubAccountTransfer. # noqa: E501 - - Where the operation is initiated from # noqa: E501 - - :return: The source of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this SubAccountTransfer. - - Where the operation is initiated from # noqa: E501 - - :param source: The source of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._source = source - @property def client_order_id(self): """Gets the client_order_id of this SubAccountTransfer. # noqa: E501 @@ -309,29 +220,6 @@ def client_order_id(self, client_order_id): self._client_order_id = client_order_id - @property - def status(self): - """Gets the status of this SubAccountTransfer. # noqa: E501 - - Sub-account transfer record status, currently only success # noqa: E501 - - :return: The status of this SubAccountTransfer. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this SubAccountTransfer. - - Sub-account transfer record status, currently only success # noqa: E501 - - :param status: The status of this SubAccountTransfer. # noqa: E501 - :type: str - """ - - self._status = status - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/sub_account_transfer_record_item.py b/gate_api/models/sub_account_transfer_record_item.py new file mode 100644 index 0000000..c542b85 --- /dev/null +++ b/gate_api/models/sub_account_transfer_record_item.py @@ -0,0 +1,379 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SubAccountTransferRecordItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'timest': 'str', + 'uid': 'str', + 'sub_account': 'str', + 'sub_account_type': 'str', + 'currency': 'str', + 'amount': 'str', + 'direction': 'str', + 'source': 'str', + 'client_order_id': 'str', + 'status': 'str' + } + + attribute_map = { + 'timest': 'timest', + 'uid': 'uid', + 'sub_account': 'sub_account', + 'sub_account_type': 'sub_account_type', + 'currency': 'currency', + 'amount': 'amount', + 'direction': 'direction', + 'source': 'source', + 'client_order_id': 'client_order_id', + 'status': 'status' + } + + def __init__(self, timest=None, uid=None, sub_account=None, sub_account_type='spot', currency=None, amount=None, direction=None, source=None, client_order_id=None, status=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, Configuration) -> None + """SubAccountTransferRecordItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._timest = None + self._uid = None + self._sub_account = None + self._sub_account_type = None + self._currency = None + self._amount = None + self._direction = None + self._source = None + self._client_order_id = None + self._status = None + self.discriminator = None + + if timest is not None: + self.timest = timest + if uid is not None: + self.uid = uid + self.sub_account = sub_account + if sub_account_type is not None: + self.sub_account_type = sub_account_type + self.currency = currency + self.amount = amount + self.direction = direction + if source is not None: + self.source = source + if client_order_id is not None: + self.client_order_id = client_order_id + if status is not None: + self.status = status + + @property + def timest(self): + """Gets the timest of this SubAccountTransferRecordItem. # noqa: E501 + + Transfer timestamp # noqa: E501 + + :return: The timest of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._timest + + @timest.setter + def timest(self, timest): + """Sets the timest of this SubAccountTransferRecordItem. + + Transfer timestamp # noqa: E501 + + :param timest: The timest of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + + self._timest = timest + + @property + def uid(self): + """Gets the uid of this SubAccountTransferRecordItem. # noqa: E501 + + Main account user ID # noqa: E501 + + :return: The uid of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SubAccountTransferRecordItem. + + Main account user ID # noqa: E501 + + :param uid: The uid of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def sub_account(self): + """Gets the sub_account of this SubAccountTransferRecordItem. # noqa: E501 + + Sub account user ID # noqa: E501 + + :return: The sub_account of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._sub_account + + @sub_account.setter + def sub_account(self, sub_account): + """Sets the sub_account of this SubAccountTransferRecordItem. + + Sub account user ID # noqa: E501 + + :param sub_account: The sub_account of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sub_account is None: # noqa: E501 + raise ValueError("Invalid value for `sub_account`, must not be `None`") # noqa: E501 + + self._sub_account = sub_account + + @property + def sub_account_type(self): + """Gets the sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 + + 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 + + :return: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._sub_account_type + + @sub_account_type.setter + def sub_account_type(self, sub_account_type): + """Sets the sub_account_type of this SubAccountTransferRecordItem. + + 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 + + :param sub_account_type: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + + self._sub_account_type = sub_account_type + + @property + def currency(self): + """Gets the currency of this SubAccountTransferRecordItem. # noqa: E501 + + Transfer currency name # noqa: E501 + + :return: The currency of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this SubAccountTransferRecordItem. + + Transfer currency name # noqa: E501 + + :param currency: The currency of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def amount(self): + """Gets the amount of this SubAccountTransferRecordItem. # noqa: E501 + + Transfer amount # noqa: E501 + + :return: The amount of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SubAccountTransferRecordItem. + + Transfer amount # noqa: E501 + + :param amount: The amount of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def direction(self): + """Gets the direction of this SubAccountTransferRecordItem. # noqa: E501 + + Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + + :return: The direction of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this SubAccountTransferRecordItem. + + Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + + :param direction: The direction of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 + raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 + + self._direction = direction + + @property + def source(self): + """Gets the source of this SubAccountTransferRecordItem. # noqa: E501 + + Where the operation is initiated from # noqa: E501 + + :return: The source of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this SubAccountTransferRecordItem. + + Where the operation is initiated from # noqa: E501 + + :param source: The source of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + + self._source = source + + @property + def client_order_id(self): + """Gets the client_order_id of this SubAccountTransferRecordItem. # noqa: E501 + + The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + + :return: The client_order_id of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._client_order_id + + @client_order_id.setter + def client_order_id(self, client_order_id): + """Sets the client_order_id of this SubAccountTransferRecordItem. + + The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + + :param client_order_id: The client_order_id of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + + self._client_order_id = client_order_id + + @property + def status(self): + """Gets the status of this SubAccountTransferRecordItem. # noqa: E501 + + Sub-account transfer record status, currently only success # noqa: E501 + + :return: The status of this SubAccountTransferRecordItem. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this SubAccountTransferRecordItem. + + Sub-account transfer record status, currently only success # noqa: E501 + + :param status: The status of this SubAccountTransferRecordItem. # noqa: E501 + :type: str + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubAccountTransferRecordItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubAccountTransferRecordItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py index 01f087b..8e08761 100644 --- a/gate_api/models/sub_cross_margin_account.py +++ b/gate_api/models/sub_cross_margin_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py index f8c1231..bd977c9 100644 --- a/gate_api/models/sub_user_mode.py +++ b/gate_api/models/sub_user_mode.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/swap_coin.py b/gate_api/models/swap_coin.py new file mode 100644 index 0000000..d894ab1 --- /dev/null +++ b/gate_api/models/swap_coin.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SwapCoin(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'coin': 'str', + 'side': 'str', + 'amount': 'str', + 'pid': 'int' + } + + attribute_map = { + 'coin': 'coin', + 'side': 'side', + 'amount': 'amount', + 'pid': 'pid' + } + + def __init__(self, coin=None, side=None, amount=None, pid=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, int, Configuration) -> None + """SwapCoin - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._coin = None + self._side = None + self._amount = None + self._pid = None + self.discriminator = None + + self.coin = coin + self.side = side + self.amount = amount + if pid is not None: + self.pid = pid + + @property + def coin(self): + """Gets the coin of this SwapCoin. # noqa: E501 + + Currency # noqa: E501 + + :return: The coin of this SwapCoin. # noqa: E501 + :rtype: str + """ + return self._coin + + @coin.setter + def coin(self, coin): + """Sets the coin of this SwapCoin. + + Currency # noqa: E501 + + :param coin: The coin of this SwapCoin. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and coin is None: # noqa: E501 + raise ValueError("Invalid value for `coin`, must not be `None`") # noqa: E501 + + self._coin = coin + + @property + def side(self): + """Gets the side of this SwapCoin. # noqa: E501 + + 0 - Stake 1 - Redeem # noqa: E501 + + :return: The side of this SwapCoin. # noqa: E501 + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this SwapCoin. + + 0 - Stake 1 - Redeem # noqa: E501 + + :param side: The side of this SwapCoin. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and side is None: # noqa: E501 + raise ValueError("Invalid value for `side`, must not be `None`") # noqa: E501 + + self._side = side + + @property + def amount(self): + """Gets the amount of this SwapCoin. # noqa: E501 + + Size # noqa: E501 + + :return: The amount of this SwapCoin. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SwapCoin. + + Size # noqa: E501 + + :param amount: The amount of this SwapCoin. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def pid(self): + """Gets the pid of this SwapCoin. # noqa: E501 + + DeFi-type Mining Protocol Identifier # noqa: E501 + + :return: The pid of this SwapCoin. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this SwapCoin. + + DeFi-type Mining Protocol Identifier # noqa: E501 + + :param pid: The pid of this SwapCoin. # noqa: E501 + :type: int + """ + + self._pid = pid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SwapCoin): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SwapCoin): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py index 008419d..b154262 100644 --- a/gate_api/models/system_time.py +++ b/gate_api/models/system_time.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py index 74ed298..bf6ec74 100644 --- a/gate_api/models/ticker.py +++ b/gate_api/models/ticker.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/ticker2.py b/gate_api/models/ticker2.py new file mode 100644 index 0000000..bbcbcb8 --- /dev/null +++ b/gate_api/models/ticker2.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class Ticker2(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + 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', + 'last': 'str', + 'change': 'str', + 'volume': 'str', + 'market_cap': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'last': 'last', + 'change': 'change', + 'volume': 'volume', + 'market_cap': 'market_cap' + } + + def __init__(self, currency=None, last=None, change=None, volume=None, market_cap=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, Configuration) -> None + """Ticker2 - a 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._last = None + self._change = None + self._volume = None + self._market_cap = None + self.discriminator = None + + if currency is not None: + self.currency = currency + if last is not None: + self.last = last + if change is not None: + self.change = change + if volume is not None: + self.volume = volume + if market_cap is not None: + self.market_cap = market_cap + + @property + def currency(self): + """Gets the currency of this Ticker2. # noqa: E501 + + Currency symbol # noqa: E501 + + :return: The currency of this Ticker2. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Ticker2. + + Currency symbol # noqa: E501 + + :param currency: The currency of this Ticker2. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def last(self): + """Gets the last of this Ticker2. # noqa: E501 + + Last trading price # noqa: E501 + + :return: The last of this Ticker2. # noqa: E501 + :rtype: str + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this Ticker2. + + Last trading price # noqa: E501 + + :param last: The last of this Ticker2. # noqa: E501 + :type: str + """ + + self._last = last + + @property + def change(self): + """Gets the change of this Ticker2. # noqa: E501 + + Change percentage in the last 24h # noqa: E501 + + :return: The change of this Ticker2. # noqa: E501 + :rtype: str + """ + return self._change + + @change.setter + def change(self, change): + """Sets the change of this Ticker2. + + Change percentage in the last 24h # noqa: E501 + + :param change: The change of this Ticker2. # noqa: E501 + :type: str + """ + + self._change = change + + @property + def volume(self): + """Gets the volume of this Ticker2. # noqa: E501 + + 24h Trading Volume (USDT) # noqa: E501 + + :return: The volume of this Ticker2. # noqa: E501 + :rtype: str + """ + return self._volume + + @volume.setter + def volume(self, volume): + """Sets the volume of this Ticker2. + + 24h Trading Volume (USDT) # noqa: E501 + + :param volume: The volume of this Ticker2. # noqa: E501 + :type: str + """ + + self._volume = volume + + @property + def market_cap(self): + """Gets the market_cap of this Ticker2. # noqa: E501 + + Current Coin Market Value # noqa: E501 + + :return: The market_cap of this Ticker2. # noqa: E501 + :rtype: str + """ + return self._market_cap + + @market_cap.setter + def market_cap(self, market_cap): + """Sets the market_cap of this Ticker2. + + Current Coin Market Value # noqa: E501 + + :param market_cap: The market_cap of this Ticker2. # noqa: E501 + :type: str + """ + + self._market_cap = market_cap + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Ticker2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Ticker2): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py index c682b06..42fc61d 100644 --- a/gate_api/models/total_balance.py +++ b/gate_api/models/total_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py index bb1b937..43eef2b 100644 --- a/gate_api/models/trade.py +++ b/gate_api/models/trade.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py index ce00a67..4746715 100644 --- a/gate_api/models/trade_fee.py +++ b/gate_api/models/trade_fee.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py index 037d79e..e3cc452 100644 --- a/gate_api/models/transaction_id.py +++ b/gate_api/models/transaction_id.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py index 9b837cd..48de0fa 100644 --- a/gate_api/models/transfer.py +++ b/gate_api/models/transfer.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py index 849521c..f934c4f 100644 --- a/gate_api/models/transfer_order_status.py +++ b/gate_api/models/transfer_order_status.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py index 7eb84bf..f322a19 100644 --- a/gate_api/models/transferables_result.py +++ b/gate_api/models/transferables_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py index 519d3a6..09fa6d1 100644 --- a/gate_api/models/trigger_order_response.py +++ b/gate_api/models/trigger_order_response.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py index e2cd41b..e550f6f 100644 --- a/gate_api/models/trigger_time.py +++ b/gate_api/models/trigger_time.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py index a0781d3..bd28202 100644 --- a/gate_api/models/uid_push_order.py +++ b/gate_api/models/uid_push_order.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py index 5b4ad8f..7d801cb 100644 --- a/gate_api/models/uid_push_withdrawal.py +++ b/gate_api/models/uid_push_withdrawal.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py index 685aede..dafbdfa 100644 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py index 29d7c68..d30ccc6 100644 --- a/gate_api/models/uni_currency.py +++ b/gate_api/models/uni_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py index 53d47a2..8758666 100644 --- a/gate_api/models/uni_currency_interest.py +++ b/gate_api/models/uni_currency_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py index f0c4974..5ee6fc9 100644 --- a/gate_api/models/uni_currency_pair.py +++ b/gate_api/models/uni_currency_pair.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py index bc95310..d198c60 100644 --- a/gate_api/models/uni_interest_record.py +++ b/gate_api/models/uni_interest_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py index 63f1bac..b110c84 100644 --- a/gate_api/models/uni_lend.py +++ b/gate_api/models/uni_lend.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py index dece9e9..fd408dc 100644 --- a/gate_api/models/uni_lend_interest.py +++ b/gate_api/models/uni_lend_interest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py index a9125e0..eb102c1 100644 --- a/gate_api/models/uni_lend_record.py +++ b/gate_api/models/uni_lend_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py index 5939b8e..da15af1 100644 --- a/gate_api/models/uni_loan.py +++ b/gate_api/models/uni_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py index 08c1fd6..2426bb5 100644 --- a/gate_api/models/uni_loan_interest_record.py +++ b/gate_api/models/uni_loan_interest_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py index a44e12b..ca324e3 100644 --- a/gate_api/models/uni_loan_record.py +++ b/gate_api/models/uni_loan_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index 9ae58a3..08ec274 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index 8d78ce7..3c03631 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py index c68fce3..99cef5b 100644 --- a/gate_api/models/unified_borrowable.py +++ b/gate_api/models/unified_borrowable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/unified_borrowable1.py index 0cacf7c..9fd35d0 100644 --- a/gate_api/models/unified_borrowable1.py +++ b/gate_api/models/unified_borrowable1.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py index e6c03a9..9c597f9 100644 --- a/gate_api/models/unified_currency.py +++ b/gate_api/models/unified_currency.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py index e2f9001..723db52 100644 --- a/gate_api/models/unified_discount.py +++ b/gate_api/models/unified_discount.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py index f9d3d98..cc07ae2 100644 --- a/gate_api/models/unified_discount_tiers.py +++ b/gate_api/models/unified_discount_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py index 5f5451c..23bdbd9 100644 --- a/gate_api/models/unified_history_loan_rate.py +++ b/gate_api/models/unified_history_loan_rate.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py index 83dbf53..32ffef3 100644 --- a/gate_api/models/unified_history_loan_rate_rates.py +++ b/gate_api/models/unified_history_loan_rate_rates.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py index 2f7ea37..0a8dcb8 100644 --- a/gate_api/models/unified_leverage_config.py +++ b/gate_api/models/unified_leverage_config.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py index 094adb2..f833f14 100644 --- a/gate_api/models/unified_leverage_setting.py +++ b/gate_api/models/unified_leverage_setting.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py index b4b38f1..d753085 100644 --- a/gate_api/models/unified_loan.py +++ b/gate_api/models/unified_loan.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py index 740f850..bea951b 100644 --- a/gate_api/models/unified_loan_record.py +++ b/gate_api/models/unified_loan_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py index dc235fb..62a1e02 100644 --- a/gate_api/models/unified_loan_result.py +++ b/gate_api/models/unified_loan_result.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py index 7d2d71c..2535368 100644 --- a/gate_api/models/unified_margin_tiers.py +++ b/gate_api/models/unified_margin_tiers.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py index 625e0ba..c6989c7 100644 --- a/gate_api/models/unified_mode_set.py +++ b/gate_api/models/unified_mode_set.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py index b9553d4..58d6b6a 100644 --- a/gate_api/models/unified_portfolio_input.py +++ b/gate_api/models/unified_portfolio_input.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py index 055dc0b..5cd1993 100644 --- a/gate_api/models/unified_portfolio_output.py +++ b/gate_api/models/unified_portfolio_output.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py index f8414b7..daef598 100644 --- a/gate_api/models/unified_risk_units.py +++ b/gate_api/models/unified_risk_units.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py index 248fa40..8d730d7 100644 --- a/gate_api/models/unified_settings.py +++ b/gate_api/models/unified_settings.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py index 85b9294..abc6caa 100644 --- a/gate_api/models/unified_transferable.py +++ b/gate_api/models/unified_transferable.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py index 8a2f61e..cf8e1cc 100644 --- a/gate_api/models/user_ltv_info.py +++ b/gate_api/models/user_ltv_info.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py index 03808e2..ce64952 100644 --- a/gate_api/models/user_sub.py +++ b/gate_api/models/user_sub.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py index bfdce09..6f95f08 100644 --- a/gate_api/models/user_sub_relation.py +++ b/gate_api/models/user_sub_relation.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py index 5d69dcd..66adaf4 100644 --- a/gate_api/models/user_total_amount.py +++ b/gate_api/models/user_total_amount.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py index 943a39c..edc8c81 100644 --- a/gate_api/models/withdraw_status.py +++ b/gate_api/models/withdraw_status.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index 19ddb55..c6ca5f8 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/rest.py b/gate_api/rest.py index 9cf2ba3..97c4eba 100644 --- a/gate_api/rest.py +++ b/gate_api/rest.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/setup.py b/setup.py index fe4d434..878937d 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ """ Gate API v4 - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.99.0" +VERSION = "6.100.0" # To install the library, run the following # # python setup.py install From 09fa6e69e4215ca42e5710a1fb9af6e1d7a851a3 Mon Sep 17 00:00:00 2001 From: gateio Date: Wed, 2 Jul 2025 10:25:30 +0000 Subject: [PATCH 09/20] update to v6.100.1 --- README.md | 24 +- docs/AccountBookResponse.md | 15 - docs/AccountsResponse.md | 15 - docs/AlphaApi.md | 566 ------------ docs/Currency2.md | 16 - docs/EarnUniApi.md | 8 +- docs/OrderResponse.md | 23 - docs/PlaceOrderRequest.md | 16 - docs/PlaceOrderResponse.md | 18 - docs/QuoteRequest.md | 15 - docs/QuoteResponse.md | 20 - docs/SpotAccount.md | 1 - docs/Ticker2.md | 14 - docs/UnifiedAccount.md | 1 + docs/UnifiedApi.md | 70 +- docs/UnifiedBalance.md | 1 + docs/UnifiedCollateralReq.md | 12 + docs/UnifiedCollateralRes.md | 11 + gate_api/__init__.py | 14 +- gate_api/api/__init__.py | 1 - gate_api/api/alpha_api.py | 1025 --------------------- gate_api/api/earn_uni_api.py | 8 +- gate_api/api/unified_api.py | 120 ++- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 +- gate_api/models/__init__.py | 11 +- gate_api/models/account_book_response.py | 235 ----- gate_api/models/accounts_response.py | 235 ----- gate_api/models/currency2.py | 291 ------ gate_api/models/order_response.py | 459 --------- gate_api/models/place_order_request.py | 268 ------ gate_api/models/place_order_response.py | 319 ------- gate_api/models/quote_request.py | 239 ----- gate_api/models/quote_response.py | 375 -------- gate_api/models/spot_account.py | 36 +- gate_api/models/ticker2.py | 235 ----- gate_api/models/unified_account.py | 36 +- gate_api/models/unified_balance.py | 36 +- gate_api/models/unified_collateral_req.py | 185 ++++ gate_api/models/unified_collateral_res.py | 123 +++ setup.py | 2 +- 41 files changed, 610 insertions(+), 4495 deletions(-) delete mode 100644 docs/AccountBookResponse.md delete mode 100644 docs/AccountsResponse.md delete mode 100644 docs/AlphaApi.md delete mode 100644 docs/Currency2.md delete mode 100644 docs/OrderResponse.md delete mode 100644 docs/PlaceOrderRequest.md delete mode 100644 docs/PlaceOrderResponse.md delete mode 100644 docs/QuoteRequest.md delete mode 100644 docs/QuoteResponse.md delete mode 100644 docs/Ticker2.md create mode 100644 docs/UnifiedCollateralReq.md create mode 100644 docs/UnifiedCollateralRes.md delete mode 100644 gate_api/api/alpha_api.py delete mode 100644 gate_api/models/account_book_response.py delete mode 100644 gate_api/models/accounts_response.py delete mode 100644 gate_api/models/currency2.py delete mode 100644 gate_api/models/order_response.py delete mode 100644 gate_api/models/place_order_request.py delete mode 100644 gate_api/models/place_order_response.py delete mode 100644 gate_api/models/quote_request.py delete mode 100644 gate_api/models/quote_response.py delete mode 100644 gate_api/models/ticker2.py create mode 100644 gate_api/models/unified_collateral_req.py create mode 100644 gate_api/models/unified_collateral_res.py diff --git a/README.md b/README.md index addad48..4c47f1a 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.100.0 -- Package version: 6.100.0 +- API version: 4.100.1 +- Package version: 6.100.1 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) @@ -158,6 +158,7 @@ Class | Method | HTTP request | Description *UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage *UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account *UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates +*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | 设置抵押币种 *AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail *AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information *AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups @@ -167,14 +168,6 @@ Class | Method | HTTP request | Description *AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group *AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. *AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. -*AlphaApi* | [**list_alpha_accounts**](docs/AlphaApi.md#list_alpha_accounts) | **GET** /alpha/accounts | API for Alpha Accounts -*AlphaApi* | [**list_alpha_account_book**](docs/AlphaApi.md#list_alpha_account_book) | **GET** /alpha/account_book | Alpha Asset Transaction API -*AlphaApi* | [**quote_alpha_order**](docs/AlphaApi.md#quote_alpha_order) | **POST** /alpha/quote | Alpha Quotation API -*AlphaApi* | [**list_alpha_order**](docs/AlphaApi.md#list_alpha_order) | **GET** /alpha/orders | Alpha 查询订单列表接口 -*AlphaApi* | [**place_alpha_order**](docs/AlphaApi.md#place_alpha_order) | **POST** /alpha/orders | Alpha Order Placement API -*AlphaApi* | [**get_alpha_order**](docs/AlphaApi.md#get_alpha_order) | **GET** /alpha/order | Alpha 查询单个订单接口 -*AlphaApi* | [**list_alpha_currencies**](docs/AlphaApi.md#list_alpha_currencies) | **GET** /alpha/currencies | 查询币种信息 -*AlphaApi* | [**list_alpha_tickers**](docs/AlphaApi.md#list_alpha_tickers) | **GET** /alpha/tickers | 查询币种ticker *CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders *CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order *CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order @@ -399,11 +392,9 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AccountBalance](docs/AccountBalance.md) - - [AccountBookResponse](docs/AccountBookResponse.md) - [AccountDetail](docs/AccountDetail.md) - [AccountDetailKey](docs/AccountDetailKey.md) - [AccountRateLimit](docs/AccountRateLimit.md) - - [AccountsResponse](docs/AccountsResponse.md) - [AgencyCommission](docs/AgencyCommission.md) - [AgencyCommissionHistory](docs/AgencyCommissionHistory.md) - [AgencyTransaction](docs/AgencyTransaction.md) @@ -447,7 +438,6 @@ Class | Method | HTTP request | Description - [CrossMarginLoan](docs/CrossMarginLoan.md) - [CrossMarginRepayment](docs/CrossMarginRepayment.md) - [Currency](docs/Currency.md) - - [Currency2](docs/Currency2.md) - [CurrencyChain](docs/CurrencyChain.md) - [CurrencyPair](docs/CurrencyPair.md) - [CurrencyQuota](docs/CurrencyQuota.md) @@ -549,21 +539,16 @@ Class | Method | HTTP request | Description - [OrderCancel](docs/OrderCancel.md) - [OrderPatch](docs/OrderPatch.md) - [OrderResp](docs/OrderResp.md) - - [OrderResponse](docs/OrderResponse.md) - [PartnerCommissionHistory](docs/PartnerCommissionHistory.md) - [PartnerSub](docs/PartnerSub.md) - [PartnerSubList](docs/PartnerSubList.md) - [PartnerTransactionHistory](docs/PartnerTransactionHistory.md) - [PatchUniLend](docs/PatchUniLend.md) - [PlaceDualInvestmentOrder](docs/PlaceDualInvestmentOrder.md) - - [PlaceOrderRequest](docs/PlaceOrderRequest.md) - - [PlaceOrderResponse](docs/PlaceOrderResponse.md) - [Position](docs/Position.md) - [PositionClose](docs/PositionClose.md) - [PositionCloseOrder](docs/PositionCloseOrder.md) - [ProfitLossRange](docs/ProfitLossRange.md) - - [QuoteRequest](docs/QuoteRequest.md) - - [QuoteResponse](docs/QuoteResponse.md) - [RebateUserInfo](docs/RebateUserInfo.md) - [RepayCurrencyRes](docs/RepayCurrencyRes.md) - [RepayLoan](docs/RepayLoan.md) @@ -606,7 +591,6 @@ Class | Method | HTTP request | Description - [SwapCoin](docs/SwapCoin.md) - [SystemTime](docs/SystemTime.md) - [Ticker](docs/Ticker.md) - - [Ticker2](docs/Ticker2.md) - [TotalBalance](docs/TotalBalance.md) - [Trade](docs/Trade.md) - [TradeFee](docs/TradeFee.md) @@ -633,6 +617,8 @@ Class | Method | HTTP request | Description - [UnifiedBalance](docs/UnifiedBalance.md) - [UnifiedBorrowable](docs/UnifiedBorrowable.md) - [UnifiedBorrowable1](docs/UnifiedBorrowable1.md) + - [UnifiedCollateralReq](docs/UnifiedCollateralReq.md) + - [UnifiedCollateralRes](docs/UnifiedCollateralRes.md) - [UnifiedCurrency](docs/UnifiedCurrency.md) - [UnifiedDiscount](docs/UnifiedDiscount.md) - [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md) diff --git a/docs/AccountBookResponse.md b/docs/AccountBookResponse.md deleted file mode 100644 index f281b4e..0000000 --- a/docs/AccountBookResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# AccountBookResponse - -Quotation Response -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**time** | **int** | 操作时间戳 | [optional] -**currency** | **str** | Currency name | [optional] -**change** | **str** | Change amount | [optional] -**balance** | **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/AccountsResponse.md b/docs/AccountsResponse.md deleted file mode 100644 index eaf7a6b..0000000 --- a/docs/AccountsResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# AccountsResponse - -Quotation Response -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**available** | **str** | Available Balance | [optional] -**locked** | **str** | 锁定余额 | [optional] -**token_address** | **str** | token 地址 | [optional] -**chain** | **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/AlphaApi.md b/docs/AlphaApi.md deleted file mode 100644 index 92a4279..0000000 --- a/docs/AlphaApi.md +++ /dev/null @@ -1,566 +0,0 @@ -# gate_api.AlphaApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_alpha_accounts**](AlphaApi.md#list_alpha_accounts) | **GET** /alpha/accounts | API for Alpha Accounts -[**list_alpha_account_book**](AlphaApi.md#list_alpha_account_book) | **GET** /alpha/account_book | Alpha Asset Transaction API -[**quote_alpha_order**](AlphaApi.md#quote_alpha_order) | **POST** /alpha/quote | Alpha Quotation API -[**list_alpha_order**](AlphaApi.md#list_alpha_order) | **GET** /alpha/orders | Alpha 查询订单列表接口 -[**place_alpha_order**](AlphaApi.md#place_alpha_order) | **POST** /alpha/orders | Alpha Order Placement API -[**get_alpha_order**](AlphaApi.md#get_alpha_order) | **GET** /alpha/order | Alpha 查询单个订单接口 -[**list_alpha_currencies**](AlphaApi.md#list_alpha_currencies) | **GET** /alpha/currencies | 查询币种信息 -[**list_alpha_tickers**](AlphaApi.md#list_alpha_tickers) | **GET** /alpha/tickers | 查询币种ticker - - -# **list_alpha_accounts** -> list[AccountsResponse] list_alpha_accounts() - -API for Alpha Accounts - -Query Position Assets - -### 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.AlphaApi(api_client) - -try: - # API for Alpha Accounts - api_response = api_instance.list_alpha_accounts() - 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 AlphaApi->list_alpha_accounts: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[AccountsResponse]**](AccountsResponse.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** | 查询持仓成功 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_alpha_account_book** -> list[AccountBookResponse] list_alpha_account_book(_from, to=to, page=page, limit=limit) - -Alpha Asset Transaction API - -Query Asset Transactions - -### 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.AlphaApi(api_client) -_from = 56 # int | Start timestamp of the query -to = 56 # int | Time range ending, default to current time (optional) -page = 56 # int | Page number (optional) -limit = 56 # int | The maximum number of items per page is 100 (optional) - -try: - # Alpha Asset Transaction API - api_response = api_instance.list_alpha_account_book(_from, to=to, page=page, limit=limit) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AlphaApi->list_alpha_account_book: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start timestamp of the query | - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] - **limit** | **int**| The maximum number of items per page is 100 | [optional] - -### Return type - -[**list[AccountBookResponse]**](AccountBookResponse.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** | 查询流水成功 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **quote_alpha_order** -> QuoteResponse quote_alpha_order(quote_request) - -Alpha Quotation API - -The quote_id returned by the quotation API is valid for one minute.You must place the order within this time window;otherwise, the quote will expire and a new quotation request 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.AlphaApi(api_client) -quote_request = gate_api.QuoteRequest() # QuoteRequest | - -try: - # Alpha Quotation API - api_response = api_instance.quote_alpha_order(quote_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 AlphaApi->quote_alpha_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **quote_request** | [**QuoteRequest**](QuoteRequest.md)| | - -### Return type - -[**QuoteResponse**](QuoteResponse.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** | 询价成功 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_alpha_order** -> list[OrderResponse] list_alpha_order(currency, side, status, _from=_from, to=to, limit=limit, page=page) - -Alpha 查询订单列表接口 - -### 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.AlphaApi(api_client) -currency = 'memeboxsst' # str | Trading Symbol -side = 'buy' # str | 买单或者卖单 - buy - sell -status = 2 # int | Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete -_from = 1627706330 # int | 查询订单的起始时间 (optional) -to = 1635329650 # int | 查询订单的结束时间,不指定则默认为当前时间 (optional) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -page = 1 # int | Page number (optional) (default to 1) - -try: - # Alpha 查询订单列表接口 - api_response = api_instance.list_alpha_order(currency, side, status, _from=_from, to=to, limit=limit, page=page) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AlphaApi->list_alpha_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Trading Symbol | - **side** | **str**| 买单或者卖单 - buy - sell | - **status** | **int**| Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete | - **_from** | **int**| 查询订单的起始时间 | [optional] - **to** | **int**| 查询订单的结束时间,不指定则默认为当前时间 | [optional] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **page** | **int**| Page number | [optional] [default to 1] - -### Return type - -[**list[OrderResponse]**](OrderResponse.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **place_alpha_order** -> PlaceOrderResponse place_alpha_order(place_order_request) - -Alpha Order Placement API - -### 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.AlphaApi(api_client) -place_order_request = gate_api.PlaceOrderRequest() # PlaceOrderRequest | - -try: - # Alpha Order Placement API - api_response = api_instance.place_alpha_order(place_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 AlphaApi->place_alpha_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **place_order_request** | [**PlaceOrderRequest**](PlaceOrderRequest.md)| | - -### Return type - -[**PlaceOrderResponse**](PlaceOrderResponse.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_alpha_order** -> OrderResponse get_alpha_order(order_id) - -Alpha 查询单个订单接口 - -### 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.AlphaApi(api_client) -order_id = 'fdaf12321' # str | Order ID - -try: - # Alpha 查询单个订单接口 - api_response = api_instance.get_alpha_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 AlphaApi->get_alpha_order: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Order ID | - -### Return type - -[**OrderResponse**](OrderResponse.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** | 订单查询成功 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_alpha_currencies** -> list[Currency2] list_alpha_currencies(currency=currency, limit=limit, page=page) - -查询币种信息 - -When the currency parameter is provided, query and return information for the specified currency. When the currency parameter is not provided, return a paginated list of currencies. - -### 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.AlphaApi(api_client) -currency = 'memeboxtrump' # str | 根据币种符号查询币种信息 (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -page = 1 # int | Page number (optional) (default to 1) - -try: - # 查询币种信息 - api_response = api_instance.list_alpha_currencies(currency=currency, limit=limit, page=page) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AlphaApi->list_alpha_currencies: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| 根据币种符号查询币种信息 | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **page** | **int**| Page number | [optional] [default to 1] - -### Return type - -[**list[Currency2]**](Currency2.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_alpha_tickers** -> list[Ticker2] list_alpha_tickers(currency=currency, limit=limit, page=page) - -查询币种ticker - -When the currency parameter is provided, query and return information for the specified ticker, When the currency parameter is not provided, return a paginated list of tickers. - -### 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.AlphaApi(api_client) -currency = 'memeboxtrump' # str | Retrieve data of the specified currency (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -page = 1 # int | Page number (optional) (default to 1) - -try: - # 查询币种ticker - api_response = api_instance.list_alpha_tickers(currency=currency, limit=limit, page=page) - print(api_response) -except GateApiException as ex: - print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) -except ApiException as e: - print("Exception when calling AlphaApi->list_alpha_tickers: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **page** | **int**| Page number | [optional] [default to 1] - -### Return type - -[**list[Ticker2]**](Ticker2.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Currency2.md b/docs/Currency2.md deleted file mode 100644 index c85442f..0000000 --- a/docs/Currency2.md +++ /dev/null @@ -1,16 +0,0 @@ -# Currency2 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency symbol | [optional] -**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] -**status** | **int** | 币种交易状态 - `1` : 正常交易 - `2` : 暂停交易 - `3` : 下架 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index a2c85a7..84528cf 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/OrderResponse.md b/docs/OrderResponse.md deleted file mode 100644 index 7100bbd..0000000 --- a/docs/OrderResponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# OrderResponse - -下单返回 -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**tx_hash** | **str** | Transaction Hash | [optional] -**side** | **str** | 买单或者卖单 - buy - sell | [optional] -**usdt_amount** | **str** | Amount | [optional] -**currency** | **str** | 币 | [optional] -**currency_amount** | **str** | Currency amount | [optional] -**status** | **int** | Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete | [optional] -**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | [optional] -**chain** | **str** | 链 | [optional] -**gas_fee** | **str** | Miner Fee (USDT-based) | [optional] -**transaction_fee** | **str** | Trading Fee (USDT-based) | [optional] -**failed_reason** | **str** | Failure reason (if any) | [optional] -**create_time** | **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/PlaceOrderRequest.md b/docs/PlaceOrderRequest.md deleted file mode 100644 index 6008a4f..0000000 --- a/docs/PlaceOrderRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PlaceOrderRequest - -下单请求 -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Trading Symbol | -**side** | **str** | 买单或者卖单 - buy - sell | -**amount** | **str** | Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency | -**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | -**slippage** | **str** | Slippage value of 10 represents a 10% tolerance | [optional] -**quote_id** | **str** | The quote_id returned by the quotation 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/PlaceOrderResponse.md b/docs/PlaceOrderResponse.md deleted file mode 100644 index 547ee83..0000000 --- a/docs/PlaceOrderResponse.md +++ /dev/null @@ -1,18 +0,0 @@ -# PlaceOrderResponse - -下单返回 -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**status** | **int** | Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete | [optional] -**side** | **str** | 买单或者卖单 - buy - sell | [optional] -**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | [optional] -**create_time** | **int** | 创建时间 (时间戳) | [optional] -**amount** | **str** | Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency | [optional] -**token_address** | **str** | 币地址 | [optional] -**chain** | **str** | Chain 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/QuoteRequest.md b/docs/QuoteRequest.md deleted file mode 100644 index 1ac95e2..0000000 --- a/docs/QuoteRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# QuoteRequest - -Quotation Request -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Trading Symbol | -**side** | **str** | 买单或者卖单 - buy - sell | -**amount** | **str** | Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency | -**gas_mode** | **str** | Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter | -**slippage** | **str** | Slippage value of 10 represents a 10% tolerance | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/QuoteResponse.md b/docs/QuoteResponse.md deleted file mode 100644 index 1e222f3..0000000 --- a/docs/QuoteResponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# QuoteResponse - -Quotation Response -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**quote_id** | **str** | The quotation ID (quote_id) is used for placing orders and is valid for 1 minute | [optional] -**min_amount** | **str** | 最小下单量 | [optional] -**max_amount** | **str** | 最大下单量 | [optional] -**price** | **str** | Coin Price (USDT-based) | [optional] -**slippage** | **str** | Slippage | [optional] -**estimate_gas_fee_amount_usdt** | **str** | Estimated Network Fee (USDT-based) | [optional] -**order_fee** | **str** | Slippage value of 10 represents a 10% tolerance | [optional] -**target_token_min_amount** | **str** | 最小获得数量 | [optional] -**target_token_max_amount** | **str** | 最大获得数量 | [optional] -**error_type** | **int** | Failure Type - `0` : Success - `1` : Exceeds maximum value - `2` : Below minimum 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/SpotAccount.md b/docs/SpotAccount.md index 5fd9ad7..6bb761e 100644 --- a/docs/SpotAccount.md +++ b/docs/SpotAccount.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **available** | **str** | Available amount | [optional] **locked** | **str** | Locked amount, used in trading | [optional] **update_id** | **int** | Version number | [optional] -**refresh_time** | **int** | Asset Refresh Time (ms) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Ticker2.md b/docs/Ticker2.md deleted file mode 100644 index 6e31e37..0000000 --- a/docs/Ticker2.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ticker2 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **str** | Currency symbol | [optional] -**last** | **str** | Last trading price | [optional] -**change** | **str** | Change percentage in the last 24h | [optional] -**volume** | **str** | 24h Trading Volume (USDT) | [optional] -**market_cap** | **str** | Current Coin Market 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/UnifiedAccount.md b/docs/UnifiedAccount.md index e017e2a..124414e 100644 --- a/docs/UnifiedAccount.md +++ b/docs/UnifiedAccount.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **spot_order_loss** | **str** | Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] **use_funding** | **bool** | Whether to use funds as margin | [optional] +**is_all_collateral** | **bool** | 是否所有币种均作为保证金,true - 所有币种作为保证金,false - 否 | [optional] [[Back to Model list]](../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 c300e08..6338d6d 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -25,6 +25,7 @@ Method | HTTP request | Description [**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage [**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account [**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates +[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | 设置抵押币种 # **list_unified_accounts** @@ -793,7 +794,7 @@ This endpoint does not need any parameter. Set mode of the unified account -Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` +每种账户模式的切换只需要传对应账户模式的参数,同时支持在切换账户模式时打开或关闭对应账户模式下的配置开关 - 开通经典账户模式时,mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - 开通跨币种保证金模式,mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - 开通组合保证金模式时,mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - 开通单币种保证金模式时,mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` ### Example @@ -1417,3 +1418,70 @@ 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_unified_collateral** +> UnifiedCollateralRes set_unified_collateral(unified_collateral_req) + +设置抵押币种 + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.UnifiedApi(api_client) +unified_collateral_req = gate_api.UnifiedCollateralReq() # UnifiedCollateralReq | + +try: + # 设置抵押币种 + api_response = api_instance.set_unified_collateral(unified_collateral_req) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling UnifiedApi->set_unified_collateral: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **unified_collateral_req** | [**UnifiedCollateralReq**](UnifiedCollateralReq.md)| | + +### Return type + +[**UnifiedCollateralRes**](UnifiedCollateralRes.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 更新成功 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md index a5847e1..51cfdb0 100644 --- a/docs/UnifiedBalance.md +++ b/docs/UnifiedBalance.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **mmr** | **str** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] **margin_balance** | **str** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional] **available_margin** | **str** | Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] +**enabled_collateral** | **bool** | 币种开启作为保证金,true - 启用,false - 未启用 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCollateralReq.md b/docs/UnifiedCollateralReq.md new file mode 100644 index 0000000..2e41bd7 --- /dev/null +++ b/docs/UnifiedCollateralReq.md @@ -0,0 +1,12 @@ +# UnifiedCollateralReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collateral_type** | **int** | 用户设置抵押物模式 0(all)-全部币种作为抵押物,1(custom)-自定义币种作为抵押物,collateral_type为0(all)时,enable_list与disable_list参数无效 | [optional] +**enable_list** | **list[str]** | 币种列表,collateral_type=1(custom)表示追加的逻辑 | [optional] +**disable_list** | **list[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/UnifiedCollateralRes.md b/docs/UnifiedCollateralRes.md new file mode 100644 index 0000000..2394451 --- /dev/null +++ b/docs/UnifiedCollateralRes.md @@ -0,0 +1,11 @@ +# UnifiedCollateralRes + +统一账户抵押模式设置返回 +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_success** | **bool** | 是否设置成功 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gate_api/__init__.py b/gate_api/__init__.py index dec83d9..90536ea 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.100.0" +__version__ = "6.100.1" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi @@ -22,7 +22,6 @@ from gate_api.api.sub_account_api import SubAccountApi from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi -from gate_api.api.alpha_api import AlphaApi from gate_api.api.collateral_loan_api import CollateralLoanApi from gate_api.api.delivery_api import DeliveryApi from gate_api.api.earn_api import EarnApi @@ -46,11 +45,9 @@ from gate_api.exceptions import ApiException # import models into sdk package from gate_api.models.account_balance import AccountBalance -from gate_api.models.account_book_response import AccountBookResponse from gate_api.models.account_detail import AccountDetail from gate_api.models.account_detail_key import AccountDetailKey from gate_api.models.account_rate_limit import AccountRateLimit -from gate_api.models.accounts_response import AccountsResponse from gate_api.models.agency_commission import AgencyCommission from gate_api.models.agency_commission_history import AgencyCommissionHistory from gate_api.models.agency_transaction import AgencyTransaction @@ -94,7 +91,6 @@ from gate_api.models.cross_margin_loan import CrossMarginLoan from gate_api.models.cross_margin_repayment import CrossMarginRepayment from gate_api.models.currency import Currency -from gate_api.models.currency2 import Currency2 from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota @@ -196,21 +192,16 @@ from gate_api.models.order_cancel import OrderCancel from gate_api.models.order_patch import OrderPatch from gate_api.models.order_resp import OrderResp -from gate_api.models.order_response import OrderResponse from gate_api.models.partner_commission_history import PartnerCommissionHistory from gate_api.models.partner_sub import PartnerSub from gate_api.models.partner_sub_list import PartnerSubList from gate_api.models.partner_transaction_history import PartnerTransactionHistory from gate_api.models.patch_uni_lend import PatchUniLend from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder -from gate_api.models.place_order_request import PlaceOrderRequest -from gate_api.models.place_order_response import PlaceOrderResponse from gate_api.models.position import Position from gate_api.models.position_close import PositionClose from gate_api.models.position_close_order import PositionCloseOrder from gate_api.models.profit_loss_range import ProfitLossRange -from gate_api.models.quote_request import QuoteRequest -from gate_api.models.quote_response import QuoteResponse from gate_api.models.rebate_user_info import RebateUserInfo from gate_api.models.repay_currency_res import RepayCurrencyRes from gate_api.models.repay_loan import RepayLoan @@ -253,7 +244,6 @@ from gate_api.models.swap_coin import SwapCoin from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker -from gate_api.models.ticker2 import Ticker2 from gate_api.models.total_balance import TotalBalance from gate_api.models.trade import Trade from gate_api.models.trade_fee import TradeFee @@ -280,6 +270,8 @@ from gate_api.models.unified_balance import UnifiedBalance from gate_api.models.unified_borrowable import UnifiedBorrowable from gate_api.models.unified_borrowable1 import UnifiedBorrowable1 +from gate_api.models.unified_collateral_req import UnifiedCollateralReq +from gate_api.models.unified_collateral_res import UnifiedCollateralRes from gate_api.models.unified_currency import UnifiedCurrency from gate_api.models.unified_discount import UnifiedDiscount from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers diff --git a/gate_api/api/__init__.py b/gate_api/api/__init__.py index ba8b516..6cd727a 100644 --- a/gate_api/api/__init__.py +++ b/gate_api/api/__init__.py @@ -8,7 +8,6 @@ from gate_api.api.sub_account_api import SubAccountApi from gate_api.api.unified_api import UnifiedApi from gate_api.api.account_api import AccountApi -from gate_api.api.alpha_api import AlphaApi from gate_api.api.collateral_loan_api import CollateralLoanApi from gate_api.api.delivery_api import DeliveryApi from gate_api.api.earn_api import EarnApi diff --git a/gate_api/api/alpha_api.py b/gate_api/api/alpha_api.py deleted file mode 100644 index 581a2ea..0000000 --- a/gate_api/api/alpha_api.py +++ /dev/null @@ -1,1025 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from gate_api.api_client import ApiClient -from gate_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class AlphaApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list_alpha_accounts(self, **kwargs): # noqa: E501 - """API for Alpha Accounts # noqa: E501 - - Query Position Assets # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_alpha_accounts(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.AccountsResponse] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_alpha_accounts_with_http_info(**kwargs) # noqa: E501 - - def list_alpha_accounts_with_http_info(self, **kwargs): # noqa: E501 - """API for Alpha Accounts # noqa: E501 - - Query Position Assets # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_alpha_accounts_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.AccountsResponse], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_alpha_accounts" % 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( - '/alpha/accounts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AccountsResponse]', # noqa: E501 - auth_settings=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_alpha_account_book(self, _from, **kwargs): # noqa: E501 - """Alpha Asset Transaction API # noqa: E501 - - Query Asset Transactions # 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_alpha_account_book(_from, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int _from: Start timestamp of the query (required) - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: The maximum number of items per page is 100 - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: list[gate_api.AccountBookResponse] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_alpha_account_book_with_http_info(_from, **kwargs) # noqa: E501 - - def list_alpha_account_book_with_http_info(self, _from, **kwargs): # noqa: E501 - """Alpha Asset Transaction API # noqa: E501 - - Query Asset Transactions # 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_alpha_account_book_with_http_info(_from, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param int _from: Start timestamp of the query (required) - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: The maximum number of items per page is 100 - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.AccountBookResponse], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_from', - 'to', - 'page', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_alpha_account_book" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter '_from' is set - if self.api_client.client_side_validation and ('_from' not in local_var_params or # noqa: E501 - local_var_params['_from'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_from` when calling `list_alpha_account_book`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if '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( - '/alpha/account_book', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AccountBookResponse]', # noqa: E501 - auth_settings=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 quote_alpha_order(self, quote_request, **kwargs): # noqa: E501 - """Alpha Quotation API # noqa: E501 - - The quote_id returned by the quotation API is valid for one minute.You must place the order within this time window;otherwise, the quote will expire and a new quotation request is required # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.quote_alpha_order(quote_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param QuoteRequest quote_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.QuoteResponse - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.quote_alpha_order_with_http_info(quote_request, **kwargs) # noqa: E501 - - def quote_alpha_order_with_http_info(self, quote_request, **kwargs): # noqa: E501 - """Alpha Quotation API # noqa: E501 - - The quote_id returned by the quotation API is valid for one minute.You must place the order within this time window;otherwise, the quote will expire and a new quotation request is required # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.quote_alpha_order_with_http_info(quote_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param QuoteRequest quote_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.QuoteResponse, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'quote_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 quote_alpha_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'quote_request' is set - if self.api_client.client_side_validation and ('quote_request' not in local_var_params or # noqa: E501 - local_var_params['quote_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `quote_request` when calling `quote_alpha_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'quote_request' in local_var_params: - body_params = local_var_params['quote_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( - '/alpha/quote', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QuoteResponse', # noqa: E501 - auth_settings=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_alpha_order(self, currency, side, status, **kwargs): # noqa: E501 - """Alpha 查询订单列表接口 # 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_alpha_order(currency, side, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Trading Symbol (required) - :param str side: 买单或者卖单 - buy - sell (required) - :param int status: Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete (required) - :param int _from: 查询订单的起始时间 - :param int to: 查询订单的结束时间,不指定则默认为当前时间 - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int page: Page number - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OrderResponse] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_alpha_order_with_http_info(currency, side, status, **kwargs) # noqa: E501 - - def list_alpha_order_with_http_info(self, currency, side, status, **kwargs): # noqa: E501 - """Alpha 查询订单列表接口 # 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_alpha_order_with_http_info(currency, side, status, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Trading Symbol (required) - :param str side: 买单或者卖单 - buy - sell (required) - :param int status: Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete (required) - :param int _from: 查询订单的起始时间 - :param int to: 查询订单的结束时间,不指定则默认为当前时间 - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int page: Page number - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.OrderResponse], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'side', - 'status', - '_from', - 'to', - 'limit', - 'page' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_alpha_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'currency' is set - if self.api_client.client_side_validation and ('currency' not in local_var_params or # noqa: E501 - local_var_params['currency'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `currency` when calling `list_alpha_order`") # noqa: E501 - # verify the required parameter 'side' is set - if self.api_client.client_side_validation and ('side' not in local_var_params or # noqa: E501 - local_var_params['side'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `side` when calling `list_alpha_order`") # 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_alpha_order`") # 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_alpha_order`, 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_alpha_order`, 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_alpha_order`, 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 '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 '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 '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 - query_params.append(('from', local_var_params['_from'])) # noqa: E501 - if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 - query_params.append(('to', local_var_params['to'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/alpha/orders', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OrderResponse]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def place_alpha_order(self, place_order_request, **kwargs): # noqa: E501 - """Alpha Order Placement API # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_alpha_order(place_order_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param PlaceOrderRequest place_order_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.PlaceOrderResponse - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.place_alpha_order_with_http_info(place_order_request, **kwargs) # noqa: E501 - - def place_alpha_order_with_http_info(self, place_order_request, **kwargs): # noqa: E501 - """Alpha Order Placement API # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.place_alpha_order_with_http_info(place_order_request, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param PlaceOrderRequest place_order_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.PlaceOrderResponse, status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'place_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 place_alpha_order" % k - ) - local_var_params[k] = v - del local_var_params['kwargs'] - # verify the required parameter 'place_order_request' is set - if self.api_client.client_side_validation and ('place_order_request' not in local_var_params or # noqa: E501 - local_var_params['place_order_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `place_order_request` when calling `place_alpha_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'place_order_request' in local_var_params: - body_params = local_var_params['place_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( - '/alpha/orders', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PlaceOrderResponse', # noqa: E501 - auth_settings=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_alpha_order(self, order_id, **kwargs): # noqa: E501 - """Alpha 查询单个订单接口 # 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_alpha_order(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Order ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: gate_api.OrderResponse - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_alpha_order_with_http_info(order_id, **kwargs) # noqa: E501 - - def get_alpha_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Alpha 查询单个订单接口 # 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_alpha_order_with_http_info(order_id, async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str order_id: Order ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(gate_api.OrderResponse, 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_alpha_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_alpha_order`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 - query_params.append(('order_id', local_var_params['order_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['apiv4'] # noqa: E501 - - return self.api_client.call_api( - '/alpha/order', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OrderResponse', # noqa: E501 - auth_settings=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_alpha_currencies(self, **kwargs): # noqa: E501 - """查询币种信息 # noqa: E501 - - When the currency parameter is provided, query and return information for the specified currency. When the currency parameter is not provided, return a paginated list of currencies. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_alpha_currencies(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: 根据币种符号查询币种信息 - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Currency2] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_alpha_currencies_with_http_info(**kwargs) # noqa: E501 - - def list_alpha_currencies_with_http_info(self, **kwargs): # noqa: E501 - """查询币种信息 # noqa: E501 - - When the currency parameter is provided, query and return information for the specified currency. When the currency parameter is not provided, return a paginated list of currencies. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_alpha_currencies_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: 根据币种符号查询币种信息 - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Currency2], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'limit', - 'page' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_alpha_currencies" % 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'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_alpha_currencies`, 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_alpha_currencies`, 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_alpha_currencies`, 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/alpha/currencies', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Currency2]', # noqa: E501 - auth_settings=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_alpha_tickers(self, **kwargs): # noqa: E501 - """查询币种ticker # noqa: E501 - - When the currency parameter is provided, query and return information for the specified ticker, When the currency parameter is not provided, return a paginated list of tickers. # 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_alpha_tickers(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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.Ticker2] - :return: If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_alpha_tickers_with_http_info(**kwargs) # noqa: E501 - - def list_alpha_tickers_with_http_info(self, **kwargs): # noqa: E501 - """查询币种ticker # noqa: E501 - - When the currency parameter is provided, query and return information for the specified ticker, When the currency parameter is not provided, return a paginated list of tickers. # 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_alpha_tickers_with_http_info(async_req=True) - >>> result = thread.get() - - :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :rtype: tuple(list[gate_api.Ticker2], status_code(int), headers(HTTPHeaderDict)) - :return: If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'currency', - 'limit', - 'page' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for k, v in six.iteritems(local_var_params['kwargs']): - if k not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_alpha_tickers" % 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'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_alpha_tickers`, 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_alpha_tickers`, 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_alpha_tickers`, 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 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 - query_params.append(('page', local_var_params['page'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/alpha/tickers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Ticker2]', # noqa: E501 - auth_settings=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/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 1adeb09..588a676 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-01 13:01+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index cec183f..2d4f537 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -1334,7 +1334,7 @@ def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 """Set mode of the unified account # noqa: E501 - Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + 每种账户模式的切换只需要传对应账户模式的参数,同时支持在切换账户模式时打开或关闭对应账户模式下的配置开关 - 开通经典账户模式时,mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - 开通跨币种保证金模式,mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - 开通组合保证金模式时,mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - 开通单币种保证金模式时,mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_unified_mode(unified_mode_set, async_req=True) @@ -1359,7 +1359,7 @@ def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: E501 """Set mode of the unified account # noqa: E501 - Switching each account mode only requires passing the parameters of the corresponding account mode, and supports turning on or off the configuration switch in the corresponding account mode when switching the account mode - When opening the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - Open the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When the portfolio margin mode is enabled, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When opening a single currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + 每种账户模式的切换只需要传对应账户模式的参数,同时支持在切换账户模式时打开或关闭对应账户模式下的配置开关 - 开通经典账户模式时,mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - 开通跨币种保证金模式,mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - 开通组合保证金模式时,mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - 开通单币种保证金模式时,mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_unified_mode_with_http_info(unified_mode_set, async_req=True) @@ -2464,3 +2464,119 @@ def get_history_loan_rate_with_http_info(self, currency, **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 set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E501 + """设置抵押币种 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_unified_collateral(unified_collateral_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedCollateralReq unified_collateral_req: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: gate_api.UnifiedCollateralRes + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_unified_collateral_with_http_info(unified_collateral_req, **kwargs) # noqa: E501 + + def set_unified_collateral_with_http_info(self, unified_collateral_req, **kwargs): # noqa: E501 + """设置抵押币种 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_unified_collateral_with_http_info(unified_collateral_req, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param UnifiedCollateralReq unified_collateral_req: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(gate_api.UnifiedCollateralRes, status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'unified_collateral_req' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_unified_collateral" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'unified_collateral_req' is set + if self.api_client.client_side_validation and ('unified_collateral_req' not in local_var_params or # noqa: E501 + local_var_params['unified_collateral_req'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `unified_collateral_req` when calling `set_unified_collateral`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'unified_collateral_req' in local_var_params: + body_params = local_var_params['unified_collateral_req'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/unified/collateral_currencies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnifiedCollateralRes', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/gate_api/api_client.py b/gate_api/api_client.py index c8f9007..535b068 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/6.100.0/python' + self.user_agent = 'OpenAPI-Generator/6.100.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index e5812f1..ad6e738 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: 4.100.0\n"\ - "SDK Package Version: 6.100.0".\ + "Version of the API: 4.100.1\n"\ + "SDK Package Version: 6.100.1".\ 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 4aa139f..1a6b8e4 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -15,11 +15,9 @@ # import models into model package from gate_api.models.account_balance import AccountBalance -from gate_api.models.account_book_response import AccountBookResponse from gate_api.models.account_detail import AccountDetail from gate_api.models.account_detail_key import AccountDetailKey from gate_api.models.account_rate_limit import AccountRateLimit -from gate_api.models.accounts_response import AccountsResponse from gate_api.models.agency_commission import AgencyCommission from gate_api.models.agency_commission_history import AgencyCommissionHistory from gate_api.models.agency_transaction import AgencyTransaction @@ -63,7 +61,6 @@ from gate_api.models.cross_margin_loan import CrossMarginLoan from gate_api.models.cross_margin_repayment import CrossMarginRepayment from gate_api.models.currency import Currency -from gate_api.models.currency2 import Currency2 from gate_api.models.currency_chain import CurrencyChain from gate_api.models.currency_pair import CurrencyPair from gate_api.models.currency_quota import CurrencyQuota @@ -165,21 +162,16 @@ from gate_api.models.order_cancel import OrderCancel from gate_api.models.order_patch import OrderPatch from gate_api.models.order_resp import OrderResp -from gate_api.models.order_response import OrderResponse from gate_api.models.partner_commission_history import PartnerCommissionHistory from gate_api.models.partner_sub import PartnerSub from gate_api.models.partner_sub_list import PartnerSubList from gate_api.models.partner_transaction_history import PartnerTransactionHistory from gate_api.models.patch_uni_lend import PatchUniLend from gate_api.models.place_dual_investment_order import PlaceDualInvestmentOrder -from gate_api.models.place_order_request import PlaceOrderRequest -from gate_api.models.place_order_response import PlaceOrderResponse from gate_api.models.position import Position from gate_api.models.position_close import PositionClose from gate_api.models.position_close_order import PositionCloseOrder from gate_api.models.profit_loss_range import ProfitLossRange -from gate_api.models.quote_request import QuoteRequest -from gate_api.models.quote_response import QuoteResponse from gate_api.models.rebate_user_info import RebateUserInfo from gate_api.models.repay_currency_res import RepayCurrencyRes from gate_api.models.repay_loan import RepayLoan @@ -222,7 +214,6 @@ from gate_api.models.swap_coin import SwapCoin from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker -from gate_api.models.ticker2 import Ticker2 from gate_api.models.total_balance import TotalBalance from gate_api.models.trade import Trade from gate_api.models.trade_fee import TradeFee @@ -249,6 +240,8 @@ from gate_api.models.unified_balance import UnifiedBalance from gate_api.models.unified_borrowable import UnifiedBorrowable from gate_api.models.unified_borrowable1 import UnifiedBorrowable1 +from gate_api.models.unified_collateral_req import UnifiedCollateralReq +from gate_api.models.unified_collateral_res import UnifiedCollateralRes from gate_api.models.unified_currency import UnifiedCurrency from gate_api.models.unified_discount import UnifiedDiscount from gate_api.models.unified_discount_tiers import UnifiedDiscountTiers diff --git a/gate_api/models/account_book_response.py b/gate_api/models/account_book_response.py deleted file mode 100644 index 16d3d44..0000000 --- a/gate_api/models/account_book_response.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AccountBookResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'time': 'int', - 'currency': 'str', - 'change': 'str', - 'balance': 'str' - } - - attribute_map = { - 'id': 'id', - 'time': 'time', - 'currency': 'currency', - 'change': 'change', - 'balance': 'balance' - } - - def __init__(self, id=None, time=None, currency=None, change=None, balance=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, Configuration) -> None - """AccountBookResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._time = None - self._currency = None - self._change = None - self._balance = None - self.discriminator = None - - if id is not None: - self.id = id - if time is not None: - self.time = time - if currency is not None: - self.currency = currency - if change is not None: - self.change = change - if balance is not None: - self.balance = balance - - @property - def id(self): - """Gets the id of this AccountBookResponse. # noqa: E501 - - Order ID # noqa: E501 - - :return: The id of this AccountBookResponse. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AccountBookResponse. - - Order ID # noqa: E501 - - :param id: The id of this AccountBookResponse. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def time(self): - """Gets the time of this AccountBookResponse. # noqa: E501 - - 操作时间戳 # noqa: E501 - - :return: The time of this AccountBookResponse. # noqa: E501 - :rtype: int - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this AccountBookResponse. - - 操作时间戳 # noqa: E501 - - :param time: The time of this AccountBookResponse. # noqa: E501 - :type: int - """ - - self._time = time - - @property - def currency(self): - """Gets the currency of this AccountBookResponse. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this AccountBookResponse. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this AccountBookResponse. - - Currency name # noqa: E501 - - :param currency: The currency of this AccountBookResponse. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def change(self): - """Gets the change of this AccountBookResponse. # noqa: E501 - - Change amount # noqa: E501 - - :return: The change of this AccountBookResponse. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this AccountBookResponse. - - Change amount # noqa: E501 - - :param change: The change of this AccountBookResponse. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def balance(self): - """Gets the balance of this AccountBookResponse. # noqa: E501 - - 变更后余额 # noqa: E501 - - :return: The balance of this AccountBookResponse. # noqa: E501 - :rtype: str - """ - return self._balance - - @balance.setter - def balance(self, balance): - """Sets the balance of this AccountBookResponse. - - 变更后余额 # noqa: E501 - - :param balance: The balance of this AccountBookResponse. # noqa: E501 - :type: str - """ - - self._balance = 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, AccountBookResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AccountBookResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/accounts_response.py b/gate_api/models/accounts_response.py deleted file mode 100644 index 4b9622e..0000000 --- a/gate_api/models/accounts_response.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class AccountsResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'token_address': 'str', - 'chain': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'available': 'available', - 'locked': 'locked', - 'token_address': 'token_address', - 'chain': 'chain' - } - - def __init__(self, currency=None, available=None, locked=None, token_address=None, chain=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """AccountsResponse - a 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._token_address = None - self._chain = 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 token_address is not None: - self.token_address = token_address - if chain is not None: - self.chain = chain - - @property - def currency(self): - """Gets the currency of this AccountsResponse. # noqa: E501 - - Currency name # noqa: E501 - - :return: The currency of this AccountsResponse. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this AccountsResponse. - - Currency name # noqa: E501 - - :param currency: The currency of this AccountsResponse. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def available(self): - """Gets the available of this AccountsResponse. # noqa: E501 - - Available Balance # noqa: E501 - - :return: The available of this AccountsResponse. # noqa: E501 - :rtype: str - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this AccountsResponse. - - Available Balance # noqa: E501 - - :param available: The available of this AccountsResponse. # noqa: E501 - :type: str - """ - - self._available = available - - @property - def locked(self): - """Gets the locked of this AccountsResponse. # noqa: E501 - - 锁定余额 # noqa: E501 - - :return: The locked of this AccountsResponse. # noqa: E501 - :rtype: str - """ - return self._locked - - @locked.setter - def locked(self, locked): - """Sets the locked of this AccountsResponse. - - 锁定余额 # noqa: E501 - - :param locked: The locked of this AccountsResponse. # noqa: E501 - :type: str - """ - - self._locked = locked - - @property - def token_address(self): - """Gets the token_address of this AccountsResponse. # noqa: E501 - - token 地址 # noqa: E501 - - :return: The token_address of this AccountsResponse. # noqa: E501 - :rtype: str - """ - return self._token_address - - @token_address.setter - def token_address(self, token_address): - """Sets the token_address of this AccountsResponse. - - token 地址 # noqa: E501 - - :param token_address: The token_address of this AccountsResponse. # noqa: E501 - :type: str - """ - - self._token_address = token_address - - @property - def chain(self): - """Gets the chain of this AccountsResponse. # noqa: E501 - - 区块链名称 # noqa: E501 - - :return: The chain of this AccountsResponse. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this AccountsResponse. - - 区块链名称 # noqa: E501 - - :param chain: The chain of this AccountsResponse. # noqa: E501 - :type: str - """ - - self._chain = chain - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccountsResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AccountsResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/currency2.py b/gate_api/models/currency2.py deleted file mode 100644 index cc158c3..0000000 --- a/gate_api/models/currency2.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Currency2(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'name': 'str', - 'chain': 'str', - 'address': 'str', - 'amount_precision': 'int', - 'precision': 'int', - 'status': 'int' - } - - attribute_map = { - 'currency': 'currency', - 'name': 'name', - 'chain': 'chain', - 'address': 'address', - 'amount_precision': 'amount_precision', - 'precision': 'precision', - 'status': 'status' - } - - def __init__(self, currency=None, name=None, chain=None, address=None, amount_precision=None, precision=None, status=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, int, int, int, Configuration) -> None - """Currency2 - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._name = None - self._chain = None - self._address = None - self._amount_precision = None - self._precision = None - self._status = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if name is not None: - self.name = name - if chain is not None: - self.chain = chain - if address is not None: - self.address = address - if amount_precision is not None: - self.amount_precision = amount_precision - if precision is not None: - self.precision = precision - if status is not None: - self.status = status - - @property - def currency(self): - """Gets the currency of this Currency2. # noqa: E501 - - Currency symbol # noqa: E501 - - :return: The currency of this Currency2. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this Currency2. - - Currency symbol # noqa: E501 - - :param currency: The currency of this Currency2. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def name(self): - """Gets the name of this Currency2. # noqa: E501 - - Currency name # noqa: E501 - - :return: The name of this Currency2. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Currency2. - - Currency name # noqa: E501 - - :param name: The name of this Currency2. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def chain(self): - """Gets the chain of this Currency2. # noqa: E501 - - The main chain corresponding to the coin # noqa: E501 - - :return: The chain of this Currency2. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this Currency2. - - The main chain corresponding to the coin # noqa: E501 - - :param chain: The chain of this Currency2. # noqa: E501 - :type: str - """ - - self._chain = chain - - @property - def address(self): - """Gets the address of this Currency2. # noqa: E501 - - Contract Address # noqa: E501 - - :return: The address of this Currency2. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this Currency2. - - Contract Address # noqa: E501 - - :param address: The address of this Currency2. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def amount_precision(self): - """Gets the amount_precision of this Currency2. # noqa: E501 - - Amount scale # noqa: E501 - - :return: The amount_precision of this Currency2. # noqa: E501 - :rtype: int - """ - return self._amount_precision - - @amount_precision.setter - def amount_precision(self, amount_precision): - """Sets the amount_precision of this Currency2. - - Amount scale # noqa: E501 - - :param amount_precision: The amount_precision of this Currency2. # noqa: E501 - :type: int - """ - - self._amount_precision = amount_precision - - @property - def precision(self): - """Gets the precision of this Currency2. # noqa: E501 - - Price scale # noqa: E501 - - :return: The precision of this Currency2. # noqa: E501 - :rtype: int - """ - return self._precision - - @precision.setter - def precision(self, precision): - """Sets the precision of this Currency2. - - Price scale # noqa: E501 - - :param precision: The precision of this Currency2. # noqa: E501 - :type: int - """ - - self._precision = precision - - @property - def status(self): - """Gets the status of this Currency2. # noqa: E501 - - 币种交易状态 - `1` : 正常交易 - `2` : 暂停交易 - `3` : 下架 # noqa: E501 - - :return: The status of this Currency2. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Currency2. - - 币种交易状态 - `1` : 正常交易 - `2` : 暂停交易 - `3` : 下架 # noqa: E501 - - :param status: The status of this Currency2. # noqa: E501 - :type: int - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Currency2): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Currency2): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/order_response.py b/gate_api/models/order_response.py deleted file mode 100644 index ac59644..0000000 --- a/gate_api/models/order_response.py +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class OrderResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'tx_hash': 'str', - 'side': 'str', - 'usdt_amount': 'str', - 'currency': 'str', - 'currency_amount': 'str', - 'status': 'int', - 'gas_mode': 'str', - 'chain': 'str', - 'gas_fee': 'str', - 'transaction_fee': 'str', - 'failed_reason': 'str', - 'create_time': 'int' - } - - attribute_map = { - 'order_id': 'order_id', - 'tx_hash': 'tx_hash', - 'side': 'side', - 'usdt_amount': 'usdt_amount', - 'currency': 'currency', - 'currency_amount': 'currency_amount', - 'status': 'status', - 'gas_mode': 'gas_mode', - 'chain': 'chain', - 'gas_fee': 'gas_fee', - 'transaction_fee': 'transaction_fee', - 'failed_reason': 'failed_reason', - 'create_time': 'create_time' - } - - def __init__(self, order_id=None, tx_hash=None, side=None, usdt_amount=None, currency=None, currency_amount=None, status=None, gas_mode=None, chain=None, gas_fee=None, transaction_fee=None, failed_reason=None, create_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, int, str, str, str, str, str, int, Configuration) -> None - """OrderResponse - a 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._tx_hash = None - self._side = None - self._usdt_amount = None - self._currency = None - self._currency_amount = None - self._status = None - self._gas_mode = None - self._chain = None - self._gas_fee = None - self._transaction_fee = None - self._failed_reason = None - self._create_time = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if tx_hash is not None: - self.tx_hash = tx_hash - if side is not None: - self.side = side - if usdt_amount is not None: - self.usdt_amount = usdt_amount - if currency is not None: - self.currency = currency - if currency_amount is not None: - self.currency_amount = currency_amount - if status is not None: - self.status = status - if gas_mode is not None: - self.gas_mode = gas_mode - if chain is not None: - self.chain = chain - if gas_fee is not None: - self.gas_fee = gas_fee - if transaction_fee is not None: - self.transaction_fee = transaction_fee - if failed_reason is not None: - self.failed_reason = failed_reason - if create_time is not None: - self.create_time = create_time - - @property - def order_id(self): - """Gets the order_id of this OrderResponse. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this OrderResponse. - - Order ID # noqa: E501 - - :param order_id: The order_id of this OrderResponse. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def tx_hash(self): - """Gets the tx_hash of this OrderResponse. # noqa: E501 - - Transaction Hash # noqa: E501 - - :return: The tx_hash of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._tx_hash - - @tx_hash.setter - def tx_hash(self, tx_hash): - """Sets the tx_hash of this OrderResponse. - - Transaction Hash # noqa: E501 - - :param tx_hash: The tx_hash of this OrderResponse. # noqa: E501 - :type: str - """ - - self._tx_hash = tx_hash - - @property - def side(self): - """Gets the side of this OrderResponse. # noqa: E501 - - 买单或者卖单 - buy - sell # noqa: E501 - - :return: The side of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this OrderResponse. - - 买单或者卖单 - buy - sell # noqa: E501 - - :param side: The side of this OrderResponse. # noqa: E501 - :type: str - """ - - self._side = side - - @property - def usdt_amount(self): - """Gets the usdt_amount of this OrderResponse. # noqa: E501 - - Amount # noqa: E501 - - :return: The usdt_amount of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._usdt_amount - - @usdt_amount.setter - def usdt_amount(self, usdt_amount): - """Sets the usdt_amount of this OrderResponse. - - Amount # noqa: E501 - - :param usdt_amount: The usdt_amount of this OrderResponse. # noqa: E501 - :type: str - """ - - self._usdt_amount = usdt_amount - - @property - def currency(self): - """Gets the currency of this OrderResponse. # noqa: E501 - - 币 # noqa: E501 - - :return: The currency of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this OrderResponse. - - 币 # noqa: E501 - - :param currency: The currency of this OrderResponse. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def currency_amount(self): - """Gets the currency_amount of this OrderResponse. # noqa: E501 - - Currency amount # noqa: E501 - - :return: The currency_amount of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._currency_amount - - @currency_amount.setter - def currency_amount(self, currency_amount): - """Sets the currency_amount of this OrderResponse. - - Currency amount # noqa: E501 - - :param currency_amount: The currency_amount of this OrderResponse. # noqa: E501 - :type: str - """ - - self._currency_amount = currency_amount - - @property - def status(self): - """Gets the status of this OrderResponse. # noqa: E501 - - Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 - - :return: The status of this OrderResponse. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this OrderResponse. - - Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 - - :param status: The status of this OrderResponse. # noqa: E501 - :type: int - """ - - self._status = status - - @property - def gas_mode(self): - """Gets the gas_mode of this OrderResponse. # noqa: E501 - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :return: The gas_mode of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._gas_mode - - @gas_mode.setter - def gas_mode(self, gas_mode): - """Sets the gas_mode of this OrderResponse. - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :param gas_mode: The gas_mode of this OrderResponse. # noqa: E501 - :type: str - """ - - self._gas_mode = gas_mode - - @property - def chain(self): - """Gets the chain of this OrderResponse. # noqa: E501 - - 链 # noqa: E501 - - :return: The chain of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this OrderResponse. - - 链 # noqa: E501 - - :param chain: The chain of this OrderResponse. # noqa: E501 - :type: str - """ - - self._chain = chain - - @property - def gas_fee(self): - """Gets the gas_fee of this OrderResponse. # noqa: E501 - - Miner Fee (USDT-based) # noqa: E501 - - :return: The gas_fee of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._gas_fee - - @gas_fee.setter - def gas_fee(self, gas_fee): - """Sets the gas_fee of this OrderResponse. - - Miner Fee (USDT-based) # noqa: E501 - - :param gas_fee: The gas_fee of this OrderResponse. # noqa: E501 - :type: str - """ - - self._gas_fee = gas_fee - - @property - def transaction_fee(self): - """Gets the transaction_fee of this OrderResponse. # noqa: E501 - - Trading Fee (USDT-based) # noqa: E501 - - :return: The transaction_fee of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._transaction_fee - - @transaction_fee.setter - def transaction_fee(self, transaction_fee): - """Sets the transaction_fee of this OrderResponse. - - Trading Fee (USDT-based) # noqa: E501 - - :param transaction_fee: The transaction_fee of this OrderResponse. # noqa: E501 - :type: str - """ - - self._transaction_fee = transaction_fee - - @property - def failed_reason(self): - """Gets the failed_reason of this OrderResponse. # noqa: E501 - - Failure reason (if any) # noqa: E501 - - :return: The failed_reason of this OrderResponse. # noqa: E501 - :rtype: str - """ - return self._failed_reason - - @failed_reason.setter - def failed_reason(self, failed_reason): - """Sets the failed_reason of this OrderResponse. - - Failure reason (if any) # noqa: E501 - - :param failed_reason: The failed_reason of this OrderResponse. # noqa: E501 - :type: str - """ - - self._failed_reason = failed_reason - - @property - def create_time(self): - """Gets the create_time of this OrderResponse. # noqa: E501 - - 创建时间(时间戳) # noqa: E501 - - :return: The create_time of this OrderResponse. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this OrderResponse. - - 创建时间(时间戳) # noqa: E501 - - :param create_time: The create_time of this OrderResponse. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrderResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrderResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/place_order_request.py b/gate_api/models/place_order_request.py deleted file mode 100644 index cbba4c9..0000000 --- a/gate_api/models/place_order_request.py +++ /dev/null @@ -1,268 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PlaceOrderRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'side': 'str', - 'amount': 'str', - 'gas_mode': 'str', - 'slippage': 'str', - 'quote_id': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'side': 'side', - 'amount': 'amount', - 'gas_mode': 'gas_mode', - 'slippage': 'slippage', - 'quote_id': 'quote_id' - } - - def __init__(self, currency=None, side=None, amount=None, gas_mode=None, slippage=None, quote_id=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, Configuration) -> None - """PlaceOrderRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._side = None - self._amount = None - self._gas_mode = None - self._slippage = None - self._quote_id = None - self.discriminator = None - - self.currency = currency - self.side = side - self.amount = amount - self.gas_mode = gas_mode - if slippage is not None: - self.slippage = slippage - self.quote_id = quote_id - - @property - def currency(self): - """Gets the currency of this PlaceOrderRequest. # noqa: E501 - - Trading Symbol # noqa: E501 - - :return: The currency of this PlaceOrderRequest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this PlaceOrderRequest. - - Trading Symbol # noqa: E501 - - :param currency: The currency of this PlaceOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def side(self): - """Gets the side of this PlaceOrderRequest. # noqa: E501 - - 买单或者卖单 - buy - sell # noqa: E501 - - :return: The side of this PlaceOrderRequest. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this PlaceOrderRequest. - - 买单或者卖单 - buy - sell # noqa: E501 - - :param side: The side of this PlaceOrderRequest. # 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 PlaceOrderRequest. # noqa: E501 - - Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 - - :return: The amount of this PlaceOrderRequest. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this PlaceOrderRequest. - - Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 - - :param amount: The amount of this PlaceOrderRequest. # 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 gas_mode(self): - """Gets the gas_mode of this PlaceOrderRequest. # noqa: E501 - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :return: The gas_mode of this PlaceOrderRequest. # noqa: E501 - :rtype: str - """ - return self._gas_mode - - @gas_mode.setter - def gas_mode(self, gas_mode): - """Sets the gas_mode of this PlaceOrderRequest. - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :param gas_mode: The gas_mode of this PlaceOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and gas_mode is None: # noqa: E501 - raise ValueError("Invalid value for `gas_mode`, must not be `None`") # noqa: E501 - - self._gas_mode = gas_mode - - @property - def slippage(self): - """Gets the slippage of this PlaceOrderRequest. # noqa: E501 - - Slippage value of 10 represents a 10% tolerance # noqa: E501 - - :return: The slippage of this PlaceOrderRequest. # noqa: E501 - :rtype: str - """ - return self._slippage - - @slippage.setter - def slippage(self, slippage): - """Sets the slippage of this PlaceOrderRequest. - - Slippage value of 10 represents a 10% tolerance # noqa: E501 - - :param slippage: The slippage of this PlaceOrderRequest. # noqa: E501 - :type: str - """ - - self._slippage = slippage - - @property - def quote_id(self): - """Gets the quote_id of this PlaceOrderRequest. # noqa: E501 - - The quote_id returned by the quotation API # noqa: E501 - - :return: The quote_id of this PlaceOrderRequest. # noqa: E501 - :rtype: str - """ - return self._quote_id - - @quote_id.setter - def quote_id(self, quote_id): - """Sets the quote_id of this PlaceOrderRequest. - - The quote_id returned by the quotation API # noqa: E501 - - :param quote_id: The quote_id of this PlaceOrderRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and quote_id is None: # noqa: E501 - raise ValueError("Invalid value for `quote_id`, must not be `None`") # noqa: E501 - - self._quote_id = quote_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, PlaceOrderRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PlaceOrderRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/place_order_response.py b/gate_api/models/place_order_response.py deleted file mode 100644 index ce20301..0000000 --- a/gate_api/models/place_order_response.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class PlaceOrderResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'status': 'int', - 'side': 'str', - 'gas_mode': 'str', - 'create_time': 'int', - 'amount': 'str', - 'token_address': 'str', - 'chain': 'str' - } - - attribute_map = { - 'order_id': 'order_id', - 'status': 'status', - 'side': 'side', - 'gas_mode': 'gas_mode', - 'create_time': 'create_time', - 'amount': 'amount', - 'token_address': 'token_address', - 'chain': 'chain' - } - - def __init__(self, order_id=None, status=None, side=None, gas_mode=None, create_time=None, amount=None, token_address=None, chain=None, local_vars_configuration=None): # noqa: E501 - # type: (str, int, str, str, int, str, str, str, Configuration) -> None - """PlaceOrderResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._status = None - self._side = None - self._gas_mode = None - self._create_time = None - self._amount = None - self._token_address = None - self._chain = None - self.discriminator = None - - if order_id is not None: - self.order_id = order_id - if status is not None: - self.status = status - if side is not None: - self.side = side - if gas_mode is not None: - self.gas_mode = gas_mode - if create_time is not None: - self.create_time = create_time - if amount is not None: - self.amount = amount - if token_address is not None: - self.token_address = token_address - if chain is not None: - self.chain = chain - - @property - def order_id(self): - """Gets the order_id of this PlaceOrderResponse. # noqa: E501 - - Order ID # noqa: E501 - - :return: The order_id of this PlaceOrderResponse. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this PlaceOrderResponse. - - Order ID # noqa: E501 - - :param order_id: The order_id of this PlaceOrderResponse. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def status(self): - """Gets the status of this PlaceOrderResponse. # noqa: E501 - - Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 - - :return: The status of this PlaceOrderResponse. # noqa: E501 - :rtype: int - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this PlaceOrderResponse. - - Order Status - `0` : All - `1` : Processing - `2` : Successful - `3` : Failed - `4` : Canceled - `5` : Buy order placed but transfer not completed - `6` : Cancelled order with transfer not complete # noqa: E501 - - :param status: The status of this PlaceOrderResponse. # noqa: E501 - :type: int - """ - - self._status = status - - @property - def side(self): - """Gets the side of this PlaceOrderResponse. # noqa: E501 - - 买单或者卖单 - buy - sell # noqa: E501 - - :return: The side of this PlaceOrderResponse. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this PlaceOrderResponse. - - 买单或者卖单 - buy - sell # noqa: E501 - - :param side: The side of this PlaceOrderResponse. # noqa: E501 - :type: str - """ - - self._side = side - - @property - def gas_mode(self): - """Gets the gas_mode of this PlaceOrderResponse. # noqa: E501 - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :return: The gas_mode of this PlaceOrderResponse. # noqa: E501 - :rtype: str - """ - return self._gas_mode - - @gas_mode.setter - def gas_mode(self, gas_mode): - """Sets the gas_mode of this PlaceOrderResponse. - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :param gas_mode: The gas_mode of this PlaceOrderResponse. # noqa: E501 - :type: str - """ - - self._gas_mode = gas_mode - - @property - def create_time(self): - """Gets the create_time of this PlaceOrderResponse. # noqa: E501 - - 创建时间 (时间戳) # noqa: E501 - - :return: The create_time of this PlaceOrderResponse. # noqa: E501 - :rtype: int - """ - return self._create_time - - @create_time.setter - def create_time(self, create_time): - """Sets the create_time of this PlaceOrderResponse. - - 创建时间 (时间戳) # noqa: E501 - - :param create_time: The create_time of this PlaceOrderResponse. # noqa: E501 - :type: int - """ - - self._create_time = create_time - - @property - def amount(self): - """Gets the amount of this PlaceOrderResponse. # noqa: E501 - - Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 - - :return: The amount of this PlaceOrderResponse. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this PlaceOrderResponse. - - Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 - - :param amount: The amount of this PlaceOrderResponse. # noqa: E501 - :type: str - """ - - self._amount = amount - - @property - def token_address(self): - """Gets the token_address of this PlaceOrderResponse. # noqa: E501 - - 币地址 # noqa: E501 - - :return: The token_address of this PlaceOrderResponse. # noqa: E501 - :rtype: str - """ - return self._token_address - - @token_address.setter - def token_address(self, token_address): - """Sets the token_address of this PlaceOrderResponse. - - 币地址 # noqa: E501 - - :param token_address: The token_address of this PlaceOrderResponse. # noqa: E501 - :type: str - """ - - self._token_address = token_address - - @property - def chain(self): - """Gets the chain of this PlaceOrderResponse. # noqa: E501 - - Chain name # noqa: E501 - - :return: The chain of this PlaceOrderResponse. # noqa: E501 - :rtype: str - """ - return self._chain - - @chain.setter - def chain(self, chain): - """Sets the chain of this PlaceOrderResponse. - - Chain name # noqa: E501 - - :param chain: The chain of this PlaceOrderResponse. # noqa: E501 - :type: str - """ - - self._chain = chain - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PlaceOrderResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PlaceOrderResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/quote_request.py b/gate_api/models/quote_request.py deleted file mode 100644 index 7a28af0..0000000 --- a/gate_api/models/quote_request.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class QuoteRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'currency': 'str', - 'side': 'str', - 'amount': 'str', - 'gas_mode': 'str', - 'slippage': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'side': 'side', - 'amount': 'amount', - 'gas_mode': 'gas_mode', - 'slippage': 'slippage' - } - - def __init__(self, currency=None, side=None, amount=None, gas_mode=None, slippage=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """QuoteRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._currency = None - self._side = None - self._amount = None - self._gas_mode = None - self._slippage = None - self.discriminator = None - - self.currency = currency - self.side = side - self.amount = amount - self.gas_mode = gas_mode - if slippage is not None: - self.slippage = slippage - - @property - def currency(self): - """Gets the currency of this QuoteRequest. # noqa: E501 - - Trading Symbol # noqa: E501 - - :return: The currency of this QuoteRequest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this QuoteRequest. - - Trading Symbol # noqa: E501 - - :param currency: The currency of this QuoteRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def side(self): - """Gets the side of this QuoteRequest. # noqa: E501 - - 买单或者卖单 - buy - sell # noqa: E501 - - :return: The side of this QuoteRequest. # noqa: E501 - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this QuoteRequest. - - 买单或者卖单 - buy - sell # noqa: E501 - - :param side: The side of this QuoteRequest. # 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 QuoteRequest. # noqa: E501 - - Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 - - :return: The amount of this QuoteRequest. # noqa: E501 - :rtype: str - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this QuoteRequest. - - Trade Quantity - `side` : `buy` refers to the quote currency, i.e., `USDT` - `side` : `sell` refers to the base currency # noqa: E501 - - :param amount: The amount of this QuoteRequest. # 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 gas_mode(self): - """Gets the gas_mode of this QuoteRequest. # noqa: E501 - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :return: The gas_mode of this QuoteRequest. # noqa: E501 - :rtype: str - """ - return self._gas_mode - - @gas_mode.setter - def gas_mode(self, gas_mode): - """Sets the gas_mode of this QuoteRequest. - - Trading mode affects slippage selection - `speed` : Smart mode - `custom` : Custom mode, uses `slippage` parameter # noqa: E501 - - :param gas_mode: The gas_mode of this QuoteRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and gas_mode is None: # noqa: E501 - raise ValueError("Invalid value for `gas_mode`, must not be `None`") # noqa: E501 - - self._gas_mode = gas_mode - - @property - def slippage(self): - """Gets the slippage of this QuoteRequest. # noqa: E501 - - Slippage value of 10 represents a 10% tolerance # noqa: E501 - - :return: The slippage of this QuoteRequest. # noqa: E501 - :rtype: str - """ - return self._slippage - - @slippage.setter - def slippage(self, slippage): - """Sets the slippage of this QuoteRequest. - - Slippage value of 10 represents a 10% tolerance # noqa: E501 - - :param slippage: The slippage of this QuoteRequest. # noqa: E501 - :type: str - """ - - self._slippage = slippage - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, QuoteRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, QuoteRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/quote_response.py b/gate_api/models/quote_response.py deleted file mode 100644 index 8c5488c..0000000 --- a/gate_api/models/quote_response.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class QuoteResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'quote_id': 'str', - 'min_amount': 'str', - 'max_amount': 'str', - 'price': 'str', - 'slippage': 'str', - 'estimate_gas_fee_amount_usdt': 'str', - 'order_fee': 'str', - 'target_token_min_amount': 'str', - 'target_token_max_amount': 'str', - 'error_type': 'int' - } - - attribute_map = { - 'quote_id': 'quote_id', - 'min_amount': 'min_amount', - 'max_amount': 'max_amount', - 'price': 'price', - 'slippage': 'slippage', - 'estimate_gas_fee_amount_usdt': 'estimate_gas_fee_amount_usdt', - 'order_fee': 'order_fee', - 'target_token_min_amount': 'target_token_min_amount', - 'target_token_max_amount': 'target_token_max_amount', - 'error_type': 'error_type' - } - - def __init__(self, quote_id=None, min_amount=None, max_amount=None, price=None, slippage=None, estimate_gas_fee_amount_usdt=None, order_fee=None, target_token_min_amount=None, target_token_max_amount=None, error_type=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, int, Configuration) -> None - """QuoteResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._quote_id = None - self._min_amount = None - self._max_amount = None - self._price = None - self._slippage = None - self._estimate_gas_fee_amount_usdt = None - self._order_fee = None - self._target_token_min_amount = None - self._target_token_max_amount = None - self._error_type = None - self.discriminator = None - - if quote_id is not None: - self.quote_id = quote_id - if min_amount is not None: - self.min_amount = min_amount - if max_amount is not None: - self.max_amount = max_amount - if price is not None: - self.price = price - if slippage is not None: - self.slippage = slippage - if estimate_gas_fee_amount_usdt is not None: - self.estimate_gas_fee_amount_usdt = estimate_gas_fee_amount_usdt - if order_fee is not None: - self.order_fee = order_fee - if target_token_min_amount is not None: - self.target_token_min_amount = target_token_min_amount - if target_token_max_amount is not None: - self.target_token_max_amount = target_token_max_amount - if error_type is not None: - self.error_type = error_type - - @property - def quote_id(self): - """Gets the quote_id of this QuoteResponse. # noqa: E501 - - The quotation ID (quote_id) is used for placing orders and is valid for 1 minute # noqa: E501 - - :return: The quote_id of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._quote_id - - @quote_id.setter - def quote_id(self, quote_id): - """Sets the quote_id of this QuoteResponse. - - The quotation ID (quote_id) is used for placing orders and is valid for 1 minute # noqa: E501 - - :param quote_id: The quote_id of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._quote_id = quote_id - - @property - def min_amount(self): - """Gets the min_amount of this QuoteResponse. # noqa: E501 - - 最小下单量 # noqa: E501 - - :return: The min_amount of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._min_amount - - @min_amount.setter - def min_amount(self, min_amount): - """Sets the min_amount of this QuoteResponse. - - 最小下单量 # noqa: E501 - - :param min_amount: The min_amount of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._min_amount = min_amount - - @property - def max_amount(self): - """Gets the max_amount of this QuoteResponse. # noqa: E501 - - 最大下单量 # noqa: E501 - - :return: The max_amount of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._max_amount - - @max_amount.setter - def max_amount(self, max_amount): - """Sets the max_amount of this QuoteResponse. - - 最大下单量 # noqa: E501 - - :param max_amount: The max_amount of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._max_amount = max_amount - - @property - def price(self): - """Gets the price of this QuoteResponse. # noqa: E501 - - Coin Price (USDT-based) # noqa: E501 - - :return: The price of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._price - - @price.setter - def price(self, price): - """Sets the price of this QuoteResponse. - - Coin Price (USDT-based) # noqa: E501 - - :param price: The price of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._price = price - - @property - def slippage(self): - """Gets the slippage of this QuoteResponse. # noqa: E501 - - Slippage # noqa: E501 - - :return: The slippage of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._slippage - - @slippage.setter - def slippage(self, slippage): - """Sets the slippage of this QuoteResponse. - - Slippage # noqa: E501 - - :param slippage: The slippage of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._slippage = slippage - - @property - def estimate_gas_fee_amount_usdt(self): - """Gets the estimate_gas_fee_amount_usdt of this QuoteResponse. # noqa: E501 - - Estimated Network Fee (USDT-based) # noqa: E501 - - :return: The estimate_gas_fee_amount_usdt of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._estimate_gas_fee_amount_usdt - - @estimate_gas_fee_amount_usdt.setter - def estimate_gas_fee_amount_usdt(self, estimate_gas_fee_amount_usdt): - """Sets the estimate_gas_fee_amount_usdt of this QuoteResponse. - - Estimated Network Fee (USDT-based) # noqa: E501 - - :param estimate_gas_fee_amount_usdt: The estimate_gas_fee_amount_usdt of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._estimate_gas_fee_amount_usdt = estimate_gas_fee_amount_usdt - - @property - def order_fee(self): - """Gets the order_fee of this QuoteResponse. # noqa: E501 - - Slippage value of 10 represents a 10% tolerance # noqa: E501 - - :return: The order_fee of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._order_fee - - @order_fee.setter - def order_fee(self, order_fee): - """Sets the order_fee of this QuoteResponse. - - Slippage value of 10 represents a 10% tolerance # noqa: E501 - - :param order_fee: The order_fee of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._order_fee = order_fee - - @property - def target_token_min_amount(self): - """Gets the target_token_min_amount of this QuoteResponse. # noqa: E501 - - 最小获得数量 # noqa: E501 - - :return: The target_token_min_amount of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._target_token_min_amount - - @target_token_min_amount.setter - def target_token_min_amount(self, target_token_min_amount): - """Sets the target_token_min_amount of this QuoteResponse. - - 最小获得数量 # noqa: E501 - - :param target_token_min_amount: The target_token_min_amount of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._target_token_min_amount = target_token_min_amount - - @property - def target_token_max_amount(self): - """Gets the target_token_max_amount of this QuoteResponse. # noqa: E501 - - 最大获得数量 # noqa: E501 - - :return: The target_token_max_amount of this QuoteResponse. # noqa: E501 - :rtype: str - """ - return self._target_token_max_amount - - @target_token_max_amount.setter - def target_token_max_amount(self, target_token_max_amount): - """Sets the target_token_max_amount of this QuoteResponse. - - 最大获得数量 # noqa: E501 - - :param target_token_max_amount: The target_token_max_amount of this QuoteResponse. # noqa: E501 - :type: str - """ - - self._target_token_max_amount = target_token_max_amount - - @property - def error_type(self): - """Gets the error_type of this QuoteResponse. # noqa: E501 - - Failure Type - `0` : Success - `1` : Exceeds maximum value - `2` : Below minimum value # noqa: E501 - - :return: The error_type of this QuoteResponse. # noqa: E501 - :rtype: int - """ - return self._error_type - - @error_type.setter - def error_type(self, error_type): - """Sets the error_type of this QuoteResponse. - - Failure Type - `0` : Success - `1` : Exceeds maximum value - `2` : Below minimum value # noqa: E501 - - :param error_type: The error_type of this QuoteResponse. # noqa: E501 - :type: int - """ - - self._error_type = error_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, QuoteResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, QuoteResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py index 556ca16..b2349d5 100644 --- a/gate_api/models/spot_account.py +++ b/gate_api/models/spot_account.py @@ -36,20 +36,18 @@ class SpotAccount(object): 'currency': 'str', 'available': 'str', 'locked': 'str', - 'update_id': 'int', - 'refresh_time': 'int' + 'update_id': 'int' } attribute_map = { 'currency': 'currency', 'available': 'available', 'locked': 'locked', - 'update_id': 'update_id', - 'refresh_time': 'refresh_time' + 'update_id': 'update_id' } - def __init__(self, currency=None, available=None, locked=None, update_id=None, refresh_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, int, int, Configuration) -> None + 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() @@ -59,7 +57,6 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, r self._available = None self._locked = None self._update_id = None - self._refresh_time = None self.discriminator = None if currency is not None: @@ -70,8 +67,6 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, r self.locked = locked if update_id is not None: self.update_id = update_id - if refresh_time is not None: - self.refresh_time = refresh_time @property def currency(self): @@ -165,29 +160,6 @@ def update_id(self, update_id): self._update_id = update_id - @property - def refresh_time(self): - """Gets the refresh_time of this SpotAccount. # noqa: E501 - - Asset Refresh Time (ms) # noqa: E501 - - :return: The refresh_time of this SpotAccount. # noqa: E501 - :rtype: int - """ - return self._refresh_time - - @refresh_time.setter - def refresh_time(self, refresh_time): - """Sets the refresh_time of this SpotAccount. - - Asset Refresh Time (ms) # noqa: E501 - - :param refresh_time: The refresh_time of this SpotAccount. # noqa: E501 - :type: int - """ - - self._refresh_time = refresh_time - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/ticker2.py b/gate_api/models/ticker2.py deleted file mode 100644 index bbcbcb8..0000000 --- a/gate_api/models/ticker2.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Gate API v4 - - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 - - Contact: support@mail.gate.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from gate_api.configuration import Configuration - - -class Ticker2(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - 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', - 'last': 'str', - 'change': 'str', - 'volume': 'str', - 'market_cap': 'str' - } - - attribute_map = { - 'currency': 'currency', - 'last': 'last', - 'change': 'change', - 'volume': 'volume', - 'market_cap': 'market_cap' - } - - def __init__(self, currency=None, last=None, change=None, volume=None, market_cap=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, Configuration) -> None - """Ticker2 - a 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._last = None - self._change = None - self._volume = None - self._market_cap = None - self.discriminator = None - - if currency is not None: - self.currency = currency - if last is not None: - self.last = last - if change is not None: - self.change = change - if volume is not None: - self.volume = volume - if market_cap is not None: - self.market_cap = market_cap - - @property - def currency(self): - """Gets the currency of this Ticker2. # noqa: E501 - - Currency symbol # noqa: E501 - - :return: The currency of this Ticker2. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this Ticker2. - - Currency symbol # noqa: E501 - - :param currency: The currency of this Ticker2. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def last(self): - """Gets the last of this Ticker2. # noqa: E501 - - Last trading price # noqa: E501 - - :return: The last of this Ticker2. # noqa: E501 - :rtype: str - """ - return self._last - - @last.setter - def last(self, last): - """Sets the last of this Ticker2. - - Last trading price # noqa: E501 - - :param last: The last of this Ticker2. # noqa: E501 - :type: str - """ - - self._last = last - - @property - def change(self): - """Gets the change of this Ticker2. # noqa: E501 - - Change percentage in the last 24h # noqa: E501 - - :return: The change of this Ticker2. # noqa: E501 - :rtype: str - """ - return self._change - - @change.setter - def change(self, change): - """Sets the change of this Ticker2. - - Change percentage in the last 24h # noqa: E501 - - :param change: The change of this Ticker2. # noqa: E501 - :type: str - """ - - self._change = change - - @property - def volume(self): - """Gets the volume of this Ticker2. # noqa: E501 - - 24h Trading Volume (USDT) # noqa: E501 - - :return: The volume of this Ticker2. # noqa: E501 - :rtype: str - """ - return self._volume - - @volume.setter - def volume(self, volume): - """Sets the volume of this Ticker2. - - 24h Trading Volume (USDT) # noqa: E501 - - :param volume: The volume of this Ticker2. # noqa: E501 - :type: str - """ - - self._volume = volume - - @property - def market_cap(self): - """Gets the market_cap of this Ticker2. # noqa: E501 - - Current Coin Market Value # noqa: E501 - - :return: The market_cap of this Ticker2. # noqa: E501 - :rtype: str - """ - return self._market_cap - - @market_cap.setter - def market_cap(self, market_cap): - """Sets the market_cap of this Ticker2. - - Current Coin Market Value # noqa: E501 - - :param market_cap: The market_cap of this Ticker2. # noqa: E501 - :type: str - """ - - self._market_cap = market_cap - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Ticker2): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Ticker2): - return True - - return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index 08ec274..a374844 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -51,7 +51,8 @@ class UnifiedAccount(object): 'leverage': 'str', 'spot_order_loss': 'str', 'spot_hedge': 'bool', - 'use_funding': 'bool' + 'use_funding': 'bool', + 'is_all_collateral': 'bool' } attribute_map = { @@ -73,11 +74,12 @@ class UnifiedAccount(object): 'leverage': 'leverage', 'spot_order_loss': 'spot_order_loss', 'spot_hedge': 'spot_hedge', - 'use_funding': 'use_funding' + 'use_funding': 'use_funding', + 'is_all_collateral': 'is_all_collateral' } - def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, unified_account_total=None, unified_account_total_liab=None, unified_account_total_equity=None, leverage=None, spot_order_loss=None, spot_hedge=None, use_funding=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, bool, dict(str, UnifiedBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, bool, bool, Configuration) -> None + def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, total=None, borrowed=None, total_initial_margin=None, total_margin_balance=None, total_maintenance_margin=None, total_initial_margin_rate=None, total_maintenance_margin_rate=None, total_available_margin=None, unified_account_total=None, unified_account_total_liab=None, unified_account_total_equity=None, leverage=None, spot_order_loss=None, spot_hedge=None, use_funding=None, is_all_collateral=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, bool, dict(str, UnifiedBalance), str, str, str, str, str, str, str, str, str, str, str, str, str, bool, bool, bool, Configuration) -> None """UnifiedAccount - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -102,6 +104,7 @@ def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, self._spot_order_loss = None self._spot_hedge = None self._use_funding = None + self._is_all_collateral = None self.discriminator = None if user_id is not None: @@ -142,6 +145,8 @@ def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, self.spot_hedge = spot_hedge if use_funding is not None: self.use_funding = use_funding + if is_all_collateral is not None: + self.is_all_collateral = is_all_collateral @property def user_id(self): @@ -578,6 +583,29 @@ def use_funding(self, use_funding): self._use_funding = use_funding + @property + def is_all_collateral(self): + """Gets the is_all_collateral of this UnifiedAccount. # noqa: E501 + + 是否所有币种均作为保证金,true - 所有币种作为保证金,false - 否 # noqa: E501 + + :return: The is_all_collateral of this UnifiedAccount. # noqa: E501 + :rtype: bool + """ + return self._is_all_collateral + + @is_all_collateral.setter + def is_all_collateral(self, is_all_collateral): + """Sets the is_all_collateral of this UnifiedAccount. + + 是否所有币种均作为保证金,true - 所有币种作为保证金,false - 否 # noqa: E501 + + :param is_all_collateral: The is_all_collateral of this UnifiedAccount. # noqa: E501 + :type: bool + """ + + self._is_all_collateral = is_all_collateral + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index 3c03631..394940d 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -51,7 +51,8 @@ class UnifiedBalance(object): 'imr': 'str', 'mmr': 'str', 'margin_balance': 'str', - 'available_margin': 'str' + 'available_margin': 'str', + 'enabled_collateral': 'bool' } attribute_map = { @@ -73,11 +74,12 @@ class UnifiedBalance(object): 'imr': 'imr', 'mmr': 'mmr', 'margin_balance': 'margin_balance', - 'available_margin': 'available_margin' + 'available_margin': 'available_margin', + 'enabled_collateral': 'enabled_collateral' } - def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, spot_in_use=None, funding=None, funding_version=None, cross_balance=None, iso_balance=None, im=None, mm=None, imr=None, mmr=None, margin_balance=None, available_margin=None, 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, Configuration) -> None + def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=None, futures_pos_liab=None, equity=None, total_freeze=None, total_liab=None, spot_in_use=None, funding=None, funding_version=None, cross_balance=None, iso_balance=None, im=None, mm=None, imr=None, mmr=None, margin_balance=None, available_margin=None, enabled_collateral=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, bool, Configuration) -> None """UnifiedBalance - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -102,6 +104,7 @@ def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=Non self._mmr = None self._margin_balance = None self._available_margin = None + self._enabled_collateral = None self.discriminator = None if available is not None: @@ -142,6 +145,8 @@ def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=Non self.margin_balance = margin_balance if available_margin is not None: self.available_margin = available_margin + if enabled_collateral is not None: + self.enabled_collateral = enabled_collateral @property def available(self): @@ -580,6 +585,29 @@ def available_margin(self, available_margin): self._available_margin = available_margin + @property + def enabled_collateral(self): + """Gets the enabled_collateral of this UnifiedBalance. # noqa: E501 + + 币种开启作为保证金,true - 启用,false - 未启用 # noqa: E501 + + :return: The enabled_collateral of this UnifiedBalance. # noqa: E501 + :rtype: bool + """ + return self._enabled_collateral + + @enabled_collateral.setter + def enabled_collateral(self, enabled_collateral): + """Sets the enabled_collateral of this UnifiedBalance. + + 币种开启作为保证金,true - 启用,false - 未启用 # noqa: E501 + + :param enabled_collateral: The enabled_collateral of this UnifiedBalance. # noqa: E501 + :type: bool + """ + + self._enabled_collateral = enabled_collateral + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/unified_collateral_req.py b/gate_api/models/unified_collateral_req.py new file mode 100644 index 0000000..5187e26 --- /dev/null +++ b/gate_api/models/unified_collateral_req.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedCollateralReq(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'collateral_type': 'int', + 'enable_list': 'list[str]', + 'disable_list': 'list[str]' + } + + attribute_map = { + 'collateral_type': 'collateral_type', + 'enable_list': 'enable_list', + 'disable_list': 'disable_list' + } + + def __init__(self, collateral_type=None, enable_list=None, disable_list=None, local_vars_configuration=None): # noqa: E501 + # type: (int, list[str], list[str], Configuration) -> None + """UnifiedCollateralReq - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._collateral_type = None + self._enable_list = None + self._disable_list = None + self.discriminator = None + + if collateral_type is not None: + self.collateral_type = collateral_type + if enable_list is not None: + self.enable_list = enable_list + if disable_list is not None: + self.disable_list = disable_list + + @property + def collateral_type(self): + """Gets the collateral_type of this UnifiedCollateralReq. # noqa: E501 + + 用户设置抵押物模式 0(all)-全部币种作为抵押物,1(custom)-自定义币种作为抵押物,collateral_type为0(all)时,enable_list与disable_list参数无效 # noqa: E501 + + :return: The collateral_type of this UnifiedCollateralReq. # noqa: E501 + :rtype: int + """ + return self._collateral_type + + @collateral_type.setter + def collateral_type(self, collateral_type): + """Sets the collateral_type of this UnifiedCollateralReq. + + 用户设置抵押物模式 0(all)-全部币种作为抵押物,1(custom)-自定义币种作为抵押物,collateral_type为0(all)时,enable_list与disable_list参数无效 # noqa: E501 + + :param collateral_type: The collateral_type of this UnifiedCollateralReq. # noqa: E501 + :type: int + """ + allowed_values = [0, 1] # noqa: E501 + if self.local_vars_configuration.client_side_validation and collateral_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `collateral_type` ({0}), must be one of {1}" # noqa: E501 + .format(collateral_type, allowed_values) + ) + + self._collateral_type = collateral_type + + @property + def enable_list(self): + """Gets the enable_list of this UnifiedCollateralReq. # noqa: E501 + + 币种列表,collateral_type=1(custom)表示追加的逻辑 # noqa: E501 + + :return: The enable_list of this UnifiedCollateralReq. # noqa: E501 + :rtype: list[str] + """ + return self._enable_list + + @enable_list.setter + def enable_list(self, enable_list): + """Sets the enable_list of this UnifiedCollateralReq. + + 币种列表,collateral_type=1(custom)表示追加的逻辑 # noqa: E501 + + :param enable_list: The enable_list of this UnifiedCollateralReq. # noqa: E501 + :type: list[str] + """ + + self._enable_list = enable_list + + @property + def disable_list(self): + """Gets the disable_list of this UnifiedCollateralReq. # noqa: E501 + + 取消列表,表示取消的逻辑 # noqa: E501 + + :return: The disable_list of this UnifiedCollateralReq. # noqa: E501 + :rtype: list[str] + """ + return self._disable_list + + @disable_list.setter + def disable_list(self, disable_list): + """Sets the disable_list of this UnifiedCollateralReq. + + 取消列表,表示取消的逻辑 # noqa: E501 + + :param disable_list: The disable_list of this UnifiedCollateralReq. # noqa: E501 + :type: list[str] + """ + + self._disable_list = disable_list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedCollateralReq): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedCollateralReq): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/unified_collateral_res.py b/gate_api/models/unified_collateral_res.py new file mode 100644 index 0000000..2f1da47 --- /dev/null +++ b/gate_api/models/unified_collateral_res.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gate API v4 + + Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class UnifiedCollateralRes(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'is_success': 'bool' + } + + attribute_map = { + 'is_success': 'is_success' + } + + def __init__(self, is_success=None, local_vars_configuration=None): # noqa: E501 + # type: (bool, Configuration) -> None + """UnifiedCollateralRes - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._is_success = None + self.discriminator = None + + if is_success is not None: + self.is_success = is_success + + @property + def is_success(self): + """Gets the is_success of this UnifiedCollateralRes. # noqa: E501 + + 是否设置成功 # noqa: E501 + + :return: The is_success of this UnifiedCollateralRes. # noqa: E501 + :rtype: bool + """ + return self._is_success + + @is_success.setter + def is_success(self, is_success): + """Sets the is_success of this UnifiedCollateralRes. + + 是否设置成功 # noqa: E501 + + :param is_success: The is_success of this UnifiedCollateralRes. # noqa: E501 + :type: bool + """ + + self._is_success = is_success + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnifiedCollateralRes): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnifiedCollateralRes): + return True + + return self.to_dict() != other.to_dict() diff --git a/setup.py b/setup.py index 878937d..2f1a758 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.100.0" +VERSION = "6.100.1" # To install the library, run the following # # python setup.py install From 78e4a5b6e88958ccfdf141ab3b32ff56670a654f Mon Sep 17 00:00:00 2001 From: gateio Date: Wed, 2 Jul 2025 10:38:43 +0000 Subject: [PATCH 10/20] update to v6.100.1 --- docs/EarnUniApi.md | 8 ++++---- gate_api/api/earn_uni_api.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index 84528cf..fcaaf3a 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 588a676..25dc23d 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:25+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) From 3c8e04920f16818e7d9e87e3501b013a43ff560b Mon Sep 17 00:00:00 2001 From: gateio Date: Wed, 2 Jul 2025 10:50:39 +0000 Subject: [PATCH 11/20] update to v6.100.2 --- README.md | 4 ++-- docs/EarnUniApi.md | 8 ++++---- gate_api/__init__.py | 2 +- gate_api/api/earn_uni_api.py | 8 ++++---- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 ++-- setup.py | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4c47f1a..15a91e1 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.100.1 -- Package version: 6.100.1 +- API version: 4.100.2 +- Package version: 6.100.2 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index fcaaf3a..6fd6b58 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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/gate_api/__init__.py b/gate_api/__init__.py index 90536ea..9eccbc0 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.100.1" +__version__ = "6.100.2" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 25dc23d..e181c0a 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:38+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 535b068..d434883 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/6.100.1/python' + self.user_agent = 'OpenAPI-Generator/6.100.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index ad6e738..854053f 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: 4.100.1\n"\ - "SDK Package Version: 6.100.1".\ + "Version of the API: 4.100.2\n"\ + "SDK Package Version: 6.100.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/setup.py b/setup.py index 2f1a758..b89c1da 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.100.1" +VERSION = "6.100.2" # To install the library, run the following # # python setup.py install From dd045c85eb47a26e81d63e30869b8e21538a5b30 Mon Sep 17 00:00:00 2001 From: gateio Date: Tue, 15 Jul 2025 06:10:48 +0000 Subject: [PATCH 12/20] update to v2.102.0 --- README.md | 20 +- docs/AccountApi.md | 2 +- docs/AccountDetail.md | 2 +- docs/BatchAmendItem.md | 4 +- docs/BatchOrder.md | 4 +- docs/CollateralLoanApi.md | 4 +- docs/Contract.md | 4 +- docs/CountdownCancelAllFuturesTask.md | 2 +- docs/CountdownCancelAllOptionsTask.md | 2 +- docs/CountdownCancelAllSpotTask.md | 2 +- docs/CurrencyPair.md | 1 + docs/DeliveryApi.md | 38 +- docs/DeliveryContract.md | 2 +- docs/EarnApi.md | 31 +- docs/EarnUniApi.md | 26 +- docs/FlashSwapOrderPreview.md | 4 +- docs/FlashSwapOrderRequest.md | 4 +- docs/FuturesAccount.md | 1 + docs/FuturesAccountBook.md | 2 +- docs/FuturesApi.md | 153 +++++--- docs/FuturesLimitRiskTiers.md | 1 + docs/FuturesRiskLimitTier.md | 16 + docs/MarginUniApi.md | 8 +- docs/MultiCollateralLoanApi.md | 22 +- docs/OptionsApi.md | 70 ++-- docs/Order.md | 4 +- docs/OrderCancel.md | 4 +- docs/OrderPatch.md | 4 +- docs/Position.md | 2 + docs/SpotApi.md | 20 +- docs/SpotPricePutOrder.md | 2 +- docs/SpotPriceTrigger.md | 2 +- docs/SubAccountToSubAccount.md | 2 +- docs/SubAccountTransfer.md | 2 +- docs/SubAccountTransferRecordItem.md | 2 +- docs/SwapCoinStruct.md | 18 + docs/Trade.md | 2 +- docs/UniCurrencyInterest.md | 2 +- docs/UniInterestRecord.md | 2 +- docs/UniLend.md | 2 +- docs/UnifiedAccount.md | 2 +- docs/UnifiedApi.md | 10 +- docs/UnifiedBalance.md | 2 +- docs/UnifiedCollateralReq.md | 6 +- docs/UnifiedCollateralRes.md | 4 +- docs/UnifiedLoanRecord.md | 2 +- docs/WalletApi.md | 2 +- docs/WithdrawalRecord.md | 2 +- gate_api/__init__.py | 8 +- gate_api/api/account_api.py | 8 +- gate_api/api/collateral_loan_api.py | 8 +- gate_api/api/delivery_api.py | 40 +- gate_api/api/earn_api.py | 34 +- gate_api/api/earn_uni_api.py | 32 +- gate_api/api/flash_swap_api.py | 4 +- gate_api/api/futures_api.py | 227 +++++++++--- gate_api/api/margin_api.py | 4 +- gate_api/api/margin_uni_api.py | 12 +- gate_api/api/multi_collateral_loan_api.py | 28 +- gate_api/api/options_api.py | 72 ++-- gate_api/api/rebate_api.py | 4 +- gate_api/api/spot_api.py | 32 +- gate_api/api/sub_account_api.py | 4 +- gate_api/api/unified_api.py | 12 +- gate_api/api/wallet_api.py | 8 +- gate_api/api/withdrawal_api.py | 4 +- gate_api/api_client.py | 6 +- gate_api/configuration.py | 8 +- gate_api/exceptions.py | 4 +- gate_api/models/__init__.py | 6 +- gate_api/models/account_balance.py | 4 +- gate_api/models/account_detail.py | 8 +- gate_api/models/account_detail_key.py | 4 +- gate_api/models/account_rate_limit.py | 4 +- gate_api/models/agency_commission.py | 4 +- gate_api/models/agency_commission_history.py | 4 +- gate_api/models/agency_transaction.py | 4 +- gate_api/models/agency_transaction_history.py | 4 +- gate_api/models/auto_repay_setting.py | 4 +- gate_api/models/batch_amend_item.py | 12 +- gate_api/models/batch_amend_order_req.py | 4 +- gate_api/models/batch_futures_order.py | 4 +- gate_api/models/batch_order.py | 12 +- gate_api/models/borrow_currency_info.py | 4 +- gate_api/models/broker_commission.py | 4 +- gate_api/models/broker_commission1.py | 4 +- .../broker_commission_sub_broker_info.py | 4 +- gate_api/models/broker_transaction.py | 4 +- gate_api/models/broker_transaction1.py | 4 +- gate_api/models/cancel_batch_order.py | 4 +- gate_api/models/cancel_order_result.py | 4 +- gate_api/models/collateral_adjust.py | 4 +- gate_api/models/collateral_adjust_res.py | 4 +- gate_api/models/collateral_align.py | 4 +- gate_api/models/collateral_currency.py | 4 +- gate_api/models/collateral_currency_info.py | 4 +- gate_api/models/collateral_currency_res.py | 4 +- gate_api/models/collateral_current_rate.py | 4 +- gate_api/models/collateral_fix_rate.py | 4 +- gate_api/models/collateral_loan_currency.py | 4 +- gate_api/models/collateral_ltv.py | 4 +- gate_api/models/collateral_order.py | 4 +- gate_api/models/collateral_record.py | 4 +- gate_api/models/contract.py | 12 +- gate_api/models/contract_stat.py | 4 +- gate_api/models/convert_small_balance.py | 4 +- .../countdown_cancel_all_futures_task.py | 8 +- .../countdown_cancel_all_options_task.py | 8 +- .../models/countdown_cancel_all_spot_task.py | 8 +- gate_api/models/create_collateral_order.py | 4 +- .../models/create_multi_collateral_order.py | 4 +- gate_api/models/create_uni_lend.py | 4 +- gate_api/models/create_uni_loan.py | 4 +- gate_api/models/cross_margin_balance.py | 4 +- gate_api/models/cross_margin_loan.py | 4 +- gate_api/models/cross_margin_repayment.py | 4 +- gate_api/models/currency.py | 4 +- gate_api/models/currency_chain.py | 4 +- gate_api/models/currency_pair.py | 40 +- gate_api/models/currency_quota.py | 4 +- gate_api/models/debit_fee.py | 4 +- gate_api/models/delivery_candlestick.py | 4 +- gate_api/models/delivery_contract.py | 8 +- gate_api/models/delivery_settlement.py | 4 +- gate_api/models/delivery_ticker.py | 4 +- gate_api/models/deposit_address.py | 4 +- gate_api/models/deposit_record.py | 4 +- gate_api/models/dual_get_orders.py | 4 +- gate_api/models/dual_get_plans.py | 4 +- gate_api/models/eth2_rate_list.py | 4 +- gate_api/models/eth2_swap.py | 4 +- gate_api/models/find_coin.py | 4 +- gate_api/models/flash_swap_currency_pair.py | 4 +- gate_api/models/flash_swap_order.py | 4 +- gate_api/models/flash_swap_order_preview.py | 12 +- gate_api/models/flash_swap_order_request.py | 12 +- gate_api/models/flash_swap_preview_request.py | 4 +- gate_api/models/funding_account.py | 4 +- gate_api/models/funding_rate_record.py | 4 +- gate_api/models/future_cancel_order_result.py | 4 +- gate_api/models/futures_account.py | 36 +- gate_api/models/futures_account_book.py | 8 +- gate_api/models/futures_account_history.py | 4 +- gate_api/models/futures_auto_deleverage.py | 4 +- .../futures_batch_amend_order_request.py | 4 +- gate_api/models/futures_candlestick.py | 4 +- gate_api/models/futures_fee.py | 4 +- gate_api/models/futures_index_constituents.py | 4 +- gate_api/models/futures_initial_order.py | 4 +- gate_api/models/futures_limit_risk_tiers.py | 40 +- gate_api/models/futures_liq_order.py | 4 +- gate_api/models/futures_liquidate.py | 4 +- gate_api/models/futures_order.py | 4 +- gate_api/models/futures_order_amendment.py | 4 +- gate_api/models/futures_order_book.py | 4 +- gate_api/models/futures_order_book_item.py | 4 +- .../models/futures_position_cross_mode.py | 4 +- gate_api/models/futures_premium_index.py | 4 +- gate_api/models/futures_price_trigger.py | 4 +- .../models/futures_price_triggered_order.py | 4 +- gate_api/models/futures_risk_limit_tier.py | 263 +++++++++++++ gate_api/models/futures_ticker.py | 4 +- gate_api/models/futures_trade.py | 4 +- gate_api/models/index_constituent.py | 4 +- gate_api/models/inline_response200.py | 4 +- gate_api/models/inline_response2001.py | 4 +- gate_api/models/insurance_record.py | 4 +- gate_api/models/ledger_record.py | 4 +- gate_api/models/liquidate_order.py | 4 +- gate_api/models/margin_account.py | 4 +- gate_api/models/margin_account_book.py | 4 +- gate_api/models/margin_account_currency.py | 4 +- gate_api/models/margin_leverage_tier.py | 4 +- gate_api/models/margin_market_leverage.py | 4 +- gate_api/models/margin_tiers.py | 4 +- gate_api/models/margin_transferable.py | 4 +- gate_api/models/max_uni_borrowable.py | 4 +- gate_api/models/mock_futures_order.py | 4 +- gate_api/models/mock_futures_position.py | 4 +- gate_api/models/mock_margin_result.py | 4 +- gate_api/models/mock_options_order.py | 4 +- gate_api/models/mock_options_position.py | 4 +- gate_api/models/mock_risk_unit.py | 4 +- gate_api/models/mock_spot_balance.py | 4 +- gate_api/models/mock_spot_order.py | 4 +- gate_api/models/multi_chain_address_item.py | 4 +- gate_api/models/multi_collateral_currency.py | 4 +- gate_api/models/multi_collateral_item.py | 4 +- gate_api/models/multi_collateral_order.py | 4 +- gate_api/models/multi_collateral_record.py | 4 +- .../multi_collateral_record_currency.py | 4 +- gate_api/models/multi_loan_item.py | 4 +- gate_api/models/multi_loan_repay_item.py | 4 +- gate_api/models/multi_repay_record.py | 4 +- gate_api/models/multi_repay_resp.py | 4 +- gate_api/models/my_futures_trade.py | 4 +- .../models/my_futures_trade_time_range.py | 4 +- gate_api/models/open_orders.py | 4 +- gate_api/models/options_account.py | 4 +- gate_api/models/options_account_book.py | 4 +- gate_api/models/options_candlestick.py | 4 +- gate_api/models/options_contract.py | 4 +- gate_api/models/options_mmp.py | 4 +- gate_api/models/options_mmp_reset.py | 4 +- gate_api/models/options_my_settlements.py | 4 +- gate_api/models/options_my_trade.py | 4 +- gate_api/models/options_order.py | 4 +- gate_api/models/options_position.py | 4 +- gate_api/models/options_position_close.py | 4 +- .../models/options_position_close_order.py | 4 +- gate_api/models/options_settlement.py | 4 +- gate_api/models/options_ticker.py | 4 +- gate_api/models/options_underlying.py | 4 +- gate_api/models/options_underlying_ticker.py | 4 +- gate_api/models/order.py | 12 +- gate_api/models/order_book.py | 4 +- gate_api/models/order_cancel.py | 12 +- gate_api/models/order_patch.py | 12 +- gate_api/models/order_resp.py | 4 +- gate_api/models/partner_commission_history.py | 4 +- gate_api/models/partner_sub.py | 4 +- gate_api/models/partner_sub_list.py | 4 +- .../models/partner_transaction_history.py | 4 +- gate_api/models/patch_uni_lend.py | 4 +- .../models/place_dual_investment_order.py | 4 +- gate_api/models/position.py | 68 +++- gate_api/models/position_close.py | 4 +- gate_api/models/position_close_order.py | 4 +- gate_api/models/profit_loss_range.py | 4 +- gate_api/models/rebate_user_info.py | 4 +- gate_api/models/repay_currency_res.py | 4 +- gate_api/models/repay_loan.py | 4 +- gate_api/models/repay_multi_loan.py | 4 +- gate_api/models/repay_record.py | 4 +- gate_api/models/repay_record_currency.py | 4 +- gate_api/models/repay_record_left_interest.py | 4 +- .../models/repay_record_repaid_currency.py | 4 +- .../models/repay_record_total_interest.py | 4 +- gate_api/models/repay_resp.py | 4 +- gate_api/models/risk_units.py | 4 +- gate_api/models/saved_address.py | 4 +- gate_api/models/small_balance.py | 4 +- gate_api/models/small_balance_history.py | 4 +- gate_api/models/spot_account.py | 4 +- gate_api/models/spot_account_book.py | 4 +- gate_api/models/spot_currency_chain.py | 4 +- gate_api/models/spot_fee.py | 4 +- gate_api/models/spot_insurance_history.py | 4 +- gate_api/models/spot_price_put_order.py | 8 +- gate_api/models/spot_price_trigger.py | 8 +- gate_api/models/spot_price_triggered_order.py | 4 +- gate_api/models/stp_group.py | 4 +- gate_api/models/stp_group_user.py | 4 +- gate_api/models/structured_buy.py | 4 +- .../models/structured_get_project_list.py | 4 +- gate_api/models/structured_order_list.py | 4 +- gate_api/models/sub_account.py | 4 +- gate_api/models/sub_account_balance.py | 4 +- .../sub_account_cross_margin_balance.py | 4 +- .../models/sub_account_futures_balance.py | 4 +- gate_api/models/sub_account_key.py | 4 +- gate_api/models/sub_account_key_perms.py | 4 +- gate_api/models/sub_account_margin_balance.py | 4 +- gate_api/models/sub_account_to_sub_account.py | 8 +- gate_api/models/sub_account_transfer.py | 8 +- .../sub_account_transfer_record_item.py | 8 +- gate_api/models/sub_cross_margin_account.py | 4 +- gate_api/models/sub_user_mode.py | 4 +- gate_api/models/swap_coin.py | 4 +- gate_api/models/swap_coin_struct.py | 347 ++++++++++++++++++ gate_api/models/system_time.py | 4 +- gate_api/models/ticker.py | 4 +- gate_api/models/total_balance.py | 4 +- gate_api/models/trade.py | 8 +- gate_api/models/trade_fee.py | 4 +- gate_api/models/transaction_id.py | 4 +- gate_api/models/transfer.py | 4 +- gate_api/models/transfer_order_status.py | 4 +- gate_api/models/transferables_result.py | 4 +- gate_api/models/trigger_order_response.py | 4 +- gate_api/models/trigger_time.py | 4 +- gate_api/models/uid_push_order.py | 4 +- gate_api/models/uid_push_withdrawal.py | 4 +- gate_api/models/uid_push_withdrawal_resp.py | 4 +- gate_api/models/uni_currency.py | 4 +- gate_api/models/uni_currency_interest.py | 8 +- gate_api/models/uni_currency_pair.py | 4 +- gate_api/models/uni_interest_record.py | 8 +- gate_api/models/uni_lend.py | 8 +- gate_api/models/uni_lend_interest.py | 4 +- gate_api/models/uni_lend_record.py | 4 +- gate_api/models/uni_loan.py | 4 +- gate_api/models/uni_loan_interest_record.py | 4 +- gate_api/models/uni_loan_record.py | 4 +- gate_api/models/unified_account.py | 8 +- gate_api/models/unified_balance.py | 8 +- gate_api/models/unified_borrowable.py | 4 +- gate_api/models/unified_borrowable1.py | 4 +- gate_api/models/unified_collateral_req.py | 16 +- gate_api/models/unified_collateral_res.py | 8 +- gate_api/models/unified_currency.py | 4 +- gate_api/models/unified_discount.py | 4 +- gate_api/models/unified_discount_tiers.py | 4 +- gate_api/models/unified_history_loan_rate.py | 4 +- .../models/unified_history_loan_rate_rates.py | 4 +- gate_api/models/unified_leverage_config.py | 4 +- gate_api/models/unified_leverage_setting.py | 4 +- gate_api/models/unified_loan.py | 4 +- gate_api/models/unified_loan_record.py | 8 +- gate_api/models/unified_loan_result.py | 4 +- gate_api/models/unified_margin_tiers.py | 4 +- gate_api/models/unified_mode_set.py | 4 +- gate_api/models/unified_portfolio_input.py | 4 +- gate_api/models/unified_portfolio_output.py | 4 +- gate_api/models/unified_risk_units.py | 4 +- gate_api/models/unified_settings.py | 4 +- gate_api/models/unified_transferable.py | 4 +- gate_api/models/user_ltv_info.py | 4 +- gate_api/models/user_sub.py | 4 +- gate_api/models/user_sub_relation.py | 4 +- gate_api/models/user_total_amount.py | 4 +- gate_api/models/withdraw_status.py | 4 +- gate_api/models/withdrawal_record.py | 8 +- gate_api/rest.py | 4 +- setup.cfg | 2 +- setup.py | 10 +- 326 files changed, 2015 insertions(+), 1029 deletions(-) create mode 100644 docs/FuturesRiskLimitTier.md create mode 100644 docs/SwapCoinStruct.md create mode 100644 gate_api/models/futures_risk_limit_tier.py create mode 100644 gate_api/models/swap_coin_struct.py diff --git a/README.md b/README.md index 15a91e1..05fafbe 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,14 @@ # gate-api Welcome to Gate API - -APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. - + APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces +for implementing API-based automated trading. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.100.2 -- Package version: 6.100.2 +- API version: v4.102.0 +- Package version: 6.102.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen -For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) +For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) ## Versioning @@ -158,7 +157,7 @@ Class | Method | HTTP request | Description *UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage *UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account *UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates -*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | 设置抵押币种 +*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency *AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail *AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information *AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups @@ -215,7 +214,7 @@ Class | Method | HTTP request | Description *EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List *EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List *EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order -*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | 链上赚币币种 +*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins *EarnApi* | [**swap_staking_coin**](docs/EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins *FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap *FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders @@ -265,6 +264,7 @@ Class | Method | HTTP request | Description *FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates *FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list *FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs +*FuturesApi* | [**get_futures_risk_limit_table**](docs/FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id *FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders *FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order *FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders @@ -481,6 +481,7 @@ Class | Method | HTTP request | Description - [FuturesPremiumIndex](docs/FuturesPremiumIndex.md) - [FuturesPriceTrigger](docs/FuturesPriceTrigger.md) - [FuturesPriceTriggeredOrder](docs/FuturesPriceTriggeredOrder.md) + - [FuturesRiskLimitTier](docs/FuturesRiskLimitTier.md) - [FuturesTicker](docs/FuturesTicker.md) - [FuturesTrade](docs/FuturesTrade.md) - [IndexConstituent](docs/IndexConstituent.md) @@ -589,6 +590,7 @@ Class | Method | HTTP request | Description - [SubCrossMarginAccount](docs/SubCrossMarginAccount.md) - [SubUserMode](docs/SubUserMode.md) - [SwapCoin](docs/SwapCoin.md) + - [SwapCoinStruct](docs/SwapCoinStruct.md) - [SystemTime](docs/SystemTime.md) - [Ticker](docs/Ticker.md) - [TotalBalance](docs/TotalBalance.md) @@ -652,7 +654,7 @@ Class | Method | HTTP request | Description Authentication with APIv4 key and secret For details, refer to: -[APIv4 signed request requirements](https://www.gate.io/docs/apiv4/en/index.html#apiv4-signed-request-requirements) +[APIv4 signed request requirements](https://www.gate.com/docs/apiv4/en/index.html#apiv4-signed-request-requirements) ## Author diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 2c13efa..c249424 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -284,7 +284,7 @@ Name | Type | Description | Notes List users of the STP group -Only the main account that created this STP group is allowed to list the user ID of the STP group +Only the main account that created this STP group can query the account ### Example diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md index c88e63d..ca96766 100644 --- a/docs/AccountDetail.md +++ b/docs/AccountDetail.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **user_id** | **int** | User ID | [optional] **tier** | **int** | User VIP level | [optional] **key** | [**AccountDetailKey**](AccountDetailKey.md) | | [optional] -**copy_trading_role** | **int** | User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower | [optional] +**copy_trading_role** | **int** | User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchAmendItem.md b/docs/BatchAmendItem.md index 2193da6..e5a1647 100644 --- a/docs/BatchAmendItem.md +++ b/docs/BatchAmendItem.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **order_id** | **str** | The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). | **currency_pair** | **str** | Currency pair | **account** | **str** | Default spot, unified account and warehouse-by-store leverage account. | [optional] -**amount** | **str** | trade amount, only one of amount and price can be specified | [optional] -**price** | **str** | trade price, only one of amount and price can be specified | [optional] +**amount** | **str** | Trading Quantity. Only one of amountor pricecan be specified. | [optional] +**price** | **str** | Trading Price. Only one of amountor pricecan be specified. | [optional] **amend_text** | **str** | Custom info during amending order | [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] diff --git a/docs/BatchOrder.md b/docs/BatchOrder.md index f1b326d..17b6442 100644 --- a/docs/BatchOrder.md +++ b/docs/BatchOrder.md @@ -17,9 +17,9 @@ Name | Type | Description | Notes **update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] **currency_pair** | **str** | Currency pair | [optional] -**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] +**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Order side | [optional] +**side** | **str** | Buy or sell order | [optional] **amount** | **str** | Trade amount | [optional] **price** | **str** | Order price | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] diff --git a/docs/CollateralLoanApi.md b/docs/CollateralLoanApi.md index 5b55826..79193a1 100644 --- a/docs/CollateralLoanApi.md +++ b/docs/CollateralLoanApi.md @@ -664,7 +664,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -loan_currency = 'BTC' # str | The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. (optional) +loan_currency = 'BTC' # str | The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. (optional) try: # Query supported borrowing and collateral currencies @@ -680,7 +680,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loan_currency** | **str**| The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. | [optional] + **loan_currency** | **str**| The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. | [optional] ### Return type diff --git a/docs/Contract.md b/docs/Contract.md index 65ea3fd..05a1afd 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **risk_limit_max** | **str** | Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. | [optional] **order_size_min** | **int** | Minimum order size the contract allowed | [optional] **order_size_max** | **int** | Maximum order size the contract allowed | [optional] -**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] +**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] **ref_discount_rate** | **str** | Referral fee rate discount | [optional] **ref_rebate_rate** | **str** | Referrer commission rate | [optional] **orderbook_id** | **int** | Current orderbook ID | [optional] @@ -41,7 +41,7 @@ Name | Type | Description | Notes **create_time** | **float** | Created time of the contract | [optional] **funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional] **status** | **str** | Contract Status Types include: prelaunch, trading, delisting, delisted | [optional] -**launch_time** | **int** | 合约开盘时间 | [optional] +**launch_time** | **int** | Contract expiry timestamp | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllFuturesTask.md b/docs/CountdownCancelAllFuturesTask.md index 9e05e8e..f844de4 100644 --- a/docs/CountdownCancelAllFuturesTask.md +++ b/docs/CountdownCancelAllFuturesTask.md @@ -4,7 +4,7 @@ Countdown cancel task detail ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | +**timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | **contract** | **str** | Futures contract | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllOptionsTask.md b/docs/CountdownCancelAllOptionsTask.md index b768516..df3d6d5 100644 --- a/docs/CountdownCancelAllOptionsTask.md +++ b/docs/CountdownCancelAllOptionsTask.md @@ -4,7 +4,7 @@ Countdown cancel task detail ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | +**timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | **contract** | **str** | Options contract name | [optional] **underlying** | **str** | Underlying | [optional] diff --git a/docs/CountdownCancelAllSpotTask.md b/docs/CountdownCancelAllSpotTask.md index aaab8f8..490dd9c 100644 --- a/docs/CountdownCancelAllSpotTask.md +++ b/docs/CountdownCancelAllSpotTask.md @@ -4,7 +4,7 @@ Countdown cancel task detail ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timeout** | **int** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | +**timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | **currency_pair** | **str** | Currency pair | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md index 8d4c3bd..c6006a4 100644 --- a/docs/CurrencyPair.md +++ b/docs/CurrencyPair.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **delisting_time** | **int** | Expected time to remove the shelves, Unix timestamp in seconds | [optional] **type** | **str** | Trading pair type, normal: normal, premarket: pre-market | [optional] **trade_url** | **str** | Transaction link | [optional] +**st_tag** | **bool** | Whether the trading pair is in ST risk assessment, false - No, true - Yes | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md index 9635459..b1bf10e 100644 --- a/docs/DeliveryApi.md +++ b/docs/DeliveryApi.md @@ -179,7 +179,7 @@ settle = 'usdt' # str | Settle currency contract = 'BTC_USDT_20200814' # str | Futures contract interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) +with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) try: # Futures order book @@ -199,7 +199,7 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract | **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] + **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] ### Return type @@ -217,7 +217,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order book retrieved | - | +**200** | Depth query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -244,7 +244,7 @@ api_instance = gate_api.DeliveryApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT_20200814' # str | Futures contract limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional) +last_id = '12345' # str | 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 (optional) _from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional) @@ -265,7 +265,7 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional] + **last_id** | **str**| 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 | [optional] **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] **to** | **int**| Specify end time in Unix seconds, default to current time | [optional] @@ -314,9 +314,9 @@ api_instance = gate_api.DeliveryApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT_20200814' # str | Futures contract _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 (optional) (default to '5m') +interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek (optional) (default to '5m') try: # Get futures candlesticks @@ -335,9 +335,9 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 | [optional] [default to '5m'] + **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek | [optional] [default to '5m'] ### Return type @@ -577,8 +577,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.DeliveryApi(api_client) settle = 'usdt' # str | Settle currency limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional) try: @@ -597,8 +597,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] ### Return type @@ -788,7 +788,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.DeliveryApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT_20200814' # str | Futures contract -change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. +change = '0.01' # str | Margin change amount, positive number increases, negative number try: # Update position margin @@ -806,7 +806,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | - **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | + **change** | **str**| Margin change amount, positive number increases, negative number | ### Return type @@ -1006,7 +1006,7 @@ status = 'open' # str | Only list the orders with this status contract = 'BTC_USDT_20200814' # str | Futures contract (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) try: @@ -1028,7 +1028,7 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] ### Return type @@ -1369,7 +1369,7 @@ contract = 'BTC_USDT_20200814' # str | Futures contract (optional) order = 12345 # int | Futures order ID, return related data only if specified (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) try: @@ -1391,7 +1391,7 @@ Name | Type | Description | Notes **order** | **int**| Futures order ID, return related data only if specified | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] ### Return type diff --git a/docs/DeliveryContract.md b/docs/DeliveryContract.md index 069eb7b..ca2f661 100644 --- a/docs/DeliveryContract.md +++ b/docs/DeliveryContract.md @@ -32,7 +32,7 @@ Name | Type | Description | Notes **risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional] **order_size_min** | **int** | Minimum order size the contract allowed | [optional] **order_size_max** | **int** | Maximum order size the contract allowed | [optional] -**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] +**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] **ref_discount_rate** | **str** | Referral fee rate discount | [optional] **ref_rebate_rate** | **str** | Referrer commission rate | [optional] **orderbook_id** | **int** | Current orderbook ID | [optional] diff --git a/docs/EarnApi.md b/docs/EarnApi.md index 95150d6..425092c 100644 --- a/docs/EarnApi.md +++ b/docs/EarnApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List [**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List [**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order -[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | 链上赚币币种 +[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins [**swap_staking_coin**](EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins @@ -364,8 +364,8 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -status = 'in_process' # str | Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish -type = 'BullishSharkFin' # str | Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall (optional) +status = 'in_process' # str | Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed +type = 'BullishSharkFin' # str | Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball (optional) page = 1 # int | Page number (optional) (default to 1) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) @@ -383,8 +383,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish | - **type** | **str**| Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall | [optional] + **status** | **str**| Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed | + **type** | **str**| Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball | [optional] **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] @@ -437,8 +437,8 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) page = 1 # int | Page number (optional) (default to 1) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) @@ -456,8 +456,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] @@ -550,7 +550,7 @@ void (empty response body) # **find_coin** > list[str] find_coin(find_coin) -链上赚币币种 +Staking Coins ### Example @@ -579,7 +579,7 @@ api_instance = gate_api.EarnApi(api_client) find_coin = gate_api.FindCoin() # FindCoin | try: - # 链上赚币币种 + # Staking Coins api_response = api_instance.find_coin(find_coin) print(api_response) except GateApiException as ex: @@ -615,7 +615,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) # **swap_staking_coin** -> swap_staking_coin(swap_coin) +> SwapCoinStruct swap_staking_coin(swap_coin) On-chain Token Swap for Earned Coins @@ -647,7 +647,8 @@ swap_coin = gate_api.SwapCoin() # SwapCoin | try: # On-chain Token Swap for Earned Coins - api_instance.swap_staking_coin(swap_coin) + api_response = api_instance.swap_staking_coin(swap_coin) + print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) except ApiException as e: @@ -662,7 +663,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**SwapCoinStruct**](SwapCoinStruct.md) ### Authorization @@ -671,7 +672,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index 6fd6b58..5c499f4 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -205,7 +205,7 @@ Name | Type | Description | Notes Lend or redeem -`Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. +Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly determination, no interest will be earned for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. ### Example @@ -368,8 +368,8 @@ api_instance = gate_api.EarnUniApi(api_client) currency = 'BTC' # str | Retrieve data of the specified currency (optional) page = 1 # int | Page number (optional) (default to 1) limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) type = 'lend' # str | type: lend - lend, redeem - redeem (optional) try: @@ -389,8 +389,8 @@ Name | Type | Description | Notes **currency** | **str**| Retrieve data of the specified currency | [optional] **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **type** | **str**| type: lend - lend, redeem - redeem | [optional] ### Return type @@ -512,8 +512,8 @@ api_instance = gate_api.EarnUniApi(api_client) currency = 'BTC' # str | Retrieve data of the specified currency (optional) page = 1 # int | Page number (optional) (default to 1) limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # List interest records @@ -532,8 +532,8 @@ Name | Type | Description | Notes **currency** | **str**| Retrieve data of the specified currency | [optional] **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <LL@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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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/FlashSwapOrderPreview.md b/docs/FlashSwapOrderPreview.md index 578ba75..5b9d8ba 100644 --- a/docs/FlashSwapOrderPreview.md +++ b/docs/FlashSwapOrderPreview.md @@ -5,9 +5,9 @@ Initiate a flash swap order preview Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **preview_id** | **str** | Preview result ID | [optional] -**sell_currency** | **str** | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] +**sell_currency** | **str** | Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional] **sell_amount** | **str** | Amount to sell | [optional] -**buy_currency** | **str** | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] +**buy_currency** | **str** | Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional] **buy_amount** | **str** | Amount to buy | [optional] **price** | **str** | Price | [optional] diff --git a/docs/FlashSwapOrderRequest.md b/docs/FlashSwapOrderRequest.md index a3e6f8f..aea0466 100644 --- a/docs/FlashSwapOrderRequest.md +++ b/docs/FlashSwapOrderRequest.md @@ -5,9 +5,9 @@ Parameters of flash swap order creation Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **preview_id** | **str** | Preview result ID | -**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. | +**sell_currency** | **str** | Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap | **sell_amount** | **str** | Amount to sell (based on the preview result) | -**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. | +**buy_currency** | **str** | Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap | **buy_amount** | **str** | Amount to buy (based on the preview result) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md index 9641bf8..39de06f 100644 --- a/docs/FuturesAccount.md +++ b/docs/FuturesAccount.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **isolated_position_margin** | **str** | Ware -position margin, suitable for the new classic account margin model | [optional] **enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode | [optional] **margin_mode** | **int** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional] +**enable_tiered_mm** | **bool** | Whether to enable tiered maintenance margin calculation | [optional] **history** | [**FuturesAccountHistory**](FuturesAccountHistory.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccountBook.md b/docs/FuturesAccountBook.md index eebf328..8ff2aed 100644 --- a/docs/FuturesAccountBook.md +++ b/docs/FuturesAccountBook.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **text** | **str** | Comment | [optional] **contract** | **str** | Futures contract, the field is only available for data after 2023-10-30. | [optional] **trade_id** | **str** | trade id | [optional] -**id** | **str** | 账户变更记录 id | [optional] +**id** | **str** | Account change record ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesApi.md b/docs/FuturesApi.md index a8732ae..f7e90ab 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -47,6 +47,7 @@ Method | HTTP request | Description [**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates [**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list [**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs +[**get_futures_risk_limit_table**](FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id [**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders [**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order [**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders @@ -202,7 +203,7 @@ settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) +with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) try: # Futures order book @@ -222,7 +223,7 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract | **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] + **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] ### Return type @@ -240,7 +241,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order book retrieved | - | +**200** | Depth query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -339,7 +340,7 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days (optional) (default to '5m') @@ -360,7 +361,7 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days | [optional] [default to '5m'] @@ -409,7 +410,7 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) interval = '5m' # str | Interval time between data points (optional) (default to '5m') @@ -430,7 +431,7 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] **interval** | **str**| Interval time between data points | [optional] [default to '5m'] @@ -537,8 +538,8 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # Funding rate history @@ -557,8 +558,8 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type @@ -771,7 +772,7 @@ No authorization required Retrieve liquidation history -Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. +The maximum time interval between `from` and `to` is **3600 seconds**. Certain private fields will **not be returned** in public endpoints; refer to individual field descriptions for details. ### Example @@ -790,8 +791,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) try: @@ -810,8 +811,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **contract** | **str**| Futures contract, return related data only if specified | [optional] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] ### Return type @@ -972,7 +973,7 @@ Name | Type | Description | Notes Query account book -If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. +If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered。 2023-10-30 can be filtered。 ### Example @@ -1002,8 +1003,8 @@ settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction (optional) try: @@ -1024,8 +1025,8 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract, return related data only if specified | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] ### Return type @@ -1221,7 +1222,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract -change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. +change = '0.01' # str | Margin change amount, positive number increases, negative number try: # Update position margin @@ -1239,7 +1240,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | - **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | + **change** | **str**| Margin change amount, positive number increases, negative number | ### Return type @@ -1479,7 +1480,7 @@ Name | Type | Description | Notes Enable or disable dual mode -Before setting dual mode, make sure all positions are closed and no orders are open +The prerequisite for changing mode is that all positions have no holdings ### Example @@ -1645,7 +1646,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract -change = '0.01' # str | Margin change. Use positive number to increase margin, negative number otherwise. +change = '0.01' # str | Margin change amount, positive number increases, negative number dual_side = 'dual_long' # str | Long or short position try: @@ -1664,7 +1665,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | - **change** | **str**| Margin change. Use positive number to increase margin, negative number otherwise. | + **change** | **str**| Margin change amount, positive number increases, negative number | **dual_side** | **str**| Long or short position | ### Return type @@ -1867,7 +1868,7 @@ status = 'open' # str | Only list the orders with this status contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) try: # List futures orders @@ -1888,7 +1889,7 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract, return related data only if specified | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] ### Return type @@ -2017,7 +2018,7 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) -side = 'ask' # str | Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask (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 ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all (optional) try: # Cancel all `open` orders matched @@ -2036,7 +2037,7 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - **side** | **str**| Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask | [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 ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all | [optional] ### Return type @@ -2089,8 +2090,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) @@ -2110,8 +2111,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **contract** | **str**| Futures contract, return related data only if specified | [optional] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] @@ -2533,8 +2534,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) role = 'maker' # str | Query role, maker or taker. (optional) @@ -2555,8 +2556,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **str**| Settle currency | **contract** | **str**| Futures contract, return related data only if specified | [optional] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **role** | **str**| Query role, maker or taker. | [optional] @@ -2614,8 +2615,8 @@ settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) side = 'short' # str | Query side. long or shot (optional) pnl = 'profit' # str | Query profit or loss (optional) @@ -2637,8 +2638,8 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract, return related data only if specified | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **side** | **str**| Query side. long or shot | [optional] **pnl** | **str**| Query profit or loss | [optional] @@ -2813,7 +2814,7 @@ Name | Type | Description | Notes Countdown cancel orders -When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. +Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. ### Example @@ -2953,7 +2954,7 @@ Name | Type | Description | Notes Cancel a batch of orders with an ID list -Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. +Multiple different order IDs can be specified. A maximum of 20 records ### Example @@ -3026,7 +3027,7 @@ Name | Type | Description | Notes Batch modify orders with specified IDs -You can specify multiple different order IDs. You can only modify up to 10 orders in one request. +Multiple different order IDs can be specified. A maximum of 10 orders can ### Example @@ -3094,6 +3095,68 @@ 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_futures_risk_limit_table** +> list[FuturesRiskLimitTier] get_futures_risk_limit_table(settle, table_id) + +Query risk limit table by table_id + +Just pass table_id. + +### Example + +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency +table_id = 'CYBER_USDT_20241122' # str | Risk limit table ID + +try: + # Query risk limit table by table_id + api_response = api_instance.get_futures_risk_limit_table(settle, table_id) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->get_futures_risk_limit_table: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency | + **table_id** | **str**| Risk limit table ID | + +### Return type + +[**list[FuturesRiskLimitTier]**](FuturesRiskLimitTier.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_price_triggered_orders** > list[FuturesPriceTriggeredOrder] list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) diff --git a/docs/FuturesLimitRiskTiers.md b/docs/FuturesLimitRiskTiers.md index fec6e52..45fa793 100644 --- a/docs/FuturesLimitRiskTiers.md +++ b/docs/FuturesLimitRiskTiers.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **maintenance_rate** | **str** | Maintenance margin rate | [optional] **leverage_max** | **str** | Maximum leverage | [optional] **contract** | **str** | Markets, visible only during market pagination requests | [optional] +**deduction** | **str** | Maintenance margin quick calculation deduction | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesRiskLimitTier.md b/docs/FuturesRiskLimitTier.md new file mode 100644 index 0000000..5b8922b --- /dev/null +++ b/docs/FuturesRiskLimitTier.md @@ -0,0 +1,16 @@ +# FuturesRiskLimitTier + +Information for each tier of the risk limit ladder +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tier** | **int** | Tier | [optional] +**risk_limit** | **str** | Position risk limit | [optional] +**initial_rate** | **str** | Initial margin rate | [optional] +**maintenance_rate** | **str** | Maintenance margin rate | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**deduction** | **str** | Maintenance margin quick calculation deduction | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md index 355a750..e4c0560 100644 --- a/docs/MarginUniApi.md +++ b/docs/MarginUniApi.md @@ -442,8 +442,8 @@ currency_pair = 'BTC_USDT' # str | Currency pair (optional) currency = 'BTC' # str | Retrieve data of the specified currency (optional) page = 1 # int | Page number (optional) (default to 1) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # List interest records @@ -463,8 +463,8 @@ Name | Type | Description | Notes **currency** | **str**| Retrieve data of the specified currency | [optional] **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md index 28b5587..ca2c338 100644 --- a/docs/MultiCollateralLoanApi.md +++ b/docs/MultiCollateralLoanApi.md @@ -49,8 +49,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MultiCollateralLoanApi(api_client) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) -sort = 'ltv_asc' # str | Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. (optional) -order_type = 'current' # str | Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders (optional) +sort = 'ltv_asc' # str | Query the current interest rate of the currency in the previous hour (optional) +order_type = 'current' # str | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified (optional) try: # List Multi-Collateral Orders @@ -68,8 +68,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] - **sort** | **str**| Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. | [optional] - **order_type** | **str**| Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders | [optional] + **sort** | **str**| Query the current interest rate of the currency in the previous hour | [optional] + **order_type** | **str**| Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional] ### Return type @@ -540,8 +540,8 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -type = 'collateral' # str | Currency types: collateral - collateral currency, borrow - borrowing currency. -currency = 'BTC' # str | When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. +type = 'collateral' # str | Currency type: collateral - Collateral currency, borrow - Borrowing +currency = 'BTC' # str | When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc try: # List User Currency Quota @@ -557,8 +557,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| Currency types: collateral - collateral currency, borrow - borrowing currency. | - **currency** | **str**| When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. | + **type** | **str**| Currency type: collateral - Collateral currency, borrow - Borrowing | + **currency** | **str**| When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc | ### Return type @@ -749,7 +749,7 @@ No authorization required Query the current interest rate of the currency -Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. +Query the current interest rate of the currency in the previous hour. ### Example @@ -766,7 +766,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency name query array, separated by commas, maximum 100items. vip_level = '0' # str | VIP level, defaults to 0 if not transferred (optional) (default to '0') try: @@ -783,7 +783,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. | + **currencies** | [**list[str]**](str.md)| Specify currency name query array, separated by commas, maximum 100items. | **vip_level** | **str**| VIP level, defaults to 0 if not transferred | [optional] [default to '0'] ### Return type diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md index c72a395..db16785 100644 --- a/docs/OptionsApi.md +++ b/docs/OptionsApi.md @@ -287,8 +287,8 @@ api_instance = gate_api.OptionsApi(api_client) underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # List settlement history @@ -307,8 +307,8 @@ Name | Type | Description | Notes **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type @@ -425,8 +425,8 @@ underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpo contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # List my options settlements @@ -446,8 +446,8 @@ Name | Type | Description | Notes **contract** | **str**| Options contract name | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type @@ -494,7 +494,7 @@ api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to False) +with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) try: # Options order book @@ -513,7 +513,7 @@ Name | Type | Description | Notes **contract** | **str**| Options contract name | **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to False] + **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] ### Return type @@ -531,7 +531,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order book retrieved | - | +**200** | Depth query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -673,8 +673,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) interval = '5m' # str | Interval time between data points (optional) (default to '5m') try: @@ -693,8 +693,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contract** | **str**| Options contract name | **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **interval** | **str**| Interval time between data points | [optional] [default to '5m'] ### Return type @@ -739,8 +739,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OptionsApi(api_client) underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) interval = '5m' # str | Interval time between data points (optional) (default to '5m') try: @@ -759,8 +759,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **interval** | **str**| Interval time between data points | [optional] [default to '5m'] ### Return type @@ -807,8 +807,8 @@ contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) type = '1546935600' # str | `C` is call, while `P` is put (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # Options trade history @@ -828,8 +828,8 @@ Name | Type | Description | Notes **type** | **str**| `C` is call, while `P` is put | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type @@ -945,8 +945,8 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OptionsApi(api_client) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL (optional) try: @@ -965,8 +965,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL | [optional] ### Return type @@ -1226,8 +1226,8 @@ contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) underlying = 'BTC_USDT' # str | Underlying (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # List options orders @@ -1248,8 +1248,8 @@ Name | Type | Description | Notes **underlying** | **str**| Underlying | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type @@ -1645,8 +1645,8 @@ underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpo contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -_from = 1547706332 # int | Start timestamp (optional) -to = 1547706332 # int | End timestamp (optional) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: # List personal trading history @@ -1666,8 +1666,8 @@ Name | Type | Description | Notes **contract** | **str**| Options contract name | [optional] **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **_from** | **int**| Start timestamp | [optional] - **to** | **int**| End timestamp | [optional] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] ### Return type diff --git a/docs/Order.md b/docs/Order.md index 868bf2f..f53fcfe 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -13,9 +13,9 @@ Name | Type | Description | Notes **update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] **currency_pair** | **str** | Currency pair | -**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] +**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Order side | +**side** | **str** | Buy or sell order | **amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | **price** | **str** | Price can't be empty when `type`= `limit` | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] diff --git a/docs/OrderCancel.md b/docs/OrderCancel.md index 8cb355a..32a0ea0 100644 --- a/docs/OrderCancel.md +++ b/docs/OrderCancel.md @@ -16,9 +16,9 @@ Name | Type | Description | Notes **update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] **currency_pair** | **str** | Currency pair | -**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] +**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Order side | +**side** | **str** | Buy or sell order | **amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | **price** | **str** | Price can't be empty when `type`= `limit` | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md index 81969b0..bd6a486 100644 --- a/docs/OrderPatch.md +++ b/docs/OrderPatch.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency_pair** | **str** | Currency pair | [optional] **account** | **str** | Specify query account. | [optional] -**amount** | **str** | New order amount. `amount` and `price` must specify one of them | [optional] -**price** | **str** | New order price. `amount` and `Price` must specify one of them\" | [optional] +**amount** | **str** | Trading Quantity. Either amountor pricemust be specified | [optional] +**price** | **str** | Trading Price. Either amountor pricemust be specified | [optional] **amend_text** | **str** | Custom info during amending order | [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] diff --git a/docs/Position.md b/docs/Position.md index 8606015..9b0ced5 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -35,6 +35,8 @@ Name | Type | Description | Notes **update_time** | **int** | Last update time | [optional] [readonly] **update_id** | **int** | Update id. Each time the position is updated, the value will be +1. | [optional] [readonly] **open_time** | **int** | First Open Time | [optional] +**risk_limit_table** | **str** | Risk limit table ID | [optional] [readonly] +**average_maintenance_rate** | **str** | Average maintenance margin rate | [optional] [readonly] [[Back to Model list]](../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 5026926..8cb2ec5 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -331,7 +331,7 @@ No authorization required Retrieve order book -Order book will be sorted by price from high to low on bids; low to high on asks +Market depth buy orders are sorted by price from high to low, sell orders are reversed are reversed ### Example @@ -416,7 +416,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) currency_pair = 'BTC_USDT' # str | Currency pair limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) -last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) reverse = False # bool | Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. (optional) (default to False) _from = 1627706330 # int | Start timestamp of the query (optional) to = 1635329650 # int | Time range ending, default to current time (optional) @@ -438,7 +438,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency_pair** | **str**| Currency pair | **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] - **last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] **reverse** | **bool**| Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. | [optional] [default to False] **_from** | **int**| Start timestamp of the query | [optional] **to** | **int**| Time range ending, default to current time | [optional] @@ -489,7 +489,7 @@ api_instance = gate_api.SpotApi(api_client) currency_pair = 'BTC_USDT' # str | Currency pair limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) interval = '30m' # str | Interval time between data points. Note that `30d` means 1 natual month, not 30 days (optional) (default to '30m') try: @@ -509,7 +509,7 @@ Name | Type | Description | Notes **currency_pair** | **str**| Currency pair | **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] **interval** | **str**| Interval time between data points. Note that `30d` means 1 natual month, not 30 days | [optional] [default to '30m'] ### Return type @@ -1216,7 +1216,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) currency_pair = 'BTC_USDT' # str | Currency pair (optional) side = 'sell' # str | All bids or asks. Both included if not specified (optional) -account = 'spot' # str | Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` (optional) +account = 'spot' # str | Specify account type Classic account: All are included if not specified Unified account: Specify unified (optional) action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) @@ -1236,7 +1236,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency_pair** | **str**| Currency pair | [optional] **side** | **str**| All bids or asks. Both included if not specified | [optional] - **account** | **str**| Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` | [optional] + **account** | **str**| Specify account type Classic account: All are included if not specified Unified account: Specify unified | [optional] **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -1486,7 +1486,7 @@ Name | Type | Description | Notes Amend an order -By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, it supports modifying the price or quantity (choose one of two), and also supports modifying the price and quantity at the same time About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation +Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation.Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. ### Example @@ -1698,7 +1698,7 @@ No authorization required Countdown cancel orders -When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. +Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. ### Example @@ -1767,7 +1767,7 @@ Name | Type | Description | Notes Batch modification of orders -By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the order list +Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. ### Example diff --git a/docs/SpotPricePutOrder.md b/docs/SpotPricePutOrder.md index 73b5f85..1c2adf7 100644 --- a/docs/SpotPricePutOrder.md +++ b/docs/SpotPricePutOrder.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **side** | **str** | Order side - buy: buy side - sell: sell side | **price** | **str** | Order price | **amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**account** | **str** | Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading | [default to 'normal'] +**account** | **str** | Trading account type. Portfolio margin account must set to `unified` -normal: spot trading - margin: margin trading - unified: unified trading | [default to 'normal'] **time_in_force** | **str** | time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only | [optional] [default to 'gtc'] **auto_borrow** | **bool** | Whether to borrow coins automatically | [optional] [default to False] **auto_repay** | **bool** | Whether to repay the loan automatically | [optional] [default to False] diff --git a/docs/SpotPriceTrigger.md b/docs/SpotPriceTrigger.md index 7ee5505..3583ed4 100644 --- a/docs/SpotPriceTrigger.md +++ b/docs/SpotPriceTrigger.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **price** | **str** | Trigger price | -**rule** | **str** | Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field | +**rule** | **str** | Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: triggered when market price less than or equal to `price` field | **expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountToSubAccount.md b/docs/SubAccountToSubAccount.md index cc7b962..9879c80 100644 --- a/docs/SubAccountToSubAccount.md +++ b/docs/SubAccountToSubAccount.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **sub_account_from** | **str** | Transfer from the user id of the sub-account | **sub_account_from_type** | **str** | The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. | **sub_account_to** | **str** | Transfer to the user id of the sub-account | -**sub_account_to_type** | **str** | The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account | +**sub_account_to_type** | **str** | Transferred sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account | **amount** | **str** | Transfer amount | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md index 21e855c..ee76547 100644 --- a/docs/SubAccountTransfer.md +++ b/docs/SubAccountTransfer.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sub_account** | **str** | Sub account user ID | -**sub_account_type** | **str** | 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 | [optional] [default to 'spot'] +**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] **currency** | **str** | Transfer currency name | **amount** | **str** | Transfer amount | **direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | diff --git a/docs/SubAccountTransferRecordItem.md b/docs/SubAccountTransferRecordItem.md index 91815ac..a9fd83c 100644 --- a/docs/SubAccountTransferRecordItem.md +++ b/docs/SubAccountTransferRecordItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **timest** | **str** | Transfer timestamp | [optional] [readonly] **uid** | **str** | Main account user ID | [optional] [readonly] **sub_account** | **str** | Sub account user ID | -**sub_account_type** | **str** | 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 | [optional] [default to 'spot'] +**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] **currency** | **str** | Transfer currency name | **amount** | **str** | Transfer amount | **direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | diff --git a/docs/SwapCoinStruct.md b/docs/SwapCoinStruct.md new file mode 100644 index 0000000..b7a68fa --- /dev/null +++ b/docs/SwapCoinStruct.md @@ -0,0 +1,18 @@ +# SwapCoinStruct + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Order ID | [optional] +**uid** | **int** | User ID | [optional] +**coin** | **str** | Currency | [optional] +**type** | **int** | Type: 0-Lock, 1-Certificate | [optional] +**amount** | **str** | Amount | [optional] +**exchange_rate** | **str** | Exchange Ratio | [optional] +**pid** | **int** | Plan ID | [optional] +**status** | **int** | status 1-success | [optional] +**create_stamp** | **int** | Transaction timestamp | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Trade.md b/docs/Trade.md index 94cd01e..fb513f5 100644 --- a/docs/Trade.md +++ b/docs/Trade.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **create_time** | **str** | Trading time | [optional] **create_time_ms** | **str** | Trading time, with millisecond precision | [optional] **currency_pair** | **str** | Currency pair | [optional] -**side** | **str** | Order side | [optional] +**side** | **str** | Buy or sell order | [optional] **role** | **str** | Trade role. No value in public endpoints | [optional] **amount** | **str** | Trade amount | [optional] **price** | **str** | Order price | [optional] diff --git a/docs/UniCurrencyInterest.md b/docs/UniCurrencyInterest.md index bd58430..83e9546 100644 --- a/docs/UniCurrencyInterest.md +++ b/docs/UniCurrencyInterest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **str** | Currency | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniInterestRecord.md b/docs/UniInterestRecord.md index 1859976..da15cea 100644 --- a/docs/UniInterestRecord.md +++ b/docs/UniInterestRecord.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **currency** | **str** | Currency | [optional] [readonly] **actual_rate** | **str** | Actual Rate | [optional] [readonly] **interest** | **str** | Interest | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment | [optional] [readonly] **create_time** | **int** | Created time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLend.md b/docs/UniLend.md index a6caff9..8d7288a 100644 --- a/docs/UniLend.md +++ b/docs/UniLend.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **lent_amount** | **str** | Lent amount | [optional] [readonly] **frozen_amount** | **str** | Frozen amount | [optional] [readonly] **min_rate** | **str** | Minimum interest rate | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment | [optional] [readonly] **reinvest_left_amount** | **str** | Amount not reinvested | [optional] [readonly] **create_time** | **int** | Created time of the lending order | [optional] [readonly] **update_time** | **int** | Upated time of the lending order | [optional] [readonly] diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md index 124414e..6afea83 100644 --- a/docs/UnifiedAccount.md +++ b/docs/UnifiedAccount.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **spot_order_loss** | **str** | Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] **use_funding** | **bool** | Whether to use funds as margin | [optional] -**is_all_collateral** | **bool** | 是否所有币种均作为保证金,true - 所有币种作为保证金,false - 否 | [optional] +**is_all_collateral** | **bool** | Whether all currencies are used as margin, true - All currencies are used as margin, false - No | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md index 6338d6d..276aade 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description [**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage [**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account [**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates -[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | 设置抵押币种 +[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency # **list_unified_accounts** @@ -794,7 +794,7 @@ This endpoint does not need any parameter. Set mode of the unified account -每种账户模式的切换只需要传对应账户模式的参数,同时支持在切换账户模式时打开或关闭对应账户模式下的配置开关 - 开通经典账户模式时,mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - 开通跨币种保证金模式,mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - 开通组合保证金模式时,mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - 开通单币种保证金模式时,mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` +Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` ### Example @@ -1421,7 +1421,7 @@ No authorization required # **set_unified_collateral** > UnifiedCollateralRes set_unified_collateral(unified_collateral_req) -设置抵押币种 +Set Collateral Currency ### Example @@ -1450,7 +1450,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_collateral_req = gate_api.UnifiedCollateralReq() # UnifiedCollateralReq | try: - # 设置抵押币种 + # Set Collateral Currency api_response = api_instance.set_unified_collateral(unified_collateral_req) print(api_response) except GateApiException as ex: @@ -1481,7 +1481,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | 更新成功 | - | +**200** | UpdateSuccess | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md index 51cfdb0..32d3d7c 100644 --- a/docs/UnifiedBalance.md +++ b/docs/UnifiedBalance.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **mmr** | **str** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] **margin_balance** | **str** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional] **available_margin** | **str** | Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**enabled_collateral** | **bool** | 币种开启作为保证金,true - 启用,false - 未启用 | [optional] +**enabled_collateral** | **bool** | Currency enabled as margin: true - Enabled, false - Disabled | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCollateralReq.md b/docs/UnifiedCollateralReq.md index 2e41bd7..aa7d674 100644 --- a/docs/UnifiedCollateralReq.md +++ b/docs/UnifiedCollateralReq.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collateral_type** | **int** | 用户设置抵押物模式 0(all)-全部币种作为抵押物,1(custom)-自定义币种作为抵押物,collateral_type为0(all)时,enable_list与disable_list参数无效 | [optional] -**enable_list** | **list[str]** | 币种列表,collateral_type=1(custom)表示追加的逻辑 | [optional] -**disable_list** | **list[str]** | 取消列表,表示取消的逻辑 | [optional] +**collateral_type** | **int** | User-set collateral mode0(all)-All currencies used as collateral, 1(custom)-Custom currencies used as collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid | [optional] +**enable_list** | **list[str]** | Currency list, where collateral_type=1(custom) indicates the logic of addition | [optional] +**disable_list** | **list[str]** | Cancellation list, indicating the logic of cancellation | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCollateralRes.md b/docs/UnifiedCollateralRes.md index 2394451..9bb605a 100644 --- a/docs/UnifiedCollateralRes.md +++ b/docs/UnifiedCollateralRes.md @@ -1,10 +1,10 @@ # UnifiedCollateralRes -统一账户抵押模式设置返回 +Return of unified account collateral mode settings ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**is_success** | **bool** | 是否设置成功 | [optional] +**is_success** | **bool** | Whether the setting was successful | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLoanRecord.md b/docs/UnifiedLoanRecord.md index 43d8410..bbbac24 100644 --- a/docs/UnifiedLoanRecord.md +++ b/docs/UnifiedLoanRecord.md @@ -4,7 +4,7 @@ Loan records ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | id | [optional] [readonly] +**id** | **int** | ID | [optional] [readonly] **type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly] **repayment_type** | **str** | Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment | [optional] [readonly] **borrow_type** | **str** | Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment | [optional] diff --git a/docs/WalletApi.md b/docs/WalletApi.md index a74886c..da65bc1 100644 --- a/docs/WalletApi.md +++ b/docs/WalletApi.md @@ -386,7 +386,7 @@ Name | Type | Description | Notes Retrieve transfer records between main and sub accounts -Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved +Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved ### Example diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md index cc72eb0..9b4734e 100644 --- a/docs/WithdrawalRecord.md +++ b/docs/WithdrawalRecord.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Record ID | [optional] [readonly] **txid** | **str** | Hash record of the withdrawal | [optional] [readonly] -**block_number** | **str** | 区块编号 | [optional] [readonly] +**block_number** | **str** | Block Number | [optional] [readonly] **withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] **timestamp** | **str** | Operation time | [optional] [readonly] **amount** | **str** | Currency amount | diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 9eccbc0..7e57f12 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -3,9 +3,9 @@ # flake8: noqa """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.100.2" +__version__ = "6.102.0" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi @@ -134,6 +134,7 @@ from gate_api.models.futures_premium_index import FuturesPremiumIndex from gate_api.models.futures_price_trigger import FuturesPriceTrigger from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder +from gate_api.models.futures_risk_limit_tier import FuturesRiskLimitTier from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.index_constituent import IndexConstituent @@ -242,6 +243,7 @@ from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount from gate_api.models.sub_user_mode import SubUserMode from gate_api.models.swap_coin import SwapCoin +from gate_api.models.swap_coin_struct import SwapCoinStruct from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker from gate_api.models.total_balance import TotalBalance diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py index 03cfb42..c3cdd89 100644 --- a/gate_api/api/account_api.py +++ b/gate_api/api/account_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -473,7 +473,7 @@ def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501 def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 """List users of the STP group # noqa: E501 - Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501 + Only the main account that created this STP group can query the account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_users(stp_id, async_req=True) @@ -498,7 +498,7 @@ def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501 """List users of the STP group # noqa: E501 - Only the main account that created this STP group is allowed to list the user ID of the STP group # noqa: E501 + Only the main account that created this STP group can query the account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_users_with_http_info(stp_id, async_req=True) diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py index 3beff6e..721d65b 100644 --- a/gate_api/api/collateral_loan_api.py +++ b/gate_api/api/collateral_loan_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -1141,7 +1141,7 @@ def list_collateral_currencies(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. + :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1165,7 +1165,7 @@ def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. If loan_currency is provided, the API will return an array of collateral currencies supported for the specified borrowing currency. + :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. :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/delivery_api.py b/gate_api/api/delivery_api.py index 7073438..324d0fa 100644 --- a/gate_api/api/delivery_api.py +++ b/gate_api/api/delivery_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -283,7 +283,7 @@ def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501 :param str contract: Futures contract (required) :param str interval: Order depth. 0 means no aggregation is applied. default to 0 :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -312,7 +312,7 @@ def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): :param str contract: Futures contract (required) :param str interval: Order depth. 0 means no aggregation is applied. default to 0 :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -423,7 +423,7 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int limit: Maximum number of records to be returned in a single list - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range + :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -452,7 +452,7 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int limit: Maximum number of records to be returned in a single list - :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range + :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time :param _return_http_data_only: response data without head status code @@ -569,9 +569,9 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -599,9 +599,9 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1062,8 +1062,8 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1090,8 +1090,8 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate :param _return_http_data_only: response data without head status code and headers @@ -1431,7 +1431,7 @@ def update_delivery_position_margin(self, settle, contract, change, **kwargs): :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str change: Margin change amount, positive number increases, negative number (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1457,7 +1457,7 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str change: Margin change amount, positive number increases, negative number (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1825,7 +1825,7 @@ def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 :param str contract: Futures contract :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param int count_total: Whether to return total number matched. Default to 0(no return) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1856,7 +1856,7 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa :param str contract: Futures contract :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param int count_total: Whether to return total number matched. Default to 0(no return) :param _return_http_data_only: response data without head status code and headers @@ -2477,7 +2477,7 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 :param int order: Futures order ID, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param int count_total: Whether to return total number matched. Default to 0(no return) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2507,7 +2507,7 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 :param int order: Futures order ID, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param int count_total: Whether to return total number matched. Default to 0(no return) :param _return_http_data_only: response data without head status code and headers diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index 50ba250..7c75714 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -611,8 +611,8 @@ def list_structured_products(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish (required) - :param str type: Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall + :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required) + :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball :param int page: Page number :param int limit: Maximum number of records to be returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -638,8 +638,8 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish (required) - :param str type: Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall + :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required) + :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball :param int page: Page number :param int limit: Maximum number of records to be returned in a single list :param _return_http_data_only: response data without head status code @@ -744,8 +744,8 @@ def list_structured_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int page: Page number :param int limit: Maximum number of records to be returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -771,8 +771,8 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int page: Page number :param int limit: Maximum number of records to be returned in a single list :param _return_http_data_only: response data without head status code @@ -977,7 +977,7 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no collection_formats=collection_formats) def find_coin(self, find_coin, **kwargs): # noqa: E501 - """链上赚币币种 # noqa: E501 + """Staking Coins # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1001,7 +1001,7 @@ def find_coin(self, find_coin, **kwargs): # noqa: E501 return self.find_coin_with_http_info(find_coin, **kwargs) # noqa: E501 def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 - """链上赚币币种 # noqa: E501 + """Staking Coins # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1109,7 +1109,7 @@ def swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: gate_api.SwapCoinStruct :return: If the method is called asynchronously, returns the request thread. """ @@ -1135,7 +1135,7 @@ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: None + :rtype: tuple(gate_api.SwapCoinStruct, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1181,6 +1181,10 @@ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 body_params = None if 'swap_coin' in local_var_params: body_params = local_var_params['swap_coin'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -1196,7 +1200,7 @@ def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='SwapCoinStruct', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index e181c0a..79bdbfb 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -378,7 +378,7 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 """Lend or redeem # noqa: E501 - `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501 + Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly determination, no interest will be earned for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_uni_lend(create_uni_lend, async_req=True) @@ -403,7 +403,7 @@ def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E501 """Lend or redeem # noqa: E501 - `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. # noqa: E501 + Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly determination, no interest will be earned for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_uni_lend_with_http_info(create_uni_lend, async_req=True) @@ -615,8 +615,8 @@ def list_uni_lend_records(self, **kwargs): # noqa: E501 :param str currency: Retrieve data of the specified currency :param int page: Page number :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: type: lend - lend, redeem - redeem :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -644,8 +644,8 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 :param str currency: Retrieve data of the specified currency :param int page: Page number :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: type: lend - lend, redeem - redeem :param _return_http_data_only: response data without head status code and headers @@ -866,8 +866,8 @@ def list_uni_interest_records(self, **kwargs): # noqa: E501 :param str currency: Retrieve data of the specified currency :param int page: Page number :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -894,8 +894,8 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 :param str currency: Retrieve data of the specified currency :param int page: Page number :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-02 10:50+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py index ac7a940..fd5f346 100644 --- a/gate_api/api/flash_swap_api.py +++ b/gate_api/api/flash_swap_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index ccd4113..b53f081 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -299,7 +299,7 @@ def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501 :param str contract: Futures contract (required) :param str interval: Order depth. 0 means no aggregation is applied. default to 0 :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -328,7 +328,7 @@ def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # :param str contract: Futures contract (required) :param str interval: Order depth. 0 means no aggregation is applied. default to 0 :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -592,7 +592,7 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -622,7 +622,7 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days :param _return_http_data_only: response data without head status code @@ -737,7 +737,7 @@ def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param str interval: Interval time between data points :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -767,7 +767,7 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param str interval: Interval time between data points :param _return_http_data_only: response data without head status code @@ -998,8 +998,8 @@ def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1026,8 +1026,8 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1511,7 +1511,7 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 """Retrieve liquidation history # noqa: E501 - Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501 + The maximum time interval between `from` and `to` is **3600 seconds**. Certain private fields will **not be returned** in public endpoints; refer to individual field descriptions for details. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders(settle, async_req=True) @@ -1520,8 +1520,8 @@ def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int limit: Maximum number of records to be returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1540,7 +1540,7 @@ def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 """Retrieve liquidation history # noqa: E501 - Interval between `from` and `to` cannot exceeds 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail. # noqa: E501 + The maximum time interval between `from` and `to` is **3600 seconds**. Certain private fields will **not be returned** in public endpoints; refer to individual field descriptions for details. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders_with_http_info(settle, async_req=True) @@ -1549,8 +1549,8 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int limit: Maximum number of records to be returned in a single list :param _return_http_data_only: response data without head status code and headers @@ -1896,7 +1896,7 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 def list_futures_account_book(self, settle, **kwargs): # noqa: E501 """Query account book # noqa: E501 - If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. # noqa: E501 + If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered。 2023-10-30 can be filtered。 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_account_book(settle, async_req=True) @@ -1907,8 +1907,8 @@ def list_futures_account_book(self, settle, **kwargs): # noqa: E501 :param str contract: Futures contract, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1927,7 +1927,7 @@ def list_futures_account_book(self, settle, **kwargs): # noqa: E501 def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 """Query account book # noqa: E501 - If the `contract` field is provided, it can only filter records that include this field after 2023-10-30. # noqa: E501 + If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered。 2023-10-30 can be filtered。 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_account_book_with_http_info(settle, async_req=True) @@ -1938,8 +1938,8 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E :param str contract: Futures contract, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction :param _return_http_data_only: response data without head status code and headers @@ -2308,7 +2308,7 @@ def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str change: Margin change amount, positive number increases, negative number (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2334,7 +2334,7 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str change: Margin change amount, positive number increases, negative number (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2820,7 +2820,7 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 """Enable or disable dual mode # noqa: E501 - Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501 + The prerequisite for changing mode is that all positions have no holdings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_dual_mode(settle, dual_mode, async_req=True) @@ -2846,7 +2846,7 @@ def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E501 """Enable or disable dual mode # noqa: E501 - Before setting dual mode, make sure all positions are closed and no orders are open # noqa: E501 + The prerequisite for changing mode is that all positions have no holdings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_dual_mode_with_http_info(settle, dual_mode, async_req=True) @@ -3072,7 +3072,7 @@ def update_dual_mode_position_margin(self, settle, contract, change, dual_side, :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str change: Margin change amount, positive number increases, negative number (required) :param str dual_side: Long or short position (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -3099,7 +3099,7 @@ def update_dual_mode_position_margin_with_http_info(self, settle, contract, chan :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract (required) - :param str change: Margin change. Use positive number to increase margin, negative number otherwise. (required) + :param str change: Margin change amount, positive number increases, negative number (required) :param str dual_side: Long or short position (required) :param _return_http_data_only: response data without head status code and headers @@ -3480,7 +3480,7 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 :param str contract: Futures contract, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3510,7 +3510,7 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: :param str contract: Futures contract, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3759,7 +3759,7 @@ def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501 :param str settle: Settle currency (required) :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask + :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 ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3787,7 +3787,7 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n :param str settle: Settle currency (required) :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask + :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 ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3890,8 +3890,8 @@ def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3919,8 +3919,8 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code @@ -4698,8 +4698,8 @@ def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 :param str role: Query role, maker or taker. @@ -4728,8 +4728,8 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq :param bool async_req: execute request asynchronously :param str settle: Settle currency (required) :param str contract: Futures contract, return related data only if specified - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 :param str role: Query role, maker or taker. @@ -4848,8 +4848,8 @@ def list_position_close(self, settle, **kwargs): # noqa: E501 :param str contract: Futures contract, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str side: Query side. long or shot :param str pnl: Query profit or loss :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4879,8 +4879,8 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 :param str contract: Futures contract, return related data only if specified :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str side: Query side. long or shot :param str pnl: Query profit or loss :param _return_http_data_only: response data without head status code @@ -5253,7 +5253,7 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 """Countdown cancel orders # noqa: E501 - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task, async_req=True) @@ -5279,7 +5279,7 @@ def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 """Countdown cancel orders # noqa: E501 - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, async_req=True) @@ -5497,7 +5497,7 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 def cancel_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E501 """Cancel a batch of orders with an ID list # noqa: E501 - Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. # noqa: E501 + Multiple different order IDs can be specified. A maximum of 20 records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_batch_future_orders(settle, request_body, async_req=True) @@ -5524,7 +5524,7 @@ def cancel_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwargs): # noqa: E501 """Cancel a batch of orders with an ID list # noqa: E501 - Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. # noqa: E501 + Multiple different order IDs can be specified. A maximum of 20 records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_batch_future_orders_with_http_info(settle, request_body, async_req=True) @@ -5629,7 +5629,7 @@ def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwar def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 """Batch modify orders with specified IDs # noqa: E501 - You can specify multiple different order IDs. You can only modify up to 10 orders in one request. # noqa: E501 + Multiple different order IDs can be specified. A maximum of 10 orders can # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_future_orders(settle, batch_amend_order_req, async_req=True) @@ -5656,7 +5656,7 @@ def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 """Batch modify orders with specified IDs # noqa: E501 - You can specify multiple different order IDs. You can only modify up to 10 orders in one request. # noqa: E501 + Multiple different order IDs can be specified. A maximum of 10 orders can # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, async_req=True) @@ -5758,6 +5758,129 @@ def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def get_futures_risk_limit_table(self, settle, table_id, **kwargs): # noqa: E501 + """Query risk limit table by table_id # noqa: E501 + + Just pass table_id. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_risk_limit_table(settle, table_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str table_id: Risk limit table ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.FuturesRiskLimitTier] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_futures_risk_limit_table_with_http_info(settle, table_id, **kwargs) # noqa: E501 + + def get_futures_risk_limit_table_with_http_info(self, settle, table_id, **kwargs): # noqa: E501 + """Query risk limit table by table_id # noqa: E501 + + Just pass table_id. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_futures_risk_limit_table_with_http_info(settle, table_id, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency (required) + :param str table_id: Risk limit table ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.FuturesRiskLimitTier], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'table_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_futures_risk_limit_table" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `get_futures_risk_limit_table`") # noqa: E501 + # verify the required parameter 'table_id' is set + if self.api_client.client_side_validation and ('table_id' not in local_var_params or # noqa: E501 + local_var_params['table_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `table_id` when calling `get_futures_risk_limit_table`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'settle' in local_var_params: + path_params['settle'] = local_var_params['settle'] # noqa: E501 + + query_params = [] + if 'table_id' in local_var_params and local_var_params['table_id'] is not None: # noqa: E501 + query_params.append(('table_id', local_var_params['table_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/risk_limit_table', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[FuturesRiskLimitTier]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 """List All Price-triggered Orders # noqa: E501 diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py index f37561f..a26190c 100644 --- a/gate_api/api/margin_api.py +++ b/gate_api/api/margin_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py index c9d80f0..dcea85b 100644 --- a/gate_api/api/margin_uni_api.py +++ b/gate_api/api/margin_uni_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -760,8 +760,8 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 :param str currency: Retrieve data of the specified currency :param int page: Page number :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -789,8 +789,8 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 :param str currency: Retrieve data of the specified currency :param int page: Page number :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index a115672..5502323 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -47,8 +47,8 @@ def list_multi_collateral_orders(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number of records to be returned in a single list - :param str sort: Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. - :param str order_type: Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders + :param str sort: Query the current interest rate of the currency in the previous hour + :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -74,8 +74,8 @@ def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int page: Page number :param int limit: Maximum number of records to be returned in a single list - :param str sort: Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. - :param str order_type: Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders + :param str sort: Query the current interest rate of the currency in the previous hour + :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -911,8 +911,8 @@ def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Currency types: collateral - collateral currency, borrow - borrowing currency. (required) - :param str currency: When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. (required) + :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing (required) + :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -936,8 +936,8 @@ def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Currency types: collateral - collateral currency, borrow - borrowing currency. (required) - :param str currency: When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. (required) + :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing (required) + :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1337,14 +1337,14 @@ def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501 def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 """Query the current interest rate of the currency # noqa: E501 - Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. # noqa: E501 + Query the current interest rate of the currency in the previous hour. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_multi_collateral_current_rate(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. (required) + :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100items. (required) :param str vip_level: VIP level, defaults to 0 if not transferred :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1363,14 +1363,14 @@ def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 """Query the current interest rate of the currency # noqa: E501 - Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. # noqa: E501 + Query the current interest rate of the currency in the previous hour. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_multi_collateral_current_rate_with_http_info(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. (required) + :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100items. (required) :param str vip_level: VIP level, defaults to 0 if not transferred :param _return_http_data_only: response data without head status code and headers diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py index 8a7e981..d41e16e 100644 --- a/gate_api/api/options_api.py +++ b/gate_api/api/options_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -492,8 +492,8 @@ def list_options_settlements(self, underlying, **kwargs): # noqa: E501 :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -520,8 +520,8 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -761,8 +761,8 @@ def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 :param str contract: Options contract name :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -790,8 +790,8 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n :param str contract: Options contract name :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -904,7 +904,7 @@ def list_options_order_book(self, contract, **kwargs): # noqa: E501 :param str contract: Options contract name (required) :param str interval: Order depth. 0 means no aggregation is applied. default to 0 :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -932,7 +932,7 @@ def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E :param str contract: Options contract name (required) :param str interval: Order depth. 0 means no aggregation is applied. default to 0 :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Whether the order book update ID will be returned. This ID increases by 1 on every order book update + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1259,8 +1259,8 @@ def list_options_candlesticks(self, contract, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str contract: Options contract name (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str interval: Interval time between data points :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1287,8 +1287,8 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str contract: Options contract name (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str interval: Interval time between data points :param _return_http_data_only: response data without head status code and headers @@ -1395,8 +1395,8 @@ def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E :param bool async_req: execute request asynchronously :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str interval: Interval time between data points :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1423,8 +1423,8 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar :param bool async_req: execute request asynchronously :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str interval: Interval time between data points :param _return_http_data_only: response data without head status code and headers @@ -1533,8 +1533,8 @@ def list_options_trades(self, **kwargs): # noqa: E501 :param str type: `C` is call, while `P` is put :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1562,8 +1562,8 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 :param str type: `C` is call, while `P` is put :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1773,8 +1773,8 @@ def list_options_account_book(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1801,8 +1801,8 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL :param _return_http_data_only: response data without head status code and headers @@ -2247,8 +2247,8 @@ def list_options_orders(self, status, **kwargs): # noqa: E501 :param str underlying: Underlying :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2277,8 +2277,8 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 :param str underlying: Underlying :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2970,8 +2970,8 @@ def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 :param str contract: Options contract name :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2999,8 +2999,8 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: :param str contract: Options contract name :param int limit: Maximum number of records to be returned in a single list :param int offset: List offset, starting from 0 - :param int _from: Start timestamp - :param int to: End timestamp + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index 7fe79dc..4c67b88 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py index 3f6d78c..d6420b4 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -586,7 +586,7 @@ def list_tickers_with_http_info(self, **kwargs): # noqa: E501 def list_order_book(self, currency_pair, **kwargs): # noqa: E501 """Retrieve order book # noqa: E501 - Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501 + Market depth buy orders are sorted by price from high to low, sell orders are reversed are reversed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_order_book(currency_pair, async_req=True) @@ -614,7 +614,7 @@ def list_order_book(self, currency_pair, **kwargs): # noqa: E501 def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501 """Retrieve order book # noqa: E501 - Order book will be sorted by price from high to low on bids; low to high on asks # noqa: E501 + Market depth buy orders are sorted by price from high to low, sell orders are reversed are reversed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_order_book_with_http_info(currency_pair, async_req=True) @@ -726,7 +726,7 @@ def list_trades(self, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency_pair: Currency pair (required) :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. :param int _from: Start timestamp of the query :param int to: Time range ending, default to current time @@ -757,7 +757,7 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency_pair: Currency pair (required) :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param str last_id: Specify list staring point using the `id` of last record in previous list-query results + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. :param int _from: Start timestamp of the query :param int to: Time range ending, default to current time @@ -877,7 +877,7 @@ def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501 :param str currency_pair: Currency pair (required) :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -906,7 +906,7 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5 :param str currency_pair: Currency pair (required) :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days :param _return_http_data_only: response data without head status code and headers @@ -2137,7 +2137,7 @@ def cancel_orders(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency_pair: Currency pair :param str side: All bids or asks. Both included if not specified - :param str account: Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` + :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify unified :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2166,7 +2166,7 @@ def cancel_orders_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency_pair: Currency pair :param str side: All bids or asks. Both included if not specified - :param str account: Specify Account Type - Classic Account: If not specified, all include - Unified Account: Specify `unified` + :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify unified :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -2647,7 +2647,7 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 """Amend an order # noqa: E501 - By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, it supports modifying the price or quantity (choose one of two), and also supports modifying the price and quantity at the same time About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation.Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_order(order_id, order_patch, async_req=True) @@ -2676,7 +2676,7 @@ def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: E501 """Amend an order # noqa: E501 - By default modify orders for spot, unified account and leverage account. At present, both the request body and query support currency_pair and account parameters, but the request body has higher priority currency_pair must be filled in the request body or query Currently, it supports modifying the price or quantity (choose one of two), and also supports modifying the price and quantity at the same time About speed limit: Modify orders and create orders to share speed limit rules About matching priority: Only modifying the quantity will become smaller and will not affect the priority of matching. If the price is modified or the quantity is modified, the priority will be adjusted to the end of the new price Precautions: Modification quantity is less than the transaction quantity will trigger the order cancellation operation # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation.Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_order_with_http_info(order_id, order_patch, async_req=True) @@ -3038,7 +3038,7 @@ def get_system_time_with_http_info(self, **kwargs): # noqa: E501 def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 """Countdown cancel orders # noqa: E501 - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_spot(countdown_cancel_all_spot_task, async_req=True) @@ -3063,7 +3063,7 @@ def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 """Countdown cancel orders # noqa: E501 - When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown`timeout` is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified `market` will be automatically cancelled, if no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the cacnel function will be cancelled. # noqa: E501 + Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, async_req=True) @@ -3156,7 +3156,7 @@ def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_tas def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 """Batch modification of orders # noqa: E501 - By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the order list # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_orders(batch_amend_item, async_req=True) @@ -3182,7 +3182,7 @@ def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa: E501 """Batch modification of orders # noqa: E501 - By default modify orders for spot, unified account and leverage account. Currently, only the price or quantity modification (choose one of two) Modify unfinished orders, up to 5 orders can be modified in batches at a time. The request parameters should be passed in array format. When the order modification fails during batch modification, the modification of the order will continue to be executed. After execution, the failure information of the corresponding order will be carried The order of calling the batch modification order is consistent with the order list The order of return content of batch modification orders is consistent with the order list # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_orders_with_http_info(batch_amend_item, async_req=True) diff --git a/gate_api/api/sub_account_api.py b/gate_api/api/sub_account_api.py index ff015c8..5f4c0a7 100644 --- a/gate_api/api/sub_account_api.py +++ b/gate_api/api/sub_account_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index 2d4f537..da297c2 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -1334,7 +1334,7 @@ def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 """Set mode of the unified account # noqa: E501 - 每种账户模式的切换只需要传对应账户模式的参数,同时支持在切换账户模式时打开或关闭对应账户模式下的配置开关 - 开通经典账户模式时,mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - 开通跨币种保证金模式,mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - 开通组合保证金模式时,mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - 开通单币种保证金模式时,mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_unified_mode(unified_mode_set, async_req=True) @@ -1359,7 +1359,7 @@ def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: E501 """Set mode of the unified account # noqa: E501 - 每种账户模式的切换只需要传对应账户模式的参数,同时支持在切换账户模式时打开或关闭对应账户模式下的配置开关 - 开通经典账户模式时,mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - 开通跨币种保证金模式,mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - 开通组合保证金模式时,mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - 开通单币种保证金模式时,mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_unified_mode_with_http_info(unified_mode_set, async_req=True) @@ -2466,7 +2466,7 @@ def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E50 collection_formats=collection_formats) def set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E501 - """设置抵押币种 # noqa: E501 + """Set Collateral Currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2490,7 +2490,7 @@ def set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E50 return self.set_unified_collateral_with_http_info(unified_collateral_req, **kwargs) # noqa: E501 def set_unified_collateral_with_http_info(self, unified_collateral_req, **kwargs): # noqa: E501 - """设置抵押币种 # noqa: E501 + """Set Collateral Currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py index 1870943..77ea410 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -668,7 +668,7 @@ def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501 def list_sub_account_transfers(self, **kwargs): # noqa: E501 """Retrieve transfer records between main and sub accounts # noqa: E501 - Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501 + Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_sub_account_transfers(async_req=True) @@ -697,7 +697,7 @@ def list_sub_account_transfers(self, **kwargs): # noqa: E501 def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 """Retrieve transfer records between main and sub accounts # noqa: E501 - Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved # noqa: E501 + Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_sub_account_transfers_with_http_info(async_req=True) diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py index 4cb4eee..a5a0c6e 100644 --- a/gate_api/api/withdrawal_api.py +++ b/gate_api/api/withdrawal_api.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/api_client.py b/gate_api/api_client.py index d434883..5a24c1b 100644 --- a/gate_api/api_client.py +++ b/gate_api/api_client.py @@ -1,8 +1,8 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -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/6.100.2/python' + self.user_agent = 'OpenAPI-Generator/6.102.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 854053f..e902f9b 100644 --- a/gate_api/configuration.py +++ b/gate_api/configuration.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -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: 4.100.2\n"\ - "SDK Package Version: 6.100.2".\ + "Version of the API: v4.102.0\n"\ + "SDK Package Version: 6.102.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py index 37171b2..916a649 100644 --- a/gate_api/exceptions.py +++ b/gate_api/exceptions.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py index 1a6b8e4..d31cd80 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -2,9 +2,9 @@ # flake8: noqa """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -104,6 +104,7 @@ from gate_api.models.futures_premium_index import FuturesPremiumIndex from gate_api.models.futures_price_trigger import FuturesPriceTrigger from gate_api.models.futures_price_triggered_order import FuturesPriceTriggeredOrder +from gate_api.models.futures_risk_limit_tier import FuturesRiskLimitTier from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.index_constituent import IndexConstituent @@ -212,6 +213,7 @@ from gate_api.models.sub_cross_margin_account import SubCrossMarginAccount from gate_api.models.sub_user_mode import SubUserMode from gate_api.models.swap_coin import SwapCoin +from gate_api.models.swap_coin_struct import SwapCoinStruct from gate_api.models.system_time import SystemTime from gate_api.models.ticker import Ticker from gate_api.models.total_balance import TotalBalance diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py index c9e2f82..9a8c6c9 100644 --- a/gate_api/models/account_balance.py +++ b/gate_api/models/account_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py index 9ea7e58..9f40e7e 100644 --- a/gate_api/models/account_detail.py +++ b/gate_api/models/account_detail.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -195,7 +195,7 @@ def key(self, key): def copy_trading_role(self): """Gets the copy_trading_role of this AccountDetail. # noqa: E501 - User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower # noqa: E501 + User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower # noqa: E501 :return: The copy_trading_role of this AccountDetail. # noqa: E501 :rtype: int @@ -206,7 +206,7 @@ def copy_trading_role(self): def copy_trading_role(self, copy_trading_role): """Sets the copy_trading_role of this AccountDetail. - User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower # noqa: E501 + User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower # noqa: E501 :param copy_trading_role: The copy_trading_role of this AccountDetail. # noqa: E501 :type: int diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py index e333cd4..600a035 100644 --- a/gate_api/models/account_detail_key.py +++ b/gate_api/models/account_detail_key.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py index 7c49f39..3516866 100644 --- a/gate_api/models/account_rate_limit.py +++ b/gate_api/models/account_rate_limit.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py index 61b99f4..7bb1c9d 100644 --- a/gate_api/models/agency_commission.py +++ b/gate_api/models/agency_commission.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py index 66f5eae..24236b5 100644 --- a/gate_api/models/agency_commission_history.py +++ b/gate_api/models/agency_commission_history.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py index deaddd7..85194ec 100644 --- a/gate_api/models/agency_transaction.py +++ b/gate_api/models/agency_transaction.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py index e13e117..f763169 100644 --- a/gate_api/models/agency_transaction_history.py +++ b/gate_api/models/agency_transaction_history.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py index 949d95f..3e25e28 100644 --- a/gate_api/models/auto_repay_setting.py +++ b/gate_api/models/auto_repay_setting.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py index 31506bc..99829ee 100644 --- a/gate_api/models/batch_amend_item.py +++ b/gate_api/models/batch_amend_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -158,7 +158,7 @@ def account(self, account): def amount(self): """Gets the amount of this BatchAmendItem. # noqa: E501 - trade amount, only one of amount and price can be specified # noqa: E501 + Trading Quantity. Only one of amountor pricecan be specified. # noqa: E501 :return: The amount of this BatchAmendItem. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BatchAmendItem. - trade amount, only one of amount and price can be specified # noqa: E501 + Trading Quantity. Only one of amountor pricecan be specified. # noqa: E501 :param amount: The amount of this BatchAmendItem. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def amount(self, amount): def price(self): """Gets the price of this BatchAmendItem. # noqa: E501 - trade price, only one of amount and price can be specified # noqa: E501 + Trading Price. Only one of amountor pricecan be specified. # noqa: E501 :return: The price of this BatchAmendItem. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def price(self): def price(self, price): """Sets the price of this BatchAmendItem. - trade price, only one of amount and price can be specified # noqa: E501 + Trading Price. Only one of amountor pricecan be specified. # noqa: E501 :param price: The price of this BatchAmendItem. # noqa: E501 :type: str diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py index 6700166..18061a2 100644 --- a/gate_api/models/batch_amend_order_req.py +++ b/gate_api/models/batch_amend_order_req.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py index 70a18fe..9181c70 100644 --- a/gate_api/models/batch_futures_order.py +++ b/gate_api/models/batch_futures_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py index 55c5094..4f1e64f 100644 --- a/gate_api/models/batch_order.py +++ b/gate_api/models/batch_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -542,7 +542,7 @@ def currency_pair(self, currency_pair): def type(self): """Gets the type of this BatchOrder. # noqa: E501 - Order Type - limit : Limit Order - market : Market Order # noqa: E501 + Order Type - limit : Limit Order - market : Market Order # noqa: E501 :return: The type of this BatchOrder. # noqa: E501 :rtype: str @@ -553,7 +553,7 @@ def type(self): def type(self, type): """Sets the type of this BatchOrder. - Order Type - limit : Limit Order - market : Market Order # noqa: E501 + Order Type - limit : Limit Order - market : Market Order # noqa: E501 :param type: The type of this BatchOrder. # noqa: E501 :type: str @@ -600,7 +600,7 @@ def account(self, account): def side(self): """Gets the side of this BatchOrder. # noqa: E501 - Order side # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this BatchOrder. # noqa: E501 :rtype: str @@ -611,7 +611,7 @@ def side(self): def side(self, side): """Sets the side of this BatchOrder. - Order side # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this BatchOrder. # noqa: E501 :type: str diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py index b87d5d1..bcbe4a1 100644 --- a/gate_api/models/borrow_currency_info.py +++ b/gate_api/models/borrow_currency_info.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py index f976342..1a400d3 100644 --- a/gate_api/models/broker_commission.py +++ b/gate_api/models/broker_commission.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py index f8e6734..c5649e1 100644 --- a/gate_api/models/broker_commission1.py +++ b/gate_api/models/broker_commission1.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_commission_sub_broker_info.py b/gate_api/models/broker_commission_sub_broker_info.py index 95e249b..8227a43 100644 --- a/gate_api/models/broker_commission_sub_broker_info.py +++ b/gate_api/models/broker_commission_sub_broker_info.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py index b61be3d..5fbac5c 100644 --- a/gate_api/models/broker_transaction.py +++ b/gate_api/models/broker_transaction.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py index 9ee5327..0df44f3 100644 --- a/gate_api/models/broker_transaction1.py +++ b/gate_api/models/broker_transaction1.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py index ddabbbf..ed26ad3 100644 --- a/gate_api/models/cancel_batch_order.py +++ b/gate_api/models/cancel_batch_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py index 68063e6..9f54d3b 100644 --- a/gate_api/models/cancel_order_result.py +++ b/gate_api/models/cancel_order_result.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py index d89dccb..82b2560 100644 --- a/gate_api/models/collateral_adjust.py +++ b/gate_api/models/collateral_adjust.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py index d8c5d22..a09b795 100644 --- a/gate_api/models/collateral_adjust_res.py +++ b/gate_api/models/collateral_adjust_res.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py index bd5bd38..41da376 100644 --- a/gate_api/models/collateral_align.py +++ b/gate_api/models/collateral_align.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py index 93f73b7..8058f53 100644 --- a/gate_api/models/collateral_currency.py +++ b/gate_api/models/collateral_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py index 6c946d2..7ab7829 100644 --- a/gate_api/models/collateral_currency_info.py +++ b/gate_api/models/collateral_currency_info.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py index 58dce85..26f9de1 100644 --- a/gate_api/models/collateral_currency_res.py +++ b/gate_api/models/collateral_currency_res.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py index 4c9e81b..49104ea 100644 --- a/gate_api/models/collateral_current_rate.py +++ b/gate_api/models/collateral_current_rate.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py index 725b004..4bf8eff 100644 --- a/gate_api/models/collateral_fix_rate.py +++ b/gate_api/models/collateral_fix_rate.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py index af6aa68..2c0809a 100644 --- a/gate_api/models/collateral_loan_currency.py +++ b/gate_api/models/collateral_loan_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py index 9e86b8e..2f115ee 100644 --- a/gate_api/models/collateral_ltv.py +++ b/gate_api/models/collateral_ltv.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py index 62a8e8a..21db0e5 100644 --- a/gate_api/models/collateral_order.py +++ b/gate_api/models/collateral_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py index 7c36536..a2fed8c 100644 --- a/gate_api/models/collateral_record.py +++ b/gate_api/models/collateral_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index 6c50d39..2abb580 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -760,7 +760,7 @@ def order_size_max(self, order_size_max): def order_price_deviate(self): """Gets the order_price_deviate of this Contract. # noqa: E501 - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :return: The order_price_deviate of this Contract. # noqa: E501 :rtype: str @@ -771,7 +771,7 @@ def order_price_deviate(self): def order_price_deviate(self, order_price_deviate): """Sets the order_price_deviate of this Contract. - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :param order_price_deviate: The order_price_deviate of this Contract. # noqa: E501 :type: str @@ -1105,7 +1105,7 @@ def status(self, status): def launch_time(self): """Gets the launch_time of this Contract. # noqa: E501 - 合约开盘时间 # noqa: E501 + Contract expiry timestamp # noqa: E501 :return: The launch_time of this Contract. # noqa: E501 :rtype: int @@ -1116,7 +1116,7 @@ def launch_time(self): def launch_time(self, launch_time): """Sets the launch_time of this Contract. - 合约开盘时间 # noqa: E501 + Contract expiry timestamp # noqa: E501 :param launch_time: The launch_time of this Contract. # noqa: E501 :type: int diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index b90ca94..536bbf3 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py index d4856cf..e8d6361 100644 --- a/gate_api/models/convert_small_balance.py +++ b/gate_api/models/convert_small_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py index 2b29585..1297dc9 100644 --- a/gate_api/models/countdown_cancel_all_futures_task.py +++ b/gate_api/models/countdown_cancel_all_futures_task.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -61,7 +61,7 @@ def __init__(self, timeout=None, contract=None, local_vars_configuration=None): def timeout(self): """Gets the timeout of this CountdownCancelAllFuturesTask. # noqa: E501 - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501 :return: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501 :rtype: int @@ -72,7 +72,7 @@ def timeout(self): def timeout(self, timeout): """Sets the timeout of this CountdownCancelAllFuturesTask. - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501 :param timeout: The timeout of this CountdownCancelAllFuturesTask. # noqa: E501 :type: int diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py index 5c56f5e..60d25b1 100644 --- a/gate_api/models/countdown_cancel_all_options_task.py +++ b/gate_api/models/countdown_cancel_all_options_task.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -66,7 +66,7 @@ def __init__(self, timeout=None, contract=None, underlying=None, local_vars_conf def timeout(self): """Gets the timeout of this CountdownCancelAllOptionsTask. # noqa: E501 - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501 :return: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501 :rtype: int @@ -77,7 +77,7 @@ def timeout(self): def timeout(self, timeout): """Sets the timeout of this CountdownCancelAllOptionsTask. - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501 :param timeout: The timeout of this CountdownCancelAllOptionsTask. # noqa: E501 :type: int diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py index 8a79bd5..60b2e1d 100644 --- a/gate_api/models/countdown_cancel_all_spot_task.py +++ b/gate_api/models/countdown_cancel_all_spot_task.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -61,7 +61,7 @@ def __init__(self, timeout=None, currency_pair=None, local_vars_configuration=No def timeout(self): """Gets the timeout of this CountdownCancelAllSpotTask. # noqa: E501 - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501 :return: The timeout of this CountdownCancelAllSpotTask. # noqa: E501 :rtype: int @@ -72,7 +72,7 @@ def timeout(self): def timeout(self, timeout): """Sets the timeout of this CountdownCancelAllSpotTask. - Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown # noqa: E501 + Countdown time in seconds At least 5 seconds, 0 means cancel countdown # noqa: E501 :param timeout: The timeout of this CountdownCancelAllSpotTask. # noqa: E501 :type: int diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py index 185122a..11532b7 100644 --- a/gate_api/models/create_collateral_order.py +++ b/gate_api/models/create_collateral_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py index 41edc85..9461b6f 100644 --- a/gate_api/models/create_multi_collateral_order.py +++ b/gate_api/models/create_multi_collateral_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py index 708d506..1fda1c1 100644 --- a/gate_api/models/create_uni_lend.py +++ b/gate_api/models/create_uni_lend.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py index c95c199..43b70b7 100644 --- a/gate_api/models/create_uni_loan.py +++ b/gate_api/models/create_uni_loan.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py index b52cce6..20f275e 100644 --- a/gate_api/models/cross_margin_balance.py +++ b/gate_api/models/cross_margin_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py index 65d0cf4..9e224d9 100644 --- a/gate_api/models/cross_margin_loan.py +++ b/gate_api/models/cross_margin_loan.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py index f3a5e98..c699aed 100644 --- a/gate_api/models/cross_margin_repayment.py +++ b/gate_api/models/cross_margin_repayment.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py index c1f7c4c..aab1819 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py index cb4d707..819e78d 100644 --- a/gate_api/models/currency_chain.py +++ b/gate_api/models/currency_chain.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index 72c9bb4..a9c48f6 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -50,7 +50,8 @@ class CurrencyPair(object): 'buy_start': 'int', 'delisting_time': 'int', 'type': 'str', - 'trade_url': 'str' + 'trade_url': 'str', + 'st_tag': 'bool' } attribute_map = { @@ -71,11 +72,12 @@ class CurrencyPair(object): 'buy_start': 'buy_start', 'delisting_time': 'delisting_time', 'type': 'type', - 'trade_url': 'trade_url' + 'trade_url': 'trade_url', + 'st_tag': 'st_tag' } - def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=None, fee=None, min_base_amount=None, min_quote_amount=None, max_base_amount=None, max_quote_amount=None, amount_precision=None, precision=None, trade_status=None, sell_start=None, buy_start=None, delisting_time=None, type=None, trade_url=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, int, int, str, int, int, int, str, str, Configuration) -> None + def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=None, fee=None, min_base_amount=None, min_quote_amount=None, max_base_amount=None, max_quote_amount=None, amount_precision=None, precision=None, trade_status=None, sell_start=None, buy_start=None, delisting_time=None, type=None, trade_url=None, st_tag=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, int, int, str, int, int, int, str, str, bool, Configuration) -> None """CurrencyPair - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -99,6 +101,7 @@ def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=No self._delisting_time = None self._type = None self._trade_url = None + self._st_tag = None self.discriminator = None if id is not None: @@ -137,6 +140,8 @@ def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=No self.type = type if trade_url is not None: self.trade_url = trade_url + if st_tag is not None: + self.st_tag = st_tag @property def id(self): @@ -558,6 +563,29 @@ def trade_url(self, trade_url): self._trade_url = trade_url + @property + def st_tag(self): + """Gets the st_tag of this CurrencyPair. # noqa: E501 + + Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501 + + :return: The st_tag of this CurrencyPair. # noqa: E501 + :rtype: bool + """ + return self._st_tag + + @st_tag.setter + def st_tag(self, st_tag): + """Sets the st_tag of this CurrencyPair. + + Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501 + + :param st_tag: The st_tag of this CurrencyPair. # noqa: E501 + :type: bool + """ + + self._st_tag = st_tag + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py index 413359e..de6261d 100644 --- a/gate_api/models/currency_quota.py +++ b/gate_api/models/currency_quota.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py index b3be63a..305d86f 100644 --- a/gate_api/models/debit_fee.py +++ b/gate_api/models/debit_fee.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py index f1342ef..025cc0b 100644 --- a/gate_api/models/delivery_candlestick.py +++ b/gate_api/models/delivery_candlestick.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py index b59d4e9..ad6c046 100644 --- a/gate_api/models/delivery_contract.py +++ b/gate_api/models/delivery_contract.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -904,7 +904,7 @@ def order_size_max(self, order_size_max): def order_price_deviate(self): """Gets the order_price_deviate of this DeliveryContract. # noqa: E501 - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :return: The order_price_deviate of this DeliveryContract. # noqa: E501 :rtype: str @@ -915,7 +915,7 @@ def order_price_deviate(self): def order_price_deviate(self, order_price_deviate): """Sets the order_price_deviate of this DeliveryContract. - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :param order_price_deviate: The order_price_deviate of this DeliveryContract. # noqa: E501 :type: str diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py index c52f9dc..5aaefc0 100644 --- a/gate_api/models/delivery_settlement.py +++ b/gate_api/models/delivery_settlement.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/delivery_ticker.py b/gate_api/models/delivery_ticker.py index e0a8d36..87eb57c 100644 --- a/gate_api/models/delivery_ticker.py +++ b/gate_api/models/delivery_ticker.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py index 4946b95..9a5cdf3 100644 --- a/gate_api/models/deposit_address.py +++ b/gate_api/models/deposit_address.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py index c9381d8..2cf4d9a 100644 --- a/gate_api/models/deposit_record.py +++ b/gate_api/models/deposit_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py index a7c42bc..3a3cdde 100644 --- a/gate_api/models/dual_get_orders.py +++ b/gate_api/models/dual_get_orders.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py index b501a56..208b83a 100644 --- a/gate_api/models/dual_get_plans.py +++ b/gate_api/models/dual_get_plans.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py index 79ea7cf..7b8b389 100644 --- a/gate_api/models/eth2_rate_list.py +++ b/gate_api/models/eth2_rate_list.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py index 643de0b..2693017 100644 --- a/gate_api/models/eth2_swap.py +++ b/gate_api/models/eth2_swap.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/find_coin.py b/gate_api/models/find_coin.py index d677e9c..599957a 100644 --- a/gate_api/models/find_coin.py +++ b/gate_api/models/find_coin.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py index 278bfef..9cb705e 100644 --- a/gate_api/models/flash_swap_currency_pair.py +++ b/gate_api/models/flash_swap_currency_pair.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py index ff42e04..fc7deb8 100644 --- a/gate_api/models/flash_swap_order.py +++ b/gate_api/models/flash_swap_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py index 3330a5a..c4badfe 100644 --- a/gate_api/models/flash_swap_order_preview.py +++ b/gate_api/models/flash_swap_order_preview.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -105,7 +105,7 @@ def preview_id(self, preview_id): def sell_currency(self): """Gets the sell_currency of this FlashSwapOrderPreview. # noqa: E501 - Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501 :return: The sell_currency of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def sell_currency(self): def sell_currency(self, sell_currency): """Sets the sell_currency of this FlashSwapOrderPreview. - Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501 :param sell_currency: The sell_currency of this FlashSwapOrderPreview. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def sell_amount(self, sell_amount): def buy_currency(self): """Gets the buy_currency of this FlashSwapOrderPreview. # noqa: E501 - Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501 :return: The buy_currency of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def buy_currency(self): def buy_currency(self, buy_currency): """Sets the buy_currency of this FlashSwapOrderPreview. - Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` # noqa: E501 + Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain # noqa: E501 :param buy_currency: The buy_currency of this FlashSwapOrderPreview. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py index 71587e1..8390892 100644 --- a/gate_api/models/flash_swap_order_request.py +++ b/gate_api/models/flash_swap_order_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -97,7 +97,7 @@ def preview_id(self, preview_id): def sell_currency(self): """Gets the sell_currency of this FlashSwapOrderRequest. # noqa: E501 - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501 :return: The sell_currency of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -108,7 +108,7 @@ def sell_currency(self): def sell_currency(self, sell_currency): """Sets the sell_currency of this FlashSwapOrderRequest. - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501 :param sell_currency: The sell_currency of this FlashSwapOrderRequest. # noqa: E501 :type: str @@ -147,7 +147,7 @@ def sell_amount(self, sell_amount): def buy_currency(self): """Gets the buy_currency of this FlashSwapOrderRequest. # noqa: E501 - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501 :return: The buy_currency of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -158,7 +158,7 @@ def buy_currency(self): def buy_currency(self, buy_currency): """Sets the buy_currency of this FlashSwapOrderRequest. - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap # noqa: E501 :param buy_currency: The buy_currency of this FlashSwapOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py index 7f3b76b..e04087b 100644 --- a/gate_api/models/flash_swap_preview_request.py +++ b/gate_api/models/flash_swap_preview_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py index ea61f30..1085947 100644 --- a/gate_api/models/funding_account.py +++ b/gate_api/models/funding_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py index fa1ffd2..7d0e33b 100644 --- a/gate_api/models/funding_rate_record.py +++ b/gate_api/models/funding_rate_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py index ad66393..2799ed5 100644 --- a/gate_api/models/future_cancel_order_result.py +++ b/gate_api/models/future_cancel_order_result.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py index 480cac8..9ba2273 100644 --- a/gate_api/models/futures_account.py +++ b/gate_api/models/futures_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,6 +57,7 @@ class FuturesAccount(object): 'isolated_position_margin': 'str', 'enable_new_dual_mode': 'bool', 'margin_mode': 'int', + 'enable_tiered_mm': 'bool', 'history': 'FuturesAccountHistory' } @@ -85,11 +86,12 @@ class FuturesAccount(object): 'isolated_position_margin': 'isolated_position_margin', 'enable_new_dual_mode': 'enable_new_dual_mode', 'margin_mode': 'margin_mode', + 'enable_tiered_mm': 'enable_tiered_mm', 'history': 'history' } - def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_margin=None, available=None, point=None, currency=None, in_dual_mode=None, enable_credit=None, position_initial_margin=None, maintenance_margin=None, bonus=None, enable_evolved_classic=None, cross_order_margin=None, cross_initial_margin=None, cross_maintenance_margin=None, cross_unrealised_pnl=None, cross_available=None, cross_margin_balance=None, cross_mmr=None, cross_imr=None, isolated_position_margin=None, enable_new_dual_mode=None, margin_mode=None, history=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, bool, bool, str, str, str, bool, str, str, str, str, str, str, str, str, str, bool, int, FuturesAccountHistory, Configuration) -> None + def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_margin=None, available=None, point=None, currency=None, in_dual_mode=None, enable_credit=None, position_initial_margin=None, maintenance_margin=None, bonus=None, enable_evolved_classic=None, cross_order_margin=None, cross_initial_margin=None, cross_maintenance_margin=None, cross_unrealised_pnl=None, cross_available=None, cross_margin_balance=None, cross_mmr=None, cross_imr=None, isolated_position_margin=None, enable_new_dual_mode=None, margin_mode=None, enable_tiered_mm=None, history=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, bool, bool, str, str, str, bool, str, str, str, str, str, str, str, str, str, bool, int, bool, FuturesAccountHistory, Configuration) -> None """FuturesAccount - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -119,6 +121,7 @@ def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_ self._isolated_position_margin = None self._enable_new_dual_mode = None self._margin_mode = None + self._enable_tiered_mm = None self._history = None self.discriminator = None @@ -170,6 +173,8 @@ def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_ self.enable_new_dual_mode = enable_new_dual_mode if margin_mode is not None: self.margin_mode = margin_mode + if enable_tiered_mm is not None: + self.enable_tiered_mm = enable_tiered_mm if history is not None: self.history = history @@ -725,6 +730,29 @@ def margin_mode(self, margin_mode): self._margin_mode = margin_mode + @property + def enable_tiered_mm(self): + """Gets the enable_tiered_mm of this FuturesAccount. # noqa: E501 + + Whether to enable tiered maintenance margin calculation # noqa: E501 + + :return: The enable_tiered_mm of this FuturesAccount. # noqa: E501 + :rtype: bool + """ + return self._enable_tiered_mm + + @enable_tiered_mm.setter + def enable_tiered_mm(self, enable_tiered_mm): + """Sets the enable_tiered_mm of this FuturesAccount. + + Whether to enable tiered maintenance margin calculation # noqa: E501 + + :param enable_tiered_mm: The enable_tiered_mm of this FuturesAccount. # noqa: E501 + :type: bool + """ + + self._enable_tiered_mm = enable_tiered_mm + @property def history(self): """Gets the history of this FuturesAccount. # noqa: E501 diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py index c0c118b..49e1632 100644 --- a/gate_api/models/futures_account_book.py +++ b/gate_api/models/futures_account_book.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -259,7 +259,7 @@ def trade_id(self, trade_id): def id(self): """Gets the id of this FuturesAccountBook. # noqa: E501 - 账户变更记录 id # noqa: E501 + Account change record ID # noqa: E501 :return: The id of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -270,7 +270,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesAccountBook. - 账户变更记录 id # noqa: E501 + Account change record ID # noqa: E501 :param id: The id of this FuturesAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py index 3c6eabf..bd8bd35 100644 --- a/gate_api/models/futures_account_history.py +++ b/gate_api/models/futures_account_history.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py index 66e5f52..c024a58 100644 --- a/gate_api/models/futures_auto_deleverage.py +++ b/gate_api/models/futures_auto_deleverage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py index 2058f2c..d810873 100644 --- a/gate_api/models/futures_batch_amend_order_request.py +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py index 17a4b23..f40563c 100644 --- a/gate_api/models/futures_candlestick.py +++ b/gate_api/models/futures_candlestick.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py index 1b1d45d..7b34cd8 100644 --- a/gate_api/models/futures_fee.py +++ b/gate_api/models/futures_fee.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py index 0fba456..94be61b 100644 --- a/gate_api/models/futures_index_constituents.py +++ b/gate_api/models/futures_index_constituents.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py index 5cf4aeb..52b3a90 100644 --- a/gate_api/models/futures_initial_order.py +++ b/gate_api/models/futures_initial_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py index cef5f15..448dd48 100644 --- a/gate_api/models/futures_limit_risk_tiers.py +++ b/gate_api/models/futures_limit_risk_tiers.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -38,7 +38,8 @@ class FuturesLimitRiskTiers(object): 'initial_rate': 'str', 'maintenance_rate': 'str', 'leverage_max': 'str', - 'contract': 'str' + 'contract': 'str', + 'deduction': 'str' } attribute_map = { @@ -47,11 +48,12 @@ class FuturesLimitRiskTiers(object): 'initial_rate': 'initial_rate', 'maintenance_rate': 'maintenance_rate', 'leverage_max': 'leverage_max', - 'contract': 'contract' + 'contract': 'contract', + 'deduction': 'deduction' } - def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_rate=None, leverage_max=None, contract=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, str, Configuration) -> None + def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_rate=None, leverage_max=None, contract=None, deduction=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, str, Configuration) -> None """FuturesLimitRiskTiers - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -63,6 +65,7 @@ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_ra self._maintenance_rate = None self._leverage_max = None self._contract = None + self._deduction = None self.discriminator = None if tier is not None: @@ -77,6 +80,8 @@ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_ra self.leverage_max = leverage_max if contract is not None: self.contract = contract + if deduction is not None: + self.deduction = deduction @property def tier(self): @@ -216,6 +221,29 @@ def contract(self, contract): self._contract = contract + @property + def deduction(self): + """Gets the deduction of this FuturesLimitRiskTiers. # noqa: E501 + + Maintenance margin quick calculation deduction # noqa: E501 + + :return: The deduction of this FuturesLimitRiskTiers. # noqa: E501 + :rtype: str + """ + return self._deduction + + @deduction.setter + def deduction(self, deduction): + """Sets the deduction of this FuturesLimitRiskTiers. + + Maintenance margin quick calculation deduction # noqa: E501 + + :param deduction: The deduction of this FuturesLimitRiskTiers. # noqa: E501 + :type: str + """ + + self._deduction = deduction + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py index 0ba0dbe..15fe47f 100644 --- a/gate_api/models/futures_liq_order.py +++ b/gate_api/models/futures_liq_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py index c476264..41cba35 100644 --- a/gate_api/models/futures_liquidate.py +++ b/gate_api/models/futures_liquidate.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index 6f8c52a..24ce0d6 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py index 4f75c50..2de0040 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py index b435df6..12d27a6 100644 --- a/gate_api/models/futures_order_book.py +++ b/gate_api/models/futures_order_book.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py index 3dce8de..9ebc223 100644 --- a/gate_api/models/futures_order_book_item.py +++ b/gate_api/models/futures_order_book_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_position_cross_mode.py b/gate_api/models/futures_position_cross_mode.py index 66bfd50..a5778a2 100644 --- a/gate_api/models/futures_position_cross_mode.py +++ b/gate_api/models/futures_position_cross_mode.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py index bb8ccfd..dcd47b7 100644 --- a/gate_api/models/futures_premium_index.py +++ b/gate_api/models/futures_premium_index.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py index ec76a9a..02fb0ac 100644 --- a/gate_api/models/futures_price_trigger.py +++ b/gate_api/models/futures_price_trigger.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index 6ec9cdb..062f02b 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_risk_limit_tier.py b/gate_api/models/futures_risk_limit_tier.py new file mode 100644 index 0000000..08e3e6a --- /dev/null +++ b/gate_api/models/futures_risk_limit_tier.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class FuturesRiskLimitTier(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'tier': 'int', + 'risk_limit': 'str', + 'initial_rate': 'str', + 'maintenance_rate': 'str', + 'leverage_max': 'str', + 'deduction': 'str' + } + + attribute_map = { + 'tier': 'tier', + 'risk_limit': 'risk_limit', + 'initial_rate': 'initial_rate', + 'maintenance_rate': 'maintenance_rate', + 'leverage_max': 'leverage_max', + 'deduction': 'deduction' + } + + def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_rate=None, leverage_max=None, deduction=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, str, str, Configuration) -> None + """FuturesRiskLimitTier - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._tier = None + self._risk_limit = None + self._initial_rate = None + self._maintenance_rate = None + self._leverage_max = None + self._deduction = None + self.discriminator = None + + if tier is not None: + self.tier = tier + if risk_limit is not None: + self.risk_limit = risk_limit + if initial_rate is not None: + self.initial_rate = initial_rate + if maintenance_rate is not None: + self.maintenance_rate = maintenance_rate + if leverage_max is not None: + self.leverage_max = leverage_max + if deduction is not None: + self.deduction = deduction + + @property + def tier(self): + """Gets the tier of this FuturesRiskLimitTier. # noqa: E501 + + Tier # noqa: E501 + + :return: The tier of this FuturesRiskLimitTier. # noqa: E501 + :rtype: int + """ + return self._tier + + @tier.setter + def tier(self, tier): + """Sets the tier of this FuturesRiskLimitTier. + + Tier # noqa: E501 + + :param tier: The tier of this FuturesRiskLimitTier. # noqa: E501 + :type: int + """ + + self._tier = tier + + @property + def risk_limit(self): + """Gets the risk_limit of this FuturesRiskLimitTier. # noqa: E501 + + Position risk limit # noqa: E501 + + :return: The risk_limit of this FuturesRiskLimitTier. # noqa: E501 + :rtype: str + """ + return self._risk_limit + + @risk_limit.setter + def risk_limit(self, risk_limit): + """Sets the risk_limit of this FuturesRiskLimitTier. + + Position risk limit # noqa: E501 + + :param risk_limit: The risk_limit of this FuturesRiskLimitTier. # noqa: E501 + :type: str + """ + + self._risk_limit = risk_limit + + @property + def initial_rate(self): + """Gets the initial_rate of this FuturesRiskLimitTier. # noqa: E501 + + Initial margin rate # noqa: E501 + + :return: The initial_rate of this FuturesRiskLimitTier. # noqa: E501 + :rtype: str + """ + return self._initial_rate + + @initial_rate.setter + def initial_rate(self, initial_rate): + """Sets the initial_rate of this FuturesRiskLimitTier. + + Initial margin rate # noqa: E501 + + :param initial_rate: The initial_rate of this FuturesRiskLimitTier. # noqa: E501 + :type: str + """ + + self._initial_rate = initial_rate + + @property + def maintenance_rate(self): + """Gets the maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 + + Maintenance margin rate # noqa: E501 + + :return: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 + :rtype: str + """ + return self._maintenance_rate + + @maintenance_rate.setter + def maintenance_rate(self, maintenance_rate): + """Sets the maintenance_rate of this FuturesRiskLimitTier. + + Maintenance margin rate # noqa: E501 + + :param maintenance_rate: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 + :type: str + """ + + self._maintenance_rate = maintenance_rate + + @property + def leverage_max(self): + """Gets the leverage_max of this FuturesRiskLimitTier. # noqa: E501 + + Maximum leverage # noqa: E501 + + :return: The leverage_max of this FuturesRiskLimitTier. # noqa: E501 + :rtype: str + """ + return self._leverage_max + + @leverage_max.setter + def leverage_max(self, leverage_max): + """Sets the leverage_max of this FuturesRiskLimitTier. + + Maximum leverage # noqa: E501 + + :param leverage_max: The leverage_max of this FuturesRiskLimitTier. # noqa: E501 + :type: str + """ + + self._leverage_max = leverage_max + + @property + def deduction(self): + """Gets the deduction of this FuturesRiskLimitTier. # noqa: E501 + + Maintenance margin quick calculation deduction # noqa: E501 + + :return: The deduction of this FuturesRiskLimitTier. # noqa: E501 + :rtype: str + """ + return self._deduction + + @deduction.setter + def deduction(self, deduction): + """Sets the deduction of this FuturesRiskLimitTier. + + Maintenance margin quick calculation deduction # noqa: E501 + + :param deduction: The deduction of this FuturesRiskLimitTier. # noqa: E501 + :type: str + """ + + self._deduction = deduction + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesRiskLimitTier): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesRiskLimitTier): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py index e2eb8d0..14557b9 100644 --- a/gate_api/models/futures_ticker.py +++ b/gate_api/models/futures_ticker.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py index 9bdfbd2..0b0a14f 100644 --- a/gate_api/models/futures_trade.py +++ b/gate_api/models/futures_trade.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py index 32b81dc..7399829 100644 --- a/gate_api/models/index_constituent.py +++ b/gate_api/models/index_constituent.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py index 58c26cf..3ab77b7 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py index 77430d5..c15d0fb 100644 --- a/gate_api/models/inline_response2001.py +++ b/gate_api/models/inline_response2001.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py index fa57ff5..b0381b8 100644 --- a/gate_api/models/insurance_record.py +++ b/gate_api/models/insurance_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py index 5f54624..404e9cd 100644 --- a/gate_api/models/ledger_record.py +++ b/gate_api/models/ledger_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py index 398c733..c1a67d9 100644 --- a/gate_api/models/liquidate_order.py +++ b/gate_api/models/liquidate_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py index 8b5e8b0..34b54ee 100644 --- a/gate_api/models/margin_account.py +++ b/gate_api/models/margin_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py index 4da48d2..2683b19 100644 --- a/gate_api/models/margin_account_book.py +++ b/gate_api/models/margin_account_book.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py index 53d70e3..ce14474 100644 --- a/gate_api/models/margin_account_currency.py +++ b/gate_api/models/margin_account_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py index a376c91..456f305 100644 --- a/gate_api/models/margin_leverage_tier.py +++ b/gate_api/models/margin_leverage_tier.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py index 71a0790..04c05dc 100644 --- a/gate_api/models/margin_market_leverage.py +++ b/gate_api/models/margin_market_leverage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_tiers.py b/gate_api/models/margin_tiers.py index 072f81b..8d82b53 100644 --- a/gate_api/models/margin_tiers.py +++ b/gate_api/models/margin_tiers.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py index f4212ca..62a5394 100644 --- a/gate_api/models/margin_transferable.py +++ b/gate_api/models/margin_transferable.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py index ca6d123..96d847f 100644 --- a/gate_api/models/max_uni_borrowable.py +++ b/gate_api/models/max_uni_borrowable.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py index ca6d147..11a134f 100644 --- a/gate_api/models/mock_futures_order.py +++ b/gate_api/models/mock_futures_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py index 89d7ce9..dc054da 100644 --- a/gate_api/models/mock_futures_position.py +++ b/gate_api/models/mock_futures_position.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py index ccd53be..dcbc8ce 100644 --- a/gate_api/models/mock_margin_result.py +++ b/gate_api/models/mock_margin_result.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py index 03e581a..c9fd9de 100644 --- a/gate_api/models/mock_options_order.py +++ b/gate_api/models/mock_options_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py index b053c01..ebe07f1 100644 --- a/gate_api/models/mock_options_position.py +++ b/gate_api/models/mock_options_position.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py index ee538db..889f296 100644 --- a/gate_api/models/mock_risk_unit.py +++ b/gate_api/models/mock_risk_unit.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py index d5ef033..4f0289a 100644 --- a/gate_api/models/mock_spot_balance.py +++ b/gate_api/models/mock_spot_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py index 3cd12b0..16734cf 100644 --- a/gate_api/models/mock_spot_order.py +++ b/gate_api/models/mock_spot_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py index 9f5752a..d9766a6 100644 --- a/gate_api/models/multi_chain_address_item.py +++ b/gate_api/models/multi_chain_address_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py index babb72e..2c1e4b1 100644 --- a/gate_api/models/multi_collateral_currency.py +++ b/gate_api/models/multi_collateral_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py index 825ad05..e3fc386 100644 --- a/gate_api/models/multi_collateral_item.py +++ b/gate_api/models/multi_collateral_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py index 671f393..25ba1fe 100644 --- a/gate_api/models/multi_collateral_order.py +++ b/gate_api/models/multi_collateral_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py index 34e274d..f291ae8 100644 --- a/gate_api/models/multi_collateral_record.py +++ b/gate_api/models/multi_collateral_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py index 85faea2..568216a 100644 --- a/gate_api/models/multi_collateral_record_currency.py +++ b/gate_api/models/multi_collateral_record_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py index a45f28e..e579d9a 100644 --- a/gate_api/models/multi_loan_item.py +++ b/gate_api/models/multi_loan_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py index fbe0be8..b829477 100644 --- a/gate_api/models/multi_loan_repay_item.py +++ b/gate_api/models/multi_loan_repay_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py index 2c1b29c..bd0a73f 100644 --- a/gate_api/models/multi_repay_record.py +++ b/gate_api/models/multi_repay_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py index 67f314c..538989b 100644 --- a/gate_api/models/multi_repay_resp.py +++ b/gate_api/models/multi_repay_resp.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py index ad1fb79..2116ec1 100644 --- a/gate_api/models/my_futures_trade.py +++ b/gate_api/models/my_futures_trade.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py index 0200f24..0929a3f 100644 --- a/gate_api/models/my_futures_trade_time_range.py +++ b/gate_api/models/my_futures_trade_time_range.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py index 39a0584..007bd54 100644 --- a/gate_api/models/open_orders.py +++ b/gate_api/models/open_orders.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py index 99a30a8..3da4de1 100644 --- a/gate_api/models/options_account.py +++ b/gate_api/models/options_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py index 8fc1c6e..a3e13e7 100644 --- a/gate_api/models/options_account_book.py +++ b/gate_api/models/options_account_book.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py index 17d7dac..b51b1e1 100644 --- a/gate_api/models/options_candlestick.py +++ b/gate_api/models/options_candlestick.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py index fecbd82..7ae1504 100644 --- a/gate_api/models/options_contract.py +++ b/gate_api/models/options_contract.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py index c6347fa..4b10753 100644 --- a/gate_api/models/options_mmp.py +++ b/gate_api/models/options_mmp.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py index b2055d1..8d7bcae 100644 --- a/gate_api/models/options_mmp_reset.py +++ b/gate_api/models/options_mmp_reset.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py index 54ca6de..8c5c197 100644 --- a/gate_api/models/options_my_settlements.py +++ b/gate_api/models/options_my_settlements.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py index 64f48f8..07ca7d7 100644 --- a/gate_api/models/options_my_trade.py +++ b/gate_api/models/options_my_trade.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py index 9ac0cd1..a994402 100644 --- a/gate_api/models/options_order.py +++ b/gate_api/models/options_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py index df4c3a6..fcde424 100644 --- a/gate_api/models/options_position.py +++ b/gate_api/models/options_position.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py index 04da9db..c68d839 100644 --- a/gate_api/models/options_position_close.py +++ b/gate_api/models/options_position_close.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py index e889022..acb1f38 100644 --- a/gate_api/models/options_position_close_order.py +++ b/gate_api/models/options_position_close_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py index 5f75ba4..11981ac 100644 --- a/gate_api/models/options_settlement.py +++ b/gate_api/models/options_settlement.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py index 12fe046..b4fd8d8 100644 --- a/gate_api/models/options_ticker.py +++ b/gate_api/models/options_ticker.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py index 61e49de..6ea7446 100644 --- a/gate_api/models/options_underlying.py +++ b/gate_api/models/options_underlying.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py index 99059c1..8b6b94d 100644 --- a/gate_api/models/options_underlying_ticker.py +++ b/gate_api/models/options_underlying_ticker.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order.py b/gate_api/models/order.py index 36b8420..02f3a93 100644 --- a/gate_api/models/order.py +++ b/gate_api/models/order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -444,7 +444,7 @@ def currency_pair(self, currency_pair): def type(self): """Gets the type of this Order. # noqa: E501 - Order Type - limit : Limit Order - market : Market Order # noqa: E501 + Order Type - limit : Limit Order - market : Market Order # noqa: E501 :return: The type of this Order. # noqa: E501 :rtype: str @@ -455,7 +455,7 @@ def type(self): def type(self, type): """Sets the type of this Order. - Order Type - limit : Limit Order - market : Market Order # noqa: E501 + Order Type - limit : Limit Order - market : Market Order # noqa: E501 :param type: The type of this Order. # noqa: E501 :type: str @@ -496,7 +496,7 @@ def account(self, account): def side(self): """Gets the side of this Order. # noqa: E501 - Order side # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this Order. # noqa: E501 :rtype: str @@ -507,7 +507,7 @@ def side(self): def side(self, side): """Sets the side of this Order. - Order side # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this Order. # noqa: E501 :type: str diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py index 6fc2a0a..ed15949 100644 --- a/gate_api/models/order_book.py +++ b/gate_api/models/order_book.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py index caa6904..60b34f3 100644 --- a/gate_api/models/order_cancel.py +++ b/gate_api/models/order_cancel.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -528,7 +528,7 @@ def currency_pair(self, currency_pair): def type(self): """Gets the type of this OrderCancel. # noqa: E501 - Order Type - limit : Limit Order - market : Market Order # noqa: E501 + Order Type - limit : Limit Order - market : Market Order # noqa: E501 :return: The type of this OrderCancel. # noqa: E501 :rtype: str @@ -539,7 +539,7 @@ def type(self): def type(self, type): """Sets the type of this OrderCancel. - Order Type - limit : Limit Order - market : Market Order # noqa: E501 + Order Type - limit : Limit Order - market : Market Order # noqa: E501 :param type: The type of this OrderCancel. # noqa: E501 :type: str @@ -580,7 +580,7 @@ def account(self, account): def side(self): """Gets the side of this OrderCancel. # noqa: E501 - Order side # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this OrderCancel. # noqa: E501 :rtype: str @@ -591,7 +591,7 @@ def side(self): def side(self, side): """Sets the side of this OrderCancel. - Order side # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this OrderCancel. # noqa: E501 :type: str diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py index 6374355..abac0ce 100644 --- a/gate_api/models/order_patch.py +++ b/gate_api/models/order_patch.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -128,7 +128,7 @@ def account(self, account): def amount(self): """Gets the amount of this OrderPatch. # noqa: E501 - New order amount. `amount` and `price` must specify one of them # noqa: E501 + Trading Quantity. Either amountor pricemust be specified # noqa: E501 :return: The amount of this OrderPatch. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this OrderPatch. - New order amount. `amount` and `price` must specify one of them # noqa: E501 + Trading Quantity. Either amountor pricemust be specified # noqa: E501 :param amount: The amount of this OrderPatch. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def amount(self, amount): def price(self): """Gets the price of this OrderPatch. # noqa: E501 - New order price. `amount` and `Price` must specify one of them\" # noqa: E501 + Trading Price. Either amountor pricemust be specified # noqa: E501 :return: The price of this OrderPatch. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def price(self): def price(self, price): """Sets the price of this OrderPatch. - New order price. `amount` and `Price` must specify one of them\" # noqa: E501 + Trading Price. Either amountor pricemust be specified # noqa: E501 :param price: The price of this OrderPatch. # noqa: E501 :type: str diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py index 5665ffd..6cdd7ab 100644 --- a/gate_api/models/order_resp.py +++ b/gate_api/models/order_resp.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py index 3742254..74050f7 100644 --- a/gate_api/models/partner_commission_history.py +++ b/gate_api/models/partner_commission_history.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py index faaa4b6..187fd3b 100644 --- a/gate_api/models/partner_sub.py +++ b/gate_api/models/partner_sub.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py index d6bcb29..dac5f44 100644 --- a/gate_api/models/partner_sub_list.py +++ b/gate_api/models/partner_sub_list.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py index b626807..c60b1f3 100644 --- a/gate_api/models/partner_transaction_history.py +++ b/gate_api/models/partner_transaction_history.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py index dffb051..0a4f74e 100644 --- a/gate_api/models/patch_uni_lend.py +++ b/gate_api/models/patch_uni_lend.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/place_dual_investment_order.py b/gate_api/models/place_dual_investment_order.py index fe58e28..4541cf1 100644 --- a/gate_api/models/place_dual_investment_order.py +++ b/gate_api/models/place_dual_investment_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/position.py b/gate_api/models/position.py index 1075a2c..f86e8a0 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -63,7 +63,9 @@ class Position(object): 'cross_leverage_limit': 'str', 'update_time': 'int', 'update_id': 'int', - 'open_time': 'int' + 'open_time': 'int', + 'risk_limit_table': 'str', + 'average_maintenance_rate': 'str' } attribute_map = { @@ -97,11 +99,13 @@ class Position(object): 'cross_leverage_limit': 'cross_leverage_limit', 'update_time': 'update_time', 'update_id': 'update_id', - 'open_time': 'open_time' + 'open_time': 'open_time', + 'risk_limit_table': 'risk_limit_table', + 'average_maintenance_rate': 'average_maintenance_rate' } - 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, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, int, int, Configuration) -> None + def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limit=None, leverage_max=None, maintenance_rate=None, value=None, margin=None, entry_price=None, liq_price=None, mark_price=None, initial_margin=None, maintenance_margin=None, unrealised_pnl=None, realised_pnl=None, pnl_pnl=None, pnl_fund=None, pnl_fee=None, history_pnl=None, last_close_pnl=None, realised_point=None, history_point=None, adl_ranking=None, pending_orders=None, close_order=None, mode=None, cross_leverage_limit=None, update_time=None, update_id=None, open_time=None, risk_limit_table=None, average_maintenance_rate=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, int, int, str, str, Configuration) -> None """Position - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -138,6 +142,8 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi self._update_time = None self._update_id = None self._open_time = None + self._risk_limit_table = None + self._average_maintenance_rate = None self.discriminator = None if user is not None: @@ -201,6 +207,10 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi self.update_id = update_id if open_time is not None: self.open_time = open_time + if risk_limit_table is not None: + self.risk_limit_table = risk_limit_table + if average_maintenance_rate is not None: + self.average_maintenance_rate = average_maintenance_rate @property def user(self): @@ -919,6 +929,52 @@ def open_time(self, open_time): self._open_time = open_time + @property + def risk_limit_table(self): + """Gets the risk_limit_table of this Position. # noqa: E501 + + Risk limit table ID # noqa: E501 + + :return: The risk_limit_table of this Position. # noqa: E501 + :rtype: str + """ + return self._risk_limit_table + + @risk_limit_table.setter + def risk_limit_table(self, risk_limit_table): + """Sets the risk_limit_table of this Position. + + Risk limit table ID # noqa: E501 + + :param risk_limit_table: The risk_limit_table of this Position. # noqa: E501 + :type: str + """ + + self._risk_limit_table = risk_limit_table + + @property + def average_maintenance_rate(self): + """Gets the average_maintenance_rate of this Position. # noqa: E501 + + Average maintenance margin rate # noqa: E501 + + :return: The average_maintenance_rate of this Position. # noqa: E501 + :rtype: str + """ + return self._average_maintenance_rate + + @average_maintenance_rate.setter + def average_maintenance_rate(self, average_maintenance_rate): + """Sets the average_maintenance_rate of this Position. + + Average maintenance margin rate # noqa: E501 + + :param average_maintenance_rate: The average_maintenance_rate of this Position. # noqa: E501 + :type: str + """ + + self._average_maintenance_rate = average_maintenance_rate + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py index 2b4bd6b..8791fd2 100644 --- a/gate_api/models/position_close.py +++ b/gate_api/models/position_close.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py index 25aac1e..3046426 100644 --- a/gate_api/models/position_close_order.py +++ b/gate_api/models/position_close_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py index 094b979..e577c82 100644 --- a/gate_api/models/profit_loss_range.py +++ b/gate_api/models/profit_loss_range.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py index 815890d..23c9371 100644 --- a/gate_api/models/rebate_user_info.py +++ b/gate_api/models/rebate_user_info.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py index aaeb6fc..ac6a5bb 100644 --- a/gate_api/models/repay_currency_res.py +++ b/gate_api/models/repay_currency_res.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py index 423adeb..ff22c97 100644 --- a/gate_api/models/repay_loan.py +++ b/gate_api/models/repay_loan.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py index be30f07..b687b14 100644 --- a/gate_api/models/repay_multi_loan.py +++ b/gate_api/models/repay_multi_loan.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py index 29bf35a..86829ad 100644 --- a/gate_api/models/repay_record.py +++ b/gate_api/models/repay_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py index e7c1d0a..d020960 100644 --- a/gate_api/models/repay_record_currency.py +++ b/gate_api/models/repay_record_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py index b3cb294..d83d87f 100644 --- a/gate_api/models/repay_record_left_interest.py +++ b/gate_api/models/repay_record_left_interest.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py index ce253ae..68629ab 100644 --- a/gate_api/models/repay_record_repaid_currency.py +++ b/gate_api/models/repay_record_repaid_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py index cdcd00c..002bcf0 100644 --- a/gate_api/models/repay_record_total_interest.py +++ b/gate_api/models/repay_record_total_interest.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py index 1d473ad..c9f337b 100644 --- a/gate_api/models/repay_resp.py +++ b/gate_api/models/repay_resp.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py index 980eb57..72ba774 100644 --- a/gate_api/models/risk_units.py +++ b/gate_api/models/risk_units.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py index 4b8b61d..7d00e6d 100644 --- a/gate_api/models/saved_address.py +++ b/gate_api/models/saved_address.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py index 0e52a80..5460ac0 100644 --- a/gate_api/models/small_balance.py +++ b/gate_api/models/small_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py index 74f589b..1385fbe 100644 --- a/gate_api/models/small_balance_history.py +++ b/gate_api/models/small_balance_history.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py index b2349d5..d3375ba 100644 --- a/gate_api/models/spot_account.py +++ b/gate_api/models/spot_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py index 76a5aac..a5cbd8f 100644 --- a/gate_api/models/spot_account_book.py +++ b/gate_api/models/spot_account_book.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py index f28bc27..e2bf39b 100644 --- a/gate_api/models/spot_currency_chain.py +++ b/gate_api/models/spot_currency_chain.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py index 526d532..e8d5818 100644 --- a/gate_api/models/spot_fee.py +++ b/gate_api/models/spot_fee.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py index b7f4535..5890835 100644 --- a/gate_api/models/spot_insurance_history.py +++ b/gate_api/models/spot_insurance_history.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py index 76cb247..a360f89 100644 --- a/gate_api/models/spot_price_put_order.py +++ b/gate_api/models/spot_price_put_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -203,7 +203,7 @@ def amount(self, amount): def account(self): """Gets the account of this SpotPricePutOrder. # noqa: E501 - Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 + Trading account type. Portfolio margin account must set to `unified` -normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 :return: The account of this SpotPricePutOrder. # noqa: E501 :rtype: str @@ -214,7 +214,7 @@ def account(self): def account(self, account): """Sets the account of this SpotPricePutOrder. - Trading account type. Portfolio margin account must set to `unified` - normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 + Trading account type. Portfolio margin account must set to `unified` -normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 :param account: The account of this SpotPricePutOrder. # noqa: E501 :type: str diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py index 267fcae..ef32d75 100644 --- a/gate_api/models/spot_price_trigger.py +++ b/gate_api/models/spot_price_trigger.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -89,7 +89,7 @@ def price(self, price): def rule(self): """Gets the rule of this SpotPriceTrigger. # noqa: E501 - Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501 + Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: triggered when market price less than or equal to `price` field # noqa: E501 :return: The rule of this SpotPriceTrigger. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def rule(self): def rule(self, rule): """Sets the rule of this SpotPriceTrigger. - Price trigger condition - >=: triggered when market price larger than or equal to `price` field - <=: triggered when market price less than or equal to `price` field # noqa: E501 + Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: triggered when market price less than or equal to `price` field # noqa: E501 :param rule: The rule of this SpotPriceTrigger. # noqa: E501 :type: str diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py index 177d810..38e3f72 100644 --- a/gate_api/models/spot_price_triggered_order.py +++ b/gate_api/models/spot_price_triggered_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py index ec41552..6aec9b4 100644 --- a/gate_api/models/stp_group.py +++ b/gate_api/models/stp_group.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py index f61b279..077ce99 100644 --- a/gate_api/models/stp_group_user.py +++ b/gate_api/models/stp_group_user.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py index e42874d..ac16896 100644 --- a/gate_api/models/structured_buy.py +++ b/gate_api/models/structured_buy.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py index b2e9ff9..c502028 100644 --- a/gate_api/models/structured_get_project_list.py +++ b/gate_api/models/structured_get_project_list.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py index 1debe61..df002f9 100644 --- a/gate_api/models/structured_order_list.py +++ b/gate_api/models/structured_order_list.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py index 7f92754..1f2abdb 100644 --- a/gate_api/models/sub_account.py +++ b/gate_api/models/sub_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py index df7a6a6..3fdf25f 100644 --- a/gate_api/models/sub_account_balance.py +++ b/gate_api/models/sub_account_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py index fc2a7fb..bb0b969 100644 --- a/gate_api/models/sub_account_cross_margin_balance.py +++ b/gate_api/models/sub_account_cross_margin_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py index 7e2e7e2..e978c65 100644 --- a/gate_api/models/sub_account_futures_balance.py +++ b/gate_api/models/sub_account_futures_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py index 1008dea..3fd17ae 100644 --- a/gate_api/models/sub_account_key.py +++ b/gate_api/models/sub_account_key.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py index c0fb7d2..11edeb0 100644 --- a/gate_api/models/sub_account_key_perms.py +++ b/gate_api/models/sub_account_key_perms.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py index fb09c2a..0e8dec4 100644 --- a/gate_api/models/sub_account_margin_balance.py +++ b/gate_api/models/sub_account_margin_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py index 1f5652d..54a083c 100644 --- a/gate_api/models/sub_account_to_sub_account.py +++ b/gate_api/models/sub_account_to_sub_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -204,7 +204,7 @@ def sub_account_to(self, sub_account_to): def sub_account_to_type(self): """Gets the sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 - The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 + Transferred sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 :return: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def sub_account_to_type(self): def sub_account_to_type(self, sub_account_to_type): """Sets the sub_account_to_type of this SubAccountToSubAccount. - The sub-account's incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 + Transferred sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 :param sub_account_to_type: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py index 1230df5..5426a30 100644 --- a/gate_api/models/sub_account_transfer.py +++ b/gate_api/models/sub_account_transfer.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -103,7 +103,7 @@ def sub_account(self, sub_account): def sub_account_type(self): """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501 - 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 :return: The sub_account_type of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -114,7 +114,7 @@ def sub_account_type(self): def sub_account_type(self, sub_account_type): """Sets the sub_account_type of this SubAccountTransfer. - 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_transfer_record_item.py b/gate_api/models/sub_account_transfer_record_item.py index c542b85..ad7a9fd 100644 --- a/gate_api/models/sub_account_transfer_record_item.py +++ b/gate_api/models/sub_account_transfer_record_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -169,7 +169,7 @@ def sub_account(self, sub_account): def sub_account_type(self): """Gets the sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 - 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 :return: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def sub_account_type(self): def sub_account_type(self, sub_account_type): """Sets the sub_account_type of this SubAccountTransferRecordItem. - 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户, options - 期权账户 # noqa: E501 + Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 :param sub_account_type: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 :type: str diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py index 8e08761..232a25b 100644 --- a/gate_api/models/sub_cross_margin_account.py +++ b/gate_api/models/sub_cross_margin_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py index bd977c9..dc053fc 100644 --- a/gate_api/models/sub_user_mode.py +++ b/gate_api/models/sub_user_mode.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/swap_coin.py b/gate_api/models/swap_coin.py index d894ab1..9ceee05 100644 --- a/gate_api/models/swap_coin.py +++ b/gate_api/models/swap_coin.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/swap_coin_struct.py b/gate_api/models/swap_coin_struct.py new file mode 100644 index 0000000..43c71ec --- /dev/null +++ b/gate_api/models/swap_coin_struct.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class SwapCoinStruct(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'int', + 'uid': 'int', + 'coin': 'str', + 'type': 'int', + 'amount': 'str', + 'exchange_rate': 'str', + 'pid': 'int', + 'status': 'int', + 'create_stamp': 'int' + } + + attribute_map = { + 'id': 'id', + 'uid': 'uid', + 'coin': 'coin', + 'type': 'type', + 'amount': 'amount', + 'exchange_rate': 'exchange_rate', + 'pid': 'pid', + 'status': 'status', + 'create_stamp': 'createStamp' + } + + def __init__(self, id=None, uid=None, coin=None, type=None, amount=None, exchange_rate=None, pid=None, status=None, create_stamp=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, int, str, str, int, int, int, Configuration) -> None + """SwapCoinStruct - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._uid = None + self._coin = None + self._type = None + self._amount = None + self._exchange_rate = None + self._pid = None + self._status = None + self._create_stamp = None + self.discriminator = None + + if id is not None: + self.id = id + if uid is not None: + self.uid = uid + if coin is not None: + self.coin = coin + if type is not None: + self.type = type + if amount is not None: + self.amount = amount + if exchange_rate is not None: + self.exchange_rate = exchange_rate + if pid is not None: + self.pid = pid + if status is not None: + self.status = status + if create_stamp is not None: + self.create_stamp = create_stamp + + @property + def id(self): + """Gets the id of this SwapCoinStruct. # noqa: E501 + + Order ID # noqa: E501 + + :return: The id of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SwapCoinStruct. + + Order ID # noqa: E501 + + :param id: The id of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def uid(self): + """Gets the uid of this SwapCoinStruct. # noqa: E501 + + User ID # noqa: E501 + + :return: The uid of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this SwapCoinStruct. + + User ID # noqa: E501 + + :param uid: The uid of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._uid = uid + + @property + def coin(self): + """Gets the coin of this SwapCoinStruct. # noqa: E501 + + Currency # noqa: E501 + + :return: The coin of this SwapCoinStruct. # noqa: E501 + :rtype: str + """ + return self._coin + + @coin.setter + def coin(self, coin): + """Sets the coin of this SwapCoinStruct. + + Currency # noqa: E501 + + :param coin: The coin of this SwapCoinStruct. # noqa: E501 + :type: str + """ + + self._coin = coin + + @property + def type(self): + """Gets the type of this SwapCoinStruct. # noqa: E501 + + Type: 0-Lock, 1-Certificate # noqa: E501 + + :return: The type of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SwapCoinStruct. + + Type: 0-Lock, 1-Certificate # noqa: E501 + + :param type: The type of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._type = type + + @property + def amount(self): + """Gets the amount of this SwapCoinStruct. # noqa: E501 + + Amount # noqa: E501 + + :return: The amount of this SwapCoinStruct. # noqa: E501 + :rtype: str + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SwapCoinStruct. + + Amount # noqa: E501 + + :param amount: The amount of this SwapCoinStruct. # noqa: E501 + :type: str + """ + + self._amount = amount + + @property + def exchange_rate(self): + """Gets the exchange_rate of this SwapCoinStruct. # noqa: E501 + + Exchange Ratio # noqa: E501 + + :return: The exchange_rate of this SwapCoinStruct. # noqa: E501 + :rtype: str + """ + return self._exchange_rate + + @exchange_rate.setter + def exchange_rate(self, exchange_rate): + """Sets the exchange_rate of this SwapCoinStruct. + + Exchange Ratio # noqa: E501 + + :param exchange_rate: The exchange_rate of this SwapCoinStruct. # noqa: E501 + :type: str + """ + + self._exchange_rate = exchange_rate + + @property + def pid(self): + """Gets the pid of this SwapCoinStruct. # noqa: E501 + + Plan ID # noqa: E501 + + :return: The pid of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this SwapCoinStruct. + + Plan ID # noqa: E501 + + :param pid: The pid of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._pid = pid + + @property + def status(self): + """Gets the status of this SwapCoinStruct. # noqa: E501 + + status 1-success # noqa: E501 + + :return: The status of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this SwapCoinStruct. + + status 1-success # noqa: E501 + + :param status: The status of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._status = status + + @property + def create_stamp(self): + """Gets the create_stamp of this SwapCoinStruct. # noqa: E501 + + Transaction timestamp # noqa: E501 + + :return: The create_stamp of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._create_stamp + + @create_stamp.setter + def create_stamp(self, create_stamp): + """Sets the create_stamp of this SwapCoinStruct. + + Transaction timestamp # noqa: E501 + + :param create_stamp: The create_stamp of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._create_stamp = create_stamp + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SwapCoinStruct): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SwapCoinStruct): + return True + + return self.to_dict() != other.to_dict() diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py index b154262..3860560 100644 --- a/gate_api/models/system_time.py +++ b/gate_api/models/system_time.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py index bf6ec74..2bcd34c 100644 --- a/gate_api/models/ticker.py +++ b/gate_api/models/ticker.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py index 42fc61d..5fb5d87 100644 --- a/gate_api/models/total_balance.py +++ b/gate_api/models/total_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py index 43eef2b..87eff38 100644 --- a/gate_api/models/trade.py +++ b/gate_api/models/trade.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -224,7 +224,7 @@ def currency_pair(self, currency_pair): def side(self): """Gets the side of this Trade. # noqa: E501 - Order side # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this Trade. # noqa: E501 :rtype: str @@ -235,7 +235,7 @@ def side(self): def side(self, side): """Sets the side of this Trade. - Order side # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this Trade. # noqa: E501 :type: str diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py index 4746715..7d3de32 100644 --- a/gate_api/models/trade_fee.py +++ b/gate_api/models/trade_fee.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py index e3cc452..b8b08c0 100644 --- a/gate_api/models/transaction_id.py +++ b/gate_api/models/transaction_id.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py index 48de0fa..e9b6eba 100644 --- a/gate_api/models/transfer.py +++ b/gate_api/models/transfer.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py index f934c4f..05b319f 100644 --- a/gate_api/models/transfer_order_status.py +++ b/gate_api/models/transfer_order_status.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py index f322a19..37b706e 100644 --- a/gate_api/models/transferables_result.py +++ b/gate_api/models/transferables_result.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py index 09fa6d1..d474a2e 100644 --- a/gate_api/models/trigger_order_response.py +++ b/gate_api/models/trigger_order_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py index e550f6f..a6986ea 100644 --- a/gate_api/models/trigger_time.py +++ b/gate_api/models/trigger_time.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py index bd28202..c0c1249 100644 --- a/gate_api/models/uid_push_order.py +++ b/gate_api/models/uid_push_order.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py index 7d801cb..ff1598d 100644 --- a/gate_api/models/uid_push_withdrawal.py +++ b/gate_api/models/uid_push_withdrawal.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py index dafbdfa..9c1d14d 100644 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py index d30ccc6..925efda 100644 --- a/gate_api/models/uni_currency.py +++ b/gate_api/models/uni_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py index 8758666..a7c870d 100644 --- a/gate_api/models/uni_currency_interest.py +++ b/gate_api/models/uni_currency_interest.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -85,7 +85,7 @@ def currency(self, currency): def interest_status(self): """Gets the interest_status of this UniCurrencyInterest. # noqa: E501 - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 :return: The interest_status of this UniCurrencyInterest. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def interest_status(self): def interest_status(self, interest_status): """Sets the interest_status of this UniCurrencyInterest. - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 :param interest_status: The interest_status of this UniCurrencyInterest. # noqa: E501 :type: str diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py index 5ee6fc9..9e5c16f 100644 --- a/gate_api/models/uni_currency_pair.py +++ b/gate_api/models/uni_currency_pair.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py index d198c60..002cdd9 100644 --- a/gate_api/models/uni_interest_record.py +++ b/gate_api/models/uni_interest_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -174,7 +174,7 @@ def interest(self, interest): def interest_status(self): """Gets the interest_status of this UniInterestRecord. # noqa: E501 - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 :return: The interest_status of this UniInterestRecord. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def interest_status(self): def interest_status(self, interest_status): """Sets the interest_status of this UniInterestRecord. - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 :param interest_status: The interest_status of this UniInterestRecord. # noqa: E501 :type: str diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py index b110c84..5fba2cb 100644 --- a/gate_api/models/uni_lend.py +++ b/gate_api/models/uni_lend.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -240,7 +240,7 @@ def min_rate(self, min_rate): def interest_status(self): """Gets the interest_status of this UniLend. # noqa: E501 - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 :return: The interest_status of this UniLend. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def interest_status(self): def interest_status(self, interest_status): """Sets the interest_status of this UniLend. - Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 :param interest_status: The interest_status of this UniLend. # noqa: E501 :type: str diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py index fd408dc..c3fc581 100644 --- a/gate_api/models/uni_lend_interest.py +++ b/gate_api/models/uni_lend_interest.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py index eb102c1..3613f6e 100644 --- a/gate_api/models/uni_lend_record.py +++ b/gate_api/models/uni_lend_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py index da15af1..70f351d 100644 --- a/gate_api/models/uni_loan.py +++ b/gate_api/models/uni_loan.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py index 2426bb5..f73d997 100644 --- a/gate_api/models/uni_loan_interest_record.py +++ b/gate_api/models/uni_loan_interest_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py index ca324e3..064a72b 100644 --- a/gate_api/models/uni_loan_record.py +++ b/gate_api/models/uni_loan_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index a374844..48e5315 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -587,7 +587,7 @@ def use_funding(self, use_funding): def is_all_collateral(self): """Gets the is_all_collateral of this UnifiedAccount. # noqa: E501 - 是否所有币种均作为保证金,true - 所有币种作为保证金,false - 否 # noqa: E501 + Whether all currencies are used as margin, true - All currencies are used as margin, false - No # noqa: E501 :return: The is_all_collateral of this UnifiedAccount. # noqa: E501 :rtype: bool @@ -598,7 +598,7 @@ def is_all_collateral(self): def is_all_collateral(self, is_all_collateral): """Sets the is_all_collateral of this UnifiedAccount. - 是否所有币种均作为保证金,true - 所有币种作为保证金,false - 否 # noqa: E501 + Whether all currencies are used as margin, true - All currencies are used as margin, false - No # noqa: E501 :param is_all_collateral: The is_all_collateral of this UnifiedAccount. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index 394940d..640c736 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -589,7 +589,7 @@ def available_margin(self, available_margin): def enabled_collateral(self): """Gets the enabled_collateral of this UnifiedBalance. # noqa: E501 - 币种开启作为保证金,true - 启用,false - 未启用 # noqa: E501 + Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501 :return: The enabled_collateral of this UnifiedBalance. # noqa: E501 :rtype: bool @@ -600,7 +600,7 @@ def enabled_collateral(self): def enabled_collateral(self, enabled_collateral): """Sets the enabled_collateral of this UnifiedBalance. - 币种开启作为保证金,true - 启用,false - 未启用 # noqa: E501 + Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501 :param enabled_collateral: The enabled_collateral of this UnifiedBalance. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py index 99cef5b..f1ba6f6 100644 --- a/gate_api/models/unified_borrowable.py +++ b/gate_api/models/unified_borrowable.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/unified_borrowable1.py index 9fd35d0..a51b359 100644 --- a/gate_api/models/unified_borrowable1.py +++ b/gate_api/models/unified_borrowable1.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_collateral_req.py b/gate_api/models/unified_collateral_req.py index 5187e26..c3e0e00 100644 --- a/gate_api/models/unified_collateral_req.py +++ b/gate_api/models/unified_collateral_req.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, collateral_type=None, enable_list=None, disable_list=None, lo def collateral_type(self): """Gets the collateral_type of this UnifiedCollateralReq. # noqa: E501 - 用户设置抵押物模式 0(all)-全部币种作为抵押物,1(custom)-自定义币种作为抵押物,collateral_type为0(all)时,enable_list与disable_list参数无效 # noqa: E501 + User-set collateral mode0(all)-All currencies used as collateral, 1(custom)-Custom currencies used as collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 :return: The collateral_type of this UnifiedCollateralReq. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def collateral_type(self): def collateral_type(self, collateral_type): """Sets the collateral_type of this UnifiedCollateralReq. - 用户设置抵押物模式 0(all)-全部币种作为抵押物,1(custom)-自定义币种作为抵押物,collateral_type为0(all)时,enable_list与disable_list参数无效 # noqa: E501 + User-set collateral mode0(all)-All currencies used as collateral, 1(custom)-Custom currencies used as collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 :param collateral_type: The collateral_type of this UnifiedCollateralReq. # noqa: E501 :type: int @@ -96,7 +96,7 @@ def collateral_type(self, collateral_type): def enable_list(self): """Gets the enable_list of this UnifiedCollateralReq. # noqa: E501 - 币种列表,collateral_type=1(custom)表示追加的逻辑 # noqa: E501 + Currency list, where collateral_type=1(custom) indicates the logic of addition # noqa: E501 :return: The enable_list of this UnifiedCollateralReq. # noqa: E501 :rtype: list[str] @@ -107,7 +107,7 @@ def enable_list(self): def enable_list(self, enable_list): """Sets the enable_list of this UnifiedCollateralReq. - 币种列表,collateral_type=1(custom)表示追加的逻辑 # noqa: E501 + Currency list, where collateral_type=1(custom) indicates the logic of addition # noqa: E501 :param enable_list: The enable_list of this UnifiedCollateralReq. # noqa: E501 :type: list[str] @@ -119,7 +119,7 @@ def enable_list(self, enable_list): def disable_list(self): """Gets the disable_list of this UnifiedCollateralReq. # noqa: E501 - 取消列表,表示取消的逻辑 # noqa: E501 + Cancellation list, indicating the logic of cancellation # noqa: E501 :return: The disable_list of this UnifiedCollateralReq. # noqa: E501 :rtype: list[str] @@ -130,7 +130,7 @@ def disable_list(self): def disable_list(self, disable_list): """Sets the disable_list of this UnifiedCollateralReq. - 取消列表,表示取消的逻辑 # noqa: E501 + Cancellation list, indicating the logic of cancellation # noqa: E501 :param disable_list: The disable_list of this UnifiedCollateralReq. # noqa: E501 :type: list[str] diff --git a/gate_api/models/unified_collateral_res.py b/gate_api/models/unified_collateral_res.py index 2f1da47..231d4dc 100644 --- a/gate_api/models/unified_collateral_res.py +++ b/gate_api/models/unified_collateral_res.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, is_success=None, local_vars_configuration=None): # noqa: E50 def is_success(self): """Gets the is_success of this UnifiedCollateralRes. # noqa: E501 - 是否设置成功 # noqa: E501 + Whether the setting was successful # noqa: E501 :return: The is_success of this UnifiedCollateralRes. # noqa: E501 :rtype: bool @@ -68,7 +68,7 @@ def is_success(self): def is_success(self, is_success): """Sets the is_success of this UnifiedCollateralRes. - 是否设置成功 # noqa: E501 + Whether the setting was successful # noqa: E501 :param is_success: The is_success of this UnifiedCollateralRes. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py index 9c597f9..b8a3619 100644 --- a/gate_api/models/unified_currency.py +++ b/gate_api/models/unified_currency.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py index 723db52..f3db9b4 100644 --- a/gate_api/models/unified_discount.py +++ b/gate_api/models/unified_discount.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py index cc07ae2..e7fa508 100644 --- a/gate_api/models/unified_discount_tiers.py +++ b/gate_api/models/unified_discount_tiers.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py index 23bdbd9..0aa3975 100644 --- a/gate_api/models/unified_history_loan_rate.py +++ b/gate_api/models/unified_history_loan_rate.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py index 32ffef3..f5b4a25 100644 --- a/gate_api/models/unified_history_loan_rate_rates.py +++ b/gate_api/models/unified_history_loan_rate_rates.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py index 0a8dcb8..343e23c 100644 --- a/gate_api/models/unified_leverage_config.py +++ b/gate_api/models/unified_leverage_config.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py index f833f14..ea970c7 100644 --- a/gate_api/models/unified_leverage_setting.py +++ b/gate_api/models/unified_leverage_setting.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py index d753085..dd1df3c 100644 --- a/gate_api/models/unified_loan.py +++ b/gate_api/models/unified_loan.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py index bea951b..3b52a11 100644 --- a/gate_api/models/unified_loan_record.py +++ b/gate_api/models/unified_loan_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, id=None, type=None, repayment_type=None, borrow_type=None, cu def id(self): """Gets the id of this UnifiedLoanRecord. # noqa: E501 - id # noqa: E501 + ID # noqa: E501 :return: The id of this UnifiedLoanRecord. # noqa: E501 :rtype: int @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this UnifiedLoanRecord. - id # noqa: E501 + ID # noqa: E501 :param id: The id of this UnifiedLoanRecord. # noqa: E501 :type: int diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py index 62a1e02..9d1bd88 100644 --- a/gate_api/models/unified_loan_result.py +++ b/gate_api/models/unified_loan_result.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py index 2535368..49c2a0c 100644 --- a/gate_api/models/unified_margin_tiers.py +++ b/gate_api/models/unified_margin_tiers.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py index c6989c7..e30c760 100644 --- a/gate_api/models/unified_mode_set.py +++ b/gate_api/models/unified_mode_set.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py index 58d6b6a..c94c283 100644 --- a/gate_api/models/unified_portfolio_input.py +++ b/gate_api/models/unified_portfolio_input.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py index 5cd1993..e0cbeff 100644 --- a/gate_api/models/unified_portfolio_output.py +++ b/gate_api/models/unified_portfolio_output.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py index daef598..1f2db0b 100644 --- a/gate_api/models/unified_risk_units.py +++ b/gate_api/models/unified_risk_units.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py index 8d730d7..ed71eec 100644 --- a/gate_api/models/unified_settings.py +++ b/gate_api/models/unified_settings.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py index abc6caa..f2ae878 100644 --- a/gate_api/models/unified_transferable.py +++ b/gate_api/models/unified_transferable.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py index cf8e1cc..1a1cf0c 100644 --- a/gate_api/models/user_ltv_info.py +++ b/gate_api/models/user_ltv_info.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py index ce64952..499812a 100644 --- a/gate_api/models/user_sub.py +++ b/gate_api/models/user_sub.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py index 6f95f08..a499c55 100644 --- a/gate_api/models/user_sub_relation.py +++ b/gate_api/models/user_sub_relation.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py index 66adaf4..8fa2598 100644 --- a/gate_api/models/user_total_amount.py +++ b/gate_api/models/user_total_amount.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py index edc8c81..ebb1336 100644 --- a/gate_api/models/withdraw_status.py +++ b/gate_api/models/withdraw_status.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index c6ca5f8..7ddc49e 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -165,7 +165,7 @@ def txid(self, txid): def block_number(self): """Gets the block_number of this WithdrawalRecord. # noqa: E501 - 区块编号 # noqa: E501 + Block Number # noqa: E501 :return: The block_number of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -176,7 +176,7 @@ def block_number(self): def block_number(self, block_number): """Sets the block_number of this WithdrawalRecord. - 区块编号 # noqa: E501 + Block Number # noqa: E501 :param block_number: The block_number of this WithdrawalRecord. # noqa: E501 :type: str diff --git a/gate_api/rest.py b/gate_api/rest.py index 97c4eba..755fbe1 100644 --- a/gate_api/rest.py +++ b/gate_api/rest.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/setup.cfg b/setup.cfg index 10e85f2..1d2fcfb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ classifiers: Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 maintainer = gate -maintainer_email = dev@mail.gate.io +maintainer_email = dev@mail.gate.com [flake8] max-line-length=99 diff --git a/setup.py b/setup.py index b89c1da..384ab48 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Gate API v4 + Gate API - Welcome to Gate API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.100.2" +VERSION = "6.102.0" # To install the library, run the following # # python setup.py install @@ -26,11 +26,11 @@ setup( name=NAME, version=VERSION, - description="Gate API v4", + description="Gate API", author="Gate API support", author_email="support@mail.gate.com", url="https://github.com/gateio/gateapi-python", - keywords=["OpenAPI", "OpenAPI-Generator", "Gate API v4"], + keywords=["OpenAPI", "OpenAPI-Generator", "Gate API"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, From e97c8f44a5789cebd2301649e5193ddb86155eaf Mon Sep 17 00:00:00 2001 From: gateio Date: Tue, 15 Jul 2025 06:20:01 +0000 Subject: [PATCH 13/20] update to v2.102.0 --- docs/EarnUniApi.md | 8 ++++---- gate_api/api/earn_uni_api.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index 5c499f4..b8256f4 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 79bdbfb..9253567 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:10+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) From bbd3c714bdf853f1967ab3a98f801b690d750e65 Mon Sep 17 00:00:00 2001 From: gateio Date: Tue, 15 Jul 2025 06:28:45 +0000 Subject: [PATCH 14/20] update to v6.102.0 --- docs/EarnUniApi.md | 8 ++++---- gate_api/api/earn_uni_api.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index b8256f4..55f395d 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 9253567..2fe5469 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:19+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) From fa74e9e063473fb372d3bdc6327f53519e537300 Mon Sep 17 00:00:00 2001 From: gateio Date: Tue, 15 Jul 2025 06:48:46 +0000 Subject: [PATCH 15/20] update to v6.102.1 --- README.md | 4 ++-- docs/EarnUniApi.md | 8 ++++---- gate_api/__init__.py | 2 +- gate_api/api/earn_uni_api.py | 8 ++++---- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 ++-- setup.py | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 05fafbe..2a59b32 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ for implementing API-based automated trading. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v4.102.0 -- Package version: 6.102.0 +- API version: v4.102.1 +- Package version: 6.102.1 - 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/EarnUniApi.md b/docs/EarnUniApi.md index 55f395d..936c72f 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -627,7 +627,7 @@ Name | Type | Description | Notes UniLoan currency annualized trend chart -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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) @@ -700,7 +700,7 @@ Name | Type | Description | Notes Currency estimate annualized interest rate -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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/gate_api/__init__.py b/gate_api/__init__.py index 7e57f12..8f137e7 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.102.0" +__version__ = "6.102.1" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 2fe5469..32f7c3b 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -1103,7 +1103,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) @@ -1130,7 +1130,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 """UniLoan currency annualized trend chart # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) @@ -1235,7 +1235,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 def list_uni_rate(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1259,7 +1259,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 """Currency estimate annualized interest rate # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:28+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 5a24c1b..f674b92 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/6.102.0/python' + self.user_agent = 'OpenAPI-Generator/6.102.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index e902f9b..42682ad 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.102.0\n"\ - "SDK Package Version: 6.102.0".\ + "Version of the API: v4.102.1\n"\ + "SDK Package Version: 6.102.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/setup.py b/setup.py index 384ab48..535fadd 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.102.0" +VERSION = "6.102.1" # To install the library, run the following # # python setup.py install From f561dc2e97e344f8c2452ee3f97028a632c8706b Mon Sep 17 00:00:00 2001 From: gateio Date: Tue, 22 Jul 2025 02:05:12 +0000 Subject: [PATCH 16/20] update to v6.102.6 --- README.md | 558 +++++----- docs/AccountApi.md | 88 +- docs/AccountBalance.md | 8 +- docs/AccountDetail.md | 12 +- docs/AccountDetailKey.md | 4 +- docs/AccountRateLimit.md | 6 +- docs/AgencyCommission.md | 12 +- docs/AgencyCommissionHistory.md | 6 +- docs/AgencyTransaction.md | 18 +- docs/AgencyTransactionHistory.md | 6 +- docs/AutoRepaySetting.md | 2 +- docs/BatchAmendItem.md | 6 +- docs/BatchAmendOrderReq.md | 10 +- docs/BatchFuturesOrder.md | 42 +- docs/BatchOrder.md | 58 +- docs/BorrowCurrencyInfo.md | 10 +- docs/BrokerCommission.md | 4 +- docs/BrokerCommission1.md | 19 +- docs/BrokerCommissionSubBrokerInfo.md | 10 +- docs/BrokerTransaction.md | 4 +- docs/BrokerTransaction1.md | 17 +- docs/CancelBatchOrder.md | 4 +- docs/CancelOrderResult.md | 16 +- docs/CollateralAdjust.md | 4 +- docs/CollateralAdjustRes.md | 6 +- docs/CollateralAlign.md | 6 +- docs/CollateralCurrency.md | 4 +- docs/CollateralCurrencyInfo.md | 8 +- docs/CollateralCurrencyRes.md | 4 +- docs/CollateralCurrentRate.md | 6 +- docs/CollateralFixRate.md | 10 +- docs/CollateralLoanApi.md | 160 +-- docs/CollateralLoanCurrency.md | 6 +- docs/CollateralLtv.md | 8 +- docs/CollateralOrder.md | 30 +- docs/CollateralRecord.md | 22 +- docs/Contract.md | 72 +- docs/ContractStat.md | 26 +- docs/ConvertSmallBalance.md | 6 +- docs/CountdownCancelAllFuturesTask.md | 4 +- docs/CountdownCancelAllOptionsTask.md | 6 +- docs/CountdownCancelAllSpotTask.md | 4 +- docs/CreateCollateralOrder.md | 8 +- docs/CreateMultiCollateralOrder.md | 16 +- docs/CreateUniLend.md | 8 +- docs/CreateUniLoan.md | 12 +- docs/CrossMarginBalance.md | 8 +- docs/CrossMarginLoan.md | 18 +- docs/CrossMarginRepayment.md | 14 +- docs/Currency.md | 18 +- docs/CurrencyChain.md | 14 +- docs/CurrencyPair.md | 40 +- docs/CurrencyQuota.md | 12 +- docs/DebitFee.md | 2 +- docs/DeliveryApi.md | 572 +++++------ docs/DeliveryCandlestick.md | 14 +- docs/DeliveryContract.md | 76 +- docs/DeliverySettlement.md | 18 +- docs/DeliveryTicker.md | 38 +- docs/DepositAddress.md | 4 +- docs/DepositRecord.md | 16 +- docs/DualGetOrders.md | 32 +- docs/DualGetPlans.md | 24 +- docs/EarnApi.md | 118 +-- docs/EarnUniApi.md | 160 +-- docs/Eth2RateList.md | 6 +- docs/Eth2Swap.md | 6 +- docs/FindCoin.md | 4 +- docs/FlashSwapApi.md | 68 +- docs/FlashSwapCurrencyPair.md | 14 +- docs/FlashSwapOrder.md | 18 +- docs/FlashSwapOrderPreview.md | 10 +- docs/FlashSwapOrderRequest.md | 8 +- docs/FlashSwapPreviewRequest.md | 2 +- docs/FundingAccount.md | 10 +- docs/FundingRateRecord.md | 4 +- docs/FutureCancelOrderResult.md | 10 +- docs/FuturesAccount.md | 30 +- docs/FuturesAccountBook.md | 14 +- docs/FuturesAccountHistory.md | 22 +- docs/FuturesApi.md | 972 +++++++++--------- docs/FuturesAutoDeleverage.md | 20 +- docs/FuturesBatchAmendOrderRequest.md | 10 +- docs/FuturesCandlestick.md | 16 +- docs/FuturesFee.md | 6 +- docs/FuturesIndexConstituents.md | 4 +- docs/FuturesInitialOrder.md | 10 +- docs/FuturesLimitRiskTiers.md | 14 +- docs/FuturesLiqOrder.md | 14 +- docs/FuturesLiquidate.md | 12 +- docs/FuturesOrder.md | 43 +- docs/FuturesOrderAmendment.md | 4 +- docs/FuturesOrderBook.md | 8 +- docs/FuturesOrderBookItem.md | 4 +- docs/FuturesPositionCrossMode.md | 4 +- docs/FuturesPremiumIndex.md | 12 +- docs/FuturesPriceTrigger.md | 6 +- docs/FuturesPriceTriggeredOrder.md | 20 +- docs/FuturesRiskLimitTier.md | 14 +- docs/FuturesTicker.md | 34 +- docs/FuturesTrade.md | 12 +- docs/IndexConstituent.md | 4 +- docs/InlineResponse2001.md | 2 +- docs/InsuranceRecord.md | 4 +- docs/LedgerRecord.md | 16 +- docs/LiquidateOrder.md | 8 +- docs/MarginAccount.md | 10 +- docs/MarginAccountBook.md | 16 +- docs/MarginAccountCurrency.md | 10 +- docs/MarginApi.md | 168 +-- docs/MarginLeverageTier.md | 8 +- docs/MarginMarketLeverage.md | 6 +- docs/MarginTiers.md | 10 +- docs/MarginTransferable.md | 6 +- docs/MarginUniApi.md | 132 +-- docs/MaxUniBorrowable.md | 6 +- docs/MockFuturesOrder.md | 4 +- docs/MockFuturesPosition.md | 2 +- docs/MockMarginResult.md | 14 +- docs/MockOptionsOrder.md | 6 +- docs/MockOptionsPosition.md | 2 +- docs/MockRiskUnit.md | 20 +- docs/MockSpotBalance.md | 4 +- docs/MockSpotOrder.md | 6 +- docs/MultiChainAddressItem.md | 8 +- docs/MultiCollateralCurrency.md | 4 +- docs/MultiCollateralItem.md | 6 +- docs/MultiCollateralLoanApi.md | 168 +-- docs/MultiCollateralOrder.md | 24 +- docs/MultiCollateralRecord.md | 12 +- docs/MultiCollateralRecordCurrency.md | 6 +- docs/MultiLoanItem.md | 4 +- docs/MultiLoanRepayItem.md | 4 +- docs/MultiRepayRecord.md | 22 +- docs/MultiRepayResp.md | 6 +- docs/MyFuturesTrade.md | 22 +- docs/MyFuturesTradeTimeRange.md | 22 +- docs/OpenOrders.md | 2 +- docs/OptionsAccount.md | 32 +- docs/OptionsAccountBook.md | 10 +- docs/OptionsApi.md | 400 +++---- docs/OptionsCandlestick.md | 12 +- docs/OptionsContract.md | 52 +- docs/OptionsMMP.md | 10 +- docs/OptionsMMPReset.md | 10 +- docs/OptionsMySettlements.md | 16 +- docs/OptionsMyTrade.md | 16 +- docs/OptionsOrder.md | 40 +- docs/OptionsPosition.md | 32 +- docs/OptionsPositionClose.md | 12 +- docs/OptionsPositionCloseOrder.md | 8 +- docs/OptionsSettlement.md | 12 +- docs/OptionsTicker.md | 38 +- docs/OptionsUnderlying.md | 4 +- docs/OptionsUnderlyingTicker.md | 8 +- docs/Order.md | 56 +- docs/OrderBook.md | 8 +- docs/OrderCancel.md | 60 +- docs/OrderPatch.md | 10 +- docs/OrderResp.md | 2 +- docs/PartnerCommissionHistory.md | 4 +- docs/PartnerSub.md | 6 +- docs/PartnerSubList.md | 4 +- docs/PartnerTransactionHistory.md | 4 +- docs/PatchUniLend.md | 4 +- docs/PlaceDualInvestmentOrder.md | 6 +- docs/Position.md | 56 +- docs/PositionClose.md | 26 +- docs/PositionCloseOrder.md | 8 +- docs/ProfitLossRange.md | 8 +- docs/RebateApi.md | 232 ++--- docs/RebateUserInfo.md | 4 +- docs/RepayCurrencyRes.md | 8 +- docs/RepayLoan.md | 8 +- docs/RepayMultiLoan.md | 6 +- docs/RepayRecord.md | 28 +- docs/RepayRecordCurrency.md | 6 +- docs/RepayRecordLeftInterest.md | 12 +- docs/RepayRecordRepaidCurrency.md | 12 +- docs/RepayRecordTotalInterest.md | 8 +- docs/RepayResp.md | 6 +- docs/RiskUnits.md | 16 +- docs/SavedAddress.md | 12 +- docs/SmallBalance.md | 10 +- docs/SmallBalanceHistory.md | 12 +- docs/SpotAccount.md | 8 +- docs/SpotAccountBook.md | 16 +- docs/SpotApi.md | 484 ++++----- docs/SpotCurrencyChain.md | 10 +- docs/SpotFee.md | 14 +- docs/SpotInsuranceHistory.md | 6 +- docs/SpotPricePutOrder.md | 8 +- docs/SpotPriceTrigger.md | 4 +- docs/SpotPriceTriggeredOrder.md | 16 +- docs/StpGroup.md | 8 +- docs/StpGroupUser.md | 6 +- docs/StructuredBuy.md | 6 +- docs/StructuredGetProjectList.md | 22 +- docs/StructuredOrderList.md | 14 +- docs/SubAccount.md | 12 +- docs/SubAccountApi.md | 132 +-- docs/SubAccountBalance.md | 4 +- docs/SubAccountCrossMarginBalance.md | 2 +- docs/SubAccountFuturesBalance.md | 4 +- docs/SubAccountKey.md | 18 +- docs/SubAccountKeyPerms.md | 2 +- docs/SubAccountMarginBalance.md | 4 +- docs/SubAccountToSubAccount.md | 8 +- docs/SubAccountTransfer.md | 6 +- docs/SubAccountTransferRecordItem.md | 14 +- docs/SubCrossMarginAccount.md | 20 +- docs/SubUserMode.md | 4 +- docs/SwapCoin.md | 10 +- docs/SwapCoinStruct.md | 24 +- docs/SystemTime.md | 2 +- docs/Ticker.md | 30 +- docs/TotalBalance.md | 2 +- docs/Trade.md | 30 +- docs/TradeFee.md | 20 +- docs/TransactionID.md | 2 +- docs/Transfer.md | 8 +- docs/TransferOrderStatus.md | 2 +- docs/TransferablesResult.md | 6 +- docs/TriggerOrderResponse.md | 2 +- docs/TriggerTime.md | 2 +- docs/UidPushOrder.md | 16 +- docs/UidPushWithdrawal.md | 6 +- docs/UidPushWithdrawalResp.md | 2 +- docs/UniCurrency.md | 10 +- docs/UniCurrencyInterest.md | 4 +- docs/UniCurrencyPair.md | 10 +- docs/UniInterestRecord.md | 14 +- docs/UniLend.md | 22 +- docs/UniLendInterest.md | 4 +- docs/UniLendRecord.md | 16 +- docs/UniLoan.md | 14 +- docs/UniLoanInterestRecord.md | 16 +- docs/UniLoanRecord.md | 12 +- docs/UnifiedAccount.md | 12 +- docs/UnifiedApi.md | 274 ++--- docs/UnifiedBalance.md | 8 +- docs/UnifiedBorrowable.md | 4 +- docs/UnifiedBorrowable1.md | 6 +- docs/UnifiedCollateralReq.md | 4 +- docs/UnifiedCollateralRes.md | 4 +- docs/UnifiedCurrency.md | 10 +- docs/UnifiedDiscount.md | 6 +- docs/UnifiedDiscountTiers.md | 10 +- docs/UnifiedHistoryLoanRate.md | 6 +- docs/UnifiedHistoryLoanRateRates.md | 4 +- docs/UnifiedLeverageConfig.md | 14 +- docs/UnifiedLeverageSetting.md | 6 +- docs/UnifiedLoan.md | 10 +- docs/UnifiedLoanRecord.md | 16 +- docs/UnifiedLoanResult.md | 4 +- docs/UnifiedMarginTiers.md | 6 +- docs/UnifiedPortfolioInput.md | 12 +- docs/UnifiedPortfolioOutput.md | 6 +- docs/UnifiedRiskUnits.md | 4 +- docs/UnifiedSettings.md | 2 +- docs/UnifiedTransferable.md | 4 +- docs/UserLtvInfo.md | 16 +- docs/UserSub.md | 6 +- docs/UserSubRelation.md | 2 +- docs/UserTotalAmount.md | 6 +- docs/WalletApi.md | 286 +++--- docs/WithdrawStatus.md | 24 +- docs/WithdrawalApi.md | 22 +- docs/WithdrawalRecord.md | 22 +- gate_api/__init__.py | 2 +- gate_api/api/account_api.py | 68 +- gate_api/api/collateral_loan_api.py | 120 +-- gate_api/api/delivery_api.py | 468 ++++----- gate_api/api/earn_api.py | 80 +- gate_api/api/earn_uni_api.py | 124 +-- gate_api/api/flash_swap_api.py | 48 +- gate_api/api/futures_api.py | 796 +++++++------- gate_api/api/margin_api.py | 120 +-- gate_api/api/margin_uni_api.py | 100 +- gate_api/api/multi_collateral_loan_api.py | 120 +-- gate_api/api/options_api.py | 296 +++--- gate_api/api/rebate_api.py | 212 ++-- gate_api/api/spot_api.py | 380 +++---- gate_api/api/sub_account_api.py | 88 +- gate_api/api/unified_api.py | 196 ++-- gate_api/api/wallet_api.py | 212 ++-- gate_api/api/withdrawal_api.py | 12 +- gate_api/api_client.py | 2 +- gate_api/configuration.py | 8 +- gate_api/models/account_balance.py | 12 +- gate_api/models/account_detail.py | 20 +- gate_api/models/account_detail_key.py | 4 +- gate_api/models/account_rate_limit.py | 12 +- gate_api/models/agency_commission.py | 24 +- gate_api/models/agency_commission_history.py | 12 +- gate_api/models/agency_transaction.py | 36 +- gate_api/models/agency_transaction_history.py | 12 +- gate_api/models/auto_repay_setting.py | 4 +- gate_api/models/batch_amend_item.py | 8 +- gate_api/models/batch_amend_order_req.py | 16 +- gate_api/models/batch_futures_order.py | 80 +- gate_api/models/batch_order.py | 112 +- gate_api/models/borrow_currency_info.py | 20 +- gate_api/models/broker_commission.py | 8 +- gate_api/models/broker_commission1.py | 72 +- .../broker_commission_sub_broker_info.py | 16 +- gate_api/models/broker_transaction.py | 8 +- gate_api/models/broker_transaction1.py | 68 +- gate_api/models/cancel_batch_order.py | 4 +- gate_api/models/cancel_order_result.py | 28 +- gate_api/models/collateral_adjust.py | 8 +- gate_api/models/collateral_adjust_res.py | 8 +- gate_api/models/collateral_align.py | 12 +- gate_api/models/collateral_currency.py | 8 +- gate_api/models/collateral_currency_info.py | 16 +- gate_api/models/collateral_currency_res.py | 8 +- gate_api/models/collateral_current_rate.py | 8 +- gate_api/models/collateral_fix_rate.py | 16 +- gate_api/models/collateral_loan_currency.py | 8 +- gate_api/models/collateral_ltv.py | 12 +- gate_api/models/collateral_order.py | 56 +- gate_api/models/collateral_record.py | 40 +- gate_api/models/contract.py | 140 +-- gate_api/models/contract_stat.py | 52 +- gate_api/models/convert_small_balance.py | 8 +- .../countdown_cancel_all_futures_task.py | 4 +- .../countdown_cancel_all_options_task.py | 8 +- .../models/countdown_cancel_all_spot_task.py | 4 +- gate_api/models/create_collateral_order.py | 16 +- .../models/create_multi_collateral_order.py | 32 +- gate_api/models/create_uni_lend.py | 12 +- gate_api/models/create_uni_loan.py | 20 +- gate_api/models/cross_margin_balance.py | 16 +- gate_api/models/cross_margin_loan.py | 36 +- gate_api/models/cross_margin_repayment.py | 28 +- gate_api/models/currency.py | 36 +- gate_api/models/currency_chain.py | 28 +- gate_api/models/currency_pair.py | 76 +- gate_api/models/currency_quota.py | 20 +- gate_api/models/debit_fee.py | 4 +- gate_api/models/delivery_candlestick.py | 24 +- gate_api/models/delivery_contract.py | 148 +-- gate_api/models/delivery_settlement.py | 36 +- gate_api/models/delivery_ticker.py | 76 +- gate_api/models/deposit_address.py | 8 +- gate_api/models/deposit_record.py | 32 +- gate_api/models/dual_get_orders.py | 64 +- gate_api/models/dual_get_plans.py | 48 +- gate_api/models/eth2_rate_list.py | 12 +- gate_api/models/eth2_swap.py | 8 +- gate_api/models/find_coin.py | 8 +- gate_api/models/flash_swap_currency_pair.py | 24 +- gate_api/models/flash_swap_order.py | 32 +- gate_api/models/flash_swap_order_preview.py | 16 +- gate_api/models/flash_swap_order_request.py | 12 +- gate_api/models/funding_account.py | 20 +- gate_api/models/funding_rate_record.py | 8 +- gate_api/models/future_cancel_order_result.py | 16 +- gate_api/models/futures_account.py | 60 +- gate_api/models/futures_account_book.py | 28 +- gate_api/models/futures_account_history.py | 40 +- gate_api/models/futures_auto_deleverage.py | 40 +- .../futures_batch_amend_order_request.py | 16 +- gate_api/models/futures_candlestick.py | 28 +- gate_api/models/futures_fee.py | 8 +- gate_api/models/futures_index_constituents.py | 8 +- gate_api/models/futures_initial_order.py | 20 +- gate_api/models/futures_limit_risk_tiers.py | 28 +- gate_api/models/futures_liq_order.py | 28 +- gate_api/models/futures_liquidate.py | 24 +- gate_api/models/futures_order.py | 116 +-- gate_api/models/futures_order_amendment.py | 68 +- gate_api/models/futures_order_book.py | 16 +- gate_api/models/futures_order_book_item.py | 8 +- .../models/futures_position_cross_mode.py | 8 +- gate_api/models/futures_premium_index.py | 20 +- gate_api/models/futures_price_trigger.py | 12 +- .../models/futures_price_triggered_order.py | 36 +- gate_api/models/futures_risk_limit_tier.py | 24 +- gate_api/models/futures_ticker.py | 68 +- gate_api/models/futures_trade.py | 24 +- gate_api/models/index_constituent.py | 8 +- gate_api/models/inline_response2001.py | 4 +- gate_api/models/insurance_record.py | 8 +- gate_api/models/ledger_record.py | 32 +- gate_api/models/liquidate_order.py | 12 +- gate_api/models/margin_account.py | 20 +- gate_api/models/margin_account_book.py | 32 +- gate_api/models/margin_account_currency.py | 16 +- gate_api/models/margin_leverage_tier.py | 12 +- gate_api/models/margin_market_leverage.py | 8 +- gate_api/models/margin_tiers.py | 20 +- gate_api/models/margin_transferable.py | 12 +- gate_api/models/max_uni_borrowable.py | 12 +- gate_api/models/mock_futures_order.py | 4 +- gate_api/models/mock_margin_result.py | 24 +- gate_api/models/mock_options_order.py | 8 +- gate_api/models/mock_risk_unit.py | 36 +- gate_api/models/mock_spot_balance.py | 4 +- gate_api/models/mock_spot_order.py | 8 +- gate_api/models/multi_chain_address_item.py | 16 +- gate_api/models/multi_collateral_currency.py | 8 +- gate_api/models/multi_collateral_item.py | 12 +- gate_api/models/multi_collateral_order.py | 44 +- gate_api/models/multi_collateral_record.py | 24 +- .../multi_collateral_record_currency.py | 12 +- gate_api/models/multi_loan_item.py | 8 +- gate_api/models/multi_loan_repay_item.py | 8 +- gate_api/models/multi_repay_record.py | 40 +- gate_api/models/multi_repay_resp.py | 8 +- gate_api/models/my_futures_trade.py | 44 +- .../models/my_futures_trade_time_range.py | 44 +- gate_api/models/open_orders.py | 4 +- gate_api/models/options_account.py | 64 +- gate_api/models/options_account_book.py | 20 +- gate_api/models/options_candlestick.py | 20 +- gate_api/models/options_contract.py | 100 +- gate_api/models/options_mmp.py | 20 +- gate_api/models/options_mmp_reset.py | 20 +- gate_api/models/options_my_settlements.py | 32 +- gate_api/models/options_my_trade.py | 32 +- gate_api/models/options_order.py | 76 +- gate_api/models/options_position.py | 60 +- gate_api/models/options_position_close.py | 24 +- .../models/options_position_close_order.py | 12 +- gate_api/models/options_settlement.py | 24 +- gate_api/models/options_ticker.py | 72 +- gate_api/models/options_underlying.py | 8 +- gate_api/models/options_underlying_ticker.py | 12 +- gate_api/models/order.py | 108 +- gate_api/models/order_book.py | 16 +- gate_api/models/order_cancel.py | 116 +-- gate_api/models/order_patch.py | 16 +- gate_api/models/order_resp.py | 4 +- gate_api/models/partner_commission_history.py | 8 +- gate_api/models/partner_sub.py | 12 +- gate_api/models/partner_sub_list.py | 8 +- .../models/partner_transaction_history.py | 8 +- gate_api/models/patch_uni_lend.py | 8 +- .../models/place_dual_investment_order.py | 8 +- gate_api/models/position.py | 108 +- gate_api/models/position_close.py | 52 +- gate_api/models/position_close_order.py | 12 +- gate_api/models/profit_loss_range.py | 12 +- gate_api/models/rebate_user_info.py | 4 +- gate_api/models/repay_currency_res.py | 16 +- gate_api/models/repay_loan.py | 12 +- gate_api/models/repay_multi_loan.py | 8 +- gate_api/models/repay_record.py | 52 +- gate_api/models/repay_record_currency.py | 12 +- gate_api/models/repay_record_left_interest.py | 24 +- .../models/repay_record_repaid_currency.py | 24 +- .../models/repay_record_total_interest.py | 16 +- gate_api/models/repay_resp.py | 8 +- gate_api/models/risk_units.py | 32 +- gate_api/models/saved_address.py | 24 +- gate_api/models/small_balance.py | 16 +- gate_api/models/small_balance_history.py | 20 +- gate_api/models/spot_account.py | 16 +- gate_api/models/spot_account_book.py | 32 +- gate_api/models/spot_currency_chain.py | 20 +- gate_api/models/spot_fee.py | 28 +- gate_api/models/spot_insurance_history.py | 12 +- gate_api/models/spot_price_put_order.py | 16 +- gate_api/models/spot_price_trigger.py | 8 +- gate_api/models/spot_price_triggered_order.py | 28 +- gate_api/models/stp_group.py | 16 +- gate_api/models/stp_group_user.py | 12 +- gate_api/models/structured_buy.py | 8 +- .../models/structured_get_project_list.py | 40 +- gate_api/models/structured_order_list.py | 24 +- gate_api/models/sub_account.py | 24 +- gate_api/models/sub_account_balance.py | 8 +- .../sub_account_cross_margin_balance.py | 4 +- .../models/sub_account_futures_balance.py | 8 +- gate_api/models/sub_account_key.py | 36 +- gate_api/models/sub_account_key_perms.py | 4 +- gate_api/models/sub_account_margin_balance.py | 8 +- gate_api/models/sub_account_to_sub_account.py | 16 +- gate_api/models/sub_account_transfer.py | 12 +- .../sub_account_transfer_record_item.py | 28 +- gate_api/models/sub_cross_margin_account.py | 40 +- gate_api/models/sub_user_mode.py | 8 +- gate_api/models/swap_coin.py | 16 +- gate_api/models/swap_coin_struct.py | 264 ++++- gate_api/models/system_time.py | 4 +- gate_api/models/ticker.py | 60 +- gate_api/models/trade.py | 60 +- gate_api/models/trade_fee.py | 40 +- gate_api/models/transaction_id.py | 4 +- gate_api/models/transfer.py | 16 +- gate_api/models/transfer_order_status.py | 4 +- gate_api/models/transferables_result.py | 8 +- gate_api/models/trigger_order_response.py | 4 +- gate_api/models/trigger_time.py | 4 +- gate_api/models/uid_push_order.py | 32 +- gate_api/models/uid_push_withdrawal.py | 12 +- gate_api/models/uid_push_withdrawal_resp.py | 4 +- gate_api/models/uni_currency.py | 16 +- gate_api/models/uni_currency_interest.py | 8 +- gate_api/models/uni_currency_pair.py | 16 +- gate_api/models/uni_interest_record.py | 24 +- gate_api/models/uni_lend.py | 40 +- gate_api/models/uni_lend_interest.py | 8 +- gate_api/models/uni_lend_record.py | 28 +- gate_api/models/uni_loan.py | 24 +- gate_api/models/uni_loan_interest_record.py | 28 +- gate_api/models/uni_loan_record.py | 20 +- gate_api/models/unified_account.py | 24 +- gate_api/models/unified_balance.py | 16 +- gate_api/models/unified_borrowable.py | 8 +- gate_api/models/unified_borrowable1.py | 8 +- gate_api/models/unified_collateral_req.py | 8 +- gate_api/models/unified_collateral_res.py | 4 +- gate_api/models/unified_currency.py | 20 +- gate_api/models/unified_discount.py | 8 +- gate_api/models/unified_discount_tiers.py | 20 +- gate_api/models/unified_history_loan_rate.py | 12 +- .../models/unified_history_loan_rate_rates.py | 8 +- gate_api/models/unified_leverage_config.py | 28 +- gate_api/models/unified_leverage_setting.py | 8 +- gate_api/models/unified_loan.py | 16 +- gate_api/models/unified_loan_record.py | 28 +- gate_api/models/unified_loan_result.py | 4 +- gate_api/models/unified_margin_tiers.py | 8 +- gate_api/models/unified_portfolio_input.py | 24 +- gate_api/models/unified_portfolio_output.py | 12 +- gate_api/models/unified_risk_units.py | 8 +- gate_api/models/unified_settings.py | 4 +- gate_api/models/unified_transferable.py | 8 +- gate_api/models/user_ltv_info.py | 28 +- gate_api/models/user_sub.py | 12 +- gate_api/models/user_sub_relation.py | 4 +- gate_api/models/user_total_amount.py | 8 +- gate_api/models/withdraw_status.py | 48 +- gate_api/models/withdrawal_record.py | 44 +- setup.py | 2 +- 537 files changed, 8938 insertions(+), 8793 deletions(-) diff --git a/README.md b/README.md index 2a59b32..71b1b9d 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ for implementing API-based automated trading. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v4.102.1 -- Package version: 6.102.1 +- API version: v4.102.6 +- Package version: 6.102.6 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) @@ -88,7 +88,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnUniApi(api_client) try: - # List currencies for lending + # List currencies for lending. api_response = api_instance.list_uni_currencies() print(api_response) except GateApiException as ex: @@ -106,287 +106,287 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending -*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending -*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders -*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem -*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order -*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending -*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency -*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records -*EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status -*EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart -*EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate -*MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market -*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate -*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans -*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay -*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records -*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records -*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable -*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts -*SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account -*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account -*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account -*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account -*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account -*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account -*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account -*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account -*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account -*SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode -*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information -*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account -*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account +*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending. +*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending. +*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders. +*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem. +*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order. +*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending. +*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency. +*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records. +*EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status. +*EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart. +*EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate. +*MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets. +*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market. +*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate. +*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans. +*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay. +*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records. +*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records. +*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable. +*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts. +*SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account. +*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account. +*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account. +*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account. +*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account. +*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account. +*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account. +*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account. +*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account. +*SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode. +*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information. +*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account. +*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account. *UnifiedApi* | [**get_unified_transferables**](docs/UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. -*UnifiedApi* | [**get_unified_borrowable_list**](docs/UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum -*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans -*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay -*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records -*UnifiedApi* | [**list_unified_loan_interest_records**](docs/UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records -*UnifiedApi* | [**get_unified_risk_units**](docs/UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details -*UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account -*UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account -*UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate -*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers -*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers -*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator -*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency -*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage -*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account -*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates -*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency -*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail -*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information -*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups -*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group -*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group -*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group -*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group +*UnifiedApi* | [**get_unified_borrowable_list**](docs/UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum. +*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans. +*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay. +*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records. +*UnifiedApi* | [**list_unified_loan_interest_records**](docs/UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records. +*UnifiedApi* | [**get_unified_risk_units**](docs/UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details. +*UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account. +*UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account. +*UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate. +*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers. +*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers. +*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator. +*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency. +*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage. +*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account. +*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates. +*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency. +*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail. +*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information. +*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups. +*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group. +*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group. +*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group. +*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group. *AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. *AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. -*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders -*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order -*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order -*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment -*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history -*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records -*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral -*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user -*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio -*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies -*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts -*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract -*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book -*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history -*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks -*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers -*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history -*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account -*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book -*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user -*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position -*DeliveryApi* | [**update_delivery_position_margin**](docs/DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin -*DeliveryApi* | [**update_delivery_position_leverage**](docs/DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage -*DeliveryApi* | [**update_delivery_position_risk_limit**](docs/DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit -*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders -*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order -*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched -*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order -*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order -*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history -*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history -*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history -*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history -*DeliveryApi* | [**list_delivery_risk_limit_tiers**](docs/DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers -*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders -*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order -*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders -*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order -*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order -*EarnApi* | [**swap_eth2**](docs/EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap -*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query -*EarnApi* | [**list_dual_investment_plans**](docs/EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list -*EarnApi* | [**list_dual_orders**](docs/EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list -*EarnApi* | [**place_dual_order**](docs/EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order -*EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List -*EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List -*EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order -*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins -*EarnApi* | [**swap_staking_coin**](docs/EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins -*FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap -*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders -*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order -*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail -*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview -*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts -*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract -*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book -*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history -*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks -*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line -*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers -*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history -*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history -*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats -*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents -*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history -*FuturesApi* | [**list_futures_risk_limit_tiers**](docs/FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers -*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account -*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book -*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user -*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position -*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin -*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage -*FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode -*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit -*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode -*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode -*FuturesApi* | [**update_dual_mode_position_margin**](docs/FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode -*FuturesApi* | [**update_dual_mode_position_leverage**](docs/FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode -*FuturesApi* | [**update_dual_mode_position_risk_limit**](docs/FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode -*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders -*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order -*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched -*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range -*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders -*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order -*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order -*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order -*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history -*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range -*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history -*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history -*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History -*FuturesApi* | [**countdown_cancel_all_futures**](docs/FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders -*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates -*FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list -*FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs -*FuturesApi* | [**get_futures_risk_limit_table**](docs/FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id -*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders -*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order -*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders -*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order -*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order -*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list -*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history -*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list -*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting -*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting -*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list -*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) -*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) -*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders -*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order -*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail -*MultiCollateralLoanApi* | [**list_multi_repay_records**](docs/MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records -*MultiCollateralLoanApi* | [**repay_multi_collateral_loan**](docs/MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan -*MultiCollateralLoanApi* | [**list_multi_collateral_records**](docs/MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records -*MultiCollateralLoanApi* | [**operate_multi_collateral**](docs/MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral -*MultiCollateralLoanApi* | [**list_user_currency_quota**](docs/MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota -*MultiCollateralLoanApi* | [**list_multi_collateral_currencies**](docs/MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral -*MultiCollateralLoanApi* | [**get_multi_collateral_ltv**](docs/MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio -*MultiCollateralLoanApi* | [**get_multi_collateral_fix_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days -*MultiCollateralLoanApi* | [**get_multi_collateral_current_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency -*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings -*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times -*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time -*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail -*OptionsApi* | [**list_options_settlements**](docs/OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history -*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement -*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements -*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book -*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts -*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker -*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks -*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying -*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history -*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account -*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history -*OptionsApi* | [**list_options_positions**](docs/OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying -*OptionsApi* | [**get_options_position**](docs/OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position -*OptionsApi* | [**list_options_position_close**](docs/OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying -*OptionsApi* | [**list_options_orders**](docs/OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders -*OptionsApi* | [**create_options_order**](docs/OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order -*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched -*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order -*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order -*OptionsApi* | [**countdown_cancel_all_options**](docs/OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders -*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history -*OptionsApi* | [**get_options_mmp**](docs/OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query +*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders. +*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order. +*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order. +*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment. +*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history. +*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records. +*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral. +*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user. +*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio. +*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies. +*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts. +*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract. +*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book. +*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history. +*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks. +*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers. +*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history. +*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account. +*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book. +*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user. +*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position. +*DeliveryApi* | [**update_delivery_position_margin**](docs/DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin. +*DeliveryApi* | [**update_delivery_position_leverage**](docs/DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage. +*DeliveryApi* | [**update_delivery_position_risk_limit**](docs/DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit. +*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders. +*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order. +*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched. +*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order. +*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order. +*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history. +*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history. +*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history. +*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history. +*DeliveryApi* | [**list_delivery_risk_limit_tiers**](docs/DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers. +*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders. +*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order. +*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders. +*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order. +*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order. +*EarnApi* | [**swap_eth2**](docs/EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap. +*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query. +*EarnApi* | [**list_dual_investment_plans**](docs/EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list. +*EarnApi* | [**list_dual_orders**](docs/EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list. +*EarnApi* | [**place_dual_order**](docs/EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order. +*EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List. +*EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List. +*EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order. +*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins. +*EarnApi* | [**swap_staking_coin**](docs/EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins. +*FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap. +*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders. +*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order. +*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail. +*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview. +*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts. +*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract. +*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book. +*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history. +*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks. +*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line. +*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers. +*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history. +*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history. +*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats. +*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents. +*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history. +*FuturesApi* | [**list_futures_risk_limit_tiers**](docs/FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers. +*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account. +*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book. +*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user. +*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position. +*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin. +*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage. +*FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode. +*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit. +*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode. +*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode. +*FuturesApi* | [**update_dual_mode_position_margin**](docs/FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode. +*FuturesApi* | [**update_dual_mode_position_leverage**](docs/FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode. +*FuturesApi* | [**update_dual_mode_position_risk_limit**](docs/FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode. +*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders. +*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order. +*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched. +*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range. +*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders. +*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order. +*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order. +*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order. +*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history. +*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range. +*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history. +*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history. +*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History. +*FuturesApi* | [**countdown_cancel_all_futures**](docs/FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders. +*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates. +*FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list. +*FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs. +*FuturesApi* | [**get_futures_risk_limit_table**](docs/FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id. +*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders. +*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order. +*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders. +*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order. +*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order. +*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list. +*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history. +*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list. +*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting. +*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting. +*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency. +*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market. +*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient. +*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple. +*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list. +*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated). +*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated). +*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders. +*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order. +*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail. +*MultiCollateralLoanApi* | [**list_multi_repay_records**](docs/MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records. +*MultiCollateralLoanApi* | [**repay_multi_collateral_loan**](docs/MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan. +*MultiCollateralLoanApi* | [**list_multi_collateral_records**](docs/MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records. +*MultiCollateralLoanApi* | [**operate_multi_collateral**](docs/MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral. +*MultiCollateralLoanApi* | [**list_user_currency_quota**](docs/MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota. +*MultiCollateralLoanApi* | [**list_multi_collateral_currencies**](docs/MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral. +*MultiCollateralLoanApi* | [**get_multi_collateral_ltv**](docs/MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio. +*MultiCollateralLoanApi* | [**get_multi_collateral_fix_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days. +*MultiCollateralLoanApi* | [**get_multi_collateral_current_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency. +*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings. +*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times. +*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time. +*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail. +*OptionsApi* | [**list_options_settlements**](docs/OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history. +*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement. +*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements. +*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book. +*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts. +*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker. +*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks. +*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying. +*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history. +*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account. +*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history. +*OptionsApi* | [**list_options_positions**](docs/OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying. +*OptionsApi* | [**get_options_position**](docs/OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position. +*OptionsApi* | [**list_options_position_close**](docs/OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying. +*OptionsApi* | [**list_options_orders**](docs/OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders. +*OptionsApi* | [**create_options_order**](docs/OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order. +*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched. +*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order. +*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order. +*OptionsApi* | [**countdown_cancel_all_options**](docs/OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders. +*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history. +*OptionsApi* | [**get_options_mmp**](docs/OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query. *OptionsApi* | [**set_options_mmp**](docs/OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings *OptionsApi* | [**reset_options_mmp**](docs/OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset -*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user -*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user -*RebateApi* | [**partner_transaction_history**](docs/RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users -*RebateApi* | [**partner_commissions_history**](docs/RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users -*RebateApi* | [**partner_sub_list**](docs/RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list -*RebateApi* | [**rebate_broker_commission_history**](docs/RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records -*RebateApi* | [**rebate_broker_transaction_history**](docs/RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history -*RebateApi* | [**rebate_user_info**](docs/RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information -*RebateApi* | [**user_sub_relation**](docs/RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship -*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details -*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency -*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported -*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair -*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information -*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book -*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades -*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks -*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates -*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates -*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts -*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book -*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders -*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* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair -*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list -*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order -*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order -*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order -*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history -*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time -*SpotApi* | [**countdown_cancel_all_spot**](docs/SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders -*SpotApi* | [**amend_batch_orders**](docs/SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders -*SpotApi* | [**get_spot_insurance_history**](docs/SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data -*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list -*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order -*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders -*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order -*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order -*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency -*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address -*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records -*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records -*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts -*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts -*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts -*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account -*WalletApi* | [**get_transfer_order_status**](docs/WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query -*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status -*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances -*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances -*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances -*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info -*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address -*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee -*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances -*WalletApi* | [**list_small_balance**](docs/WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance -*WalletApi* | [**convert_small_balance**](docs/WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance -*WalletApi* | [**list_small_balance_history**](docs/WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history -*WalletApi* | [**list_push_orders**](docs/WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history -*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw -*WithdrawalApi* | [**withdraw_push_order**](docs/WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer -*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID +*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user. +*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user. +*RebateApi* | [**partner_transaction_history**](docs/RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users. +*RebateApi* | [**partner_commissions_history**](docs/RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users. +*RebateApi* | [**partner_sub_list**](docs/RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list. +*RebateApi* | [**rebate_broker_commission_history**](docs/RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records. +*RebateApi* | [**rebate_broker_transaction_history**](docs/RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history. +*RebateApi* | [**rebate_user_info**](docs/RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information. +*RebateApi* | [**user_sub_relation**](docs/RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship. +*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details. +*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency. +*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported. +*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair. +*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information. +*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book. +*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades. +*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks. +*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates. +*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates. +*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts. +*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book. +*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders. +*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* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair. +*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list. +*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order. +*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order. +*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order. +*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history. +*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time. +*SpotApi* | [**countdown_cancel_all_spot**](docs/SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders. +*SpotApi* | [**amend_batch_orders**](docs/SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders. +*SpotApi* | [**get_spot_insurance_history**](docs/SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data. +*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list. +*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order. +*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders. +*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order. +*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order. +*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency. +*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address. +*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. +*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. +*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts. +*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts. +*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts. +*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account. +*WalletApi* | [**get_transfer_order_status**](docs/WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query. +*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status. +*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances. +*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances. +*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances. +*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info. +*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address. +*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee. +*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances. +*WalletApi* | [**list_small_balance**](docs/WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance. +*WalletApi* | [**convert_small_balance**](docs/WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance. +*WalletApi* | [**list_small_balance_history**](docs/WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history. +*WalletApi* | [**list_push_orders**](docs/WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history. +*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw. +*WithdrawalApi* | [**withdraw_push_order**](docs/WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer. +*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID. ## Documentation For Models diff --git a/docs/AccountApi.md b/docs/AccountApi.md index c249424..597c4d5 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail -[**get_account_rate_limit**](AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information -[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups -[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group -[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group -[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group -[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group +[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail. +[**get_account_rate_limit**](AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information. +[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups. +[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group. +[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group. +[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group. +[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group. [**get_debit_fee**](AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. [**set_debit_fee**](AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. @@ -18,7 +18,7 @@ Method | HTTP request | Description # **get_account_detail** > AccountDetail get_account_detail() -Get account detail +Get account detail. ### Example @@ -46,7 +46,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.AccountApi(api_client) try: - # Get account detail + # Get account detail. api_response = api_instance.get_account_detail() print(api_response) except GateApiException as ex: @@ -74,14 +74,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_account_rate_limit** > list[AccountRateLimit] get_account_rate_limit() -Get user transaction rate limit information +Get user transaction rate limit information. ### Example @@ -109,7 +109,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.AccountApi(api_client) try: - # Get user transaction rate limit information + # Get user transaction rate limit information. api_response = api_instance.get_account_rate_limit() print(api_response) except GateApiException as ex: @@ -137,16 +137,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_stp_groups** > list[StpGroup] list_stp_groups(name=name) -List STP Groups +List STP Groups. -Retrieve the list of STP groups created by the main account user only +Retrieve the list of STP groups created by the main account user only. ### Example @@ -172,10 +172,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -name = 'group' # str | Perform a fuzzy search based on the name (optional) +name = 'group' # str | Perform a fuzzy search based on the name. (optional) try: - # List STP Groups + # List STP Groups. api_response = api_instance.list_stp_groups(name=name) print(api_response) except GateApiException as ex: @@ -188,7 +188,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Perform a fuzzy search based on the name | [optional] + **name** | **str**| Perform a fuzzy search based on the name. | [optional] ### Return type @@ -206,16 +206,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_stp_group** > StpGroup create_stp_group(stp_group) -Create STP Group +Create STP Group. -Only the main account is allowed to create a new STP user group +Only the main account is allowed to create a new STP user group. ### Example @@ -244,7 +244,7 @@ api_instance = gate_api.AccountApi(api_client) stp_group = gate_api.StpGroup() # StpGroup | try: - # Create STP Group + # Create STP Group. api_response = api_instance.create_stp_group(stp_group) print(api_response) except GateApiException as ex: @@ -282,9 +282,9 @@ Name | Type | Description | Notes # **list_stp_groups_users** > list[StpGroupUser] list_stp_groups_users(stp_id) -List users of the STP group +List users of the STP group. -Only the main account that created this STP group can query the account +Only the main account that created this STP group can query the account. ### Example @@ -310,10 +310,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID +stp_id = 1 # int | STP Group ID. try: - # List users of the STP group + # List users of the STP group. api_response = api_instance.list_stp_groups_users(stp_id) print(api_response) except GateApiException as ex: @@ -326,7 +326,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID | + **stp_id** | **int**| STP Group ID. | ### Return type @@ -344,16 +344,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **add_stp_group_users** > list[StpGroupUser] add_stp_group_users(stp_id, request_body) -Add users to the STP group +Add users to the STP group. -- Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted +- Only the master account that created the STP user group is allowed to add users group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted ### Example @@ -379,11 +379,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID -request_body = [[1,2,3]] # list[int] | User ID +stp_id = 1 # int | STP Group ID. +request_body = [[1,2,3]] # list[int] | User ID. try: - # Add users to the STP group + # Add users to the STP group. api_response = api_instance.add_stp_group_users(stp_id, request_body) print(api_response) except GateApiException as ex: @@ -396,8 +396,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID | - **request_body** | [**list[int]**](int.md)| User ID | + **stp_id** | **int**| STP Group ID. | + **request_body** | [**list[int]**](int.md)| User ID. | ### Return type @@ -422,7 +422,7 @@ Name | Type | Description | Notes # **delete_stp_group_users** > list[StpGroupUser] delete_stp_group_users(stp_id, user_id) -Delete the user in the STP group +Delete the user in the STP group. - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted @@ -450,11 +450,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID -user_id = 1 # int | STP user ID, multiple can be separated by commas +stp_id = 1 # int | STP Group ID. +user_id = 1 # int | STP user ID, multiple can be separated by commas. try: - # Delete the user in the STP group + # Delete the user in the STP group. api_response = api_instance.delete_stp_group_users(stp_id, user_id) print(api_response) except GateApiException as ex: @@ -467,8 +467,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID | - **user_id** | **int**| STP user ID, multiple can be separated by commas | + **stp_id** | **int**| STP Group ID. | + **user_id** | **int**| STP user ID, multiple can be separated by commas. | ### Return type @@ -486,7 +486,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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) @@ -551,7 +551,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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) @@ -619,7 +619,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Success. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/AccountBalance.md b/docs/AccountBalance.md index 6e31613..ccf42f5 100644 --- a/docs/AccountBalance.md +++ b/docs/AccountBalance.md @@ -1,13 +1,13 @@ # AccountBalance -Total balances calculated with specified currency unit +Total balances calculated with specified currency unit. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**amount** | **str** | Account total balance amount | [optional] -**currency** | **str** | Currency | [optional] +**amount** | **str** | Account total balance amount. | [optional] +**currency** | **str** | Currency. | [optional] **unrealised_pnl** | **str** | Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts | [optional] -**borrowed** | **str** | Borrowed,this field will only appear in margin and cross_margin accounts | [optional] +**borrowed** | **str** | Borrowed,this field will only appear in margin and cross_margin accounts. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md index ca96766..16a25d9 100644 --- a/docs/AccountDetail.md +++ b/docs/AccountDetail.md @@ -1,15 +1,15 @@ # AccountDetail -Account detail +Account detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ip_whitelist** | **list[str]** | IP whitelist | [optional] -**currency_pairs** | **list[str]** | CurrencyPair whitelisting | [optional] -**user_id** | **int** | User ID | [optional] -**tier** | **int** | User VIP level | [optional] +**ip_whitelist** | **list[str]** | IP whitelist. | [optional] +**currency_pairs** | **list[str]** | CurrencyPair whitelisting. | [optional] +**user_id** | **int** | User ID. | [optional] +**tier** | **int** | User VIP level. | [optional] **key** | [**AccountDetailKey**](AccountDetailKey.md) | | [optional] -**copy_trading_role** | **int** | User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower | [optional] +**copy_trading_role** | **int** | User role: 0 - Normal user, 1 - Copy trading leader, follower, 3 - Both leader and follower | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountDetailKey.md b/docs/AccountDetailKey.md index e86955d..bdb74c8 100644 --- a/docs/AccountDetailKey.md +++ b/docs/AccountDetailKey.md @@ -1,10 +1,10 @@ # AccountDetailKey -API Key detail +API Key detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **int** | mode: 1 - classic account 2 - portfolio margin account | [optional] +**mode** | **int** | mode: 1 - classic account 2 - portfolio margin account. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountRateLimit.md b/docs/AccountRateLimit.md index 2d86be1..a4275da 100644 --- a/docs/AccountRateLimit.md +++ b/docs/AccountRateLimit.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tier** | **str** | Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) | [optional] -**ratio** | **str** | Transaction rate | [optional] -**main_ratio** | **str** | Total transaction ratio of main account | [optional] -**updated_at** | **str** | Update time | [optional] +**ratio** | **str** | Transaction rate. | [optional] +**main_ratio** | **str** | Total transaction ratio of main account. | [optional] +**updated_at** | **str** | Update time. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyCommission.md b/docs/AgencyCommission.md index 85d5907..a378726 100644 --- a/docs/AgencyCommission.md +++ b/docs/AgencyCommission.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commission_time** | **int** | Commission Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**commission_amount** | **str** | Commission Amount | [optional] -**commission_asset** | **str** | Commission Asset | [optional] -**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional] +**commission_time** | **int** | Commission Time. (unix timestamp). | [optional] +**user_id** | **int** | User ID. | [optional] +**group_name** | **str** | Group name. | [optional] +**commission_amount** | **str** | Commission Amount. | [optional] +**commission_asset** | **str** | Commission Asset. | [optional] +**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyCommissionHistory.md b/docs/AgencyCommissionHistory.md index e3558c1..e343af0 100644 --- a/docs/AgencyCommissionHistory.md +++ b/docs/AgencyCommissionHistory.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**total** | **int** | Total | [optional] -**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**total** | **int** | Total. | [optional] +**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyTransaction.md b/docs/AgencyTransaction.md index e54646f..4a60c7c 100644 --- a/docs/AgencyTransaction.md +++ b/docs/AgencyTransaction.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**fee** | **str** | Fee | [optional] -**fee_asset** | **str** | Fee currency | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**amount** | **str** | Commission Amount | [optional] -**amount_asset** | **str** | Commission Asset | [optional] -**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate | [optional] +**transaction_time** | **int** | Transaction Time. (unix timestamp). | [optional] +**user_id** | **int** | User ID. | [optional] +**group_name** | **str** | Group name. | [optional] +**fee** | **str** | Fee. | [optional] +**fee_asset** | **str** | Fee currency. | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**amount** | **str** | Commission Amount. | [optional] +**amount_asset** | **str** | Commission Asset. | [optional] +**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyTransactionHistory.md b/docs/AgencyTransactionHistory.md index a79d13c..c98aed3 100644 --- a/docs/AgencyTransactionHistory.md +++ b/docs/AgencyTransactionHistory.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**total** | **int** | Total | [optional] -**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**total** | **int** | Total. | [optional] +**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AutoRepaySetting.md b/docs/AutoRepaySetting.md index 14d2c7e..e17f633 100644 --- a/docs/AutoRepaySetting.md +++ b/docs/AutoRepaySetting.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | Auto repayment status. `on` - enabled, `off` - disabled | [optional] +**status** | **str** | Auto repayment status. `on` - enabled, `off` - disabled. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchAmendItem.md b/docs/BatchAmendItem.md index e5a1647..cdbf4ee 100644 --- a/docs/BatchAmendItem.md +++ b/docs/BatchAmendItem.md @@ -1,15 +1,15 @@ # BatchAmendItem -Order information that needs to be modified +Order information that needs to be modified. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **order_id** | **str** | The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). | -**currency_pair** | **str** | Currency pair | +**currency_pair** | **str** | Currency pair. | **account** | **str** | Default spot, unified account and warehouse-by-store leverage account. | [optional] **amount** | **str** | Trading Quantity. Only one of amountor pricecan be specified. | [optional] **price** | **str** | Trading Price. Only one of amountor pricecan be specified. | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] +**amend_text** | **str** | Custom info during amending order. | [optional] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchAmendOrderReq.md b/docs/BatchAmendOrderReq.md index 121b66c..47e64a9 100644 --- a/docs/BatchAmendOrderReq.md +++ b/docs/BatchAmendOrderReq.md @@ -1,14 +1,14 @@ # BatchAmendOrderReq -Modify contract order parameters +Modify contract order parameters. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] -**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] -**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] +**order_id** | **int** | Order id, order_id and text must contain at least one. | [optional] +**text** | **str** | User-defined order text, at least one of order_id and text must be passed. | [optional] +**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] **price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] +**amend_text** | **str** | Custom info during amending 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/BatchFuturesOrder.md b/docs/BatchFuturesOrder.md index 538f820..a51e2eb 100644 --- a/docs/BatchFuturesOrder.md +++ b/docs/BatchFuturesOrder.md @@ -1,36 +1,36 @@ # BatchFuturesOrder -Futures order details +Futures order details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] -**label** | **str** | Error label, only exists if execution fails | [optional] +**succeeded** | **bool** | Whether the batch of orders succeeded. | [optional] +**label** | **str** | Error label, only exists if execution fails. | [optional] **detail** | **str** | Error detail, only present if execution failed and details need to be given | [optional] -**id** | **int** | Futures order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time of order | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] -**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] +**id** | **int** | Futures order ID. | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**create_time** | **float** | Creation time of order. | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open. | [optional] [readonly] +**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] **status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] +**contract** | **str** | Futures contract. | [optional] **size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | [optional] **iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] -**is_close** | **bool** | Is the order to close position | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] +**price** | **str** | Order price. 0 for market order with `tif` set as `ioc`. | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0. | [optional] [default to False] +**is_close** | **bool** | Is the order to close position. | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order. | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation. | [optional] [readonly] **tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded | [optional] [readonly] -**fill_price** | **str** | Fill price of the order | [optional] [readonly] +**left** | **int** | Size left to be traded. | [optional] [readonly] +**fill_price** | **str** | Fill price of the order. | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] -**tkfr** | **str** | Taker fee | [optional] [readonly] -**mkfr** | **str** | Maker fee | [optional] [readonly] -**refu** | **int** | Reference user ID | [optional] [readonly] +**tkfr** | **str** | Taker fee. | [optional] [readonly] +**mkfr** | **str** | Maker fee. | [optional] [readonly] +**refu** | **int** | Reference user ID. | [optional] [readonly] **auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade 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] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchOrder.md b/docs/BatchOrder.md index 17b6442..9734f45 100644 --- a/docs/BatchOrder.md +++ b/docs/BatchOrder.md @@ -1,45 +1,45 @@ # BatchOrder -Batch order details +Batch order details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] +**order_id** | **str** | Order ID. | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] -**label** | **str** | Error label, if any, otherwise an empty string | [optional] -**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] -**id** | **str** | Order ID | [optional] [readonly] -**create_time** | **str** | Creation time of order | [optional] [readonly] -**update_time** | **str** | Last modification time of order | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] +**succeeded** | **bool** | Whether the batch of orders succeeded. | [optional] +**label** | **str** | Error label, if any, otherwise an empty string. | [optional] +**message** | **str** | Detailed error message, if any, otherwise an empty string. | [optional] +**id** | **str** | Order ID. | [optional] [readonly] +**create_time** | **str** | Creation time of order. | [optional] [readonly] +**update_time** | **str** | Last modification time of order. | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds). | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] +**currency_pair** | **str** | Currency pair. | [optional] **type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Buy or sell order | [optional] -**amount** | **str** | Trade amount | [optional] -**price** | **str** | Order price | [optional] +**side** | **str** | Buy or sell order. | [optional] +**amount** | **str** | Trade amount. | [optional] +**price** | **str** | Order price. | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] **auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] **auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price | [optional] [readonly] -**fee** | **str** | Fee deducted | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] +**left** | **str** | Amount left to fill. | [optional] [readonly] +**filled_amount** | **str** | Amount traded to fill. | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total`. | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency. | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price. | [optional] [readonly] +**fee** | **str** | Fee deducted. | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit. | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee. | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee. | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee discount is used. | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee. | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit. | [optional] [readonly] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] **finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BorrowCurrencyInfo.md b/docs/BorrowCurrencyInfo.md index c627a30..f9b6c0a 100644 --- a/docs/BorrowCurrencyInfo.md +++ b/docs/BorrowCurrencyInfo.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**left_repay_principal** | **str** | outstanding principal | [optional] -**left_repay_interest** | **str** | outstanding interest | [optional] -**left_repay_usdt** | **str** | Value of left total repayments amount in USDT | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**left_repay_principal** | **str** | outstanding principal. | [optional] +**left_repay_interest** | **str** | outstanding interest. | [optional] +**left_repay_usdt** | **str** | Value of left total repayments amount in USDT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerCommission.md b/docs/BrokerCommission.md index 4c722fa..dcdf074 100644 --- a/docs/BrokerCommission.md +++ b/docs/BrokerCommission.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of comission history | [optional] +**total** | **int** | Total. | [optional] +**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of comission history. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerCommission1.md b/docs/BrokerCommission1.md index f3850b8..b411106 100644 --- a/docs/BrokerCommission1.md +++ b/docs/BrokerCommission1.md @@ -3,16 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commission_time** | **int** | Commission Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**amount** | **str** | The amount of commission rebates | [optional] -**fee** | **str** | Fee | [optional] -**fee_asset** | **str** | Fee currency | [optional] -**rebate_fee** | **str** | The income from rebates, converted to USDT | [optional] -**source** | **str** | Rebate Type: Spot、Futures、Options | [optional] -**currency_pair** | **str** | Currency pair | [optional] +**commission_time** | **int** | Commission Time. (unix timestamp). | [optional] +**user_id** | **int** | User ID. | [optional] +**group_name** | **str** | Group name. | [optional] +**amount** | **str** | The amount of commission rebates. | [optional] +**fee** | **str** | Fee. | [optional] +**fee_asset** | **str** | Fee currency. | [optional] +**rebate_fee** | **str** | The income from rebates, converted to USDT. | [optional] +**source** | **str** | Rebate Type: Spot、Futures、Options.、Alpha | [optional] +**currency_pair** | **str** | Currency pair. | [optional] **sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.md) | | [optional] +**alpha_contract_addr** | **str** | Alpha token address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerCommissionSubBrokerInfo.md b/docs/BrokerCommissionSubBrokerInfo.md index c91f6c9..262352f 100644 --- a/docs/BrokerCommissionSubBrokerInfo.md +++ b/docs/BrokerCommissionSubBrokerInfo.md @@ -1,13 +1,13 @@ # BrokerCommissionSubBrokerInfo -The sub broker info +The sub broker info. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | The sub broker user ID | [optional] -**original_commission_rate** | **str** | The sub broker original commission rate | [optional] -**relative_commission_rate** | **str** | The sub broker relative commission rate | [optional] -**commission_rate** | **str** | The sub broker actual commission rate | [optional] +**user_id** | **int** | The sub broker user ID. | [optional] +**original_commission_rate** | **str** | The sub broker original commission rate. | [optional] +**relative_commission_rate** | **str** | The sub broker relative commission rate. | [optional] +**commission_rate** | **str** | The sub broker actual commission rate. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerTransaction.md b/docs/BrokerTransaction.md index c450894..e974fdf 100644 --- a/docs/BrokerTransaction.md +++ b/docs/BrokerTransaction.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history | [optional] +**total** | **int** | Total. | [optional] +**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerTransaction1.md b/docs/BrokerTransaction1.md index cc4444e..a28ac63 100644 --- a/docs/BrokerTransaction1.md +++ b/docs/BrokerTransaction1.md @@ -3,15 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] -**user_id** | **int** | User ID | [optional] -**group_name** | **str** | Group name | [optional] -**fee** | **str** | fee (usdt) | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**amount** | **str** | Commission Amount | [optional] -**fee_asset** | **str** | Fee currency | [optional] -**source** | **str** | Rebate Type: Spot、Futures、Options | [optional] +**transaction_time** | **int** | Transaction Time. (unix timestamp). | [optional] +**user_id** | **int** | User ID. | [optional] +**group_name** | **str** | Group name. | [optional] +**fee** | **str** | fee (usdt). | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**amount** | **str** | Commission Amount. | [optional] +**fee_asset** | **str** | Fee currency. | [optional] +**source** | **str** | Rebate Type: Spot、Futures、Options.、Alpha | [optional] **sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.md) | | [optional] +**alpha_contract_addr** | **str** | Alpha token address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CancelBatchOrder.md b/docs/CancelBatchOrder.md index 4d2953b..4cfa42a 100644 --- a/docs/CancelBatchOrder.md +++ b/docs/CancelBatchOrder.md @@ -1,10 +1,10 @@ # CancelBatchOrder -Info of order to be cancelled +Info of order to be cancelled. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Order currency pair | +**currency_pair** | **str** | Order currency pair. | **id** | **str** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation | **account** | **str** | If the canceled order is a unified account apikey, this field must be specified and set to `unified` | [optional] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] diff --git a/docs/CancelOrderResult.md b/docs/CancelOrderResult.md index af56f5e..6316135 100644 --- a/docs/CancelOrderResult.md +++ b/docs/CancelOrderResult.md @@ -1,16 +1,16 @@ # CancelOrderResult -Order cancellation result +Order cancellation result. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Order currency pair | [optional] -**id** | **str** | Order ID | [optional] -**text** | **str** | Custom order information | [optional] -**succeeded** | **bool** | Whether cancellation succeeded | [optional] -**label** | **str** | Error label when failed to cancel the order; emtpy if succeeded | [optional] -**message** | **str** | Error message when failed to cancel the order; empty if succeeded | [optional] -**account** | **str** | Default is empty (deprecated) | [optional] +**currency_pair** | **str** | Order currency pair. | [optional] +**id** | **str** | Order ID. | [optional] +**text** | **str** | Custom order information. | [optional] +**succeeded** | **bool** | Whether cancellation succeeded. | [optional] +**label** | **str** | Error label when failed to cancel the order; emtpy if succeeded. | [optional] +**message** | **str** | Error message when failed to cancel the order; empty if succeeded. | [optional] +**account** | **str** | Default is empty (deprecated). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralAdjust.md b/docs/CollateralAdjust.md index 8392662..d070fcd 100644 --- a/docs/CollateralAdjust.md +++ b/docs/CollateralAdjust.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | +**order_id** | **int** | Order ID. | **type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | -**collaterals** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral Currency List | [optional] +**collaterals** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral Currency List. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralAdjustRes.md b/docs/CollateralAdjustRes.md index 05bd46a..777c60a 100644 --- a/docs/CollateralAdjustRes.md +++ b/docs/CollateralAdjustRes.md @@ -1,11 +1,11 @@ # CollateralAdjustRes -Result of multi-collateral adjustment +Result of multi-collateral adjustment. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**collateral_currencies** | [**list[CollateralCurrencyRes]**](CollateralCurrencyRes.md) | Collateral Currency Information | [optional] +**order_id** | **int** | Order ID. | [optional] +**collateral_currencies** | [**list[CollateralCurrencyRes]**](CollateralCurrencyRes.md) | Collateral Currency Information. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralAlign.md b/docs/CollateralAlign.md index 52cc64f..b758aae 100644 --- a/docs/CollateralAlign.md +++ b/docs/CollateralAlign.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | -**collateral_currency** | **str** | Collateral | -**collateral_amount** | **str** | Collateral amount | +**order_id** | **int** | Order ID. | +**collateral_currency** | **str** | Collateral. | +**collateral_amount** | **str** | Collateral amount. | **type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrency.md b/docs/CollateralCurrency.md index 016d704..330e7f3 100644 --- a/docs/CollateralCurrency.md +++ b/docs/CollateralCurrency.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**amount** | **str** | Size | [optional] +**currency** | **str** | Currency. | [optional] +**amount** | **str** | Size. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrencyInfo.md b/docs/CollateralCurrencyInfo.md index 222b2fc..1401846 100644 --- a/docs/CollateralCurrencyInfo.md +++ b/docs/CollateralCurrencyInfo.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**left_collateral** | **str** | Left Collateral Amount | [optional] -**left_collateral_usdt** | **str** | Value of left collateral amount in USDT | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**left_collateral** | **str** | Left Collateral Amount. | [optional] +**left_collateral_usdt** | **str** | Value of left collateral amount in USDT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrencyRes.md b/docs/CollateralCurrencyRes.md index 9dcfeb8..5b53bf7 100644 --- a/docs/CollateralCurrencyRes.md +++ b/docs/CollateralCurrencyRes.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**succeeded** | **bool** | Update success status | [optional] +**succeeded** | **bool** | Update success status. | [optional] **label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] **message** | **str** | Error description in case of operation failure; empty when successful. | [optional] -**currency** | **str** | Currency | [optional] +**currency** | **str** | Currency. | [optional] **amount** | **str** | Quantity of successful collateral operation; 0 if the operation fails. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrentRate.md b/docs/CollateralCurrentRate.md index 73ba5c8..c41614e 100644 --- a/docs/CollateralCurrentRate.md +++ b/docs/CollateralCurrentRate.md @@ -1,11 +1,11 @@ # CollateralCurrentRate -Multi-currency pledge current interest rate +Multi-currency pledge current interest rate. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**current_rate** | **str** | Currency current interest rate | [optional] +**currency** | **str** | Currency. | [optional] +**current_rate** | **str** | Currency current interest rate. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralFixRate.md b/docs/CollateralFixRate.md index f6e37f8..e97f9aa 100644 --- a/docs/CollateralFixRate.md +++ b/docs/CollateralFixRate.md @@ -1,13 +1,13 @@ # CollateralFixRate -Multi-collateral fixed interest rate +Multi-collateral fixed interest rate. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**rate_7d** | **str** | Fixed interest rate for a lending period of 7 days | [optional] -**rate_30d** | **str** | Fixed interest rate for a lending period of 30 days | [optional] -**update_time** | **int** | Update time, timestamp, unit in seconds | [optional] +**currency** | **str** | Currency. | [optional] +**rate_7d** | **str** | Fixed interest rate for a lending period of 7 days. | [optional] +**rate_30d** | **str** | Fixed interest rate for a lending period of 30 days. | [optional] +**update_time** | **int** | Update time, timestamp, unit in seconds. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralLoanApi.md b/docs/CollateralLoanApi.md index 79193a1..f120c03 100644 --- a/docs/CollateralLoanApi.md +++ b/docs/CollateralLoanApi.md @@ -4,22 +4,22 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders -[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order -[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order -[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment -[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history -[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records -[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral -[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user -[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio -[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies +[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders. +[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order. +[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order. +[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment. +[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history. +[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records. +[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral. +[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user. +[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio. +[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies. # **list_collateral_loan_orders** > list[CollateralOrder] list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) -List Orders +List Orders. ### Example @@ -45,13 +45,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -collateral_currency = 'BTC' # str | Collateral (optional) -borrow_currency = 'USDT' # str | Borrowed currency (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +collateral_currency = 'BTC' # str | Collateral. (optional) +borrow_currency = 'USDT' # str | Borrowed currency. (optional) try: - # List Orders + # List Orders. api_response = api_instance.list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) print(api_response) except GateApiException as ex: @@ -64,10 +64,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **collateral_currency** | **str**| Collateral | [optional] - **borrow_currency** | **str**| Borrowed currency | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **collateral_currency** | **str**| Collateral. | [optional] + **borrow_currency** | **str**| Borrowed currency. | [optional] ### Return type @@ -85,14 +85,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_collateral_loan** > OrderResp create_collateral_loan(create_collateral_order) -Place order +Place order. ### Example @@ -121,7 +121,7 @@ api_instance = gate_api.CollateralLoanApi(api_client) create_collateral_order = gate_api.CreateCollateralOrder() # CreateCollateralOrder | try: - # Place order + # Place order. api_response = api_instance.create_collateral_loan(create_collateral_order) print(api_response) except GateApiException as ex: @@ -152,14 +152,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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_collateral_loan_order_detail** > CollateralOrder get_collateral_loan_order_detail(order_id) -Get a single order +Get a single order. ### Example @@ -185,10 +185,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -order_id = 100001 # int | Order ID returned on successful order creation +order_id = 100001 # int | Order ID returned on successful order creation. try: - # Get a single order + # Get a single order. api_response = api_instance.get_collateral_loan_order_detail(order_id) print(api_response) except GateApiException as ex: @@ -201,7 +201,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation | + **order_id** | **int**| Order ID returned on successful order creation. | ### Return type @@ -219,14 +219,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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) # **repay_collateral_loan** > RepayResp repay_collateral_loan(repay_loan) -Repayment +Repayment. ### Example @@ -255,7 +255,7 @@ api_instance = gate_api.CollateralLoanApi(api_client) repay_loan = gate_api.RepayLoan() # RepayLoan | try: - # Repayment + # Repayment. api_response = api_instance.repay_collateral_loan(repay_loan) print(api_response) except GateApiException as ex: @@ -286,14 +286,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully | - | +**200** | Operated 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_repay_records** > list[RepayRecord] list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) -Repayment history +Repayment history. ### Example @@ -319,16 +319,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -source = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation -borrow_currency = 'USDT' # str | Borrowed currency (optional) -collateral_currency = 'BTC' # str | Collateral (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) +source = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation. +borrow_currency = 'USDT' # str | Borrowed currency. (optional) +collateral_currency = 'BTC' # str | Collateral. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +_from = 1609459200 # int | Start timestamp of the query. (optional) +to = 1609459200 # int | Time range ending, default to current time. (optional) try: - # Repayment history + # Repayment history. api_response = api_instance.list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -341,13 +341,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **source** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | - **borrow_currency** | **str**| Borrowed currency | [optional] - **collateral_currency** | **str**| Collateral | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] + **source** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation. | + **borrow_currency** | **str**| Borrowed currency. | [optional] + **collateral_currency** | **str**| Collateral. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] ### Return type @@ -365,14 +365,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_collateral_records** > list[CollateralRecord] list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) -Query collateral adjustment records +Query collateral adjustment records. ### Example @@ -398,15 +398,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) -borrow_currency = 'USDT' # str | Borrowed currency (optional) -collateral_currency = 'BTC' # str | Collateral (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +_from = 1609459200 # int | Start timestamp of the query. (optional) +to = 1609459200 # int | Time range ending, default to current time. (optional) +borrow_currency = 'USDT' # str | Borrowed currency. (optional) +collateral_currency = 'BTC' # str | Collateral. (optional) try: - # Query collateral adjustment records + # Query collateral adjustment records. api_response = api_instance.list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) print(api_response) except GateApiException as ex: @@ -419,12 +419,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **borrow_currency** | **str**| Borrowed currency | [optional] - **collateral_currency** | **str**| Collateral | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **borrow_currency** | **str**| Borrowed currency. | [optional] + **collateral_currency** | **str**| Collateral. | [optional] ### Return type @@ -442,14 +442,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **operate_collateral** > operate_collateral(collateral_align) -Increase or redeem collateral +Increase or redeem collateral. ### Example @@ -478,7 +478,7 @@ api_instance = gate_api.CollateralLoanApi(api_client) collateral_align = gate_api.CollateralAlign() # CollateralAlign | try: - # Increase or redeem collateral + # Increase or redeem collateral. api_instance.operate_collateral(collateral_align) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -508,14 +508,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully | - | +**204** | Operated 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_total_amount** > UserTotalAmount get_user_total_amount() -Query the total borrowing and collateral amount for the user +Query the total borrowing and collateral amount for the user. ### Example @@ -543,7 +543,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CollateralLoanApi(api_client) try: - # Query the total borrowing and collateral amount for the user + # Query the total borrowing and collateral amount for the user. api_response = api_instance.get_user_total_amount() print(api_response) except GateApiException as ex: @@ -571,14 +571,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_ltv_info** > UserLtvInfo get_user_ltv_info(collateral_currency, borrow_currency) -Query user's collateralization ratio +Query user's collateralization ratio. ### Example @@ -604,11 +604,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -collateral_currency = 'BTC' # str | Collateral -borrow_currency = 'USDT' # str | Borrowed currency +collateral_currency = 'BTC' # str | Collateral. +borrow_currency = 'USDT' # str | Borrowed currency. try: - # Query user's collateralization ratio + # Query user's collateralization ratio. api_response = api_instance.get_user_ltv_info(collateral_currency, borrow_currency) print(api_response) except GateApiException as ex: @@ -621,8 +621,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collateral_currency** | **str**| Collateral | - **borrow_currency** | **str**| Borrowed currency | + **collateral_currency** | **str**| Collateral. | + **borrow_currency** | **str**| Borrowed currency. | ### Return type @@ -640,14 +640,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_collateral_currencies** > list[CollateralLoanCurrency] list_collateral_currencies(loan_currency=loan_currency) -Query supported borrowing and collateral currencies +Query supported borrowing and collateral currencies. ### Example @@ -667,7 +667,7 @@ api_instance = gate_api.CollateralLoanApi(api_client) loan_currency = 'BTC' # str | The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. (optional) try: - # Query supported borrowing and collateral currencies + # Query supported borrowing and collateral currencies. api_response = api_instance.list_collateral_currencies(loan_currency=loan_currency) print(api_response) except GateApiException as ex: @@ -698,7 +698,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/CollateralLoanCurrency.md b/docs/CollateralLoanCurrency.md index fc4151a..baa61a8 100644 --- a/docs/CollateralLoanCurrency.md +++ b/docs/CollateralLoanCurrency.md @@ -1,11 +1,11 @@ # CollateralLoanCurrency -Supported borrowing and collateral currencies +Supported borrowing and collateral currencies. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**loan_currency** | **str** | Borrowed currency | [optional] -**collateral_currency** | **list[str]** | List of supported collateral currencies | [optional] +**loan_currency** | **str** | Borrowed currency. | [optional] +**collateral_currency** | **list[str]** | List of supported collateral currencies. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralLtv.md b/docs/CollateralLtv.md index 3e79d8b..d9e0504 100644 --- a/docs/CollateralLtv.md +++ b/docs/CollateralLtv.md @@ -1,12 +1,12 @@ # CollateralLtv -Collateral Ratio +Collateral Ratio. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**init_ltv** | **str** | The initial collateralization rate | [optional] -**alert_ltv** | **str** | Warning collateralization ratio | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] +**init_ltv** | **str** | The initial collateralization rate. | [optional] +**alert_ltv** | **str** | Warning collateralization ratio. | [optional] +**liquidate_ltv** | **str** | The liquidation collateralization rate. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralOrder.md b/docs/CollateralOrder.md index 32216b9..4596948 100644 --- a/docs/CollateralOrder.md +++ b/docs/CollateralOrder.md @@ -1,25 +1,25 @@ # CollateralOrder -Collateral Order +Collateral Order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**collateral_currency** | **str** | Collateral | [optional] -**collateral_amount** | **str** | Collateral amount | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**borrow_amount** | **str** | Borrowing amount | [optional] -**repaid_amount** | **str** | Repaid amount | [optional] -**repaid_principal** | **str** | Repaid principal | [optional] -**repaid_interest** | **str** | Repaid interest | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**current_ltv** | **str** | The current collateralization rate | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] +**order_id** | **int** | Order ID. | [optional] +**collateral_currency** | **str** | Collateral. | [optional] +**collateral_amount** | **str** | Collateral amount. | [optional] +**borrow_currency** | **str** | Borrowed currency. | [optional] +**borrow_amount** | **str** | Borrowing amount. | [optional] +**repaid_amount** | **str** | Repaid amount. | [optional] +**repaid_principal** | **str** | Repaid principal. | [optional] +**repaid_interest** | **str** | Repaid interest. | [optional] +**init_ltv** | **str** | The initial collateralization rate. | [optional] +**current_ltv** | **str** | The current collateralization rate. | [optional] +**liquidate_ltv** | **str** | The liquidation collateralization rate. | [optional] **status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] **left_repay_total** | **str** | Outstanding principal and interest (outstanding principal + outstanding interest) | [optional] -**left_repay_principal** | **str** | outstanding principal | [optional] -**left_repay_interest** | **str** | outstanding interest | [optional] +**left_repay_principal** | **str** | outstanding principal. | [optional] +**left_repay_interest** | **str** | outstanding interest. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralRecord.md b/docs/CollateralRecord.md index 5a290c8..c083f74 100644 --- a/docs/CollateralRecord.md +++ b/docs/CollateralRecord.md @@ -1,19 +1,19 @@ # CollateralRecord -Collateral record +Collateral record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Collateral record ID | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**borrow_amount** | **str** | Borrowing amount | [optional] -**collateral_currency** | **str** | Collateral | [optional] -**before_collateral** | **str** | The collateral amount before adjustment | [optional] -**after_collateral** | **str** | The collateral amount after adjustment | [optional] -**before_ltv** | **str** | The collateral ratio before adjustment | [optional] -**after_ltv** | **str** | The collateral ratio after adjustment | [optional] -**operate_time** | **int** | Timestamp of the operation, in seconds | [optional] +**order_id** | **int** | Order ID. | [optional] +**record_id** | **int** | Collateral record ID. | [optional] +**borrow_currency** | **str** | Borrowed currency. | [optional] +**borrow_amount** | **str** | Borrowing amount. | [optional] +**collateral_currency** | **str** | Collateral. | [optional] +**before_collateral** | **str** | The collateral amount before adjustment. | [optional] +**after_collateral** | **str** | The collateral amount after adjustment. | [optional] +**before_ltv** | **str** | The collateral ratio before adjustment. | [optional] +**after_ltv** | **str** | The collateral ratio after adjustment. | [optional] +**operate_time** | **int** | Timestamp of the operation, in seconds. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Contract.md b/docs/Contract.md index 05a1afd..aa2cf9b 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -1,47 +1,47 @@ # Contract -Futures contract details +Futures contract details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Futures contract | [optional] -**type** | **str** | Futures contract type | [optional] -**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] -**leverage_min** | **str** | Minimum leverage | [optional] -**leverage_max** | **str** | Maximum leverage | [optional] -**maintenance_rate** | **str** | Maintenance rate of margin | [optional] -**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional] -**mark_price** | **str** | Current mark price | [optional] -**index_price** | **str** | Current index price | [optional] -**last_price** | **str** | Last trading price | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] -**taker_fee_rate** | **str** | Taker fee rate | [optional] -**order_price_round** | **str** | Minimum order price increment | [optional] -**mark_price_round** | **str** | Minimum mark price increment | [optional] -**funding_rate** | **str** | Current funding rate | [optional] -**funding_interval** | **int** | Funding application interval, unit in seconds | [optional] -**funding_next_apply** | **float** | Next funding time | [optional] -**risk_limit_base** | **str** | Risk limit base,deprecated | [optional] -**risk_limit_step** | **str** | Step of adjusting risk limit,deprecated | [optional] +**name** | **str** | Futures contract. | [optional] +**type** | **str** | Futures contract type. | [optional] +**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency. | [optional] +**leverage_min** | **str** | Minimum leverage. | [optional] +**leverage_max** | **str** | Maximum leverage. | [optional] +**maintenance_rate** | **str** | Maintenance rate of margin. | [optional] +**mark_type** | **str** | Mark price type, internal - based on internal trading, external index price | [optional] +**mark_price** | **str** | Current mark price. | [optional] +**index_price** | **str** | Current index price. | [optional] +**last_price** | **str** | Last trading price. | [optional] +**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate. | [optional] +**taker_fee_rate** | **str** | Taker fee rate. | [optional] +**order_price_round** | **str** | Minimum order price increment. | [optional] +**mark_price_round** | **str** | Minimum mark price increment. | [optional] +**funding_rate** | **str** | Current funding rate. | [optional] +**funding_interval** | **int** | Funding application interval, unit in seconds. | [optional] +**funding_next_apply** | **float** | Next funding time. | [optional] +**risk_limit_base** | **str** | Risk limit base,deprecated. | [optional] +**risk_limit_step** | **str** | Step of adjusting risk limit,deprecated. | [optional] **risk_limit_max** | **str** | Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed | [optional] +**order_size_min** | **int** | Minimum order size the contract allowed. | [optional] +**order_size_max** | **int** | Maximum order size the contract allowed. | [optional] **order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate | [optional] -**orderbook_id** | **int** | Current orderbook ID | [optional] -**trade_id** | **int** | Current trade ID | [optional] -**trade_size** | **int** | Historical accumulated trade size | [optional] -**position_size** | **int** | Current total long position size | [optional] -**config_change_time** | **float** | Last changed time of configuration | [optional] -**in_delisting** | **bool** | `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline | [optional] -**orders_limit** | **int** | Maximum number of open orders | [optional] -**enable_bonus** | **bool** | Whether bouns is enabled | [optional] -**enable_credit** | **bool** | Whether portfolio margin account is enabled | [optional] -**create_time** | **float** | Created time of the contract | [optional] +**ref_discount_rate** | **str** | Referral fee rate discount. | [optional] +**ref_rebate_rate** | **str** | Referrer commission rate. | [optional] +**orderbook_id** | **int** | Current orderbook ID. | [optional] +**trade_id** | **int** | Current trade ID. | [optional] +**trade_size** | **int** | Historical accumulated trade size. | [optional] +**position_size** | **int** | Current total long position size. | [optional] +**config_change_time** | **float** | Last changed time of configuration. | [optional] +**in_delisting** | **bool** | `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` contract is offline | [optional] +**orders_limit** | **int** | Maximum number of open orders. | [optional] +**enable_bonus** | **bool** | Whether bouns is enabled. | [optional] +**enable_credit** | **bool** | Whether portfolio margin account is enabled. | [optional] +**create_time** | **float** | Created time of the contract. | [optional] **funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional] -**status** | **str** | Contract Status Types include: prelaunch, trading, delisting, delisted | [optional] -**launch_time** | **int** | Contract expiry timestamp | [optional] +**status** | **str** | Contract Status Types include: prelaunch, trading, delisting, delisted. | [optional] +**launch_time** | **int** | Contract expiry timestamp. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContractStat.md b/docs/ContractStat.md index c66586e..17b9038 100644 --- a/docs/ContractStat.md +++ b/docs/ContractStat.md @@ -3,19 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Stat timestamp | [optional] -**lsr_taker** | **float** | Long/short account number ratio | [optional] -**lsr_account** | **float** | Long/short taker size ratio | [optional] -**long_liq_size** | **int** | Long liquidation size | [optional] -**long_liq_amount** | **float** | Long liquidation amount(base currency) | [optional] -**long_liq_usd** | **float** | Long liquidation volume(quote currency) | [optional] -**short_liq_size** | **int** | Short liquidation size | [optional] -**short_liq_amount** | **float** | Short liquidation amount(base currency) | [optional] -**short_liq_usd** | **float** | Short liquidation volume(quote currency) | [optional] -**open_interest** | **int** | Open interest size | [optional] -**open_interest_usd** | **float** | Open interest volume(quote currency) | [optional] -**top_lsr_account** | **float** | Top trader long/short account ratio | [optional] -**top_lsr_size** | **float** | Top trader long/short position ratio | [optional] +**time** | **int** | Stat timestamp. | [optional] +**lsr_taker** | **float** | Long/short account number ratio. | [optional] +**lsr_account** | **float** | Long/short taker size ratio. | [optional] +**long_liq_size** | **int** | Long liquidation size. | [optional] +**long_liq_amount** | **float** | Long liquidation amount(base currency). | [optional] +**long_liq_usd** | **float** | Long liquidation volume(quote currency). | [optional] +**short_liq_size** | **int** | Short liquidation size. | [optional] +**short_liq_amount** | **float** | Short liquidation amount(base currency). | [optional] +**short_liq_usd** | **float** | Short liquidation volume(quote currency). | [optional] +**open_interest** | **int** | Open interest size. | [optional] +**open_interest_usd** | **float** | Open interest volume(quote currency). | [optional] +**top_lsr_account** | **float** | Top trader long/short account ratio. | [optional] +**top_lsr_size** | **float** | Top trader long/short position ratio. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConvertSmallBalance.md b/docs/ConvertSmallBalance.md index 3265b4c..19f275b 100644 --- a/docs/ConvertSmallBalance.md +++ b/docs/ConvertSmallBalance.md @@ -1,11 +1,11 @@ # ConvertSmallBalance -Convert Small Balance +Convert Small Balance. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **list[str]** | Currency | [optional] -**is_all** | **bool** | Whether to exchange all | [optional] +**currency** | **list[str]** | Currency. | [optional] +**is_all** | **bool** | Whether to exchange all. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllFuturesTask.md b/docs/CountdownCancelAllFuturesTask.md index f844de4..5bd65b3 100644 --- a/docs/CountdownCancelAllFuturesTask.md +++ b/docs/CountdownCancelAllFuturesTask.md @@ -1,11 +1,11 @@ # CountdownCancelAllFuturesTask -Countdown cancel task detail +Countdown cancel task detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | -**contract** | **str** | Futures contract | [optional] +**contract** | **str** | Futures contract. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllOptionsTask.md b/docs/CountdownCancelAllOptionsTask.md index df3d6d5..79811ac 100644 --- a/docs/CountdownCancelAllOptionsTask.md +++ b/docs/CountdownCancelAllOptionsTask.md @@ -1,12 +1,12 @@ # CountdownCancelAllOptionsTask -Countdown cancel task detail +Countdown cancel task detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | -**contract** | **str** | Options contract name | [optional] -**underlying** | **str** | Underlying | [optional] +**contract** | **str** | Options contract name. | [optional] +**underlying** | **str** | Underlying. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllSpotTask.md b/docs/CountdownCancelAllSpotTask.md index 490dd9c..a5d3d52 100644 --- a/docs/CountdownCancelAllSpotTask.md +++ b/docs/CountdownCancelAllSpotTask.md @@ -1,11 +1,11 @@ # CountdownCancelAllSpotTask -Countdown cancel task detail +Countdown cancel task detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | -**currency_pair** | **str** | Currency pair | [optional] +**currency_pair** | **str** | Currency pair. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCollateralOrder.md b/docs/CreateCollateralOrder.md index d160b3a..9c83f9f 100644 --- a/docs/CreateCollateralOrder.md +++ b/docs/CreateCollateralOrder.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collateral_amount** | **str** | Collateral amount | -**collateral_currency** | **str** | Collateral | -**borrow_amount** | **str** | Borrowing amount | -**borrow_currency** | **str** | Borrowed currency | +**collateral_amount** | **str** | Collateral amount. | +**collateral_currency** | **str** | Collateral. | +**borrow_amount** | **str** | Borrowing amount. | +**borrow_currency** | **str** | Borrowed currency. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateMultiCollateralOrder.md b/docs/CreateMultiCollateralOrder.md index c98e244..81b82ab 100644 --- a/docs/CreateMultiCollateralOrder.md +++ b/docs/CreateMultiCollateralOrder.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**order_type** | **str** | current - current, fixed - fixed, if not specified, default to current | [optional] +**order_id** | **str** | Order ID. | [optional] +**order_type** | **str** | current - current, fixed - fixed, if not specified, default to current. | [optional] **fixed_type** | **str** | Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed | [optional] -**fixed_rate** | **str** | Fixed interest rate, must be specified for fixed | [optional] -**auto_renew** | **bool** | Fixed interest rate, automatic renewal | [optional] -**auto_repay** | **bool** | Fixed interest rate, automatic repayment | [optional] -**borrow_currency** | **str** | Borrowed currency | -**borrow_amount** | **str** | Borrowing amount | -**collateral_currencies** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency and amount | [optional] +**fixed_rate** | **str** | Fixed interest rate, must be specified for fixed. | [optional] +**auto_renew** | **bool** | Fixed interest rate, automatic renewal. | [optional] +**auto_repay** | **bool** | Fixed interest rate, automatic repayment. | [optional] +**borrow_currency** | **str** | Borrowed currency. | +**borrow_amount** | **str** | Borrowing amount. | +**collateral_currencies** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency and amount. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUniLend.md b/docs/CreateUniLend.md index c17fc8e..61b2db6 100644 --- a/docs/CreateUniLend.md +++ b/docs/CreateUniLend.md @@ -1,12 +1,12 @@ # CreateUniLend -Lend or redeem +Lend or redeem. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | -**amount** | **str** | The amount of currency could be lent | -**type** | **str** | type: lend - lend, redeem - redeem | +**currency** | **str** | Currency name. | +**amount** | **str** | The amount of currency could be lent. | +**type** | **str** | type: lend - lend, redeem - redeem. | **min_rate** | **str** | The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUniLoan.md b/docs/CreateUniLoan.md index a8f30e1..56dc03f 100644 --- a/docs/CreateUniLoan.md +++ b/docs/CreateUniLoan.md @@ -1,14 +1,14 @@ # CreateUniLoan -Borrow or repay +Borrow or repay. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | -**type** | **str** | type: borrow - borrow, repay - repay | -**amount** | **str** | The amount of lending or repaying | -**repaid_all** | **bool** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. | [optional] -**currency_pair** | **str** | Currency pair | +**currency** | **str** | Currency. | +**type** | **str** | type: borrow - borrow, repay - repay. | +**amount** | **str** | The amount of lending or repaying. | +**repaid_all** | **bool** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and repaid in full. | [optional] +**currency_pair** | **str** | Currency pair. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossMarginBalance.md b/docs/CrossMarginBalance.md index d2a1945..d2f7b95 100644 --- a/docs/CrossMarginBalance.md +++ b/docs/CrossMarginBalance.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**available** | **str** | Available amount | [optional] -**freeze** | **str** | Locked amount | [optional] -**borrowed** | **str** | Borrowed amount | [optional] -**interest** | **str** | Unpaid interests | [optional] +**available** | **str** | Available amount. | [optional] +**freeze** | **str** | Locked amount. | [optional] +**borrowed** | **str** | Borrowed amount. | [optional] +**interest** | **str** | Unpaid interests. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossMarginLoan.md b/docs/CrossMarginLoan.md index f3f8012..9cdba3e 100644 --- a/docs/CrossMarginLoan.md +++ b/docs/CrossMarginLoan.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Loan record ID | [optional] [readonly] -**create_time** | **int** | Creation timestamp, in milliseconds | [optional] [readonly] -**update_time** | **int** | Update timestamp, in milliseconds | [optional] [readonly] -**currency** | **str** | Currency name | -**amount** | **str** | Borrowed amount | -**text** | **str** | User defined custom ID | [optional] +**id** | **str** | Loan record ID. | [optional] [readonly] +**create_time** | **int** | Creation timestamp, in milliseconds. | [optional] [readonly] +**update_time** | **int** | Update timestamp, in milliseconds. | [optional] [readonly] +**currency** | **str** | Currency name. | +**amount** | **str** | Borrowed amount. | +**text** | **str** | User defined custom ID. | [optional] **status** | **int** | Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete | [optional] [readonly] -**repaid** | **str** | Repaid amount | [optional] [readonly] -**repaid_interest** | **str** | Repaid interest | [optional] [readonly] -**unpaid_interest** | **str** | Outstanding interest yet to be paid | [optional] [readonly] +**repaid** | **str** | Repaid amount. | [optional] [readonly] +**repaid_interest** | **str** | Repaid interest. | [optional] [readonly] +**unpaid_interest** | **str** | Outstanding interest yet to be paid. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossMarginRepayment.md b/docs/CrossMarginRepayment.md index 147ccbc..f0a7fea 100644 --- a/docs/CrossMarginRepayment.md +++ b/docs/CrossMarginRepayment.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Loan record ID | [optional] -**create_time** | **int** | Repayment time | [optional] -**loan_id** | **str** | Loan record ID | [optional] -**currency** | **str** | Currency name | [optional] -**principal** | **str** | Repaid principal | [optional] -**interest** | **str** | Repaid interest | [optional] -**repayment_type** | **str** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation | [optional] [readonly] +**id** | **str** | Loan record ID. | [optional] +**create_time** | **int** | Repayment time. | [optional] +**loan_id** | **str** | Loan record ID. | [optional] +**currency** | **str** | Currency name. | [optional] +**principal** | **str** | Repaid principal. | [optional] +**interest** | **str** | Repaid interest. | [optional] +**repayment_type** | **str** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment after cancellation | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Currency.md b/docs/Currency.md index 27e0400..fd491f8 100644 --- a/docs/Currency.md +++ b/docs/Currency.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency symbol | [optional] -**name** | **str** | Currency name | [optional] -**delisted** | **bool** | Whether currency is de-listed | [optional] -**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled (deprecated) | [optional] -**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed (deprecated) | [optional] -**deposit_disabled** | **bool** | Whether currency's deposit is disabled (deprecated) | [optional] -**trade_disabled** | **bool** | Whether currency's trading is disabled | [optional] +**currency** | **str** | Currency symbol. | [optional] +**name** | **str** | Currency name. | [optional] +**delisted** | **bool** | Whether currency is de-listed. | [optional] +**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled (deprecated). | [optional] +**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed (deprecated). | [optional] +**deposit_disabled** | **bool** | Whether currency's deposit is disabled (deprecated). | [optional] +**trade_disabled** | **bool** | Whether currency's trading is disabled. | [optional] **fixed_rate** | **str** | Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies | [optional] -**chain** | **str** | The main chain corresponding to the coin | [optional] -**chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins | [optional] +**chain** | **str** | The main chain corresponding to the coin. | [optional] +**chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CurrencyChain.md b/docs/CurrencyChain.md index e45d973..369f3d3 100644 --- a/docs/CurrencyChain.md +++ b/docs/CurrencyChain.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**chain** | **str** | Chain name | [optional] -**name_cn** | **str** | Chain name in Chinese | [optional] -**name_en** | **str** | Chain name in English | [optional] +**chain** | **str** | Chain name. | [optional] +**name_cn** | **str** | Chain name in Chinese. | [optional] +**name_en** | **str** | Chain name in English. | [optional] **contract_address** | **str** | Smart contract address for the currency; if no address is available, it will be an empty string | [optional] -**is_disabled** | **int** | If it is disabled. 0 means NOT being disabled | [optional] -**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not | [optional] -**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not | [optional] -**decimal** | **str** | Withdrawal precision | [optional] +**is_disabled** | **int** | If it is disabled. 0 means NOT being disabled. | [optional] +**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not. | [optional] +**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not. | [optional] +**decimal** | **str** | Withdrawal precision. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md index c6006a4..065967e 100644 --- a/docs/CurrencyPair.md +++ b/docs/CurrencyPair.md @@ -1,28 +1,28 @@ # CurrencyPair -Spot currency pair +Spot currency pair. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Currency pair | [optional] -**base** | **str** | Base currency | [optional] -**base_name** | **str** | Transaction currency name | [optional] -**quote** | **str** | Quote currency | [optional] -**quote_name** | **str** | Name of the denominated currency | [optional] -**fee** | **str** | Trading fee | [optional] -**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit | [optional] -**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit | [optional] -**max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit | [optional] -**max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit | [optional] -**amount_precision** | **int** | Amount scale | [optional] -**precision** | **int** | Price scale | [optional] -**trade_status** | **str** | How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold | [optional] -**sell_start** | **int** | Sell start unix timestamp in seconds | [optional] -**buy_start** | **int** | Buy start unix timestamp in seconds | [optional] -**delisting_time** | **int** | Expected time to remove the shelves, Unix timestamp in seconds | [optional] -**type** | **str** | Trading pair type, normal: normal, premarket: pre-market | [optional] -**trade_url** | **str** | Transaction link | [optional] -**st_tag** | **bool** | Whether the trading pair is in ST risk assessment, false - No, true - Yes | [optional] +**id** | **str** | Currency pair. | [optional] +**base** | **str** | Base currency. | [optional] +**base_name** | **str** | Transaction currency name. | [optional] +**quote** | **str** | Quote currency. | [optional] +**quote_name** | **str** | Name of the denominated currency. | [optional] +**fee** | **str** | Trading fee. | [optional] +**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit. | [optional] +**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit. | [optional] +**max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit. | [optional] +**max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit. | [optional] +**amount_precision** | **int** | Amount scale. | [optional] +**precision** | **int** | Price scale. | [optional] +**trade_status** | **str** | How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: sold | [optional] +**sell_start** | **int** | Sell start unix timestamp in seconds. | [optional] +**buy_start** | **int** | Buy start unix timestamp in seconds. | [optional] +**delisting_time** | **int** | Expected time to remove the shelves, Unix timestamp in seconds. | [optional] +**type** | **str** | Trading pair type, normal: normal, premarket: pre-market. | [optional] +**trade_url** | **str** | Transaction link. | [optional] +**st_tag** | **bool** | Whether the trading pair is in ST risk assessment, false - No, true - Yes. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CurrencyQuota.md b/docs/CurrencyQuota.md index f563b08..57a33eb 100644 --- a/docs/CurrencyQuota.md +++ b/docs/CurrencyQuota.md @@ -1,14 +1,14 @@ # CurrencyQuota -Currency Quota +Currency Quota. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**min_quota** | **str** | Minimum borrowing/collateral quota for the currency | [optional] -**left_quota** | **str** | Remaining borrowing/collateral limit for the currency | [optional] -**left_quote_usdt** | **str** | Remaining currency limit converted to USDT | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**min_quota** | **str** | Minimum borrowing/collateral quota for the currency. | [optional] +**left_quota** | **str** | Remaining borrowing/collateral limit for the currency. | [optional] +**left_quote_usdt** | **str** | Remaining currency limit converted to USDT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DebitFee.md b/docs/DebitFee.md index dde6e6a..d04d9bc 100644 --- a/docs/DebitFee.md +++ b/docs/DebitFee.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | Whether GT fee discount is used | +**enabled** | **bool** | Whether GT fee discount is used. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md index b1bf10e..0ed5f6b 100644 --- a/docs/DeliveryApi.md +++ b/docs/DeliveryApi.md @@ -4,41 +4,41 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts -[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract -[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book -[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history -[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks -[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers -[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history -[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account -[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book -[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user -[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position -[**update_delivery_position_margin**](DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin -[**update_delivery_position_leverage**](DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage -[**update_delivery_position_risk_limit**](DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit -[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders -[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order -[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched -[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order -[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order -[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history -[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history -[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history -[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history -[**list_delivery_risk_limit_tiers**](DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers -[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders -[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order -[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders -[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order -[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order +[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts. +[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract. +[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book. +[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history. +[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks. +[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers. +[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history. +[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account. +[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book. +[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user. +[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position. +[**update_delivery_position_margin**](DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin. +[**update_delivery_position_leverage**](DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage. +[**update_delivery_position_risk_limit**](DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit. +[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders. +[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order. +[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched. +[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order. +[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order. +[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history. +[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history. +[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history. +[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history. +[**list_delivery_risk_limit_tiers**](DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers. +[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders. +[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order. +[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders. +[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order. +[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order. # **list_delivery_contracts** > list[DeliveryContract] list_delivery_contracts(settle) -List all futures contracts +List all futures contracts. ### Example @@ -55,10 +55,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency +settle = 'usdt' # str | Settle currency. try: - # List all futures contracts + # List all futures contracts. api_response = api_instance.list_delivery_contracts(settle) print(api_response) except GateApiException as ex: @@ -71,7 +71,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | ### Return type @@ -89,14 +89,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_delivery_contract** > DeliveryContract get_delivery_contract(settle, contract) -Get a single contract +Get a single contract. ### Example @@ -113,11 +113,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. try: - # Get a single contract + # Get a single contract. api_response = api_instance.get_delivery_contract(settle, contract) print(api_response) except GateApiException as ex: @@ -130,8 +130,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | ### Return type @@ -149,16 +149,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Contract information | - | +**200** | Contract information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_order_book** > FuturesOrderBook list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) -Futures order book +Futures order book. -Bids will be sorted by price from high to low, while asks sorted reversely +Bids will be sorted by price from high to low, while asks sorted reversely. ### Example @@ -175,14 +175,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) try: - # Futures order book + # Futures order book. api_response = api_instance.list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -195,10 +195,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] ### Return type @@ -217,14 +217,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Depth query successful | - | +**200** | Depth query successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_trades** > list[FuturesTrade] list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) -Futures trading history +Futures trading history. ### Example @@ -241,15 +241,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) last_id = '12345' # str | 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 (optional) _from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) -to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional) +to = 1546935600 # int | Specify end time in Unix seconds, default to current time. (optional) try: - # Futures trading history + # Futures trading history. api_response = api_instance.list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -262,12 +262,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] **last_id** | **str**| 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 | [optional] **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] - **to** | **int**| Specify end time in Unix seconds, default to current time | [optional] + **to** | **int**| Specify end time in Unix seconds, default to current time. | [optional] ### Return type @@ -285,14 +285,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_candlesticks** > list[DeliveryCandlestick] list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) -Get futures candlesticks +Get futures candlesticks. Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` @@ -311,15 +311,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek (optional) (default to '5m') +interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time (optional) (default to '5m') try: - # Get futures candlesticks + # Get futures candlesticks. api_response = api_instance.list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) print(api_response) except GateApiException as ex: @@ -332,12 +332,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek | [optional] [default to '5m'] + **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time | [optional] [default to '5m'] ### Return type @@ -355,14 +355,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_tickers** > list[DeliveryTicker] list_delivery_tickers(settle, contract=contract) -List futures tickers +List futures tickers. ### Example @@ -379,11 +379,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) try: - # List futures tickers + # List futures tickers. api_response = api_instance.list_delivery_tickers(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -396,8 +396,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | [optional] ### Return type @@ -415,14 +415,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_insurance_ledger** > list[InsuranceRecord] list_delivery_insurance_ledger(settle, limit=limit) -Futures insurance balance history +Futures insurance balance history. ### Example @@ -439,11 +439,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +settle = 'usdt' # str | Settle currency. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # Futures insurance balance history + # Futures insurance balance history. api_response = api_instance.list_delivery_insurance_ledger(settle, limit=limit) print(api_response) except GateApiException as ex: @@ -456,8 +456,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **settle** | **str**| Settle currency. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -475,14 +475,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_accounts** > FuturesAccount list_delivery_accounts(settle) -Query futures account +Query futures account. ### Example @@ -508,10 +508,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency +settle = 'usdt' # str | Settle currency. try: - # Query futures account + # Query futures account. api_response = api_instance.list_delivery_accounts(settle) print(api_response) except GateApiException as ex: @@ -524,7 +524,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | ### Return type @@ -542,14 +542,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_account_book** > list[FuturesAccountBook] list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) -Query account book +Query account book. ### Example @@ -575,14 +575,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +settle = 'usdt' # str | Settle currency. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional) +type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional) try: - # Query account book + # Query account book. api_response = api_instance.list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -595,11 +595,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **settle** | **str**| Settle currency. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] + **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] ### Return type @@ -617,14 +617,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_positions** > list[Position] list_delivery_positions(settle) -List all positions of a user +List all positions of a user. ### Example @@ -650,10 +650,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency +settle = 'usdt' # str | Settle currency. try: - # List all positions of a user + # List all positions of a user. api_response = api_instance.list_delivery_positions(settle) print(api_response) except GateApiException as ex: @@ -666,7 +666,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | ### Return type @@ -684,14 +684,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_delivery_position** > Position get_delivery_position(settle, contract) -Get single position +Get single position. ### Example @@ -717,11 +717,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. try: - # Get single position + # Get single position. api_response = api_instance.get_delivery_position(settle, contract) print(api_response) except GateApiException as ex: @@ -734,8 +734,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | ### Return type @@ -753,14 +753,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_delivery_position_margin** > Position update_delivery_position_margin(settle, contract, change) -Update position margin +Update position margin. ### Example @@ -786,12 +786,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -change = '0.01' # str | Margin change amount, positive number increases, negative number +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. +change = '0.01' # str | Margin change amount, positive number increases, negative number. try: - # Update position margin + # Update position margin. api_response = api_instance.update_delivery_position_margin(settle, contract, change) print(api_response) except GateApiException as ex: @@ -804,9 +804,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **change** | **str**| Margin change amount, positive number increases, negative number | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **change** | **str**| Margin change amount, positive number increases, negative number. | ### Return type @@ -824,14 +824,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_delivery_position_leverage** > Position update_delivery_position_leverage(settle, contract, leverage) -Update position leverage +Update position leverage. ### Example @@ -857,12 +857,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -leverage = '10' # str | New position leverage +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. +leverage = '10' # str | New position leverage. try: - # Update position leverage + # Update position leverage. api_response = api_instance.update_delivery_position_leverage(settle, contract, leverage) print(api_response) except GateApiException as ex: @@ -875,9 +875,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **leverage** | **str**| New position leverage | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **leverage** | **str**| New position leverage. | ### Return type @@ -895,14 +895,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_delivery_position_risk_limit** > Position update_delivery_position_risk_limit(settle, contract, risk_limit) -Update position risk limit +Update position risk limit. ### Example @@ -928,12 +928,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -risk_limit = '10' # str | New position risk limit +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. +risk_limit = '10' # str | New position risk limit. try: - # Update position risk limit + # Update position risk limit. api_response = api_instance.update_delivery_position_risk_limit(settle, contract, risk_limit) print(api_response) except GateApiException as ex: @@ -946,9 +946,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **risk_limit** | **str**| New position risk limit | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **risk_limit** | **str**| New position risk limit. | ### Return type @@ -966,16 +966,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_orders** > list[FuturesOrder] list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) -List futures orders +List futures orders. -Zero-filled order cannot be retrieved 10 minutes after order cancellation +Zero-filled order cannot be retrieved 10 minutes after order cancellation. ### Example @@ -1001,16 +1001,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -status = 'open' # str | Only list the orders with this status -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +status = 'open' # str | Only list the orders with this status. +contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) -count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) +count_total = 0 # int | Whether to return total number matched. Default to 0(no return). (optional) (default to 0) try: - # List futures orders + # List futures orders. api_response = api_instance.list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) print(api_response) except GateApiException as ex: @@ -1023,13 +1023,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **status** | **str**| Only list the orders with this status. | + **contract** | **str**| Futures contract. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] - **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] + **count_total** | **int**| Whether to return total number matched. Default to 0(no return). | [optional] [default to 0] ### Return type @@ -1047,16 +1047,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
| +**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_delivery_order** > FuturesOrder create_delivery_order(settle, futures_order) -Create a futures order +Create a futures order. -Zero-filled order cannot be retrieved 10 minutes after order cancellation +Zero-filled order cannot be retrieved 10 minutes after order cancellation. ### Example @@ -1082,11 +1082,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency +settle = 'usdt' # str | Settle currency. futures_order = gate_api.FuturesOrder() # FuturesOrder | try: - # Create a futures order + # Create a futures order. api_response = api_instance.create_delivery_order(settle, futures_order) print(api_response) except GateApiException as ex: @@ -1099,7 +1099,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | ### Return type @@ -1118,16 +1118,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order details | - | +**201** | Order details. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_delivery_orders** > list[FuturesOrder] cancel_delivery_orders(settle, contract, side=side) -Cancel all `open` orders matched +Cancel all `open` orders matched. -Zero-filled order cannot be retrieved 10 minutes after order cancellation +Zero-filled order cannot be retrieved 10 minutes after order cancellation. ### Example @@ -1153,12 +1153,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract -side = 'ask' # str | All bids or asks. Both included if not specified (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. +side = 'ask' # str | All bids or asks. Both included if not specified. (optional) try: - # Cancel all `open` orders matched + # Cancel all `open` orders matched. api_response = api_instance.cancel_delivery_orders(settle, contract, side=side) print(api_response) except GateApiException as ex: @@ -1171,9 +1171,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **side** | **str**| All bids or asks. Both included if not specified | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **side** | **str**| All bids or asks. Both included if not specified. | [optional] ### Return type @@ -1191,16 +1191,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All orders matched cancelled | - | +**200** | All orders matched 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) # **get_delivery_order** > FuturesOrder get_delivery_order(settle, order_id) -Get a single order +Get a single order. -Zero-filled order cannot be retrieved 10 minutes after order cancellation +Zero-filled order cannot be retrieved 10 minutes after order cancellation. ### Example @@ -1226,11 +1226,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = '12345' # str | Retrieve the data of the order with the specified ID +settle = 'usdt' # str | Settle currency. +order_id = '12345' # str | Retrieve the data of the order with the specified ID. try: - # Get a single order + # Get a single order. api_response = api_instance.get_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -1243,8 +1243,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -1262,14 +1262,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details | - | +**200** | Order details. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_delivery_order** > FuturesOrder cancel_delivery_order(settle, order_id) -Cancel a single order +Cancel a single order. ### Example @@ -1295,11 +1295,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = '12345' # str | Retrieve the data of the order with the specified ID +settle = 'usdt' # str | Settle currency. +order_id = '12345' # str | Retrieve the data of the order with the specified ID. try: - # Cancel a single order + # Cancel a single order. api_response = api_instance.cancel_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -1312,8 +1312,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -1331,14 +1331,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details | - | +**200** | Order details. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_my_delivery_trades** > list[MyFuturesTrade] get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) -List personal trading history +List personal trading history. ### Example @@ -1364,16 +1364,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -order = 12345 # int | Futures order ID, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) +order = 12345 # int | Futures order ID, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) -count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0) +count_total = 0 # int | Whether to return total number matched. Default to 0(no return). (optional) (default to 0) try: - # List personal trading history + # List personal trading history. api_response = api_instance.get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) print(api_response) except GateApiException as ex: @@ -1386,13 +1386,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **order** | **int**| Futures order ID, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | [optional] + **order** | **int**| Futures order ID, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] - **count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] + **count_total** | **int**| Whether to return total number matched. Default to 0(no return). | [optional] [default to 0] ### Return type @@ -1410,14 +1410,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1
| +**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_position_close** > list[PositionClose] list_delivery_position_close(settle, contract=contract, limit=limit) -List position close history +List position close history. ### Example @@ -1443,12 +1443,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # List position close history + # List position close history. api_response = api_instance.list_delivery_position_close(settle, contract=contract, limit=limit) print(api_response) except GateApiException as ex: @@ -1461,9 +1461,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -1481,14 +1481,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_liquidates** > list[FuturesLiquidate] list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) -List liquidation history +List liquidation history. ### Example @@ -1514,13 +1514,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify a liquidation timestamp (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +at = 0 # int | Specify a liquidation timestamp. (optional) (default to 0) try: - # List liquidation history + # List liquidation history. api_response = api_instance.list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) print(api_response) except GateApiException as ex: @@ -1533,10 +1533,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **at** | **int**| Specify a liquidation timestamp. | [optional] [default to 0] ### Return type @@ -1554,14 +1554,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_settlements** > list[DeliverySettlement] list_delivery_settlements(settle, contract=contract, limit=limit, at=at) -List settlement history +List settlement history. ### Example @@ -1587,13 +1587,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify a settlement timestamp (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +at = 0 # int | Specify a settlement timestamp. (optional) (default to 0) try: - # List settlement history + # List settlement history. api_response = api_instance.list_delivery_settlements(settle, contract=contract, limit=limit, at=at) print(api_response) except GateApiException as ex: @@ -1606,10 +1606,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify a settlement timestamp | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **at** | **int**| Specify a settlement timestamp. | [optional] [default to 0] ### Return type @@ -1627,16 +1627,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_risk_limit_tiers** > list[FuturesLimitRiskTiers] list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) -List risk limit tiers +List risk limit tiers. -When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. +When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. ### Example @@ -1653,13 +1653,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT_20200814' # str | Futures contract (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # List risk limit tiers + # List risk limit tiers. api_response = api_instance.list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1672,10 +1672,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -1693,14 +1693,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_price_triggered_delivery_orders** > list[FuturesPriceTriggeredOrder] list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) -List All Price-triggered Orders +List All Price-triggered Orders. ### Example @@ -1726,14 +1726,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -status = 'status_example' # str | Only list the orders with this status -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +status = 'status_example' # str | Only list the orders with this status. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # List All Price-triggered Orders + # List All Price-triggered Orders. api_response = api_instance.list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1746,11 +1746,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **status** | **str**| Only list the orders with this status. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -1768,14 +1768,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_price_triggered_delivery_order** > TriggerOrderResponse create_price_triggered_delivery_order(settle, futures_price_triggered_order) -Create a price-triggered order +Create a price-triggered order. ### Example @@ -1801,11 +1801,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency +settle = 'usdt' # str | Settle currency. futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | try: - # Create a price-triggered order + # Create a price-triggered order. api_response = api_instance.create_price_triggered_delivery_order(settle, futures_price_triggered_order) print(api_response) except GateApiException as ex: @@ -1818,7 +1818,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | ### Return type @@ -1837,14 +1837,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order created | - | +**201** | Order created. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_delivery_order_list** > list[FuturesPriceTriggeredOrder] cancel_price_triggered_delivery_order_list(settle, contract) -Cancel All Price-triggered Orders +Cancel All Price-triggered Orders. ### Example @@ -1870,11 +1870,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. try: - # Cancel All Price-triggered Orders + # Cancel All Price-triggered Orders. api_response = api_instance.cancel_price_triggered_delivery_order_list(settle, contract) print(api_response) except GateApiException as ex: @@ -1887,8 +1887,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | ### Return type @@ -1906,14 +1906,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders | - | +**200** | Batch cancellation request accepted. Query order status by listing orders. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_price_triggered_delivery_order** > FuturesPriceTriggeredOrder get_price_triggered_delivery_order(settle, order_id) -Get a price-triggered order +Get a price-triggered order. ### Example @@ -1939,11 +1939,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID +settle = 'usdt' # str | Settle currency. +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. try: - # Get a price-triggered order + # Get a price-triggered order. api_response = api_instance.get_price_triggered_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -1956,8 +1956,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -1975,14 +1975,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail | - | +**200** | Auto order detail. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_delivery_order** > FuturesPriceTriggeredOrder cancel_price_triggered_delivery_order(settle, order_id) -cancel a price-triggered order +cancel a price-triggered order. ### Example @@ -2008,11 +2008,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID +settle = 'usdt' # str | Settle currency. +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. try: - # cancel a price-triggered order + # cancel a price-triggered order. api_response = api_instance.cancel_price_triggered_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -2025,8 +2025,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -2044,7 +2044,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail | - | +**200** | Auto order detail. | - | [[Back to top]](#) [[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/DeliveryCandlestick.md b/docs/DeliveryCandlestick.md index 16cbd49..bc74e96 100644 --- a/docs/DeliveryCandlestick.md +++ b/docs/DeliveryCandlestick.md @@ -1,15 +1,15 @@ # DeliveryCandlestick -data point in every timestamp +data point in every timestamp. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] -**c** | **str** | Close price (quote currency) | [optional] -**h** | **str** | Highest price (quote currency) | [optional] -**l** | **str** | Lowest price (quote currency) | [optional] -**o** | **str** | Open price (quote currency) | [optional] +**t** | **float** | Unix timestamp in seconds. | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed. | [optional] +**c** | **str** | Close price (quote currency). | [optional] +**h** | **str** | Highest price (quote currency). | [optional] +**l** | **str** | Lowest price (quote currency). | [optional] +**o** | **str** | Open price (quote currency). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryContract.md b/docs/DeliveryContract.md index ca2f661..f7b45cf 100644 --- a/docs/DeliveryContract.md +++ b/docs/DeliveryContract.md @@ -1,47 +1,47 @@ # DeliveryContract -Futures contract details +Futures contract details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Futures contract | [optional] -**underlying** | **str** | Underlying | [optional] -**cycle** | **str** | Cycle type, e.g. WEEKLY, QUARTERLY | [optional] -**type** | **str** | Futures contract type | [optional] -**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] -**leverage_min** | **str** | Minimum leverage | [optional] -**leverage_max** | **str** | Maximum leverage | [optional] -**maintenance_rate** | **str** | Maintenance rate of margin | [optional] -**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional] -**mark_price** | **str** | Current mark price | [optional] -**index_price** | **str** | Current index price | [optional] -**last_price** | **str** | Last trading price | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] -**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] -**basis_rate** | **str** | Fair basis rate | [optional] -**basis_value** | **str** | Fair basis value | [optional] -**basis_impact_value** | **str** | Funding used for calculating impact bid, ask price | [optional] -**settle_price** | **str** | Settle price | [optional] -**settle_price_interval** | **int** | Settle price update interval | [optional] -**settle_price_duration** | **int** | Settle price update duration in seconds | [optional] -**expire_time** | **int** | Contract expiry timestamp | [optional] -**risk_limit_base** | **str** | Risk limit base | [optional] -**risk_limit_step** | **str** | Step of adjusting risk limit | [optional] -**risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed | [optional] +**name** | **str** | Futures contract. | [optional] +**underlying** | **str** | Underlying. | [optional] +**cycle** | **str** | Cycle type, e.g. WEEKLY, QUARTERLY. | [optional] +**type** | **str** | Futures contract type. | [optional] +**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency. | [optional] +**leverage_min** | **str** | Minimum leverage. | [optional] +**leverage_max** | **str** | Maximum leverage. | [optional] +**maintenance_rate** | **str** | Maintenance rate of margin. | [optional] +**mark_type** | **str** | Mark price type, internal - based on internal trading, external index price | [optional] +**mark_price** | **str** | Current mark price. | [optional] +**index_price** | **str** | Current index price. | [optional] +**last_price** | **str** | Last trading price. | [optional] +**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate. | [optional] +**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] +**basis_rate** | **str** | Fair basis rate. | [optional] +**basis_value** | **str** | Fair basis value. | [optional] +**basis_impact_value** | **str** | Funding used for calculating impact bid, ask price. | [optional] +**settle_price** | **str** | Settle price. | [optional] +**settle_price_interval** | **int** | Settle price update interval. | [optional] +**settle_price_duration** | **int** | Settle price update duration in seconds. | [optional] +**expire_time** | **int** | Contract expiry timestamp. | [optional] +**risk_limit_base** | **str** | Risk limit base. | [optional] +**risk_limit_step** | **str** | Step of adjusting risk limit. | [optional] +**risk_limit_max** | **str** | Maximum risk limit the contract allowed. | [optional] +**order_size_min** | **int** | Minimum order size the contract allowed. | [optional] +**order_size_max** | **int** | Maximum order size the contract allowed. | [optional] **order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate | [optional] -**orderbook_id** | **int** | Current orderbook ID | [optional] -**trade_id** | **int** | Current trade ID | [optional] -**trade_size** | **int** | Historical accumulated trade size | [optional] -**position_size** | **int** | Current total long position size | [optional] -**config_change_time** | **float** | Last changed time of configuration | [optional] -**in_delisting** | **bool** | Contract is delisting | [optional] -**orders_limit** | **int** | Maximum number of open orders | [optional] +**ref_discount_rate** | **str** | Referral fee rate discount. | [optional] +**ref_rebate_rate** | **str** | Referrer commission rate. | [optional] +**orderbook_id** | **int** | Current orderbook ID. | [optional] +**trade_id** | **int** | Current trade ID. | [optional] +**trade_size** | **int** | Historical accumulated trade size. | [optional] +**position_size** | **int** | Current total long position size. | [optional] +**config_change_time** | **float** | Last changed time of configuration. | [optional] +**in_delisting** | **bool** | Contract is delisting. | [optional] +**orders_limit** | **int** | Maximum number of open orders. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliverySettlement.md b/docs/DeliverySettlement.md index 06a479a..6fb01e0 100644 --- a/docs/DeliverySettlement.md +++ b/docs/DeliverySettlement.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**leverage** | **str** | Position leverage | [optional] [readonly] -**size** | **int** | Position size | [optional] [readonly] -**margin** | **str** | Position margin | [optional] [readonly] -**entry_price** | **str** | Average entry price | [optional] [readonly] -**settle_price** | **str** | Settled price | [optional] [readonly] -**profit** | **str** | Profit | [optional] [readonly] -**fee** | **str** | Fee deducted | [optional] [readonly] +**time** | **int** | Liquidation time. | [optional] [readonly] +**contract** | **str** | Futures contract. | [optional] [readonly] +**leverage** | **str** | Position leverage. | [optional] [readonly] +**size** | **int** | Position size. | [optional] [readonly] +**margin** | **str** | Position margin. | [optional] [readonly] +**entry_price** | **str** | Average entry price. | [optional] [readonly] +**settle_price** | **str** | Settled price. | [optional] [readonly] +**profit** | **str** | Profit. | [optional] [readonly] +**fee** | **str** | Fee deducted. | [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/DeliveryTicker.md b/docs/DeliveryTicker.md index c9772f4..5f09c1b 100644 --- a/docs/DeliveryTicker.md +++ b/docs/DeliveryTicker.md @@ -3,29 +3,29 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract | [optional] -**last** | **str** | Last trading price | [optional] +**contract** | **str** | Futures contract. | [optional] +**last** | **str** | Last trading price. | [optional] **change_percentage** | **str** | Change percentage. | [optional] -**total_size** | **str** | Contract total size | [optional] -**low_24h** | **str** | Lowest trading price in recent 24h | [optional] -**high_24h** | **str** | Highest trading price in recent 24h | [optional] -**volume_24h** | **str** | Trade size in recent 24h | [optional] +**total_size** | **str** | Contract total size. | [optional] +**low_24h** | **str** | Lowest trading price in recent 24h. | [optional] +**high_24h** | **str** | Highest trading price in recent 24h. | [optional] +**volume_24h** | **str** | Trade size in recent 24h. | [optional] **volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] **volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency | [optional] -**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency | [optional] -**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency | [optional] -**mark_price** | **str** | Recent mark price | [optional] -**funding_rate** | **str** | Funding rate | [optional] -**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] -**index_price** | **str** | Index price | [optional] +**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency. | [optional] +**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency. | [optional] +**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency. | [optional] +**mark_price** | **str** | Recent mark price. | [optional] +**funding_rate** | **str** | Funding rate. | [optional] +**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`). | [optional] +**index_price** | **str** | Index price. | [optional] **quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] -**basis_rate** | **str** | Basis rate | [optional] -**basis_value** | **str** | Basis value | [optional] -**lowest_ask** | **str** | Recent lowest ask | [optional] -**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] -**highest_bid** | **str** | Recent highest bid | [optional] -**highest_size** | **str** | The latest buyer's highest price order volume | [optional] +**basis_rate** | **str** | Basis rate. | [optional] +**basis_value** | **str** | Basis value. | [optional] +**lowest_ask** | **str** | Recent lowest ask. | [optional] +**lowest_size** | **str** | The latest seller's lowest price order quantity. | [optional] +**highest_bid** | **str** | Recent highest bid. | [optional] +**highest_size** | **str** | The latest buyer's highest price order volume. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DepositAddress.md b/docs/DepositAddress.md index b28d7ec..2d624ac 100644 --- a/docs/DepositAddress.md +++ b/docs/DepositAddress.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | -**address** | **str** | Deposit address | +**currency** | **str** | Currency detail. | +**address** | **str** | Deposit address. | **multichain_addresses** | [**list[MultiChainAddressItem]**](MultiChainAddressItem.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/DepositRecord.md b/docs/DepositRecord.md index 7271b03..020bc4c 100644 --- a/docs/DepositRecord.md +++ b/docs/DepositRecord.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Record ID | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] +**id** | **str** | Record ID. | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal. | [optional] [readonly] **withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**timestamp** | **str** | Operation time | [optional] [readonly] -**amount** | **str** | Currency amount | -**currency** | **str** | Currency name | -**address** | **str** | Withdrawal address. Required for withdrawals | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] +**timestamp** | **str** | Operation time. | [optional] [readonly] +**amount** | **str** | Currency amount. | +**currency** | **str** | Currency name. | +**address** | **str** | Withdrawal address. Required for withdrawals. | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal. | [optional] **status** | **str** | Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals | +**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 881c960..cb08085 100644 --- a/docs/DualGetOrders.md +++ b/docs/DualGetOrders.md @@ -3,23 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**plan_id** | **int** | Plan ID | [optional] -**copies** | **str** | Copies | [optional] -**invest_amount** | **str** | Investment Amount | [optional] -**settlement_amount** | **str** | Settlement Amount | [optional] -**create_time** | **int** | Creation time | [optional] -**complete_time** | **int** | Completion Time | [optional] +**id** | **int** | Order ID. | [optional] +**plan_id** | **int** | Plan ID. | [optional] +**copies** | **str** | Copies. | [optional] +**invest_amount** | **str** | Investment Amount. | [optional] +**settlement_amount** | **str** | Settlement Amount. | [optional] +**create_time** | **int** | Creation time. | [optional] +**complete_time** | **int** | Completion Time. | [optional] **status** | **str** | Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed | [optional] -**invest_currency** | **str** | Investment Currency | [optional] -**exercise_currency** | **str** | Strike Currency | [optional] -**exercise_price** | **str** | Strike price | [optional] -**settlement_price** | **str** | settlement price | [optional] -**settlement_currency** | **str** | Settle currency | [optional] -**apy_display** | **str** | APY | [optional] -**apy_settlement** | **str** | Settlement APY | [optional] -**delivery_time** | **int** | Settlement time | [optional] -**text** | **str** | Custom order information | [optional] +**invest_currency** | **str** | Investment Currency. | [optional] +**exercise_currency** | **str** | Strike Currency. | [optional] +**exercise_price** | **str** | Strike price. | [optional] +**settlement_price** | **str** | settlement price. | [optional] +**settlement_currency** | **str** | Settle currency. | [optional] +**apy_display** | **str** | APY. | [optional] +**apy_settlement** | **str** | Settlement APY. | [optional] +**delivery_time** | **int** | Settlement time. | [optional] +**text** | **str** | Custom order information. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DualGetPlans.md b/docs/DualGetPlans.md index 4bd3850..1f893b6 100644 --- a/docs/DualGetPlans.md +++ b/docs/DualGetPlans.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Plan ID | [optional] -**instrument_name** | **str** | Instrument Name | [optional] -**invest_currency** | **str** | Investment Currency | [optional] -**exercise_currency** | **str** | Strike Currency | [optional] -**exercise_price** | **float** | Strike price | [optional] -**delivery_time** | **int** | Settlement time | [optional] -**min_copies** | **int** | Minimum Copies | [optional] -**max_copies** | **int** | Maximum Copies | [optional] -**per_value** | **str** | Per Unit Value | [optional] -**apy_display** | **str** | APY | [optional] -**start_time** | **int** | start time | [optional] -**end_time** | **int** | Finished time | [optional] +**id** | **int** | Plan ID. | [optional] +**instrument_name** | **str** | Instrument Name. | [optional] +**invest_currency** | **str** | Investment Currency. | [optional] +**exercise_currency** | **str** | Strike Currency. | [optional] +**exercise_price** | **float** | Strike price. | [optional] +**delivery_time** | **int** | Settlement time. | [optional] +**min_copies** | **int** | Minimum Copies. | [optional] +**max_copies** | **int** | Maximum Copies. | [optional] +**per_value** | **str** | Per Unit Value. | [optional] +**apy_display** | **str** | APY. | [optional] +**start_time** | **int** | start time. | [optional] +**end_time** | **int** | Finished time. | [optional] **status** | **str** | Status: `NOTSTARTED`-not started `ONGOING`-ongoing `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/EarnApi.md b/docs/EarnApi.md index 425092c..ae6b0c1 100644 --- a/docs/EarnApi.md +++ b/docs/EarnApi.md @@ -4,22 +4,22 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap -[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query -[**list_dual_investment_plans**](EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list -[**list_dual_orders**](EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list -[**place_dual_order**](EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order -[**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List -[**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List -[**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order -[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins -[**swap_staking_coin**](EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins +[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap. +[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query. +[**list_dual_investment_plans**](EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list. +[**list_dual_orders**](EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list. +[**place_dual_order**](EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order. +[**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List. +[**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List. +[**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order. +[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins. +[**swap_staking_coin**](EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins. # **swap_eth2** > swap_eth2(eth2_swap) -ETH2 swap +ETH2 swap. ### Example @@ -48,7 +48,7 @@ api_instance = gate_api.EarnApi(api_client) eth2_swap = gate_api.Eth2Swap() # Eth2Swap | try: - # ETH2 swap + # ETH2 swap. api_instance.swap_eth2(eth2_swap) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -78,16 +78,16 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | swap success | - | +**200** | swap 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) # **rate_list_eth2** > list[Eth2RateList] rate_list_eth2() -ETH2 historical rate of return query +ETH2 historical rate of return query. -Check the ETH earnings rate record for the last 31 days +Check the ETH earnings rate record for the last 31 days. ### Example @@ -115,7 +115,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnApi(api_client) try: - # ETH2 historical rate of return query + # ETH2 historical rate of return query. api_response = api_instance.rate_list_eth2() print(api_response) except GateApiException as ex: @@ -143,14 +143,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_dual_investment_plans** > list[DualGetPlans] list_dual_investment_plans(plan_id=plan_id) -Dual Investment product list +Dual Investment product list. ### Example @@ -167,10 +167,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -plan_id = 1 # int | Financial project id (optional) +plan_id = 1 # int | Financial project id. (optional) try: - # Dual Investment product list + # Dual Investment product list. api_response = api_instance.list_dual_investment_plans(plan_id=plan_id) print(api_response) except GateApiException as ex: @@ -183,7 +183,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **plan_id** | **int**| Financial project id | [optional] + **plan_id** | **int**| Financial project id. | [optional] ### Return type @@ -201,14 +201,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_dual_orders** > list[DualGetOrders] list_dual_orders(_from=_from, to=to, page=page, limit=limit) -Dual Investment order list +Dual Investment order list. ### Example @@ -234,13 +234,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -_from = 1740727000 # int | Start checkout time (optional) -to = 1740729000 # int | End settlement time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1740727000 # int | Start checkout time. (optional) +to = 1740729000 # int | End settlement time. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # Dual Investment order list + # Dual Investment order list. api_response = api_instance.list_dual_orders(_from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -253,10 +253,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start checkout time | [optional] - **to** | **int**| End settlement time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start checkout time. | [optional] + **to** | **int**| End settlement time. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -274,14 +274,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **place_dual_order** > place_dual_order(place_dual_investment_order) -Place Dual Investment order +Place Dual Investment order. ### Example @@ -310,7 +310,7 @@ api_instance = gate_api.EarnApi(api_client) place_dual_investment_order = gate_api.PlaceDualInvestmentOrder() # PlaceDualInvestmentOrder | try: - # Place Dual Investment order + # Place Dual Investment order. api_instance.place_dual_order(place_dual_investment_order) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -340,14 +340,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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_structured_products** > list[StructuredGetProjectList] list_structured_products(status, type=type, page=page, limit=limit) -Structured Product List +Structured Product List. ### Example @@ -366,11 +366,11 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnApi(api_client) status = 'in_process' # str | Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed type = 'BullishSharkFin' # str | Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # Structured Product List + # Structured Product List. api_response = api_instance.list_structured_products(status, type=type, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -385,8 +385,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **status** | **str**| Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed | **type** | **str**| Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -404,14 +404,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_structured_orders** > list[StructuredOrderList] list_structured_orders(_from=_from, to=to, page=page, limit=limit) -Structured Product Order List +Structured Product Order List. ### Example @@ -439,11 +439,11 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnApi(api_client) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # Structured Product Order List + # Structured Product Order List. api_response = api_instance.list_structured_orders(_from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -458,8 +458,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -477,14 +477,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **place_structured_order** > place_structured_order(structured_buy) -Place Structured Product Order +Place Structured Product Order. ### Example @@ -513,7 +513,7 @@ api_instance = gate_api.EarnApi(api_client) structured_buy = gate_api.StructuredBuy() # StructuredBuy | try: - # Place Structured Product Order + # Place Structured Product Order. api_instance.place_structured_order(structured_buy) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -543,14 +543,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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) # **find_coin** > list[str] find_coin(find_coin) -Staking Coins +Staking Coins. ### Example @@ -579,7 +579,7 @@ api_instance = gate_api.EarnApi(api_client) find_coin = gate_api.FindCoin() # FindCoin | try: - # Staking Coins + # Staking Coins. api_response = api_instance.find_coin(find_coin) print(api_response) except GateApiException as ex: @@ -610,14 +610,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | 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) # **swap_staking_coin** > SwapCoinStruct swap_staking_coin(swap_coin) -On-chain Token Swap for Earned Coins +On-chain Token Swap for Earned Coins. ### Example @@ -646,7 +646,7 @@ api_instance = gate_api.EarnApi(api_client) swap_coin = gate_api.SwapCoin() # SwapCoin | try: - # On-chain Token Swap for Earned Coins + # On-chain Token Swap for Earned Coins. api_response = api_instance.swap_staking_coin(swap_coin) print(api_response) except GateApiException as ex: @@ -677,7 +677,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | swap success | - | +**200** | swap success. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index 936c72f..5dfa439 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending -[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending -[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders -[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem -[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order -[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending -[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency -[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records -[**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status -[**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart -[**list_uni_rate**](EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate +[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending. +[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending. +[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders. +[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem. +[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order. +[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending. +[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency. +[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records. +[**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status. +[**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart. +[**list_uni_rate**](EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate. # **list_uni_currencies** > list[UniCurrency] list_uni_currencies() -List currencies for lending +List currencies for lending. ### Example @@ -39,7 +39,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnUniApi(api_client) try: - # List currencies for lending + # List currencies for lending. api_response = api_instance.list_uni_currencies() print(api_response) except GateApiException as ex: @@ -67,14 +67,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_currency** > UniCurrency get_uni_currency(currency) -Get currency detail for lending +Get currency detail for lending. ### Example @@ -91,10 +91,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency +currency = 'btc' # str | Currency. try: - # Get currency detail for lending + # Get currency detail for lending. api_response = api_instance.get_uni_currency(currency) print(api_response) except GateApiException as ex: @@ -107,7 +107,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | + **currency** | **str**| Currency. | ### Return type @@ -125,14 +125,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_user_uni_lends** > list[UniLend] list_user_uni_lends(currency=currency, page=page, limit=limit) -List user's lending orders +List user's lending orders. ### Example @@ -158,12 +158,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) try: - # List user's lending orders + # List user's lending orders. api_response = api_instance.list_user_uni_lends(currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -176,9 +176,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] ### Return type @@ -196,16 +196,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_uni_lend** > create_uni_lend(create_uni_lend) -Lend or redeem +Lend or redeem. -Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly determination, no interest will be earned for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. +Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. ### Example @@ -234,7 +234,7 @@ api_instance = gate_api.EarnUniApi(api_client) create_uni_lend = gate_api.CreateUniLend() # CreateUniLend | try: - # Lend or redeem + # Lend or redeem. api_instance.create_uni_lend(create_uni_lend) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -264,16 +264,16 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully | - | +**204** | Operated 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) # **change_uni_lend** > change_uni_lend(patch_uni_lend) -Amend lending order +Amend lending order. -Currently only supports amending the minimum interest rate (hour) +Currently only supports amending the minimum interest rate (hour). ### Example @@ -302,7 +302,7 @@ api_instance = gate_api.EarnUniApi(api_client) patch_uni_lend = gate_api.PatchUniLend() # PatchUniLend | try: - # Amend lending order + # Amend lending order. api_instance.change_uni_lend(patch_uni_lend) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -332,14 +332,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Updated | - | +**204** | Updated. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_lend_records** > list[UniLendRecord] list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) -List records of lending +List records of lending. ### Example @@ -365,15 +365,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -type = 'lend' # str | type: lend - lend, redeem - redeem (optional) +type = 'lend' # str | type: lend - lend, redeem - redeem. (optional) try: - # List records of lending + # List records of lending. api_response = api_instance.list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -386,12 +386,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **type** | **str**| type: lend - lend, redeem - redeem | [optional] + **type** | **str**| type: lend - lend, redeem - redeem. | [optional] ### Return type @@ -409,14 +409,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_interest** > UniLendInterest get_uni_interest(currency) -Get the user's total interest income of specified currency +Get the user's total interest income of specified currency. ### Example @@ -442,10 +442,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency +currency = 'btc' # str | Currency. try: - # Get the user's total interest income of specified currency + # Get the user's total interest income of specified currency. api_response = api_instance.get_uni_interest(currency) print(api_response) except GateApiException as ex: @@ -458,7 +458,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | + **currency** | **str**| Currency. | ### Return type @@ -476,14 +476,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_interest_records** > list[UniInterestRecord] list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) -List interest records +List interest records. ### Example @@ -509,14 +509,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List interest records + # List interest records. api_response = api_instance.list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -529,9 +529,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -551,14 +551,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_interest_status** > UniCurrencyInterest get_uni_interest_status(currency) -query currency interest compounding status +query currency interest compounding status. ### Example @@ -584,10 +584,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency +currency = 'btc' # str | Currency. try: - # query currency interest compounding status + # query currency interest compounding status. api_response = api_instance.get_uni_interest_status(currency) print(api_response) except GateApiException as ex: @@ -600,7 +600,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | + **currency** | **str**| Currency. | ### Return type @@ -618,16 +618,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_chart** > list[InlineResponse200] list_uni_chart(_from, to, asset) -UniLoan currency annualized trend chart +UniLoan currency annualized trend chart. -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -653,12 +653,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -_from = 1719763200 # int | Start timestamp, unit s, maximum span of 30 days -to = 1722441600 # int | End timestamp, unit s, maximum span of 30 days -asset = 'BTC' # str | Currency name +_from = 1719763200 # int | Start timestamp, unit s, maximum span of 30 days. +to = 1722441600 # int | End timestamp, unit s, maximum span of 30 days. +asset = 'BTC' # str | Currency name. try: - # UniLoan currency annualized trend chart + # UniLoan currency annualized trend chart. api_response = api_instance.list_uni_chart(_from, to, asset) print(api_response) except GateApiException as ex: @@ -671,9 +671,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start timestamp, unit s, maximum span of 30 days | - **to** | **int**| End timestamp, unit s, maximum span of 30 days | - **asset** | **str**| Currency name | + **_from** | **int**| Start timestamp, unit s, maximum span of 30 days. | + **to** | **int**| End timestamp, unit s, maximum span of 30 days. | + **asset** | **str**| Currency name. | ### Return type @@ -691,16 +691,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_rate** > list[InlineResponse2001] list_uni_rate() -Currency estimate annualized interest rate +Currency estimate annualized interest rate. -Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 +Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 ### Example @@ -728,7 +728,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnUniApi(api_client) try: - # Currency estimate annualized interest rate + # Currency estimate annualized interest rate. api_response = api_instance.list_uni_rate() print(api_response) except GateApiException as ex: @@ -756,7 +756,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 | - | +**200** | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/Eth2RateList.md b/docs/Eth2RateList.md index 707cf68..9cf6772 100644 --- a/docs/Eth2RateList.md +++ b/docs/Eth2RateList.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date_time** | **int** | Date and Time Stamp | [optional] -**date** | **str** | Date | [optional] -**rate** | **str** | percentage | [optional] +**date_time** | **int** | Date and Time Stamp. | [optional] +**date** | **str** | Date. | [optional] +**rate** | **str** | percentage. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Eth2Swap.md b/docs/Eth2Swap.md index a5ede25..a7eb910 100644 --- a/docs/Eth2Swap.md +++ b/docs/Eth2Swap.md @@ -1,11 +1,11 @@ # Eth2Swap -ETH2 Staking +ETH2 Staking. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**side** | **str** | 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) | -**amount** | **str** | amount | +**side** | **str** | 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH). | +**amount** | **str** | amount. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FindCoin.md b/docs/FindCoin.md index b3ce7d1..3aa2fdf 100644 --- a/docs/FindCoin.md +++ b/docs/FindCoin.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**coin** | **str** | Currency | [optional] -**cointype** | **str** | Coin Type swap-Voucher lock-Locked | [optional] +**coin** | **str** | Currency. | [optional] +**cointype** | **str** | Coin Type swap-Voucher lock-Locked. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapApi.md b/docs/FlashSwapApi.md index b31ff16..93ee6f6 100644 --- a/docs/FlashSwapApi.md +++ b/docs/FlashSwapApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_flash_swap_currency_pair**](FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap -[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders -[**create_flash_swap_order**](FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order -[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail -[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview +[**list_flash_swap_currency_pair**](FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap. +[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders. +[**create_flash_swap_order**](FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order. +[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail. +[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview. # **list_flash_swap_currency_pair** > list[FlashSwapCurrencyPair] list_flash_swap_currency_pair(currency=currency, page=page, limit=limit) -List All Supported Currency Pairs In Flash Swap +List All Supported Currency Pairs In Flash Swap. `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. @@ -33,12 +33,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FlashSwapApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 1000 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 1000 (optional) (default to 1000) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 1000 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 1000. (optional) (default to 1000) try: - # List All Supported Currency Pairs In Flash Swap + # List All Supported Currency Pairs In Flash Swap. api_response = api_instance.list_flash_swap_currency_pair(currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -51,9 +51,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 1000 | [optional] [default to 1000] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 1000. | [optional] [default to 1000] ### Return type @@ -71,14 +71,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_flash_swap_orders** > list[FlashSwapOrder] list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) -List all flash swap orders +List all flash swap orders. ### Example @@ -107,12 +107,12 @@ api_instance = gate_api.FlashSwapApi(api_client) status = 1 # int | Flash swap order status `1` - success `2` - failure (optional) sell_currency = 'BTC' # str | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) buy_currency = 'BTC' # str | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) -reverse = true # bool | If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -page = 1 # int | Page number (optional) (default to 1) +reverse = true # bool | If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +page = 1 # int | Page number. (optional) (default to 1) try: - # List all flash swap orders + # List all flash swap orders. api_response = api_instance.list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) print(api_response) except GateApiException as ex: @@ -128,9 +128,9 @@ Name | Type | Description | Notes **status** | **int**| Flash swap order status `1` - success `2` - failure | [optional] **sell_currency** | **str**| Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] **buy_currency** | **str**| Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] - **reverse** | **bool**| If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **page** | **int**| Page number | [optional] [default to 1] + **reverse** | **bool**| If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **page** | **int**| Page number. | [optional] [default to 1] ### Return type @@ -148,14 +148,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_flash_swap_order** > FlashSwapOrder create_flash_swap_order(flash_swap_order_request) -Create a flash swap order +Create a flash swap order. Initiate a flash swap preview in advance because order creation requires a preview result @@ -186,7 +186,7 @@ api_instance = gate_api.FlashSwapApi(api_client) flash_swap_order_request = gate_api.FlashSwapOrderRequest() # FlashSwapOrderRequest | try: - # Create a flash swap order + # Create a flash swap order. api_response = api_instance.create_flash_swap_order(flash_swap_order_request) print(api_response) except GateApiException as ex: @@ -217,14 +217,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | The flash swap order is created successfully | - | +**201** | The flash swap order is created successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_flash_swap_order** > FlashSwapOrder get_flash_swap_order(order_id) -Get a single flash swap order's detail +Get a single flash swap order's detail. ### Example @@ -250,10 +250,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FlashSwapApi(api_client) -order_id = 1 # int | Flash swap order ID +order_id = 1 # int | Flash swap order ID. try: - # Get a single flash swap order's detail + # Get a single flash swap order's detail. api_response = api_instance.get_flash_swap_order(order_id) print(api_response) except GateApiException as ex: @@ -266,7 +266,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Flash swap order ID | + **order_id** | **int**| Flash swap order ID. | ### Return type @@ -284,14 +284,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **preview_flash_swap_order** > FlashSwapOrderPreview preview_flash_swap_order(flash_swap_preview_request) -Initiate a flash swap order preview +Initiate a flash swap order preview. ### Example @@ -320,7 +320,7 @@ api_instance = gate_api.FlashSwapApi(api_client) flash_swap_preview_request = gate_api.FlashSwapPreviewRequest() # FlashSwapPreviewRequest | try: - # Initiate a flash swap order preview + # Initiate a flash swap order preview. api_response = api_instance.preview_flash_swap_order(flash_swap_preview_request) print(api_response) except GateApiException as ex: @@ -351,7 +351,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The flash swap order successfully previewed | - | +**200** | The flash swap order successfully previewed. | - | [[Back to top]](#) [[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/FlashSwapCurrencyPair.md b/docs/FlashSwapCurrencyPair.md index 586c0a3..8b9ad7a 100644 --- a/docs/FlashSwapCurrencyPair.md +++ b/docs/FlashSwapCurrencyPair.md @@ -1,16 +1,16 @@ # FlashSwapCurrencyPair -List all supported currencies in flash swap +List all supported currencies in flash swap. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency_pair** | **str** | The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). | [optional] [readonly] -**sell_currency** | **str** | The currency to be sold | [optional] [readonly] -**buy_currency** | **str** | The currency to be bought | [optional] [readonly] -**sell_min_amount** | **str** | The minimum quantity required for selling | [optional] [readonly] -**sell_max_amount** | **str** | The maximum quantity allowed for selling | [optional] [readonly] -**buy_min_amount** | **str** | The minimum quantity required for buying | [optional] [readonly] -**buy_max_amount** | **str** | The maximum quantity allowed for buying | [optional] [readonly] +**sell_currency** | **str** | The currency to be sold. | [optional] [readonly] +**buy_currency** | **str** | The currency to be bought. | [optional] [readonly] +**sell_min_amount** | **str** | The minimum quantity required for selling. | [optional] [readonly] +**sell_max_amount** | **str** | The maximum quantity allowed for selling. | [optional] [readonly] +**buy_min_amount** | **str** | The minimum quantity required for buying. | [optional] [readonly] +**buy_max_amount** | **str** | The maximum quantity allowed for buying. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapOrder.md b/docs/FlashSwapOrder.md index bde41a4..1de23b8 100644 --- a/docs/FlashSwapOrder.md +++ b/docs/FlashSwapOrder.md @@ -1,17 +1,17 @@ # FlashSwapOrder -Flash swap order +Flash swap order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Flash swap order ID | [optional] [readonly] -**create_time** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**user_id** | **int** | User ID | [optional] [readonly] -**sell_currency** | **str** | Currency to sell | [optional] [readonly] -**sell_amount** | **str** | Amount to sell | [optional] [readonly] -**buy_currency** | **str** | Currency to buy | [optional] [readonly] -**buy_amount** | **str** | Amount to buy | [optional] [readonly] -**price** | **str** | Price | [optional] [readonly] +**id** | **int** | Flash swap order ID. | [optional] [readonly] +**create_time** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] +**user_id** | **int** | User ID. | [optional] [readonly] +**sell_currency** | **str** | Currency to sell. | [optional] [readonly] +**sell_amount** | **str** | Amount to sell. | [optional] [readonly] +**buy_currency** | **str** | Currency to buy. | [optional] [readonly] +**buy_amount** | **str** | Amount to buy. | [optional] [readonly] +**price** | **str** | Price. | [optional] [readonly] **status** | **int** | Flash swap order status `1` - success `2` - failure | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapOrderPreview.md b/docs/FlashSwapOrderPreview.md index 5b9d8ba..e501402 100644 --- a/docs/FlashSwapOrderPreview.md +++ b/docs/FlashSwapOrderPreview.md @@ -1,15 +1,15 @@ # FlashSwapOrderPreview -Initiate a flash swap order preview +Initiate a flash swap order preview. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**preview_id** | **str** | Preview result ID | [optional] +**preview_id** | **str** | Preview result ID. | [optional] **sell_currency** | **str** | Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional] -**sell_amount** | **str** | Amount to sell | [optional] +**sell_amount** | **str** | Amount to sell. | [optional] **buy_currency** | **str** | Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional] -**buy_amount** | **str** | Amount to buy | [optional] -**price** | **str** | Price | [optional] +**buy_amount** | **str** | Amount to buy. | [optional] +**price** | **str** | 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/FlashSwapOrderRequest.md b/docs/FlashSwapOrderRequest.md index aea0466..44ea215 100644 --- a/docs/FlashSwapOrderRequest.md +++ b/docs/FlashSwapOrderRequest.md @@ -1,14 +1,14 @@ # FlashSwapOrderRequest -Parameters of flash swap order creation +Parameters of flash swap order creation. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**preview_id** | **str** | Preview result ID | +**preview_id** | **str** | Preview result ID. | **sell_currency** | **str** | Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap | -**sell_amount** | **str** | Amount to sell (based on the preview result) | +**sell_amount** | **str** | Amount to sell (based on the preview result). | **buy_currency** | **str** | Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap | -**buy_amount** | **str** | Amount to buy (based on the preview result) | +**buy_amount** | **str** | Amount to buy (based on the preview result). | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapPreviewRequest.md b/docs/FlashSwapPreviewRequest.md index ea14e67..47d59e6 100644 --- a/docs/FlashSwapPreviewRequest.md +++ b/docs/FlashSwapPreviewRequest.md @@ -1,6 +1,6 @@ # FlashSwapPreviewRequest -Parameters of flash swap order creation +Parameters of flash swap order creation. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/FundingAccount.md b/docs/FundingAccount.md index f84f8fe..a1a4e84 100644 --- a/docs/FundingAccount.md +++ b/docs/FundingAccount.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**available** | **str** | Available assets to lend, which is identical to spot account `available` | [optional] -**locked** | **str** | Locked amount. i.e. amount in `open` loans | [optional] -**lent** | **str** | Outstanding loan amount yet to be repaid | [optional] -**total_lent** | **str** | Amount used for lending. total_lent = lent + locked | [optional] +**currency** | **str** | Currency name. | [optional] +**available** | **str** | Available assets to lend, which is identical to spot account `available`. | [optional] +**locked** | **str** | Locked amount. i.e. amount in `open` loans. | [optional] +**lent** | **str** | Outstanding loan amount yet to be repaid. | [optional] +**total_lent** | **str** | Amount used for lending. total_lent = lent + locked. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FundingRateRecord.md b/docs/FundingRateRecord.md index add60cd..19961eb 100644 --- a/docs/FundingRateRecord.md +++ b/docs/FundingRateRecord.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **int** | Unix timestamp in seconds | [optional] -**r** | **str** | Funding rate | [optional] +**t** | **int** | Unix timestamp in seconds. | [optional] +**r** | **str** | Funding 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/FutureCancelOrderResult.md b/docs/FutureCancelOrderResult.md index a27e9e6..b4b0be4 100644 --- a/docs/FutureCancelOrderResult.md +++ b/docs/FutureCancelOrderResult.md @@ -1,13 +1,13 @@ # FutureCancelOrderResult -Order cancellation result +Order cancellation result. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] -**user_id** | **int** | User ID | [optional] -**succeeded** | **bool** | Whether cancellation succeeded | [optional] -**message** | **str** | Error message when failed to cancel the order; empty if succeeded | [optional] +**id** | **str** | Order ID. | [optional] +**user_id** | **int** | User ID. | [optional] +**succeeded** | **bool** | Whether cancellation succeeded. | [optional] +**message** | **str** | Error message when failed to cancel the order; empty if succeeded. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md index 39de06f..c8851c7 100644 --- a/docs/FuturesAccount.md +++ b/docs/FuturesAccount.md @@ -4,30 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | **str** | total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) | [optional] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] -**position_margin** | **str** | Position margin | [optional] -**order_margin** | **str** | Order margin of unfinished orders | [optional] -**available** | **str** | The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) | [optional] -**point** | **str** | POINT amount | [optional] -**currency** | **str** | Settle currency | [optional] -**in_dual_mode** | **bool** | Whether dual mode is enabled | [optional] -**enable_credit** | **bool** | Whether portfolio margin account mode is enabled | [optional] -**position_initial_margin** | **str** | Initial margin position, applicable to the portfolio margin account model | [optional] +**unrealised_pnl** | **str** | Unrealized PNL. | [optional] +**position_margin** | **str** | Position margin. | [optional] +**order_margin** | **str** | Order margin of unfinished orders. | [optional] +**available** | **str** | The available balance for transferring or trading(including bonus. Bonus can't be withdrawn. The transfer amount needs to deduct the bonus) | [optional] +**point** | **str** | POINT amount. | [optional] +**currency** | **str** | Settle currency. | [optional] +**in_dual_mode** | **bool** | Whether dual mode is enabled. | [optional] +**enable_credit** | **bool** | Whether portfolio margin account mode is enabled. | [optional] +**position_initial_margin** | **str** | Initial margin position, applicable to the portfolio margin account model. | [optional] **maintenance_margin** | **str** | The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model | [optional] -**bonus** | **str** | Perpetual Contract Bonus | [optional] -**enable_evolved_classic** | **bool** | Classic account margin mode, true-new mode, false-old mode | [optional] +**bonus** | **str** | Perpetual Contract Bonus. | [optional] +**enable_evolved_classic** | **bool** | Classic account margin mode, true-new mode, false-old mode. | [optional] **cross_order_margin** | **str** | Full -warehouse hanging order deposit, suitable for the new classic account margin model | [optional] **cross_initial_margin** | **str** | The initial security deposit of the full warehouse is suitable for the new classic account margin model | [optional] **cross_maintenance_margin** | **str** | Maintain deposit in full warehouse, suitable for new classic account margin models | [optional] **cross_unrealised_pnl** | **str** | The full warehouse does not achieve profit and loss, suitable for the new classic account margin model | [optional] **cross_available** | **str** | Full warehouse available amount, suitable for the new classic account margin model | [optional] -**cross_margin_balance** | **str** | Full margin balance, suitable for the new classic account margin model | [optional] +**cross_margin_balance** | **str** | Full margin balance, suitable for the new classic account margin model. | [optional] **cross_mmr** | **str** | Maintain margin ratio for the full position, suitable for the new classic account margin model | [optional] **cross_imr** | **str** | The initial margin rate of the full position is suitable for the new classic account margin model | [optional] -**isolated_position_margin** | **str** | Ware -position margin, suitable for the new classic account margin model | [optional] -**enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode | [optional] +**isolated_position_margin** | **str** | Ware -position margin, suitable for the new classic account margin model. | [optional] +**enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode. | [optional] **margin_mode** | **int** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional] -**enable_tiered_mm** | **bool** | Whether to enable tiered maintenance margin calculation | [optional] +**enable_tiered_mm** | **bool** | Whether to enable tiered maintenance margin calculation. | [optional] **history** | [**FuturesAccountHistory**](FuturesAccountHistory.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccountBook.md b/docs/FuturesAccountBook.md index 8ff2aed..3ee9fc8 100644 --- a/docs/FuturesAccountBook.md +++ b/docs/FuturesAccountBook.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Change time | [optional] -**change** | **str** | Change amount | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] -**text** | **str** | Comment | [optional] +**time** | **float** | Change time. | [optional] +**change** | **str** | Change amount. | [optional] +**balance** | **str** | Balance after change. | [optional] +**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] +**text** | **str** | Comment. | [optional] **contract** | **str** | Futures contract, the field is only available for data after 2023-10-30. | [optional] -**trade_id** | **str** | trade id | [optional] -**id** | **str** | Account change record ID | [optional] +**trade_id** | **str** | trade id. | [optional] +**id** | **str** | Account change record ID. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccountHistory.md b/docs/FuturesAccountHistory.md index 202fdc6..04e343f 100644 --- a/docs/FuturesAccountHistory.md +++ b/docs/FuturesAccountHistory.md @@ -1,19 +1,19 @@ # FuturesAccountHistory -Statistical data +Statistical data. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dnw** | **str** | total amount of deposit and withdraw | [optional] -**pnl** | **str** | total amount of trading profit and loss | [optional] -**fee** | **str** | total amount of fee | [optional] -**refr** | **str** | total amount of referrer rebates | [optional] -**fund** | **str** | total amount of funding costs | [optional] -**point_dnw** | **str** | total amount of point deposit and withdraw | [optional] -**point_fee** | **str** | total amount of point fee | [optional] -**point_refr** | **str** | total amount of referrer rebates of point fee | [optional] -**bonus_dnw** | **str** | total amount of perpetual contract bonus transfer | [optional] -**bonus_offset** | **str** | total amount of perpetual contract bonus deduction | [optional] +**dnw** | **str** | total amount of deposit and withdraw. | [optional] +**pnl** | **str** | total amount of trading profit and loss. | [optional] +**fee** | **str** | total amount of fee. | [optional] +**refr** | **str** | total amount of referrer rebates. | [optional] +**fund** | **str** | total amount of funding costs. | [optional] +**point_dnw** | **str** | total amount of point deposit and withdraw. | [optional] +**point_fee** | **str** | total amount of point fee. | [optional] +**point_refr** | **str** | total amount of referrer rebates of point fee. | [optional] +**bonus_dnw** | **str** | total amount of perpetual contract bonus transfer. | [optional] +**bonus_offset** | **str** | total amount of perpetual contract bonus deduction. | [optional] [[Back to Model list]](../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 f7e90ab..bf1b06d 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -4,61 +4,61 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts -[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract -[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book -[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history -[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks -[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line -[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers -[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history -[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history -[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats -[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents -[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history -[**list_futures_risk_limit_tiers**](FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers -[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account -[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book -[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user -[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position -[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin -[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage -[**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode -[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit -[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode -[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode -[**update_dual_mode_position_margin**](FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode -[**update_dual_mode_position_leverage**](FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode -[**update_dual_mode_position_risk_limit**](FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode -[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders -[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order -[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched -[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range -[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders -[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order -[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order -[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order -[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history -[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range -[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history -[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history -[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History -[**countdown_cancel_all_futures**](FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders -[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates -[**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list -[**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs -[**get_futures_risk_limit_table**](FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id -[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders -[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order -[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders -[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order -[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order +[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts. +[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract. +[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book. +[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history. +[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks. +[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line. +[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers. +[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history. +[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history. +[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats. +[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents. +[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history. +[**list_futures_risk_limit_tiers**](FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers. +[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account. +[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book. +[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user. +[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position. +[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin. +[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage. +[**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode. +[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit. +[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode. +[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode. +[**update_dual_mode_position_margin**](FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode. +[**update_dual_mode_position_leverage**](FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode. +[**update_dual_mode_position_risk_limit**](FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode. +[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders. +[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order. +[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched. +[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range. +[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders. +[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order. +[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order. +[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order. +[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history. +[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range. +[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history. +[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history. +[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History. +[**countdown_cancel_all_futures**](FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders. +[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates. +[**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list. +[**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs. +[**get_futures_risk_limit_table**](FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id. +[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders. +[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order. +[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders. +[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order. +[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order. # **list_futures_contracts** > list[Contract] list_futures_contracts(settle, limit=limit, offset=offset) -List all futures contracts +List all futures contracts. ### Example @@ -75,12 +75,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # List all futures contracts + # List all futures contracts. api_response = api_instance.list_futures_contracts(settle, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -93,9 +93,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -113,14 +113,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_contract** > Contract get_futures_contract(settle, contract) -Get a single contract +Get a single contract. ### Example @@ -137,11 +137,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. try: - # Get a single contract + # Get a single contract. api_response = api_instance.get_futures_contract(settle, contract) print(api_response) except GateApiException as ex: @@ -154,8 +154,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | ### Return type @@ -173,16 +173,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Contract information | - | +**200** | Contract information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_order_book** > FuturesOrderBook list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) -Futures order book +Futures order book. -Bids will be sorted by price from high to low, while asks sorted reversely +Bids will be sorted by price from high to low, while asks sorted reversely. ### Example @@ -199,14 +199,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) try: - # Futures order book + # Futures order book. api_response = api_instance.list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -219,10 +219,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] ### Return type @@ -241,14 +241,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Depth query successful | - | +**200** | Depth query successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_trades** > list[FuturesTrade] list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) -Futures trading history +Futures trading history. ### Example @@ -265,16 +265,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional) _from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) -to = 1546935600 # int | Specify end time in Unix seconds, default to current time (optional) +to = 1546935600 # int | Specify end time in Unix seconds, default to current time. (optional) try: - # Futures trading history + # Futures trading history. api_response = api_instance.list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -287,13 +287,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional] **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] - **to** | **int**| Specify end time in Unix seconds, default to current time | [optional] + **to** | **int**| Specify end time in Unix seconds, default to current time. | [optional] ### Return type @@ -311,14 +311,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_candlesticks** > list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) -Get futures candlesticks +Get futures candlesticks. Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` @@ -337,15 +337,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days (optional) (default to '5m') +interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days (optional) (default to '5m') try: - # Get futures candlesticks + # Get futures candlesticks. api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) print(api_response) except GateApiException as ex: @@ -358,12 +358,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days | [optional] [default to '5m'] + **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days | [optional] [default to '5m'] ### Return type @@ -381,14 +381,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_premium_index** > list[FuturesPremiumIndex] list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) -Premium Index K-Line +Premium Index K-Line. Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval @@ -407,15 +407,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points (optional) (default to '5m') +interval = '5m' # str | Interval time between data points. (optional) (default to '5m') try: - # Premium Index K-Line + # Premium Index K-Line. api_response = api_instance.list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) print(api_response) except GateApiException as ex: @@ -428,12 +428,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points | [optional] [default to '5m'] + **interval** | **str**| Interval time between data points. | [optional] [default to '5m'] ### Return type @@ -451,14 +451,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_tickers** > list[FuturesTicker] list_futures_tickers(settle, contract=contract) -List futures tickers +List futures tickers. ### Example @@ -475,11 +475,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) try: - # List futures tickers + # List futures tickers. api_response = api_instance.list_futures_tickers(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -492,8 +492,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] ### Return type @@ -511,14 +511,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_funding_rate_history** > list[FundingRateRecord] list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) -Funding rate history +Funding rate history. ### Example @@ -535,14 +535,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # Funding rate history + # Funding rate history. api_response = api_instance.list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -555,9 +555,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -577,14 +577,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | History retrieved | - | +**200** | History retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_insurance_ledger** > list[InsuranceRecord] list_futures_insurance_ledger(settle, limit=limit) -Futures insurance balance history +Futures insurance balance history. ### Example @@ -601,11 +601,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +settle = 'usdt' # str | Settle currency. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # Futures insurance balance history + # Futures insurance balance history. api_response = api_instance.list_futures_insurance_ledger(settle, limit=limit) print(api_response) except GateApiException as ex: @@ -618,8 +618,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **settle** | **str**| Settle currency. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -637,14 +637,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_contract_stats** > list[ContractStat] list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit) -Futures stats +Futures stats. ### Example @@ -661,14 +661,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -_from = 1604561000 # int | Start timestamp (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +_from = 1604561000 # int | Start timestamp. (optional) interval = '5m' # str | (optional) (default to '5m') limit = 30 # int | (optional) (default to 30) try: - # Futures stats + # Futures stats. api_response = api_instance.list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit) print(api_response) except GateApiException as ex: @@ -681,9 +681,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **_from** | **int**| Start timestamp | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **_from** | **int**| Start timestamp. | [optional] **interval** | **str**| | [optional] [default to '5m'] **limit** | **int**| | [optional] [default to 30] @@ -703,14 +703,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_index_constituents** > FuturesIndexConstituents get_index_constituents(settle, index) -Get index constituents +Get index constituents. ### Example @@ -727,11 +727,11 @@ configuration = gate_api.Configuration( 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 -index = 'BTC_USDT' # str | Index name +settle = 'usdt' # str | Settle currency. +index = 'BTC_USDT' # str | Index name. try: - # Get index constituents + # Get index constituents. api_response = api_instance.get_index_constituents(settle, index) print(api_response) except GateApiException as ex: @@ -744,8 +744,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **index** | **str**| Index name | + **settle** | **str**| Settle currency. | + **index** | **str**| Index name. | ### Return type @@ -763,16 +763,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_liquidated_orders** > list[FuturesLiqOrder] list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit) -Retrieve liquidation history +Retrieve liquidation history. -The maximum time interval between `from` and `to` is **3600 seconds**. Certain private fields will **not be returned** in public endpoints; refer to individual field descriptions for details. +The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details ### Example @@ -789,14 +789,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # Retrieve liquidation history + # Retrieve liquidation history. api_response = api_instance.list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit) print(api_response) except GateApiException as ex: @@ -809,11 +809,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -831,16 +831,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_risk_limit_tiers** > list[FuturesLimitRiskTiers] list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) -List risk limit tiers +List risk limit tiers. -When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. +When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. ### Example @@ -857,13 +857,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # List risk limit tiers + # List risk limit tiers. api_response = api_instance.list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -876,10 +876,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -897,14 +897,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_accounts** > FuturesAccount list_futures_accounts(settle) -Query futures account +Query futures account. ### Example @@ -930,10 +930,10 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. try: - # Query futures account + # Query futures account. api_response = api_instance.list_futures_accounts(settle) print(api_response) except GateApiException as ex: @@ -946,7 +946,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | ### Return type @@ -964,16 +964,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_account_book** > list[FuturesAccountBook] list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) -Query account book +Query account book. -If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered。 2023-10-30 can be filtered。 +If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered. ### Example @@ -999,16 +999,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction (optional) +type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction (optional) try: - # Query account book + # Query account book. api_response = api_instance.list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -1021,13 +1021,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] + **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] ### Return type @@ -1045,14 +1045,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_positions** > list[Position] list_positions(settle, holding=holding, limit=limit, offset=offset) -List all positions of a user +List all positions of a user. ### Example @@ -1078,13 +1078,13 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. holding = true # bool | Return only real positions - true, return all - false. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # List all positions of a user + # List all positions of a user. api_response = api_instance.list_positions(settle, holding=holding, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1097,10 +1097,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **holding** | **bool**| Return only real positions - true, return all - false. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -1118,14 +1118,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_position** > Position get_position(settle, contract) -Get single position +Get single position. ### Example @@ -1151,11 +1151,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. try: - # Get single position + # Get single position. api_response = api_instance.get_position(settle, contract) print(api_response) except GateApiException as ex: @@ -1168,8 +1168,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | ### Return type @@ -1187,14 +1187,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_margin** > Position update_position_margin(settle, contract, change) -Update position margin +Update position margin. ### Example @@ -1220,12 +1220,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -change = '0.01' # str | Margin change amount, positive number increases, negative number +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +change = '0.01' # str | Margin change amount, positive number increases, negative number. try: - # Update position margin + # Update position margin. api_response = api_instance.update_position_margin(settle, contract, change) print(api_response) except GateApiException as ex: @@ -1238,9 +1238,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **change** | **str**| Margin change amount, positive number increases, negative number | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **change** | **str**| Margin change amount, positive number increases, negative number. | ### Return type @@ -1258,14 +1258,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_leverage** > Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) -Update position leverage +Update position leverage. ### Example @@ -1291,13 +1291,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -leverage = '10' # str | New position leverage -cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +leverage = '10' # str | New position leverage. +cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0). (optional) try: - # Update position leverage + # Update position leverage. api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) print(api_response) except GateApiException as ex: @@ -1310,10 +1310,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **leverage** | **str**| New position leverage | - **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **leverage** | **str**| New position leverage. | + **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0). | [optional] ### Return type @@ -1331,14 +1331,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_cross_mode** > Position update_position_cross_mode(settle, futures_position_cross_mode) -Switch to the full position-by-store mode +Switch to the full position-by-store mode. ### Example @@ -1364,11 +1364,11 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. futures_position_cross_mode = gate_api.FuturesPositionCrossMode() # FuturesPositionCrossMode | try: - # Switch to the full position-by-store mode + # Switch to the full position-by-store mode. api_response = api_instance.update_position_cross_mode(settle, futures_position_cross_mode) print(api_response) except GateApiException as ex: @@ -1381,7 +1381,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **futures_position_cross_mode** | [**FuturesPositionCrossMode**](FuturesPositionCrossMode.md)| | ### Return type @@ -1400,14 +1400,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_risk_limit** > Position update_position_risk_limit(settle, contract, risk_limit) -Update position risk limit +Update position risk limit. ### Example @@ -1433,12 +1433,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -risk_limit = '1000000' # str | New Risk Limit Value +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +risk_limit = '1000000' # str | New Risk Limit Value. try: - # Update position risk limit + # Update position risk limit. api_response = api_instance.update_position_risk_limit(settle, contract, risk_limit) print(api_response) except GateApiException as ex: @@ -1451,9 +1451,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **risk_limit** | **str**| New Risk Limit Value | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **risk_limit** | **str**| New Risk Limit Value. | ### Return type @@ -1471,16 +1471,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information | - | +**200** | Position information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_dual_mode** > FuturesAccount set_dual_mode(settle, dual_mode) -Enable or disable dual mode +Enable or disable dual mode. -The prerequisite for changing mode is that all positions have no holdings +The prerequisite for changing mode is that all positions have no holdings. ### Example @@ -1506,11 +1506,11 @@ configuration = gate_api.Configuration( 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 -dual_mode = true # bool | Whether to enable dual mode +settle = 'usdt' # str | Settle currency. +dual_mode = true # bool | Whether to enable dual mode. try: - # Enable or disable dual mode + # Enable or disable dual mode. api_response = api_instance.set_dual_mode(settle, dual_mode) print(api_response) except GateApiException as ex: @@ -1523,8 +1523,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **dual_mode** | **bool**| Whether to enable dual mode | + **settle** | **str**| Settle currency. | + **dual_mode** | **bool**| Whether to enable dual mode. | ### Return type @@ -1542,14 +1542,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Updated | - | +**200** | Updated. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_dual_mode_position** > list[Position] get_dual_mode_position(settle, contract) -Retrieve position detail in dual mode +Retrieve position detail in dual mode. ### Example @@ -1575,11 +1575,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. try: - # Retrieve position detail in dual mode + # Retrieve position detail in dual mode. api_response = api_instance.get_dual_mode_position(settle, contract) print(api_response) except GateApiException as ex: @@ -1592,8 +1592,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | ### Return type @@ -1611,14 +1611,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dual_mode_position_margin** > list[Position] update_dual_mode_position_margin(settle, contract, change, dual_side) -Update position margin in dual mode +Update position margin in dual mode. ### Example @@ -1644,13 +1644,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -change = '0.01' # str | Margin change amount, positive number increases, negative number -dual_side = 'dual_long' # str | Long or short position +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +change = '0.01' # str | Margin change amount, positive number increases, negative number. +dual_side = 'dual_long' # str | Long or short position. try: - # Update position margin in dual mode + # Update position margin in dual mode. api_response = api_instance.update_dual_mode_position_margin(settle, contract, change, dual_side) print(api_response) except GateApiException as ex: @@ -1663,10 +1663,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **change** | **str**| Margin change amount, positive number increases, negative number | - **dual_side** | **str**| Long or short position | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **change** | **str**| Margin change amount, positive number increases, negative number. | + **dual_side** | **str**| Long or short position. | ### Return type @@ -1684,14 +1684,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dual_mode_position_leverage** > list[Position] update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) -Update position leverage in dual mode +Update position leverage in dual mode. ### Example @@ -1717,13 +1717,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -leverage = '10' # str | New position leverage -cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0) (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +leverage = '10' # str | New position leverage. +cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0). (optional) try: - # Update position leverage in dual mode + # Update position leverage in dual mode. api_response = api_instance.update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) print(api_response) except GateApiException as ex: @@ -1736,10 +1736,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **leverage** | **str**| New position leverage | - **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0) | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **leverage** | **str**| New position leverage. | + **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0). | [optional] ### Return type @@ -1757,14 +1757,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dual_mode_position_risk_limit** > list[Position] update_dual_mode_position_risk_limit(settle, contract, risk_limit) -Update position risk limit in dual mode +Update position risk limit in dual mode. ### Example @@ -1790,12 +1790,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract -risk_limit = '1000000' # str | New Risk Limit Value +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. +risk_limit = '1000000' # str | New Risk Limit Value. try: - # Update position risk limit in dual mode + # Update position risk limit in dual mode. api_response = api_instance.update_dual_mode_position_risk_limit(settle, contract, risk_limit) print(api_response) except GateApiException as ex: @@ -1808,9 +1808,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | - **risk_limit** | **str**| New Risk Limit Value | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | + **risk_limit** | **str**| New Risk Limit Value. | ### Return type @@ -1828,14 +1828,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_orders** > list[FuturesOrder] list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) -List futures orders +List futures orders. - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. @@ -1863,15 +1863,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -status = 'open' # str | Only list the orders with this status -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +status = 'open' # str | Only list the orders with this status. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) try: - # List futures orders + # List futures orders. api_response = api_instance.list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) print(api_response) except GateApiException as ex: @@ -1884,11 +1884,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **status** | **str**| Only list the orders with this status. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] ### Return type @@ -1907,16 +1907,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| +**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_futures_order** > FuturesOrder create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) -Create a futures order +Create a futures order. -- When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` +- When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` ### Example @@ -1942,12 +1942,12 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. futures_order = gate_api.FuturesOrder() # FuturesOrder | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Create a futures order + # Create a futures order. api_response = api_instance.create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1960,7 +1960,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -1980,16 +1980,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order details | - | +**201** | Order details. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_futures_orders** > list[FuturesOrder] cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side) -Cancel all `open` orders matched +Cancel all `open` orders matched. -Zero-filled order cannot be retrieved 10 minutes after order cancellation +Zero-filled order cannot be retrieved 10 minutes after order cancellation. ### Example @@ -2015,13 +2015,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract. x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) -side = 'ask' # str | Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all (optional) +side = 'ask' # str | Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders (optional) try: - # Cancel all `open` orders matched + # Cancel all `open` orders matched. api_response = api_instance.cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side) print(api_response) except GateApiException as ex: @@ -2034,10 +2034,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract | + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract. | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - **side** | **str**| Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all | [optional] + **side** | **str**| Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders | [optional] ### Return type @@ -2055,14 +2055,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All orders matched cancelled | - | +**200** | All orders matched 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) # **get_orders_with_time_range** > list[FuturesOrder] get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) -List Futures Orders By Time Range +List Futures Orders By Time Range. ### Example @@ -2088,15 +2088,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # List Futures Orders By Time Range + # List Futures Orders By Time Range. api_response = api_instance.get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -2109,12 +2109,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -2132,14 +2132,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| +**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_batch_futures_order** > list[BatchFuturesOrder] create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) -Create a batch of futures orders +Create a batch of futures orders. - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually @@ -2167,12 +2167,12 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. futures_order = [gate_api.FuturesOrder()] # list[FuturesOrder] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Create a batch of futures orders + # Create a batch of futures orders. api_response = api_instance.create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2185,7 +2185,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **futures_order** | [**list[FuturesOrder]**](FuturesOrder.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -2205,14 +2205,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is completed | - | +**200** | Request is completed. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_order** > FuturesOrder get_futures_order(settle, order_id) -Get a single order +Get a single order. - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. @@ -2240,11 +2240,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. +settle = 'usdt' # str | Settle currency. +order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. try: - # Get a single order + # Get a single order. api_response = api_instance.get_futures_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -2257,8 +2257,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | ### Return type @@ -2276,14 +2276,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details | - | +**200** | Order details. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **amend_futures_order** > FuturesOrder amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) -Amend an order +Amend an order. ### Example @@ -2309,13 +2309,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. +settle = 'usdt' # str | Settle currency. +order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. futures_order_amendment = gate_api.FuturesOrderAmendment() # FuturesOrderAmendment | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Amend an order + # Amend an order. api_response = api_instance.amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2328,8 +2328,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | **futures_order_amendment** | [**FuturesOrderAmendment**](FuturesOrderAmendment.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -2349,14 +2349,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details | - | +**200** | Order details. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_futures_order** > FuturesOrder cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) -Cancel a single order +Cancel a single order. ### Example @@ -2382,12 +2382,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. +settle = 'usdt' # str | Settle currency. +order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a single order + # Cancel a single order. api_response = api_instance.cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2400,8 +2400,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] ### Return type @@ -2420,14 +2420,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details | - | +**200** | Order details. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_my_trades** > list[MyFuturesTrade] get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) -List personal trading history +List personal trading history. By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. @@ -2455,15 +2455,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -order = 12345 # int | Futures order ID, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +order = 12345 # int | Futures order ID, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. (optional) try: - # List personal trading history + # List personal trading history. api_response = api_instance.get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) print(api_response) except GateApiException as ex: @@ -2476,11 +2476,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **order** | **int**| Futures order ID, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **order** | **int**| Futures order ID, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. | [optional] ### Return type @@ -2499,14 +2499,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| +**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_my_trades_with_time_range** > list[MyFuturesTradeTimeRange] get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) -List personal trading history by time range +List personal trading history by time range. ### Example @@ -2532,16 +2532,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) role = 'maker' # str | Query role, maker or taker. (optional) try: - # List personal trading history by time range + # List personal trading history by time range. api_response = api_instance.get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) print(api_response) except GateApiException as ex: @@ -2554,12 +2554,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **role** | **str**| Query role, maker or taker. | [optional] ### Return type @@ -2578,14 +2578,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | * X-Pagination-Limit - Request limit specified
* X-Pagination-Offset - Request offset specified
| +**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_position_close** > list[PositionClose] list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) -List position close history +List position close history. ### Example @@ -2611,17 +2611,17 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -side = 'short' # str | Query side. long or shot (optional) -pnl = 'profit' # str | Query profit or loss (optional) +side = 'short' # str | Query side. long or shot. (optional) +pnl = 'profit' # str | Query profit or loss. (optional) try: - # List position close history + # List position close history. api_response = api_instance.list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) print(api_response) except GateApiException as ex: @@ -2634,14 +2634,14 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **side** | **str**| Query side. long or shot | [optional] - **pnl** | **str**| Query profit or loss | [optional] + **side** | **str**| Query side. long or shot. | [optional] + **pnl** | **str**| Query profit or loss. | [optional] ### Return type @@ -2659,14 +2659,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_liquidates** > list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, at=at) -List liquidation history +List liquidation history. ### Example @@ -2692,13 +2692,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify a liquidation timestamp (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +at = 0 # int | Specify a liquidation timestamp. (optional) (default to 0) try: - # List liquidation history + # List liquidation history. api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, at=at) print(api_response) except GateApiException as ex: @@ -2711,10 +2711,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify a liquidation timestamp | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **at** | **int**| Specify a liquidation timestamp. | [optional] [default to 0] ### Return type @@ -2732,14 +2732,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_auto_deleverages** > list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, at=at) -List Auto-Deleveraging History +List Auto-Deleveraging History. ### Example @@ -2765,13 +2765,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -at = 0 # int | Specify an auto-deleveraging timestamp (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +at = 0 # int | Specify an auto-deleveraging timestamp. (optional) (default to 0) try: - # List Auto-Deleveraging History + # List Auto-Deleveraging History. api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, at=at) print(api_response) except GateApiException as ex: @@ -2784,10 +2784,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **at** | **int**| Specify an auto-deleveraging timestamp | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **at** | **int**| Specify an auto-deleveraging timestamp. | [optional] [default to 0] ### Return type @@ -2805,16 +2805,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **countdown_cancel_all_futures** > TriggerTime countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) -Countdown cancel orders +Countdown cancel orders. -Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. +Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. ### Example @@ -2840,11 +2840,11 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. countdown_cancel_all_futures_task = gate_api.CountdownCancelAllFuturesTask() # CountdownCancelAllFuturesTask | try: - # Countdown cancel orders + # Countdown cancel orders. api_response = api_instance.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) print(api_response) except GateApiException as ex: @@ -2857,7 +2857,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **countdown_cancel_all_futures_task** | [**CountdownCancelAllFuturesTask**](CountdownCancelAllFuturesTask.md)| | ### Return type @@ -2876,14 +2876,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Set countdown successfully | - | +**200** | Set countdown successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_fee** > dict(str, FuturesFee) get_futures_fee(settle, contract=contract) -Query user trading fee rates +Query user trading fee rates. ### Example @@ -2909,11 +2909,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) try: - # Query user trading fee rates + # Query user trading fee rates. api_response = api_instance.get_futures_fee(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -2926,8 +2926,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] ### Return type @@ -2945,16 +2945,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_batch_future_orders** > list[FutureCancelOrderResult] cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) -Cancel a batch of orders with an ID list +Cancel a batch of orders with an ID list. -Multiple different order IDs can be specified. A maximum of 20 records +Multiple different order IDs can be specified. A maximum of 20 records. ### Example @@ -2980,12 +2980,12 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. request_body = ['request_body_example'] # list[str] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a batch of orders with an ID list + # Cancel a batch of orders with an ID list. api_response = api_instance.cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2998,7 +2998,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **request_body** | [**list[str]**](str.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -3018,16 +3018,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order cancellation operation completed | - | +**200** | Order cancellation operation completed. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **amend_batch_future_orders** > list[BatchFuturesOrder] amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) -Batch modify orders with specified IDs +Batch modify orders with specified IDs. -Multiple different order IDs can be specified. A maximum of 10 orders can +Multiple different order IDs can be specified. A maximum of 10 orders can. ### Example @@ -3053,12 +3053,12 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. batch_amend_order_req = [gate_api.BatchAmendOrderReq()] # list[BatchAmendOrderReq] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Batch modify orders with specified IDs + # Batch modify orders with specified IDs. api_response = api_instance.amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -3071,7 +3071,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **batch_amend_order_req** | [**list[BatchAmendOrderReq]**](BatchAmendOrderReq.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -3091,14 +3091,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is completed | - | +**200** | Request is completed. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_risk_limit_table** > list[FuturesRiskLimitTier] get_futures_risk_limit_table(settle, table_id) -Query risk limit table by table_id +Query risk limit table by table_id. Just pass table_id. @@ -3117,11 +3117,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -table_id = 'CYBER_USDT_20241122' # str | Risk limit table ID +settle = 'usdt' # str | Settle currency. +table_id = 'CYBER_USDT_20241122' # str | Risk limit table ID. try: - # Query risk limit table by table_id + # Query risk limit table by table_id. api_response = api_instance.get_futures_risk_limit_table(settle, table_id) print(api_response) except GateApiException as ex: @@ -3134,8 +3134,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **table_id** | **str**| Risk limit table ID | + **settle** | **str**| Settle currency. | + **table_id** | **str**| Risk limit table ID. | ### Return type @@ -3153,14 +3153,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_price_triggered_orders** > list[FuturesPriceTriggeredOrder] list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) -List All Price-triggered Orders +List All Price-triggered Orders. ### Example @@ -3186,14 +3186,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -status = 'status_example' # str | Only list the orders with this status -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +settle = 'usdt' # str | Settle currency. +status = 'status_example' # str | Only list the orders with this status. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # List All Price-triggered Orders + # List All Price-triggered Orders. api_response = api_instance.list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -3206,11 +3206,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Futures contract, return related data only if specified | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **settle** | **str**| Settle currency. | + **status** | **str**| Only list the orders with this status. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -3228,14 +3228,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_price_triggered_order** > TriggerOrderResponse create_price_triggered_order(settle, futures_price_triggered_order) -Create a price-triggered order +Create a price-triggered order. ### Example @@ -3261,11 +3261,11 @@ configuration = gate_api.Configuration( 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 +settle = 'usdt' # str | Settle currency. futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | try: - # Create a price-triggered order + # Create a price-triggered order. api_response = api_instance.create_price_triggered_order(settle, futures_price_triggered_order) print(api_response) except GateApiException as ex: @@ -3278,7 +3278,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | + **settle** | **str**| Settle currency. | **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | ### Return type @@ -3297,14 +3297,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order created | - | +**201** | Order created. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_order_list** > list[FuturesPriceTriggeredOrder] cancel_price_triggered_order_list(settle, contract=contract) -Cancel All Price-triggered Orders +Cancel All Price-triggered Orders. ### Example @@ -3330,11 +3330,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +settle = 'usdt' # str | Settle currency. +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) try: - # Cancel All Price-triggered Orders + # Cancel All Price-triggered Orders. api_response = api_instance.cancel_price_triggered_order_list(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -3347,8 +3347,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **contract** | **str**| Futures contract, return related data only if specified | [optional] + **settle** | **str**| Settle currency. | + **contract** | **str**| Futures contract, return related data only if specified. | [optional] ### Return type @@ -3366,14 +3366,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders | - | +**200** | Batch cancellation request accepted. Query order status by listing orders. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_price_triggered_order** > FuturesPriceTriggeredOrder get_price_triggered_order(settle, order_id) -Get a price-triggered order +Get a price-triggered order. ### Example @@ -3399,11 +3399,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID +settle = 'usdt' # str | Settle currency. +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. try: - # Get a price-triggered order + # Get a price-triggered order. api_response = api_instance.get_price_triggered_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -3416,8 +3416,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -3435,14 +3435,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail | - | +**200** | Auto order detail. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_order** > FuturesPriceTriggeredOrder cancel_price_triggered_order(settle, order_id) -cancel a price-triggered order +cancel a price-triggered order. ### Example @@ -3468,11 +3468,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID +settle = 'usdt' # str | Settle currency. +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. try: - # cancel a price-triggered order + # cancel a price-triggered order. api_response = api_instance.cancel_price_triggered_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -3485,8 +3485,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency | - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **settle** | **str**| Settle currency. | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -3504,7 +3504,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail | - | +**200** | Auto order detail. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/FuturesAutoDeleverage.md b/docs/FuturesAutoDeleverage.md index ae4759c..50b659f 100644 --- a/docs/FuturesAutoDeleverage.md +++ b/docs/FuturesAutoDeleverage.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Automatic deleveraging time | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**order_id** | **int** | Order ID. Order IDs before 2023-02-20 are null | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**leverage** | **str** | Position leverage | [optional] [readonly] -**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional] [readonly] -**entry_price** | **str** | Average entry price | [optional] [readonly] -**fill_price** | **str** | Average fill price | [optional] [readonly] -**trade_size** | **int** | Trading size | [optional] [readonly] -**position_size** | **int** | Positions after auto-deleveraging | [optional] [readonly] +**time** | **int** | Automatic deleveraging time. | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**order_id** | **int** | Order ID. Order IDs before 2023-02-20 are null. | [optional] [readonly] +**contract** | **str** | Futures contract. | [optional] [readonly] +**leverage** | **str** | Position leverage. | [optional] [readonly] +**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0). | [optional] [readonly] +**entry_price** | **str** | Average entry price. | [optional] [readonly] +**fill_price** | **str** | Average fill price. | [optional] [readonly] +**trade_size** | **int** | Trading size. | [optional] [readonly] +**position_size** | **int** | Positions after auto-deleveraging. | [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/FuturesBatchAmendOrderRequest.md b/docs/FuturesBatchAmendOrderRequest.md index 69bc53f..0507bb0 100644 --- a/docs/FuturesBatchAmendOrderRequest.md +++ b/docs/FuturesBatchAmendOrderRequest.md @@ -1,14 +1,14 @@ # FuturesBatchAmendOrderRequest -Modify contract order parameters +Modify contract order parameters. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] -**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] -**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] +**order_id** | **int** | Order id, order_id and text must contain at least one. | [optional] +**text** | **str** | User-defined order text, at least one of order_id and text must be passed. | [optional] +**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] **price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] +**amend_text** | **str** | Custom info during amending 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/FuturesCandlestick.md b/docs/FuturesCandlestick.md index 202685d..974b990 100644 --- a/docs/FuturesCandlestick.md +++ b/docs/FuturesCandlestick.md @@ -1,16 +1,16 @@ # FuturesCandlestick -data point in every timestamp +data point in every timestamp. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] -**c** | **str** | Close price (quote currency) | [optional] -**h** | **str** | Highest price (quote currency) | [optional] -**l** | **str** | Lowest price (quote currency) | [optional] -**o** | **str** | Open price (quote currency) | [optional] -**sum** | **str** | Trading volume (unit: Quote currency) | [optional] +**t** | **float** | Unix timestamp in seconds. | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed. | [optional] +**c** | **str** | Close price (quote currency). | [optional] +**h** | **str** | Highest price (quote currency). | [optional] +**l** | **str** | Lowest price (quote currency). | [optional] +**o** | **str** | Open price (quote currency). | [optional] +**sum** | **str** | Trading volume (unit: Quote currency). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesFee.md b/docs/FuturesFee.md index 383ec9e..aeb73a3 100644 --- a/docs/FuturesFee.md +++ b/docs/FuturesFee.md @@ -1,11 +1,11 @@ # FuturesFee -The returned result is a map type, where the key represents the market and the value represents the taker and maker fee rates. +The returned result is a map type, where the key represents the market and taker and maker fee rates. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taker_fee** | **str** | Taker fee | [optional] [readonly] -**maker_fee** | **str** | maker fee | [optional] [readonly] +**taker_fee** | **str** | Taker fee. | [optional] [readonly] +**maker_fee** | **str** | maker fee. | [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/FuturesIndexConstituents.md b/docs/FuturesIndexConstituents.md index 7564bbe..9bb2f84 100644 --- a/docs/FuturesIndexConstituents.md +++ b/docs/FuturesIndexConstituents.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**index** | **str** | Index name | [optional] [readonly] -**constituents** | [**list[IndexConstituent]**](IndexConstituent.md) | Constituents | [optional] [readonly] +**index** | **str** | Index name. | [optional] [readonly] +**constituents** | [**list[IndexConstituent]**](IndexConstituent.md) | Constituents. | [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/FuturesInitialOrder.md b/docs/FuturesInitialOrder.md index ff000b1..3bc08fc 100644 --- a/docs/FuturesInitialOrder.md +++ b/docs/FuturesInitialOrder.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract | +**contract** | **str** | Futures contract. | **size** | **int** | Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 | [optional] -**price** | **str** | Order price. Set to 0 to use market price | +**price** | **str** | Order price. Set to 0 to use market price. | **close** | **bool** | When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false | [optional] [default to False] -**tif** | **str** | Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc'] +**tif** | **str** | Time in force strategy, default is gtc, market order currently only supports ioc mode mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc'] **text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] **reduce_only** | **bool** | When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions | [optional] [default to False] **auto_size** | **str** | Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size | [optional] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_close** | **bool** | Is the order to close position | [optional] [readonly] +**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] +**is_close** | **bool** | Is the order to close position. | [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/FuturesLimitRiskTiers.md b/docs/FuturesLimitRiskTiers.md index 45fa793..caeec4f 100644 --- a/docs/FuturesLimitRiskTiers.md +++ b/docs/FuturesLimitRiskTiers.md @@ -4,13 +4,13 @@ Retrieve risk limit configurations for different tiers under a specified contrac ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **int** | Tier | [optional] -**risk_limit** | **str** | Position risk limit | [optional] -**initial_rate** | **str** | Initial margin rate | [optional] -**maintenance_rate** | **str** | Maintenance margin rate | [optional] -**leverage_max** | **str** | Maximum leverage | [optional] -**contract** | **str** | Markets, visible only during market pagination requests | [optional] -**deduction** | **str** | Maintenance margin quick calculation deduction | [optional] +**tier** | **int** | Tier. | [optional] +**risk_limit** | **str** | Position risk limit. | [optional] +**initial_rate** | **str** | Initial margin rate. | [optional] +**maintenance_rate** | **str** | Maintenance margin rate. | [optional] +**leverage_max** | **str** | Maximum leverage. | [optional] +**contract** | **str** | Markets, visible only during market pagination requests. | [optional] +**deduction** | **str** | Maintenance margin quick calculation deduction. | [optional] [[Back to Model list]](../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 daf3c5e..950f29b 100644 --- a/docs/FuturesLiqOrder.md +++ b/docs/FuturesLiqOrder.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**size** | **int** | User position size | [optional] [readonly] -**order_size** | **int** | Number of forced liquidation orders | [optional] [readonly] -**order_price** | **str** | Liquidation order price | [optional] [readonly] -**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] -**left** | **int** | System liquidation order maker size | [optional] [readonly] +**time** | **int** | Liquidation time. | [optional] [readonly] +**contract** | **str** | Futures contract. | [optional] [readonly] +**size** | **int** | User position size. | [optional] [readonly] +**order_size** | **int** | Number of forced liquidation orders. | [optional] [readonly] +**order_price** | **str** | Liquidation order price. | [optional] [readonly] +**fill_price** | **str** | Liquidation order average taker price. | [optional] [readonly] +**left** | **int** | System liquidation order maker size. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesLiquidate.md b/docs/FuturesLiquidate.md index c8575b9..d6a7f7d 100644 --- a/docs/FuturesLiquidate.md +++ b/docs/FuturesLiquidate.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] +**time** | **int** | Liquidation time. | [optional] [readonly] +**contract** | **str** | Futures contract. | [optional] [readonly] **leverage** | **str** | Position leverage. Not returned in public endpoints. | [optional] [readonly] -**size** | **int** | Position size | [optional] [readonly] +**size** | **int** | Position size. | [optional] [readonly] **margin** | **str** | Position margin. Not returned in public endpoints. | [optional] [readonly] **entry_price** | **str** | Average entry price. Not returned in public endpoints. | [optional] [readonly] **liq_price** | **str** | Liquidation price. Not returned in public endpoints. | [optional] [readonly] **mark_price** | **str** | Mark price. Not returned in public endpoints. | [optional] [readonly] **order_id** | **int** | Liquidation order ID. Not returned in public endpoints. | [optional] [readonly] -**order_price** | **str** | Liquidation order price | [optional] [readonly] -**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] -**left** | **int** | Liquidation order maker size | [optional] [readonly] +**order_price** | **str** | Liquidation order price. | [optional] [readonly] +**fill_price** | **str** | Liquidation order average taker price. | [optional] [readonly] +**left** | **int** | Liquidation order maker size. | [optional] [readonly] [[Back to Model list]](../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 f077b2b..c8c7294 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -1,36 +1,35 @@ # FuturesOrder -Futures order details +Futures order details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Futures order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time of order | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] -**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] +**id** | **int** | Futures order ID. | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**create_time** | **float** | Creation time of order. | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open. | [optional] [readonly] +**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] **status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Futures contract | +**contract** | **str** | Futures contract. | **size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | **iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] -**is_close** | **bool** | Is the order to close position | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] +**price** | **str** | Order price. 0 for market order with `tif` set as `ioc`. | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0. | [optional] [default to False] +**is_close** | **bool** | Is the order to close position. | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order. | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation. | [optional] [readonly] **tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded | [optional] [readonly] -**fill_price** | **str** | Fill price of the order | [optional] [readonly] -**text** | **str** | Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-xxx: a. Liquidation under the classic account’s new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-xxx: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance | [optional] -**tkfr** | **str** | Taker fee | [optional] [readonly] -**mkfr** | **str** | Maker fee | [optional] [readonly] -**refu** | **int** | Reference user ID | [optional] [readonly] +**left** | **int** | Size left to be traded. | [optional] [readonly] +**fill_price** | **str** | Fill price of the order. | [optional] [readonly] +**text** | **str** | Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-x: new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-x: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance | [optional] +**tkfr** | **str** | Taker fee. | [optional] [readonly] +**mkfr** | **str** | Maker fee. | [optional] [readonly] +**refu** | **int** | Reference user ID. | [optional] [readonly] **auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] -**biz_info** | **str** | Additional information | [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] +**amend_text** | **str** | The custom data that the user remarked when amending the order. | [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/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md index 72ff6ca..cb338e2 100644 --- a/docs/FuturesOrderAmendment.md +++ b/docs/FuturesOrderAmendment.md @@ -5,9 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **size** | **int** | New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. | [optional] **price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] -**biz_info** | **str** | Users can annotate this modification with information. | [optional] -**bbo** | **str** | Users are able to modify the offer price manually. | [optional] +**amend_text** | **str** | Custom info during amending 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/FuturesOrderBook.md b/docs/FuturesOrderBook.md index f8ed364..400b6d3 100644 --- a/docs/FuturesOrderBook.md +++ b/docs/FuturesOrderBook.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response | [optional] -**current** | **float** | Response data generation timestamp | [optional] -**update** | **float** | Order book changed timestamp | [optional] -**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Asks order depth | -**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bids order depth | +**current** | **float** | Response data generation timestamp. | [optional] +**update** | **float** | Order book changed timestamp. | [optional] +**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Asks order depth. | +**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bids order depth. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesOrderBookItem.md b/docs/FuturesOrderBookItem.md index 9f3356e..40ed9e4 100644 --- a/docs/FuturesOrderBookItem.md +++ b/docs/FuturesOrderBookItem.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**p** | **str** | Price (quote currency) | [optional] -**s** | **int** | Size | [optional] +**p** | **str** | Price (quote currency). | [optional] +**s** | **int** | Size. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesPositionCrossMode.md b/docs/FuturesPositionCrossMode.md index 8efbf19..4496195 100644 --- a/docs/FuturesPositionCrossMode.md +++ b/docs/FuturesPositionCrossMode.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **str** | Full position-by-position model, ISOLATED-by-position, CROSS-full position | -**contract** | **str** | Contract Market | +**mode** | **str** | Full position-by-position model, ISOLATED-by-position, CROSS-full position. | +**contract** | **str** | Contract Market. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesPremiumIndex.md b/docs/FuturesPremiumIndex.md index 73effc0..6adb80f 100644 --- a/docs/FuturesPremiumIndex.md +++ b/docs/FuturesPremiumIndex.md @@ -1,14 +1,14 @@ # FuturesPremiumIndex -data point in every timestamp +data point in every timestamp. ## Properties 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] -**o** | **str** | Open price | [optional] +**t** | **float** | Unix timestamp in seconds. | [optional] +**c** | **str** | Close price. | [optional] +**h** | **str** | Highest price. | [optional] +**l** | **str** | Lowest price`. | [optional] +**o** | **str** | Open price. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesPriceTrigger.md b/docs/FuturesPriceTrigger.md index c970e01..7fd21de 100644 --- a/docs/FuturesPriceTrigger.md +++ b/docs/FuturesPriceTrigger.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **strategy_type** | **int** | Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price | [optional] -**price_type** | **int** | Price type. 0 - latest deal price, 1 - mark price, 2 - index price | [optional] -**price** | **str** | Value of price on price triggered, or price gap on price gap triggered | [optional] -**rule** | **int** | Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price | [optional] +**price_type** | **int** | Price type. 0 - latest deal price, 1 - mark price, 2 - index price. | [optional] +**price** | **str** | Value of price on price triggered, or price gap on price gap triggered. | [optional] +**rule** | **int** | Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price | [optional] **expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the 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/FuturesPriceTriggeredOrder.md b/docs/FuturesPriceTriggeredOrder.md index e0e2727..e210f9d 100644 --- a/docs/FuturesPriceTriggeredOrder.md +++ b/docs/FuturesPriceTriggeredOrder.md @@ -1,20 +1,20 @@ # FuturesPriceTriggeredOrder -Futures order details +Futures order details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **initial** | [**FuturesInitialOrder**](FuturesInitialOrder.md) | | **trigger** | [**FuturesPriceTrigger**](FuturesPriceTrigger.md) | | -**id** | **int** | Auto order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time | [optional] [readonly] -**finish_time** | **float** | Finished time | [optional] [readonly] -**trade_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly] -**status** | **str** | Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order | [optional] [readonly] -**finish_as** | **str** | How order is finished | [optional] [readonly] -**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly] -**order_type** | **str** | Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests | [optional] +**id** | **int** | Auto order ID. | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**create_time** | **float** | Creation time. | [optional] [readonly] +**finish_time** | **float** | Finished time. | [optional] [readonly] +**trade_id** | **int** | ID of the newly created order on condition triggered. | [optional] [readonly] +**status** | **str** | Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is close-short-order | [optional] [readonly] +**finish_as** | **str** | How order is finished. | [optional] [readonly] +**reason** | **str** | Additional remarks on how the order was finished. | [optional] [readonly] +**order_type** | **str** | Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests | [optional] **me_order_id** | **int** | Corresponding order ID of order take-profit/stop-loss. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesRiskLimitTier.md b/docs/FuturesRiskLimitTier.md index 5b8922b..cdae523 100644 --- a/docs/FuturesRiskLimitTier.md +++ b/docs/FuturesRiskLimitTier.md @@ -1,15 +1,15 @@ # FuturesRiskLimitTier -Information for each tier of the risk limit ladder +Information for each tier of the risk limit ladder. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **int** | Tier | [optional] -**risk_limit** | **str** | Position risk limit | [optional] -**initial_rate** | **str** | Initial margin rate | [optional] -**maintenance_rate** | **str** | Maintenance margin rate | [optional] -**leverage_max** | **str** | Maximum leverage | [optional] -**deduction** | **str** | Maintenance margin quick calculation deduction | [optional] +**tier** | **int** | Tier. | [optional] +**risk_limit** | **str** | Position risk limit. | [optional] +**initial_rate** | **str** | Initial margin rate. | [optional] +**maintenance_rate** | **str** | Maintenance margin rate. | [optional] +**leverage_max** | **str** | Maximum leverage. | [optional] +**deduction** | **str** | Maintenance margin quick calculation deduction. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesTicker.md b/docs/FuturesTicker.md index fabe441..9cd349b 100644 --- a/docs/FuturesTicker.md +++ b/docs/FuturesTicker.md @@ -3,27 +3,27 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract | [optional] -**last** | **str** | Last trading price | [optional] +**contract** | **str** | Futures contract. | [optional] +**last** | **str** | Last trading price. | [optional] **change_percentage** | **str** | Change percentage. | [optional] -**total_size** | **str** | Contract total size | [optional] -**low_24h** | **str** | Lowest trading price in recent 24h | [optional] -**high_24h** | **str** | Highest trading price in recent 24h | [optional] -**volume_24h** | **str** | Trade size in recent 24h | [optional] +**total_size** | **str** | Contract total size. | [optional] +**low_24h** | **str** | Lowest trading price in recent 24h. | [optional] +**high_24h** | **str** | Highest trading price in recent 24h. | [optional] +**volume_24h** | **str** | Trade size in recent 24h. | [optional] **volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] **volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency | [optional] -**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency | [optional] -**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency | [optional] -**mark_price** | **str** | Recent mark price | [optional] -**funding_rate** | **str** | Funding rate | [optional] -**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] -**index_price** | **str** | Index price | [optional] +**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency. | [optional] +**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency. | [optional] +**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency. | [optional] +**mark_price** | **str** | Recent mark price. | [optional] +**funding_rate** | **str** | Funding rate. | [optional] +**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`). | [optional] +**index_price** | **str** | Index price. | [optional] **quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] -**lowest_ask** | **str** | Recent lowest ask | [optional] -**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] -**highest_bid** | **str** | Recent highest bid | [optional] -**highest_size** | **str** | The latest buyer's highest price order volume | [optional] +**lowest_ask** | **str** | Recent lowest ask. | [optional] +**lowest_size** | **str** | The latest seller's lowest price order quantity. | [optional] +**highest_bid** | **str** | Recent highest bid. | [optional] +**highest_size** | **str** | The latest buyer's highest price order volume. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesTrade.md b/docs/FuturesTrade.md index 57e99c6..6b6970a 100644 --- a/docs/FuturesTrade.md +++ b/docs/FuturesTrade.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] +**id** | **int** | Trade ID. | [optional] +**create_time** | **float** | Trading time. | [optional] **create_time_ms** | **float** | Trading time, with milliseconds set to 3 decimal places. | [optional] -**contract** | **str** | Futures contract | [optional] -**size** | **int** | Trading size | [optional] -**price** | **str** | Trading price (quote currency) | [optional] -**is_internal** | **bool** | Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. | [optional] +**contract** | **str** | Futures contract. | [optional] +**size** | **int** | Trading size. | [optional] +**price** | **str** | Trading price (quote currency). | [optional] +**is_internal** | **bool** | Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. an internal trade, this field will not be returned. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IndexConstituent.md b/docs/IndexConstituent.md index a80703f..1caf740 100644 --- a/docs/IndexConstituent.md +++ b/docs/IndexConstituent.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**exchange** | **str** | Exchange | [optional] -**symbols** | **list[str]** | Symbol list | [optional] +**exchange** | **str** | Exchange. | [optional] +**symbols** | **list[str]** | 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/InlineResponse2001.md b/docs/InlineResponse2001.md index 31a5f58..67b01b4 100644 --- a/docs/InlineResponse2001.md +++ b/docs/InlineResponse2001.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **str** | | [optional] -**est_rate** | **str** | Unconverted percentage | [optional] +**est_rate** | **str** | Unconverted percentage. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InsuranceRecord.md b/docs/InsuranceRecord.md index cc34afc..3527179 100644 --- a/docs/InsuranceRecord.md +++ b/docs/InsuranceRecord.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **int** | Unix timestamp in seconds | [optional] -**b** | **str** | Insurance balance | [optional] +**t** | **int** | Unix timestamp in seconds. | [optional] +**b** | **str** | Insurance 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/LedgerRecord.md b/docs/LedgerRecord.md index e0ec9fc..8c6c629 100644 --- a/docs/LedgerRecord.md +++ b/docs/LedgerRecord.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Record ID | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] +**id** | **str** | Record ID. | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal. | [optional] [readonly] **withdraw_order_id** | **str** | User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] -**timestamp** | **str** | Operation time | [optional] [readonly] -**amount** | **str** | Currency amount | -**currency** | **str** | Currency name | -**address** | **str** | Withdrawal address. Required for withdrawals | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] +**timestamp** | **str** | Operation time. | [optional] [readonly] +**amount** | **str** | Currency amount. | +**currency** | **str** | Currency name. | +**address** | **str** | Withdrawal address. Required for withdrawals. | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal. | [optional] **withdraw_id** | **str** | The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time | [optional] **asset_class** | **str** | The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] **status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - REVIEW: Under review | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals | +**chain** | **str** | Name of the chain used in withdrawals. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiquidateOrder.md b/docs/LiquidateOrder.md index cc2d78e..34893a0 100644 --- a/docs/LiquidateOrder.md +++ b/docs/LiquidateOrder.md @@ -1,13 +1,13 @@ # LiquidateOrder -Liquidate Order detail +Liquidate Order detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**currency_pair** | **str** | Currency pair | -**amount** | **str** | Trade amount | -**price** | **str** | Order price | +**currency_pair** | **str** | Currency pair. | +**amount** | **str** | Trade amount. | +**price** | **str** | Order price. | **action_mode** | **str** | Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginAccount.md b/docs/MarginAccount.md index b54725d..f35da74 100644 --- a/docs/MarginAccount.md +++ b/docs/MarginAccount.md @@ -4,12 +4,12 @@ Margin account detail. `base` refers to base currency, while `quotes to quote cu ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**account_type** | **str** | Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated | [optional] -**leverage** | **str** | User current market leverage multiple | [optional] -**locked** | **bool** | Whether account is locked | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**account_type** | **str** | Account type, risk - risk rate account, mmr - maintenance margin market not activated | [optional] +**leverage** | **str** | User current market leverage multiple. | [optional] +**locked** | **bool** | Whether account is locked. | [optional] **risk** | **str** | Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) | [optional] -**mmr** | **str** | Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) | [optional] +**mmr** | **str** | Leveraged Account Current Maintenance Margin Rate (returned when the Account is Account) | [optional] **base** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional] **quote** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional] diff --git a/docs/MarginAccountBook.md b/docs/MarginAccountBook.md index 9c62f12..afc8922 100644 --- a/docs/MarginAccountBook.md +++ b/docs/MarginAccountBook.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID | [optional] -**time** | **str** | Balance changed timestamp | [optional] -**time_ms** | **int** | The timestamp of the change (in milliseconds) | [optional] -**currency** | **str** | Currency changed | [optional] -**currency_pair** | **str** | Account currency pair | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] +**id** | **str** | Balance change record ID. | [optional] +**time** | **str** | Balance changed timestamp. | [optional] +**time_ms** | **int** | The timestamp of the change (in milliseconds). | [optional] +**currency** | **str** | Currency changed. | [optional] +**currency_pair** | **str** | Account currency pair. | [optional] +**change** | **str** | Amount changed. Positive value means transferring in, while negative out. | [optional] +**balance** | **str** | Balance after change. | [optional] +**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginAccountCurrency.md b/docs/MarginAccountCurrency.md index 01f80ab..c821455 100644 --- a/docs/MarginAccountCurrency.md +++ b/docs/MarginAccountCurrency.md @@ -1,14 +1,14 @@ # MarginAccountCurrency -Account currency details +Account currency details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] +**currency** | **str** | Currency name. | [optional] **available** | **str** | Amount suitable for margin trading. | [optional] -**locked** | **str** | Locked amount, used in margin trading | [optional] -**borrowed** | **str** | Borrowed amount | [optional] -**interest** | **str** | Unpaid interests | [optional] +**locked** | **str** | Locked amount, used in margin trading. | [optional] +**borrowed** | **str** | Borrowed amount. | [optional] +**interest** | **str** | Unpaid interests. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginApi.md b/docs/MarginApi.md index 070c5f7..2f92726 100644 --- a/docs/MarginApi.md +++ b/docs/MarginApi.md @@ -4,24 +4,24 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list -[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history -[**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list -[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting -[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting -[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market -[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient -[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple -[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list -[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) -[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) +[**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list. +[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history. +[**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list. +[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting. +[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting. +[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency. +[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market. +[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient. +[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple. +[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list. +[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated). +[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated). # **list_margin_accounts** > list[MarginAccount] list_margin_accounts(currency_pair=currency_pair) -Margin account list +Margin account list. ### Example @@ -47,10 +47,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) try: - # Margin account list + # Margin account list. api_response = api_instance.list_margin_accounts(currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -63,7 +63,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] + **currency_pair** | **str**| Currency pair. | [optional] ### Return type @@ -81,14 +81,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_margin_account_book** > list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) -List margin account balance change history +List margin account balance change history. Only transferals from and to margin account are provided for now. Time range allows 30 days at most @@ -119,13 +119,13 @@ api_instance = gate_api.MarginApi(api_client) currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +_from = 1627706330 # int | Start timestamp of the query. (optional) +to = 1635329650 # int | Time range ending, default to current time. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) try: - # List margin account balance change history + # List margin account balance change history. api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -141,10 +141,10 @@ Name | Type | Description | Notes **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] ### Return type @@ -162,14 +162,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_funding_accounts** > list[FundingAccount] list_funding_accounts(currency=currency) -Funding account list +Funding account list. ### Example @@ -195,10 +195,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) try: - # Funding account list + # Funding account list. api_response = api_instance.list_funding_accounts(currency=currency) print(api_response) except GateApiException as ex: @@ -211,7 +211,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] ### Return type @@ -229,14 +229,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_auto_repay_status** > AutoRepaySetting get_auto_repay_status() -Retrieve user auto repayment setting +Retrieve user auto repayment setting. ### Example @@ -264,7 +264,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MarginApi(api_client) try: - # Retrieve user auto repayment setting + # Retrieve user auto repayment setting. api_response = api_instance.get_auto_repay_status() print(api_response) except GateApiException as ex: @@ -292,14 +292,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting | - | +**200** | Current auto repayment setting. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_auto_repay** > AutoRepaySetting set_auto_repay(status) -Update user's auto repayment setting +Update user's auto repayment setting. ### Example @@ -325,10 +325,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled +status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled. try: - # Update user's auto repayment setting + # Update user's auto repayment setting. api_response = api_instance.set_auto_repay(status) print(api_response) except GateApiException as ex: @@ -341,7 +341,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled | + **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled. | ### Return type @@ -359,14 +359,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting | - | +**200** | Current auto repayment setting. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_margin_transferable** > MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) -Get the max transferable amount for a specific margin currency +Get the max transferable amount for a specific margin currency. ### Example @@ -392,11 +392,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency -currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) try: - # Get the max transferable amount for a specific margin currency + # Get the max transferable amount for a specific margin currency. api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -409,8 +409,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Retrieve data of the specified currency. | + **currency_pair** | **str**| Currency pair. | [optional] ### Return type @@ -428,14 +428,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_margin_tier** > list[MarginLeverageTier] get_user_margin_tier(currency_pair) -Check the user's own leverage lending gradient in the current market +Check the user's own leverage lending gradient in the current market. ### Example @@ -461,10 +461,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair +currency_pair = 'BTC_USDT' # str | Currency pair. try: - # Check the user's own leverage lending gradient in the current market + # Check the user's own leverage lending gradient in the current market. api_response = api_instance.get_user_margin_tier(currency_pair) print(api_response) except GateApiException as ex: @@ -477,7 +477,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair. | ### Return type @@ -495,14 +495,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_market_margin_tier** > list[MarginLeverageTier] get_market_margin_tier(currency_pair) -Query the current market leverage lending gradient +Query the current market leverage lending gradient. ### Example @@ -519,10 +519,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair +currency_pair = 'BTC_USDT' # str | Currency pair. try: - # Query the current market leverage lending gradient + # Query the current market leverage lending gradient. api_response = api_instance.get_market_margin_tier(currency_pair) print(api_response) except GateApiException as ex: @@ -535,7 +535,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair. | ### Return type @@ -553,14 +553,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_user_market_leverage** > set_user_market_leverage(margin_market_leverage) -Set the user market leverage multiple +Set the user market leverage multiple. ### Example @@ -589,7 +589,7 @@ api_instance = gate_api.MarginApi(api_client) margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | try: - # Set the user market leverage multiple + # Set the user market leverage multiple. api_instance.set_user_market_leverage(margin_market_leverage) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -619,14 +619,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Success | - | +**204** | 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_margin_user_account** > list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) -Query the user's leverage account list +Query the user's leverage account list. Support querying risk rate per position account and margin rate per position account @@ -654,10 +654,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) try: - # Query the user's leverage account list + # Query the user's leverage account list. api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -670,7 +670,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] + **currency_pair** | **str**| Currency pair. | [optional] ### Return type @@ -688,14 +688,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_cross_margin_loans** > list[CrossMarginLoan] list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) -List cross margin borrow history. (deprecated) +List cross margin borrow history. (deprecated). Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. @@ -723,14 +723,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.) -currency = 'currency_example' # str | Filter by currency (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.). +currency = 'currency_example' # str | Filter by currency. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) try: - # List cross margin borrow history. (deprecated) + # List cross margin borrow history. (deprecated). api_response = api_instance.list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) print(api_response) except GateApiException as ex: @@ -743,10 +743,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.) | - **currency** | **str**| Filter by currency | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.). | + **currency** | **str**| Filter by currency. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] ### Return type @@ -765,14 +765,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_cross_margin_repayments** > list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) -Retrieve cross margin repayments. (deprecated) +Retrieve cross margin repayments. (deprecated). Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. @@ -802,12 +802,12 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MarginApi(api_client) currency = 'BTC' # str | (optional) loan_id = '12345' # str | (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) try: - # Retrieve cross margin repayments. (deprecated) + # Retrieve cross margin repayments. (deprecated). api_response = api_instance.list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) print(api_response) except GateApiException as ex: @@ -822,8 +822,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency** | **str**| | [optional] **loan_id** | **str**| | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] ### Return type @@ -842,7 +842,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/MarginLeverageTier.md b/docs/MarginLeverageTier.md index 0a36030..c2fa771 100644 --- a/docs/MarginLeverageTier.md +++ b/docs/MarginLeverageTier.md @@ -1,12 +1,12 @@ # MarginLeverageTier -Market gradient information +Market gradient information. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**upper_limit** | **str** | Maximum loan limit | [optional] -**mmr** | **str** | Maintenance margin rate | [optional] -**leverage** | **str** | Maximum leverage multiple | [optional] +**upper_limit** | **str** | Maximum loan limit. | [optional] +**mmr** | **str** | Maintenance margin rate. | [optional] +**leverage** | **str** | Maximum leverage multiple. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginMarketLeverage.md b/docs/MarginMarketLeverage.md index a136ef8..d4f0707 100644 --- a/docs/MarginMarketLeverage.md +++ b/docs/MarginMarketLeverage.md @@ -1,11 +1,11 @@ # MarginMarketLeverage -Market leverage settings +Market leverage settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**leverage** | **str** | Position leverage | +**currency_pair** | **str** | Currency pair. | [optional] +**leverage** | **str** | Position leverage. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginTiers.md b/docs/MarginTiers.md index 455092c..7a07dd4 100644 --- a/docs/MarginTiers.md +++ b/docs/MarginTiers.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **str** | Tier | [optional] -**margin_rate** | **str** | Discount | [optional] -**lower_limit** | **str** | Lower limit | [optional] -**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier) | [optional] -**leverage** | **str** | Position leverage | [optional] +**tier** | **str** | Tier. | [optional] +**margin_rate** | **str** | Discount. | [optional] +**lower_limit** | **str** | Lower limit. | [optional] +**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier). | [optional] +**leverage** | **str** | Position leverage. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginTransferable.md b/docs/MarginTransferable.md index af64207..6a34651 100644 --- a/docs/MarginTransferable.md +++ b/docs/MarginTransferable.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**amount** | **str** | Max transferable amount | [optional] +**currency** | **str** | Currency detail. | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**amount** | **str** | Max transferable amount. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md index e4c0560..98768b1 100644 --- a/docs/MarginUniApi.md +++ b/docs/MarginUniApi.md @@ -4,20 +4,20 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets -[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market -[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate -[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans -[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay -[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records -[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records -[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable +[**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets. +[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market. +[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate. +[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans. +[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay. +[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records. +[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records. +[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable. # **list_uni_currency_pairs** > list[UniCurrencyPair] list_uni_currency_pairs() -List lending markets +List lending markets. ### Example @@ -36,7 +36,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MarginUniApi(api_client) try: - # List lending markets + # List lending markets. api_response = api_instance.list_uni_currency_pairs() print(api_response) except GateApiException as ex: @@ -64,14 +64,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_currency_pair** > UniCurrencyPair get_uni_currency_pair(currency_pair) -Get detail of lending market +Get detail of lending market. ### Example @@ -88,10 +88,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'AE_USDT' # str | Currency pair +currency_pair = 'AE_USDT' # str | Currency pair. try: - # Get detail of lending market + # Get detail of lending market. api_response = api_instance.get_uni_currency_pair(currency_pair) print(api_response) except GateApiException as ex: @@ -104,7 +104,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair. | ### Return type @@ -122,14 +122,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_margin_uni_estimate_rate** > dict(str, str) get_margin_uni_estimate_rate(currencies) -Estimate interest Rate +Estimate interest Rate. Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. @@ -157,10 +157,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name. try: - # Estimate interest Rate + # Estimate interest Rate. api_response = api_instance.get_margin_uni_estimate_rate(currencies) print(api_response) except GateApiException as ex: @@ -173,7 +173,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name | + **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name. | ### Return type @@ -191,14 +191,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_loans** > list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) -List loans +List loans. ### Example @@ -224,13 +224,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) try: - # List loans + # List loans. api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -243,10 +243,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency_pair** | **str**| Currency pair. | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] ### Return type @@ -264,14 +264,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_uni_loan** > create_uni_loan(create_uni_loan) -Borrow or repay +Borrow or repay. ### Example @@ -300,7 +300,7 @@ api_instance = gate_api.MarginUniApi(api_client) create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | try: - # Borrow or repay + # Borrow or repay. api_instance.create_uni_loan(create_uni_loan) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -330,14 +330,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully | - | +**204** | Operated successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_loan_records** > list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) -Get load records +Get load records. ### Example @@ -363,14 +363,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -type = 'type_example' # str | type: borrow - borrow, repay - repay (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +type = 'type_example' # str | type: borrow - borrow, repay - repay. (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) try: - # Get load records + # Get load records. api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -383,11 +383,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| type: borrow - borrow, repay - repay | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **currency_pair** | **str**| Currency pair | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **type** | **str**| type: borrow - borrow, repay - repay. | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **currency_pair** | **str**| Currency pair. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] ### Return type @@ -405,14 +405,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_loan_interest_records** > list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) -List interest records +List interest records. ### Example @@ -438,15 +438,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List interest records + # List interest records. api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -459,10 +459,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **currency_pair** | **str**| Currency pair. | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -482,14 +482,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_borrowable** > MaxUniBorrowable get_uni_borrowable(currency, currency_pair) -Get maximum borrowable +Get maximum borrowable. ### Example @@ -515,11 +515,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency -currency_pair = 'BTC_USDT' # str | Currency pair +currency = 'BTC' # str | Retrieve data of the specified currency. +currency_pair = 'BTC_USDT' # str | Currency pair. try: - # Get maximum borrowable + # Get maximum borrowable. api_response = api_instance.get_uni_borrowable(currency, currency_pair) print(api_response) except GateApiException as ex: @@ -532,8 +532,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | - **currency_pair** | **str**| Currency pair | + **currency** | **str**| Retrieve data of the specified currency. | + **currency_pair** | **str**| Currency pair. | ### Return type @@ -551,7 +551,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/MaxUniBorrowable.md b/docs/MaxUniBorrowable.md index 107dbab..99c0a5a 100644 --- a/docs/MaxUniBorrowable.md +++ b/docs/MaxUniBorrowable.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**borrowable** | **str** | Maximum borrowable | [readonly] +**currency** | **str** | Currency. | [readonly] +**currency_pair** | **str** | Currency pair. | [optional] [readonly] +**borrowable** | **str** | Maximum borrowable. | [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/MockFuturesOrder.md b/docs/MockFuturesOrder.md index 74f0821..b0ab054 100644 --- a/docs/MockFuturesOrder.md +++ b/docs/MockFuturesOrder.md @@ -1,12 +1,12 @@ # MockFuturesOrder -Futures order +Futures order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **contract** | **str** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | **size** | **str** | Futures quantity, representing the initial order quantity, not involved in actual settlement. | -**left** | **str** | Unfilled contract quantity, involved in actual calculation | +**left** | **str** | Unfilled contract quantity, involved in actual calculation. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockFuturesPosition.md b/docs/MockFuturesPosition.md index 67f559d..9563213 100644 --- a/docs/MockFuturesPosition.md +++ b/docs/MockFuturesPosition.md @@ -1,6 +1,6 @@ # MockFuturesPosition -Futures positions +Futures positions. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/MockMarginResult.md b/docs/MockMarginResult.md index 087826b..76b8d2a 100644 --- a/docs/MockMarginResult.md +++ b/docs/MockMarginResult.md @@ -1,16 +1,16 @@ # MockMarginResult -Margin result +Margin result. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position | [optional] -**profit_loss_ranges** | [**list[ProfitLossRange]**](ProfitLossRange.md) | The results of 33 pressure scenarios for MR1 | [optional] +**type** | **str** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` position | [optional] +**profit_loss_ranges** | [**list[ProfitLossRange]**](ProfitLossRange.md) | The results of 3 pressure scenarios for MR1. | [optional] **max_loss** | [**ProfitLossRange**](.md) | 最大损失 | [optional] -**mr1** | **str** | Stress testing | [optional] -**mr2** | **str** | Basis spread risk | [optional] -**mr3** | **str** | Volatility spread risk | [optional] -**mr4** | **str** | Option short risk | [optional] +**mr1** | **str** | Stress testing. | [optional] +**mr2** | **str** | Basis spread risk. | [optional] +**mr3** | **str** | Volatility spread risk. | [optional] +**mr4** | **str** | Option short risk. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockOptionsOrder.md b/docs/MockOptionsOrder.md index 4748585..819b975 100644 --- a/docs/MockOptionsOrder.md +++ b/docs/MockOptionsOrder.md @@ -1,12 +1,12 @@ # MockOptionsOrder -Option orders +Option orders. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **options_name** | **str** | Option name, currently only supports options for BTC and ETH with USDT. | -**size** | **str** | Initial order quantity, not involved in actual calculation | -**left** | **str** | Unfilled contract quantity, involved in actual calculation | +**size** | **str** | Initial order quantity, not involved in actual calculation. | +**left** | **str** | Unfilled contract quantity, involved in actual calculation. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockOptionsPosition.md b/docs/MockOptionsPosition.md index ebecb3c..61310f3 100644 --- a/docs/MockOptionsPosition.md +++ b/docs/MockOptionsPosition.md @@ -1,6 +1,6 @@ # MockOptionsPosition -Options positions +Options positions. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/MockRiskUnit.md b/docs/MockRiskUnit.md index d2e5c3c..84e2a86 100644 --- a/docs/MockRiskUnit.md +++ b/docs/MockRiskUnit.md @@ -1,18 +1,18 @@ # MockRiskUnit -Risk unit +Risk unit. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**symbol** | **str** | Risk unit name | [optional] -**spot_in_use** | **str** | Spot usage | [optional] -**maintain_margin** | **str** | Maintenance margin | [optional] -**initial_margin** | **str** | Initial margin | [optional] -**margin_result** | [**list[MockMarginResult]**](MockMarginResult.md) | Margin result | [optional] -**delta** | **str** | Total Delta of risk unit | [optional] -**gamma** | **str** | Total Gamma of risk unit | [optional] -**theta** | **str** | Total Theta of risk unit | [optional] -**vega** | **str** | Total Vega of risk unit | [optional] +**symbol** | **str** | Risk unit name. | [optional] +**spot_in_use** | **str** | Spot usage. | [optional] +**maintain_margin** | **str** | Maintenance margin. | [optional] +**initial_margin** | **str** | Initial margin. | [optional] +**margin_result** | [**list[MockMarginResult]**](MockMarginResult.md) | Margin result. | [optional] +**delta** | **str** | Total Delta of risk unit. | [optional] +**gamma** | **str** | Total Gamma of risk unit. | [optional] +**theta** | **str** | Total Theta of risk unit. | [optional] +**vega** | **str** | Total Vega of risk unit. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockSpotBalance.md b/docs/MockSpotBalance.md index c9181a0..bf1f10a 100644 --- a/docs/MockSpotBalance.md +++ b/docs/MockSpotBalance.md @@ -1,10 +1,10 @@ # MockSpotBalance -Spot +Spot. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | +**currency** | **str** | Currency name. | **equity** | **str** | Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockSpotOrder.md b/docs/MockSpotOrder.md index 4327a99..5ce7657 100644 --- a/docs/MockSpotOrder.md +++ b/docs/MockSpotOrder.md @@ -1,11 +1,11 @@ # MockSpotOrder -Spot orders +Spot orders. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pairs** | **str** | Currency pair | -**order_price** | **str** | Price | +**currency_pairs** | **str** | Currency pair. | +**order_price** | **str** | Price. | **count** | **str** | Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. | [optional] **left** | **str** | Unfilled quantity, involved in actual calculation. | **type** | **str** | Order type, sell - sell order, buy - buy order. | diff --git a/docs/MultiChainAddressItem.md b/docs/MultiChainAddressItem.md index 5309ff3..d7d5f88 100644 --- a/docs/MultiChainAddressItem.md +++ b/docs/MultiChainAddressItem.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**chain** | **str** | Name of the chain | [optional] -**address** | **str** | Deposit address | [optional] -**payment_id** | **str** | Notes that some currencies required(e.g., Tag, Memo) when depositing | [optional] -**payment_name** | **str** | Note type, `Tag` or `Memo` | [optional] +**chain** | **str** | Name of the chain. | [optional] +**address** | **str** | Deposit address. | [optional] +**payment_id** | **str** | Notes that some currencies required(e.g., Tag, Memo) when depositing. | [optional] +**payment_name** | **str** | Note type, `Tag` or `Memo`. | [optional] **obtain_failed** | **int** | The obtain failed status- 0: address successfully obtained- 1: failed to obtain address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralCurrency.md b/docs/MultiCollateralCurrency.md index 872dc36..68958c2 100644 --- a/docs/MultiCollateralCurrency.md +++ b/docs/MultiCollateralCurrency.md @@ -4,8 +4,8 @@ Borrowing and collateral currencies supported for Multi-Collateral. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**loan_currencies** | [**list[MultiLoanItem]**](MultiLoanItem.md) | List of supported borrowing currencies | [optional] -**collateral_currencies** | [**list[MultiCollateralItem]**](MultiCollateralItem.md) | List of supported collateral currencies | [optional] +**loan_currencies** | [**list[MultiLoanItem]**](MultiLoanItem.md) | List of supported borrowing currencies. | [optional] +**collateral_currencies** | [**list[MultiCollateralItem]**](MultiCollateralItem.md) | List of supported collateral currencies. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralItem.md b/docs/MultiCollateralItem.md index 3e9ba07..57a7909 100644 --- a/docs/MultiCollateralItem.md +++ b/docs/MultiCollateralItem.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**discount** | **str** | Discount | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**discount** | **str** | Discount. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md index ca2c338..abecee3 100644 --- a/docs/MultiCollateralLoanApi.md +++ b/docs/MultiCollateralLoanApi.md @@ -4,24 +4,24 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_multi_collateral_orders**](MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders -[**create_multi_collateral**](MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order -[**get_multi_collateral_order_detail**](MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail -[**list_multi_repay_records**](MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records -[**repay_multi_collateral_loan**](MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan -[**list_multi_collateral_records**](MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records -[**operate_multi_collateral**](MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral -[**list_user_currency_quota**](MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota -[**list_multi_collateral_currencies**](MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral -[**get_multi_collateral_ltv**](MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio -[**get_multi_collateral_fix_rate**](MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days -[**get_multi_collateral_current_rate**](MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency +[**list_multi_collateral_orders**](MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders. +[**create_multi_collateral**](MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order. +[**get_multi_collateral_order_detail**](MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail. +[**list_multi_repay_records**](MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records. +[**repay_multi_collateral_loan**](MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan. +[**list_multi_collateral_records**](MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records. +[**operate_multi_collateral**](MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral. +[**list_user_currency_quota**](MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota. +[**list_multi_collateral_currencies**](MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral. +[**get_multi_collateral_ltv**](MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio. +[**get_multi_collateral_fix_rate**](MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days. +[**get_multi_collateral_current_rate**](MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency. # **list_multi_collateral_orders** > list[MultiCollateralOrder] list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) -List Multi-Collateral Orders +List Multi-Collateral Orders. ### Example @@ -47,13 +47,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) -sort = 'ltv_asc' # str | Query the current interest rate of the currency in the previous hour (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 10 # int | Maximum number of records to be returned in a single list. (optional) (default to 10) +sort = 'ltv_asc' # str | Query the current interest rate of the currency in the previous hour. (optional) order_type = 'current' # str | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified (optional) try: - # List Multi-Collateral Orders + # List Multi-Collateral Orders. api_response = api_instance.list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) print(api_response) except GateApiException as ex: @@ -66,9 +66,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] - **sort** | **str**| Query the current interest rate of the currency in the previous hour | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 10] + **sort** | **str**| Query the current interest rate of the currency in the previous hour. | [optional] **order_type** | **str**| Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional] ### Return type @@ -87,14 +87,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_multi_collateral** > OrderResp create_multi_collateral(create_multi_collateral_order) -Create Multi-Collateral Order +Create Multi-Collateral Order. ### Example @@ -123,7 +123,7 @@ api_instance = gate_api.MultiCollateralLoanApi(api_client) create_multi_collateral_order = gate_api.CreateMultiCollateralOrder() # CreateMultiCollateralOrder | try: - # Create Multi-Collateral Order + # Create Multi-Collateral Order. api_response = api_instance.create_multi_collateral(create_multi_collateral_order) print(api_response) except GateApiException as ex: @@ -154,14 +154,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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_multi_collateral_order_detail** > MultiCollateralOrder get_multi_collateral_order_detail(order_id) -Get Multi-Collateral Order Detail +Get Multi-Collateral Order Detail. ### Example @@ -187,10 +187,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -order_id = '12345' # str | Order ID returned on successful order creation +order_id = '12345' # str | Order ID returned on successful order creation. try: - # Get Multi-Collateral Order Detail + # Get Multi-Collateral Order Detail. api_response = api_instance.get_multi_collateral_order_detail(order_id) print(api_response) except GateApiException as ex: @@ -203,7 +203,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Order ID returned on successful order creation | + **order_id** | **str**| Order ID returned on successful order creation. | ### Return type @@ -221,14 +221,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**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_multi_repay_records** > list[MultiRepayRecord] list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) -List Multi-Collateral Repay Records +List Multi-Collateral Repay Records. ### Example @@ -254,15 +254,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -type = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation -borrow_currency = 'USDT' # str | Borrowed currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) +type = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation. +borrow_currency = 'USDT' # str | Borrowed currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 10 # int | Maximum number of records to be returned in a single list. (optional) (default to 10) +_from = 1609459200 # int | Start timestamp of the query. (optional) +to = 1609459200 # int | Time range ending, default to current time. (optional) try: - # List Multi-Collateral Repay Records + # List Multi-Collateral Repay Records. api_response = api_instance.list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -275,12 +275,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | - **borrow_currency** | **str**| Borrowed currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] + **type** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation. | + **borrow_currency** | **str**| Borrowed currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 10] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] ### Return type @@ -298,14 +298,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repay_multi_collateral_loan** > MultiRepayResp repay_multi_collateral_loan(repay_multi_loan) -Repay Multi-Collateral Loan +Repay Multi-Collateral Loan. ### Example @@ -334,7 +334,7 @@ api_instance = gate_api.MultiCollateralLoanApi(api_client) repay_multi_loan = gate_api.RepayMultiLoan() # RepayMultiLoan | try: - # Repay Multi-Collateral Loan + # Repay Multi-Collateral Loan. api_response = api_instance.repay_multi_collateral_loan(repay_multi_loan) print(api_response) except GateApiException as ex: @@ -365,14 +365,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully | - | +**200** | Operated successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_multi_collateral_records** > list[MultiCollateralRecord] list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) -Query collateral adjustment records +Query collateral adjustment records. ### Example @@ -398,14 +398,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list (optional) (default to 10) -_from = 1609459200 # int | Start timestamp of the query (optional) -to = 1609459200 # int | Time range ending, default to current time (optional) -collateral_currency = 'BTC' # str | Collateral (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 10 # int | Maximum number of records to be returned in a single list. (optional) (default to 10) +_from = 1609459200 # int | Start timestamp of the query. (optional) +to = 1609459200 # int | Time range ending, default to current time. (optional) +collateral_currency = 'BTC' # str | Collateral. (optional) try: - # Query collateral adjustment records + # Query collateral adjustment records. api_response = api_instance.list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) print(api_response) except GateApiException as ex: @@ -418,11 +418,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 10] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **collateral_currency** | **str**| Collateral | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 10] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **collateral_currency** | **str**| Collateral. | [optional] ### Return type @@ -440,14 +440,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **operate_multi_collateral** > CollateralAdjustRes operate_multi_collateral(collateral_adjust) -Operate Multi-Collateral +Operate Multi-Collateral. ### Example @@ -476,7 +476,7 @@ api_instance = gate_api.MultiCollateralLoanApi(api_client) collateral_adjust = gate_api.CollateralAdjust() # CollateralAdjust | try: - # Operate Multi-Collateral + # Operate Multi-Collateral. api_response = api_instance.operate_multi_collateral(collateral_adjust) print(api_response) except GateApiException as ex: @@ -507,14 +507,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully | - | +**200** | Operated 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_user_currency_quota** > list[CurrencyQuota] list_user_currency_quota(type, currency) -List User Currency Quota +List User Currency Quota. ### Example @@ -540,11 +540,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -type = 'collateral' # str | Currency type: collateral - Collateral currency, borrow - Borrowing -currency = 'BTC' # str | When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc +type = 'collateral' # str | Currency type: collateral - Collateral currency, borrow - Borrowing. +currency = 'BTC' # str | When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed try: - # List User Currency Quota + # List User Currency Quota. api_response = api_instance.list_user_currency_quota(type, currency) print(api_response) except GateApiException as ex: @@ -557,8 +557,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| Currency type: collateral - Collateral currency, borrow - Borrowing | - **currency** | **str**| When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc | + **type** | **str**| Currency type: collateral - Collateral currency, borrow - Borrowing. | + **currency** | **str**| When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed | ### Return type @@ -576,14 +576,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_multi_collateral_currencies** > MultiCollateralCurrency list_multi_collateral_currencies() -Query supported borrowing and collateral currencies in Multi-Collateral +Query supported borrowing and collateral currencies in Multi-Collateral. ### Example @@ -602,7 +602,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MultiCollateralLoanApi(api_client) try: - # Query supported borrowing and collateral currencies in Multi-Collateral + # Query supported borrowing and collateral currencies in Multi-Collateral. api_response = api_instance.list_multi_collateral_currencies() print(api_response) except GateApiException as ex: @@ -630,14 +630,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_multi_collateral_ltv** > CollateralLtv get_multi_collateral_ltv() -Get Multi-Collateral ratio +Get Multi-Collateral ratio. The Multi-Collateral ratio is fixed, irrespective of the currency. @@ -658,7 +658,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MultiCollateralLoanApi(api_client) try: - # Get Multi-Collateral ratio + # Get Multi-Collateral ratio. api_response = api_instance.get_multi_collateral_ltv() print(api_response) except GateApiException as ex: @@ -686,14 +686,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_multi_collateral_fix_rate** > list[CollateralFixRate] get_multi_collateral_fix_rate() -Query fixed interest rates for the currency for 7 days and 30 days +Query fixed interest rates for the currency for 7 days and 30 days. ### Example @@ -712,7 +712,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MultiCollateralLoanApi(api_client) try: - # Query fixed interest rates for the currency for 7 days and 30 days + # Query fixed interest rates for the currency for 7 days and 30 days. api_response = api_instance.get_multi_collateral_fix_rate() print(api_response) except GateApiException as ex: @@ -740,14 +740,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_multi_collateral_current_rate** > list[CollateralCurrentRate] get_multi_collateral_current_rate(currencies, vip_level=vip_level) -Query the current interest rate of the currency +Query the current interest rate of the currency. Query the current interest rate of the currency in the previous hour. @@ -767,10 +767,10 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency name query array, separated by commas, maximum 100items. -vip_level = '0' # str | VIP level, defaults to 0 if not transferred (optional) (default to '0') +vip_level = '0' # str | VIP level, defaults to 0 if not transferred. (optional) (default to '0') try: - # Query the current interest rate of the currency + # Query the current interest rate of the currency. api_response = api_instance.get_multi_collateral_current_rate(currencies, vip_level=vip_level) print(api_response) except GateApiException as ex: @@ -784,7 +784,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currencies** | [**list[str]**](str.md)| Specify currency name query array, separated by commas, maximum 100items. | - **vip_level** | **str**| VIP level, defaults to 0 if not transferred | [optional] [default to '0'] + **vip_level** | **str**| VIP level, defaults to 0 if not transferred. | [optional] [default to '0'] ### Return type @@ -802,7 +802,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralOrder.md b/docs/MultiCollateralOrder.md index 0c5ebee..8c4672c 100644 --- a/docs/MultiCollateralOrder.md +++ b/docs/MultiCollateralOrder.md @@ -1,23 +1,23 @@ # MultiCollateralOrder -Multi-Collateral Order +Multi-Collateral Order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID | [optional] -**order_type** | **str** | current - current, fixed - fixed | [optional] +**order_id** | **str** | Order ID. | [optional] +**order_type** | **str** | current - current, fixed - fixed. | [optional] **fixed_type** | **str** | Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. | [optional] -**fixed_rate** | **str** | Fixed interest rate | [optional] +**fixed_rate** | **str** | Fixed interest rate. | [optional] **expire_time** | **int** | Expiration time, timestamp, unit in seconds. | [optional] -**auto_renew** | **bool** | Fixed interest rate, automatic renewal | [optional] -**auto_repay** | **bool** | Fixed interest rate, automatic repayment | [optional] -**current_ltv** | **str** | The current collateralization rate | [optional] +**auto_renew** | **bool** | Fixed interest rate, automatic renewal. | [optional] +**auto_repay** | **bool** | Fixed interest rate, automatic repayment. | [optional] +**current_ltv** | **str** | The current collateralization rate. | [optional] **status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] -**total_left_repay_usdt** | **str** | Value of Left repay amount converted in USDT | [optional] -**total_left_collateral_usdt** | **str** | Value of Collateral amount in USDT | [optional] -**borrow_currencies** | [**list[BorrowCurrencyInfo]**](BorrowCurrencyInfo.md) | Borrowing Currency List | [optional] -**collateral_currencies** | [**list[CollateralCurrencyInfo]**](CollateralCurrencyInfo.md) | Collateral Currency List | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] +**total_left_repay_usdt** | **str** | Value of Left repay amount converted in USDT. | [optional] +**total_left_collateral_usdt** | **str** | Value of Collateral amount in USDT. | [optional] +**borrow_currencies** | [**list[BorrowCurrencyInfo]**](BorrowCurrencyInfo.md) | Borrowing Currency List. | [optional] +**collateral_currencies** | [**list[CollateralCurrencyInfo]**](CollateralCurrencyInfo.md) | Collateral Currency List. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralRecord.md b/docs/MultiCollateralRecord.md index 4f79e11..9a56b77 100644 --- a/docs/MultiCollateralRecord.md +++ b/docs/MultiCollateralRecord.md @@ -4,13 +4,13 @@ Multi-Collateral adjustment record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Collateral record ID | [optional] -**before_ltv** | **str** | The collateral ratio before adjustment | [optional] -**after_ltv** | **str** | The collateral ratio before adjustment | [optional] +**order_id** | **int** | Order ID. | [optional] +**record_id** | **int** | Collateral record ID. | [optional] +**before_ltv** | **str** | The collateral ratio before adjustment. | [optional] +**after_ltv** | **str** | The collateral ratio before adjustment. | [optional] **operate_time** | **int** | Operation time, timestamp in seconds. | [optional] -**borrow_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Borrowing Currency List | [optional] -**collateral_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Collateral Currency List | [optional] +**borrow_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Borrowing Currency List. | [optional] +**collateral_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Collateral Currency List. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralRecordCurrency.md b/docs/MultiCollateralRecordCurrency.md index 7c622f8..babf82e 100644 --- a/docs/MultiCollateralRecordCurrency.md +++ b/docs/MultiCollateralRecordCurrency.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**before_amount** | **str** | Amount before the operation | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**before_amount** | **str** | Amount before the operation. | [optional] **before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] **after_amount** | **str** | Amount after the operation. | [optional] **after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] diff --git a/docs/MultiLoanItem.md b/docs/MultiLoanItem.md index 3c45fc2..78e58e5 100644 --- a/docs/MultiLoanItem.md +++ b/docs/MultiLoanItem.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**price** | **str** | Latest price of the currency | [optional] +**currency** | **str** | Currency. | [optional] +**price** | **str** | Latest price of the currency. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiLoanRepayItem.md b/docs/MultiLoanRepayItem.md index df0f95b..97bdfd1 100644 --- a/docs/MultiLoanRepayItem.md +++ b/docs/MultiLoanRepayItem.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency | [optional] -**amount** | **str** | Size | [optional] +**currency** | **str** | Repayment currency. | [optional] +**amount** | **str** | Size. | [optional] **repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial repayment. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiRepayRecord.md b/docs/MultiRepayRecord.md index 715ee36..1c1e6b6 100644 --- a/docs/MultiRepayRecord.md +++ b/docs/MultiRepayRecord.md @@ -1,21 +1,21 @@ # MultiRepayRecord -Mult Repay Record +Mult Repay Record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Repayment record ID | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**before_ltv** | **str** | Ltv before the operation | [optional] -**after_ltv** | **str** | Ltv after the operation | [optional] +**order_id** | **int** | Order ID. | [optional] +**record_id** | **int** | Repayment record ID. | [optional] +**init_ltv** | **str** | The initial collateralization rate. | [optional] +**before_ltv** | **str** | Ltv before the operation. | [optional] +**after_ltv** | **str** | Ltv after the operation. | [optional] **borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] **repay_time** | **int** | Repayment time, timestamp in seconds. | [optional] -**borrow_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of borrowing information | [optional] -**collateral_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of collateral information | [optional] -**repaid_currencies** | [**list[RepayRecordRepaidCurrency]**](RepayRecordRepaidCurrency.md) | Repay Currency List | [optional] -**total_interest_list** | [**list[RepayRecordTotalInterest]**](RepayRecordTotalInterest.md) | Total Interest List | [optional] -**left_repay_interest_list** | [**list[RepayRecordLeftInterest]**](RepayRecordLeftInterest.md) | List of left repay interest | [optional] +**borrow_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of borrowing information. | [optional] +**collateral_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of collateral information. | [optional] +**repaid_currencies** | [**list[RepayRecordRepaidCurrency]**](RepayRecordRepaidCurrency.md) | Repay Currency List. | [optional] +**total_interest_list** | [**list[RepayRecordTotalInterest]**](RepayRecordTotalInterest.md) | Total Interest List. | [optional] +**left_repay_interest_list** | [**list[RepayRecordLeftInterest]**](RepayRecordLeftInterest.md) | List of left repay interest. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiRepayResp.md b/docs/MultiRepayResp.md index 6315962..406a64a 100644 --- a/docs/MultiRepayResp.md +++ b/docs/MultiRepayResp.md @@ -1,11 +1,11 @@ # MultiRepayResp -Repay Multi-Collateral Loan +Repay Multi-Collateral Loan. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**repaid_currencies** | [**list[RepayCurrencyRes]**](RepayCurrencyRes.md) | Repay Currency List | [optional] +**order_id** | **int** | Order ID. | [optional] +**repaid_currencies** | [**list[RepayCurrencyRes]**](RepayCurrencyRes.md) | Repay Currency List. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MyFuturesTrade.md b/docs/MyFuturesTrade.md index 431447d..3e4b2a7 100644 --- a/docs/MyFuturesTrade.md +++ b/docs/MyFuturesTrade.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] -**contract** | **str** | Futures contract | [optional] -**order_id** | **str** | Order ID related | [optional] -**size** | **int** | Trading size | [optional] -**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] -**price** | **str** | Trading price | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] -**text** | **str** | User defined information | [optional] -**fee** | **str** | Fee deducted | [optional] -**point_fee** | **str** | Points used to deduct fee | [optional] +**id** | **int** | Trade ID. | [optional] +**create_time** | **float** | Trading time. | [optional] +**contract** | **str** | Futures contract. | [optional] +**order_id** | **str** | Order ID related. | [optional] +**size** | **int** | Trading size. | [optional] +**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] +**price** | **str** | Trading price. | [optional] +**role** | **str** | Trade role. Available values are `taker` and `maker`. | [optional] +**text** | **str** | User defined information. | [optional] +**fee** | **str** | Fee deducted. | [optional] +**point_fee** | **str** | Points used to deduct fee. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MyFuturesTradeTimeRange.md b/docs/MyFuturesTradeTimeRange.md index 14c8d62..a4fdb38 100644 --- a/docs/MyFuturesTradeTimeRange.md +++ b/docs/MyFuturesTradeTimeRange.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trade_id** | **str** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] -**contract** | **str** | Futures contract | [optional] -**order_id** | **str** | Order ID related | [optional] -**size** | **int** | Trading size | [optional] -**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] -**price** | **str** | Trading price | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] -**text** | **str** | User defined information | [optional] -**fee** | **str** | Fee deducted | [optional] -**point_fee** | **str** | Points used to deduct fee | [optional] +**trade_id** | **str** | Trade ID. | [optional] +**create_time** | **float** | Trading time. | [optional] +**contract** | **str** | Futures contract. | [optional] +**order_id** | **str** | Order ID related. | [optional] +**size** | **int** | Trading size. | [optional] +**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] +**price** | **str** | Trading price. | [optional] +**role** | **str** | Trade role. Available values are `taker` and `maker`. | [optional] +**text** | **str** | User defined information. | [optional] +**fee** | **str** | Fee deducted. | [optional] +**point_fee** | **str** | Points used to deduct fee. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OpenOrders.md b/docs/OpenOrders.md index 8c14eb2..985e3d6 100644 --- a/docs/OpenOrders.md +++ b/docs/OpenOrders.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] +**currency_pair** | **str** | Currency pair. | [optional] **total** | **int** | The total number of pending orders for this trading pair on the current page | [optional] **orders** | [**list[Order]**](Order.md) | | [optional] diff --git a/docs/OptionsAccount.md b/docs/OptionsAccount.md index b5e08dc..6c830c2 100644 --- a/docs/OptionsAccount.md +++ b/docs/OptionsAccount.md @@ -3,24 +3,24 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | **int** | User ID | [optional] -**total** | **str** | Account balance | [optional] +**user** | **int** | User ID. | [optional] +**total** | **str** | Account balance. | [optional] **position_value** | **str** | Position value, long position value is positive, short position value is negative | [optional] -**equity** | **str** | Account equity, the sum of account balance and position value | [optional] -**short_enabled** | **bool** | If the account is allowed to short | [optional] -**mmp_enabled** | **bool** | Whether to enable MMP | [optional] -**liq_triggered** | **bool** | Whether to trigger position liquidation | [optional] +**equity** | **str** | Account equity, the sum of account balance and position value. | [optional] +**short_enabled** | **bool** | If the account is allowed to short. | [optional] +**mmp_enabled** | **bool** | Whether to enable MMP. | [optional] +**liq_triggered** | **bool** | Whether to trigger position liquidation. | [optional] **margin_mode** | **int** | | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 | [optional] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] -**init_margin** | **str** | Initial position margin | [optional] -**maint_margin** | **str** | Position maintenance margin | [optional] -**order_margin** | **str** | Order margin of unfinished orders | [optional] -**ask_order_margin** | **str** | Margin for outstanding sell orders | [optional] -**bid_order_margin** | **str** | Margin for outstanding buy orders | [optional] -**available** | **str** | Available balance to transfer out or trade | [optional] -**point** | **str** | POINT amount | [optional] -**currency** | **str** | Settle currency | [optional] -**orders_limit** | **int** | Maximum number of outstanding orders | [optional] +**unrealised_pnl** | **str** | Unrealized PNL. | [optional] +**init_margin** | **str** | Initial position margin. | [optional] +**maint_margin** | **str** | Position maintenance margin. | [optional] +**order_margin** | **str** | Order margin of unfinished orders. | [optional] +**ask_order_margin** | **str** | Margin for outstanding sell orders. | [optional] +**bid_order_margin** | **str** | Margin for outstanding buy orders. | [optional] +**available** | **str** | Available balance to transfer out or trade. | [optional] +**point** | **str** | POINT amount. | [optional] +**currency** | **str** | Settle currency. | [optional] +**orders_limit** | **int** | Maximum number of outstanding orders. | [optional] **position_notional_limit** | **int** | Notional value upper limit, including the nominal value of positions and outstanding orders | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsAccountBook.md b/docs/OptionsAccountBook.md index 2b4a4a5..4e9ac46 100644 --- a/docs/OptionsAccountBook.md +++ b/docs/OptionsAccountBook.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Change time | [optional] -**change** | **str** | Amount changed (USDT) | [optional] -**balance** | **str** | Account total balance after change (USDT) | [optional] -**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] -**text** | **str** | custom text | [optional] +**time** | **float** | Change time. | [optional] +**change** | **str** | Amount changed (USDT). | [optional] +**balance** | **str** | Account total balance after change (USDT). | [optional] +**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] +**text** | **str** | custom text. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md index db16785..543bd2a 100644 --- a/docs/OptionsApi.md +++ b/docs/OptionsApi.md @@ -4,32 +4,32 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings -[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times -[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time -[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail -[**list_options_settlements**](OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history -[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement -[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements -[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book -[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts -[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker -[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks -[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying -[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history -[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account -[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history -[**list_options_positions**](OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying -[**get_options_position**](OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position -[**list_options_position_close**](OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying -[**list_options_orders**](OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders -[**create_options_order**](OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order -[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched -[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order -[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order -[**countdown_cancel_all_options**](OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders -[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history -[**get_options_mmp**](OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query +[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings. +[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times. +[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time. +[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail. +[**list_options_settlements**](OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history. +[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement. +[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements. +[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book. +[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts. +[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker. +[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks. +[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying. +[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history. +[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account. +[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history. +[**list_options_positions**](OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying. +[**get_options_position**](OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position. +[**list_options_position_close**](OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying. +[**list_options_orders**](OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders. +[**create_options_order**](OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order. +[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched. +[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order. +[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order. +[**countdown_cancel_all_options**](OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders. +[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history. +[**get_options_mmp**](OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query. [**set_options_mmp**](OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings [**reset_options_mmp**](OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset @@ -37,7 +37,7 @@ Method | HTTP request | Description # **list_options_underlyings** > list[OptionsUnderlying] list_options_underlyings() -List all underlyings +List all underlyings. ### Example @@ -56,7 +56,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OptionsApi(api_client) try: - # List all underlyings + # List all underlyings. api_response = api_instance.list_options_underlyings() print(api_response) except GateApiException as ex: @@ -84,14 +84,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_expirations** > list[int] list_options_expirations(underlying) -List all expiration times +List all expiration times. ### Example @@ -108,10 +108,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). try: - # List all expiration times + # List all expiration times. api_response = api_instance.list_options_expirations(underlying) print(api_response) except GateApiException as ex: @@ -124,7 +124,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | ### Return type @@ -142,14 +142,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List expiration times of specified underlying | - | +**200** | List expiration times of specified underlying. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_contracts** > list[OptionsContract] list_options_contracts(underlying, expiration=expiration) -List all the contracts with specified underlying and expiration time +List all the contracts with specified underlying and expiration time. ### Example @@ -166,11 +166,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -expiration = 1636588800 # int | Unix timestamp of the expiration time (optional) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +expiration = 1636588800 # int | Unix timestamp of the expiration time. (optional) try: - # List all the contracts with specified underlying and expiration time + # List all the contracts with specified underlying and expiration time. api_response = api_instance.list_options_contracts(underlying, expiration=expiration) print(api_response) except GateApiException as ex: @@ -183,8 +183,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **expiration** | **int**| Unix timestamp of the expiration time | [optional] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **expiration** | **int**| Unix timestamp of the expiration time. | [optional] ### Return type @@ -202,14 +202,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_contract** > OptionsContract get_options_contract(contract) -Query specified contract detail +Query specified contract detail. ### Example @@ -229,7 +229,7 @@ api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20211130-65000-C' # str | try: - # Query specified contract detail + # Query specified contract detail. api_response = api_instance.get_options_contract(contract) print(api_response) except GateApiException as ex: @@ -260,14 +260,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_settlements** > list[OptionsSettlement] list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) -List settlement history +List settlement history. ### Example @@ -284,14 +284,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List settlement history + # List settlement history. api_response = api_instance.list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -304,9 +304,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -326,14 +326,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_settlement** > OptionsSettlement get_options_settlement(contract, underlying, at) -Get specified contract's settlement +Get specified contract's settlement. ### Example @@ -351,11 +351,11 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20211130-65000-C' # str | -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). at = 56 # int | try: - # Get specified contract's settlement + # Get specified contract's settlement. api_response = api_instance.get_options_settlement(contract, underlying, at) print(api_response) except GateApiException as ex: @@ -369,7 +369,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contract** | **str**| | - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | **at** | **int**| | ### Return type @@ -388,14 +388,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_my_options_settlements** > list[OptionsMySettlements] list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) -List my options settlements +List my options settlements. ### Example @@ -421,15 +421,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List my options settlements + # List my options settlements. api_response = api_instance.list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -442,10 +442,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **contract** | **str**| Options contract name | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **contract** | **str**| Options contract name. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -465,16 +465,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_order_book** > FuturesOrderBook list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) -Options order book +Options order book. -Bids will be sorted by price from high to low, while asks sorted reversely +Bids will be sorted by price from high to low, while asks sorted reversely. ### Example @@ -491,13 +491,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) try: - # Options order book + # Options order book. api_response = api_instance.list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -510,9 +510,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] + **contract** | **str**| Options contract name. | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] ### Return type @@ -531,14 +531,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Depth query successful | - | +**200** | Depth query successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_tickers** > list[OptionsTicker] list_options_tickers(underlying) -List tickers of options contracts +List tickers of options contracts. ### Example @@ -555,10 +555,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). try: - # List tickers of options contracts + # List tickers of options contracts. api_response = api_instance.list_options_tickers(underlying) print(api_response) except GateApiException as ex: @@ -571,7 +571,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | ### Return type @@ -589,14 +589,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_underlying_tickers** > OptionsUnderlyingTicker list_options_underlying_tickers(underlying) -Get underlying ticker +Get underlying ticker. ### Example @@ -613,10 +613,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying +underlying = 'BTC_USDT' # str | Underlying. try: - # Get underlying ticker + # Get underlying ticker. api_response = api_instance.list_options_underlying_tickers(underlying) print(api_response) except GateApiException as ex: @@ -629,7 +629,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying | + **underlying** | **str**| Underlying. | ### Return type @@ -647,14 +647,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_candlesticks** > list[OptionsCandlestick] list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) -Get options candlesticks +Get options candlesticks. ### Example @@ -671,14 +671,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -interval = '5m' # str | Interval time between data points (optional) (default to '5m') +interval = '5m' # str | Interval time between data points. (optional) (default to '5m') try: - # Get options candlesticks + # Get options candlesticks. api_response = api_instance.list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) print(api_response) except GateApiException as ex: @@ -691,11 +691,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **contract** | **str**| Options contract name. | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **interval** | **str**| Interval time between data points | [optional] [default to '5m'] + **interval** | **str**| Interval time between data points. | [optional] [default to '5m'] ### Return type @@ -713,14 +713,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_underlying_candlesticks** > list[FuturesCandlestick] list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) -Mark price candlesticks of an underlying +Mark price candlesticks of an underlying. ### Example @@ -737,14 +737,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -interval = '5m' # str | Interval time between data points (optional) (default to '5m') +interval = '5m' # str | Interval time between data points. (optional) (default to '5m') try: - # Mark price candlesticks of an underlying + # Mark price candlesticks of an underlying. api_response = api_instance.list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) print(api_response) except GateApiException as ex: @@ -757,11 +757,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **interval** | **str**| Interval time between data points | [optional] [default to '5m'] + **interval** | **str**| Interval time between data points. | [optional] [default to '5m'] ### Return type @@ -779,14 +779,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_trades** > list[FuturesTrade] list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) -Options trade history +Options trade history. ### Example @@ -803,15 +803,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -type = '1546935600' # str | `C` is call, while `P` is put (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) +type = '1546935600' # str | `C` is call, while `P` is put. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # Options trade history + # Options trade history. api_response = api_instance.list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -824,10 +824,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | [optional] - **type** | **str**| `C` is call, while `P` is put | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **contract** | **str**| Options contract name. | [optional] + **type** | **str**| `C` is call, while `P` is put. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -847,14 +847,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_account** > OptionsAccount list_options_account() -List options account +List options account. ### Example @@ -882,7 +882,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OptionsApi(api_client) try: - # List options account + # List options account. api_response = api_instance.list_options_account() print(api_response) except GateApiException as ex: @@ -910,14 +910,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_account_book** > list[OptionsAccountBook] list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) -List account changing history +List account changing history. ### Example @@ -943,14 +943,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL (optional) try: - # List account changing history + # List account changing history. api_response = api_instance.list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -963,8 +963,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL | [optional] @@ -985,14 +985,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_positions** > list[OptionsPosition] list_options_positions(underlying=underlying) -List user's positions of specified underlying +List user's positions of specified underlying. ### Example @@ -1018,10 +1018,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (optional) +underlying = 'BTC_USDT' # str | Underlying. (optional) try: - # List user's positions of specified underlying + # List user's positions of specified underlying. api_response = api_instance.list_options_positions(underlying=underlying) print(api_response) except GateApiException as ex: @@ -1034,7 +1034,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying | [optional] + **underlying** | **str**| Underlying. | [optional] ### Return type @@ -1052,14 +1052,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_position** > OptionsPosition get_options_position(contract) -Get specified contract position +Get specified contract position. ### Example @@ -1088,7 +1088,7 @@ api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20211130-65000-C' # str | try: - # Get specified contract position + # Get specified contract position. api_response = api_instance.get_options_position(contract) print(api_response) except GateApiException as ex: @@ -1119,14 +1119,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_position_close** > list[OptionsPositionClose] list_options_position_close(underlying, contract=contract) -List user's liquidation history of specified underlying +List user's liquidation history of specified underlying. ### Example @@ -1152,11 +1152,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) try: - # List user's liquidation history of specified underlying + # List user's liquidation history of specified underlying. api_response = api_instance.list_options_position_close(underlying, contract=contract) print(api_response) except GateApiException as ex: @@ -1169,8 +1169,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **contract** | **str**| Options contract name | [optional] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **contract** | **str**| Options contract name. | [optional] ### Return type @@ -1188,14 +1188,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_orders** > list[OptionsOrder] list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) -List options orders +List options orders. ### Example @@ -1221,16 +1221,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -status = 'open' # str | Only list the orders with this status -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -underlying = 'BTC_USDT' # str | Underlying (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +status = 'open' # str | Only list the orders with this status. +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) +underlying = 'BTC_USDT' # str | Underlying. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List options orders + # List options orders. api_response = api_instance.list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -1243,11 +1243,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| Only list the orders with this status | - **contract** | **str**| Options contract name | [optional] - **underlying** | **str**| Underlying | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **status** | **str**| Only list the orders with this status. | + **contract** | **str**| Options contract name. | [optional] + **underlying** | **str**| Underlying. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -1267,14 +1267,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_options_order** > OptionsOrder create_options_order(options_order) -Create an options order +Create an options order. ### Example @@ -1303,7 +1303,7 @@ api_instance = gate_api.OptionsApi(api_client) options_order = gate_api.OptionsOrder() # OptionsOrder | try: - # Create an options order + # Create an options order. api_response = api_instance.create_options_order(options_order) print(api_response) except GateApiException as ex: @@ -1334,14 +1334,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order detail | - | +**201** | Order detail. | - | [[Back to top]](#) [[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_options_orders** > list[OptionsOrder] cancel_options_orders(contract=contract, underlying=underlying, side=side) -Cancel all `open` orders matched +Cancel all `open` orders matched. ### Example @@ -1367,12 +1367,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -underlying = 'BTC_USDT' # str | Underlying (optional) -side = 'ask' # str | All bids or asks. Both included if not specified (optional) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) +underlying = 'BTC_USDT' # str | Underlying. (optional) +side = 'ask' # str | All bids or asks. Both included if not specified. (optional) try: - # Cancel all `open` orders matched + # Cancel all `open` orders matched. api_response = api_instance.cancel_options_orders(contract=contract, underlying=underlying, side=side) print(api_response) except GateApiException as ex: @@ -1385,9 +1385,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name | [optional] - **underlying** | **str**| Underlying | [optional] - **side** | **str**| All bids or asks. Both included if not specified | [optional] + **contract** | **str**| Options contract name. | [optional] + **underlying** | **str**| Underlying. | [optional] + **side** | **str**| All bids or asks. Both included if not specified. | [optional] ### Return type @@ -1405,14 +1405,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All orders matched cancelled | - | +**200** | All orders matched 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) # **get_options_order** > OptionsOrder get_options_order(order_id) -Get a single order +Get a single order. ### Example @@ -1438,10 +1438,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -order_id = 12345 # int | Order ID returned on successful order creation +order_id = 12345 # int | Order ID returned on successful order creation. try: - # Get a single order + # Get a single order. api_response = api_instance.get_options_order(order_id) print(api_response) except GateApiException as ex: @@ -1454,7 +1454,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation | + **order_id** | **int**| Order ID returned on successful order creation. | ### Return type @@ -1472,14 +1472,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order detail | - | +**200** | Order detail. | - | [[Back to top]](#) [[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_options_order** > OptionsOrder cancel_options_order(order_id) -Cancel a single order +Cancel a single order. ### Example @@ -1505,10 +1505,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -order_id = 12345 # int | Order ID returned on successful order creation +order_id = 12345 # int | Order ID returned on successful order creation. try: - # Cancel a single order + # Cancel a single order. api_response = api_instance.cancel_options_order(order_id) print(api_response) except GateApiException as ex: @@ -1521,7 +1521,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation | + **order_id** | **int**| Order ID returned on successful order creation. | ### Return type @@ -1539,16 +1539,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order detail | - | +**200** | Order detail. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **countdown_cancel_all_options** > TriggerTime countdown_cancel_all_options(countdown_cancel_all_options_task) -Countdown cancel orders +Countdown cancel orders. -Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. +Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. ### Example @@ -1577,7 +1577,7 @@ api_instance = gate_api.OptionsApi(api_client) countdown_cancel_all_options_task = gate_api.CountdownCancelAllOptionsTask() # CountdownCancelAllOptionsTask | try: - # Countdown cancel orders + # Countdown cancel orders. api_response = api_instance.countdown_cancel_all_options(countdown_cancel_all_options_task) print(api_response) except GateApiException as ex: @@ -1608,14 +1608,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Set countdown successfully | - | +**200** | Set countdown successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_my_options_trades** > list[OptionsMyTrade] list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) -List personal trading history +List personal trading history. ### Example @@ -1641,15 +1641,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List personal trading history + # List personal trading history. api_response = api_instance.list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -1662,10 +1662,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | - **contract** | **str**| Options contract name | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **contract** | **str**| Options contract name. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -1685,14 +1685,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_mmp** > list[OptionsMMP] get_options_mmp(underlying=underlying) -MMP Query +MMP Query. ### Example @@ -1718,10 +1718,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (optional) +underlying = 'BTC_USDT' # str | Underlying. (optional) try: - # MMP Query + # MMP Query. api_response = api_instance.get_options_mmp(underlying=underlying) print(api_response) except GateApiException as ex: @@ -1734,7 +1734,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying | [optional] + **underlying** | **str**| Underlying. | [optional] ### Return type @@ -1752,7 +1752,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1819,7 +1819,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | MMP Information | - | +**200** | MMP Information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1886,7 +1886,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | MMP Information | - | +**200** | MMP Information. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/OptionsCandlestick.md b/docs/OptionsCandlestick.md index 963ccda..3b0d385 100644 --- a/docs/OptionsCandlestick.md +++ b/docs/OptionsCandlestick.md @@ -1,15 +1,15 @@ # OptionsCandlestick -data point in every timestamp +data point in every timestamp. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] -**c** | **str** | Close price (quote currency, unit: underlying corresponding option price) | [optional] +**t** | **float** | Unix timestamp in seconds. | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed. | [optional] +**c** | **str** | Close price (quote currency, unit: underlying corresponding option price). | [optional] **h** | **str** | Highest price (quote currency, unit: underlying corresponding option price) | [optional] -**l** | **str** | Lowest price (quote currency, unit: underlying corresponding option price) | [optional] -**o** | **str** | Open price (quote currency, unit: underlying corresponding option price) | [optional] +**l** | **str** | Lowest price (quote currency, unit: underlying corresponding option price). | [optional] +**o** | **str** | Open price (quote currency, unit: underlying corresponding option 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/OptionsContract.md b/docs/OptionsContract.md index ee11273..42dcd06 100644 --- a/docs/OptionsContract.md +++ b/docs/OptionsContract.md @@ -1,34 +1,34 @@ # OptionsContract -Options contract detail +Options contract detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Options contract name | [optional] -**tag** | **str** | tag | [optional] -**create_time** | **float** | Creation time | [optional] -**expiration_time** | **float** | Expiration time | [optional] -**is_call** | **bool** | `true` means call options, while `false` is put options | [optional] -**multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] -**underlying** | **str** | Underlying | [optional] -**underlying_price** | **str** | Underlying price (quote currency) | [optional] -**last_price** | **str** | Last trading price | [optional] -**mark_price** | **str** | Current mark price (quote currency) | [optional] -**index_price** | **str** | Current index price (quote currency) | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional] -**taker_fee_rate** | **str** | Taker fee rate | [optional] -**order_price_round** | **str** | Minimum order price increment | [optional] -**mark_price_round** | **str** | Minimum mark price increment | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed | [optional] -**order_price_deviate** | **str** | The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate | [optional] -**orderbook_id** | **int** | Current orderbook ID | [optional] -**trade_id** | **int** | Current trade ID | [optional] -**trade_size** | **int** | Historical accumulated trade size | [optional] -**position_size** | **int** | Current total long position size | [optional] -**orders_limit** | **int** | Maximum number of open orders | [optional] +**name** | **str** | Options contract name. | [optional] +**tag** | **str** | tag. | [optional] +**create_time** | **float** | Creation time. | [optional] +**expiration_time** | **float** | Expiration time. | [optional] +**is_call** | **bool** | `true` means call options, while `false` is put options. | [optional] +**multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency. | [optional] +**underlying** | **str** | Underlying. | [optional] +**underlying_price** | **str** | Underlying price (quote currency). | [optional] +**last_price** | **str** | Last trading price. | [optional] +**mark_price** | **str** | Current mark price (quote currency). | [optional] +**index_price** | **str** | Current index price (quote currency). | [optional] +**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate. | [optional] +**taker_fee_rate** | **str** | Taker fee rate. | [optional] +**order_price_round** | **str** | Minimum order price increment. | [optional] +**mark_price_round** | **str** | Minimum mark price increment. | [optional] +**order_size_min** | **int** | Minimum order size the contract allowed. | [optional] +**order_size_max** | **int** | Maximum order size the contract allowed. | [optional] +**order_price_deviate** | **str** | The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders | [optional] +**ref_discount_rate** | **str** | Referral fee rate discount. | [optional] +**ref_rebate_rate** | **str** | Referrer commission rate. | [optional] +**orderbook_id** | **int** | Current orderbook ID. | [optional] +**trade_id** | **int** | Current trade ID. | [optional] +**trade_size** | **int** | Historical accumulated trade size. | [optional] +**position_size** | **int** | Current total long position size. | [optional] +**orders_limit** | **int** | Maximum number of open orders. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMMP.md b/docs/OptionsMMP.md index 9b9cf63..0a24089 100644 --- a/docs/OptionsMMP.md +++ b/docs/OptionsMMP.md @@ -4,12 +4,12 @@ MMP Settings ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**underlying** | **str** | Underlying | -**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | +**underlying** | **str** | Underlying. | +**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP. | **frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | -**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | -**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | -**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] +**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places). | +**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places). | +**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered. | [optional] [readonly] **frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMMPReset.md b/docs/OptionsMMPReset.md index 28f91f9..4e26ae9 100644 --- a/docs/OptionsMMPReset.md +++ b/docs/OptionsMMPReset.md @@ -4,12 +4,12 @@ MMP Reset ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**underlying** | **str** | Underlying | -**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | [optional] [readonly] +**underlying** | **str** | Underlying. | +**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP. | [optional] [readonly] **frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | [optional] [readonly] -**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | [optional] [readonly] -**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | [optional] [readonly] -**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] +**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places). | [optional] [readonly] +**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places). | [optional] [readonly] +**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered. | [optional] [readonly] **frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMySettlements.md b/docs/OptionsMySettlements.md index fc2ef9d..004e0ac 100644 --- a/docs/OptionsMySettlements.md +++ b/docs/OptionsMySettlements.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Settlement time | [optional] -**underlying** | **str** | Underlying | [optional] -**contract** | **str** | Options contract name | [optional] -**strike_price** | **str** | Strike price (quote currency) | [optional] -**settle_price** | **str** | Settlement price (quote currency) | [optional] -**size** | **int** | Size | [optional] -**settle_profit** | **str** | Settlement profit (quote currency) | [optional] -**fee** | **str** | Fee (quote currency) | [optional] +**time** | **float** | Settlement time. | [optional] +**underlying** | **str** | Underlying. | [optional] +**contract** | **str** | Options contract name. | [optional] +**strike_price** | **str** | Strike price (quote currency). | [optional] +**settle_price** | **str** | Settlement price (quote currency). | [optional] +**size** | **int** | Size. | [optional] +**settle_profit** | **str** | Settlement profit (quote currency). | [optional] +**fee** | **str** | Fee (quote currency). | [optional] **realised_pnl** | **str** | The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMyTrade.md b/docs/OptionsMyTrade.md index 44eb069..d072076 100644 --- a/docs/OptionsMyTrade.md +++ b/docs/OptionsMyTrade.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Trade ID | [optional] -**create_time** | **float** | Trading time | [optional] -**contract** | **str** | Options contract name | [optional] -**order_id** | **int** | Order ID related | [optional] -**size** | **int** | Trading size | [optional] -**price** | **str** | Trading price (quote currency) | [optional] -**underlying_price** | **str** | Underlying price (quote currency) | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker` | [optional] +**id** | **int** | Trade ID. | [optional] +**create_time** | **float** | Trading time. | [optional] +**contract** | **str** | Options contract name. | [optional] +**order_id** | **int** | Order ID related. | [optional] +**size** | **int** | Trading size. | [optional] +**price** | **str** | Trading price (quote currency). | [optional] +**underlying_price** | **str** | Underlying price (quote currency). | [optional] +**role** | **str** | Trade role. Available values are `taker` and `maker`. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsOrder.md b/docs/OptionsOrder.md index 7c2bdef..d6a2c18 100644 --- a/docs/OptionsOrder.md +++ b/docs/OptionsOrder.md @@ -1,34 +1,34 @@ # OptionsOrder -Options order detail +Options order detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Options order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**create_time** | **float** | Creation time of order | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] -**finish_as** | **str** | Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled | [optional] [readonly] +**id** | **int** | Options order ID. | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**create_time** | **float** | Creation time of order. | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open. | [optional] [readonly] +**finish_as** | **str** | Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled | [optional] [readonly] **status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Contract name | +**contract** | **str** | Contract name. | **size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | **iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` (USDT) | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] -**is_close** | **bool** | Is the order to close position | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] -**mmp** | **bool** | When set to true, delegate to MMP | [optional] [default to False] +**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` (USDT). | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0. | [optional] [default to False] +**is_close** | **bool** | Is the order to close position. | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order. | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation. | [optional] [readonly] +**mmp** | **bool** | When set to true, delegate to MMP. | [optional] [default to False] **is_mmp** | **bool** | Whether it is MMP delegation. Corresponds to `mmp` in the request. | [optional] [readonly] **tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded | [optional] [readonly] -**fill_price** | **str** | Fill price of the order | [optional] [readonly] +**left** | **int** | Size left to be traded. | [optional] [readonly] +**fill_price** | **str** | Fill price of the order. | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] -**tkfr** | **str** | Taker fee | [optional] [readonly] -**mkfr** | **str** | Maker fee | [optional] [readonly] -**refu** | **int** | Reference user ID | [optional] [readonly] -**refr** | **str** | Referrer rebate | [optional] [readonly] +**tkfr** | **str** | Taker fee. | [optional] [readonly] +**mkfr** | **str** | Maker fee. | [optional] [readonly] +**refu** | **int** | Reference user ID. | [optional] [readonly] +**refr** | **str** | Referrer rebate. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsPosition.md b/docs/OptionsPosition.md index 282039d..ca2b9e8 100644 --- a/docs/OptionsPosition.md +++ b/docs/OptionsPosition.md @@ -1,25 +1,25 @@ # OptionsPosition -Options position information +Options position information. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | **int** | User ID | [optional] [readonly] -**underlying** | **str** | Underlying | [optional] [readonly] -**underlying_price** | **str** | Underlying price (quote currency) | [optional] [readonly] -**contract** | **str** | Options contract name | [optional] [readonly] -**size** | **int** | Position size (contract size) | [optional] [readonly] -**entry_price** | **str** | Entry size (quote currency) | [optional] [readonly] -**mark_price** | **str** | Current mark price (quote currency) | [optional] [readonly] -**mark_iv** | **str** | Implied volatility | [optional] [readonly] -**realised_pnl** | **str** | Realized PNL | [optional] [readonly] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] -**pending_orders** | **int** | Current open orders | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**underlying** | **str** | Underlying. | [optional] [readonly] +**underlying_price** | **str** | Underlying price (quote currency). | [optional] [readonly] +**contract** | **str** | Options contract name. | [optional] [readonly] +**size** | **int** | Position size (contract size). | [optional] [readonly] +**entry_price** | **str** | Entry size (quote currency). | [optional] [readonly] +**mark_price** | **str** | Current mark price (quote currency). | [optional] [readonly] +**mark_iv** | **str** | Implied volatility. | [optional] [readonly] +**realised_pnl** | **str** | Realized PNL. | [optional] [readonly] +**unrealised_pnl** | **str** | Unrealized PNL. | [optional] [readonly] +**pending_orders** | **int** | Current open orders. | [optional] [readonly] **close_order** | [**OptionsPositionCloseOrder**](OptionsPositionCloseOrder.md) | | [optional] -**delta** | **str** | Delta | [optional] [readonly] -**gamma** | **str** | Gamma | [optional] [readonly] -**vega** | **str** | Vega | [optional] [readonly] -**theta** | **str** | Theta | [optional] [readonly] +**delta** | **str** | Delta. | [optional] [readonly] +**gamma** | **str** | Gamma. | [optional] [readonly] +**vega** | **str** | Vega. | [optional] [readonly] +**theta** | **str** | Theta. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsPositionClose.md b/docs/OptionsPositionClose.md index bf5479d..66fed5b 100644 --- a/docs/OptionsPositionClose.md +++ b/docs/OptionsPositionClose.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Position close time | [optional] [readonly] -**contract** | **str** | Options contract name | [optional] [readonly] -**side** | **str** | Position side, long or short | [optional] [readonly] -**pnl** | **str** | PNL | [optional] [readonly] -**text** | **str** | Text of close order | [optional] [readonly] -**settle_size** | **str** | settlement size | [optional] [readonly] +**time** | **float** | Position close time. | [optional] [readonly] +**contract** | **str** | Options contract name. | [optional] [readonly] +**side** | **str** | Position side, long or short. | [optional] [readonly] +**pnl** | **str** | PNL. | [optional] [readonly] +**text** | **str** | Text of close order. | [optional] [readonly] +**settle_size** | **str** | settlement size. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsPositionCloseOrder.md b/docs/OptionsPositionCloseOrder.md index 53044b1..8701bc4 100644 --- a/docs/OptionsPositionCloseOrder.md +++ b/docs/OptionsPositionCloseOrder.md @@ -1,12 +1,12 @@ # OptionsPositionCloseOrder -Current close order if any, or `null` +Current close order if any, or `null`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Close order ID | [optional] -**price** | **str** | Close order price (quote currency) | [optional] -**is_liq** | **bool** | Is the close order from liquidation | [optional] +**id** | **int** | Close order ID. | [optional] +**price** | **str** | Close order price (quote currency). | [optional] +**is_liq** | **bool** | Is the close order from liquidation. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsSettlement.md b/docs/OptionsSettlement.md index 6e5b8b6..6a1bddf 100644 --- a/docs/OptionsSettlement.md +++ b/docs/OptionsSettlement.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Last changed time of configuration | [optional] -**contract** | **str** | Options contract name | [optional] -**profit** | **str** | Settlement profit per size (quote currency) | [optional] -**fee** | **str** | Settlement fee per size (quote currency) | [optional] -**strike_price** | **str** | Strike price (quote currency) | [optional] -**settle_price** | **str** | Settlement price (quote currency) | [optional] +**time** | **float** | Last changed time of configuration. | [optional] +**contract** | **str** | Options contract name. | [optional] +**profit** | **str** | Settlement profit per size (quote currency). | [optional] +**fee** | **str** | Settlement fee per size (quote currency). | [optional] +**strike_price** | **str** | Strike price (quote currency). | [optional] +**settle_price** | **str** | Settlement price (quote currency). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsTicker.md b/docs/OptionsTicker.md index 43b4b46..e7426c4 100644 --- a/docs/OptionsTicker.md +++ b/docs/OptionsTicker.md @@ -1,27 +1,27 @@ # OptionsTicker -Options contract detail +Options contract detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Options contract name | [optional] -**last_price** | **str** | Last trading price (quote currency) | [optional] -**mark_price** | **str** | Current mark price (quote currency) | [optional] -**index_price** | **str** | Current index price (quote currency) | [optional] -**ask1_size** | **int** | Best ask size | [optional] -**ask1_price** | **str** | Best ask price | [optional] -**bid1_size** | **int** | Best bid size | [optional] -**bid1_price** | **str** | Best bid price | [optional] -**position_size** | **int** | Current total long position size | [optional] -**mark_iv** | **str** | Implied volatility | [optional] -**bid_iv** | **str** | Bid side implied volatility | [optional] -**ask_iv** | **str** | Ask side implied volatility | [optional] -**leverage** | **str** | Current leverage. Formula: underlying_price / mark_price * delta | [optional] -**delta** | **str** | Delta | [optional] -**gamma** | **str** | Gamma | [optional] -**vega** | **str** | Vega | [optional] -**theta** | **str** | Theta | [optional] -**rho** | **str** | Rho | [optional] +**name** | **str** | Options contract name. | [optional] +**last_price** | **str** | Last trading price (quote currency). | [optional] +**mark_price** | **str** | Current mark price (quote currency). | [optional] +**index_price** | **str** | Current index price (quote currency). | [optional] +**ask1_size** | **int** | Best ask size. | [optional] +**ask1_price** | **str** | Best ask price. | [optional] +**bid1_size** | **int** | Best bid size. | [optional] +**bid1_price** | **str** | Best bid price. | [optional] +**position_size** | **int** | Current total long position size. | [optional] +**mark_iv** | **str** | Implied volatility. | [optional] +**bid_iv** | **str** | Bid side implied volatility. | [optional] +**ask_iv** | **str** | Ask side implied volatility. | [optional] +**leverage** | **str** | Current leverage. Formula: underlying_price / mark_price * delta. | [optional] +**delta** | **str** | Delta. | [optional] +**gamma** | **str** | Gamma. | [optional] +**vega** | **str** | Vega. | [optional] +**theta** | **str** | Theta. | [optional] +**rho** | **str** | Rho. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsUnderlying.md b/docs/OptionsUnderlying.md index 30897a6..4a1de9e 100644 --- a/docs/OptionsUnderlying.md +++ b/docs/OptionsUnderlying.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Underlying name | [optional] -**index_price** | **str** | Spot index price (quote currency) | [optional] +**name** | **str** | Underlying name. | [optional] +**index_price** | **str** | Spot index price (quote currency). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsUnderlyingTicker.md b/docs/OptionsUnderlyingTicker.md index 07be739..f86f6ad 100644 --- a/docs/OptionsUnderlyingTicker.md +++ b/docs/OptionsUnderlyingTicker.md @@ -1,12 +1,12 @@ # OptionsUnderlyingTicker -Options underlying detail +Options underlying detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trade_put** | **int** | Total put options trades amount in last 24h | [optional] -**trade_call** | **int** | Total call options trades amount in last 24h | [optional] -**index_price** | **str** | Index price (quote currency) | [optional] +**trade_put** | **int** | Total put options trades amount in last 24h. | [optional] +**trade_call** | **int** | Total call options trades amount in last 24h. | [optional] +**index_price** | **str** | Index price (quote currency). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Order.md b/docs/Order.md index f53fcfe..d88100b 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -1,44 +1,44 @@ # Order -Spot order details +Spot order details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] [readonly] +**id** | **str** | Order ID. | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] -**create_time** | **str** | Creation time of order | [optional] [readonly] -**update_time** | **str** | Last modification time of order | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] +**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] [readonly] +**create_time** | **str** | Creation time of order. | [optional] [readonly] +**update_time** | **str** | Last modification time of order. | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds). | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair | +**currency_pair** | **str** | Currency pair. | **type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Buy or sell order | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**price** | **str** | Price can't be empty when `type`= `limit` | [optional] +**side** | **str** | Buy or sell order. | +**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | +**price** | **str** | Price can't be empty when `type`= `limit`. | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] **auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] **auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price | [optional] [readonly] -**fee** | **str** | Fee deducted | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] -**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly] -**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] +**left** | **str** | Amount left to fill. | [optional] [readonly] +**filled_amount** | **str** | Amount traded to fill. | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total`. | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency. | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price. | [optional] [readonly] +**fee** | **str** | Fee deducted. | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit. | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee. | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee. | [optional] [readonly] +**gt_maker_fee** | **str** | GT used to deduct maker fee. | [optional] [readonly] +**gt_taker_fee** | **str** | GT used to deduct taker fee. | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee discount is used. | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee. | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit. | [optional] [readonly] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**finish_as** | **str** | Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown | [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** | Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown | [optional] [readonly] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderBook.md b/docs/OrderBook.md index 1cd4f55..6050a17 100644 --- a/docs/OrderBook.md +++ b/docs/OrderBook.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` | [optional] -**current** | **int** | The timestamp of the response data being generated (in milliseconds) | [optional] -**update** | **int** | The timestamp of when the orderbook last changed (in milliseconds) | [optional] -**asks** | **list[list[str]]** | Asks order depth | -**bids** | **list[list[str]]** | Bids order depth | +**current** | **int** | The timestamp of the response data being generated (in milliseconds). | [optional] +**update** | **int** | The timestamp of when the orderbook last changed (in milliseconds). | [optional] +**asks** | **list[list[str]]** | Asks order depth. | +**bids** | **list[list[str]]** | Bids order depth. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderCancel.md b/docs/OrderCancel.md index 32a0ea0..3a86e21 100644 --- a/docs/OrderCancel.md +++ b/docs/OrderCancel.md @@ -1,46 +1,46 @@ # OrderCancel -Spot order details +Spot order details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] [readonly] +**id** | **str** | Order ID. | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] -**succeeded** | **bool** | Whether the batch of orders succeeded | [optional] -**label** | **str** | Error label, if any, otherwise an empty string | [optional] -**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] -**create_time** | **str** | Creation time of order | [optional] [readonly] -**update_time** | **str** | Last modification time of order | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] +**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] [readonly] +**succeeded** | **bool** | Whether the batch of orders succeeded. | [optional] +**label** | **str** | Error label, if any, otherwise an empty string. | [optional] +**message** | **str** | Detailed error message, if any, otherwise an empty string. | [optional] +**create_time** | **str** | Creation time of order. | [optional] [readonly] +**update_time** | **str** | Last modification time of order. | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds). | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair | +**currency_pair** | **str** | Currency pair. | **type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Buy or sell order | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**price** | **str** | Price can't be empty when `type`= `limit` | [optional] +**side** | **str** | Buy or sell order. | +**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | +**price** | **str** | Price can't be empty when `type`= `limit`. | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] **auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] **auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price | [optional] [readonly] -**fee** | **str** | Fee deducted | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] -**gt_maker_fee** | **str** | GT used to deduct maker fee | [optional] [readonly] -**gt_taker_fee** | **str** | GT used to deduct taker fee | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] +**left** | **str** | Amount left to fill. | [optional] [readonly] +**filled_amount** | **str** | Amount traded to fill. | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total`. | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency. | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price. | [optional] [readonly] +**fee** | **str** | Fee deducted. | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit. | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee. | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee. | [optional] [readonly] +**gt_maker_fee** | **str** | GT used to deduct maker fee. | [optional] [readonly] +**gt_taker_fee** | **str** | GT used to deduct taker fee. | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee discount is used. | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee. | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit. | [optional] [readonly] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] **finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] **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] diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md index bd6a486..26c176b 100644 --- a/docs/OrderPatch.md +++ b/docs/OrderPatch.md @@ -1,14 +1,14 @@ # OrderPatch -Spot order details +Spot order details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] +**currency_pair** | **str** | Currency pair. | [optional] **account** | **str** | Specify query account. | [optional] -**amount** | **str** | Trading Quantity. Either amountor pricemust be specified | [optional] -**price** | **str** | Trading Price. Either amountor pricemust be specified | [optional] -**amend_text** | **str** | Custom info during amending order | [optional] +**amount** | **str** | Trading Quantity. Either amountor pricemust be specified. | [optional] +**price** | **str** | Trading Price. Either amountor pricemust be specified. | [optional] +**amend_text** | **str** | Custom info during amending order. | [optional] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResp.md b/docs/OrderResp.md index c89354c..749f53e 100644 --- a/docs/OrderResp.md +++ b/docs/OrderResp.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] +**order_id** | **int** | Order ID. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerCommissionHistory.md b/docs/PartnerCommissionHistory.md index 06a4443..2a2f590 100644 --- a/docs/PartnerCommissionHistory.md +++ b/docs/PartnerCommissionHistory.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history | [optional] +**total** | **int** | Total. | [optional] +**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerSub.md b/docs/PartnerSub.md index bc191d9..e7a0989 100644 --- a/docs/PartnerSub.md +++ b/docs/PartnerSub.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**user_join_time** | **int** | The time when the user joined the system, in seconds Unix timestamp | [optional] -**type** | **int** | Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) | [optional] +**user_id** | **int** | User ID. | [optional] +**user_join_time** | **int** | The time when the user joined the system, in seconds Unix timestamp. | [optional] +**type** | **int** | Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerSubList.md b/docs/PartnerSubList.md index c77bc6f..37085a9 100644 --- a/docs/PartnerSubList.md +++ b/docs/PartnerSubList.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[PartnerSub]**](PartnerSub.md) | Subordinate list | [optional] +**total** | **int** | Total. | [optional] +**list** | [**list[PartnerSub]**](PartnerSub.md) | Subordinate list. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerTransactionHistory.md b/docs/PartnerTransactionHistory.md index 707f40b..7df8289 100644 --- a/docs/PartnerTransactionHistory.md +++ b/docs/PartnerTransactionHistory.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total | [optional] -**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] +**total** | **int** | Total. | [optional] +**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchUniLend.md b/docs/PatchUniLend.md index b622196..5aeda0f 100644 --- a/docs/PatchUniLend.md +++ b/docs/PatchUniLend.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**min_rate** | **str** | Minimum interest rate | [optional] +**currency** | **str** | Currency name. | [optional] +**min_rate** | **str** | Minimum interest rate. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlaceDualInvestmentOrder.md b/docs/PlaceDualInvestmentOrder.md index 716835c..78ac28d 100644 --- a/docs/PlaceDualInvestmentOrder.md +++ b/docs/PlaceDualInvestmentOrder.md @@ -1,11 +1,11 @@ # PlaceDualInvestmentOrder -Dual Investment order +Dual Investment order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**plan_id** | **str** | Plan ID | -**amount** | **str** | Subscription amount, mutually exclusive with the copies field | +**plan_id** | **str** | Plan ID. | +**amount** | **str** | Subscription amount, mutually exclusive with the copies field. | **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] [[Back to Model list]](../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 9b0ced5..36fcc5d 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -1,42 +1,42 @@ # Position -Futures position details +Futures position details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | **int** | User ID | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**size** | **int** | Position size | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**contract** | **str** | Futures contract. | [optional] [readonly] +**size** | **int** | Position size. | [optional] [readonly] **leverage** | **str** | Position leverage. 0 means cross margin; positive number means isolated margin | [optional] -**risk_limit** | **str** | Position risk limit | [optional] -**leverage_max** | **str** | Maximum leverage under current risk limit | [optional] [readonly] -**maintenance_rate** | **str** | Maintenance rate under current risk limit | [optional] [readonly] -**value** | **str** | Position value calculated in settlement currency | [optional] [readonly] -**margin** | **str** | Position margin | [optional] -**entry_price** | **str** | Entry price | [optional] [readonly] -**liq_price** | **str** | Liquidation price | [optional] [readonly] -**mark_price** | **str** | Current mark price | [optional] [readonly] +**risk_limit** | **str** | Position risk limit. | [optional] +**leverage_max** | **str** | Maximum leverage under current risk limit. | [optional] [readonly] +**maintenance_rate** | **str** | Maintenance rate under current risk limit. | [optional] [readonly] +**value** | **str** | Position value calculated in settlement currency. | [optional] [readonly] +**margin** | **str** | Position margin. | [optional] +**entry_price** | **str** | Entry price. | [optional] [readonly] +**liq_price** | **str** | Liquidation price. | [optional] [readonly] +**mark_price** | **str** | Current mark price. | [optional] [readonly] **initial_margin** | **str** | The initial margin occupied by the position, applicable to the portfolio margin account | [optional] [readonly] **maintenance_margin** | **str** | Maintenance margin required for the position, applicable to portfolio margin account | [optional] [readonly] -**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] -**realised_pnl** | **str** | Realized PNL | [optional] [readonly] -**pnl_pnl** | **str** | Realized PNL - Position P/L | [optional] [readonly] -**pnl_fund** | **str** | Realized PNL - Funding Fees | [optional] [readonly] -**pnl_fee** | **str** | Realized PNL - Transaction Fees | [optional] [readonly] -**history_pnl** | **str** | History realized PNL | [optional] [readonly] -**last_close_pnl** | **str** | PNL of last position close | [optional] [readonly] -**realised_point** | **str** | Realized POINT PNL | [optional] [readonly] -**history_point** | **str** | History realized POINT PNL | [optional] [readonly] +**unrealised_pnl** | **str** | Unrealized PNL. | [optional] [readonly] +**realised_pnl** | **str** | Realized PNL. | [optional] [readonly] +**pnl_pnl** | **str** | Realized PNL - Position P/L. | [optional] [readonly] +**pnl_fund** | **str** | Realized PNL - Funding Fees. | [optional] [readonly] +**pnl_fee** | **str** | Realized PNL - Transaction Fees. | [optional] [readonly] +**history_pnl** | **str** | History realized PNL. | [optional] [readonly] +**last_close_pnl** | **str** | PNL of last position close. | [optional] [readonly] +**realised_point** | **str** | Realized POINT PNL. | [optional] [readonly] +**history_point** | **str** | History realized POINT PNL. | [optional] [readonly] **adl_ranking** | **int** | Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation | [optional] [readonly] -**pending_orders** | **int** | Current open orders | [optional] [readonly] +**pending_orders** | **int** | Current open orders. | [optional] [readonly] **close_order** | [**PositionCloseOrder**](PositionCloseOrder.md) | | [optional] -**mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional] -**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0) | [optional] -**update_time** | **int** | Last update time | [optional] [readonly] +**mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: mode | [optional] +**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0). | [optional] +**update_time** | **int** | Last update time. | [optional] [readonly] **update_id** | **int** | Update id. Each time the position is updated, the value will be +1. | [optional] [readonly] -**open_time** | **int** | First Open Time | [optional] -**risk_limit_table** | **str** | Risk limit table ID | [optional] [readonly] -**average_maintenance_rate** | **str** | Average maintenance margin rate | [optional] [readonly] +**open_time** | **int** | First Open Time. | [optional] +**risk_limit_table** | **str** | Risk limit table ID. | [optional] [readonly] +**average_maintenance_rate** | **str** | Average maintenance margin rate. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PositionClose.md b/docs/PositionClose.md index 196b7b8..775029c 100644 --- a/docs/PositionClose.md +++ b/docs/PositionClose.md @@ -3,19 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Position close time | [optional] [readonly] -**contract** | **str** | Futures contract | [optional] [readonly] -**side** | **str** | Position side, long or short | [optional] [readonly] -**pnl** | **str** | PNL | [optional] [readonly] -**pnl_pnl** | **str** | PNL - Position P/L | [optional] [readonly] -**pnl_fund** | **str** | PNL - Funding Fees | [optional] [readonly] -**pnl_fee** | **str** | PNL - Transaction Fees | [optional] [readonly] -**text** | **str** | Text of close order | [optional] [readonly] -**max_size** | **str** | Max Trade Size | [optional] [readonly] -**accum_size** | **str** | Cumulative closed position volume | [optional] [readonly] -**first_open_time** | **int** | First Open Time | [optional] [readonly] -**long_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. | [optional] [readonly] -**short_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price | [optional] [readonly] +**time** | **float** | Position close time. | [optional] [readonly] +**contract** | **str** | Futures contract. | [optional] [readonly] +**side** | **str** | Position side, long or short. | [optional] [readonly] +**pnl** | **str** | PNL. | [optional] [readonly] +**pnl_pnl** | **str** | PNL - Position P/L. | [optional] [readonly] +**pnl_fund** | **str** | PNL - Funding Fees. | [optional] [readonly] +**pnl_fee** | **str** | PNL - Transaction Fees. | [optional] [readonly] +**text** | **str** | Text of close order. | [optional] [readonly] +**max_size** | **str** | Max Trade Size. | [optional] [readonly] +**accum_size** | **str** | Cumulative closed position volume. | [optional] [readonly] +**first_open_time** | **int** | First Open Time. | [optional] [readonly] +**long_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when closing average price. | [optional] [readonly] +**short_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when closing average price | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PositionCloseOrder.md b/docs/PositionCloseOrder.md index 6f5540d..6366d4f 100644 --- a/docs/PositionCloseOrder.md +++ b/docs/PositionCloseOrder.md @@ -1,12 +1,12 @@ # PositionCloseOrder -Current close order if any, or `null` +Current close order if any, or `null`. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Close order ID | [optional] -**price** | **str** | Close order price | [optional] -**is_liq** | **bool** | Is the close order from liquidation | [optional] +**id** | **int** | Close order ID. | [optional] +**price** | **str** | Close order price. | [optional] +**is_liq** | **bool** | Is the close order from liquidation. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProfitLossRange.md b/docs/ProfitLossRange.md index e48908d..f05d06d 100644 --- a/docs/ProfitLossRange.md +++ b/docs/ProfitLossRange.md @@ -1,12 +1,12 @@ # ProfitLossRange -Profit and loss range +Profit and loss range. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**price_percentage** | **str** | Percentage change in price | [optional] -**implied_volatility_percentage** | **str** | Percentage change in implied volatility | [optional] -**profit_loss** | **str** | PNL | [optional] +**price_percentage** | **str** | Percentage change in price. | [optional] +**implied_volatility_percentage** | **str** | Percentage change in implied volatility. | [optional] +**profit_loss** | **str** | PNL. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RebateApi.md b/docs/RebateApi.md index e75796c..8f98e45 100644 --- a/docs/RebateApi.md +++ b/docs/RebateApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user -[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user -[**partner_transaction_history**](RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users -[**partner_commissions_history**](RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users -[**partner_sub_list**](RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list -[**rebate_broker_commission_history**](RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records -[**rebate_broker_transaction_history**](RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history -[**rebate_user_info**](RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information -[**user_sub_relation**](RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship +[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user. +[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user. +[**partner_transaction_history**](RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users. +[**partner_commissions_history**](RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users. +[**partner_sub_list**](RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list. +[**rebate_broker_commission_history**](RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records. +[**rebate_broker_transaction_history**](RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history. +[**rebate_user_info**](RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information. +[**user_sub_relation**](RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship. # **agency_transaction_history** > list[AgencyTransactionHistory] agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -The agency obtains the transaction history of the recommended user +The agency obtains the transaction history of the recommended user. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -46,15 +46,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs. (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) +to = 1602123600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # The agency obtains the transaction history of the recommended user + # The agency obtains the transaction history of the recommended user. api_response = api_instance.agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -67,12 +67,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs. | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -90,16 +90,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **agency_commissions_history** > list[AgencyCommissionHistory] agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -The agency obtains the commission history of the recommended user +The agency obtains the commission history of the recommended user. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -125,15 +125,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) +to = 1602123600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # The agency obtains the commission history of the recommended user + # The agency obtains the commission history of the recommended user. api_response = api_instance.agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -146,12 +146,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -169,16 +169,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **partner_transaction_history** > PartnerTransactionHistory partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -Partner obtains transaction records of recommended users +Partner obtains transaction records of recommended users. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -204,15 +204,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs. (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) +to = 1602123600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # Partner obtains transaction records of recommended users + # Partner obtains transaction records of recommended users. api_response = api_instance.partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -225,12 +225,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs. | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -248,16 +248,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **partner_commissions_history** > PartnerCommissionHistory partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -Partner obtains commission records of recommended users +Partner obtains commission records of recommended users. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -283,15 +283,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) +to = 1602123600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # Partner obtains commission records of recommended users + # Partner obtains commission records of recommended users. api_response = api_instance.partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -304,12 +304,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -327,16 +327,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **partner_sub_list** > PartnerSubList partner_sub_list(user_id=user_id, limit=limit, offset=offset) -Partner subordinate list +Partner subordinate list. -Including sub-agents, direct customers, indirect customers +Including sub-agents, direct customers, indirect customers. ### Example @@ -362,12 +362,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # Partner subordinate list + # Partner subordinate list. api_response = api_instance.partner_sub_list(user_id=user_id, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -380,9 +380,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -400,16 +400,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **rebate_broker_commission_history** > list[BrokerCommission] rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) -The broker obtains the user's commission rebate records +The broker obtains the user's commission rebate records. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -435,14 +435,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) _from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) -to = 1714521600 # int | Time range ending, default to current time (optional) +to = 1714521600 # int | Time range ending, default to current time. (optional) try: - # The broker obtains the user's commission rebate records + # The broker obtains the user's commission rebate records. api_response = api_instance.rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -455,11 +455,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] - **to** | **int**| Time range ending, default to current time | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] ### Return type @@ -477,16 +477,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **rebate_broker_transaction_history** > list[BrokerTransaction] rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) -The broker obtains the user's trading history +The broker obtains the user's trading history. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -512,14 +512,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) _from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) -to = 1714521600 # int | Time range ending, default to current time (optional) +to = 1714521600 # int | Time range ending, default to current time. (optional) try: - # The broker obtains the user's trading history + # The broker obtains the user's trading history. api_response = api_instance.rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -532,11 +532,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] - **to** | **int**| Time range ending, default to current time | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] ### Return type @@ -554,14 +554,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **rebate_user_info** > list[RebateUserInfo] rebate_user_info() -User retrieves rebate information +User retrieves rebate information. ### Example @@ -589,7 +589,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.RebateApi(api_client) try: - # User retrieves rebate information + # User retrieves rebate information. api_response = api_instance.rebate_user_info() print(api_response) except GateApiException as ex: @@ -617,16 +617,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_sub_relation** > UserSubRelation user_sub_relation(user_id_list) -User-subordinate relationship +User-subordinate relationship. -Query whether the specified user is in the system +Query whether the specified user is in the system. ### Example @@ -652,10 +652,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -user_id_list = '1, 2, 3' # str | Query the user's ID list, split by,, if there are more than 100, take 100 +user_id_list = '1, 2, 3' # str | Query the user's ID list, split by,, if there are more than 100, take 100. try: - # User-subordinate relationship + # User-subordinate relationship. api_response = api_instance.user_sub_relation(user_id_list) print(api_response) except GateApiException as ex: @@ -668,7 +668,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id_list** | **str**| Query the user's ID list, split by,, if there are more than 100, take 100 | + **user_id_list** | **str**| Query the user's ID list, split by,, if there are more than 100, take 100. | ### Return type @@ -686,7 +686,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/RebateUserInfo.md b/docs/RebateUserInfo.md index 0f97b11..1e721c4 100644 --- a/docs/RebateUserInfo.md +++ b/docs/RebateUserInfo.md @@ -1,10 +1,10 @@ # RebateUserInfo -Retrieve user rebate information +Retrieve user rebate information. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**invite_uid** | **int** | My inviter's UID | [optional] +**invite_uid** | **int** | My inviter's UID. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayCurrencyRes.md b/docs/RepayCurrencyRes.md index dd4ab05..d190f4b 100644 --- a/docs/RepayCurrencyRes.md +++ b/docs/RepayCurrencyRes.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**succeeded** | **bool** | Has the repayment been successful | [optional] +**succeeded** | **bool** | Has the repayment been successful. | [optional] **label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] **message** | **str** | Error description in case of operation failure; empty when successful. | [optional] -**currency** | **str** | Repayment currency | [optional] -**repaid_principal** | **str** | Principal | [optional] -**repaid_interest** | **str** | Principal | [optional] +**currency** | **str** | Repayment currency. | [optional] +**repaid_principal** | **str** | Principal. | [optional] +**repaid_interest** | **str** | Principal. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayLoan.md b/docs/RepayLoan.md index 910e2be..fd8388f 100644 --- a/docs/RepayLoan.md +++ b/docs/RepayLoan.md @@ -1,12 +1,12 @@ # RepayLoan -Repay +Repay. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | -**repay_amount** | **str** | Repayment amount, it is mandatory when making partial repayments | -**repaid_all** | **bool** | Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. | +**order_id** | **int** | Order ID. | +**repay_amount** | **str** | Repayment amount, it is mandatory when making partial repayments. | +**repaid_all** | **bool** | Repayment method, set to `true` for full repayment, and `false` for partial repayment; When partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayMultiLoan.md b/docs/RepayMultiLoan.md index e9be0f0..9cf08c2 100644 --- a/docs/RepayMultiLoan.md +++ b/docs/RepayMultiLoan.md @@ -1,11 +1,11 @@ # RepayMultiLoan -Repay Multi-Collateral Loan +Repay Multi-Collateral Loan. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | -**repay_items** | [**list[MultiLoanRepayItem]**](MultiLoanRepayItem.md) | Repay Currency Item | +**order_id** | **int** | Order ID. | +**repay_items** | [**list[MultiLoanRepayItem]**](MultiLoanRepayItem.md) | Repay Currency Item. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecord.md b/docs/RepayRecord.md index 5137865..a583be6 100644 --- a/docs/RepayRecord.md +++ b/docs/RepayRecord.md @@ -1,22 +1,22 @@ # RepayRecord -Repayment record +Repayment record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID | [optional] -**record_id** | **int** | Repayment record ID | [optional] -**repaid_amount** | **str** | Repayment amount | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**collateral_currency** | **str** | Collateral | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**borrow_time** | **int** | Borrowing time, timestamp | [optional] -**repay_time** | **int** | Repayment time, timestamp | [optional] -**total_interest** | **str** | Total interest | [optional] -**before_left_principal** | **str** | Principal to be repaid before repayment | [optional] -**after_left_principal** | **str** | Principal to be repaid after repayment | [optional] -**before_left_collateral** | **str** | Collateral quantity before repayment | [optional] -**after_left_collateral** | **str** | Collateral quantity after repayment | [optional] +**order_id** | **int** | Order ID. | [optional] +**record_id** | **int** | Repayment record ID. | [optional] +**repaid_amount** | **str** | Repayment amount. | [optional] +**borrow_currency** | **str** | Borrowed currency. | [optional] +**collateral_currency** | **str** | Collateral. | [optional] +**init_ltv** | **str** | The initial collateralization rate. | [optional] +**borrow_time** | **int** | Borrowing time, timestamp. | [optional] +**repay_time** | **int** | Repayment time, timestamp. | [optional] +**total_interest** | **str** | Total interest. | [optional] +**before_left_principal** | **str** | Principal to be repaid before repayment. | [optional] +**after_left_principal** | **str** | Principal to be repaid after repayment. | [optional] +**before_left_collateral** | **str** | Collateral quantity before repayment. | [optional] +**after_left_collateral** | **str** | Collateral quantity after repayment. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecordCurrency.md b/docs/RepayRecordCurrency.md index 0cfa03c..514d3c3 100644 --- a/docs/RepayRecordCurrency.md +++ b/docs/RepayRecordCurrency.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**before_amount** | **str** | Amount before the operation | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**before_amount** | **str** | Amount before the operation. | [optional] **before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] **after_amount** | **str** | Amount after the operation. | [optional] **after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] diff --git a/docs/RepayRecordLeftInterest.md b/docs/RepayRecordLeftInterest.md index 79ca1d9..9bde226 100644 --- a/docs/RepayRecordLeftInterest.md +++ b/docs/RepayRecordLeftInterest.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**before_amount** | **str** | Interest amount before repayment | [optional] -**before_amount_usdt** | **str** | Converted value of interest before repayment in USDT | [optional] -**after_amount** | **str** | Interest amount after repayment | [optional] -**after_amount_usdt** | **str** | Converted value of interest after repayment in USDT | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**before_amount** | **str** | Interest amount before repayment. | [optional] +**before_amount_usdt** | **str** | Converted value of interest before repayment in USDT. | [optional] +**after_amount** | **str** | Interest amount after repayment. | [optional] +**after_amount_usdt** | **str** | Converted value of interest after repayment in USDT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecordRepaidCurrency.md b/docs/RepayRecordRepaidCurrency.md index 7f111e8..36b657a 100644 --- a/docs/RepayRecordRepaidCurrency.md +++ b/docs/RepayRecordRepaidCurrency.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**repaid_amount** | **str** | Repayment amount | [optional] -**repaid_principal** | **str** | Principal | [optional] -**repaid_interest** | **str** | Interest | [optional] -**repaid_amount_usdt** | **str** | Value of the repayment amount in USDT | [optional] +**currency** | **str** | Repayment currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**repaid_amount** | **str** | Repayment amount. | [optional] +**repaid_principal** | **str** | Principal. | [optional] +**repaid_interest** | **str** | Interest. | [optional] +**repaid_amount_usdt** | **str** | Value of the repayment amount in USDT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecordTotalInterest.md b/docs/RepayRecordTotalInterest.md index 8c7a2cc..e7d143d 100644 --- a/docs/RepayRecordTotalInterest.md +++ b/docs/RepayRecordTotalInterest.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**index_price** | **str** | Currency Index Price | [optional] -**amount** | **str** | Interest Amount | [optional] -**amount_usdt** | **str** | Interest amount converted to USDT | [optional] +**currency** | **str** | Currency. | [optional] +**index_price** | **str** | Currency Index Price. | [optional] +**amount** | **str** | Interest Amount. | [optional] +**amount_usdt** | **str** | Interest amount converted to USDT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayResp.md b/docs/RepayResp.md index f7124e3..f3a2776 100644 --- a/docs/RepayResp.md +++ b/docs/RepayResp.md @@ -1,11 +1,11 @@ # RepayResp -Repay +Repay. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**repaid_principal** | **str** | Principal | [optional] -**repaid_interest** | **str** | Interest | [optional] +**repaid_principal** | **str** | Principal. | [optional] +**repaid_interest** | **str** | Interest. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RiskUnits.md b/docs/RiskUnits.md index 7ca433f..ddef59b 100644 --- a/docs/RiskUnits.md +++ b/docs/RiskUnits.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**symbol** | **str** | Risk unit flag | [optional] -**spot_in_use** | **str** | Spot hedging utilization | [optional] -**maintain_margin** | **str** | Maintenance margin for risk unit | [optional] -**initial_margin** | **str** | Initial margin for risk unit | [optional] -**delta** | **str** | Total Delta of risk unit | [optional] -**gamma** | **str** | Total Gamma of risk unit | [optional] -**theta** | **str** | Total Theta of risk unit | [optional] -**vega** | **str** | Total Vega of risk unit | [optional] +**symbol** | **str** | Risk unit flag. | [optional] +**spot_in_use** | **str** | Spot hedging utilization. | [optional] +**maintain_margin** | **str** | Maintenance margin for risk unit. | [optional] +**initial_margin** | **str** | Initial margin for risk unit. | [optional] +**delta** | **str** | Total Delta of risk unit. | [optional] +**gamma** | **str** | Total Gamma of risk unit. | [optional] +**theta** | **str** | Total Theta of risk unit. | [optional] +**vega** | **str** | Total Vega of risk unit. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SavedAddress.md b/docs/SavedAddress.md index 117d52d..77d7657 100644 --- a/docs/SavedAddress.md +++ b/docs/SavedAddress.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**chain** | **str** | Chain name | [optional] -**address** | **str** | Address | [optional] -**name** | **str** | Name | [optional] -**tag** | **str** | Tag | [optional] -**verified** | **str** | Whether to pass the verification 0-unverified, 1-verified | [optional] +**currency** | **str** | Currency. | [optional] +**chain** | **str** | Chain name. | [optional] +**address** | **str** | Address. | [optional] +**name** | **str** | Name. | [optional] +**tag** | **str** | Tag. | [optional] +**verified** | **str** | Whether to pass the verification 0-unverified, 1-verified. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SmallBalance.md b/docs/SmallBalance.md index 80e11fa..945735a 100644 --- a/docs/SmallBalance.md +++ b/docs/SmallBalance.md @@ -1,13 +1,13 @@ # SmallBalance -Convert Small Balance +Convert Small Balance. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**available_balance** | **str** | Available balance | [optional] -**estimated_as_btc** | **str** | Estimated as BTC | [optional] -**convertible_to_gt** | **str** | Estimated conversion to GT | [optional] +**currency** | **str** | Currency. | [optional] +**available_balance** | **str** | Available balance. | [optional] +**estimated_as_btc** | **str** | Estimated as BTC. | [optional] +**convertible_to_gt** | **str** | Estimated conversion to GT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SmallBalanceHistory.md b/docs/SmallBalanceHistory.md index ffe1d05..4e094c3 100644 --- a/docs/SmallBalanceHistory.md +++ b/docs/SmallBalanceHistory.md @@ -1,14 +1,14 @@ # SmallBalanceHistory -Convert Small Balance +Convert Small Balance. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**amount** | **str** | amount | [optional] [readonly] -**gt_amount** | **str** | GT amount | [optional] [readonly] -**create_time** | **int** | Exchange time (in seconds) | [optional] [readonly] +**id** | **str** | Order ID. | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**amount** | **str** | amount. | [optional] [readonly] +**gt_amount** | **str** | GT amount. | [optional] [readonly] +**create_time** | **int** | Exchange time (in seconds). | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md index 6bb761e..9ce8e92 100644 --- a/docs/SpotAccount.md +++ b/docs/SpotAccount.md @@ -3,10 +3,10 @@ ## 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] +**currency** | **str** | Currency detail. | [optional] +**available** | **str** | Available amount. | [optional] +**locked** | **str** | Locked amount, used in trading. | [optional] +**update_id** | **int** | Version number. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotAccountBook.md b/docs/SpotAccountBook.md index f4a1b2f..9d79d3e 100644 --- a/docs/SpotAccountBook.md +++ b/docs/SpotAccountBook.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID | [optional] -**time** | **int** | The timestamp of the change (in milliseconds) | [optional] -**currency** | **str** | Currency changed | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] -**balance** | **str** | Balance after change | [optional] -**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] -**code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code) | [optional] -**text** | **str** | Additional information | [optional] +**id** | **str** | Balance change record ID. | [optional] +**time** | **int** | The timestamp of the change (in milliseconds). | [optional] +**currency** | **str** | Currency changed. | [optional] +**change** | **str** | Amount changed. Positive value means transferring in, while negative out. | [optional] +**balance** | **str** | Balance after change. | [optional] +**type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] +**code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code). | [optional] +**text** | **str** | Additional information. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotApi.md b/docs/SpotApi.md index 8cb2ec5..15709cf 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -4,44 +4,44 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details -[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency -[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported -[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair -[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information -[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book -[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades -[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks -[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates -[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates -[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts -[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book -[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders -[**list_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 -[**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair -[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list -[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order -[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order -[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order -[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history -[**get_system_time**](SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time -[**countdown_cancel_all_spot**](SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders -[**amend_batch_orders**](SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders -[**get_spot_insurance_history**](SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data -[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list -[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order -[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders -[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order -[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order +[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details. +[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency. +[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported. +[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair. +[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information. +[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book. +[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades. +[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks. +[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates. +[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates. +[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts. +[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book. +[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders. +[**list_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. +[**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair. +[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list. +[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order. +[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order. +[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order. +[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history. +[**get_system_time**](SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time. +[**countdown_cancel_all_spot**](SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders. +[**amend_batch_orders**](SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders. +[**get_spot_insurance_history**](SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data. +[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list. +[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order. +[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders. +[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order. +[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order. # **list_currencies** > list[Currency] list_currencies() -List all currencies' details +List all currencies' details. When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. @@ -62,7 +62,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) try: - # List all currencies' details + # List all currencies' details. api_response = api_instance.list_currencies() print(api_response) except GateApiException as ex: @@ -90,14 +90,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_currency** > Currency get_currency(currency) -Get details of a specific currency +Get details of a specific currency. ### Example @@ -114,10 +114,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency = 'GT' # str | Currency name +currency = 'GT' # str | Currency name. try: - # Get details of a specific currency + # Get details of a specific currency. api_response = api_instance.get_currency(currency) print(api_response) except GateApiException as ex: @@ -130,7 +130,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | + **currency** | **str**| Currency name. | ### Return type @@ -148,14 +148,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_currency_pairs** > list[CurrencyPair] list_currency_pairs() -List all currency pairs supported +List all currency pairs supported. ### Example @@ -174,7 +174,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) try: - # List all currency pairs supported + # List all currency pairs supported. api_response = api_instance.list_currency_pairs() print(api_response) except GateApiException as ex: @@ -202,14 +202,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All currency pairs retrieved | - | +**200** | All currency pairs retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_currency_pair** > CurrencyPair get_currency_pair(currency_pair) -Get details of a specifc currency pair +Get details of a specifc currency pair. ### Example @@ -226,10 +226,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'ETH_BTC' # str | Currency pair +currency_pair = 'ETH_BTC' # str | Currency pair. try: - # Get details of a specifc currency pair + # Get details of a specifc currency pair. api_response = api_instance.get_currency_pair(currency_pair) print(api_response) except GateApiException as ex: @@ -242,7 +242,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair. | ### Return type @@ -260,14 +260,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_tickers** > list[Ticker] list_tickers(currency_pair=currency_pair, timezone=timezone) -Retrieve ticker information +Retrieve ticker information. Return only related data if `currency_pair` is specified; otherwise return all of them @@ -286,11 +286,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -timezone = 'utc0' # str | Timezone (optional) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +timezone = 'utc0' # str | Timezone. (optional) try: - # Retrieve ticker information + # Retrieve ticker information. api_response = api_instance.list_tickers(currency_pair=currency_pair, timezone=timezone) print(api_response) except GateApiException as ex: @@ -303,8 +303,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **timezone** | **str**| Timezone | [optional] + **currency_pair** | **str**| Currency pair. | [optional] + **timezone** | **str**| Timezone. | [optional] ### Return type @@ -322,16 +322,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_order_book** > OrderBook list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id) -Retrieve order book +Retrieve order book. -Market depth buy orders are sorted by price from high to low, sell orders are reversed are reversed +Market depth buy orders are sorted by price from high to low, sell orders are reversed ### Example @@ -348,13 +348,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids (optional) (default to 10) -with_id = False # bool | Return order book ID (optional) (default to False) +currency_pair = 'BTC_USDT' # str | Currency pair. +interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') +limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) +with_id = False # bool | Return order book ID. (optional) (default to False) try: - # Retrieve order book + # Retrieve order book. api_response = api_instance.list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -367,10 +367,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids | [optional] [default to 10] - **with_id** | **bool**| Return order book ID | [optional] [default to False] + **currency_pair** | **str**| Currency pair. | + **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] + **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] + **with_id** | **bool**| Return order book ID. | [optional] [default to False] ### Return type @@ -388,16 +388,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_trades** > list[Trade] list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) -Retrieve market trades +Retrieve market trades. -Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. +Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. ### Example @@ -414,16 +414,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair -limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) +currency_pair = 'BTC_USDT' # str | Currency pair. +limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) reverse = False # bool | Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. (optional) (default to False) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) +_from = 1627706330 # int | Start timestamp of the query. (optional) +to = 1635329650 # int | Time range ending, default to current time. (optional) +page = 1 # int | Page number. (optional) (default to 1) try: - # Retrieve market trades + # Retrieve market trades. api_response = api_instance.list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) print(api_response) except GateApiException as ex: @@ -436,13 +436,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | - **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] + **currency_pair** | **str**| Currency pair. | + **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] **reverse** | **bool**| Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. | [optional] [default to False] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] ### Return type @@ -460,14 +460,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_candlesticks** > list[list[str]] list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) -Market candlesticks +Market candlesticks. Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval @@ -486,14 +486,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair +currency_pair = 'BTC_USDT' # str | Currency pair. limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second (optional) +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) interval = '30m' # str | Interval time between data points. Note that `30d` means 1 natual month, not 30 days (optional) (default to '30m') try: - # Market candlesticks + # Market candlesticks. api_response = api_instance.list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) print(api_response) except GateApiException as ex: @@ -506,10 +506,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair. | **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second | [optional] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] **interval** | **str**| Interval time between data points. Note that `30d` means 1 natual month, not 30 days | [optional] [default to '30m'] ### Return type @@ -528,14 +528,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_fee** > SpotFee get_fee(currency_pair=currency_pair) -Query user trading fee rates +Query user trading fee rates. This API is deprecated in favour of new fee retrieving API `/wallet/fee`. @@ -566,7 +566,7 @@ api_instance = gate_api.SpotApi(api_client) currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional) try: - # Query user trading fee rates + # Query user trading fee rates. api_response = api_instance.get_fee(currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -597,14 +597,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_batch_spot_fee** > dict(str, SpotFee) get_batch_spot_fee(currency_pairs) -Query a batch of user trading fee rates +Query a batch of user trading fee rates. ### Example @@ -630,10 +630,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pairs = 'BTC_USDT,ETH_USDT' # str | A request can only query up to 50 currency pairs +currency_pairs = 'BTC_USDT,ETH_USDT' # str | A request can only query up to 50 currency pairs. try: - # Query a batch of user trading fee rates + # Query a batch of user trading fee rates. api_response = api_instance.get_batch_spot_fee(currency_pairs) print(api_response) except GateApiException as ex: @@ -646,7 +646,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pairs** | **str**| A request can only query up to 50 currency pairs | + **currency_pairs** | **str**| A request can only query up to 50 currency pairs. | ### Return type @@ -664,14 +664,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_spot_accounts** > list[SpotAccount] list_spot_accounts(currency=currency) -List spot accounts +List spot accounts. ### Example @@ -697,10 +697,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) try: - # List spot accounts + # List spot accounts. api_response = api_instance.list_spot_accounts(currency=currency) print(api_response) except GateApiException as ex: @@ -713,7 +713,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] ### Return type @@ -731,16 +731,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_spot_account_book** > list[SpotAccountBook] list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=code) -Query account book +Query account book. -Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. +Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. ### Example @@ -766,16 +766,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +_from = 1627706330 # int | Start timestamp of the query. (optional) +to = 1635329650 # int | Time range ending, default to current time. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) code = 'code_example' # str | Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` (optional) try: - # Query account book + # Query account book. api_response = api_instance.list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=code) print(api_response) except GateApiException as ex: @@ -788,11 +788,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] **code** | **str**| Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` | [optional] @@ -812,14 +812,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_batch_orders** > list[BatchOrder] create_batch_orders(order, x_gate_exptime=x_gate_exptime) -Create a batch of orders +Create a batch of orders. Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders @@ -851,7 +851,7 @@ order = [gate_api.Order()] # list[Order] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Create a batch of orders + # Create a batch of orders. api_response = api_instance.create_batch_orders(order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -883,16 +883,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is completed | - | +**200** | Request is completed. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_all_open_orders** > list[OpenOrders] list_all_open_orders(page=page, limit=limit, account=account) -List all open orders +List all open orders. -Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. +Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. ### Example @@ -918,12 +918,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum number of records returned in one page in each currency pair (optional) (default to 100) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in one page in each currency pair. (optional) (default to 100) account = 'spot' # str | Specify query account. (optional) try: - # List all open orders + # List all open orders. api_response = api_instance.list_all_open_orders(page=page, limit=limit, account=account) print(api_response) except GateApiException as ex: @@ -936,8 +936,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum number of records returned in one page in each currency pair | [optional] [default to 100] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in one page in each currency pair. | [optional] [default to 100] **account** | **str**| Specify query account. | [optional] ### Return type @@ -956,14 +956,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_cross_liquidate_order** > Order create_cross_liquidate_order(liquidate_order) -close position when cross-currency is disabled +close position when cross-currency is disabled. Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 @@ -994,7 +994,7 @@ api_instance = gate_api.SpotApi(api_client) liquidate_order = gate_api.LiquidateOrder() # LiquidateOrder | try: - # close position when cross-currency is disabled + # close position when cross-currency is disabled. api_response = api_instance.create_cross_liquidate_order(liquidate_order) print(api_response) except GateApiException as ex: @@ -1025,16 +1025,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | order created | - | +**201** | order created. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_orders** > list[Order] list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, side=side) -List orders +List orders. -Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. +Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. ### Example @@ -1062,15 +1062,15 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. status = 'open' # str | List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled -page = 1 # int | Page number (optional) (default to 1) +page = 1 # int | Page number. (optional) (default to 1) limit = 100 # int | Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 (optional) (default to 100) account = 'spot' # str | Specify query account. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) -side = 'sell' # str | All bids or asks. Both included if not specified (optional) +_from = 1627706330 # int | Start timestamp of the query. (optional) +to = 1635329650 # int | Time range ending, default to current time. (optional) +side = 'sell' # str | All bids or asks. Both included if not specified. (optional) try: - # List orders + # List orders. api_response = api_instance.list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, side=side) print(api_response) except GateApiException as ex: @@ -1085,12 +1085,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency_pair** | **str**| Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. | **status** | **str**| List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled | - **page** | **int**| Page number | [optional] [default to 1] + **page** | **int**| Page number. | [optional] [default to 1] **limit** | **int**| Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 | [optional] [default to 100] **account** | **str**| Specify query account. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **side** | **str**| All bids or asks. Both included if not specified | [optional] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **side** | **str**| All bids or asks. Both included if not specified. | [optional] ### Return type @@ -1108,16 +1108,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_order** > Order create_order(order, x_gate_exptime=x_gate_exptime) -Create an order +Create an order. -Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions +Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions ### Example @@ -1147,7 +1147,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 an order. api_response = api_instance.create_order(order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1186,9 +1186,9 @@ Name | Type | Description | Notes # **cancel_orders** > list[OrderCancel] cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) -Cancel all `open` orders in specified currency pair +Cancel all `open` orders in specified currency pair. -When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account +When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account ### Example @@ -1214,14 +1214,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair (optional) -side = 'sell' # str | All bids or asks. Both included if not specified (optional) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +side = 'sell' # str | All bids or asks. Both included if not specified. (optional) account = 'spot' # str | Specify account type Classic account: All are included if not specified Unified account: Specify unified (optional) action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel all `open` orders in specified currency pair + # Cancel all `open` orders in specified currency pair. api_response = api_instance.cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1234,8 +1234,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair | [optional] - **side** | **str**| All bids or asks. Both included if not specified | [optional] + **currency_pair** | **str**| Currency pair. | [optional] + **side** | **str**| All bids or asks. Both included if not specified. | [optional] **account** | **str**| Specify account type Classic account: All are included if not specified Unified account: Specify unified | [optional] **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -1256,14 +1256,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders | - | +**200** | Batch cancellation request accepted. Query order status by listing orders. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_batch_orders** > list[CancelOrderResult] cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) -Cancel a batch of orders with an ID list +Cancel a batch of orders with an ID list. Multiple currency pairs can be specified, but maximum 20 orders are allowed per request @@ -1295,7 +1295,7 @@ cancel_batch_order = [gate_api.CancelBatchOrder()] # list[CancelBatchOrder] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a batch of orders with an ID list + # Cancel a batch of orders with an ID list. api_response = api_instance.cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1327,14 +1327,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation completed | - | +**200** | Batch cancellation completed. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_order** > Order get_order(order_id, currency_pair, account=account) -Get a single order +Get a single order. By default, orders for spot, unified account and warehouse-by-site leverage account are checked. @@ -1363,11 +1363,11 @@ 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) -currency_pair = 'BTC_USDT' # str | Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. +currency_pair = 'BTC_USDT' # str | Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. account = 'spot' # str | Specify query account. (optional) try: - # Get a single order + # Get a single order. api_response = api_instance.get_order(order_id, currency_pair, account=account) print(api_response) except GateApiException as ex: @@ -1381,7 +1381,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | - **currency_pair** | **str**| Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. | + **currency_pair** | **str**| Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. | **account** | **str**| Specify query account. | [optional] ### Return type @@ -1400,14 +1400,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Detail retrieved | - | +**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_order** > Order cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) -Cancel a single order +Cancel a single order. By default, orders for spot, unified accounts and leveraged accounts are revoked. @@ -1436,13 +1436,13 @@ 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) -currency_pair = 'BTC_USDT' # str | Currency pair +currency_pair = 'BTC_USDT' # str | Currency pair. account = 'spot' # str | Specify query account. (optional) action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a single order + # Cancel a single order. api_response = api_instance.cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1456,7 +1456,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | - **currency_pair** | **str**| Currency pair | + **currency_pair** | **str**| Currency pair. | **account** | **str**| Specify query account. | [optional] **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -1477,16 +1477,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order cancelled | - | +**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) # **amend_order** > Order amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) -Amend an order +Amend an order. -Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation.Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. +Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. ### Example @@ -1514,12 +1514,12 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) order_id = '12345' # str | The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) order_patch = gate_api.OrderPatch() # OrderPatch | -currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency_pair = 'BTC_USDT' # str | Currency pair. (optional) account = 'spot' # str | Specify query account. (optional) x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Amend an order + # Amend an order. api_response = api_instance.amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1534,7 +1534,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | **order_patch** | [**OrderPatch**](OrderPatch.md)| | - **currency_pair** | **str**| Currency pair | [optional] + **currency_pair** | **str**| Currency pair. | [optional] **account** | **str**| Specify query account. | [optional] **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -1554,16 +1554,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Updated | - | +**200** | Updated. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_my_trades** > list[Trade] list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) -List personal trading history +List personal trading history. -By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. +By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. ### Example @@ -1589,16 +1589,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) -page = 1 # int | Page number (optional) (default to 1) +currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) +page = 1 # int | Page number. (optional) (default to 1) order_id = '12345' # str | Filter trades with specified order ID. `currency_pair` is also required if this field is present (optional) account = 'spot' # str | Specify query account. (optional) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) +_from = 1627706330 # int | Start timestamp of the query. (optional) +to = 1635329650 # int | Time range ending, default to current time. (optional) try: - # List personal trading history + # List personal trading history. api_response = api_instance.list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -1611,13 +1611,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Retrieve results with specified currency pair | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] - **page** | **int**| Page number | [optional] [default to 1] + **currency_pair** | **str**| Retrieve results with specified currency pair. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] + **page** | **int**| Page number. | [optional] [default to 1] **order_id** | **str**| Filter trades with specified order ID. `currency_pair` is also required if this field is present | [optional] **account** | **str**| Specify query account. | [optional] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] ### Return type @@ -1635,14 +1635,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_system_time** > SystemTime get_system_time() -Get server current time +Get server current time. ### Example @@ -1661,7 +1661,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) try: - # Get server current time + # Get server current time. api_response = api_instance.get_system_time() print(api_response) except GateApiException as ex: @@ -1689,16 +1689,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **countdown_cancel_all_spot** > TriggerTime countdown_cancel_all_spot(countdown_cancel_all_spot_task) -Countdown cancel orders +Countdown cancel orders. -Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. +Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. ### Example @@ -1727,7 +1727,7 @@ api_instance = gate_api.SpotApi(api_client) countdown_cancel_all_spot_task = gate_api.CountdownCancelAllSpotTask() # CountdownCancelAllSpotTask | try: - # Countdown cancel orders + # Countdown cancel orders. api_response = api_instance.countdown_cancel_all_spot(countdown_cancel_all_spot_task) print(api_response) except GateApiException as ex: @@ -1758,16 +1758,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Set countdown successfully | - | +**200** | Set countdown successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **amend_batch_orders** > list[BatchOrder] amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) -Batch modification of orders +Batch modification of orders. -Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. +Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return is consistent with the order list order. ### Example @@ -1797,7 +1797,7 @@ batch_amend_item = [gate_api.BatchAmendItem()] # list[BatchAmendItem] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Batch modification of orders + # Batch modification of orders. api_response = api_instance.amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1829,14 +1829,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order modification executed successfully | - | +**200** | Order modification executed successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_spot_insurance_history** > list[SpotInsuranceHistory] get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) -Query spot insurance fund historical data +Query spot insurance fund historical data. ### Example @@ -1854,14 +1854,14 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) business = 'margin' # str | Leverage business, margin - position by position; unified - unified account -currency = 'BTC' # str | Currency -_from = 1547706332 # int | Start timestamp, seconds -to = 1547706332 # int | End timestamp, in seconds -page = 1 # int | Page number (optional) (default to 1) -limit = 30 # int | The maximum number of items returned in the list, the default value is 30 (optional) (default to 30) +currency = 'BTC' # str | Currency. +_from = 1547706332 # int | Start timestamp, seconds. +to = 1547706332 # int | End timestamp, in seconds. +page = 1 # int | Page number. (optional) (default to 1) +limit = 30 # int | The maximum number of items returned in the list, the default value is 30. (optional) (default to 30) try: - # Query spot insurance fund historical data + # Query spot insurance fund historical data. api_response = api_instance.get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -1875,11 +1875,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business** | **str**| Leverage business, margin - position by position; unified - unified account | - **currency** | **str**| Currency | - **_from** | **int**| Start timestamp, seconds | - **to** | **int**| End timestamp, in seconds | - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| The maximum number of items returned in the list, the default value is 30 | [optional] [default to 30] + **currency** | **str**| Currency. | + **_from** | **int**| Start timestamp, seconds. | + **to** | **int**| End timestamp, in seconds. | + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| The maximum number of items returned in the list, the default value is 30. | [optional] [default to 30] ### Return type @@ -1897,14 +1897,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_spot_price_triggered_orders** > list[SpotPriceTriggeredOrder] list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) -Retrieve running auto order list +Retrieve running auto order list. ### Example @@ -1930,14 +1930,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -status = 'status_example' # str | Only list the orders with this status -market = 'BTC_USDT' # str | Currency pair (optional) -account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified` (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +status = 'status_example' # str | Only list the orders with this status. +market = 'BTC_USDT' # str | Currency pair. (optional) +account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified`. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # Retrieve running auto order list + # Retrieve running auto order list. api_response = api_instance.list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1950,11 +1950,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| Only list the orders with this status | - **market** | **str**| Currency pair | [optional] - **account** | **str**| Trading account type. Portfolio margin account must set to `unified` | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **status** | **str**| Only list the orders with this status. | + **market** | **str**| Currency pair. | [optional] + **account** | **str**| Trading account type. Portfolio margin account must set to `unified`. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -1972,14 +1972,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_spot_price_triggered_order** > TriggerOrderResponse create_spot_price_triggered_order(spot_price_triggered_order) -Create a price-triggered order +Create a price-triggered order. ### Example @@ -2008,7 +2008,7 @@ api_instance = gate_api.SpotApi(api_client) spot_price_triggered_order = gate_api.SpotPriceTriggeredOrder() # SpotPriceTriggeredOrder | try: - # Create a price-triggered order + # Create a price-triggered order. api_response = api_instance.create_spot_price_triggered_order(spot_price_triggered_order) print(api_response) except GateApiException as ex: @@ -2039,14 +2039,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order created | - | +**201** | Order created. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_spot_price_triggered_order_list** > list[SpotPriceTriggeredOrder] cancel_spot_price_triggered_order_list(market=market, account=account) -Cancel All Price-triggered Orders +Cancel All Price-triggered Orders. ### Example @@ -2072,11 +2072,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -market = 'BTC_USDT' # str | Currency pair (optional) -account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified` (optional) +market = 'BTC_USDT' # str | Currency pair. (optional) +account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified`. (optional) try: - # Cancel All Price-triggered Orders + # Cancel All Price-triggered Orders. api_response = api_instance.cancel_spot_price_triggered_order_list(market=market, account=account) print(api_response) except GateApiException as ex: @@ -2089,8 +2089,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **market** | **str**| Currency pair | [optional] - **account** | **str**| Trading account type. Portfolio margin account must set to `unified` | [optional] + **market** | **str**| Currency pair. | [optional] + **account** | **str**| Trading account type. Portfolio margin account must set to `unified`. | [optional] ### Return type @@ -2108,14 +2108,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders | - | +**200** | Batch cancellation request accepted. Query order status by listing orders. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_spot_price_triggered_order** > SpotPriceTriggeredOrder get_spot_price_triggered_order(order_id) -Get a price-triggered order +Get a price-triggered order. ### Example @@ -2141,10 +2141,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. try: - # Get a price-triggered order + # Get a price-triggered order. api_response = api_instance.get_spot_price_triggered_order(order_id) print(api_response) except GateApiException as ex: @@ -2157,7 +2157,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -2175,14 +2175,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail | - | +**200** | Auto order detail. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_spot_price_triggered_order** > SpotPriceTriggeredOrder cancel_spot_price_triggered_order(order_id) -cancel a price-triggered order +cancel a price-triggered order. ### Example @@ -2208,10 +2208,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID +order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. try: - # cancel a price-triggered order + # cancel a price-triggered order. api_response = api_instance.cancel_spot_price_triggered_order(order_id) print(api_response) except GateApiException as ex: @@ -2224,7 +2224,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Retrieve the data of the order with the specified ID | + **order_id** | **str**| Retrieve the data of the order with the specified ID. | ### Return type @@ -2242,7 +2242,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail | - | +**200** | Auto order detail. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SpotCurrencyChain.md b/docs/SpotCurrencyChain.md index d9696fd..ad873a8 100644 --- a/docs/SpotCurrencyChain.md +++ b/docs/SpotCurrencyChain.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Chain name | [optional] -**addr** | **str** | token address | [optional] -**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled | [optional] -**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed | [optional] -**deposit_disabled** | **bool** | Whether currency's deposit is disabled | [optional] +**name** | **str** | Chain name. | [optional] +**addr** | **str** | token address. | [optional] +**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled. | [optional] +**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed. | [optional] +**deposit_disabled** | **bool** | Whether currency's deposit is disabled. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotFee.md b/docs/SpotFee.md index 78ff43c..675c25c 100644 --- a/docs/SpotFee.md +++ b/docs/SpotFee.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**taker_fee** | **str** | taker fee rate | [optional] -**maker_fee** | **str** | maker fee rate | [optional] -**gt_discount** | **bool** | If GT deduction is enabled | [optional] +**user_id** | **int** | User ID. | [optional] +**taker_fee** | **str** | taker fee rate. | [optional] +**maker_fee** | **str** | maker fee rate. | [optional] +**gt_discount** | **bool** | If GT deduction is enabled. | [optional] **gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] **gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**loan_fee** | **str** | Loan fee rate of margin lending | [optional] -**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional] -**currency_pair** | **str** | Currency pair | [optional] +**loan_fee** | **str** | Loan fee rate of margin lending. | [optional] +**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009. | [optional] +**currency_pair** | **str** | Currency pair. | [optional] **debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotInsuranceHistory.md b/docs/SpotInsuranceHistory.md index 0731b7f..fccc107 100644 --- a/docs/SpotInsuranceHistory.md +++ b/docs/SpotInsuranceHistory.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**balance** | **str** | balance | [optional] -**time** | **int** | Creation time, timestamp, milliseconds | [optional] +**currency** | **str** | Currency. | [optional] +**balance** | **str** | balance. | [optional] +**time** | **int** | Creation time, timestamp, milliseconds. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotPricePutOrder.md b/docs/SpotPricePutOrder.md index 1c2adf7..1e27338 100644 --- a/docs/SpotPricePutOrder.md +++ b/docs/SpotPricePutOrder.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Order type,default to `limit` - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **side** | **str** | Order side - buy: buy side - sell: sell side | -**price** | **str** | Order price | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | +**price** | **str** | Order price. | +**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | **account** | **str** | Trading account type. Portfolio margin account must set to `unified` -normal: spot trading - margin: margin trading - unified: unified trading | [default to 'normal'] **time_in_force** | **str** | time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only | [optional] [default to 'gtc'] -**auto_borrow** | **bool** | Whether to borrow coins automatically | [optional] [default to False] -**auto_repay** | **bool** | Whether to repay the loan automatically | [optional] [default to False] +**auto_borrow** | **bool** | Whether to borrow coins automatically. | [optional] [default to False] +**auto_repay** | **bool** | Whether to repay the loan automatically. | [optional] [default to False] **text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotPriceTrigger.md b/docs/SpotPriceTrigger.md index 3583ed4..3c1f2bd 100644 --- a/docs/SpotPriceTrigger.md +++ b/docs/SpotPriceTrigger.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**price** | **str** | Trigger price | -**rule** | **str** | Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: triggered when market price less than or equal to `price` field | +**price** | **str** | Trigger price. | +**rule** | **str** | Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: or equal to `price` field | **expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotPriceTriggeredOrder.md b/docs/SpotPriceTriggeredOrder.md index 4291cb2..c9faff4 100644 --- a/docs/SpotPriceTriggeredOrder.md +++ b/docs/SpotPriceTriggeredOrder.md @@ -1,19 +1,19 @@ # SpotPriceTriggeredOrder -Spot order detail +Spot order detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **trigger** | [**SpotPriceTrigger**](SpotPriceTrigger.md) | | **put** | [**SpotPricePutOrder**](SpotPricePutOrder.md) | | -**id** | **int** | Auto order ID | [optional] [readonly] -**user** | **int** | User ID | [optional] [readonly] -**market** | **str** | Currency pair | -**ctime** | **int** | Creation time | [optional] [readonly] -**ftime** | **int** | Finished time | [optional] [readonly] -**fired_order_id** | **int** | ID of the newly created order on condition triggered | [optional] [readonly] +**id** | **int** | Auto order ID. | [optional] [readonly] +**user** | **int** | User ID. | [optional] [readonly] +**market** | **str** | Currency pair. | +**ctime** | **int** | Creation time. | [optional] [readonly] +**ftime** | **int** | Finished time. | [optional] [readonly] +**fired_order_id** | **int** | ID of the newly created order on condition triggered. | [optional] [readonly] **status** | **str** | Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired | [optional] [readonly] -**reason** | **str** | Additional remarks on how the order was finished | [optional] [readonly] +**reason** | **str** | Additional remarks on how the order was finished. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StpGroup.md b/docs/StpGroup.md index 3ae5da0..4098086 100644 --- a/docs/StpGroup.md +++ b/docs/StpGroup.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | STP Group ID | [optional] -**name** | **str** | STP Group name | -**creator_id** | **int** | Creator ID | [optional] -**create_time** | **int** | Creation time | [optional] +**id** | **int** | STP Group ID. | [optional] +**name** | **str** | STP Group name. | +**creator_id** | **int** | Creator ID. | [optional] +**create_time** | **int** | Creation time. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StpGroupUser.md b/docs/StpGroupUser.md index a5a103e..1eb88f0 100644 --- a/docs/StpGroupUser.md +++ b/docs/StpGroupUser.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**stp_id** | **int** | STP Group ID | [optional] -**create_time** | **int** | Creation time | [optional] +**user_id** | **int** | User ID. | [optional] +**stp_id** | **int** | STP Group ID. | [optional] +**create_time** | **int** | Creation time. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StructuredBuy.md b/docs/StructuredBuy.md index 4a3e128..5252d47 100644 --- a/docs/StructuredBuy.md +++ b/docs/StructuredBuy.md @@ -1,11 +1,11 @@ # StructuredBuy -Dual Investment Purchase +Dual Investment Purchase. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pid** | **str** | Plan ID | [optional] -**amount** | **str** | Purchase Amount | [optional] +**pid** | **str** | Plan ID. | [optional] +**amount** | **str** | Purchase 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/StructuredGetProjectList.md b/docs/StructuredGetProjectList.md index 38e9f37..1aa9d35 100644 --- a/docs/StructuredGetProjectList.md +++ b/docs/StructuredGetProjectList.md @@ -1,20 +1,20 @@ # StructuredGetProjectList -Structured Products +Structured Products. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Plan ID | [optional] +**id** | **int** | Plan ID. | [optional] **type** | **str** | product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball | [optional] -**name_en** | **str** | name | [optional] -**investment_coin** | **str** | Investment Currency | [optional] -**investment_period** | **str** | Investment term | [optional] -**min_annual_rate** | **str** | Minimum annual rate | [optional] -**mid_annual_rate** | **str** | Intermediate annual rate | [optional] -**max_annual_rate** | **str** | Maximum annual rate | [optional] -**watch_market** | **str** | Watch market | [optional] -**start_time** | **int** | start time | [optional] -**end_time** | **int** | Finished time | [optional] +**name_en** | **str** | name. | [optional] +**investment_coin** | **str** | Investment Currency. | [optional] +**investment_period** | **str** | Investment term. | [optional] +**min_annual_rate** | **str** | Minimum annual rate. | [optional] +**mid_annual_rate** | **str** | Intermediate annual rate. | [optional] +**max_annual_rate** | **str** | Maximum annual rate. | [optional] +**watch_market** | **str** | Watch market. | [optional] +**start_time** | **int** | start time. | [optional] +**end_time** | **int** | Finished time. | [optional] **status** | **str** | Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StructuredOrderList.md b/docs/StructuredOrderList.md index 2886d54..27f4742 100644 --- a/docs/StructuredOrderList.md +++ b/docs/StructuredOrderList.md @@ -1,16 +1,16 @@ # StructuredOrderList -Structured order +Structured order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**pid** | **str** | Plan ID | [optional] -**lock_coin** | **str** | Locked coin | [optional] -**amount** | **str** | Locked amount | [optional] +**id** | **int** | Order ID. | [optional] +**pid** | **str** | Plan ID. | [optional] +**lock_coin** | **str** | Locked coin. | [optional] +**amount** | **str** | Locked amount. | [optional] **status** | **str** | Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE | [optional] -**income** | **str** | Income | [optional] -**create_time** | **int** | Created time | [optional] +**income** | **str** | Income. | [optional] +**create_time** | **int** | Created time. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccount.md b/docs/SubAccount.md index 70dbc36..837077f 100644 --- a/docs/SubAccount.md +++ b/docs/SubAccount.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**remark** | **str** | custom text | [optional] +**remark** | **str** | custom text. | [optional] **login_name** | **str** | Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters | -**password** | **str** | The sub-account's password. (Default: the same as main account's password) | [optional] +**password** | **str** | The sub-account's password. (Default: the same as main account's password). | [optional] **email** | **str** | The sub-account's email address. (Default: the same as main account's email address) | [optional] -**state** | **int** | State: 1-normal, 2-locked\" | [optional] [readonly] -**type** | **int** | \"Sub-account type: 1 - sub-account, 3 - cross margin account | [optional] [readonly] -**user_id** | **int** | The user id of the sub-account | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] +**state** | **int** | State: 1-normal, 2-locked\". | [optional] [readonly] +**type** | **int** | \"Sub-account type: 1 - sub-account, 3 - cross margin account. | [optional] [readonly] +**user_id** | **int** | The user id of the sub-account. | [optional] [readonly] +**create_time** | **int** | Created time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountApi.md b/docs/SubAccountApi.md index 065553b..5f61557 100644 --- a/docs/SubAccountApi.md +++ b/docs/SubAccountApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_sub_accounts**](SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts -[**create_sub_accounts**](SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account -[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account -[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account -[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account -[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account -[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account -[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account -[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account -[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account -[**list_unified_mode**](SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode +[**list_sub_accounts**](SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts. +[**create_sub_accounts**](SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account. +[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account. +[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account. +[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account. +[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account. +[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account. +[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account. +[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account. +[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account. +[**list_unified_mode**](SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode. # **list_sub_accounts** > list[SubAccount] list_sub_accounts(type=type) -List sub-accounts +List sub-accounts. ### Example @@ -49,7 +49,7 @@ api_instance = gate_api.SubAccountApi(api_client) type = '0' # str | `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. (optional) try: - # List sub-accounts + # List sub-accounts. api_response = api_instance.list_sub_accounts(type=type) print(api_response) except GateApiException as ex: @@ -80,14 +80,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_sub_accounts** > SubAccount create_sub_accounts(sub_account) -Create a new sub-account +Create a new sub-account. ### Example @@ -116,7 +116,7 @@ api_instance = gate_api.SubAccountApi(api_client) sub_account = gate_api.SubAccount() # SubAccount | try: - # Create a new sub-account + # Create a new sub-account. api_response = api_instance.create_sub_accounts(sub_account) print(api_response) except GateApiException as ex: @@ -147,14 +147,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Created Successfully | - | +**201** | Created Successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_sub_account** > SubAccount get_sub_account(user_id) -Get the sub-account +Get the sub-account. ### Example @@ -180,10 +180,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id +user_id = 56 # int | Sub-account user id. try: - # Get the sub-account + # Get the sub-account. api_response = api_instance.get_sub_account(user_id) print(api_response) except GateApiException as ex: @@ -196,7 +196,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | + **user_id** | **int**| Sub-account user id. | ### Return type @@ -214,14 +214,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_keys** > list[SubAccountKey] list_sub_account_keys(user_id) -List all API Key of the sub-account +List all API Key of the sub-account. ### Example @@ -247,10 +247,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id +user_id = 56 # int | Sub-account user id. try: - # List all API Key of the sub-account + # List all API Key of the sub-account. api_response = api_instance.list_sub_account_keys(user_id) print(api_response) except GateApiException as ex: @@ -263,7 +263,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | + **user_id** | **int**| Sub-account user id. | ### Return type @@ -281,14 +281,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_sub_account_keys** > SubAccountKey create_sub_account_keys(user_id, sub_account_key) -Create API Key of the sub-account +Create API Key of the sub-account. ### Example @@ -314,11 +314,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id +user_id = 56 # int | Sub-account user id. sub_account_key = gate_api.SubAccountKey() # SubAccountKey | try: - # Create API Key of the sub-account + # Create API Key of the sub-account. api_response = api_instance.create_sub_account_keys(user_id, sub_account_key) print(api_response) except GateApiException as ex: @@ -331,7 +331,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | + **user_id** | **int**| Sub-account user id. | **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | ### Return type @@ -350,14 +350,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Created Successfully | - | +**200** | Created Successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_sub_account_key** > SubAccountKey get_sub_account_key(user_id, key) -Get the API Key of the sub-account +Get the API Key of the sub-account. ### Example @@ -383,11 +383,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id -key = 'key_example' # str | The API Key of the sub-account +user_id = 56 # int | Sub-account user id. +key = 'key_example' # str | The API Key of the sub-account. try: - # Get the API Key of the sub-account + # Get the API Key of the sub-account. api_response = api_instance.get_sub_account_key(user_id, key) print(api_response) except GateApiException as ex: @@ -400,8 +400,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - **key** | **str**| The API Key of the sub-account | + **user_id** | **int**| Sub-account user id. | + **key** | **str**| The API Key of the sub-account. | ### Return type @@ -419,14 +419,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful | - | +**200** | Successful. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_sub_account_keys** > update_sub_account_keys(user_id, key, sub_account_key) -Update API key of the sub-account +Update API key of the sub-account. ### Example @@ -452,12 +452,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id -key = 'key_example' # str | The API Key of the sub-account +user_id = 56 # int | Sub-account user id. +key = 'key_example' # str | The API Key of the sub-account. sub_account_key = gate_api.SubAccountKey() # SubAccountKey | try: - # Update API key of the sub-account + # Update API key of the sub-account. api_instance.update_sub_account_keys(user_id, key, sub_account_key) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -469,8 +469,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - **key** | **str**| The API Key of the sub-account | + **user_id** | **int**| Sub-account user id. | + **key** | **str**| The API Key of the sub-account. | **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | ### Return type @@ -489,14 +489,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Updated | - | +**204** | Updated. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_sub_account_keys** > delete_sub_account_keys(user_id, key) -Delete API key of the sub-account +Delete API key of the sub-account. ### Example @@ -522,11 +522,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id -key = 'key_example' # str | The API Key of the sub-account +user_id = 56 # int | Sub-account user id. +key = 'key_example' # str | The API Key of the sub-account. try: - # Delete API key of the sub-account + # Delete API key of the sub-account. api_instance.delete_sub_account_keys(user_id, key) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -538,8 +538,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id | - **key** | **str**| The API Key of the sub-account | + **user_id** | **int**| Sub-account user id. | + **key** | **str**| The API Key of the sub-account. | ### Return type @@ -557,14 +557,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Delete successfully | - | +**204** | Delete successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **lock_sub_account** > lock_sub_account(user_id) -Lock the sub-account +Lock the sub-account. ### Example @@ -590,10 +590,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | The user id of the sub-account +user_id = 56 # int | The user id of the sub-account. try: - # Lock the sub-account + # Lock the sub-account. api_instance.lock_sub_account(user_id) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -605,7 +605,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| The user id of the sub-account | + **user_id** | **int**| The user id of the sub-account. | ### Return type @@ -623,14 +623,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Lock successfully | - | +**204** | Lock successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **unlock_sub_account** > unlock_sub_account(user_id) -Unlock the sub-account +Unlock the sub-account. ### Example @@ -656,10 +656,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | The user id of the sub-account +user_id = 56 # int | The user id of the sub-account. try: - # Unlock the sub-account + # Unlock the sub-account. api_instance.unlock_sub_account(user_id) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -671,7 +671,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| The user id of the sub-account | + **user_id** | **int**| The user id of the sub-account. | ### Return type @@ -689,14 +689,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Unlock successfully | - | +**204** | Unlock successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_mode** > list[SubUserMode] list_unified_mode() -Get sub-account mode +Get sub-account mode. Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode @@ -726,7 +726,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SubAccountApi(api_client) try: - # Get sub-account mode + # Get sub-account mode. api_response = api_instance.list_unified_mode() print(api_response) except GateApiException as ex: @@ -754,7 +754,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SubAccountBalance.md b/docs/SubAccountBalance.md index 753d3dd..5927e74 100644 --- a/docs/SubAccountBalance.md +++ b/docs/SubAccountBalance.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] -**available** | **dict(str, str)** | Available balances of currencies | [optional] +**uid** | **str** | User ID. | [optional] +**available** | **dict(str, str)** | Available balances of currencies. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountCrossMarginBalance.md b/docs/SubAccountCrossMarginBalance.md index ebb3791..586ea60 100644 --- a/docs/SubAccountCrossMarginBalance.md +++ b/docs/SubAccountCrossMarginBalance.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] +**uid** | **str** | User ID. | [optional] **available** | [**SubCrossMarginAccount**](.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/SubAccountFuturesBalance.md b/docs/SubAccountFuturesBalance.md index d5ddf25..f3a9231 100644 --- a/docs/SubAccountFuturesBalance.md +++ b/docs/SubAccountFuturesBalance.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] -**available** | [**dict(str, FuturesAccount)**](FuturesAccount.md) | Futures account balances | [optional] +**uid** | **str** | User ID. | [optional] +**available** | [**dict(str, FuturesAccount)**](FuturesAccount.md) | Futures account balances. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountKey.md b/docs/SubAccountKey.md index 9ae041d..fdc7ff1 100644 --- a/docs/SubAccountKey.md +++ b/docs/SubAccountKey.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] [readonly] -**mode** | **int** | Mode: 1 - classic 2 - portfolio account | [optional] -**name** | **str** | API key name | [optional] +**user_id** | **int** | User ID. | [optional] [readonly] +**mode** | **int** | Mode: 1 - classic 2 - portfolio account. | [optional] +**name** | **str** | API key name. | [optional] **perms** | [**list[SubAccountKeyPerms]**](SubAccountKeyPerms.md) | | [optional] -**ip_whitelist** | **list[str]** | ip white list (list will be removed if no value is passed) | [optional] -**key** | **str** | API Key | [optional] [readonly] -**state** | **int** | State 1 - normal 2 - locked 3 - frozen | [optional] [readonly] -**created_at** | **int** | Creation time | [optional] [readonly] -**updated_at** | **int** | Last update time | [optional] [readonly] -**last_access** | **int** | Last access time | [optional] [readonly] +**ip_whitelist** | **list[str]** | ip white list (list will be removed if no value is passed). | [optional] +**key** | **str** | API Key. | [optional] [readonly] +**state** | **int** | State 1 - normal 2 - locked 3 - frozen. | [optional] [readonly] +**created_at** | **int** | Creation time. | [optional] [readonly] +**updated_at** | **int** | Last update time. | [optional] [readonly] +**last_access** | **int** | Last access time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountKeyPerms.md b/docs/SubAccountKeyPerms.md index ed59a5b..0c8eb3e 100644 --- a/docs/SubAccountKeyPerms.md +++ b/docs/SubAccountKeyPerms.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy | [optional] -**read_only** | **bool** | read only | [optional] +**read_only** | **bool** | read only. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountMarginBalance.md b/docs/SubAccountMarginBalance.md index 817fd31..7a648d5 100644 --- a/docs/SubAccountMarginBalance.md +++ b/docs/SubAccountMarginBalance.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID | [optional] -**available** | [**list[MarginAccount]**](MarginAccount.md) | Margin account balances | [optional] +**uid** | **str** | User ID. | [optional] +**available** | [**list[MarginAccount]**](MarginAccount.md) | Margin account balances. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountToSubAccount.md b/docs/SubAccountToSubAccount.md index 9879c80..0f201a8 100644 --- a/docs/SubAccountToSubAccount.md +++ b/docs/SubAccountToSubAccount.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Transfer currency name | +**currency** | **str** | Transfer currency name. | **sub_account_type** | **str** | Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional] -**sub_account_from** | **str** | Transfer from the user id of the sub-account | +**sub_account_from** | **str** | Transfer from the user id of the sub-account. | **sub_account_from_type** | **str** | The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. | -**sub_account_to** | **str** | Transfer to the user id of the sub-account | +**sub_account_to** | **str** | Transfer to the user id of the sub-account. | **sub_account_to_type** | **str** | Transferred sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account | -**amount** | **str** | Transfer amount | +**amount** | **str** | Transfer amount. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md index ee76547..4724a8d 100644 --- a/docs/SubAccountTransfer.md +++ b/docs/SubAccountTransfer.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sub_account** | **str** | Sub account user ID | +**sub_account** | **str** | Sub account user ID. | **sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] -**currency** | **str** | Transfer currency name | -**amount** | **str** | Transfer amount | +**currency** | **str** | Transfer currency name. | +**amount** | **str** | Transfer amount. | **direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | **client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] diff --git a/docs/SubAccountTransferRecordItem.md b/docs/SubAccountTransferRecordItem.md index a9fd83c..a0c42d5 100644 --- a/docs/SubAccountTransferRecordItem.md +++ b/docs/SubAccountTransferRecordItem.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timest** | **str** | Transfer timestamp | [optional] [readonly] -**uid** | **str** | Main account user ID | [optional] [readonly] -**sub_account** | **str** | Sub account user ID | +**timest** | **str** | Transfer timestamp. | [optional] [readonly] +**uid** | **str** | Main account user ID. | [optional] [readonly] +**sub_account** | **str** | Sub account user ID. | **sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] -**currency** | **str** | Transfer currency name | -**amount** | **str** | Transfer amount | +**currency** | **str** | Transfer currency name. | +**amount** | **str** | Transfer amount. | **direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | -**source** | **str** | Where the operation is initiated from | [optional] [readonly] +**source** | **str** | Where the operation is initiated from. | [optional] [readonly] **client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] -**status** | **str** | Sub-account transfer record status, currently only success | [optional] +**status** | **str** | Sub-account transfer record status, currently only success. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md index 24a1bb4..8ee99f1 100644 --- a/docs/SubCrossMarginAccount.md +++ b/docs/SubCrossMarginAccount.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_id** | **int** | User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account | [optional] -**locked** | **bool** | Whether account is locked | [optional] +**locked** | **bool** | Whether account is locked. | [optional] **balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional] **total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] **borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] -**borrowed_net** | **str** | Total borrowed value in USDT * borrowed factor | [optional] -**net** | **str** | Total net assets in USDT | [optional] -**leverage** | **str** | Position leverage | [optional] +**borrowed_net** | **str** | Total borrowed value in USDT * borrowed factor. | [optional] +**net** | **str** | Total net assets in USDT. | [optional] +**leverage** | **str** | Position leverage. | [optional] **interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] **risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] -**total_initial_margin** | **str** | Total initial margin | [optional] -**total_margin_balance** | **str** | Total margin balance | [optional] -**total_maintenance_margin** | **str** | Total maintenance margin | [optional] -**total_initial_margin_rate** | **str** | Total initial margin rate | [optional] -**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional] -**total_available_margin** | **str** | Total available margin | [optional] +**total_initial_margin** | **str** | Total initial margin. | [optional] +**total_margin_balance** | **str** | Total margin balance. | [optional] +**total_maintenance_margin** | **str** | Total maintenance margin. | [optional] +**total_initial_margin_rate** | **str** | Total initial margin rate. | [optional] +**total_maintenance_margin_rate** | **str** | Total maintenance margin rate. | [optional] +**total_available_margin** | **str** | Total available margin. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubUserMode.md b/docs/SubUserMode.md index 137ad4b..7f2067a 100644 --- a/docs/SubUserMode.md +++ b/docs/SubUserMode.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**is_unified** | **bool** | Is it a unified account? | [optional] +**user_id** | **int** | User ID. | [optional] +**is_unified** | **bool** | Is it a unified account?. | [optional] **mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SwapCoin.md b/docs/SwapCoin.md index 984adbf..ed922e4 100644 --- a/docs/SwapCoin.md +++ b/docs/SwapCoin.md @@ -1,13 +1,13 @@ # SwapCoin -Blockchain Mining +Blockchain Mining. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**coin** | **str** | Currency | -**side** | **str** | 0 - Stake 1 - Redeem | -**amount** | **str** | Size | -**pid** | **int** | DeFi-type Mining Protocol Identifier | [optional] +**coin** | **str** | Currency. | +**side** | **str** | 0 - Stake 1 - Redeem. | +**amount** | **str** | Size. | +**pid** | **int** | DeFi-type Mining Protocol Identifier. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SwapCoinStruct.md b/docs/SwapCoinStruct.md index b7a68fa..6085062 100644 --- a/docs/SwapCoinStruct.md +++ b/docs/SwapCoinStruct.md @@ -3,15 +3,21 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**uid** | **int** | User ID | [optional] -**coin** | **str** | Currency | [optional] -**type** | **int** | Type: 0-Lock, 1-Certificate | [optional] -**amount** | **str** | Amount | [optional] -**exchange_rate** | **str** | Exchange Ratio | [optional] -**pid** | **int** | Plan ID | [optional] -**status** | **int** | status 1-success | [optional] -**create_stamp** | **int** | Transaction timestamp | [optional] +**id** | **int** | Order ID. | [optional] +**pid** | **int** | Plan ID. | [optional] +**uid** | **int** | User ID. | [optional] +**coin** | **str** | Currency. | [optional] +**type** | **int** | 类型 0-质押 1-赎回 | [optional] +**subtype** | **str** | 子类型 | [optional] +**amount** | **str** | Amount. | [optional] +**exchange_rate** | **str** | Exchange Ratio. | [optional] +**exchange_amount** | **str** | 兑换金额 | [optional] +**update_stamp** | **int** | 更新时间戳 | [optional] +**create_stamp** | **int** | Transaction timestamp. | [optional] +**status** | **int** | status 1-success. | [optional] +**protocol_type** | **int** | DEFI协议类型 | [optional] +**client_order_id** | **str** | 参考ID | [optional] +**source** | **str** | Order source. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SystemTime.md b/docs/SystemTime.md index abcf889..c746f50 100644 --- a/docs/SystemTime.md +++ b/docs/SystemTime.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**server_time** | **int** | Server current time(ms) | [optional] +**server_time** | **int** | Server current time(ms). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Ticker.md b/docs/Ticker.md index 4a104eb..dde227e 100644 --- a/docs/Ticker.md +++ b/docs/Ticker.md @@ -3,23 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair | [optional] -**last** | **str** | Last trading price | [optional] -**lowest_ask** | **str** | Recent lowest ask | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**last** | **str** | Last trading price. | [optional] +**lowest_ask** | **str** | Recent lowest ask. | [optional] **lowest_size** | **str** | The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] -**highest_bid** | **str** | Recent highest bid | [optional] +**highest_bid** | **str** | Recent highest bid. | [optional] **highest_size** | **str** | The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] -**change_percentage** | **str** | Change percentage in the last 24h | [optional] -**change_utc0** | **str** | utc0 timezone, the percentage change in the last 24 hours | [optional] -**change_utc8** | **str** | utc8 timezone, the percentage change in the last 24 hours | [optional] -**base_volume** | **str** | Base currency trade volume in the last 24h | [optional] -**quote_volume** | **str** | Quote currency trade volume in the last 24h | [optional] -**high_24h** | **str** | Highest price in 24h | [optional] -**low_24h** | **str** | Lowest price in 24h | [optional] -**etf_net_value** | **str** | ETF net value | [optional] -**etf_pre_net_value** | **str** | ETF previous net value at re-balancing time | [optional] -**etf_pre_timestamp** | **int** | ETF previous re-balancing time | [optional] -**etf_leverage** | **str** | ETF current leverage | [optional] +**change_percentage** | **str** | Change percentage in the last 24h. | [optional] +**change_utc0** | **str** | utc0 timezone, the percentage change in the last 24 hours. | [optional] +**change_utc8** | **str** | utc8 timezone, the percentage change in the last 24 hours. | [optional] +**base_volume** | **str** | Base currency trade volume in the last 24h. | [optional] +**quote_volume** | **str** | Quote currency trade volume in the last 24h. | [optional] +**high_24h** | **str** | Highest price in 24h. | [optional] +**low_24h** | **str** | Lowest price in 24h. | [optional] +**etf_net_value** | **str** | ETF net value. | [optional] +**etf_pre_net_value** | **str** | ETF previous net value at re-balancing time. | [optional] +**etf_pre_timestamp** | **int** | ETF previous re-balancing time. | [optional] +**etf_leverage** | **str** | ETF current leverage. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TotalBalance.md b/docs/TotalBalance.md index 91b929e..e1a1269 100644 --- a/docs/TotalBalance.md +++ b/docs/TotalBalance.md @@ -1,6 +1,6 @@ # TotalBalance -User's balance in all accounts +User's balance in all accounts. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Trade.md b/docs/Trade.md index fb513f5..6ccc74d 100644 --- a/docs/Trade.md +++ b/docs/Trade.md @@ -3,22 +3,22 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Trade ID | [optional] -**create_time** | **str** | Trading time | [optional] -**create_time_ms** | **str** | Trading time, with millisecond precision | [optional] -**currency_pair** | **str** | Currency pair | [optional] -**side** | **str** | Buy or sell order | [optional] -**role** | **str** | Trade role. No value in public endpoints | [optional] -**amount** | **str** | Trade amount | [optional] -**price** | **str** | Order price | [optional] -**order_id** | **str** | Related order ID. No value in public endpoints | [optional] -**fee** | **str** | Fee deducted. No value in public endpoints | [optional] -**fee_currency** | **str** | Fee currency unit. No value in public endpoints | [optional] -**point_fee** | **str** | Points used to deduct fee. No value in public endpoints | [optional] -**gt_fee** | **str** | GT used to deduct fee. No value in public endpoints | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] +**id** | **str** | Trade ID. | [optional] +**create_time** | **str** | Trading time. | [optional] +**create_time_ms** | **str** | Trading time, with millisecond precision. | [optional] +**currency_pair** | **str** | Currency pair. | [optional] +**side** | **str** | Buy or sell order. | [optional] +**role** | **str** | Trade role. No value in public endpoints. | [optional] +**amount** | **str** | Trade amount. | [optional] +**price** | **str** | Order price. | [optional] +**order_id** | **str** | Related order ID. No value in public endpoints. | [optional] +**fee** | **str** | Fee deducted. No value in public endpoints. | [optional] +**fee_currency** | **str** | Fee currency unit. No value in public endpoints. | [optional] +**point_fee** | **str** | Points used to deduct fee. No value in public endpoints. | [optional] +**gt_fee** | **str** | GT used to deduct fee. No value in public endpoints. | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] **sequence_id** | **str** | Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market | [optional] -**text** | **str** | User defined information. No value in public endpoints | [optional] +**text** | **str** | User defined information. No value in public endpoints. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TradeFee.md b/docs/TradeFee.md index a75fdab..f887e70 100644 --- a/docs/TradeFee.md +++ b/docs/TradeFee.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**taker_fee** | **str** | taker fee rate | [optional] -**maker_fee** | **str** | maker fee rate | [optional] -**gt_discount** | **bool** | If GT deduction is enabled | [optional] +**user_id** | **int** | User ID. | [optional] +**taker_fee** | **str** | taker fee rate. | [optional] +**maker_fee** | **str** | maker fee rate. | [optional] +**gt_discount** | **bool** | If GT deduction is enabled. | [optional] **gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] **gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**loan_fee** | **str** | Loan fee rate of margin lending | [optional] -**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009 | [optional] -**futures_taker_fee** | **str** | Futures trading taker fee | [optional] -**futures_maker_fee** | **str** | Future trading maker fee | [optional] -**delivery_taker_fee** | **str** | Delivery trading taker fee | [optional] -**delivery_maker_fee** | **str** | Delivery trading maker fee | [optional] +**loan_fee** | **str** | Loan fee rate of margin lending. | [optional] +**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009. | [optional] +**futures_taker_fee** | **str** | Futures trading taker fee. | [optional] +**futures_maker_fee** | **str** | Future trading maker fee. | [optional] +**delivery_taker_fee** | **str** | Delivery trading taker fee. | [optional] +**delivery_maker_fee** | **str** | Delivery trading maker fee. | [optional] **debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransactionID.md b/docs/TransactionID.md index 040c3c3..b8ea4fb 100644 --- a/docs/TransactionID.md +++ b/docs/TransactionID.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tx_id** | **int** | Order id | [optional] +**tx_id** | **int** | Order id. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Transfer.md b/docs/Transfer.md index 85415bd..5ab897e 100644 --- a/docs/Transfer.md +++ b/docs/Transfer.md @@ -5,10 +5,10 @@ Accounts available to transfer: - `spot`: spot account - `margin`: margin accou Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **str** | Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency | -**_from** | **str** | Account to transfer from | -**to** | **str** | Account to transfer to | -**amount** | **str** | Transfer amount | -**currency_pair** | **str** | Margin currency pair. Required if transfer from or to margin account | [optional] +**_from** | **str** | Account to transfer from. | +**to** | **str** | Account to transfer to. | +**amount** | **str** | Transfer amount. | +**currency_pair** | **str** | Margin currency pair. Required if transfer from or to margin account. | [optional] **settle** | **str** | Futures settle currency. Required if transferring from or to futures account | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransferOrderStatus.md b/docs/TransferOrderStatus.md index c5ffc42..1747331 100644 --- a/docs/TransferOrderStatus.md +++ b/docs/TransferOrderStatus.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tx_id** | **str** | Order id | [optional] +**tx_id** | **str** | Order id. | [optional] **status** | **str** | Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransferablesResult.md b/docs/TransferablesResult.md index 768c2cc..fb48a0a 100644 --- a/docs/TransferablesResult.md +++ b/docs/TransferablesResult.md @@ -1,11 +1,11 @@ # TransferablesResult -Batch query unified account can be transferred up to a maximum of results +Batch query unified account can be transferred up to a maximum of results. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | The maximum amount that can be transferred out | [optional] +**currency** | **str** | Currency detail. | [optional] +**amount** | **str** | The maximum amount that can be transferred out. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TriggerOrderResponse.md b/docs/TriggerOrderResponse.md index 6f44aa3..6df39d4 100644 --- a/docs/TriggerOrderResponse.md +++ b/docs/TriggerOrderResponse.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Auto order ID | [optional] +**id** | **int** | Auto 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/TriggerTime.md b/docs/TriggerTime.md index 702ff62..abec3d8 100644 --- a/docs/TriggerTime.md +++ b/docs/TriggerTime.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trigger_time** | **int** | Timestamp of the end of the countdown, in milliseconds | [optional] +**trigger_time** | **int** | Timestamp of the end of the countdown, in milliseconds. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UidPushOrder.md b/docs/UidPushOrder.md index 8d5ca0a..4b58560 100644 --- a/docs/UidPushOrder.md +++ b/docs/UidPushOrder.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] -**push_uid** | **int** | Initiator User ID | [optional] -**receive_uid** | **int** | Recipient User ID | [optional] -**currency** | **str** | Currency name | [optional] -**amount** | **str** | Transfer amount | [optional] -**create_time** | **int** | Creation time | [optional] +**id** | **int** | Order ID. | [optional] +**push_uid** | **int** | Initiator User ID. | [optional] +**receive_uid** | **int** | Recipient User ID. | [optional] +**currency** | **str** | Currency name. | [optional] +**amount** | **str** | Transfer amount. | [optional] +**create_time** | **int** | Creation time. | [optional] **status** | **str** | Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success | [optional] -**message** | **str** | PENDING Reason Tips | [optional] -**transaction_type** | **str** | Order Type | [optional] +**message** | **str** | PENDING Reason Tips. | [optional] +**transaction_type** | **str** | Order Type. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UidPushWithdrawal.md b/docs/UidPushWithdrawal.md index 2510006..6b60d98 100644 --- a/docs/UidPushWithdrawal.md +++ b/docs/UidPushWithdrawal.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**receive_uid** | **int** | Recipient UID | -**currency** | **str** | Currency name | -**amount** | **str** | Transfer amount | +**receive_uid** | **int** | Recipient UID. | +**currency** | **str** | Currency name. | +**amount** | **str** | Transfer amount. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UidPushWithdrawalResp.md b/docs/UidPushWithdrawalResp.md index 5363c0f..ff67310 100644 --- a/docs/UidPushWithdrawalResp.md +++ b/docs/UidPushWithdrawalResp.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID | [optional] +**id** | **int** | Order ID. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniCurrency.md b/docs/UniCurrency.md index 6810b7e..b292331 100644 --- a/docs/UniCurrency.md +++ b/docs/UniCurrency.md @@ -1,14 +1,14 @@ # UniCurrency -Currency detail +Currency detail. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] [readonly] +**currency** | **str** | Currency name. | [optional] [readonly] **min_lend_amount** | **str** | The minimum lending amount, in the unit of the currency. | [optional] [readonly] -**max_lend_amount** | **str** | The total maximum lending amount, in USDT | [optional] [readonly] -**max_rate** | **str** | Maximum rate (Hourly) | [optional] [readonly] -**min_rate** | **str** | Minimum rate (Hourly) | [optional] [readonly] +**max_lend_amount** | **str** | The total maximum lending amount, in USDT. | [optional] [readonly] +**max_rate** | **str** | Maximum rate (Hourly). | [optional] [readonly] +**min_rate** | **str** | Minimum rate (Hourly). | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniCurrencyInterest.md b/docs/UniCurrencyInterest.md index 83e9546..9cdac87 100644 --- a/docs/UniCurrencyInterest.md +++ b/docs/UniCurrencyInterest.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniCurrencyPair.md b/docs/UniCurrencyPair.md index 4e0d0c6..1f9577a 100644 --- a/docs/UniCurrencyPair.md +++ b/docs/UniCurrencyPair.md @@ -1,13 +1,13 @@ # UniCurrencyPair -Currency pair of the loan +Currency pair of the loan. ## Properties 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] +**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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniInterestRecord.md b/docs/UniInterestRecord.md index da15cea..380e96f 100644 --- a/docs/UniInterestRecord.md +++ b/docs/UniInterestRecord.md @@ -1,15 +1,15 @@ # UniInterestRecord -Interest Record +Interest Record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**actual_rate** | **str** | Actual Rate | [optional] [readonly] -**interest** | **str** | Interest | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] +**status** | **int** | Status: 0 - fail, 1 - success. | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**actual_rate** | **str** | Actual Rate. | [optional] [readonly] +**interest** | **str** | Interest. | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly] +**create_time** | **int** | Created time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLend.md b/docs/UniLend.md index 8d7288a..71024a2 100644 --- a/docs/UniLend.md +++ b/docs/UniLend.md @@ -1,19 +1,19 @@ # UniLend -Loan record +Loan record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**current_amount** | **str** | Current amount | [optional] [readonly] -**amount** | **str** | Total amount | [optional] [readonly] -**lent_amount** | **str** | Lent amount | [optional] [readonly] -**frozen_amount** | **str** | Frozen amount | [optional] [readonly] -**min_rate** | **str** | Minimum interest rate | [optional] [readonly] -**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment | [optional] [readonly] -**reinvest_left_amount** | **str** | Amount not reinvested | [optional] [readonly] -**create_time** | **int** | Created time of the lending order | [optional] [readonly] -**update_time** | **int** | Upated time of the lending order | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**current_amount** | **str** | Current amount. | [optional] [readonly] +**amount** | **str** | Total amount. | [optional] [readonly] +**lent_amount** | **str** | Lent amount. | [optional] [readonly] +**frozen_amount** | **str** | Frozen amount. | [optional] [readonly] +**min_rate** | **str** | Minimum interest rate. | [optional] [readonly] +**interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly] +**reinvest_left_amount** | **str** | Amount not reinvested. | [optional] [readonly] +**create_time** | **int** | Created time of the lending order. | [optional] [readonly] +**update_time** | **int** | Upated time of the lending order. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLendInterest.md b/docs/UniLendInterest.md index 18a0815..552f3ed 100644 --- a/docs/UniLendInterest.md +++ b/docs/UniLendInterest.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**interest** | **str** | Interest | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**interest** | **str** | Interest. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLendRecord.md b/docs/UniLendRecord.md index 294f6d8..69046fe 100644 --- a/docs/UniLendRecord.md +++ b/docs/UniLendRecord.md @@ -1,16 +1,16 @@ # UniLendRecord -Interest Record +Interest Record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] [readonly] -**amount** | **str** | current amount | [optional] [readonly] -**last_wallet_amount** | **str** | Last wallet amount | [optional] [readonly] -**last_lent_amount** | **str** | Last lent amount | [optional] [readonly] -**last_frozen_amount** | **str** | Last frozen amount | [optional] [readonly] -**type** | **str** | Record type: lend - lend, redeem - redeem | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] +**currency** | **str** | Currency name. | [optional] [readonly] +**amount** | **str** | current amount. | [optional] [readonly] +**last_wallet_amount** | **str** | Last wallet amount. | [optional] [readonly] +**last_lent_amount** | **str** | Last lent amount. | [optional] [readonly] +**last_frozen_amount** | **str** | Last frozen amount. | [optional] [readonly] +**type** | **str** | Record type: lend - lend, redeem - redeem. | [optional] [readonly] +**create_time** | **int** | Created time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLoan.md b/docs/UniLoan.md index 6e28454..5ba0c26 100644 --- a/docs/UniLoan.md +++ b/docs/UniLoan.md @@ -1,15 +1,15 @@ # UniLoan -Loan +Loan. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**amount** | **str** | amount | [optional] [readonly] -**type** | **str** | Loan type, platform - platform, margin - margin | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] -**update_time** | **int** | Updated time | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**currency_pair** | **str** | Currency pair. | [optional] [readonly] +**amount** | **str** | amount. | [optional] [readonly] +**type** | **str** | Loan type, platform - platform, margin - margin. | [optional] [readonly] +**create_time** | **int** | Created time. | [optional] [readonly] +**update_time** | **int** | Updated time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLoanInterestRecord.md b/docs/UniLoanInterestRecord.md index 01c41f8..ba2d464 100644 --- a/docs/UniLoanInterestRecord.md +++ b/docs/UniLoanInterestRecord.md @@ -1,16 +1,16 @@ # UniLoanInterestRecord -Interest record +Interest record. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**actual_rate** | **str** | Actual rate | [optional] [readonly] -**interest** | **str** | Interest | [optional] [readonly] -**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] -**type** | **str** | Type, platform - platform,margin - margin | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] +**currency** | **str** | Currency name. | [optional] [readonly] +**currency_pair** | **str** | Currency pair. | [optional] [readonly] +**actual_rate** | **str** | Actual rate. | [optional] [readonly] +**interest** | **str** | Interest. | [optional] [readonly] +**status** | **int** | Status: 0 - fail, 1 - success. | [optional] [readonly] +**type** | **str** | Type, platform - platform,margin - margin. | [optional] [readonly] +**create_time** | **int** | Created time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLoanRecord.md b/docs/UniLoanRecord.md index 93fd89e..4168177 100644 --- a/docs/UniLoanRecord.md +++ b/docs/UniLoanRecord.md @@ -1,14 +1,14 @@ # UniLoanRecord -Loan records +Loan records. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**amount** | **str** | The amount of lending or repaying | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] +**type** | **str** | type: borrow - borrow, repay - repay. | [optional] [readonly] +**currency_pair** | **str** | Currency pair. | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**amount** | **str** | The amount of lending or repaying. | [optional] [readonly] +**create_time** | **int** | Created time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md index 6afea83..c23f933 100644 --- a/docs/UnifiedAccount.md +++ b/docs/UnifiedAccount.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] -**refresh_time** | **int** | Time of the most recent refresh | [optional] +**user_id** | **int** | User ID. | [optional] +**refresh_time** | **int** | Time of the most recent refresh. | [optional] **locked** | **bool** | Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode | [optional] **balances** | [**dict(str, UnifiedBalance)**](UnifiedBalance.md) | | [optional] -**total** | **str** | Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) | [optional] +**total** | **str** | Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) | [optional] **borrowed** | **str** | The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. | [optional] **total_initial_margin** | **str** | Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **total_margin_balance** | **str** | Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] @@ -18,11 +18,11 @@ Name | Type | Description | Notes **unified_account_total** | **str** | Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode | [optional] **unified_account_total_liab** | **str** | Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode | [optional] **unified_account_total_equity** | **str** | Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode | [optional] -**leverage** | **str** | Actual leverage, valid in cross-currency margin/combined margin mode | [optional] [readonly] +**leverage** | **str** | Actual leverage, valid in cross-currency margin/combined margin mode. | [optional] [readonly] **spot_order_loss** | **str** | Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] -**use_funding** | **bool** | Whether to use funds as margin | [optional] -**is_all_collateral** | **bool** | Whether all currencies are used as margin, true - All currencies are used as margin, false - No | [optional] +**use_funding** | **bool** | Whether to use funds as margin. | [optional] +**is_all_collateral** | **bool** | Whether all currencies are used as margin, true - false - No | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md index 276aade..f6b4d58 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -4,34 +4,34 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_unified_accounts**](UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information -[**get_unified_borrowable**](UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account -[**get_unified_transferable**](UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account +[**list_unified_accounts**](UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information. +[**get_unified_borrowable**](UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account. +[**get_unified_transferable**](UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account. [**get_unified_transferables**](UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. -[**get_unified_borrowable_list**](UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum -[**list_unified_loans**](UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans -[**create_unified_loan**](UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay -[**list_unified_loan_records**](UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records -[**list_unified_loan_interest_records**](UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records -[**get_unified_risk_units**](UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details -[**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account -[**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account -[**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate -[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers -[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers -[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator -[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency -[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage -[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account -[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates -[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency +[**get_unified_borrowable_list**](UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum. +[**list_unified_loans**](UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans. +[**create_unified_loan**](UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay. +[**list_unified_loan_records**](UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records. +[**list_unified_loan_interest_records**](UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records. +[**get_unified_risk_units**](UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details. +[**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account. +[**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account. +[**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate. +[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers. +[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers. +[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator. +[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency. +[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage. +[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account. +[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates. +[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency. # **list_unified_accounts** > UnifiedAccount list_unified_accounts(currency=currency, sub_uid=sub_uid) -Get unified account information +Get unified account information. The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation @@ -59,11 +59,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -sub_uid = '10001' # str | Sub account user ID (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +sub_uid = '10001' # str | Sub account user ID. (optional) try: - # Get unified account information + # Get unified account information. api_response = api_instance.list_unified_accounts(currency=currency, sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -76,8 +76,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **sub_uid** | **str**| Sub account user ID | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **sub_uid** | **str**| Sub account user ID. | [optional] ### Return type @@ -95,14 +95,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_borrowable** > UnifiedBorrowable get_unified_borrowable(currency) -Query about the maximum borrowing for the unified account +Query about the maximum borrowing for the unified account. ### Example @@ -128,10 +128,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency +currency = 'BTC' # str | Retrieve data of the specified currency. try: - # Query about the maximum borrowing for the unified account + # Query about the maximum borrowing for the unified account. api_response = api_instance.get_unified_borrowable(currency) print(api_response) except GateApiException as ex: @@ -144,7 +144,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | + **currency** | **str**| Retrieve data of the specified currency. | ### Return type @@ -162,14 +162,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_transferable** > UnifiedTransferable get_unified_transferable(currency) -Query about the maximum transferable for the unified account +Query about the maximum transferable for the unified account. ### Example @@ -195,10 +195,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency +currency = 'BTC' # str | Retrieve data of the specified currency. try: - # Query about the maximum transferable for the unified account + # Query about the maximum transferable for the unified account. api_response = api_instance.get_unified_transferable(currency) print(api_response) except GateApiException as ex: @@ -211,7 +211,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | + **currency** | **str**| Retrieve data of the specified currency. | ### Return type @@ -229,7 +229,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -296,14 +296,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_borrowable_list** > list[UnifiedBorrowable1] get_unified_borrowable_list(currencies) -Batch query unified account can be borrowed up to a maximum +Batch query unified account can be borrowed up to a maximum. ### Example @@ -332,7 +332,7 @@ api_instance = gate_api.UnifiedApi(api_client) currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. try: - # Batch query unified account can be borrowed up to a maximum + # Batch query unified account can be borrowed up to a maximum. api_response = api_instance.get_unified_borrowable_list(currencies) print(api_response) except GateApiException as ex: @@ -363,14 +363,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_loans** > list[UniLoan] list_unified_loans(currency=currency, page=page, limit=limit, type=type) -List loans +List loans. ### Example @@ -396,13 +396,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -type = 'platform' # str | Loan type, platform - platform, margin - margin (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +type = 'platform' # str | Loan type, platform - platform, margin - margin. (optional) try: - # List loans + # List loans. api_response = api_instance.list_unified_loans(currency=currency, page=page, limit=limit, type=type) print(api_response) except GateApiException as ex: @@ -415,10 +415,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **type** | **str**| Loan type, platform - platform, margin - margin | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **type** | **str**| Loan type, platform - platform, margin - margin. | [optional] ### Return type @@ -436,16 +436,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_unified_loan** > UnifiedLoanResult create_unified_loan(unified_loan) -Borrow or repay +Borrow or repay. -When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` +When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the available by setting the parameter `repaid_all=true` ### Example @@ -474,7 +474,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_loan = gate_api.UnifiedLoan() # UnifiedLoan | try: - # Borrow or repay + # Borrow or repay. api_response = api_instance.create_unified_loan(unified_loan) print(api_response) except GateApiException as ex: @@ -505,14 +505,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully | - | +**200** | Operated successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_loan_records** > list[UnifiedLoanRecord] list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) -Get load records +Get load records. ### Example @@ -538,13 +538,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -type = 'type_example' # str | The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds (optional) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +type = 'type_example' # str | The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) try: - # Get load records + # Get load records. api_response = api_instance.list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -557,10 +557,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds | [optional] - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **type** | **str**| The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] ### Return type @@ -578,14 +578,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_loan_interest_records** > list[UniLoanInterestRecord] list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) -List interest records +List interest records. ### Example @@ -611,15 +611,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) -_from = 1627706330 # int | Start timestamp of the query (optional) -to = 1635329650 # int | Time range ending, default to current time (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +_from = 1627706330 # int | Start timestamp of the query. (optional) +to = 1635329650 # int | Time range ending, default to current time. (optional) type = 'platform' # str | Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin (optional) try: - # List interest records + # List interest records. api_response = api_instance.list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -632,11 +632,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query | [optional] - **to** | **int**| Time range ending, default to current time | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **_from** | **int**| Start timestamp of the query. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] **type** | **str**| Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin | [optional] ### Return type @@ -655,16 +655,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_risk_units** > UnifiedRiskUnits get_unified_risk_units() -Get user risk unit details +Get user risk unit details. -Retrieve user risk unit details, only valid in portfolio margin mode +Retrieve user risk unit details, only valid in portfolio margin mode. ### Example @@ -692,7 +692,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # Get user risk unit details + # Get user risk unit details. api_response = api_instance.get_unified_risk_units() print(api_response) except GateApiException as ex: @@ -720,14 +720,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_mode** > UnifiedModeSet get_unified_mode() -Query mode of the unified account +Query mode of the unified account. Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode @@ -757,7 +757,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # Query mode of the unified account + # Query mode of the unified account. api_response = api_instance.get_unified_mode() print(api_response) except GateApiException as ex: @@ -785,16 +785,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_unified_mode** > set_unified_mode(unified_mode_set) -Set mode of the unified account +Set mode of the unified account. -Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` +Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` ### Example @@ -823,7 +823,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_mode_set = gate_api.UnifiedModeSet() # UnifiedModeSet | try: - # Set mode of the unified account + # Set mode of the unified account. api_instance.set_unified_mode(unified_mode_set) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -853,14 +853,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Success | - | +**204** | 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_unified_estimate_rate** > dict(str, str) get_unified_estimate_rate(currencies) -Get unified estimate rate +Get unified estimate rate. Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. @@ -891,7 +891,7 @@ api_instance = gate_api.UnifiedApi(api_client) currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. try: - # Get unified estimate rate + # Get unified estimate rate. api_response = api_instance.get_unified_estimate_rate(currencies) print(api_response) except GateApiException as ex: @@ -922,14 +922,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_currency_discount_tiers** > list[UnifiedDiscount] list_currency_discount_tiers() -List currency discount tiers +List currency discount tiers. ### Example @@ -948,7 +948,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # List currency discount tiers + # List currency discount tiers. api_response = api_instance.list_currency_discount_tiers() print(api_response) except GateApiException as ex: @@ -976,14 +976,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_loan_margin_tiers** > list[UnifiedMarginTiers] list_loan_margin_tiers() -List loan margin tiers +List loan margin tiers. ### Example @@ -1002,7 +1002,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # List loan margin tiers + # List loan margin tiers. api_response = api_instance.list_loan_margin_tiers() print(api_response) except GateApiException as ex: @@ -1030,16 +1030,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **calculate_portfolio_margin** > UnifiedPortfolioOutput calculate_portfolio_margin(unified_portfolio_input) -Portfolio margin calculator +Portfolio margin calculator. -Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. +Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. ### Example @@ -1059,7 +1059,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_portfolio_input = gate_api.UnifiedPortfolioInput() # UnifiedPortfolioInput | try: - # Portfolio margin calculator + # Portfolio margin calculator. api_response = api_instance.calculate_portfolio_margin(unified_portfolio_input) print(api_response) except GateApiException as ex: @@ -1090,14 +1090,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_leverage_currency_config** > UnifiedLeverageConfig get_user_leverage_currency_config(currency) -Minimum currency leverage that can be set +Minimum currency leverage that can be set. ### Example @@ -1123,10 +1123,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency +currency = 'BTC' # str | Currency. try: - # Minimum currency leverage that can be set + # Minimum currency leverage that can be set. api_response = api_instance.get_user_leverage_currency_config(currency) print(api_response) except GateApiException as ex: @@ -1139,7 +1139,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | + **currency** | **str**| Currency. | ### Return type @@ -1157,14 +1157,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_leverage_currency_setting** > UnifiedLeverageSetting get_user_leverage_currency_setting(currency=currency) -Get the leverage multiple of the user currency +Get the leverage multiple of the user currency. Get the user's currency leverage. If currency is not passed, query all currencies. @@ -1192,10 +1192,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency (optional) +currency = 'BTC' # str | Currency. (optional) try: - # Get the leverage multiple of the user currency + # Get the leverage multiple of the user currency. api_response = api_instance.get_user_leverage_currency_setting(currency=currency) print(api_response) except GateApiException as ex: @@ -1208,7 +1208,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | [optional] + **currency** | **str**| Currency. | [optional] ### Return type @@ -1226,14 +1226,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_user_leverage_currency_setting** > set_user_leverage_currency_setting(unified_leverage_setting) -Set the loan currency leverage +Set the loan currency leverage. ### Example @@ -1262,7 +1262,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_leverage_setting = gate_api.UnifiedLeverageSetting() # UnifiedLeverageSetting | try: - # Set the loan currency leverage + # Set the loan currency leverage. api_instance.set_user_leverage_currency_setting(unified_leverage_setting) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1292,14 +1292,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Success | - | +**204** | 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_unified_currencies** > list[UnifiedCurrency] list_unified_currencies(currency=currency) -List of loan currencies supported by unified account +List of loan currencies supported by unified account. ### Example @@ -1316,10 +1316,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency (optional) +currency = 'BTC' # str | Currency. (optional) try: - # List of loan currencies supported by unified account + # List of loan currencies supported by unified account. api_response = api_instance.list_unified_currencies(currency=currency) print(api_response) except GateApiException as ex: @@ -1332,7 +1332,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | [optional] + **currency** | **str**| Currency. | [optional] ### Return type @@ -1350,14 +1350,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_history_loan_rate** > UnifiedHistoryLoanRate get_history_loan_rate(currency, tier=tier, page=page, limit=limit) -get historical lending rates +get historical lending rates. ### Example @@ -1374,13 +1374,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'USDT' # str | Currency -tier = '1' # str | The VIP level of the floating rate that needs to be queried (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency = 'USDT' # str | Currency. +tier = '1' # str | The VIP level of the floating rate that needs to be queried. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) try: - # get historical lending rates + # get historical lending rates. api_response = api_instance.get_history_loan_rate(currency, tier=tier, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -1393,10 +1393,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - **tier** | **str**| The VIP level of the floating rate that needs to be queried | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency** | **str**| Currency. | + **tier** | **str**| The VIP level of the floating rate that needs to be queried. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] ### Return type @@ -1414,14 +1414,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_unified_collateral** > UnifiedCollateralRes set_unified_collateral(unified_collateral_req) -Set Collateral Currency +Set Collateral Currency. ### Example @@ -1450,7 +1450,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_collateral_req = gate_api.UnifiedCollateralReq() # UnifiedCollateralReq | try: - # Set Collateral Currency + # Set Collateral Currency. api_response = api_instance.set_unified_collateral(unified_collateral_req) print(api_response) except GateApiException as ex: @@ -1481,7 +1481,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | UpdateSuccess | - | +**200** | UpdateSuccess. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md index 32d3d7c..089024e 100644 --- a/docs/UnifiedBalance.md +++ b/docs/UnifiedBalance.md @@ -9,11 +9,11 @@ Name | Type | Description | Notes **negative_liab** | **str** | Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional] **futures_pos_liab** | **str** | Contract opening position borrowing currency (abandoned, to be offline field) | [optional] **equity** | **str** | Equity, valid in single currency margin/cross currency margin/combined margin mode | [optional] -**total_freeze** | **str** | Total occupancy (discarded, to be offline field) | [optional] +**total_freeze** | **str** | Total occupancy (discarded, to be offline field). | [optional] **total_liab** | **str** | Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **spot_in_use** | **str** | The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes | [optional] -**funding** | **str** | Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch | [optional] -**funding_version** | **str** | Funding version | [optional] +**funding** | **str** | Uniloan financial management amount, effective when turned on as a unified account margin switch | [optional] +**funding_version** | **str** | Funding version. | [optional] **cross_balance** | **str** | Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode | [optional] **iso_balance** | **str** | Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] **im** | **str** | Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] @@ -22,7 +22,7 @@ Name | Type | Description | Notes **mmr** | **str** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] **margin_balance** | **str** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional] **available_margin** | **str** | Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**enabled_collateral** | **bool** | Currency enabled as margin: true - Enabled, false - Disabled | [optional] +**enabled_collateral** | **bool** | Currency enabled as margin: true - Enabled, false - Disabled. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedBorrowable.md b/docs/UnifiedBorrowable.md index edd2c95..586ef0e 100644 --- a/docs/UnifiedBorrowable.md +++ b/docs/UnifiedBorrowable.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | Max borrowable amount | [optional] +**currency** | **str** | Currency detail. | [optional] +**amount** | **str** | Max borrowable amount. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedBorrowable1.md b/docs/UnifiedBorrowable1.md index f0e6974..ef1e387 100644 --- a/docs/UnifiedBorrowable1.md +++ b/docs/UnifiedBorrowable1.md @@ -1,11 +1,11 @@ # UnifiedBorrowable1 -Batch query unified account can be borrowed up to a maximum of results +Batch query unified account can be borrowed up to a maximum of results. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | The maximum amount to borrow | [optional] +**currency** | **str** | Currency detail. | [optional] +**amount** | **str** | The maximum amount to borrow. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCollateralReq.md b/docs/UnifiedCollateralReq.md index aa7d674..b4b0d43 100644 --- a/docs/UnifiedCollateralReq.md +++ b/docs/UnifiedCollateralReq.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collateral_type** | **int** | User-set collateral mode0(all)-All currencies used as collateral, 1(custom)-Custom currencies used as collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid | [optional] +**collateral_type** | **int** | User-set collateral mode0(all)-All currencies used as collateral, collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid | [optional] **enable_list** | **list[str]** | Currency list, where collateral_type=1(custom) indicates the logic of addition | [optional] -**disable_list** | **list[str]** | Cancellation list, indicating the logic of cancellation | [optional] +**disable_list** | **list[str]** | Cancellation list, indicating the logic of cancellation. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCollateralRes.md b/docs/UnifiedCollateralRes.md index 9bb605a..15a28a1 100644 --- a/docs/UnifiedCollateralRes.md +++ b/docs/UnifiedCollateralRes.md @@ -1,10 +1,10 @@ # UnifiedCollateralRes -Return of unified account collateral mode settings +Return of unified account collateral mode settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**is_success** | **bool** | Whether the setting was successful | [optional] +**is_success** | **bool** | Whether the setting was successful. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCurrency.md b/docs/UnifiedCurrency.md index 031c9f6..cc9f22c 100644 --- a/docs/UnifiedCurrency.md +++ b/docs/UnifiedCurrency.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Currency name | [optional] -**prec** | **str** | Currency precision | [optional] -**min_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional] -**user_max_borrow_amount** | **str** | The minimum debit limit is the unit of currency | [optional] -**total_max_borrow_amount** | **str** | The maximum debit limit for the platform is USDT | [optional] +**name** | **str** | Currency name. | [optional] +**prec** | **str** | Currency precision. | [optional] +**min_borrow_amount** | **str** | The minimum debit limit is the unit of currency. | [optional] +**user_max_borrow_amount** | **str** | The minimum debit limit is the unit of currency. | [optional] +**total_max_borrow_amount** | **str** | The maximum debit limit for the platform is USDT. | [optional] **loan_status** | **str** | Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedDiscount.md b/docs/UnifiedDiscount.md index a75f59f..635a46d 100644 --- a/docs/UnifiedDiscount.md +++ b/docs/UnifiedDiscount.md @@ -1,11 +1,11 @@ # UnifiedDiscount -Currency discount tiers +Currency discount tiers. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**discount_tiers** | [**list[UnifiedDiscountTiers]**](UnifiedDiscountTiers.md) | Tiered discount | [optional] +**currency** | **str** | Currency name. | [optional] +**discount_tiers** | [**list[UnifiedDiscountTiers]**](UnifiedDiscountTiers.md) | Tiered discount. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedDiscountTiers.md b/docs/UnifiedDiscountTiers.md index b6d7f19..2cfb6e8 100644 --- a/docs/UnifiedDiscountTiers.md +++ b/docs/UnifiedDiscountTiers.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **str** | Tier | [optional] -**discount** | **str** | Discount | [optional] -**lower_limit** | **str** | Lower limit | [optional] -**upper_limit** | **str** | Upper limit,+ indicates positive infinity | [optional] -**leverage** | **str** | Position leverage | [optional] +**tier** | **str** | Tier. | [optional] +**discount** | **str** | Discount. | [optional] +**lower_limit** | **str** | Lower limit. | [optional] +**upper_limit** | **str** | Upper limit,+ indicates positive infinity. | [optional] +**leverage** | **str** | Position leverage. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedHistoryLoanRate.md b/docs/UnifiedHistoryLoanRate.md index 9d9d670..78de5ce 100644 --- a/docs/UnifiedHistoryLoanRate.md +++ b/docs/UnifiedHistoryLoanRate.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**tier** | **str** | The VIP level of the floating rate required | [optional] -**tier_up_rate** | **str** | VIP level corresponding floating rate | [optional] +**currency** | **str** | Currency name. | [optional] +**tier** | **str** | The VIP level of the floating rate required. | [optional] +**tier_up_rate** | **str** | VIP level corresponding floating rate. | [optional] **rates** | [**list[UnifiedHistoryLoanRateRates]**](UnifiedHistoryLoanRateRates.md) | Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in 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/UnifiedHistoryLoanRateRates.md b/docs/UnifiedHistoryLoanRateRates.md index af73623..e14fa78 100644 --- a/docs/UnifiedHistoryLoanRateRates.md +++ b/docs/UnifiedHistoryLoanRateRates.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | The hourly timestamp corresponding to the interest rate, in milliseconds | [optional] -**rate** | **str** | Historical interest rates for this hour | [optional] +**time** | **int** | The hourly timestamp corresponding to the interest rate, in milliseconds. | [optional] +**rate** | **str** | Historical interest rates for this hour. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLeverageConfig.md b/docs/UnifiedLeverageConfig.md index 3fe3c49..8f6e458 100644 --- a/docs/UnifiedLeverageConfig.md +++ b/docs/UnifiedLeverageConfig.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**current_leverage** | **str** | Current leverage ratio | [optional] -**min_leverage** | **str** | Minimum adjustable leverage ratio | [optional] -**max_leverage** | **str** | Maximum adjustable leverage ratio | [optional] -**debit** | **str** | Current liabilities | [optional] -**available_margin** | **str** | Available Margin | [optional] -**borrowable** | **str** | The current leverage you can choose is | [optional] -**except_leverage_borrowable** | **str** | The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller | [optional] +**current_leverage** | **str** | Current leverage ratio. | [optional] +**min_leverage** | **str** | Minimum adjustable leverage ratio. | [optional] +**max_leverage** | **str** | Maximum adjustable leverage ratio. | [optional] +**debit** | **str** | Current liabilities. | [optional] +**available_margin** | **str** | Available Margin. | [optional] +**borrowable** | **str** | The current leverage you can choose is. | [optional] +**except_leverage_borrowable** | **str** | The maximum amount of margin that can be borrowed and the be borrowed, whichever is smaller | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLeverageSetting.md b/docs/UnifiedLeverageSetting.md index a5ea773..b62d735 100644 --- a/docs/UnifiedLeverageSetting.md +++ b/docs/UnifiedLeverageSetting.md @@ -1,11 +1,11 @@ # UnifiedLeverageSetting -Loan currency leverage +Loan currency leverage. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | -**leverage** | **str** | multiple | +**currency** | **str** | Currency name. | +**leverage** | **str** | multiple. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLoan.md b/docs/UnifiedLoan.md index 9bc0760..93dc10c 100644 --- a/docs/UnifiedLoan.md +++ b/docs/UnifiedLoan.md @@ -1,14 +1,14 @@ # UnifiedLoan -Borrow or repay +Borrow or repay. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | -**type** | **str** | type: borrow - borrow, repay - repay | -**amount** | **str** | The amount of lending or repaying | +**currency** | **str** | Currency. | +**type** | **str** | type: borrow - borrow, repay - repay. | +**amount** | **str** | The amount of lending or repaying. | **repaid_all** | **bool** | Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. | [optional] -**text** | **str** | User defined custom ID | [optional] +**text** | **str** | User defined custom ID. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLoanRecord.md b/docs/UnifiedLoanRecord.md index bbbac24..cff2542 100644 --- a/docs/UnifiedLoanRecord.md +++ b/docs/UnifiedLoanRecord.md @@ -1,17 +1,17 @@ # UnifiedLoanRecord -Loan records +Loan records. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | ID | [optional] [readonly] -**type** | **str** | type: borrow - borrow, repay - repay | [optional] [readonly] -**repayment_type** | **str** | Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment | [optional] [readonly] +**id** | **int** | ID. | [optional] [readonly] +**type** | **str** | type: borrow - borrow, repay - repay. | [optional] [readonly] +**repayment_type** | **str** | Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment | [optional] [readonly] **borrow_type** | **str** | Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment | [optional] -**currency_pair** | **str** | Currency pair | [optional] [readonly] -**currency** | **str** | Currency | [optional] [readonly] -**amount** | **str** | The amount of lending or repaying | [optional] [readonly] -**create_time** | **int** | Created time | [optional] [readonly] +**currency_pair** | **str** | Currency pair. | [optional] [readonly] +**currency** | **str** | Currency. | [optional] [readonly] +**amount** | **str** | The amount of lending or repaying. | [optional] [readonly] +**create_time** | **int** | Created time. | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLoanResult.md b/docs/UnifiedLoanResult.md index 218d159..3c8a6aa 100644 --- a/docs/UnifiedLoanResult.md +++ b/docs/UnifiedLoanResult.md @@ -1,10 +1,10 @@ # UnifiedLoanResult -Unified account loan and repayment response results +Unified account loan and repayment response results. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tran_id** | **int** | Transaction id | [optional] +**tran_id** | **int** | Transaction id. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedMarginTiers.md b/docs/UnifiedMarginTiers.md index 2fb5930..e9009f2 100644 --- a/docs/UnifiedMarginTiers.md +++ b/docs/UnifiedMarginTiers.md @@ -1,11 +1,11 @@ # UnifiedMarginTiers -Unified margin tiers +Unified margin tiers. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name | [optional] -**margin_tiers** | [**list[MarginTiers]**](MarginTiers.md) | Margin tiers | [optional] +**currency** | **str** | Currency name. | [optional] +**margin_tiers** | [**list[MarginTiers]**](MarginTiers.md) | Margin tiers. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedPortfolioInput.md b/docs/UnifiedPortfolioInput.md index 296fdb1..6f32795 100644 --- a/docs/UnifiedPortfolioInput.md +++ b/docs/UnifiedPortfolioInput.md @@ -4,12 +4,12 @@ Input for the portfolio margin calculator. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**spot_balances** | [**list[MockSpotBalance]**](MockSpotBalance.md) | Spot | [optional] -**spot_orders** | [**list[MockSpotOrder]**](MockSpotOrder.md) | Spot orders | [optional] -**futures_positions** | [**list[MockFuturesPosition]**](MockFuturesPosition.md) | Futures positions | [optional] -**futures_orders** | [**list[MockFuturesOrder]**](MockFuturesOrder.md) | Futures order | [optional] -**options_positions** | [**list[MockOptionsPosition]**](MockOptionsPosition.md) | Options positions | [optional] -**options_orders** | [**list[MockOptionsOrder]**](MockOptionsOrder.md) | Option orders | [optional] +**spot_balances** | [**list[MockSpotBalance]**](MockSpotBalance.md) | Spot. | [optional] +**spot_orders** | [**list[MockSpotOrder]**](MockSpotOrder.md) | Spot orders. | [optional] +**futures_positions** | [**list[MockFuturesPosition]**](MockFuturesPosition.md) | Futures positions. | [optional] +**futures_orders** | [**list[MockFuturesOrder]**](MockFuturesOrder.md) | Futures order. | [optional] +**options_positions** | [**list[MockOptionsPosition]**](MockOptionsPosition.md) | Options positions. | [optional] +**options_orders** | [**list[MockOptionsOrder]**](MockOptionsOrder.md) | Option orders. | [optional] **spot_hedge** | **bool** | Whether to enable spot hedging. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedPortfolioOutput.md b/docs/UnifiedPortfolioOutput.md index 11447de..e711905 100644 --- a/docs/UnifiedPortfolioOutput.md +++ b/docs/UnifiedPortfolioOutput.md @@ -5,9 +5,9 @@ The output of the portfolio margin calculator. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **maintain_margin_total** | **str** | Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. | [optional] -**initial_margin_total** | **str** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. | [optional] -**calculate_time** | **int** | Calculate time | [optional] -**risk_unit** | [**list[MockRiskUnit]**](MockRiskUnit.md) | Risk unit | [optional] +**initial_margin_total** | **str** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, orders. | [optional] +**calculate_time** | **int** | Calculate time. | [optional] +**risk_unit** | [**list[MockRiskUnit]**](MockRiskUnit.md) | Risk unit. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedRiskUnits.md b/docs/UnifiedRiskUnits.md index 8765dbf..06882fa 100644 --- a/docs/UnifiedRiskUnits.md +++ b/docs/UnifiedRiskUnits.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID | [optional] +**user_id** | **int** | User ID. | [optional] **spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] -**risk_units** | [**list[RiskUnits]**](RiskUnits.md) | Risk unit | [optional] +**risk_units** | [**list[RiskUnits]**](RiskUnits.md) | Risk unit. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedSettings.md b/docs/UnifiedSettings.md index 185f55e..1375e15 100644 --- a/docs/UnifiedSettings.md +++ b/docs/UnifiedSettings.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usdt_futures** | **bool** | USDT contract switch. In cross-currency margin mode, it can only be turned on and not off | [optional] -**spot_hedge** | **bool** | Spot hedging switch. | [optional] +**spot_hedge** | **bool** | Spot hedging switch. | [optional] **use_funding** | **bool** | switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin | [optional] **options** | **bool** | Option switch. In cross-currency margin mode, it can only be turned on and not off | [optional] diff --git a/docs/UnifiedTransferable.md b/docs/UnifiedTransferable.md index 69f9b19..4aaa663 100644 --- a/docs/UnifiedTransferable.md +++ b/docs/UnifiedTransferable.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail | [optional] -**amount** | **str** | The maximum amount that can be transferred out | [optional] +**currency** | **str** | Currency detail. | [optional] +**amount** | **str** | The maximum amount that can be transferred out. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserLtvInfo.md b/docs/UserLtvInfo.md index f267508..09e7c50 100644 --- a/docs/UserLtvInfo.md +++ b/docs/UserLtvInfo.md @@ -1,16 +1,16 @@ # UserLtvInfo -User's currency statistics data +User's currency statistics data. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collateral_currency** | **str** | Collateral | [optional] -**borrow_currency** | **str** | Borrowed currency | [optional] -**init_ltv** | **str** | The initial collateralization rate | [optional] -**alert_ltv** | **str** | Warning collateralization ratio | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate | [optional] -**min_borrow_amount** | **str** | Minimum borrowable amount for the loan currency | [optional] -**left_borrowable_amount** | **str** | Remaining borrowable amount for the loan currency | [optional] +**collateral_currency** | **str** | Collateral. | [optional] +**borrow_currency** | **str** | Borrowed currency. | [optional] +**init_ltv** | **str** | The initial collateralization rate. | [optional] +**alert_ltv** | **str** | Warning collateralization ratio. | [optional] +**liquidate_ltv** | **str** | The liquidation collateralization rate. | [optional] +**min_borrow_amount** | **str** | Minimum borrowable amount for the loan currency. | [optional] +**left_borrowable_amount** | **str** | Remaining borrowable amount for the loan currency. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSub.md b/docs/UserSub.md index 01c7b2e..9aefe18 100644 --- a/docs/UserSub.md +++ b/docs/UserSub.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **int** | User ID | [optional] +**uid** | **int** | User ID. | [optional] **belong** | **str** | The system to which the user belongs (partner referral). If empty, it means not belonging to any system. | [optional] -**type** | **int** | Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) | [optional] -**ref_uid** | **int** | Inviter user ID | [optional] +**type** | **int** | Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct customer 4-indirect direct customer 5-ordinary user) | [optional] +**ref_uid** | **int** | Inviter user ID. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSubRelation.md b/docs/UserSubRelation.md index 912227c..7eeaf25 100644 --- a/docs/UserSubRelation.md +++ b/docs/UserSubRelation.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**list** | [**list[UserSub]**](UserSub.md) | Subordinate relationship list | [optional] +**list** | [**list[UserSub]**](UserSub.md) | Subordinate relationship list. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserTotalAmount.md b/docs/UserTotalAmount.md index 38d1b41..0582c8e 100644 --- a/docs/UserTotalAmount.md +++ b/docs/UserTotalAmount.md @@ -1,11 +1,11 @@ # UserTotalAmount -Total borrowed amount and pledged collateral amount by the user +Total borrowed amount and pledged collateral amount by the user. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**borrow_amount** | **str** | Total borrowing amount, calculated in USDT | [optional] -**collateral_amount** | **str** | Total collateral amount, calculated in USDT | [optional] +**borrow_amount** | **str** | Total borrowing amount, calculated in USDT. | [optional] +**collateral_amount** | **str** | Total collateral amount, calculated in USDT. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WalletApi.md b/docs/WalletApi.md index da65bc1..a3a6706 100644 --- a/docs/WalletApi.md +++ b/docs/WalletApi.md @@ -4,33 +4,33 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency -[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address -[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records -[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records -[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts -[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts -[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts -[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account -[**get_transfer_order_status**](WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query -[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status -[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances -[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances -[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances -[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info -[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address -[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee -[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances -[**list_small_balance**](WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance -[**convert_small_balance**](WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance -[**list_small_balance_history**](WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history -[**list_push_orders**](WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history +[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency. +[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address. +[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. +[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. +[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts. +[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts. +[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts. +[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account. +[**get_transfer_order_status**](WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query. +[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status. +[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances. +[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances. +[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances. +[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info. +[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address. +[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee. +[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances. +[**list_small_balance**](WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance. +[**convert_small_balance**](WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance. +[**list_small_balance_history**](WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history. +[**list_push_orders**](WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history. # **list_currency_chains** > list[CurrencyChain] list_currency_chains(currency) -List chains supported for specified currency +List chains supported for specified currency. ### Example @@ -47,10 +47,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'GT' # str | Currency name +currency = 'GT' # str | Currency name. try: - # List chains supported for specified currency + # List chains supported for specified currency. api_response = api_instance.list_currency_chains(currency) print(api_response) except GateApiException as ex: @@ -63,7 +63,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | + **currency** | **str**| Currency name. | ### Return type @@ -81,14 +81,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_deposit_address** > DepositAddress get_deposit_address(currency) -Generate currency deposit address +Generate currency deposit address. ### Example @@ -114,10 +114,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'USDT' # str | Currency name +currency = 'USDT' # str | Currency name. try: - # Generate currency deposit address + # Generate currency deposit address. api_response = api_instance.get_deposit_address(currency) print(api_response) except GateApiException as ex: @@ -130,7 +130,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name | + **currency** | **str**| Currency name. | ### Return type @@ -148,16 +148,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Address successfully generated | - | +**200** | Address successfully generated. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_withdrawals** > list[WithdrawalRecord] list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset) -Retrieve withdrawal records +Retrieve withdrawal records. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -183,17 +183,17 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) withdraw_id = 'withdraw_id_example' # str | The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time (optional) asset_class = 'asset_class_example' # str | The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone (optional) withdraw_order_id = 'withdraw_order_id_example' # str | User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) +to = 1602123600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # Retrieve withdrawal records + # Retrieve withdrawal records. api_response = api_instance.list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -206,14 +206,14 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] + **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] **withdraw_id** | **str**| The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time | [optional] **asset_class** | **str**| The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] **withdraw_order_id** | **str**| User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -231,16 +231,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_deposits** > list[DepositRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) -Retrieve deposit records +Retrieve deposit records. -Record time range cannot exceed 30 days +Record time range cannot exceed 30 days. ### Example @@ -266,14 +266,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) +currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) +to = 1602123600 # int | Time range ending, default to current time. (optional) limit = 100 # int | The maximum number of entries returned in the list is limited to 500 transactions. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # Retrieve deposit records + # Retrieve deposit records. api_response = api_instance.list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -286,11 +286,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] + **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] + **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] **limit** | **int**| The maximum number of entries returned in the list is limited to 500 transactions. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -308,16 +308,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **transfer** > TransactionID transfer(transfer) -Transfer between trading accounts +Transfer between trading accounts. -Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options +Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. options ### Example @@ -346,7 +346,7 @@ api_instance = gate_api.WalletApi(api_client) transfer = gate_api.Transfer() # Transfer | try: - # Transfer between trading accounts + # Transfer between trading accounts. api_response = api_instance.transfer(transfer) print(api_response) except GateApiException as ex: @@ -377,14 +377,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Balance transferred | - | +**200** | Balance transferred. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_transfers** > list[SubAccountTransferRecordItem] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) -Retrieve transfer records between main and sub accounts +Retrieve transfer records between main and sub accounts. Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved @@ -413,13 +413,13 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time (optional) -to = 1602123600 # int | Time range ending, default to current time (optional) -limit = 100 # int | Maximum number of records to be returned in a single list (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) +to = 1602123600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) try: - # Retrieve transfer records between main and sub accounts + # Retrieve transfer records between main and sub accounts. api_response = api_instance.list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -433,10 +433,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time | [optional] - **to** | **int**| Time range ending, default to current time | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] + **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] ### Return type @@ -454,14 +454,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **transfer_with_sub_account** > TransactionID transfer_with_sub_account(sub_account_transfer) -Transfer between main and sub accounts +Transfer between main and sub accounts. Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. @@ -492,7 +492,7 @@ api_instance = gate_api.WalletApi(api_client) sub_account_transfer = gate_api.SubAccountTransfer() # SubAccountTransfer | try: - # Transfer between main and sub accounts + # Transfer between main and sub accounts. api_response = api_instance.transfer_with_sub_account(sub_account_transfer) print(api_response) except GateApiException as ex: @@ -523,16 +523,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Balance transferred | - | +**200** | Balance transferred. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **sub_account_to_sub_account** > TransactionID sub_account_to_sub_account(sub_account_to_sub_account) -Sub-account transfers to sub-account +Sub-account transfers to sub-account. -It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. +It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account sub-account to initiate the transfer. ### Example @@ -561,7 +561,7 @@ api_instance = gate_api.WalletApi(api_client) sub_account_to_sub_account = gate_api.SubAccountToSubAccount() # SubAccountToSubAccount | try: - # Sub-account transfers to sub-account + # Sub-account transfers to sub-account. api_response = api_instance.sub_account_to_sub_account(sub_account_to_sub_account) print(api_response) except GateApiException as ex: @@ -592,14 +592,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Balance transferred | - | +**200** | Balance transferred. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_transfer_order_status** > TransferOrderStatus get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) -Transfer status query +Transfer status query. Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface @@ -631,7 +631,7 @@ client_order_id = 'da3ce7a088c8b0372b741419c7829033' # str | The custom ID provi tx_id = '59636381286' # str | The transfer operation number and client_order_id cannot be empty at the same time (optional) try: - # Transfer status query + # Transfer status query. api_response = api_instance.get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) print(api_response) except GateApiException as ex: @@ -663,14 +663,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Transfer status obtained successfully | - | +**200** | Transfer status obtained successfully. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_withdraw_status** > list[WithdrawStatus] list_withdraw_status(currency=currency) -Retrieve withdrawal status +Retrieve withdrawal status. ### Example @@ -696,10 +696,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency (optional) +currency = 'BTC' # str | Retrieve data of the specified currency. (optional) try: - # Retrieve withdrawal status + # Retrieve withdrawal status. api_response = api_instance.list_withdraw_status(currency=currency) print(api_response) except GateApiException as ex: @@ -712,7 +712,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency | [optional] + **currency** | **str**| Retrieve data of the specified currency. | [optional] ### Return type @@ -730,14 +730,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_balances** > list[SubAccountBalance] list_sub_account_balances(sub_uid=sub_uid) -Retrieve sub account balances +Retrieve sub account balances. ### Example @@ -766,7 +766,7 @@ api_instance = gate_api.WalletApi(api_client) sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) try: - # Retrieve sub account balances + # Retrieve sub account balances. api_response = api_instance.list_sub_account_balances(sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -797,14 +797,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_margin_balances** > list[SubAccountMarginBalance] list_sub_account_margin_balances(sub_uid=sub_uid) -Query sub accounts' margin balances +Query sub accounts' margin balances. ### Example @@ -833,7 +833,7 @@ api_instance = gate_api.WalletApi(api_client) sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) try: - # Query sub accounts' margin balances + # Query sub accounts' margin balances. api_response = api_instance.list_sub_account_margin_balances(sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -864,14 +864,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_futures_balances** > list[SubAccountFuturesBalance] list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) -Query sub accounts' futures account balances +Query sub accounts' futures account balances. ### Example @@ -898,10 +898,10 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) -settle = 'usdt' # str | Query only balances of specified settle currency (optional) +settle = 'usdt' # str | Query only balances of specified settle currency. (optional) try: - # Query sub accounts' futures account balances + # Query sub accounts' futures account balances. api_response = api_instance.list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) print(api_response) except GateApiException as ex: @@ -915,7 +915,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - **settle** | **str**| Query only balances of specified settle currency | [optional] + **settle** | **str**| Query only balances of specified settle currency. | [optional] ### Return type @@ -933,14 +933,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_cross_margin_balances** > list[SubAccountCrossMarginBalance] list_sub_account_cross_margin_balances(sub_uid=sub_uid) -Query subaccount's cross_margin account info +Query subaccount's cross_margin account info. ### Example @@ -969,7 +969,7 @@ api_instance = gate_api.WalletApi(api_client) sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) try: - # Query subaccount's cross_margin account info + # Query subaccount's cross_margin account info. api_response = api_instance.list_sub_account_cross_margin_balances(sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -1000,14 +1000,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_saved_address** > list[SavedAddress] list_saved_address(currency, chain=chain, limit=limit, page=page) -Query saved address +Query saved address. ### Example @@ -1033,13 +1033,13 @@ 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 -chain = '' # str | Chain name (optional) (default to '') -limit = '50' # str | Maximum number returned, 100 at most (optional) (default to '50') -page = 1 # int | Page number (optional) (default to 1) +currency = 'USDT' # str | Currency. +chain = '' # str | Chain name. (optional) (default to '') +limit = '50' # str | Maximum number returned, 100 at most. (optional) (default to '50') +page = 1 # int | Page number. (optional) (default to 1) try: - # Query saved address + # Query saved address. api_response = api_instance.list_saved_address(currency, chain=chain, limit=limit, page=page) print(api_response) except GateApiException as ex: @@ -1052,10 +1052,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | - **chain** | **str**| Chain name | [optional] [default to ''] - **limit** | **str**| Maximum number returned, 100 at most | [optional] [default to '50'] - **page** | **int**| Page number | [optional] [default to 1] + **currency** | **str**| Currency. | + **chain** | **str**| Chain name. | [optional] [default to ''] + **limit** | **str**| Maximum number returned, 100 at most. | [optional] [default to '50'] + **page** | **int**| Page number. | [optional] [default to 1] ### Return type @@ -1073,14 +1073,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved | - | +**200** | List retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_trade_fee** > TradeFee get_trade_fee(currency_pair=currency_pair, settle=settle) -Retrieve personal trading fee +Retrieve personal trading fee. ### Example @@ -1110,7 +1110,7 @@ currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise f settle = 'BTC' # str | Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. (optional) try: - # Retrieve personal trading fee + # Retrieve personal trading fee. api_response = api_instance.get_trade_fee(currency_pair=currency_pair, settle=settle) print(api_response) except GateApiException as ex: @@ -1142,16 +1142,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved | - | +**200** | Successfully retrieved. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_total_balance** > TotalBalance get_total_balance(currency=currency) -Retrieve user's total balances +Retrieve user's total balances. -This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance +This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` /futures/{settle}/accounts` to query futures account balance ### Example @@ -1180,7 +1180,7 @@ api_instance = gate_api.WalletApi(api_client) currency = 'USDT' # str | Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. (optional) (default to 'USDT') try: - # Retrieve user's total balances + # Retrieve user's total balances. api_response = api_instance.get_total_balance(currency=currency) print(api_response) except GateApiException as ex: @@ -1211,14 +1211,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is valid and is successfully responded | - | +**200** | Request is valid and is successfully responded. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_small_balance** > list[SmallBalance] list_small_balance() -List small balance +List small balance. ### Example @@ -1246,7 +1246,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.WalletApi(api_client) try: - # List small balance + # List small balance. api_response = api_instance.list_small_balance() print(api_response) except GateApiException as ex: @@ -1274,14 +1274,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Success. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **convert_small_balance** > convert_small_balance(convert_small_balance) -Convert small balance +Convert small balance. ### Example @@ -1310,7 +1310,7 @@ api_instance = gate_api.WalletApi(api_client) convert_small_balance = gate_api.ConvertSmallBalance() # ConvertSmallBalance | try: - # Convert small balance + # Convert small balance. api_instance.convert_small_balance(convert_small_balance) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1340,14 +1340,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Success. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_small_balance_history** > list[SmallBalanceHistory] list_small_balance_history(currency=currency, page=page, limit=limit) -List small balance history +List small balance history. ### Example @@ -1373,12 +1373,12 @@ 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 = 'currency_example' # str | Currency (optional) -page = 1 # int | Page number (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100) +currency = 'currency_example' # str | Currency. (optional) +page = 1 # int | Page number. (optional) (default to 1) +limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) try: - # List small balance history + # List small balance history. api_response = api_instance.list_small_balance_history(currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -1391,9 +1391,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency | [optional] - **page** | **int**| Page number | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **currency** | **str**| Currency. | [optional] + **page** | **int**| Page number. | [optional] [default to 1] + **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] ### Return type @@ -1411,14 +1411,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Success. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_push_orders** > list[UidPushOrder] list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) -Retrieve the UID transfer history +Retrieve the UID transfer history. ### Example @@ -1444,15 +1444,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) -id = 56 # int | Order ID (optional) +id = 56 # int | Order ID. (optional) _from = 56 # int | The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp (optional) to = 56 # int | The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. (optional) -limit = 100 # int | The maximum number of items returned in the list, the default value is 100 (optional) (default to 100) -offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +limit = 100 # int | The maximum number of items returned in the list, the default value is 100. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) transaction_type = 'withdraw' # str | The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. (optional) (default to 'withdraw') try: - # Retrieve the UID transfer history + # Retrieve the UID transfer history. api_response = api_instance.list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) print(api_response) except GateApiException as ex: @@ -1465,11 +1465,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| Order ID | [optional] + **id** | **int**| Order ID. | [optional] **_from** | **int**| The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp | [optional] **to** | **int**| The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. | [optional] - **limit** | **int**| The maximum number of items returned in the list, the default value is 100 | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **limit** | **int**| The maximum number of items returned in the list, the default value is 100. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] **transaction_type** | **str**| The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. | [optional] [default to 'withdraw'] ### Return type @@ -1488,7 +1488,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Success. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/WithdrawStatus.md b/docs/WithdrawStatus.md index 2b8e5de..50ae2ab 100644 --- a/docs/WithdrawStatus.md +++ b/docs/WithdrawStatus.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency | [optional] -**name** | **str** | Currency name | [optional] -**name_cn** | **str** | Currency Chinese name | [optional] -**deposit** | **str** | Deposits fee | [optional] -**withdraw_percent** | **str** | Withdrawal fee rate percentage | [optional] -**withdraw_fix** | **str** | Fixed withdrawal fee | [optional] -**withdraw_day_limit** | **str** | Daily allowed withdrawal amount | [optional] -**withdraw_amount_mini** | **str** | Minimum withdrawal amount | [optional] -**withdraw_day_limit_remain** | **str** | Daily withdrawal amount left | [optional] -**withdraw_eachtime_limit** | **str** | Maximum amount for each withdrawal | [optional] -**withdraw_fix_on_chains** | **dict(str, str)** | Fixed withdrawal fee on multiple chains | [optional] -**withdraw_percent_on_chains** | **dict(str, str)** | Percentage withdrawal fee on multiple chains | [optional] +**currency** | **str** | Currency. | [optional] +**name** | **str** | Currency name. | [optional] +**name_cn** | **str** | Currency Chinese name. | [optional] +**deposit** | **str** | Deposits fee. | [optional] +**withdraw_percent** | **str** | Withdrawal fee rate percentage. | [optional] +**withdraw_fix** | **str** | Fixed withdrawal fee. | [optional] +**withdraw_day_limit** | **str** | Daily allowed withdrawal amount. | [optional] +**withdraw_amount_mini** | **str** | Minimum withdrawal amount. | [optional] +**withdraw_day_limit_remain** | **str** | Daily withdrawal amount left. | [optional] +**withdraw_eachtime_limit** | **str** | Maximum amount for each withdrawal. | [optional] +**withdraw_fix_on_chains** | **dict(str, str)** | Fixed withdrawal fee on multiple chains. | [optional] +**withdraw_percent_on_chains** | **dict(str, str)** | Percentage withdrawal fee on multiple chains. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WithdrawalApi.md b/docs/WithdrawalApi.md index 7a118ce..33fb990 100644 --- a/docs/WithdrawalApi.md +++ b/docs/WithdrawalApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw -[**withdraw_push_order**](WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer -[**cancel_withdrawal**](WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID +[**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw. +[**withdraw_push_order**](WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer. +[**cancel_withdrawal**](WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID. # **withdraw** > LedgerRecord withdraw(ledger_record) -Withdraw +Withdraw. Withdrawals to Gate addresses do not incur transaction fees. @@ -43,7 +43,7 @@ api_instance = gate_api.WithdrawalApi(api_client) ledger_record = gate_api.LedgerRecord() # LedgerRecord | try: - # Withdraw + # Withdraw. api_response = api_instance.withdraw(ledger_record) print(api_response) except GateApiException as ex: @@ -74,14 +74,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Withdraw request is accepted. Refer to withdrawal records for status | - | +**200** | Withdraw request is accepted. Refer to withdrawal records for status. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **withdraw_push_order** > UidPushWithdrawalResp withdraw_push_order(uid_push_withdrawal) -UID transfer +UID transfer. Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts @@ -112,7 +112,7 @@ api_instance = gate_api.WithdrawalApi(api_client) uid_push_withdrawal = gate_api.UidPushWithdrawal() # UidPushWithdrawal | try: - # UID transfer + # UID transfer. api_response = api_instance.withdraw_push_order(uid_push_withdrawal) print(api_response) except GateApiException as ex: @@ -150,7 +150,7 @@ Name | Type | Description | Notes # **cancel_withdrawal** > LedgerRecord cancel_withdrawal(withdrawal_id) -Cancel withdrawal with specified ID +Cancel withdrawal with specified ID. ### Example @@ -179,7 +179,7 @@ api_instance = gate_api.WithdrawalApi(api_client) withdrawal_id = '210496' # str | try: - # Cancel withdrawal with specified ID + # Cancel withdrawal with specified ID. api_response = api_instance.cancel_withdrawal(withdrawal_id) print(api_response) except GateApiException as ex: @@ -210,7 +210,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**202** | Cancellation accepted. Refer to record status for the cancellation result | - | +**202** | Cancellation accepted. Refer to record status for the cancellation result. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md index 9b4734e..bb88a26 100644 --- a/docs/WithdrawalRecord.md +++ b/docs/WithdrawalRecord.md @@ -3,20 +3,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Record ID | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] -**block_number** | **str** | Block Number | [optional] [readonly] +**id** | **str** | Record ID. | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal. | [optional] [readonly] +**block_number** | **str** | Block Number. | [optional] [readonly] **withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**timestamp** | **str** | Operation time | [optional] [readonly] -**amount** | **str** | Currency amount | -**fee** | **str** | fee | [optional] [readonly] -**currency** | **str** | Currency name | -**address** | **str** | Withdrawal address | [optional] +**timestamp** | **str** | Operation time. | [optional] [readonly] +**amount** | **str** | Currency amount. | +**fee** | **str** | fee. | [optional] [readonly] +**currency** | **str** | Currency name. | +**address** | **str** | Withdrawal address. | [optional] **fail_reason** | **str** | The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty | [optional] -**timestamp2** | **str** | The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] +**timestamp2** | **str** | The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal. | [optional] **status** | **str** | Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals | +**chain** | **str** | Name of the chain used in withdrawals. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 8f137e7..140abbc 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.102.1" +__version__ = "6.102.6" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py index c3cdd89..c6a5f87 100644 --- a/gate_api/api/account_api.py +++ b/gate_api/api/account_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def get_account_detail(self, **kwargs): # noqa: E501 - """Get account detail # noqa: E501 + """Get account detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def get_account_detail(self, **kwargs): # noqa: E501 return self.get_account_detail_with_http_info(**kwargs) # noqa: E501 def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 - """Get account detail # noqa: E501 + """Get account detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_account_rate_limit(self, **kwargs): # noqa: E501 - """Get user transaction rate limit information # noqa: E501 + """Get user transaction rate limit information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -163,7 +163,7 @@ def get_account_rate_limit(self, **kwargs): # noqa: E501 return self.get_account_rate_limit_with_http_info(**kwargs) # noqa: E501 def get_account_rate_limit_with_http_info(self, **kwargs): # noqa: E501 - """Get user transaction rate limit information # noqa: E501 + """Get user transaction rate limit information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -243,16 +243,16 @@ def get_account_rate_limit_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_stp_groups(self, **kwargs): # noqa: E501 - """List STP Groups # noqa: E501 + """List STP Groups. # noqa: E501 - Retrieve the list of STP groups created by the main account user only # noqa: E501 + Retrieve the list of STP groups created by the main account user only. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str name: Perform a fuzzy search based on the name + :param str name: Perform a fuzzy search based on the name. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -268,16 +268,16 @@ def list_stp_groups(self, **kwargs): # noqa: E501 return self.list_stp_groups_with_http_info(**kwargs) # noqa: E501 def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501 - """List STP Groups # noqa: E501 + """List STP Groups. # noqa: E501 - Retrieve the list of STP groups created by the main account user only # noqa: E501 + Retrieve the list of STP groups created by the main account user only. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str name: Perform a fuzzy search based on the name + :param str name: Perform a fuzzy search based on the name. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -353,9 +353,9 @@ def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_stp_group(self, stp_group, **kwargs): # noqa: E501 - """Create STP Group # noqa: E501 + """Create STP Group. # noqa: E501 - Only the main account is allowed to create a new STP user group # noqa: E501 + Only the main account is allowed to create a new STP user group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_stp_group(stp_group, async_req=True) @@ -378,9 +378,9 @@ def create_stp_group(self, stp_group, **kwargs): # noqa: E501 return self.create_stp_group_with_http_info(stp_group, **kwargs) # noqa: E501 def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501 - """Create STP Group # noqa: E501 + """Create STP Group. # noqa: E501 - Only the main account is allowed to create a new STP user group # noqa: E501 + Only the main account is allowed to create a new STP user group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_stp_group_with_http_info(stp_group, async_req=True) @@ -471,16 +471,16 @@ def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 - """List users of the STP group # noqa: E501 + """List users of the STP group. # noqa: E501 - Only the main account that created this STP group can query the account # noqa: E501 + Only the main account that created this STP group can query the account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_users(stp_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) + :param int stp_id: STP Group ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -496,16 +496,16 @@ def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 return self.list_stp_groups_users_with_http_info(stp_id, **kwargs) # noqa: E501 def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501 - """List users of the STP group # noqa: E501 + """List users of the STP group. # noqa: E501 - Only the main account that created this STP group can query the account # noqa: E501 + Only the main account that created this STP group can query the account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_users_with_http_info(stp_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) + :param int stp_id: STP Group 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 @@ -585,17 +585,17 @@ def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501 - """Add users to the STP group # noqa: E501 + """Add users to the STP group. # noqa: E501 - - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 + - Only the master account that created the STP user group is allowed to add users group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_stp_group_users(stp_id, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param list[int] request_body: User ID (required) + :param int stp_id: STP Group ID. (required) + :param list[int] request_body: User ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -611,17 +611,17 @@ def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501 return self.add_stp_group_users_with_http_info(stp_id, request_body, **kwargs) # noqa: E501 def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # noqa: E501 - """Add users to the STP group # noqa: E501 + """Add users to the STP group. # noqa: E501 - - Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 + - Only the master account that created the STP user group is allowed to add users group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_stp_group_users_with_http_info(stp_id, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param list[int] request_body: User ID (required) + :param int stp_id: STP Group ID. (required) + :param list[int] request_body: User ID. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -712,7 +712,7 @@ def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # collection_formats=collection_formats) def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 - """Delete the user in the STP group # noqa: E501 + """Delete the user in the STP group. # noqa: E501 - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -721,8 +721,8 @@ def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param int user_id: STP user ID, multiple can be separated by commas (required) + :param int stp_id: STP Group ID. (required) + :param int user_id: STP user ID, multiple can be separated by commas. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -738,7 +738,7 @@ def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 return self.delete_stp_group_users_with_http_info(stp_id, user_id, **kwargs) # noqa: E501 def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # noqa: E501 - """Delete the user in the STP group # noqa: E501 + """Delete the user in the STP group. # noqa: E501 - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -747,8 +747,8 @@ def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID (required) - :param int user_id: STP user ID, multiple can be separated by commas (required) + :param int stp_id: STP Group ID. (required) + :param int user_id: STP user ID, multiple can be separated by commas. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py index 721d65b..032f17b 100644 --- a/gate_api/api/collateral_loan_api.py +++ b/gate_api/api/collateral_loan_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_collateral_loan_orders(self, **kwargs): # noqa: E501 - """List Orders # noqa: E501 + """List Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,10 +45,10 @@ def list_collateral_loan_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str collateral_currency: Collateral - :param str borrow_currency: Borrowed currency + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param str collateral_currency: Collateral. + :param str borrow_currency: Borrowed currency. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -64,7 +64,7 @@ def list_collateral_loan_orders(self, **kwargs): # noqa: E501 return self.list_collateral_loan_orders_with_http_info(**kwargs) # noqa: E501 def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 - """List Orders # noqa: E501 + """List Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -72,10 +72,10 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str collateral_currency: Collateral - :param str borrow_currency: Borrowed currency + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param str collateral_currency: Collateral. + :param str borrow_currency: Borrowed currency. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -166,7 +166,7 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E501 - """Place order # noqa: E501 + """Place order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -190,7 +190,7 @@ def create_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E5 return self.create_collateral_loan_with_http_info(create_collateral_order, **kwargs) # noqa: E501 def create_collateral_loan_with_http_info(self, create_collateral_order, **kwargs): # noqa: E501 - """Place order # noqa: E501 + """Place order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -282,7 +282,7 @@ def create_collateral_loan_with_http_info(self, create_collateral_order, **kwarg collection_formats=collection_formats) def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -290,7 +290,7 @@ def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (required) + :param int order_id: Order ID returned on successful order creation. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -306,7 +306,7 @@ def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 return self.get_collateral_loan_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -314,7 +314,7 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (required) + :param int order_id: Order ID returned on successful order creation. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -394,7 +394,7 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): collection_formats=collection_formats) def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501 - """Repayment # noqa: E501 + """Repayment. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -418,7 +418,7 @@ def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501 return self.repay_collateral_loan_with_http_info(repay_loan, **kwargs) # noqa: E501 def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E501 - """Repayment # noqa: E501 + """Repayment. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -510,7 +510,7 @@ def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E collection_formats=collection_formats) def list_repay_records(self, source, **kwargs): # noqa: E501 - """Repayment history # noqa: E501 + """Repayment history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -518,13 +518,13 @@ def list_repay_records(self, source, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) + :param str borrow_currency: Borrowed currency. + :param str collateral_currency: Collateral. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -540,7 +540,7 @@ def list_repay_records(self, source, **kwargs): # noqa: E501 return self.list_repay_records_with_http_info(source, **kwargs) # noqa: E501 def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 - """Repayment history # noqa: E501 + """Repayment history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -548,13 +548,13 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) + :param str borrow_currency: Borrowed currency. + :param str collateral_currency: Collateral. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -658,7 +658,7 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_collateral_records(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 + """Query collateral adjustment records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -666,12 +666,12 @@ def list_collateral_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param str borrow_currency: Borrowed currency. + :param str collateral_currency: Collateral. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -687,7 +687,7 @@ def list_collateral_records(self, **kwargs): # noqa: E501 return self.list_collateral_records_with_http_info(**kwargs) # noqa: E501 def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 + """Query collateral adjustment records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -695,12 +695,12 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str borrow_currency: Borrowed currency - :param str collateral_currency: Collateral + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param str borrow_currency: Borrowed currency. + :param str collateral_currency: Collateral. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -797,7 +797,7 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def operate_collateral(self, collateral_align, **kwargs): # noqa: E501 - """Increase or redeem collateral # noqa: E501 + """Increase or redeem collateral. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -821,7 +821,7 @@ def operate_collateral(self, collateral_align, **kwargs): # noqa: E501 return self.operate_collateral_with_http_info(collateral_align, **kwargs) # noqa: E501 def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa: E501 - """Increase or redeem collateral # noqa: E501 + """Increase or redeem collateral. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -909,7 +909,7 @@ def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa collection_formats=collection_formats) def get_user_total_amount(self, **kwargs): # noqa: E501 - """Query the total borrowing and collateral amount for the user # noqa: E501 + """Query the total borrowing and collateral amount for the user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -932,7 +932,7 @@ def get_user_total_amount(self, **kwargs): # noqa: E501 return self.get_user_total_amount_with_http_info(**kwargs) # noqa: E501 def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501 - """Query the total borrowing and collateral amount for the user # noqa: E501 + """Query the total borrowing and collateral amount for the user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1012,7 +1012,7 @@ def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 - """Query user's collateralization ratio # noqa: E501 + """Query user's collateralization ratio. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1020,8 +1020,8 @@ def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str collateral_currency: Collateral (required) - :param str borrow_currency: Borrowed currency (required) + :param str collateral_currency: Collateral. (required) + :param str borrow_currency: Borrowed currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1037,7 +1037,7 @@ def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # return self.get_user_ltv_info_with_http_info(collateral_currency, borrow_currency, **kwargs) # noqa: E501 def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 - """Query user's collateralization ratio # noqa: E501 + """Query user's collateralization ratio. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1045,8 +1045,8 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str collateral_currency: Collateral (required) - :param str borrow_currency: Borrowed currency (required) + :param str collateral_currency: Collateral. (required) + :param str borrow_currency: Borrowed currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1133,7 +1133,7 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, collection_formats=collection_formats) def list_collateral_currencies(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies # noqa: E501 + """Query supported borrowing and collateral currencies. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1157,7 +1157,7 @@ def list_collateral_currencies(self, **kwargs): # noqa: E501 return self.list_collateral_currencies_with_http_info(**kwargs) # noqa: E501 def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies # noqa: E501 + """Query supported borrowing and collateral currencies. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/delivery_api.py b/gate_api/api/delivery_api.py index 324d0fa..3ce1462 100644 --- a/gate_api/api/delivery_api.py +++ b/gate_api/api/delivery_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 + """List all futures contracts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,7 +45,7 @@ def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -61,7 +61,7 @@ def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 return self.list_delivery_contracts_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 + """List all futures contracts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -69,7 +69,7 @@ def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -149,7 +149,7 @@ def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E50 collection_formats=collection_formats) def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract # noqa: E501 + """Get a single contract. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -157,8 +157,8 @@ def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -174,7 +174,7 @@ def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 return self.get_delivery_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract # noqa: E501 + """Get a single contract. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -182,8 +182,8 @@ def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -270,19 +270,19 @@ def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # n collection_formats=collection_formats) def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 + """Futures order book. # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_order_book(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -299,19 +299,19 @@ def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501 return self.list_delivery_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 + """Futures order book. # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_order_book_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _return_http_data_only: response data without head status code and headers @@ -412,7 +412,7 @@ def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 + """Futures trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -420,12 +420,12 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int limit: Maximum number of records to be returned in a single list. :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time + :param int to: Specify end time in Unix seconds, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -441,7 +441,7 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 return self.list_delivery_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 + """Futures trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -449,12 +449,12 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int limit: Maximum number of records to be returned in a single list. :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time + :param int to: Specify end time in Unix seconds, default to current time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -557,7 +557,7 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no collection_formats=collection_formats) def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 + """Get futures candlesticks. # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -566,12 +566,12 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -587,7 +587,7 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 return self.list_delivery_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 + """Get futures candlesticks. # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -596,12 +596,12 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -702,7 +702,7 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_delivery_tickers(self, settle, **kwargs): # noqa: E501 - """List futures tickers # noqa: E501 + """List futures tickers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -710,8 +710,8 @@ def list_delivery_tickers(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract + :param str settle: Settle currency. (required) + :param str contract: Futures contract. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -727,7 +727,7 @@ def list_delivery_tickers(self, settle, **kwargs): # noqa: E501 return self.list_delivery_tickers_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List futures tickers # noqa: E501 + """List futures tickers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -735,8 +735,8 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract + :param str settle: Settle currency. (required) + :param str contract: Futures contract. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -819,7 +819,7 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 + """Futures insurance balance history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -827,8 +827,8 @@ def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -844,7 +844,7 @@ def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 return self.list_delivery_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 + """Futures insurance balance history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -852,8 +852,8 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -940,7 +940,7 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no collection_formats=collection_formats) def list_delivery_accounts(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 + """Query futures account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -948,7 +948,7 @@ def list_delivery_accounts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -964,7 +964,7 @@ def list_delivery_accounts(self, settle, **kwargs): # noqa: E501 return self.list_delivery_accounts_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 + """Query futures account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -972,7 +972,7 @@ def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1052,7 +1052,7 @@ def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 + """Query account book. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1060,11 +1060,11 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1080,7 +1080,7 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 return self.list_delivery_account_book_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 + """Query account book. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1088,11 +1088,11 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1188,7 +1188,7 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: collection_formats=collection_formats) def list_delivery_positions(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # noqa: E501 + """List all positions of a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1196,7 +1196,7 @@ def list_delivery_positions(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1212,7 +1212,7 @@ def list_delivery_positions(self, settle, **kwargs): # noqa: E501 return self.list_delivery_positions_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # noqa: E501 + """List all positions of a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1220,7 +1220,7 @@ def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1300,7 +1300,7 @@ def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E50 collection_formats=collection_formats) def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # noqa: E501 + """Get single position. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1308,8 +1308,8 @@ def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1325,7 +1325,7 @@ def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 return self.get_delivery_position_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # noqa: E501 + """Get single position. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1333,8 +1333,8 @@ def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1421,7 +1421,7 @@ def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # n collection_formats=collection_formats) def update_delivery_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin # noqa: E501 + """Update position margin. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1429,9 +1429,9 @@ def update_delivery_position_margin(self, settle, contract, change, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change amount, positive number increases, negative number (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str change: Margin change amount, positive number increases, negative number. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1447,7 +1447,7 @@ def update_delivery_position_margin(self, settle, contract, change, **kwargs): return self.update_delivery_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 def update_delivery_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin # noqa: E501 + """Update position margin. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1455,9 +1455,9 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change amount, positive number increases, negative number (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str change: Margin change amount, positive number increases, negative number. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1551,7 +1551,7 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang collection_formats=collection_formats) def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 + """Update position leverage. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1559,9 +1559,9 @@ def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str leverage: New position leverage. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1577,7 +1577,7 @@ def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs return self.update_delivery_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 def update_delivery_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 + """Update position leverage. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1585,9 +1585,9 @@ def update_delivery_position_leverage_with_http_info(self, settle, contract, lev >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str leverage: New position leverage. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1681,7 +1681,7 @@ def update_delivery_position_leverage_with_http_info(self, settle, contract, lev collection_formats=collection_formats) def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 + """Update position risk limit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1689,9 +1689,9 @@ def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kw >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New position risk limit (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str risk_limit: New position risk limit. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1707,7 +1707,7 @@ def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kw return self.update_delivery_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 def update_delivery_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 + """Update position risk limit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1715,9 +1715,9 @@ def update_delivery_position_risk_limit_with_http_info(self, settle, contract, r >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New position risk limit (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str risk_limit: New position risk limit. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1811,22 +1811,22 @@ def update_delivery_position_risk_limit_with_http_info(self, settle, contract, r collection_formats=collection_formats) def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 + """List futures orders. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_orders(settle, status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return) + :param int count_total: Whether to return total number matched. Default to 0(no return). :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1842,22 +1842,22 @@ def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 return self.list_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 + """List futures orders. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_orders_with_http_info(settle, status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return) + :param int count_total: Whether to return total number matched. Default to 0(no return). :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1965,16 +1965,16 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa collection_formats=collection_formats) def create_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 + """Create a futures order. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_delivery_order(settle, futures_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param FuturesOrder futures_order: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1991,16 +1991,16 @@ def create_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501 return self.create_delivery_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 + """Create a futures order. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_delivery_order_with_http_info(settle, futures_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param FuturesOrder futures_order: (required) :param _return_http_data_only: response data without head status code and headers @@ -2092,18 +2092,18 @@ def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs): collection_formats=collection_formats) def cancel_delivery_orders(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 + """Cancel all `open` orders matched. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_delivery_orders(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str side: All bids or asks. Both included if not specified + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str side: All bids or asks. Both included if not specified. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2119,18 +2119,18 @@ def cancel_delivery_orders(self, settle, contract, **kwargs): # noqa: E501 return self.cancel_delivery_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 + """Cancel all `open` orders matched. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_delivery_orders_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str side: All bids or asks. Both included if not specified + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str side: All bids or asks. Both included if not specified. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2220,17 +2220,17 @@ def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): # collection_formats=collection_formats) def get_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_delivery_order(settle, order_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2246,17 +2246,17 @@ def get_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 return self.get_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_delivery_order_with_http_info(settle, order_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified 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 @@ -2343,7 +2343,7 @@ def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa collection_formats=collection_formats) def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2351,8 +2351,8 @@ def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2368,7 +2368,7 @@ def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 return self.cancel_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2376,8 +2376,8 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified 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 @@ -2464,7 +2464,7 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n collection_formats=collection_formats) def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2472,13 +2472,13 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int order: Futures order ID, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return) + :param int count_total: Whether to return total number matched. Default to 0(no return). :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2494,7 +2494,7 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 return self.get_my_delivery_trades_with_http_info(settle, **kwargs) # noqa: E501 def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2502,13 +2502,13 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int order: Futures order ID, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return) + :param int count_total: Whether to return total number matched. Default to 0(no return). :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2612,7 +2612,7 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_delivery_position_close(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 + """List position close history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2620,9 +2620,9 @@ def list_delivery_position_close(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2638,7 +2638,7 @@ def list_delivery_position_close(self, settle, **kwargs): # noqa: E501 return self.list_delivery_position_close_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 + """List position close history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2646,9 +2646,9 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2738,7 +2738,7 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa collection_formats=collection_formats) def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 + """List liquidation history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2746,10 +2746,10 @@ def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify a liquidation timestamp. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2765,7 +2765,7 @@ def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501 return self.list_delivery_liquidates_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 + """List liquidation history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2773,10 +2773,10 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify a liquidation timestamp. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2869,7 +2869,7 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_delivery_settlements(self, settle, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 + """List settlement history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2877,10 +2877,10 @@ def list_delivery_settlements(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a settlement timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify a settlement timestamp. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2896,7 +2896,7 @@ def list_delivery_settlements(self, settle, **kwargs): # noqa: E501 return self.list_delivery_settlements_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 + """List settlement history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2904,10 +2904,10 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a settlement timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify a settlement timestamp. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3000,19 +3000,19 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E collection_formats=collection_formats) def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 + """List risk limit tiers. # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_risk_limit_tiers(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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. @@ -3028,19 +3028,19 @@ def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 return self.list_delivery_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 + """List risk limit tiers. # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_risk_limit_tiers_with_http_info(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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 @@ -3135,7 +3135,7 @@ def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # no collection_formats=collection_formats) def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders # noqa: E501 + """List All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3143,11 +3143,11 @@ def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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. @@ -3163,7 +3163,7 @@ def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noq return self.list_price_triggered_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders # noqa: E501 + """List All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3171,11 +3171,11 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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 @@ -3277,7 +3277,7 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, ** collection_formats=collection_formats) def create_price_triggered_delivery_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 + """Create a 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 @@ -3285,7 +3285,7 @@ def create_price_triggered_delivery_order(self, settle, futures_price_triggered_ >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :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 @@ -3302,7 +3302,7 @@ def create_price_triggered_delivery_order(self, settle, futures_price_triggered_ return self.create_price_triggered_delivery_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501 def create_price_triggered_delivery_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 + """Create a 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 @@ -3310,7 +3310,7 @@ def create_price_triggered_delivery_order_with_http_info(self, settle, futures_p >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :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 @@ -3402,7 +3402,7 @@ def create_price_triggered_delivery_order_with_http_info(self, settle, futures_p collection_formats=collection_formats) def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders # noqa: E501 + """Cancel All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3410,8 +3410,8 @@ def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3427,7 +3427,7 @@ def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs) return self.cancel_price_triggered_delivery_order_list_with_http_info(settle, contract, **kwargs) # noqa: E501 def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders # noqa: E501 + """Cancel All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3435,8 +3435,8 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3523,7 +3523,7 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont collection_formats=collection_formats) def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 + """Get a 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 @@ -3531,8 +3531,8 @@ def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3548,7 +3548,7 @@ def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noq return self.get_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 + """Get a 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 @@ -3556,8 +3556,8 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified 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 @@ -3644,7 +3644,7 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, ** collection_formats=collection_formats) def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 + """cancel a 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 @@ -3652,8 +3652,8 @@ def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3669,7 +3669,7 @@ def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # return self.cancel_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 + """cancel a 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 @@ -3677,8 +3677,8 @@ def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified 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 diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index 7c75714..1072c16 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 - """ETH2 swap # noqa: E501 + """ETH2 swap. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -61,7 +61,7 @@ def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 return self.swap_eth2_with_http_info(eth2_swap, **kwargs) # noqa: E501 def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 - """ETH2 swap # noqa: E501 + """ETH2 swap. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -149,9 +149,9 @@ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 collection_formats=collection_formats) def rate_list_eth2(self, **kwargs): # noqa: E501 - """ETH2 historical rate of return query # noqa: E501 + """ETH2 historical rate of return query. # noqa: E501 - Check the ETH earnings rate record for the last 31 days # noqa: E501 + Check the ETH earnings rate record for the last 31 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rate_list_eth2(async_req=True) @@ -173,9 +173,9 @@ def rate_list_eth2(self, **kwargs): # noqa: E501 return self.rate_list_eth2_with_http_info(**kwargs) # noqa: E501 def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 - """ETH2 historical rate of return query # noqa: E501 + """ETH2 historical rate of return query. # noqa: E501 - Check the ETH earnings rate record for the last 31 days # noqa: E501 + Check the ETH earnings rate record for the last 31 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rate_list_eth2_with_http_info(async_req=True) @@ -254,7 +254,7 @@ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_dual_investment_plans(self, **kwargs): # noqa: E501 - """Dual Investment product list # noqa: E501 + """Dual Investment product list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -262,7 +262,7 @@ def list_dual_investment_plans(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int plan_id: Financial project id + :param int plan_id: Financial project id. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -278,7 +278,7 @@ def list_dual_investment_plans(self, **kwargs): # noqa: E501 return self.list_dual_investment_plans_with_http_info(**kwargs) # noqa: E501 def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment product list # noqa: E501 + """Dual Investment product list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -286,7 +286,7 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int plan_id: Financial project id + :param int plan_id: Financial project id. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -362,7 +362,7 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_dual_orders(self, **kwargs): # noqa: E501 - """Dual Investment order list # noqa: E501 + """Dual Investment order list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -370,10 +370,10 @@ def list_dual_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start checkout time - :param int to: End settlement time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start checkout time. + :param int to: End settlement time. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -389,7 +389,7 @@ def list_dual_orders(self, **kwargs): # noqa: E501 return self.list_dual_orders_with_http_info(**kwargs) # noqa: E501 def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment order list # noqa: E501 + """Dual Investment order list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -397,10 +397,10 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start checkout time - :param int to: End settlement time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start checkout time. + :param int to: End settlement time. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -491,7 +491,7 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def place_dual_order(self, place_dual_investment_order, **kwargs): # noqa: E501 - """Place Dual Investment order # noqa: E501 + """Place Dual Investment order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -515,7 +515,7 @@ def place_dual_order(self, place_dual_investment_order, **kwargs): # noqa: E501 return self.place_dual_order_with_http_info(place_dual_investment_order, **kwargs) # noqa: E501 def place_dual_order_with_http_info(self, place_dual_investment_order, **kwargs): # noqa: E501 - """Place Dual Investment order # noqa: E501 + """Place Dual Investment order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -603,7 +603,7 @@ def place_dual_order_with_http_info(self, place_dual_investment_order, **kwargs) collection_formats=collection_formats) def list_structured_products(self, status, **kwargs): # noqa: E501 - """Structured Product List # noqa: E501 + """Structured Product List. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -613,8 +613,8 @@ def list_structured_products(self, status, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required) :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -630,7 +630,7 @@ def list_structured_products(self, status, **kwargs): # noqa: E501 return self.list_structured_products_with_http_info(status, **kwargs) # noqa: E501 def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E501 - """Structured Product List # noqa: E501 + """Structured Product List. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -640,8 +640,8 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 :param bool async_req: execute request asynchronously :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required) :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -736,7 +736,7 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_structured_orders(self, **kwargs): # noqa: E501 - """Structured Product Order List # noqa: E501 + """Structured Product Order List. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -746,8 +746,8 @@ def list_structured_orders(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -763,7 +763,7 @@ def list_structured_orders(self, **kwargs): # noqa: E501 return self.list_structured_orders_with_http_info(**kwargs) # noqa: E501 def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 - """Structured Product Order List # noqa: E501 + """Structured Product Order List. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -773,8 +773,8 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -865,7 +865,7 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order # noqa: E501 + """Place Structured Product Order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -889,7 +889,7 @@ def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 return self.place_structured_order_with_http_info(structured_buy, **kwargs) # noqa: E501 def place_structured_order_with_http_info(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order # noqa: E501 + """Place Structured Product Order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -977,7 +977,7 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no collection_formats=collection_formats) def find_coin(self, find_coin, **kwargs): # noqa: E501 - """Staking Coins # noqa: E501 + """Staking Coins. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1001,7 +1001,7 @@ def find_coin(self, find_coin, **kwargs): # noqa: E501 return self.find_coin_with_http_info(find_coin, **kwargs) # noqa: E501 def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 - """Staking Coins # noqa: E501 + """Staking Coins. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1093,7 +1093,7 @@ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 collection_formats=collection_formats) def swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501 - """On-chain Token Swap for Earned Coins # noqa: E501 + """On-chain Token Swap for Earned Coins. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1117,7 +1117,7 @@ def swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501 return self.swap_staking_coin_with_http_info(swap_coin, **kwargs) # noqa: E501 def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 - """On-chain Token Swap for Earned Coins # noqa: E501 + """On-chain Token Swap for Earned Coins. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 32f7c3b..46acd1b 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_uni_currencies(self, **kwargs): # noqa: E501 - """List currencies for lending # noqa: E501 + """List currencies for lending. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def list_uni_currencies(self, **kwargs): # noqa: E501 return self.list_uni_currencies_with_http_info(**kwargs) # noqa: E501 def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List currencies for lending # noqa: E501 + """List currencies for lending. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_currency(self, currency, **kwargs): # noqa: E501 - """Get currency detail for lending # noqa: E501 + """Get currency detail for lending. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -148,7 +148,7 @@ def get_uni_currency(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -164,7 +164,7 @@ def get_uni_currency(self, currency, **kwargs): # noqa: E501 return self.get_uni_currency_with_http_info(currency, **kwargs) # noqa: E501 def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get currency detail for lending # noqa: E501 + """Get currency detail for lending. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -172,7 +172,7 @@ def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -252,7 +252,7 @@ def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_user_uni_lends(self, **kwargs): # noqa: E501 - """List user's lending orders # noqa: E501 + """List user's lending orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -260,9 +260,9 @@ def list_user_uni_lends(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -278,7 +278,7 @@ def list_user_uni_lends(self, **kwargs): # noqa: E501 return self.list_user_uni_lends_with_http_info(**kwargs) # noqa: E501 def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 - """List user's lending orders # noqa: E501 + """List user's lending orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -286,9 +286,9 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -376,9 +376,9 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 - """Lend or redeem # noqa: E501 + """Lend or redeem. # noqa: E501 - Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly determination, no interest will be earned for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 + Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_uni_lend(create_uni_lend, async_req=True) @@ -401,9 +401,9 @@ def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 return self.create_uni_lend_with_http_info(create_uni_lend, **kwargs) # noqa: E501 def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E501 - """Lend or redeem # noqa: E501 + """Lend or redeem. # noqa: E501 - Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly determination, no interest will be earned for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 + Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_uni_lend_with_http_info(create_uni_lend, async_req=True) @@ -490,9 +490,9 @@ def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E5 collection_formats=collection_formats) def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501 - """Amend lending order # noqa: E501 + """Amend lending order. # noqa: E501 - Currently only supports amending the minimum interest rate (hour) # noqa: E501 + Currently only supports amending the minimum interest rate (hour). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.change_uni_lend(patch_uni_lend, async_req=True) @@ -515,9 +515,9 @@ def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501 return self.change_uni_lend_with_http_info(patch_uni_lend, **kwargs) # noqa: E501 def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E501 - """Amend lending order # noqa: E501 + """Amend lending order. # noqa: E501 - Currently only supports amending the minimum interest rate (hour) # noqa: E501 + Currently only supports amending the minimum interest rate (hour). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.change_uni_lend_with_http_info(patch_uni_lend, async_req=True) @@ -604,7 +604,7 @@ def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E50 collection_formats=collection_formats) def list_uni_lend_records(self, **kwargs): # noqa: E501 - """List records of lending # noqa: E501 + """List records of lending. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -612,12 +612,12 @@ def list_uni_lend_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: type: lend - lend, redeem - redeem + :param str type: type: lend - lend, redeem - redeem. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -633,7 +633,7 @@ def list_uni_lend_records(self, **kwargs): # noqa: E501 return self.list_uni_lend_records_with_http_info(**kwargs) # noqa: E501 def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 - """List records of lending # noqa: E501 + """List records of lending. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -641,12 +641,12 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: type: lend - lend, redeem - redeem + :param str type: type: lend - lend, redeem - redeem. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -743,7 +743,7 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_interest(self, currency, **kwargs): # noqa: E501 - """Get the user's total interest income of specified currency # noqa: E501 + """Get the user's total interest income of specified currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -751,7 +751,7 @@ def get_uni_interest(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -767,7 +767,7 @@ def get_uni_interest(self, currency, **kwargs): # noqa: E501 return self.get_uni_interest_with_http_info(currency, **kwargs) # noqa: E501 def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the user's total interest income of specified currency # noqa: E501 + """Get the user's total interest income of specified currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -775,7 +775,7 @@ def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -855,7 +855,7 @@ def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_uni_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + """List interest records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -863,9 +863,9 @@ def list_uni_interest_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -883,7 +883,7 @@ def list_uni_interest_records(self, **kwargs): # noqa: E501 return self.list_uni_interest_records_with_http_info(**kwargs) # noqa: E501 def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + """List interest records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -891,9 +891,9 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -989,7 +989,7 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 - """query currency interest compounding status # noqa: E501 + """query currency interest compounding status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -997,7 +997,7 @@ def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1013,7 +1013,7 @@ def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 return self.get_uni_interest_status_with_http_info(currency, **kwargs) # noqa: E501 def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E501 - """query currency interest compounding status # noqa: E501 + """query currency interest compounding status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1021,7 +1021,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1101,18 +1101,18 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E collection_formats=collection_formats) def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 - """UniLoan currency annualized trend chart # noqa: E501 + """UniLoan currency annualized trend chart. # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart(_from, to, asset, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start timestamp, unit s, maximum span of 30 days (required) - :param int to: End timestamp, unit s, maximum span of 30 days (required) - :param str asset: Currency name (required) + :param int _from: Start timestamp, unit s, maximum span of 30 days. (required) + :param int to: End timestamp, unit s, maximum span of 30 days. (required) + :param str asset: Currency name. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1128,18 +1128,18 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 return self.list_uni_chart_with_http_info(_from, to, asset, **kwargs) # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 - """UniLoan currency annualized trend chart # noqa: E501 + """UniLoan currency annualized trend chart. # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_chart_with_http_info(_from, to, asset, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start timestamp, unit s, maximum span of 30 days (required) - :param int to: End timestamp, unit s, maximum span of 30 days (required) - :param str asset: Currency name (required) + :param int _from: Start timestamp, unit s, maximum span of 30 days. (required) + :param int to: End timestamp, unit s, maximum span of 30 days. (required) + :param str asset: Currency name. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1233,9 +1233,9 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_uni_rate(self, **kwargs): # noqa: E501 - """Currency estimate annualized interest rate # noqa: E501 + """Currency estimate annualized interest rate. # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate(async_req=True) @@ -1257,9 +1257,9 @@ def list_uni_rate(self, **kwargs): # noqa: E501 return self.list_uni_rate_with_http_info(**kwargs) # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 - """Currency estimate annualized interest rate # noqa: E501 + """Currency estimate annualized interest rate. # noqa: E501 - Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-15 06:48+0000 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 + Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_uni_rate_with_http_info(async_req=True) diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py index fd5f346..617f794 100644 --- a/gate_api/api/flash_swap_api.py +++ b/gate_api/api/flash_swap_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 - """List All Supported Currency Pairs In Flash Swap # noqa: E501 + """List All Supported Currency Pairs In Flash Swap. # noqa: E501 `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -46,9 +46,9 @@ def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -64,7 +64,7 @@ def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 return self.list_flash_swap_currency_pair_with_http_info(**kwargs) # noqa: E501 def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 - """List All Supported Currency Pairs In Flash Swap # noqa: E501 + """List All Supported Currency Pairs In Flash Swap. # noqa: E501 `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -73,9 +73,9 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000 + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -163,7 +163,7 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_flash_swap_orders(self, **kwargs): # noqa: E501 - """List all flash swap orders # noqa: E501 + """List all flash swap orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -174,9 +174,9 @@ def list_flash_swap_orders(self, **kwargs): # noqa: E501 :param int status: Flash swap order status `1` - success `2` - failure :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number + :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) + :param int limit: Maximum number of records to be returned in a single list. + :param int page: Page number. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -192,7 +192,7 @@ def list_flash_swap_orders(self, **kwargs): # noqa: E501 return self.list_flash_swap_orders_with_http_info(**kwargs) # noqa: E501 def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 - """List all flash swap orders # noqa: E501 + """List all flash swap orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -203,9 +203,9 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 :param int status: Flash swap order status `1` - success `2` - failure :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - `false`: sort by id in ascending order(oldest first) - :param int limit: Maximum number of records to be returned in a single list - :param int page: Page number + :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) + :param int limit: Maximum number of records to be returned in a single list. + :param int page: Page number. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -302,7 +302,7 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_flash_swap_order(self, flash_swap_order_request, **kwargs): # noqa: E501 - """Create a flash swap order # noqa: E501 + """Create a flash swap order. # noqa: E501 Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -327,7 +327,7 @@ def create_flash_swap_order(self, flash_swap_order_request, **kwargs): # noqa: return self.create_flash_swap_order_with_http_info(flash_swap_order_request, **kwargs) # noqa: E501 def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwargs): # noqa: E501 - """Create a flash swap order # noqa: E501 + """Create a flash swap order. # noqa: E501 Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -420,7 +420,7 @@ def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwa collection_formats=collection_formats) def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501 - """Get a single flash swap order's detail # noqa: E501 + """Get a single flash swap order's detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -428,7 +428,7 @@ def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Flash swap order ID (required) + :param int order_id: Flash swap order ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -444,7 +444,7 @@ def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501 return self.get_flash_swap_order_with_http_info(order_id, **kwargs) # noqa: E501 def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single flash swap order's detail # noqa: E501 + """Get a single flash swap order's detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -452,7 +452,7 @@ def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Flash swap order ID (required) + :param int order_id: Flash swap 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 @@ -532,7 +532,7 @@ def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noqa: E501 - """Initiate a flash swap order preview # noqa: E501 + """Initiate a flash swap order preview. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -556,7 +556,7 @@ def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noq return self.preview_flash_swap_order_with_http_info(flash_swap_preview_request, **kwargs) # noqa: E501 def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **kwargs): # noqa: E501 - """Initiate a flash swap order preview # noqa: E501 + """Initiate a flash swap order preview. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index b53f081..3230541 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_futures_contracts(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 + """List all futures contracts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,9 +45,9 @@ def list_futures_contracts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be 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. @@ -63,7 +63,7 @@ def list_futures_contracts(self, settle, **kwargs): # noqa: E501 return self.list_futures_contracts_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all futures contracts # noqa: E501 + """List all futures contracts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -71,9 +71,9 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be 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 @@ -165,7 +165,7 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract # noqa: E501 + """Get a single contract. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -173,8 +173,8 @@ def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -190,7 +190,7 @@ def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501 return self.get_futures_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract # noqa: E501 + """Get a single contract. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -198,8 +198,8 @@ def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -286,19 +286,19 @@ def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # no collection_formats=collection_formats) def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 + """Futures order book. # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_order_book(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -315,19 +315,19 @@ def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book # noqa: E501 + """Futures order book. # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_order_book_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _return_http_data_only: response data without head status code and headers @@ -428,7 +428,7 @@ def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # collection_formats=collection_formats) def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 + """Futures trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -436,13 +436,13 @@ def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time + :param int to: Specify end time in Unix seconds, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -458,7 +458,7 @@ def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history # noqa: E501 + """Futures trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -466,13 +466,13 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. - :param int to: Specify end time in Unix seconds, default to current time + :param int to: Specify end time in Unix seconds, default to current time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -580,7 +580,7 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq collection_formats=collection_formats) def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 + """Get futures candlesticks. # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -589,12 +589,12 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days + :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -610,7 +610,7 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks # noqa: E501 + """Get futures candlesticks. # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -619,12 +619,12 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. Note that 30d means 1 natual month, not 30 days + :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -725,7 +725,7 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 - """Premium Index K-Line # noqa: E501 + """Premium Index K-Line. # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -734,12 +734,12 @@ def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points + :param str interval: Interval time between data points. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -755,7 +755,7 @@ def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_premium_index_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Premium Index K-Line # noqa: E501 + """Premium Index K-Line. # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -764,12 +764,12 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points + :param str interval: Interval time between data points. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -870,7 +870,7 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_futures_tickers(self, settle, **kwargs): # noqa: E501 - """List futures tickers # noqa: E501 + """List futures tickers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -878,8 +878,8 @@ def list_futures_tickers(self, settle, **kwargs): # noqa: E501 >>> 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 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. @@ -895,7 +895,7 @@ def list_futures_tickers(self, settle, **kwargs): # noqa: E501 return self.list_futures_tickers_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List futures tickers # noqa: E501 + """List futures tickers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -903,8 +903,8 @@ def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 >>> 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 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 @@ -987,7 +987,7 @@ def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa: E501 - """Funding rate history # noqa: E501 + """Funding rate history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -995,9 +995,9 @@ def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1015,7 +1015,7 @@ def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa return self.list_futures_funding_rate_history_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_funding_rate_history_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Funding rate history # noqa: E501 + """Funding rate history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1023,9 +1023,9 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -1127,7 +1127,7 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k collection_formats=collection_formats) def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 + """Futures insurance balance history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1135,8 +1135,8 @@ def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1152,7 +1152,7 @@ def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 return self.list_futures_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history # noqa: E501 + """Futures insurance balance history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1160,8 +1160,8 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param int limit: Maximum number of records to be returned in a single list + :param str settle: Settle currency. (required) + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1248,7 +1248,7 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq collection_formats=collection_formats) def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501 - """Futures stats # noqa: E501 + """Futures stats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1256,9 +1256,9 @@ def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int _from: Start timestamp. :param str interval: :param int limit: :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1276,7 +1276,7 @@ def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501 return self.list_contract_stats_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures stats # noqa: E501 + """Futures stats. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1284,9 +1284,9 @@ def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param int _from: Start timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param int _from: Start timestamp. :param str interval: :param int limit: :param _return_http_data_only: response data without head status code @@ -1388,7 +1388,7 @@ def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noq collection_formats=collection_formats) def get_index_constituents(self, settle, index, **kwargs): # noqa: E501 - """Get index constituents # noqa: E501 + """Get index constituents. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1396,8 +1396,8 @@ def get_index_constituents(self, settle, index, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str index: Index name (required) + :param str settle: Settle currency. (required) + :param str index: Index name. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1413,7 +1413,7 @@ def get_index_constituents(self, settle, index, **kwargs): # noqa: E501 return self.get_index_constituents_with_http_info(settle, index, **kwargs) # noqa: E501 def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noqa: E501 - """Get index constituents # noqa: E501 + """Get index constituents. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1421,8 +1421,8 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str index: Index name (required) + :param str settle: Settle currency. (required) + :param str index: Index name. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1509,20 +1509,20 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq collection_formats=collection_formats) def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 - """Retrieve liquidation history # noqa: E501 + """Retrieve liquidation history. # noqa: E501 - The maximum time interval between `from` and `to` is **3600 seconds**. Certain private fields will **not be returned** in public endpoints; refer to individual field descriptions for details. # noqa: E501 + The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders(settle, async_req=True) >>> 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 str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1538,20 +1538,20 @@ def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 return self.list_liquidated_orders_with_http_info(settle, **kwargs) # noqa: E501 def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 - """Retrieve liquidation history # noqa: E501 + """Retrieve liquidation history. # noqa: E501 - The maximum time interval between `from` and `to` is **3600 seconds**. Certain private fields will **not be returned** in public endpoints; refer to individual field descriptions for details. # noqa: E501 + The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders_with_http_info(settle, async_req=True) >>> 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 str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1647,19 +1647,19 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 + """List risk limit tiers. # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_risk_limit_tiers(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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. @@ -1675,19 +1675,19 @@ def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 return self.list_futures_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers # noqa: E501 + """List risk limit tiers. # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_risk_limit_tiers_with_http_info(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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 @@ -1782,7 +1782,7 @@ def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noq collection_formats=collection_formats) def list_futures_accounts(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 + """Query futures account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1790,7 +1790,7 @@ def list_futures_accounts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1806,7 +1806,7 @@ def list_futures_accounts(self, settle, **kwargs): # noqa: E501 return self.list_futures_accounts_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query futures account # noqa: E501 + """Query futures account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1814,7 +1814,7 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1894,22 +1894,22 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_futures_account_book(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 + """Query account book. # noqa: E501 - If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered。 2023-10-30 can be filtered。 # noqa: E501 + If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_account_book(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1925,22 +1925,22 @@ def list_futures_account_book(self, settle, **kwargs): # noqa: E501 return self.list_futures_account_book_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query account book # noqa: E501 + """Query account book. # noqa: E501 - If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered。 2023-10-30 can be filtered。 # noqa: E501 + If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_account_book_with_http_info(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction + :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2044,7 +2044,7 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E collection_formats=collection_formats) def list_positions(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # noqa: E501 + """List all positions of a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2052,10 +2052,10 @@ def list_positions(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param bool holding: Return only real positions - true, return all - false. - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be 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. @@ -2071,7 +2071,7 @@ def list_positions(self, settle, **kwargs): # noqa: E501 return self.list_positions_with_http_info(settle, **kwargs) # noqa: E501 def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all positions of a user # noqa: E501 + """List all positions of a user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2079,10 +2079,10 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param bool holding: Return only real positions - true, return all - false. - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be 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 @@ -2177,7 +2177,7 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_position(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # noqa: E501 + """Get single position. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2185,8 +2185,8 @@ def get_position(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2202,7 +2202,7 @@ def get_position(self, settle, contract, **kwargs): # noqa: E501 return self.get_position_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get single position # noqa: E501 + """Get single position. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2210,8 +2210,8 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2298,7 +2298,7 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 collection_formats=collection_formats) def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin # noqa: E501 + """Update position margin. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2306,9 +2306,9 @@ def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change amount, positive number increases, negative number (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str change: Margin change amount, positive number increases, negative number. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2324,7 +2324,7 @@ def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E return self.update_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 def update_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin # noqa: E501 + """Update position margin. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2332,9 +2332,9 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change amount, positive number increases, negative number (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str change: Margin change amount, positive number increases, negative number. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2428,7 +2428,7 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar collection_formats=collection_formats) def update_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 + """Update position leverage. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2436,10 +2436,10 @@ def update_position_leverage(self, settle, contract, leverage, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str leverage: New position leverage. (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2455,7 +2455,7 @@ def update_position_leverage(self, settle, contract, leverage, **kwargs): # noq return self.update_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 def update_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage # noqa: E501 + """Update position leverage. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2463,10 +2463,10 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str leverage: New position leverage. (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2563,7 +2563,7 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** collection_formats=collection_formats) def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501 - """Switch to the full position-by-store mode # noqa: E501 + """Switch to the full position-by-store mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2571,7 +2571,7 @@ def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwar >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param FuturesPositionCrossMode futures_position_cross_mode: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2588,7 +2588,7 @@ def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwar return self.update_position_cross_mode_with_http_info(settle, futures_position_cross_mode, **kwargs) # noqa: E501 def update_position_cross_mode_with_http_info(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501 - """Switch to the full position-by-store mode # noqa: E501 + """Switch to the full position-by-store mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2596,7 +2596,7 @@ def update_position_cross_mode_with_http_info(self, settle, futures_position_cro >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param FuturesPositionCrossMode futures_position_cross_mode: (required) :param _return_http_data_only: response data without head status code and headers @@ -2688,7 +2688,7 @@ def update_position_cross_mode_with_http_info(self, settle, futures_position_cro collection_formats=collection_formats) def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 + """Update position risk limit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2696,9 +2696,9 @@ def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str risk_limit: New Risk Limit Value. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2714,7 +2714,7 @@ def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # return self.update_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit # noqa: E501 + """Update position risk limit. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2722,9 +2722,9 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str risk_limit: New Risk Limit Value. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2818,17 +2818,17 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit collection_formats=collection_formats) def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 - """Enable or disable dual mode # noqa: E501 + """Enable or disable dual mode. # noqa: E501 - The prerequisite for changing mode is that all positions have no holdings # noqa: E501 + The prerequisite for changing mode is that all positions have no holdings. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_dual_mode(settle, dual_mode, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param bool dual_mode: Whether to enable dual mode (required) + :param str settle: Settle currency. (required) + :param bool dual_mode: Whether to enable dual mode. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2844,17 +2844,17 @@ def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 return self.set_dual_mode_with_http_info(settle, dual_mode, **kwargs) # noqa: E501 def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E501 - """Enable or disable dual mode # noqa: E501 + """Enable or disable dual mode. # noqa: E501 - The prerequisite for changing mode is that all positions have no holdings # noqa: E501 + The prerequisite for changing mode is that all positions have no holdings. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_dual_mode_with_http_info(settle, dual_mode, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param bool dual_mode: Whether to enable dual mode (required) + :param str settle: Settle currency. (required) + :param bool dual_mode: Whether to enable dual mode. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2941,7 +2941,7 @@ def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 - """Retrieve position detail in dual mode # noqa: E501 + """Retrieve position detail in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2949,8 +2949,8 @@ def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2966,7 +2966,7 @@ def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 return self.get_dual_mode_position_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Retrieve position detail in dual mode # noqa: E501 + """Retrieve position detail in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2974,8 +2974,8 @@ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3062,7 +3062,7 @@ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # collection_formats=collection_formats) def update_dual_mode_position_margin(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 - """Update position margin in dual mode # noqa: E501 + """Update position margin in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3070,10 +3070,10 @@ def update_dual_mode_position_margin(self, settle, contract, change, dual_side, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change amount, positive number increases, negative number (required) - :param str dual_side: Long or short position (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str change: Margin change amount, positive number increases, negative number. (required) + :param str dual_side: Long or short position. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3089,7 +3089,7 @@ def update_dual_mode_position_margin(self, settle, contract, change, dual_side, return self.update_dual_mode_position_margin_with_http_info(settle, contract, change, dual_side, **kwargs) # noqa: E501 def update_dual_mode_position_margin_with_http_info(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 - """Update position margin in dual mode # noqa: E501 + """Update position margin in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3097,10 +3097,10 @@ def update_dual_mode_position_margin_with_http_info(self, settle, contract, chan >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str change: Margin change amount, positive number increases, negative number (required) - :param str dual_side: Long or short position (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str change: Margin change amount, positive number increases, negative number. (required) + :param str dual_side: Long or short position. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3201,7 +3201,7 @@ def update_dual_mode_position_margin_with_http_info(self, settle, contract, chan collection_formats=collection_formats) def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage in dual mode # noqa: E501 + """Update position leverage in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3209,10 +3209,10 @@ def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwarg >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str leverage: New position leverage. (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3228,7 +3228,7 @@ def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwarg return self.update_dual_mode_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 def update_dual_mode_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage in dual mode # noqa: E501 + """Update position leverage in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3236,10 +3236,10 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str leverage: New position leverage (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str leverage: New position leverage. (required) + :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3336,7 +3336,7 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le collection_formats=collection_formats) def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit in dual mode # noqa: E501 + """Update position risk limit in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3344,9 +3344,9 @@ def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **k >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str risk_limit: New Risk Limit Value. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3362,7 +3362,7 @@ def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **k return self.update_dual_mode_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit in dual mode # noqa: E501 + """Update position risk limit in dual mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3370,9 +3370,9 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) - :param str risk_limit: New Risk Limit Value (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (required) + :param str risk_limit: New Risk Limit Value. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3466,7 +3466,7 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, collection_formats=collection_formats) def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 + """List futures orders. # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3475,11 +3475,11 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -3496,7 +3496,7 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 return self.list_futures_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List futures orders # noqa: E501 + """List futures orders. # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3505,11 +3505,11 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param _return_http_data_only: response data without head status code and headers @@ -3615,16 +3615,16 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: collection_formats=collection_formats) def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 + """Create a futures order. # noqa: E501 - - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 + - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_futures_order(settle, futures_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param FuturesOrder futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3642,16 +3642,16 @@ def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 return self.create_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order # noqa: E501 + """Create a futures order. # noqa: E501 - - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add position: reduce_only=false, size is a positive number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 + - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_futures_order_with_http_info(settle, futures_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param FuturesOrder futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -3747,19 +3747,19 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): collection_formats=collection_formats) def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 + """Cancel all `open` orders matched. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_futures_orders(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (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 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 ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all + :param str side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3775,19 +3775,19 @@ def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501 return self.cancel_futures_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 + """Cancel all `open` orders matched. # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation # noqa: E501 + Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_futures_orders_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract (required) + :param str settle: Settle currency. (required) + :param str contract: Futures contract. (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 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 ordersspecified. Set to bid to cancel all buy orders, set to ask to cancel all + :param str side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3880,7 +3880,7 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n collection_formats=collection_formats) def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501 - """List Futures Orders By Time Range # noqa: E501 + """List Futures Orders By Time Range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3888,12 +3888,12 @@ def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501 >>> 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 str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be 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. @@ -3909,7 +3909,7 @@ def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501 return self.get_orders_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 - """List Futures Orders By Time Range # noqa: E501 + """List Futures Orders By Time Range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3917,12 +3917,12 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: >>> 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 str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be 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 @@ -4023,7 +4023,7 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: collection_formats=collection_formats) def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a batch of futures orders # noqa: E501 + """Create a batch of futures orders. # noqa: E501 - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4032,7 +4032,7 @@ def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param list[FuturesOrder] futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4050,7 +4050,7 @@ def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: return self.create_batch_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a batch of futures orders # noqa: E501 + """Create a batch of futures orders. # noqa: E501 - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4059,7 +4059,7 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param list[FuturesOrder] futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -4155,7 +4155,7 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa collection_formats=collection_formats) def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4164,8 +4164,8 @@ def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str settle: Settle currency. (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -4181,7 +4181,7 @@ def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 return self.get_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4190,8 +4190,8 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str settle: Settle currency. (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4278,7 +4278,7 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: collection_formats=collection_formats) def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 + """Amend an order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4286,8 +4286,8 @@ def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwarg >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str settle: Settle currency. (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param FuturesOrderAmendment futures_order_amendment: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4305,7 +4305,7 @@ def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwarg return self.amend_futures_order_with_http_info(settle, order_id, futures_order_amendment, **kwargs) # noqa: E501 def amend_futures_order_with_http_info(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 + """Amend an order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4313,8 +4313,8 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str settle: Settle currency. (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param FuturesOrderAmendment futures_order_amendment: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -4417,7 +4417,7 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame collection_formats=collection_formats) def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4425,8 +4425,8 @@ def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str settle: Settle currency. (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -4443,7 +4443,7 @@ def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501 return self.cancel_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4451,8 +4451,8 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) + :param str settle: Settle currency. (required) + :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code and headers @@ -4543,7 +4543,7 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no collection_formats=collection_formats) def get_my_trades(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4552,11 +4552,11 @@ def get_my_trades(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int order: Futures order ID, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -4573,7 +4573,7 @@ def get_my_trades(self, settle, **kwargs): # noqa: E501 return self.get_my_trades_with_http_info(settle, **kwargs) # noqa: E501 def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4582,11 +4582,11 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int order: Futures order ID, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int order: Futures order ID, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. :param _return_http_data_only: response data without head status code and headers @@ -4688,7 +4688,7 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 - """List personal trading history by time range # noqa: E501 + """List personal trading history by time range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4696,12 +4696,12 @@ def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 >>> 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 str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str role: Query role, maker or taker. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -4718,7 +4718,7 @@ def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 return self.get_my_trades_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history by time range # noqa: E501 + """List personal trading history by time range. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4726,12 +4726,12 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq >>> 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 str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param str role: Query role, maker or taker. :param _return_http_data_only: response data without head status code and headers @@ -4836,7 +4836,7 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq collection_formats=collection_formats) def list_position_close(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 + """List position close history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4844,14 +4844,14 @@ def list_position_close(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str side: Query side. long or shot - :param str pnl: Query profit or loss + :param str side: Query side. long or shot. + :param str pnl: Query profit or loss. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -4867,7 +4867,7 @@ def list_position_close(self, settle, **kwargs): # noqa: E501 return self.list_position_close_with_http_info(settle, **kwargs) # noqa: E501 def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 - """List position close history # noqa: E501 + """List position close history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4875,14 +4875,14 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str side: Query side. long or shot - :param str pnl: Query profit or loss + :param str side: Query side. long or shot. + :param str pnl: Query profit or loss. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4989,7 +4989,7 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_liquidates(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 + """List liquidation history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4997,10 +4997,10 @@ def list_liquidates(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify a liquidation timestamp. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5016,7 +5016,7 @@ def list_liquidates(self, settle, **kwargs): # noqa: E501 return self.list_liquidates_with_http_info(settle, **kwargs) # noqa: E501 def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 - """List liquidation history # noqa: E501 + """List liquidation history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5024,10 +5024,10 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify a liquidation timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify a liquidation timestamp. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5120,7 +5120,7 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_auto_deleverages(self, settle, **kwargs): # noqa: E501 - """List Auto-Deleveraging History # noqa: E501 + """List Auto-Deleveraging History. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5128,10 +5128,10 @@ def list_auto_deleverages(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify an auto-deleveraging timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify an auto-deleveraging timestamp. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5147,7 +5147,7 @@ def list_auto_deleverages(self, settle, **kwargs): # noqa: E501 return self.list_auto_deleverages_with_http_info(settle, **kwargs) # noqa: E501 def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 - """List Auto-Deleveraging History # noqa: E501 + """List Auto-Deleveraging History. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5155,10 +5155,10 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int at: Specify an auto-deleveraging timestamp + :param str settle: Settle currency. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int at: Specify an auto-deleveraging timestamp. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5251,16 +5251,16 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 + """Countdown cancel orders. # noqa: E501 - Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 + Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -5277,16 +5277,16 @@ def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task return self.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, **kwargs) # noqa: E501 def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 + """Countdown cancel orders. # noqa: E501 - Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 + Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) :param _return_http_data_only: response data without head status code and headers @@ -5378,7 +5378,7 @@ def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_a collection_formats=collection_formats) def get_futures_fee(self, settle, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 + """Query user trading fee rates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5386,8 +5386,8 @@ def get_futures_fee(self, settle, **kwargs): # noqa: E501 >>> 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 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. @@ -5403,7 +5403,7 @@ def get_futures_fee(self, settle, **kwargs): # noqa: E501 return self.get_futures_fee_with_http_info(settle, **kwargs) # noqa: E501 def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 + """Query user trading fee rates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5411,8 +5411,8 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 >>> 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 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 @@ -5495,16 +5495,16 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 + """Cancel a batch of orders with an ID list. # noqa: E501 - Multiple different order IDs can be specified. A maximum of 20 records # noqa: E501 + Multiple different order IDs can be specified. A maximum of 20 records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_batch_future_orders(settle, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param list[str] request_body: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5522,16 +5522,16 @@ def cancel_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E return self.cancel_batch_future_orders_with_http_info(settle, request_body, **kwargs) # noqa: E501 def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 + """Cancel a batch of orders with an ID list. # noqa: E501 - Multiple different order IDs can be specified. A maximum of 20 records # noqa: E501 + Multiple different order IDs can be specified. A maximum of 20 records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_batch_future_orders_with_http_info(settle, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param list[str] request_body: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -5627,16 +5627,16 @@ def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwar collection_formats=collection_formats) def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 - """Batch modify orders with specified IDs # noqa: E501 + """Batch modify orders with specified IDs. # noqa: E501 - Multiple different order IDs can be specified. A maximum of 10 orders can # noqa: E501 + Multiple different order IDs can be specified. A maximum of 10 orders can. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_future_orders(settle, batch_amend_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param list[BatchAmendOrderReq] batch_amend_order_req: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5654,16 +5654,16 @@ def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # return self.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, **kwargs) # noqa: E501 def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 - """Batch modify orders with specified IDs # noqa: E501 + """Batch modify orders with specified IDs. # noqa: E501 - Multiple different order IDs can be specified. A maximum of 10 orders can # noqa: E501 + Multiple different order IDs can be specified. A maximum of 10 orders can. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :param str settle: Settle currency. (required) :param list[BatchAmendOrderReq] batch_amend_order_req: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -5759,7 +5759,7 @@ def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req collection_formats=collection_formats) def get_futures_risk_limit_table(self, settle, table_id, **kwargs): # noqa: E501 - """Query risk limit table by table_id # noqa: E501 + """Query risk limit table by table_id. # noqa: E501 Just pass table_id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -5768,8 +5768,8 @@ def get_futures_risk_limit_table(self, settle, table_id, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str table_id: Risk limit table ID (required) + :param str settle: Settle currency. (required) + :param str table_id: Risk limit table ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5785,7 +5785,7 @@ def get_futures_risk_limit_table(self, settle, table_id, **kwargs): # noqa: E50 return self.get_futures_risk_limit_table_with_http_info(settle, table_id, **kwargs) # noqa: E501 def get_futures_risk_limit_table_with_http_info(self, settle, table_id, **kwargs): # noqa: E501 - """Query risk limit table by table_id # noqa: E501 + """Query risk limit table by table_id. # noqa: E501 Just pass table_id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -5794,8 +5794,8 @@ def get_futures_risk_limit_table_with_http_info(self, settle, table_id, **kwargs >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str table_id: Risk limit table ID (required) + :param str settle: Settle currency. (required) + :param str table_id: Risk limit table ID. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5882,7 +5882,7 @@ def get_futures_risk_limit_table_with_http_info(self, settle, table_id, **kwargs collection_formats=collection_formats) def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders # noqa: E501 + """List All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5890,11 +5890,11 @@ def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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. @@ -5910,7 +5910,7 @@ def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 return self.list_price_triggered_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders # noqa: E501 + """List All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5918,11 +5918,11 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str status: Only list the orders with this status (required) - :param str contract: Futures contract, return related data only if specified - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str settle: Settle currency. (required) + :param str status: Only list the orders with this status. (required) + :param str contract: Futures contract, return related data only if specified. + :param int limit: Maximum number of records to be returned in a single list. + :param int 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 @@ -6024,7 +6024,7 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): collection_formats=collection_formats) def create_price_triggered_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 + """Create a 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 @@ -6032,7 +6032,7 @@ def create_price_triggered_order(self, settle, futures_price_triggered_order, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :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 @@ -6049,7 +6049,7 @@ def create_price_triggered_order(self, settle, futures_price_triggered_order, ** return self.create_price_triggered_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501 def create_price_triggered_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 + """Create a 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 @@ -6057,7 +6057,7 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) + :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 @@ -6149,7 +6149,7 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig collection_formats=collection_formats) def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders # noqa: E501 + """Cancel All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6157,8 +6157,8 @@ def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501 >>> 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 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. @@ -6174,7 +6174,7 @@ def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501 return self.cancel_price_triggered_order_list_with_http_info(settle, **kwargs) # noqa: E501 def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders # noqa: E501 + """Cancel All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6182,8 +6182,8 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # >>> 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 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 @@ -6266,7 +6266,7 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # collection_formats=collection_formats) def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 + """Get a 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 @@ -6274,8 +6274,8 @@ def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -6291,7 +6291,7 @@ def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 return self.get_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 + """Get a 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 @@ -6299,8 +6299,8 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified 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 @@ -6387,7 +6387,7 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): collection_formats=collection_formats) def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 + """cancel a 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 @@ -6395,8 +6395,8 @@ def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -6412,7 +6412,7 @@ def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E50 return self.cancel_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 + """cancel a 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 @@ -6420,8 +6420,8 @@ def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency (required) - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str settle: Settle currency. (required) + :param str order_id: Retrieve the data of the order with the specified 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 diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py index a26190c..d08dd1a 100644 --- a/gate_api/api/margin_api.py +++ b/gate_api/api/margin_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_margin_accounts(self, **kwargs): # noqa: E501 - """Margin account list # noqa: E501 + """Margin account list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,7 +45,7 @@ def list_margin_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :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. @@ -61,7 +61,7 @@ def list_margin_accounts(self, **kwargs): # noqa: E501 return self.list_margin_accounts_with_http_info(**kwargs) # noqa: E501 def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Margin account list # noqa: E501 + """Margin account list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -69,7 +69,7 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :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 @@ -145,7 +145,7 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_margin_account_book(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 + """List margin account balance change history. # noqa: E501 Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -157,10 +157,10 @@ def list_margin_account_book(self, **kwargs): # noqa: E501 :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -176,7 +176,7 @@ def list_margin_account_book(self, **kwargs): # noqa: E501 return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List margin account balance change history # noqa: E501 + """List margin account balance change history. # noqa: E501 Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -188,10 +188,10 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -291,7 +291,7 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_funding_accounts(self, **kwargs): # noqa: E501 - """Funding account list # noqa: E501 + """Funding account list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -299,7 +299,7 @@ def list_funding_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency: Retrieve data of the specified currency. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -315,7 +315,7 @@ def list_funding_accounts(self, **kwargs): # noqa: E501 return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Funding account list # noqa: E501 + """Funding account list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -323,7 +323,7 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency: Retrieve data of the specified currency. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -399,7 +399,7 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_auto_repay_status(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting # noqa: E501 + """Retrieve user auto repayment setting. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -422,7 +422,7 @@ def get_auto_repay_status(self, **kwargs): # noqa: E501 return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting # noqa: E501 + """Retrieve user auto repayment setting. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -502,7 +502,7 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def set_auto_repay(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting # noqa: E501 + """Update user's auto repayment setting. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -510,7 +510,7 @@ def set_auto_repay(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) + :param str status: New auto repayment status. `on` - enabled, `off` - disabled. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -526,7 +526,7 @@ def set_auto_repay(self, status, **kwargs): # noqa: E501 return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting # noqa: E501 + """Update user's auto repayment setting. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -534,7 +534,7 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled (required) + :param str status: New auto repayment status. `on` - enabled, `off` - disabled. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -614,7 +614,7 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_margin_transferable(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 + """Get the max transferable amount for a specific margin currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -622,8 +622,8 @@ def get_margin_transferable(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency. (required) + :param str currency_pair: Currency pair. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -639,7 +639,7 @@ def get_margin_transferable(self, currency, **kwargs): # noqa: E501 return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency # noqa: E501 + """Get the max transferable amount for a specific margin currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -647,8 +647,8 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair + :param str currency: Retrieve data of the specified currency. (required) + :param str currency_pair: Currency pair. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -731,7 +731,7 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E collection_formats=collection_formats) def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 + """Check the user's own leverage lending gradient in the current market. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -739,7 +739,7 @@ def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -755,7 +755,7 @@ def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market # noqa: E501 + """Check the user's own leverage lending gradient in the current market. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -763,7 +763,7 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -843,7 +843,7 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: collection_formats=collection_formats) def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # noqa: E501 + """Query the current market leverage lending gradient. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -851,7 +851,7 @@ def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -867,7 +867,7 @@ def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient # noqa: E501 + """Query the current market leverage lending gradient. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -875,7 +875,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -955,7 +955,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq collection_formats=collection_formats) def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # noqa: E501 + """Set the user market leverage multiple. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -979,7 +979,7 @@ def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple # noqa: E501 + """Set the user market leverage multiple. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1067,7 +1067,7 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar collection_formats=collection_formats) def list_margin_user_account(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 + """Query the user's leverage account list. # noqa: E501 Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1076,7 +1076,7 @@ def list_margin_user_account(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :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. @@ -1092,7 +1092,7 @@ def list_margin_user_account(self, **kwargs): # noqa: E501 return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 - """Query the user's leverage account list # noqa: E501 + """Query the user's leverage account list. # noqa: E501 Support querying risk rate per position account and margin rate per position account # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1101,7 +1101,7 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair + :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 @@ -1177,7 +1177,7 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated) # noqa: E501 + """List cross margin borrow history. (deprecated). # noqa: E501 Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1186,10 +1186,10 @@ def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) - :param str currency: Filter by currency - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.). (required) + :param str currency: Filter by currency. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1206,7 +1206,7 @@ def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501 def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated) # noqa: E501 + """List cross margin borrow history. (deprecated). # noqa: E501 Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1215,10 +1215,10 @@ def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) - :param str currency: Filter by currency - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.). (required) + :param str currency: Filter by currency. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _return_http_data_only: response data without head status code and headers @@ -1317,7 +1317,7 @@ def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E50 collection_formats=collection_formats) def list_cross_margin_repayments(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated) # noqa: E501 + """Retrieve cross margin repayments. (deprecated). # noqa: E501 Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1328,8 +1328,8 @@ def list_cross_margin_repayments(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency: :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1346,7 +1346,7 @@ def list_cross_margin_repayments(self, **kwargs): # noqa: E501 return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501 def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated) # noqa: E501 + """Retrieve cross margin repayments. (deprecated). # noqa: E501 Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1357,8 +1357,8 @@ def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency: :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _return_http_data_only: response data without head status code and headers diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py index dcea85b..7f6f473 100644 --- a/gate_api/api/margin_uni_api.py +++ b/gate_api/api/margin_uni_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_uni_currency_pairs(self, **kwargs): # noqa: E501 - """List lending markets # noqa: E501 + """List lending markets. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def list_uni_currency_pairs(self, **kwargs): # noqa: E501 return self.list_uni_currency_pairs_with_http_info(**kwargs) # noqa: E501 def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 - """List lending markets # noqa: E501 + """List lending markets. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 + """Get detail of lending market. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -148,7 +148,7 @@ def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -164,7 +164,7 @@ def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market # noqa: E501 + """Get detail of lending market. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -172,7 +172,7 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -252,7 +252,7 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa collection_formats=collection_formats) def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 + """Estimate interest Rate. # noqa: E501 Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -261,7 +261,7 @@ def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param list[str] currencies: An array of up to 10 specifying the currency name. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -277,7 +277,7 @@ def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate # noqa: E501 + """Estimate interest Rate. # noqa: E501 Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -286,7 +286,7 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name (required) + :param list[str] currencies: An array of up to 10 specifying the currency name. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -373,7 +373,7 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # collection_formats=collection_formats) def list_uni_loans(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + """List loans. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -381,10 +381,10 @@ def list_uni_loans(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency_pair: Currency pair. + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -400,7 +400,7 @@ def list_uni_loans(self, **kwargs): # noqa: E501 return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + """List loans. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -408,10 +408,10 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency_pair: Currency pair. + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -502,7 +502,7 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + """Borrow or repay. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -526,7 +526,7 @@ def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + """Borrow or repay. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -614,7 +614,7 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_uni_loan_records(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + """Get load records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -622,11 +622,11 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency - :param str currency_pair: Currency pair - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str type: type: borrow - borrow, repay - repay. + :param str currency: Retrieve data of the specified currency. + :param str currency_pair: Currency pair. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -642,7 +642,7 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501 return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + """Get load records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -650,11 +650,11 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay - :param str currency: Retrieve data of the specified currency - :param str currency_pair: Currency pair - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str type: type: borrow - borrow, repay - repay. + :param str currency: Retrieve data of the specified currency. + :param str currency_pair: Currency pair. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -748,7 +748,7 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + """List interest records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -756,10 +756,10 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param str currency_pair: Currency pair. + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -777,7 +777,7 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + """List interest records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -785,10 +785,10 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param str currency_pair: Currency pair. + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -887,7 +887,7 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 + """Get maximum borrowable. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -895,8 +895,8 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (required) + :param str currency: Retrieve data of the specified currency. (required) + :param str currency_pair: Currency pair. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -912,7 +912,7 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable # noqa: E501 + """Get maximum borrowable. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -920,8 +920,8 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) - :param str currency_pair: Currency pair (required) + :param str currency: Retrieve data of the specified currency. (required) + :param str currency_pair: Currency pair. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index 5502323..ac80d44 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_multi_collateral_orders(self, **kwargs): # noqa: E501 - """List Multi-Collateral Orders # noqa: E501 + """List Multi-Collateral Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,9 +45,9 @@ def list_multi_collateral_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str sort: Query the current interest rate of the currency in the previous hour + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param str sort: Query the current interest rate of the currency in the previous hour. :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -64,7 +64,7 @@ def list_multi_collateral_orders(self, **kwargs): # noqa: E501 return self.list_multi_collateral_orders_with_http_info(**kwargs) # noqa: E501 def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 - """List Multi-Collateral Orders # noqa: E501 + """List Multi-Collateral Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -72,9 +72,9 @@ def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param str sort: Query the current interest rate of the currency in the previous hour + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param str sort: Query the current interest rate of the currency in the previous hour. :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _return_http_data_only: response data without head status code and headers @@ -166,7 +166,7 @@ def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_multi_collateral(self, create_multi_collateral_order, **kwargs): # noqa: E501 - """Create Multi-Collateral Order # noqa: E501 + """Create Multi-Collateral Order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -190,7 +190,7 @@ def create_multi_collateral(self, create_multi_collateral_order, **kwargs): # n return self.create_multi_collateral_with_http_info(create_multi_collateral_order, **kwargs) # noqa: E501 def create_multi_collateral_with_http_info(self, create_multi_collateral_order, **kwargs): # noqa: E501 - """Create Multi-Collateral Order # noqa: E501 + """Create Multi-Collateral Order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -282,7 +282,7 @@ def create_multi_collateral_with_http_info(self, create_multi_collateral_order, collection_formats=collection_formats) def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 - """Get Multi-Collateral Order Detail # noqa: E501 + """Get Multi-Collateral Order Detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -290,7 +290,7 @@ def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Order ID returned on successful order creation (required) + :param str order_id: Order ID returned on successful order creation. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -306,7 +306,7 @@ def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 return self.get_multi_collateral_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get Multi-Collateral Order Detail # noqa: E501 + """Get Multi-Collateral Order Detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -314,7 +314,7 @@ def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Order ID returned on successful order creation (required) + :param str order_id: Order ID returned on successful order creation. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -394,7 +394,7 @@ def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): collection_formats=collection_formats) def list_multi_repay_records(self, type, **kwargs): # noqa: E501 - """List Multi-Collateral Repay Records # noqa: E501 + """List Multi-Collateral Repay Records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -402,12 +402,12 @@ def list_multi_repay_records(self, type, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) + :param str borrow_currency: Borrowed currency. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -423,7 +423,7 @@ def list_multi_repay_records(self, type, **kwargs): # noqa: E501 return self.list_multi_repay_records_with_http_info(type, **kwargs) # noqa: E501 def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 - """List Multi-Collateral Repay Records # noqa: E501 + """List Multi-Collateral Repay Records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -431,12 +431,12 @@ def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) - :param str borrow_currency: Borrowed currency - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) + :param str borrow_currency: Borrowed currency. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -537,7 +537,7 @@ def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 collection_formats=collection_formats) def repay_multi_collateral_loan(self, repay_multi_loan, **kwargs): # noqa: E501 - """Repay Multi-Collateral Loan # noqa: E501 + """Repay Multi-Collateral Loan. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -561,7 +561,7 @@ def repay_multi_collateral_loan(self, repay_multi_loan, **kwargs): # noqa: E501 return self.repay_multi_collateral_loan_with_http_info(repay_multi_loan, **kwargs) # noqa: E501 def repay_multi_collateral_loan_with_http_info(self, repay_multi_loan, **kwargs): # noqa: E501 - """Repay Multi-Collateral Loan # noqa: E501 + """Repay Multi-Collateral Loan. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -653,7 +653,7 @@ def repay_multi_collateral_loan_with_http_info(self, repay_multi_loan, **kwargs) collection_formats=collection_formats) def list_multi_collateral_records(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 + """Query collateral adjustment records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -661,11 +661,11 @@ def list_multi_collateral_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str collateral_currency: Collateral + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param str collateral_currency: Collateral. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -681,7 +681,7 @@ def list_multi_collateral_records(self, **kwargs): # noqa: E501 return self.list_multi_collateral_records_with_http_info(**kwargs) # noqa: E501 def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 - """Query collateral adjustment records # noqa: E501 + """Query collateral adjustment records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -689,11 +689,11 @@ def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str collateral_currency: Collateral + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param str collateral_currency: Collateral. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -787,7 +787,7 @@ def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def operate_multi_collateral(self, collateral_adjust, **kwargs): # noqa: E501 - """Operate Multi-Collateral # noqa: E501 + """Operate Multi-Collateral. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -811,7 +811,7 @@ def operate_multi_collateral(self, collateral_adjust, **kwargs): # noqa: E501 return self.operate_multi_collateral_with_http_info(collateral_adjust, **kwargs) # noqa: E501 def operate_multi_collateral_with_http_info(self, collateral_adjust, **kwargs): # noqa: E501 - """Operate Multi-Collateral # noqa: E501 + """Operate Multi-Collateral. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -903,7 +903,7 @@ def operate_multi_collateral_with_http_info(self, collateral_adjust, **kwargs): collection_formats=collection_formats) def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 - """List User Currency Quota # noqa: E501 + """List User Currency Quota. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -911,8 +911,8 @@ def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing (required) - :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc (required) + :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing. (required) + :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -928,7 +928,7 @@ def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 return self.list_user_currency_quota_with_http_info(type, currency, **kwargs) # noqa: E501 def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # noqa: E501 - """List User Currency Quota # noqa: E501 + """List User Currency Quota. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -936,8 +936,8 @@ def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing (required) - :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas;when it is a borrowing currency, only one currenc (required) + :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing. (required) + :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1024,7 +1024,7 @@ def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # collection_formats=collection_formats) def list_multi_collateral_currencies(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies in Multi-Collateral # noqa: E501 + """Query supported borrowing and collateral currencies in Multi-Collateral. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1047,7 +1047,7 @@ def list_multi_collateral_currencies(self, **kwargs): # noqa: E501 return self.list_multi_collateral_currencies_with_http_info(**kwargs) # noqa: E501 def list_multi_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies in Multi-Collateral # noqa: E501 + """Query supported borrowing and collateral currencies in Multi-Collateral. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1127,7 +1127,7 @@ def list_multi_collateral_currencies_with_http_info(self, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_multi_collateral_ltv(self, **kwargs): # noqa: E501 - """Get Multi-Collateral ratio # noqa: E501 + """Get Multi-Collateral ratio. # noqa: E501 The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1151,7 +1151,7 @@ def get_multi_collateral_ltv(self, **kwargs): # noqa: E501 return self.get_multi_collateral_ltv_with_http_info(**kwargs) # noqa: E501 def get_multi_collateral_ltv_with_http_info(self, **kwargs): # noqa: E501 - """Get Multi-Collateral ratio # noqa: E501 + """Get Multi-Collateral ratio. # noqa: E501 The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1232,7 +1232,7 @@ def get_multi_collateral_ltv_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_multi_collateral_fix_rate(self, **kwargs): # noqa: E501 - """Query fixed interest rates for the currency for 7 days and 30 days # noqa: E501 + """Query fixed interest rates for the currency for 7 days and 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1255,7 +1255,7 @@ def get_multi_collateral_fix_rate(self, **kwargs): # noqa: E501 return self.get_multi_collateral_fix_rate_with_http_info(**kwargs) # noqa: E501 def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501 - """Query fixed interest rates for the currency for 7 days and 30 days # noqa: E501 + """Query fixed interest rates for the currency for 7 days and 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1335,7 +1335,7 @@ def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 - """Query the current interest rate of the currency # noqa: E501 + """Query the current interest rate of the currency. # noqa: E501 Query the current interest rate of the currency in the previous hour. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1345,7 +1345,7 @@ def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100items. (required) - :param str vip_level: VIP level, defaults to 0 if not transferred + :param str vip_level: VIP level, defaults to 0 if not transferred. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1361,7 +1361,7 @@ def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 return self.get_multi_collateral_current_rate_with_http_info(currencies, **kwargs) # noqa: E501 def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Query the current interest rate of the currency # noqa: E501 + """Query the current interest rate of the currency. # noqa: E501 Query the current interest rate of the currency in the previous hour. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1371,7 +1371,7 @@ def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs) :param bool async_req: execute request asynchronously :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100items. (required) - :param str vip_level: VIP level, defaults to 0 if not transferred + :param str vip_level: VIP level, defaults to 0 if not transferred. :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/options_api.py b/gate_api/api/options_api.py index d41e16e..2ba2988 100644 --- a/gate_api/api/options_api.py +++ b/gate_api/api/options_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_options_underlyings(self, **kwargs): # noqa: E501 - """List all underlyings # noqa: E501 + """List all underlyings. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def list_options_underlyings(self, **kwargs): # noqa: E501 return self.list_options_underlyings_with_http_info(**kwargs) # noqa: E501 def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501 - """List all underlyings # noqa: E501 + """List all underlyings. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_expirations(self, underlying, **kwargs): # noqa: E501 - """List all expiration times # noqa: E501 + """List all expiration times. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -148,7 +148,7 @@ def list_options_expirations(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -164,7 +164,7 @@ def list_options_expirations(self, underlying, **kwargs): # noqa: E501 return self.list_options_expirations_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List all expiration times # noqa: E501 + """List all expiration times. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -172,7 +172,7 @@ def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str underlying: Underlying (Obtained by listing underlying 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 @@ -252,7 +252,7 @@ def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa collection_formats=collection_formats) def list_options_contracts(self, underlying, **kwargs): # noqa: E501 - """List all the contracts with specified underlying and expiration time # noqa: E501 + """List all the contracts with specified underlying and expiration time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -260,8 +260,8 @@ def list_options_contracts(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int expiration: Unix timestamp of the expiration time + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param int expiration: Unix timestamp of the expiration time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -277,7 +277,7 @@ def list_options_contracts(self, underlying, **kwargs): # noqa: E501 return self.list_options_contracts_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List all the contracts with specified underlying and expiration time # noqa: E501 + """List all the contracts with specified underlying and expiration time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -285,8 +285,8 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int expiration: Unix timestamp of the expiration time + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param int expiration: Unix timestamp of the expiration time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -369,7 +369,7 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: collection_formats=collection_formats) def get_options_contract(self, contract, **kwargs): # noqa: E501 - """Query specified contract detail # noqa: E501 + """Query specified contract detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -393,7 +393,7 @@ def get_options_contract(self, contract, **kwargs): # noqa: E501 return self.get_options_contract_with_http_info(contract, **kwargs) # noqa: E501 def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501 - """Query specified contract detail # noqa: E501 + """Query specified contract detail. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -481,7 +481,7 @@ def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_settlements(self, underlying, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 + """List settlement history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -489,9 +489,9 @@ def list_options_settlements(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -509,7 +509,7 @@ def list_options_settlements(self, underlying, **kwargs): # noqa: E501 return self.list_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List settlement history # noqa: E501 + """List settlement history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -517,9 +517,9 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -619,7 +619,7 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa collection_formats=collection_formats) def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E501 - """Get specified contract's settlement # noqa: E501 + """Get specified contract's settlement. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -628,7 +628,7 @@ def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E :param bool async_req: execute request asynchronously :param str contract: (required) - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) :param int at: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -645,7 +645,7 @@ def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E return self.get_options_settlement_with_http_info(contract, underlying, at, **kwargs) # noqa: E501 def get_options_settlement_with_http_info(self, contract, underlying, at, **kwargs): # noqa: E501 - """Get specified contract's settlement # noqa: E501 + """Get specified contract's settlement. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -654,7 +654,7 @@ def get_options_settlement_with_http_info(self, contract, underlying, at, **kwar :param bool async_req: execute request asynchronously :param str contract: (required) - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) :param int at: (required) :param _return_http_data_only: response data without head status code and headers @@ -749,7 +749,7 @@ def get_options_settlement_with_http_info(self, contract, underlying, at, **kwar collection_formats=collection_formats) def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 - """List my options settlements # noqa: E501 + """List my options settlements. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -757,10 +757,10 @@ def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str contract: Options contract name. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -778,7 +778,7 @@ def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 return self.list_my_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List my options settlements # noqa: E501 + """List my options settlements. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -786,10 +786,10 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str contract: Options contract name. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -892,18 +892,18 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n collection_formats=collection_formats) def list_options_order_book(self, contract, **kwargs): # noqa: E501 - """Options order book # noqa: E501 + """Options order book. # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_options_order_book(contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids + :param str contract: Options contract name. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -920,18 +920,18 @@ def list_options_order_book(self, contract, **kwargs): # noqa: E501 return self.list_options_order_book_with_http_info(contract, **kwargs) # noqa: E501 def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E501 - """Options order book # noqa: E501 + """Options order book. # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_options_order_book_with_http_info(contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids + :param str contract: Options contract name. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. :param _return_http_data_only: response data without head status code and headers @@ -1025,7 +1025,7 @@ def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E collection_formats=collection_formats) def list_options_tickers(self, underlying, **kwargs): # noqa: E501 - """List tickers of options contracts # noqa: E501 + """List tickers of options contracts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1033,7 +1033,7 @@ def list_options_tickers(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1049,7 +1049,7 @@ def list_options_tickers(self, underlying, **kwargs): # noqa: E501 return self.list_options_tickers_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List tickers of options contracts # noqa: E501 + """List tickers of options contracts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1057,7 +1057,7 @@ def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str underlying: Underlying (Obtained by listing underlying 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 @@ -1137,7 +1137,7 @@ def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 - """Get underlying ticker # noqa: E501 + """Get underlying ticker. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1145,7 +1145,7 @@ def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (required) + :param str underlying: Underlying. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1161,7 +1161,7 @@ def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 return self.list_options_underlying_tickers_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 - """Get underlying ticker # noqa: E501 + """Get underlying ticker. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1169,7 +1169,7 @@ def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (required) + :param str underlying: Underlying. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1249,7 +1249,7 @@ def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): collection_formats=collection_formats) def list_options_candlesticks(self, contract, **kwargs): # noqa: E501 - """Get options candlesticks # noqa: E501 + """Get options candlesticks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1257,11 +1257,11 @@ def list_options_candlesticks(self, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param int limit: Maximum number of records to be returned in a single list + :param str contract: Options contract name. (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points + :param str interval: Interval time between data points. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1277,7 +1277,7 @@ def list_options_candlesticks(self, contract, **kwargs): # noqa: E501 return self.list_options_candlesticks_with_http_info(contract, **kwargs) # noqa: E501 def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: E501 - """Get options candlesticks # noqa: E501 + """Get options candlesticks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1285,11 +1285,11 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name (required) - :param int limit: Maximum number of records to be returned in a single list + :param str contract: Options contract name. (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points + :param str interval: Interval time between data points. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1385,7 +1385,7 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: collection_formats=collection_formats) def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E501 - """Mark price candlesticks of an underlying # noqa: E501 + """Mark price candlesticks of an underlying. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1393,11 +1393,11 @@ def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points + :param str interval: Interval time between data points. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1413,7 +1413,7 @@ def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E return self.list_options_underlying_candlesticks_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwargs): # noqa: E501 - """Mark price candlesticks of an underlying # noqa: E501 + """Mark price candlesticks of an underlying. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1421,11 +1421,11 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param int limit: Maximum number of records to be returned in a single list + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param int limit: Maximum number of records to be returned in a single list. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points + :param str interval: Interval time between data points. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1521,7 +1521,7 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar collection_formats=collection_formats) def list_options_trades(self, **kwargs): # noqa: E501 - """Options trade history # noqa: E501 + """Options trade history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1529,10 +1529,10 @@ def list_options_trades(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str type: `C` is call, while `P` is put - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str contract: Options contract name. + :param str type: `C` is call, while `P` is put. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1550,7 +1550,7 @@ def list_options_trades(self, **kwargs): # noqa: E501 return self.list_options_trades_with_http_info(**kwargs) # noqa: E501 def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 - """Options trade history # noqa: E501 + """Options trade history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1558,10 +1558,10 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str type: `C` is call, while `P` is put - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str contract: Options contract name. + :param str type: `C` is call, while `P` is put. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -1660,7 +1660,7 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_account(self, **kwargs): # noqa: E501 - """List options account # noqa: E501 + """List options account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1683,7 +1683,7 @@ def list_options_account(self, **kwargs): # noqa: E501 return self.list_options_account_with_http_info(**kwargs) # noqa: E501 def list_options_account_with_http_info(self, **kwargs): # noqa: E501 - """List options account # noqa: E501 + """List options account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1763,7 +1763,7 @@ def list_options_account_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_account_book(self, **kwargs): # noqa: E501 - """List account changing history # noqa: E501 + """List account changing history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1771,8 +1771,8 @@ def list_options_account_book(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL @@ -1791,7 +1791,7 @@ def list_options_account_book(self, **kwargs): # noqa: E501 return self.list_options_account_book_with_http_info(**kwargs) # noqa: E501 def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List account changing history # noqa: E501 + """List account changing history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1799,8 +1799,8 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL @@ -1897,7 +1897,7 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_positions(self, **kwargs): # noqa: E501 - """List user's positions of specified underlying # noqa: E501 + """List user's positions of specified underlying. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1905,7 +1905,7 @@ def list_options_positions(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying + :param str underlying: Underlying. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1921,7 +1921,7 @@ def list_options_positions(self, **kwargs): # noqa: E501 return self.list_options_positions_with_http_info(**kwargs) # noqa: E501 def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 - """List user's positions of specified underlying # noqa: E501 + """List user's positions of specified underlying. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1929,7 +1929,7 @@ def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying + :param str underlying: Underlying. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2005,7 +2005,7 @@ def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_options_position(self, contract, **kwargs): # noqa: E501 - """Get specified contract position # noqa: E501 + """Get specified contract position. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2029,7 +2029,7 @@ def get_options_position(self, contract, **kwargs): # noqa: E501 return self.get_options_position_with_http_info(contract, **kwargs) # noqa: E501 def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501 - """Get specified contract position # noqa: E501 + """Get specified contract position. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2117,7 +2117,7 @@ def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_position_close(self, underlying, **kwargs): # noqa: E501 - """List user's liquidation history of specified underlying # noqa: E501 + """List user's liquidation history of specified underlying. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2125,8 +2125,8 @@ def list_options_position_close(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str contract: Options contract name. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2142,7 +2142,7 @@ def list_options_position_close(self, underlying, **kwargs): # noqa: E501 return self.list_options_position_close_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_position_close_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List user's liquidation history of specified underlying # noqa: E501 + """List user's liquidation history of specified underlying. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2150,8 +2150,8 @@ def list_options_position_close_with_http_info(self, underlying, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str contract: Options contract name. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2234,7 +2234,7 @@ def list_options_position_close_with_http_info(self, underlying, **kwargs): # n collection_formats=collection_formats) def list_options_orders(self, status, **kwargs): # noqa: E501 - """List options orders # noqa: E501 + """List options orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2242,11 +2242,11 @@ def list_options_orders(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str contract: Options contract name - :param str underlying: Underlying - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str status: Only list the orders with this status. (required) + :param str contract: Options contract name. + :param str underlying: Underlying. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2264,7 +2264,7 @@ def list_options_orders(self, status, **kwargs): # noqa: E501 return self.list_options_orders_with_http_info(status, **kwargs) # noqa: E501 def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 - """List options orders # noqa: E501 + """List options orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2272,11 +2272,11 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str contract: Options contract name - :param str underlying: Underlying - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str status: Only list the orders with this status. (required) + :param str contract: Options contract name. + :param str underlying: Underlying. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -2382,7 +2382,7 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_options_order(self, options_order, **kwargs): # noqa: E501 - """Create an options order # noqa: E501 + """Create an options order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2406,7 +2406,7 @@ def create_options_order(self, options_order, **kwargs): # noqa: E501 return self.create_options_order_with_http_info(options_order, **kwargs) # noqa: E501 def create_options_order_with_http_info(self, options_order, **kwargs): # noqa: E501 - """Create an options order # noqa: E501 + """Create an options order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2498,7 +2498,7 @@ def create_options_order_with_http_info(self, options_order, **kwargs): # noqa: collection_formats=collection_formats) def cancel_options_orders(self, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 + """Cancel all `open` orders matched. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2506,9 +2506,9 @@ def cancel_options_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str underlying: Underlying - :param str side: All bids or asks. Both included if not specified + :param str contract: Options contract name. + :param str underlying: Underlying. + :param str side: All bids or asks. Both included if not specified. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2524,7 +2524,7 @@ def cancel_options_orders(self, **kwargs): # noqa: E501 return self.cancel_options_orders_with_http_info(**kwargs) # noqa: E501 def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 - """Cancel all `open` orders matched # noqa: E501 + """Cancel all `open` orders matched. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2532,9 +2532,9 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name - :param str underlying: Underlying - :param str side: All bids or asks. Both included if not specified + :param str contract: Options contract name. + :param str underlying: Underlying. + :param str side: All bids or asks. Both included if not specified. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2616,7 +2616,7 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_options_order(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2624,7 +2624,7 @@ def get_options_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (required) + :param int order_id: Order ID returned on successful order creation. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2640,7 +2640,7 @@ def get_options_order(self, order_id, **kwargs): # noqa: E501 return self.get_options_order_with_http_info(order_id, **kwargs) # noqa: E501 def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2648,7 +2648,7 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (required) + :param int order_id: Order ID returned on successful order creation. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2728,7 +2728,7 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_options_order(self, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2736,7 +2736,7 @@ def cancel_options_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (required) + :param int order_id: Order ID returned on successful order creation. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2752,7 +2752,7 @@ def cancel_options_order(self, order_id, **kwargs): # noqa: E501 return self.cancel_options_order_with_http_info(order_id, **kwargs) # noqa: E501 def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2760,7 +2760,7 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation (required) + :param int order_id: Order ID returned on successful order creation. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2840,9 +2840,9 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def countdown_cancel_all_options(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 + """Countdown cancel orders. # noqa: E501 - Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 + Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_options(countdown_cancel_all_options_task, async_req=True) @@ -2865,9 +2865,9 @@ def countdown_cancel_all_options(self, countdown_cancel_all_options_task, **kwar return self.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, **kwargs) # noqa: E501 def countdown_cancel_all_options_with_http_info(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 + """Countdown cancel orders. # noqa: E501 - Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, all pending orders of the user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 + Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, async_req=True) @@ -2958,7 +2958,7 @@ def countdown_cancel_all_options_with_http_info(self, countdown_cancel_all_optio collection_formats=collection_formats) def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2966,10 +2966,10 @@ def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str contract: Options contract name. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2987,7 +2987,7 @@ def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 return self.list_my_options_trades_with_http_info(underlying, **kwargs) # noqa: E501 def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2995,10 +2995,10 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) - :param str contract: Options contract name - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str contract: Options contract name. + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -3101,7 +3101,7 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: collection_formats=collection_formats) def get_options_mmp(self, **kwargs): # noqa: E501 - """MMP Query # noqa: E501 + """MMP Query. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3109,7 +3109,7 @@ def get_options_mmp(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying + :param str underlying: Underlying. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3125,7 +3125,7 @@ def get_options_mmp(self, **kwargs): # noqa: E501 return self.get_options_mmp_with_http_info(**kwargs) # noqa: E501 def get_options_mmp_with_http_info(self, **kwargs): # noqa: E501 - """MMP Query # noqa: E501 + """MMP Query. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3133,7 +3133,7 @@ def get_options_mmp_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying + :param str underlying: Underlying. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index 4c67b88..aab8176 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -37,21 +37,21 @@ def __init__(self, api_client=None): self.api_client = api_client def agency_transaction_history(self, **kwargs): # noqa: E501 - """The agency obtains the transaction history of the recommended user # noqa: E501 + """The agency obtains the transaction history of the recommended user. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_transaction_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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. @@ -67,21 +67,21 @@ def agency_transaction_history(self, **kwargs): # noqa: E501 return self.agency_transaction_history_with_http_info(**kwargs) # noqa: E501 def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """The agency obtains the transaction history of the recommended user # noqa: E501 + """The agency obtains the transaction history of the recommended user. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_transaction_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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 @@ -178,21 +178,21 @@ def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def agency_commissions_history(self, **kwargs): # noqa: E501 - """The agency obtains the commission history of the recommended user # noqa: E501 + """The agency obtains the commission history of the recommended user. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_commissions_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency: Filter by currency. Return all currency records if not specified. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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. @@ -208,21 +208,21 @@ def agency_commissions_history(self, **kwargs): # noqa: E501 return self.agency_commissions_history_with_http_info(**kwargs) # noqa: E501 def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 - """The agency obtains the commission history of the recommended user # noqa: E501 + """The agency obtains the commission history of the recommended user. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_commissions_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency: Filter by currency. Return all currency records if not specified. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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 @@ -319,21 +319,21 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def partner_transaction_history(self, **kwargs): # noqa: E501 - """Partner obtains transaction records of recommended users # noqa: E501 + """Partner obtains transaction records of recommended users. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_transaction_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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. @@ -349,21 +349,21 @@ def partner_transaction_history(self, **kwargs): # noqa: E501 return self.partner_transaction_history_with_http_info(**kwargs) # noqa: E501 def partner_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """Partner obtains transaction records of recommended users # noqa: E501 + """Partner obtains transaction records of recommended users. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_transaction_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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 @@ -460,21 +460,21 @@ def partner_transaction_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def partner_commissions_history(self, **kwargs): # noqa: E501 - """Partner obtains commission records of recommended users # noqa: E501 + """Partner obtains commission records of recommended users. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_commissions_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency: Filter by currency. Return all currency records if not specified. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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. @@ -490,21 +490,21 @@ def partner_commissions_history(self, **kwargs): # noqa: E501 return self.partner_commissions_history_with_http_info(**kwargs) # noqa: E501 def partner_commissions_history_with_http_info(self, **kwargs): # noqa: E501 - """Partner obtains commission records of recommended users # noqa: E501 + """Partner obtains commission records of recommended users. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_commissions_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int user_id: User ID. If not specified, all user records will be returned - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str currency: Filter by currency. Return all currency records if not specified. + :param int user_id: User ID. If not specified, all user records will be returned. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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 @@ -601,18 +601,18 @@ def partner_commissions_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def partner_sub_list(self, **kwargs): # noqa: E501 - """Partner subordinate list # noqa: E501 + """Partner subordinate list. # noqa: E501 - Including sub-agents, direct customers, indirect customers # noqa: E501 + Including sub-agents, direct customers, indirect customers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_sub_list(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: User ID. If not specified, all user records will be returned - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned. + :param int limit: Maximum number of records to be 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. @@ -628,18 +628,18 @@ def partner_sub_list(self, **kwargs): # noqa: E501 return self.partner_sub_list_with_http_info(**kwargs) # noqa: E501 def partner_sub_list_with_http_info(self, **kwargs): # noqa: E501 - """Partner subordinate list # noqa: E501 + """Partner subordinate list. # noqa: E501 - Including sub-agents, direct customers, indirect customers # noqa: E501 + Including sub-agents, direct customers, indirect customers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_sub_list_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: User ID. If not specified, all user records will be returned - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned. + :param int limit: Maximum number of records to be 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 @@ -727,20 +727,20 @@ def partner_sub_list_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def rebate_broker_commission_history(self, **kwargs): # noqa: E501 - """The broker obtains the user's commission rebate records # noqa: E501 + """The broker obtains the user's commission rebate records. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_commission_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int user_id: User ID. If not specified, all user records will be returned. :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time + :param int to: Time range ending, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -756,20 +756,20 @@ def rebate_broker_commission_history(self, **kwargs): # noqa: E501 return self.rebate_broker_commission_history_with_http_info(**kwargs) # noqa: E501 def rebate_broker_commission_history_with_http_info(self, **kwargs): # noqa: E501 - """The broker obtains the user's commission rebate records # noqa: E501 + """The broker obtains the user's commission rebate records. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_commission_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int user_id: User ID. If not specified, all user records will be returned. :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time + :param int to: Time range ending, default to current time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -863,20 +863,20 @@ def rebate_broker_commission_history_with_http_info(self, **kwargs): # noqa: E5 collection_formats=collection_formats) def rebate_broker_transaction_history(self, **kwargs): # noqa: E501 - """The broker obtains the user's trading history # noqa: E501 + """The broker obtains the user's trading history. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_transaction_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int user_id: User ID. If not specified, all user records will be returned. :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time + :param int to: Time range ending, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -892,20 +892,20 @@ def rebate_broker_transaction_history(self, **kwargs): # noqa: E501 return self.rebate_broker_transaction_history_with_http_info(**kwargs) # noqa: E501 def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """The broker obtains the user's trading history # noqa: E501 + """The broker obtains the user's trading history. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_transaction_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 - :param int user_id: User ID. If not specified, all user records will be returned + :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int user_id: User ID. If not specified, all user records will be returned. :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time + :param int to: Time range ending, default to current time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -999,7 +999,7 @@ def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E collection_formats=collection_formats) def rebate_user_info(self, **kwargs): # noqa: E501 - """User retrieves rebate information # noqa: E501 + """User retrieves rebate information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1022,7 +1022,7 @@ def rebate_user_info(self, **kwargs): # noqa: E501 return self.rebate_user_info_with_http_info(**kwargs) # noqa: E501 def rebate_user_info_with_http_info(self, **kwargs): # noqa: E501 - """User retrieves rebate information # noqa: E501 + """User retrieves rebate information. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1102,16 +1102,16 @@ def rebate_user_info_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def user_sub_relation(self, user_id_list, **kwargs): # noqa: E501 - """User-subordinate relationship # noqa: E501 + """User-subordinate relationship. # noqa: E501 - Query whether the specified user is in the system # noqa: E501 + Query whether the specified user is in the system. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_sub_relation(user_id_list, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100 (required) + :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1127,16 +1127,16 @@ def user_sub_relation(self, user_id_list, **kwargs): # noqa: E501 return self.user_sub_relation_with_http_info(user_id_list, **kwargs) # noqa: E501 def user_sub_relation_with_http_info(self, user_id_list, **kwargs): # noqa: E501 - """User-subordinate relationship # noqa: E501 + """User-subordinate relationship. # noqa: E501 - Query whether the specified user is in the system # noqa: E501 + Query whether the specified user is in the system. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_sub_relation_with_http_info(user_id_list, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100 (required) + :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100. (required) :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/spot_api.py b/gate_api/api/spot_api.py index d6420b4..bce4696 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_currencies(self, **kwargs): # noqa: E501 - """List all currencies' details # noqa: E501 + """List all currencies' details. # noqa: E501 When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -61,7 +61,7 @@ def list_currencies(self, **kwargs): # noqa: E501 return self.list_currencies_with_http_info(**kwargs) # noqa: E501 def list_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List all currencies' details # noqa: E501 + """List all currencies' details. # noqa: E501 When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -142,7 +142,7 @@ def list_currencies_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_currency(self, currency, **kwargs): # noqa: E501 - """Get details of a specific currency # noqa: E501 + """Get details of a specific currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -150,7 +150,7 @@ def get_currency(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) + :param str currency: Currency name. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -166,7 +166,7 @@ def get_currency(self, currency, **kwargs): # noqa: E501 return self.get_currency_with_http_info(currency, **kwargs) # noqa: E501 def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get details of a specific currency # noqa: E501 + """Get details of a specific currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -174,7 +174,7 @@ def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) + :param str currency: Currency name. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -254,7 +254,7 @@ def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_currency_pairs(self, **kwargs): # noqa: E501 - """List all currency pairs supported # noqa: E501 + """List all currency pairs supported. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -277,7 +277,7 @@ def list_currency_pairs(self, **kwargs): # noqa: E501 return self.list_currency_pairs_with_http_info(**kwargs) # noqa: E501 def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 - """List all currency pairs supported # noqa: E501 + """List all currency pairs supported. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -357,7 +357,7 @@ def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get details of a specifc currency pair # noqa: E501 + """Get details of a specifc currency pair. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -365,7 +365,7 @@ def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -381,7 +381,7 @@ def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501 return self.get_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get details of a specifc currency pair # noqa: E501 + """Get details of a specifc currency pair. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -389,7 +389,7 @@ def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -469,7 +469,7 @@ def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_tickers(self, **kwargs): # noqa: E501 - """Retrieve ticker information # noqa: E501 + """Retrieve ticker information. # noqa: E501 Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -478,8 +478,8 @@ def list_tickers(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str timezone: Timezone + :param str currency_pair: Currency pair. + :param str timezone: Timezone. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -495,7 +495,7 @@ def list_tickers(self, **kwargs): # noqa: E501 return self.list_tickers_with_http_info(**kwargs) # noqa: E501 def list_tickers_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve ticker information # noqa: E501 + """Retrieve ticker information. # noqa: E501 Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -504,8 +504,8 @@ def list_tickers_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str timezone: Timezone + :param str currency_pair: Currency pair. + :param str timezone: Timezone. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -584,19 +584,19 @@ def list_tickers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_order_book(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve order book # noqa: E501 + """Retrieve order book. # noqa: E501 - Market depth buy orders are sorted by price from high to low, sell orders are reversed are reversed # noqa: E501 + Market depth buy orders are sorted by price from high to low, sell orders are reversed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_order_book(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Return order book ID + :param str currency_pair: Currency pair. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. + :param bool with_id: Return order book ID. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -612,19 +612,19 @@ def list_order_book(self, currency_pair, **kwargs): # noqa: E501 return self.list_order_book_with_http_info(currency_pair, **kwargs) # noqa: E501 def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve order book # noqa: E501 + """Retrieve order book. # noqa: E501 - Market depth buy orders are sorted by price from high to low, sell orders are reversed are reversed # noqa: E501 + Market depth buy orders are sorted by price from high to low, sell orders are reversed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_order_book_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0 - :param int limit: Maximum number of order depth data in asks or bids - :param bool with_id: Return order book ID + :param str currency_pair: Currency pair. (required) + :param str interval: Order depth. 0 means no aggregation is applied. default to 0. + :param int limit: Maximum number of order depth data in asks or bids. + :param bool with_id: Return order book ID. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -715,22 +715,22 @@ def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_trades(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve market trades # noqa: E501 + """Retrieve market trades. # noqa: E501 - Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_trades(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param str currency_pair: Currency pair. (required) + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param int page: Page number. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -746,22 +746,22 @@ def list_trades(self, currency_pair, **kwargs): # noqa: E501 return self.list_trades_with_http_info(currency_pair, **kwargs) # noqa: E501 def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve market trades # noqa: E501 + """Retrieve market trades. # noqa: E501 - Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, query by time range is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_trades_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param str currency_pair: Currency pair. (required) + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param int page: Page number. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -865,7 +865,7 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501 - """Market candlesticks # noqa: E501 + """Market candlesticks. # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -874,10 +874,10 @@ def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -894,7 +894,7 @@ def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501 return self.list_candlesticks_with_http_info(currency_pair, **kwargs) # noqa: E501 def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Market candlesticks # noqa: E501 + """Market candlesticks. # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -903,10 +903,10 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days :param _return_http_data_only: response data without head status code and headers @@ -1001,7 +1001,7 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_fee(self, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 + """Query user trading fee rates. # noqa: E501 This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1026,7 +1026,7 @@ def get_fee(self, **kwargs): # noqa: E501 return self.get_fee_with_http_info(**kwargs) # noqa: E501 def get_fee_with_http_info(self, **kwargs): # noqa: E501 - """Query user trading fee rates # noqa: E501 + """Query user trading fee rates. # noqa: E501 This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1111,7 +1111,7 @@ def get_fee_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 - """Query a batch of user trading fee rates # noqa: E501 + """Query a batch of user trading fee rates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1119,7 +1119,7 @@ def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pairs: A request can only query up to 50 currency pairs (required) + :param str currency_pairs: A request can only query up to 50 currency pairs. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1135,7 +1135,7 @@ def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 return self.get_batch_spot_fee_with_http_info(currency_pairs, **kwargs) # noqa: E501 def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: E501 - """Query a batch of user trading fee rates # noqa: E501 + """Query a batch of user trading fee rates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1143,7 +1143,7 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pairs: A request can only query up to 50 currency pairs (required) + :param str currency_pairs: A request can only query up to 50 currency pairs. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1223,7 +1223,7 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: collection_formats=collection_formats) def list_spot_accounts(self, **kwargs): # noqa: E501 - """List spot accounts # noqa: E501 + """List spot accounts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1231,7 +1231,7 @@ def list_spot_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency: Retrieve data of the specified currency. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1247,7 +1247,7 @@ def list_spot_accounts(self, **kwargs): # noqa: E501 return self.list_spot_accounts_with_http_info(**kwargs) # noqa: E501 def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501 - """List spot accounts # noqa: E501 + """List spot accounts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1255,7 +1255,7 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency: Retrieve data of the specified currency. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1331,20 +1331,20 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_spot_account_book(self, **kwargs): # noqa: E501 - """Query account book # noqa: E501 + """Query account book. # noqa: E501 - Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_spot_account_book(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param str currency: Retrieve data of the specified currency. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1362,20 +1362,20 @@ def list_spot_account_book(self, **kwargs): # noqa: E501 return self.list_spot_account_book_with_http_info(**kwargs) # noqa: E501 def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501 - """Query account book # noqa: E501 + """Query account book. # noqa: E501 - Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_spot_account_book_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param int page: Page number - :param int limit: Maximum number of records to be returned in a single list + :param str currency: Retrieve data of the specified currency. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param int page: Page number. + :param int limit: Maximum number of records to be returned in a single list. :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` :param _return_http_data_only: response data without head status code @@ -1477,7 +1477,7 @@ def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_batch_orders(self, order, **kwargs): # noqa: E501 - """Create a batch of orders # noqa: E501 + """Create a batch of orders. # noqa: E501 Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1503,7 +1503,7 @@ def create_batch_orders(self, order, **kwargs): # noqa: E501 return self.create_batch_orders_with_http_info(order, **kwargs) # noqa: E501 def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501 - """Create a batch of orders # noqa: E501 + """Create a batch of orders. # noqa: E501 Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1600,17 +1600,17 @@ def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_all_open_orders(self, **kwargs): # noqa: E501 - """List all open orders # noqa: E501 + """List all open orders. # noqa: E501 - Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 + Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_all_open_orders(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records returned in one page in each currency pair + :param int page: Page number. + :param int limit: Maximum number of records returned in one page in each currency pair. :param str account: Specify query account. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1627,17 +1627,17 @@ def list_all_open_orders(self, **kwargs): # noqa: E501 return self.list_all_open_orders_with_http_info(**kwargs) # noqa: E501 def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501 - """List all open orders # noqa: E501 + """List all open orders. # noqa: E501 - Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control for the number of trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 + Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_all_open_orders_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number - :param int limit: Maximum number of records returned in one page in each currency pair + :param int page: Page number. + :param int limit: Maximum number of records returned in one page in each currency pair. :param str account: Specify query account. :param _return_http_data_only: response data without head status code and headers @@ -1726,7 +1726,7 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501 - """close position when cross-currency is disabled # noqa: E501 + """close position when cross-currency is disabled. # noqa: E501 Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1751,7 +1751,7 @@ def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501 return self.create_cross_liquidate_order_with_http_info(liquidate_order, **kwargs) # noqa: E501 def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs): # noqa: E501 - """close position when cross-currency is disabled # noqa: E501 + """close position when cross-currency is disabled. # noqa: E501 Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1844,9 +1844,9 @@ def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs) collection_formats=collection_formats) def list_orders(self, currency_pair, status, **kwargs): # noqa: E501 - """List orders # noqa: E501 + """List orders. # noqa: E501 - Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 + Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_orders(currency_pair, status, async_req=True) @@ -1855,12 +1855,12 @@ def list_orders(self, currency_pair, status, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) - :param int page: Page number + :param int page: Page number. :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str side: All bids or asks. Both included if not specified + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param str side: All bids or asks. Both included if not specified. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1876,9 +1876,9 @@ def list_orders(self, currency_pair, status, **kwargs): # noqa: E501 return self.list_orders_with_http_info(currency_pair, status, **kwargs) # noqa: E501 def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: E501 - """List orders # noqa: E501 + """List orders. # noqa: E501 - Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` is set to `finished`, that is, when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 + Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_orders_with_http_info(currency_pair, status, async_req=True) @@ -1887,12 +1887,12 @@ def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) - :param int page: Page number + :param int page: Page number. :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time - :param str side: All bids or asks. Both included if not specified + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. + :param str side: All bids or asks. Both included if not specified. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2003,9 +2003,9 @@ 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 an order. # noqa: E501 - Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 + Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_order(order, async_req=True) @@ -2029,9 +2029,9 @@ 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 an order. # noqa: E501 - Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified account transactions, that is, when `account` is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 + Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_order_with_http_info(order, async_req=True) @@ -2126,17 +2126,17 @@ def create_order_with_http_info(self, order, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_orders(self, **kwargs): # noqa: E501 - """Cancel all `open` orders in specified currency pair # noqa: E501 + """Cancel all `open` orders in specified currency pair. # noqa: E501 - When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 + When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_orders(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str side: All bids or asks. Both included if not specified + :param str currency_pair: Currency pair. + :param str side: All bids or asks. Both included if not specified. :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify unified :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected @@ -2155,17 +2155,17 @@ def cancel_orders(self, **kwargs): # noqa: E501 return self.cancel_orders_with_http_info(**kwargs) # noqa: E501 def cancel_orders_with_http_info(self, **kwargs): # noqa: E501 - """Cancel all `open` orders in specified currency pair # noqa: E501 + """Cancel all `open` orders in specified currency pair. # noqa: E501 - When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When `currency_pair` is not specified, all transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 + When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_orders_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair - :param str side: All bids or asks. Both included if not specified + :param str currency_pair: Currency pair. + :param str side: All bids or asks. Both included if not specified. :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify unified :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected @@ -2256,7 +2256,7 @@ def cancel_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 + """Cancel a batch of orders with an ID list. # noqa: E501 Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2282,7 +2282,7 @@ def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501 return self.cancel_batch_orders_with_http_info(cancel_batch_order, **kwargs) # noqa: E501 def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list # noqa: E501 + """Cancel a batch of orders with an ID list. # noqa: E501 Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2379,7 +2379,7 @@ def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # n collection_formats=collection_formats) def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2389,7 +2389,7 @@ def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. (required) + :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. (required) :param str account: Specify query account. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2406,7 +2406,7 @@ def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501 return self.get_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Get a single order # noqa: E501 + """Get a single order. # noqa: E501 By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2416,7 +2416,7 @@ def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is required. If you are querying traded records, this field can be left blank. (required) + :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. (required) :param str account: Specify query account. :param _return_http_data_only: response data without head status code and headers @@ -2507,7 +2507,7 @@ def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: collection_formats=collection_formats) def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2517,7 +2517,7 @@ def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param str account: Specify query account. :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected @@ -2536,7 +2536,7 @@ def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501 return self.cancel_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Cancel a single order # noqa: E501 + """Cancel a single order. # noqa: E501 By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2546,7 +2546,7 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Currency pair (required) + :param str currency_pair: Currency pair. (required) :param str account: Specify query account. :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected @@ -2645,9 +2645,9 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq collection_formats=collection_formats) def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 + """Amend an order. # noqa: E501 - Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation.Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_order(order_id, order_patch, async_req=True) @@ -2656,7 +2656,7 @@ def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) :param OrderPatch order_patch: (required) - :param str currency_pair: Currency pair + :param str currency_pair: Currency pair. :param str account: Specify query account. :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2674,9 +2674,9 @@ def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 return self.amend_order_with_http_info(order_id, order_patch, **kwargs) # noqa: E501 def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: E501 - """Amend an order # noqa: E501 + """Amend an order. # noqa: E501 - Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation.Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_order_with_http_info(order_id, order_patch, async_req=True) @@ -2685,7 +2685,7 @@ def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) :param OrderPatch order_patch: (required) - :param str currency_pair: Currency pair + :param str currency_pair: Currency pair. :param str account: Specify query account. :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -2787,22 +2787,22 @@ def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: collection_formats=collection_formats) def list_my_trades(self, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 - By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_my_trades(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param int page: Page number + :param str currency_pair: Retrieve results with specified currency pair. + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param int page: Page number. :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2818,22 +2818,22 @@ def list_my_trades(self, **kwargs): # noqa: E501 return self.list_my_trades_with_http_info(**kwargs) # noqa: E501 def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 - """List personal trading history # noqa: E501 + """List personal trading history. # noqa: E501 - By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range of `from` and `to` is not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 + By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_my_trades_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param int page: Page number + :param str currency_pair: Retrieve results with specified currency pair. + :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 + :param int page: Page number. :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present :param str account: Specify query account. - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2933,7 +2933,7 @@ def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_system_time(self, **kwargs): # noqa: E501 - """Get server current time # noqa: E501 + """Get server current time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2956,7 +2956,7 @@ def get_system_time(self, **kwargs): # noqa: E501 return self.get_system_time_with_http_info(**kwargs) # noqa: E501 def get_system_time_with_http_info(self, **kwargs): # noqa: E501 - """Get server current time # noqa: E501 + """Get server current time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3036,9 +3036,9 @@ def get_system_time_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 + """Countdown cancel orders. # noqa: E501 - Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 + Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_spot(countdown_cancel_all_spot_task, async_req=True) @@ -3061,9 +3061,9 @@ def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): return self.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, **kwargs) # noqa: E501 def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 - """Countdown cancel orders # noqa: E501 + """Countdown cancel orders. # noqa: E501 - Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market pending orders will be cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 + Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, async_req=True) @@ -3154,9 +3154,9 @@ def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_tas collection_formats=collection_formats) def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 - """Batch modification of orders # noqa: E501 + """Batch modification of orders. # noqa: E501 - Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return is consistent with the order list order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_orders(batch_amend_item, async_req=True) @@ -3180,9 +3180,9 @@ def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 return self.amend_batch_orders_with_http_info(batch_amend_item, **kwargs) # noqa: E501 def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa: E501 - """Batch modification of orders # noqa: E501 + """Batch modification of orders. # noqa: E501 - Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return is consistent with the order list order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_orders_with_http_info(batch_amend_item, async_req=True) @@ -3277,7 +3277,7 @@ def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa collection_formats=collection_formats) def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): # noqa: E501 - """Query spot insurance fund historical data # noqa: E501 + """Query spot insurance fund historical data. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3286,11 +3286,11 @@ def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): :param bool async_req: execute request asynchronously :param str business: Leverage business, margin - position by position; unified - unified account (required) - :param str currency: Currency (required) - :param int _from: Start timestamp, seconds (required) - :param int to: End timestamp, in seconds (required) - :param int page: Page number - :param int limit: The maximum number of items returned in the list, the default value is 30 + :param str currency: Currency. (required) + :param int _from: Start timestamp, seconds. (required) + :param int to: End timestamp, in seconds. (required) + :param int page: Page number. + :param int limit: The maximum number of items returned in the list, the default value is 30. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3306,7 +3306,7 @@ def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): return self.get_spot_insurance_history_with_http_info(business, currency, _from, to, **kwargs) # noqa: E501 def get_spot_insurance_history_with_http_info(self, business, currency, _from, to, **kwargs): # noqa: E501 - """Query spot insurance fund historical data # noqa: E501 + """Query spot insurance fund historical data. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3315,11 +3315,11 @@ def get_spot_insurance_history_with_http_info(self, business, currency, _from, t :param bool async_req: execute request asynchronously :param str business: Leverage business, margin - position by position; unified - unified account (required) - :param str currency: Currency (required) - :param int _from: Start timestamp, seconds (required) - :param int to: End timestamp, in seconds (required) - :param int page: Page number - :param int limit: The maximum number of items returned in the list, the default value is 30 + :param str currency: Currency. (required) + :param int _from: Start timestamp, seconds. (required) + :param int to: End timestamp, in seconds. (required) + :param int page: Page number. + :param int limit: The maximum number of items returned in the list, the default value is 30. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3432,7 +3432,7 @@ def get_spot_insurance_history_with_http_info(self, business, currency, _from, t collection_formats=collection_formats) def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 - """Retrieve running auto order list # noqa: E501 + """Retrieve running auto order list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3440,11 +3440,11 @@ def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str status: Only list the orders with this status. (required) + :param str market: Currency pair. + :param str account: Trading account type. Portfolio margin account must set to `unified`. + :param int limit: Maximum number of records to be 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. @@ -3460,7 +3460,7 @@ def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 return self.list_spot_price_triggered_orders_with_http_info(status, **kwargs) # noqa: E501 def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # noqa: E501 - """Retrieve running auto order list # noqa: E501 + """Retrieve running auto order list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3468,11 +3468,11 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status (required) - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param str status: Only list the orders with this status. (required) + :param str market: Currency pair. + :param str account: Trading account type. Portfolio margin account must set to `unified`. + :param int limit: Maximum number of records to be 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 @@ -3570,7 +3570,7 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # collection_formats=collection_formats) def create_spot_price_triggered_order(self, spot_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 + """Create a 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 @@ -3594,7 +3594,7 @@ def create_spot_price_triggered_order(self, spot_price_triggered_order, **kwargs return self.create_spot_price_triggered_order_with_http_info(spot_price_triggered_order, **kwargs) # noqa: E501 def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order # noqa: E501 + """Create a 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 @@ -3686,7 +3686,7 @@ def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_ collection_formats=collection_formats) def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders # noqa: E501 + """Cancel All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3694,8 +3694,8 @@ def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` + :param str market: Currency pair. + :param str account: Trading account type. Portfolio margin account must set to `unified`. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3711,7 +3711,7 @@ def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 return self.cancel_spot_price_triggered_order_list_with_http_info(**kwargs) # noqa: E501 def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders # noqa: E501 + """Cancel All Price-triggered Orders. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3719,8 +3719,8 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str market: Currency pair - :param str account: Trading account type. Portfolio margin account must set to `unified` + :param str market: Currency pair. + :param str account: Trading account type. Portfolio margin account must set to `unified`. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3799,7 +3799,7 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no collection_formats=collection_formats) def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 + """Get a 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 @@ -3807,7 +3807,7 @@ def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3823,7 +3823,7 @@ def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 return self.get_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order # noqa: E501 + """Get a 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 @@ -3831,7 +3831,7 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str order_id: Retrieve the data of the order with the specified 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 @@ -3911,7 +3911,7 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # collection_formats=collection_formats) def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 + """cancel a 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 @@ -3919,7 +3919,7 @@ def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str order_id: Retrieve the data of the order with the specified ID. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3935,7 +3935,7 @@ def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 return self.cancel_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order # noqa: E501 + """cancel a 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 @@ -3943,7 +3943,7 @@ def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID (required) + :param str order_id: Retrieve the data of the order with the specified 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 diff --git a/gate_api/api/sub_account_api.py b/gate_api/api/sub_account_api.py index 5f4c0a7..eb7fbbe 100644 --- a/gate_api/api/sub_account_api.py +++ b/gate_api/api/sub_account_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_sub_accounts(self, **kwargs): # noqa: E501 - """List sub-accounts # noqa: E501 + """List sub-accounts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -61,7 +61,7 @@ def list_sub_accounts(self, **kwargs): # noqa: E501 return self.list_sub_accounts_with_http_info(**kwargs) # noqa: E501 def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501 - """List sub-accounts # noqa: E501 + """List sub-accounts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -145,7 +145,7 @@ def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_sub_accounts(self, sub_account, **kwargs): # noqa: E501 - """Create a new sub-account # noqa: E501 + """Create a new sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -169,7 +169,7 @@ def create_sub_accounts(self, sub_account, **kwargs): # noqa: E501 return self.create_sub_accounts_with_http_info(sub_account, **kwargs) # noqa: E501 def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E501 - """Create a new sub-account # noqa: E501 + """Create a new sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -261,7 +261,7 @@ def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_sub_account(self, user_id, **kwargs): # noqa: E501 - """Get the sub-account # noqa: E501 + """Get the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -269,7 +269,7 @@ def get_sub_account(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) + :param int user_id: Sub-account user id. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -285,7 +285,7 @@ def get_sub_account(self, user_id, **kwargs): # noqa: E501 return self.get_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Get the sub-account # noqa: E501 + """Get the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -293,7 +293,7 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) + :param int user_id: Sub-account user id. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -373,7 +373,7 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501 - """List all API Key of the sub-account # noqa: E501 + """List all API Key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -381,7 +381,7 @@ def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) + :param int user_id: Sub-account user id. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -397,7 +397,7 @@ def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501 return self.list_sub_account_keys_with_http_info(user_id, **kwargs) # noqa: E501 def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 - """List all API Key of the sub-account # noqa: E501 + """List all API Key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -405,7 +405,7 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) + :param int user_id: Sub-account user id. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -485,7 +485,7 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: E501 - """Create API Key of the sub-account # noqa: E501 + """Create API Key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -493,7 +493,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) + :param int user_id: Sub-account user id. (required) :param SubAccountKey sub_account_key: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -510,7 +510,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: return self.create_sub_account_keys_with_http_info(user_id, sub_account_key, **kwargs) # noqa: E501 def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwargs): # noqa: E501 - """Create API Key of the sub-account # noqa: E501 + """Create API Key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -518,7 +518,7 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) + :param int user_id: Sub-account user id. (required) :param SubAccountKey sub_account_key: (required) :param _return_http_data_only: response data without head status code and headers @@ -610,7 +610,7 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa collection_formats=collection_formats) def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 - """Get the API Key of the sub-account # noqa: E501 + """Get the API Key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -618,8 +618,8 @@ def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) + :param int user_id: Sub-account user id. (required) + :param str key: The API Key of the sub-account. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -635,7 +635,7 @@ def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 return self.get_sub_account_key_with_http_info(user_id, key, **kwargs) # noqa: E501 def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E501 - """Get the API Key of the sub-account # noqa: E501 + """Get the API Key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -643,8 +643,8 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) + :param int user_id: Sub-account user id. (required) + :param str key: The API Key of the sub-account. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -731,7 +731,7 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E collection_formats=collection_formats) def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 - """Update API key of the sub-account # noqa: E501 + """Update API key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -739,8 +739,8 @@ def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) + :param int user_id: Sub-account user id. (required) + :param str key: The API Key of the sub-account. (required) :param SubAccountKey sub_account_key: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -757,7 +757,7 @@ def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # n return self.update_sub_account_keys_with_http_info(user_id, key, sub_account_key, **kwargs) # noqa: E501 def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 - """Update API key of the sub-account # noqa: E501 + """Update API key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -765,8 +765,8 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) + :param int user_id: Sub-account user id. (required) + :param str key: The API Key of the sub-account. (required) :param SubAccountKey sub_account_key: (required) :param _return_http_data_only: response data without head status code and headers @@ -861,7 +861,7 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, collection_formats=collection_formats) def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 - """Delete API key of the sub-account # noqa: E501 + """Delete API key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -869,8 +869,8 @@ def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) + :param int user_id: Sub-account user id. (required) + :param str key: The API Key of the sub-account. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -886,7 +886,7 @@ def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 return self.delete_sub_account_keys_with_http_info(user_id, key, **kwargs) # noqa: E501 def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noqa: E501 - """Delete API key of the sub-account # noqa: E501 + """Delete API key of the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -894,8 +894,8 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id (required) - :param str key: The API Key of the sub-account (required) + :param int user_id: Sub-account user id. (required) + :param str key: The API Key of the sub-account. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -978,7 +978,7 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq collection_formats=collection_formats) def lock_sub_account(self, user_id, **kwargs): # noqa: E501 - """Lock the sub-account # noqa: E501 + """Lock the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -986,7 +986,7 @@ def lock_sub_account(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) + :param int user_id: The user id of the sub-account. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1002,7 +1002,7 @@ def lock_sub_account(self, user_id, **kwargs): # noqa: E501 return self.lock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Lock the sub-account # noqa: E501 + """Lock the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1010,7 +1010,7 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) + :param int user_id: The user id of the sub-account. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1086,7 +1086,7 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 - """Unlock the sub-account # noqa: E501 + """Unlock the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1094,7 +1094,7 @@ def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) + :param int user_id: The user id of the sub-account. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1110,7 +1110,7 @@ def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 return self.unlock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Unlock the sub-account # noqa: E501 + """Unlock the sub-account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1118,7 +1118,7 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account (required) + :param int user_id: The user id of the sub-account. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1194,7 +1194,7 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_unified_mode(self, **kwargs): # noqa: E501 - """Get sub-account mode # noqa: E501 + """Get sub-account mode. # noqa: E501 Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1218,7 +1218,7 @@ def list_unified_mode(self, **kwargs): # noqa: E501 return self.list_unified_mode_with_http_info(**kwargs) # noqa: E501 def list_unified_mode_with_http_info(self, **kwargs): # noqa: E501 - """Get sub-account mode # noqa: E501 + """Get sub-account mode. # noqa: E501 Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index da297c2..bba6f75 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_unified_accounts(self, **kwargs): # noqa: E501 - """Get unified account information # noqa: E501 + """Get unified account information. # noqa: E501 The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -46,8 +46,8 @@ def list_unified_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param str sub_uid: Sub account user ID + :param str currency: Retrieve data of the specified currency. + :param str sub_uid: Sub account user ID. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -63,7 +63,7 @@ def list_unified_accounts(self, **kwargs): # noqa: E501 return self.list_unified_accounts_with_http_info(**kwargs) # noqa: E501 def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Get unified account information # noqa: E501 + """Get unified account information. # noqa: E501 The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -72,8 +72,8 @@ def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param str sub_uid: Sub account user ID + :param str currency: Retrieve data of the specified currency. + :param str sub_uid: Sub account user ID. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -152,7 +152,7 @@ def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 - """Query about the maximum borrowing for the unified account # noqa: E501 + """Query about the maximum borrowing for the unified account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -160,7 +160,7 @@ def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) + :param str currency: Retrieve data of the specified currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -176,7 +176,7 @@ def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 return self.get_unified_borrowable_with_http_info(currency, **kwargs) # noqa: E501 def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query about the maximum borrowing for the unified account # noqa: E501 + """Query about the maximum borrowing for the unified account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -184,7 +184,7 @@ def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) + :param str currency: Retrieve data of the specified currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -264,7 +264,7 @@ def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_unified_transferable(self, currency, **kwargs): # noqa: E501 - """Query about the maximum transferable for the unified account # noqa: E501 + """Query about the maximum transferable for the unified account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -272,7 +272,7 @@ def get_unified_transferable(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) + :param str currency: Retrieve data of the specified currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -288,7 +288,7 @@ def get_unified_transferable(self, currency, **kwargs): # noqa: E501 return self.get_unified_transferable_with_http_info(currency, **kwargs) # noqa: E501 def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query about the maximum transferable for the unified account # noqa: E501 + """Query about the maximum transferable for the unified account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -296,7 +296,7 @@ def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency (required) + :param str currency: Retrieve data of the specified currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -488,7 +488,7 @@ def get_unified_transferables_with_http_info(self, currencies, **kwargs): # noq collection_formats=collection_formats) def get_unified_borrowable_list(self, currencies, **kwargs): # noqa: E501 - """Batch query unified account can be borrowed up to a maximum # noqa: E501 + """Batch query unified account can be borrowed up to a maximum. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -512,7 +512,7 @@ def get_unified_borrowable_list(self, currencies, **kwargs): # noqa: E501 return self.get_unified_borrowable_list_with_http_info(currencies, **kwargs) # noqa: E501 def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Batch query unified account can be borrowed up to a maximum # noqa: E501 + """Batch query unified account can be borrowed up to a maximum. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -607,7 +607,7 @@ def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # n collection_formats=collection_formats) def list_unified_loans(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + """List loans. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -615,10 +615,10 @@ def list_unified_loans(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param str type: Loan type, platform - platform, margin - margin + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str type: Loan type, platform - platform, margin - margin. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -634,7 +634,7 @@ def list_unified_loans(self, **kwargs): # noqa: E501 return self.list_unified_loans_with_http_info(**kwargs) # noqa: E501 def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans # noqa: E501 + """List loans. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -642,10 +642,10 @@ def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param str type: Loan type, platform - platform, margin - margin + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str type: Loan type, platform - platform, margin - margin. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -736,9 +736,9 @@ def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_unified_loan(self, unified_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + """Borrow or repay. # noqa: E501 - When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501 + When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the available by setting the parameter `repaid_all=true` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_unified_loan(unified_loan, async_req=True) @@ -761,9 +761,9 @@ def create_unified_loan(self, unified_loan, **kwargs): # noqa: E501 return self.create_unified_loan_with_http_info(unified_loan, **kwargs) # noqa: E501 def create_unified_loan_with_http_info(self, unified_loan, **kwargs): # noqa: E501 - """Borrow or repay # noqa: E501 + """Borrow or repay. # noqa: E501 - When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the entire borrowed amount is available by setting the parameter `repaid_all=true` # noqa: E501 + When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the available by setting the parameter `repaid_all=true` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_unified_loan_with_http_info(unified_loan, async_req=True) @@ -854,7 +854,7 @@ def create_unified_loan_with_http_info(self, unified_loan, **kwargs): # noqa: E collection_formats=collection_formats) def list_unified_loan_records(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + """Get load records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -862,10 +862,10 @@ def list_unified_loan_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -881,7 +881,7 @@ def list_unified_loan_records(self, **kwargs): # noqa: E501 return self.list_unified_loan_records_with_http_info(**kwargs) # noqa: E501 def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records # noqa: E501 + """Get load records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -889,10 +889,10 @@ def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -983,7 +983,7 @@ def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + """List interest records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -991,11 +991,11 @@ def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1012,7 +1012,7 @@ def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 return self.list_unified_loan_interest_records_with_http_info(**kwargs) # noqa: E501 def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records # noqa: E501 + """List interest records. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1020,11 +1020,11 @@ def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 - :param int _from: Start timestamp of the query - :param int to: Time range ending, default to current time + :param str currency: Retrieve data of the specified currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param int _from: Start timestamp of the query. + :param int to: Time range ending, default to current time. :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin :param _return_http_data_only: response data without head status code and headers @@ -1122,9 +1122,9 @@ def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: collection_formats=collection_formats) def get_unified_risk_units(self, **kwargs): # noqa: E501 - """Get user risk unit details # noqa: E501 + """Get user risk unit details. # noqa: E501 - Retrieve user risk unit details, only valid in portfolio margin mode # noqa: E501 + Retrieve user risk unit details, only valid in portfolio margin mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unified_risk_units(async_req=True) @@ -1146,9 +1146,9 @@ def get_unified_risk_units(self, **kwargs): # noqa: E501 return self.get_unified_risk_units_with_http_info(**kwargs) # noqa: E501 def get_unified_risk_units_with_http_info(self, **kwargs): # noqa: E501 - """Get user risk unit details # noqa: E501 + """Get user risk unit details. # noqa: E501 - Retrieve user risk unit details, only valid in portfolio margin mode # noqa: E501 + Retrieve user risk unit details, only valid in portfolio margin mode. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unified_risk_units_with_http_info(async_req=True) @@ -1227,7 +1227,7 @@ def get_unified_risk_units_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_unified_mode(self, **kwargs): # noqa: E501 - """Query mode of the unified account # noqa: E501 + """Query mode of the unified account. # noqa: E501 Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1251,7 +1251,7 @@ def get_unified_mode(self, **kwargs): # noqa: E501 return self.get_unified_mode_with_http_info(**kwargs) # noqa: E501 def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 - """Query mode of the unified account # noqa: E501 + """Query mode of the unified account. # noqa: E501 Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1332,9 +1332,9 @@ def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 - """Set mode of the unified account # noqa: E501 + """Set mode of the unified account. # noqa: E501 - Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_unified_mode(unified_mode_set, async_req=True) @@ -1357,9 +1357,9 @@ def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 return self.set_unified_mode_with_http_info(unified_mode_set, **kwargs) # noqa: E501 def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: E501 - """Set mode of the unified account # noqa: E501 + """Set mode of the unified account. # noqa: E501 - Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin mode, mode=multi_currency ``` PUT /unified/unified_mode { \"mode\": \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 + Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_unified_mode_with_http_info(unified_mode_set, async_req=True) @@ -1446,7 +1446,7 @@ def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: collection_formats=collection_formats) def get_unified_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Get unified estimate rate # noqa: E501 + """Get unified estimate rate. # noqa: E501 Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1471,7 +1471,7 @@ def get_unified_estimate_rate(self, currencies, **kwargs): # noqa: E501 return self.get_unified_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Get unified estimate rate # noqa: E501 + """Get unified estimate rate. # noqa: E501 Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1567,7 +1567,7 @@ def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noq collection_formats=collection_formats) def list_currency_discount_tiers(self, **kwargs): # noqa: E501 - """List currency discount tiers # noqa: E501 + """List currency discount tiers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1590,7 +1590,7 @@ def list_currency_discount_tiers(self, **kwargs): # noqa: E501 return self.list_currency_discount_tiers_with_http_info(**kwargs) # noqa: E501 def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501 - """List currency discount tiers # noqa: E501 + """List currency discount tiers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1670,7 +1670,7 @@ def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_loan_margin_tiers(self, **kwargs): # noqa: E501 - """List loan margin tiers # noqa: E501 + """List loan margin tiers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1693,7 +1693,7 @@ def list_loan_margin_tiers(self, **kwargs): # noqa: E501 return self.list_loan_margin_tiers_with_http_info(**kwargs) # noqa: E501 def list_loan_margin_tiers_with_http_info(self, **kwargs): # noqa: E501 - """List loan margin tiers # noqa: E501 + """List loan margin tiers. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1773,9 +1773,9 @@ def list_loan_margin_tiers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def calculate_portfolio_margin(self, unified_portfolio_input, **kwargs): # noqa: E501 - """Portfolio margin calculator # noqa: E501 + """Portfolio margin calculator. # noqa: E501 - Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 + Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate_portfolio_margin(unified_portfolio_input, async_req=True) @@ -1798,9 +1798,9 @@ def calculate_portfolio_margin(self, unified_portfolio_input, **kwargs): # noqa return self.calculate_portfolio_margin_with_http_info(unified_portfolio_input, **kwargs) # noqa: E501 def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **kwargs): # noqa: E501 - """Portfolio margin calculator # noqa: E501 + """Portfolio margin calculator. # noqa: E501 - Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 + Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate_portfolio_margin_with_http_info(unified_portfolio_input, async_req=True) @@ -1891,7 +1891,7 @@ def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **k collection_formats=collection_formats) def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 - """Minimum currency leverage that can be set # noqa: E501 + """Minimum currency leverage that can be set. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1899,7 +1899,7 @@ def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1915,7 +1915,7 @@ def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 return self.get_user_leverage_currency_config_with_http_info(currency, **kwargs) # noqa: E501 def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): # noqa: E501 - """Minimum currency leverage that can be set # noqa: E501 + """Minimum currency leverage that can be set. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1923,7 +1923,7 @@ def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) + :param str currency: Currency. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2003,7 +2003,7 @@ def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): collection_formats=collection_formats) def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501 - """Get the leverage multiple of the user currency # noqa: E501 + """Get the leverage multiple of the user currency. # noqa: E501 Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2012,7 +2012,7 @@ def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency + :param str currency: Currency. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2028,7 +2028,7 @@ def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501 return self.get_user_leverage_currency_setting_with_http_info(**kwargs) # noqa: E501 def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: E501 - """Get the leverage multiple of the user currency # noqa: E501 + """Get the leverage multiple of the user currency. # noqa: E501 Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2037,7 +2037,7 @@ def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency + :param str currency: Currency. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2113,7 +2113,7 @@ def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: collection_formats=collection_formats) def set_user_leverage_currency_setting(self, unified_leverage_setting, **kwargs): # noqa: E501 - """Set the loan currency leverage # noqa: E501 + """Set the loan currency leverage. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2137,7 +2137,7 @@ def set_user_leverage_currency_setting(self, unified_leverage_setting, **kwargs) return self.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, **kwargs) # noqa: E501 def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_setting, **kwargs): # noqa: E501 - """Set the loan currency leverage # noqa: E501 + """Set the loan currency leverage. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2225,7 +2225,7 @@ def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_set collection_formats=collection_formats) def list_unified_currencies(self, **kwargs): # noqa: E501 - """List of loan currencies supported by unified account # noqa: E501 + """List of loan currencies supported by unified account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2233,7 +2233,7 @@ def list_unified_currencies(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency + :param str currency: Currency. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2249,7 +2249,7 @@ def list_unified_currencies(self, **kwargs): # noqa: E501 return self.list_unified_currencies_with_http_info(**kwargs) # noqa: E501 def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List of loan currencies supported by unified account # noqa: E501 + """List of loan currencies supported by unified account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2257,7 +2257,7 @@ def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency + :param str currency: Currency. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2333,7 +2333,7 @@ def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 - """get historical lending rates # noqa: E501 + """get historical lending rates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2341,10 +2341,10 @@ def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str tier: The VIP level of the floating rate that needs to be queried - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Currency. (required) + :param str tier: The VIP level of the floating rate that needs to be queried. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2360,7 +2360,7 @@ def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 return self.get_history_loan_rate_with_http_info(currency, **kwargs) # noqa: E501 def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E501 - """get historical lending rates # noqa: E501 + """get historical lending rates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2368,10 +2368,10 @@ def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str tier: The VIP level of the floating rate that needs to be queried - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Currency. (required) + :param str tier: The VIP level of the floating rate that needs to be queried. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2466,7 +2466,7 @@ def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E50 collection_formats=collection_formats) def set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E501 - """Set Collateral Currency # noqa: E501 + """Set Collateral Currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2490,7 +2490,7 @@ def set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E50 return self.set_unified_collateral_with_http_info(unified_collateral_req, **kwargs) # noqa: E501 def set_unified_collateral_with_http_info(self, unified_collateral_req, **kwargs): # noqa: E501 - """Set Collateral Currency # noqa: E501 + """Set Collateral Currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py index 77ea410..7466e47 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_currency_chains(self, currency, **kwargs): # noqa: E501 - """List chains supported for specified currency # noqa: E501 + """List chains supported for specified currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,7 +45,7 @@ def list_currency_chains(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) + :param str currency: Currency name. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -61,7 +61,7 @@ def list_currency_chains(self, currency, **kwargs): # noqa: E501 return self.list_currency_chains_with_http_info(currency, **kwargs) # noqa: E501 def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 - """List chains supported for specified currency # noqa: E501 + """List chains supported for specified currency. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -69,7 +69,7 @@ def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) + :param str currency: Currency name. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -149,7 +149,7 @@ def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_deposit_address(self, currency, **kwargs): # noqa: E501 - """Generate currency deposit address # noqa: E501 + """Generate currency deposit address. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -157,7 +157,7 @@ def get_deposit_address(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) + :param str currency: Currency name. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -173,7 +173,7 @@ def get_deposit_address(self, currency, **kwargs): # noqa: E501 return self.get_deposit_address_with_http_info(currency, **kwargs) # noqa: E501 def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 - """Generate currency deposit address # noqa: E501 + """Generate currency deposit address. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -181,7 +181,7 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name (required) + :param str currency: Currency name. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -261,23 +261,23 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_withdrawals(self, **kwargs): # noqa: E501 - """Retrieve withdrawal records # noqa: E501 + """Retrieve withdrawal records. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_withdrawals(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified + :param str currency: Filter by currency. Return all currency records if not specified. :param str withdraw_id: The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time :param str asset_class: The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone :param str withdraw_order_id: User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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. @@ -293,23 +293,23 @@ def list_withdrawals(self, **kwargs): # noqa: E501 return self.list_withdrawals_with_http_info(**kwargs) # noqa: E501 def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve withdrawal records # noqa: E501 + """Retrieve withdrawal records. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_withdrawals_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified + :param str currency: Filter by currency. Return all currency records if not specified. :param str withdraw_id: The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time :param str asset_class: The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone :param str withdraw_order_id: User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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 @@ -412,20 +412,20 @@ def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_deposits(self, **kwargs): # noqa: E501 - """Retrieve deposit records # noqa: E501 + """Retrieve deposit records. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_deposits(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time + :param str currency: Filter by currency. Return all currency records if not specified. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. - :param int offset: List offset, starting from 0 + :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. @@ -441,20 +441,20 @@ def list_deposits(self, **kwargs): # noqa: E501 return self.list_deposits_with_http_info(**kwargs) # noqa: E501 def list_deposits_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve deposit records # noqa: E501 + """Retrieve deposit records. # noqa: E501 - Record time range cannot exceed 30 days # noqa: E501 + Record time range cannot exceed 30 days. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_deposits_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time + :param str currency: Filter by currency. Return all currency records if not specified. + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. - :param int offset: List offset, starting from 0 + :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 @@ -548,9 +548,9 @@ def list_deposits_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def transfer(self, transfer, **kwargs): # noqa: E501 - """Transfer between trading accounts # noqa: E501 + """Transfer between trading accounts. # noqa: E501 - Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options # noqa: E501 + Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. options # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.transfer(transfer, async_req=True) @@ -573,9 +573,9 @@ def transfer(self, transfer, **kwargs): # noqa: E501 return self.transfer_with_http_info(transfer, **kwargs) # noqa: E501 def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501 - """Transfer between trading accounts # noqa: E501 + """Transfer between trading accounts. # noqa: E501 - Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options # noqa: E501 + Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. options # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.transfer_with_http_info(transfer, async_req=True) @@ -666,7 +666,7 @@ def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_transfers(self, **kwargs): # noqa: E501 - """Retrieve transfer records between main and sub accounts # noqa: E501 + """Retrieve transfer records between main and sub accounts. # noqa: E501 Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -676,10 +676,10 @@ def list_sub_account_transfers(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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. @@ -695,7 +695,7 @@ def list_sub_account_transfers(self, **kwargs): # noqa: E501 return self.list_sub_account_transfers_with_http_info(**kwargs) # noqa: E501 def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve transfer records between main and sub accounts # noqa: E501 + """Retrieve transfer records between main and sub accounts. # noqa: E501 Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -705,10 +705,10 @@ def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param int _from: Time range beginning, default to 7 days before current time - :param int to: Time range ending, default to current time - :param int limit: Maximum number of records to be returned in a single list - :param int offset: List offset, starting from 0 + :param int _from: Time range beginning, default to 7 days before current time. + :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records to be returned in a single list. + :param 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 @@ -802,7 +802,7 @@ def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def transfer_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E501 - """Transfer between main and sub accounts # noqa: E501 + """Transfer between main and sub accounts. # noqa: E501 Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -827,7 +827,7 @@ def transfer_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E5 return self.transfer_with_sub_account_with_http_info(sub_account_transfer, **kwargs) # noqa: E501 def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwargs): # noqa: E501 - """Transfer between main and sub accounts # noqa: E501 + """Transfer between main and sub accounts. # noqa: E501 Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -920,9 +920,9 @@ def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwarg collection_formats=collection_formats) def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # noqa: E501 - """Sub-account transfers to sub-account # noqa: E501 + """Sub-account transfers to sub-account. # noqa: E501 - It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501 + It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account sub-account to initiate the transfer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.sub_account_to_sub_account(sub_account_to_sub_account, async_req=True) @@ -945,9 +945,9 @@ def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # n return self.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, **kwargs) # noqa: E501 def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account, **kwargs): # noqa: E501 - """Sub-account transfers to sub-account # noqa: E501 + """Sub-account transfers to sub-account. # noqa: E501 - It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer. # noqa: E501 + It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account sub-account to initiate the transfer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, async_req=True) @@ -1038,7 +1038,7 @@ def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account, collection_formats=collection_formats) def get_transfer_order_status(self, **kwargs): # noqa: E501 - """Transfer status query # noqa: E501 + """Transfer status query. # noqa: E501 Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1064,7 +1064,7 @@ def get_transfer_order_status(self, **kwargs): # noqa: E501 return self.get_transfer_order_status_with_http_info(**kwargs) # noqa: E501 def get_transfer_order_status_with_http_info(self, **kwargs): # noqa: E501 - """Transfer status query # noqa: E501 + """Transfer status query. # noqa: E501 Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1153,7 +1153,7 @@ def get_transfer_order_status_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_withdraw_status(self, **kwargs): # noqa: E501 - """Retrieve withdrawal status # noqa: E501 + """Retrieve withdrawal status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1161,7 +1161,7 @@ def list_withdraw_status(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency: Retrieve data of the specified currency. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1177,7 +1177,7 @@ def list_withdraw_status(self, **kwargs): # noqa: E501 return self.list_withdraw_status_with_http_info(**kwargs) # noqa: E501 def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve withdrawal status # noqa: E501 + """Retrieve withdrawal status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1185,7 +1185,7 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency + :param str currency: Retrieve data of the specified currency. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1261,7 +1261,7 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_balances(self, **kwargs): # noqa: E501 - """Retrieve sub account balances # noqa: E501 + """Retrieve sub account balances. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1285,7 +1285,7 @@ def list_sub_account_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve sub account balances # noqa: E501 + """Retrieve sub account balances. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1369,7 +1369,7 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_margin_balances(self, **kwargs): # noqa: E501 - """Query sub accounts' margin balances # noqa: E501 + """Query sub accounts' margin balances. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1393,7 +1393,7 @@ def list_sub_account_margin_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_margin_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query sub accounts' margin balances # noqa: E501 + """Query sub accounts' margin balances. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1477,7 +1477,7 @@ def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_sub_account_futures_balances(self, **kwargs): # noqa: E501 - """Query sub accounts' futures account balances # noqa: E501 + """Query sub accounts' futures account balances. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1486,7 +1486,7 @@ def list_sub_account_futures_balances(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param str settle: Query only balances of specified settle currency + :param str settle: Query only balances of specified settle currency. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1502,7 +1502,7 @@ def list_sub_account_futures_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_futures_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query sub accounts' futures account balances # noqa: E501 + """Query sub accounts' futures account balances. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1511,7 +1511,7 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E :param bool async_req: execute request asynchronously :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param str settle: Query only balances of specified settle currency + :param str settle: Query only balances of specified settle currency. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1590,7 +1590,7 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E collection_formats=collection_formats) def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501 - """Query subaccount's cross_margin account info # noqa: E501 + """Query subaccount's cross_margin account info. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1614,7 +1614,7 @@ def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_cross_margin_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query subaccount's cross_margin account info # noqa: E501 + """Query subaccount's cross_margin account info. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1698,7 +1698,7 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no collection_formats=collection_formats) def list_saved_address(self, currency, **kwargs): # noqa: E501 - """Query saved address # 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 @@ -1706,10 +1706,10 @@ def list_saved_address(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str chain: Chain name - :param str limit: Maximum number returned, 100 at most - :param int page: Page number + :param str currency: Currency. (required) + :param str chain: Chain name. + :param str limit: Maximum number returned, 100 at most. + :param int page: Page number. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1725,7 +1725,7 @@ def list_saved_address(self, currency, **kwargs): # noqa: E501 return self.list_saved_address_with_http_info(currency, **kwargs) # noqa: E501 def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query saved address # noqa: E501 + """Query saved address. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1733,10 +1733,10 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency (required) - :param str chain: Chain name - :param str limit: Maximum number returned, 100 at most - :param int page: Page number + :param str currency: Currency. (required) + :param str chain: Chain name. + :param str limit: Maximum number returned, 100 at most. + :param int page: Page number. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1827,7 +1827,7 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_trade_fee(self, **kwargs): # noqa: E501 - """Retrieve personal trading fee # noqa: E501 + """Retrieve personal trading fee. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1852,7 +1852,7 @@ def get_trade_fee(self, **kwargs): # noqa: E501 return self.get_trade_fee_with_http_info(**kwargs) # noqa: E501 def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve personal trading fee # noqa: E501 + """Retrieve personal trading fee. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1940,9 +1940,9 @@ def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_total_balance(self, **kwargs): # noqa: E501 - """Retrieve user's total balances # noqa: E501 + """Retrieve user's total balances. # noqa: E501 - This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501 + This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` /futures/{settle}/accounts` to query futures account balance # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_total_balance(async_req=True) @@ -1965,9 +1965,9 @@ def get_total_balance(self, **kwargs): # noqa: E501 return self.get_total_balance_with_http_info(**kwargs) # noqa: E501 def get_total_balance_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user's total balances # noqa: E501 + """Retrieve user's total balances. # noqa: E501 - This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance # noqa: E501 + This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` /futures/{settle}/accounts` to query futures account balance # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_total_balance_with_http_info(async_req=True) @@ -2050,7 +2050,7 @@ def get_total_balance_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_small_balance(self, **kwargs): # noqa: E501 - """List small balance # noqa: E501 + """List small balance. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2073,7 +2073,7 @@ def list_small_balance(self, **kwargs): # noqa: E501 return self.list_small_balance_with_http_info(**kwargs) # noqa: E501 def list_small_balance_with_http_info(self, **kwargs): # noqa: E501 - """List small balance # noqa: E501 + """List small balance. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2153,7 +2153,7 @@ def list_small_balance_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def convert_small_balance(self, convert_small_balance, **kwargs): # noqa: E501 - """Convert small balance # noqa: E501 + """Convert small balance. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2177,7 +2177,7 @@ def convert_small_balance(self, convert_small_balance, **kwargs): # noqa: E501 return self.convert_small_balance_with_http_info(convert_small_balance, **kwargs) # noqa: E501 def convert_small_balance_with_http_info(self, convert_small_balance, **kwargs): # noqa: E501 - """Convert small balance # noqa: E501 + """Convert small balance. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2265,7 +2265,7 @@ def convert_small_balance_with_http_info(self, convert_small_balance, **kwargs): collection_formats=collection_formats) def list_small_balance_history(self, **kwargs): # noqa: E501 - """List small balance history # noqa: E501 + """List small balance history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2273,9 +2273,9 @@ def list_small_balance_history(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2291,7 +2291,7 @@ def list_small_balance_history(self, **kwargs): # noqa: E501 return self.list_small_balance_history_with_http_info(**kwargs) # noqa: E501 def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 - """List small balance history # noqa: E501 + """List small balance history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2299,9 +2299,9 @@ def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency - :param int page: Page number - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100 + :param str currency: Currency. + :param int page: Page number. + :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2389,7 +2389,7 @@ def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_push_orders(self, **kwargs): # noqa: E501 - """Retrieve the UID transfer history # noqa: E501 + """Retrieve the UID transfer history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2397,11 +2397,11 @@ def list_push_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int id: Order ID + :param int id: Order ID. :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. - :param int limit: The maximum number of items returned in the list, the default value is 100 - :param int offset: List offset, starting from 0 + :param int limit: The maximum number of items returned in the list, the default value is 100. + :param int offset: List offset, starting from 0. :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2418,7 +2418,7 @@ def list_push_orders(self, **kwargs): # noqa: E501 return self.list_push_orders_with_http_info(**kwargs) # noqa: E501 def list_push_orders_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve the UID transfer history # noqa: E501 + """Retrieve the UID transfer history. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2426,11 +2426,11 @@ def list_push_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int id: Order ID + :param int id: Order ID. :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. - :param int limit: The maximum number of items returned in the list, the default value is 100 - :param int offset: List offset, starting from 0 + :param int limit: The maximum number of items returned in the list, the default value is 100. + :param int offset: List offset, starting from 0. :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. :param _return_http_data_only: response data without head status code and headers diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py index a5a0c6e..1d5f282 100644 --- a/gate_api/api/withdrawal_api.py +++ b/gate_api/api/withdrawal_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def withdraw(self, ledger_record, **kwargs): # noqa: E501 - """Withdraw # noqa: E501 + """Withdraw. # noqa: E501 Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -62,7 +62,7 @@ def withdraw(self, ledger_record, **kwargs): # noqa: E501 return self.withdraw_with_http_info(ledger_record, **kwargs) # noqa: E501 def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501 - """Withdraw # noqa: E501 + """Withdraw. # noqa: E501 Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -155,7 +155,7 @@ def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501 collection_formats=collection_formats) def withdraw_push_order(self, uid_push_withdrawal, **kwargs): # noqa: E501 - """UID transfer # noqa: E501 + """UID transfer. # noqa: E501 Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -180,7 +180,7 @@ def withdraw_push_order(self, uid_push_withdrawal, **kwargs): # noqa: E501 return self.withdraw_push_order_with_http_info(uid_push_withdrawal, **kwargs) # noqa: E501 def withdraw_push_order_with_http_info(self, uid_push_withdrawal, **kwargs): # noqa: E501 - """UID transfer # noqa: E501 + """UID transfer. # noqa: E501 Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -273,7 +273,7 @@ def withdraw_push_order_with_http_info(self, uid_push_withdrawal, **kwargs): # collection_formats=collection_formats) def cancel_withdrawal(self, withdrawal_id, **kwargs): # noqa: E501 - """Cancel withdrawal with specified ID # noqa: E501 + """Cancel withdrawal with specified ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -297,7 +297,7 @@ def cancel_withdrawal(self, withdrawal_id, **kwargs): # noqa: E501 return self.cancel_withdrawal_with_http_info(withdrawal_id, **kwargs) # noqa: E501 def cancel_withdrawal_with_http_info(self, withdrawal_id, **kwargs): # noqa: E501 - """Cancel withdrawal with specified ID # noqa: E501 + """Cancel withdrawal with specified ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api_client.py b/gate_api/api_client.py index f674b92..b801eaa 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/6.102.1/python' + self.user_agent = 'OpenAPI-Generator/6.102.6/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 42682ad..218bc37 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.102.1\n"\ - "SDK Package Version: 6.102.1".\ + "Version of the API: v4.102.6\n"\ + "SDK Package Version: 6.102.6".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): @@ -325,11 +325,11 @@ def get_host_settings(self): return [ { 'url': "https://api.gateio.ws/api/v4", - 'description': "Real Trading", + 'description': "Real Trading.", }, { 'url': "https://fx-api-testnet.gateio.ws/api/v4", - 'description': "TestNet Trading", + 'description': "TestNet Trading.", } ] diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py index 9a8c6c9..144d955 100644 --- a/gate_api/models/account_balance.py +++ b/gate_api/models/account_balance.py @@ -72,7 +72,7 @@ def __init__(self, amount=None, currency=None, unrealised_pnl=None, borrowed=Non def amount(self): """Gets the amount of this AccountBalance. # noqa: E501 - Account total balance amount # noqa: E501 + Account total balance amount. # noqa: E501 :return: The amount of this AccountBalance. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this AccountBalance. - Account total balance amount # noqa: E501 + Account total balance amount. # noqa: E501 :param amount: The amount of this AccountBalance. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def amount(self, amount): def currency(self): """Gets the currency of this AccountBalance. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this AccountBalance. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this AccountBalance. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this AccountBalance. # noqa: E501 :type: str @@ -147,7 +147,7 @@ def unrealised_pnl(self, unrealised_pnl): def borrowed(self): """Gets the borrowed of this AccountBalance. # noqa: E501 - Borrowed,this field will only appear in margin and cross_margin accounts # noqa: E501 + Borrowed,this field will only appear in margin and cross_margin accounts. # noqa: E501 :return: The borrowed of this AccountBalance. # noqa: E501 :rtype: str @@ -158,7 +158,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this AccountBalance. - Borrowed,this field will only appear in margin and cross_margin accounts # noqa: E501 + Borrowed,this field will only appear in margin and cross_margin accounts. # noqa: E501 :param borrowed: The borrowed of this AccountBalance. # noqa: E501 :type: str diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py index 9f40e7e..8698af6 100644 --- a/gate_api/models/account_detail.py +++ b/gate_api/models/account_detail.py @@ -82,7 +82,7 @@ def __init__(self, ip_whitelist=None, currency_pairs=None, user_id=None, tier=No def ip_whitelist(self): """Gets the ip_whitelist of this AccountDetail. # noqa: E501 - IP whitelist # noqa: E501 + IP whitelist. # noqa: E501 :return: The ip_whitelist of this AccountDetail. # noqa: E501 :rtype: list[str] @@ -93,7 +93,7 @@ def ip_whitelist(self): def ip_whitelist(self, ip_whitelist): """Sets the ip_whitelist of this AccountDetail. - IP whitelist # noqa: E501 + IP whitelist. # noqa: E501 :param ip_whitelist: The ip_whitelist of this AccountDetail. # noqa: E501 :type: list[str] @@ -105,7 +105,7 @@ def ip_whitelist(self, ip_whitelist): def currency_pairs(self): """Gets the currency_pairs of this AccountDetail. # noqa: E501 - CurrencyPair whitelisting # noqa: E501 + CurrencyPair whitelisting. # noqa: E501 :return: The currency_pairs of this AccountDetail. # noqa: E501 :rtype: list[str] @@ -116,7 +116,7 @@ def currency_pairs(self): def currency_pairs(self, currency_pairs): """Sets the currency_pairs of this AccountDetail. - CurrencyPair whitelisting # noqa: E501 + CurrencyPair whitelisting. # noqa: E501 :param currency_pairs: The currency_pairs of this AccountDetail. # noqa: E501 :type: list[str] @@ -128,7 +128,7 @@ def currency_pairs(self, currency_pairs): def user_id(self): """Gets the user_id of this AccountDetail. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this AccountDetail. # noqa: E501 :rtype: int @@ -139,7 +139,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this AccountDetail. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this AccountDetail. # noqa: E501 :type: int @@ -151,7 +151,7 @@ def user_id(self, user_id): def tier(self): """Gets the tier of this AccountDetail. # noqa: E501 - User VIP level # noqa: E501 + User VIP level. # noqa: E501 :return: The tier of this AccountDetail. # noqa: E501 :rtype: int @@ -162,7 +162,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this AccountDetail. - User VIP level # noqa: E501 + User VIP level. # noqa: E501 :param tier: The tier of this AccountDetail. # noqa: E501 :type: int @@ -195,7 +195,7 @@ def key(self, key): def copy_trading_role(self): """Gets the copy_trading_role of this AccountDetail. # noqa: E501 - User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower # noqa: E501 + User role: 0 - Normal user, 1 - Copy trading leader, follower, 3 - Both leader and follower # noqa: E501 :return: The copy_trading_role of this AccountDetail. # noqa: E501 :rtype: int @@ -206,7 +206,7 @@ def copy_trading_role(self): def copy_trading_role(self, copy_trading_role): """Sets the copy_trading_role of this AccountDetail. - User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower # noqa: E501 + User role: 0 - Normal user, 1 - Copy trading leader, follower, 3 - Both leader and follower # noqa: E501 :param copy_trading_role: The copy_trading_role of this AccountDetail. # noqa: E501 :type: int diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py index 600a035..cc5b2d7 100644 --- a/gate_api/models/account_detail_key.py +++ b/gate_api/models/account_detail_key.py @@ -57,7 +57,7 @@ def __init__(self, mode=None, local_vars_configuration=None): # noqa: E501 def mode(self): """Gets the mode of this AccountDetailKey. # noqa: E501 - mode: 1 - classic account 2 - portfolio margin account # noqa: E501 + mode: 1 - classic account 2 - portfolio margin account. # noqa: E501 :return: The mode of this AccountDetailKey. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this AccountDetailKey. - mode: 1 - classic account 2 - portfolio margin account # noqa: E501 + mode: 1 - classic account 2 - portfolio margin account. # noqa: E501 :param mode: The mode of this AccountDetailKey. # noqa: E501 :type: int diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py index 3516866..bb34e7c 100644 --- a/gate_api/models/account_rate_limit.py +++ b/gate_api/models/account_rate_limit.py @@ -95,7 +95,7 @@ def tier(self, tier): def ratio(self): """Gets the ratio of this AccountRateLimit. # noqa: E501 - Transaction rate # noqa: E501 + Transaction rate. # noqa: E501 :return: The ratio of this AccountRateLimit. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def ratio(self): def ratio(self, ratio): """Sets the ratio of this AccountRateLimit. - Transaction rate # noqa: E501 + Transaction rate. # noqa: E501 :param ratio: The ratio of this AccountRateLimit. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def ratio(self, ratio): def main_ratio(self): """Gets the main_ratio of this AccountRateLimit. # noqa: E501 - Total transaction ratio of main account # noqa: E501 + Total transaction ratio of main account. # noqa: E501 :return: The main_ratio of this AccountRateLimit. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def main_ratio(self): def main_ratio(self, main_ratio): """Sets the main_ratio of this AccountRateLimit. - Total transaction ratio of main account # noqa: E501 + Total transaction ratio of main account. # noqa: E501 :param main_ratio: The main_ratio of this AccountRateLimit. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def main_ratio(self, main_ratio): def updated_at(self): """Gets the updated_at of this AccountRateLimit. # noqa: E501 - Update time # noqa: E501 + Update time. # noqa: E501 :return: The updated_at of this AccountRateLimit. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def updated_at(self): def updated_at(self, updated_at): """Sets the updated_at of this AccountRateLimit. - Update time # noqa: E501 + Update time. # noqa: E501 :param updated_at: The updated_at of this AccountRateLimit. # noqa: E501 :type: str diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py index 7bb1c9d..7f50c74 100644 --- a/gate_api/models/agency_commission.py +++ b/gate_api/models/agency_commission.py @@ -82,7 +82,7 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, commissi def commission_time(self): """Gets the commission_time of this AgencyCommission. # noqa: E501 - Commission Time. (unix timestamp) # noqa: E501 + Commission Time. (unix timestamp). # noqa: E501 :return: The commission_time of this AgencyCommission. # noqa: E501 :rtype: int @@ -93,7 +93,7 @@ def commission_time(self): def commission_time(self, commission_time): """Sets the commission_time of this AgencyCommission. - Commission Time. (unix timestamp) # noqa: E501 + Commission Time. (unix timestamp). # noqa: E501 :param commission_time: The commission_time of this AgencyCommission. # noqa: E501 :type: int @@ -105,7 +105,7 @@ def commission_time(self, commission_time): def user_id(self): """Gets the user_id of this AgencyCommission. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this AgencyCommission. # noqa: E501 :rtype: int @@ -116,7 +116,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this AgencyCommission. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this AgencyCommission. # noqa: E501 :type: int @@ -128,7 +128,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this AgencyCommission. # noqa: E501 - Group name # noqa: E501 + Group name. # noqa: E501 :return: The group_name of this AgencyCommission. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this AgencyCommission. - Group name # noqa: E501 + Group name. # noqa: E501 :param group_name: The group_name of this AgencyCommission. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def group_name(self, group_name): def commission_amount(self): """Gets the commission_amount of this AgencyCommission. # noqa: E501 - Commission Amount # noqa: E501 + Commission Amount. # noqa: E501 :return: The commission_amount of this AgencyCommission. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def commission_amount(self): def commission_amount(self, commission_amount): """Sets the commission_amount of this AgencyCommission. - Commission Amount # noqa: E501 + Commission Amount. # noqa: E501 :param commission_amount: The commission_amount of this AgencyCommission. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def commission_amount(self, commission_amount): def commission_asset(self): """Gets the commission_asset of this AgencyCommission. # noqa: E501 - Commission Asset # noqa: E501 + Commission Asset. # noqa: E501 :return: The commission_asset of this AgencyCommission. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def commission_asset(self): def commission_asset(self, commission_asset): """Sets the commission_asset of this AgencyCommission. - Commission Asset # noqa: E501 + Commission Asset. # noqa: E501 :param commission_asset: The commission_asset of this AgencyCommission. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def commission_asset(self, commission_asset): def source(self): """Gets the source of this AgencyCommission. # noqa: E501 - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 :return: The source of this AgencyCommission. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def source(self): def source(self, source): """Sets the source of this AgencyCommission. - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 :param source: The source of this AgencyCommission. # noqa: E501 :type: str diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py index 24236b5..84ffc87 100644 --- a/gate_api/models/agency_commission_history.py +++ b/gate_api/models/agency_commission_history.py @@ -67,7 +67,7 @@ def __init__(self, currency_pair=None, total=None, list=None, local_vars_configu def currency_pair(self): """Gets the currency_pair of this AgencyCommissionHistory. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this AgencyCommissionHistory. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this AgencyCommissionHistory. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this AgencyCommissionHistory. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency_pair(self, currency_pair): def total(self): """Gets the total of this AgencyCommissionHistory. # noqa: E501 - Total # noqa: E501 + Total. # noqa: E501 :return: The total of this AgencyCommissionHistory. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def total(self): def total(self, total): """Sets the total of this AgencyCommissionHistory. - Total # noqa: E501 + Total. # noqa: E501 :param total: The total of this AgencyCommissionHistory. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def total(self, total): def list(self): """Gets the list of this AgencyCommissionHistory. # noqa: E501 - List of comission history # noqa: E501 + List of comission history. # noqa: E501 :return: The list of this AgencyCommissionHistory. # noqa: E501 :rtype: list[AgencyCommission] @@ -124,7 +124,7 @@ def list(self): def list(self, list): """Sets the list of this AgencyCommissionHistory. - List of comission history # noqa: E501 + List of comission history. # noqa: E501 :param list: The list of this AgencyCommissionHistory. # noqa: E501 :type: list[AgencyCommission] diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py index 85194ec..7b863be 100644 --- a/gate_api/models/agency_transaction.py +++ b/gate_api/models/agency_transaction.py @@ -97,7 +97,7 @@ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=Non def transaction_time(self): """Gets the transaction_time of this AgencyTransaction. # noqa: E501 - Transaction Time. (unix timestamp) # noqa: E501 + Transaction Time. (unix timestamp). # noqa: E501 :return: The transaction_time of this AgencyTransaction. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def transaction_time(self): def transaction_time(self, transaction_time): """Sets the transaction_time of this AgencyTransaction. - Transaction Time. (unix timestamp) # noqa: E501 + Transaction Time. (unix timestamp). # noqa: E501 :param transaction_time: The transaction_time of this AgencyTransaction. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def transaction_time(self, transaction_time): def user_id(self): """Gets the user_id of this AgencyTransaction. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this AgencyTransaction. # noqa: E501 :rtype: int @@ -131,7 +131,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this AgencyTransaction. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this AgencyTransaction. # noqa: E501 :type: int @@ -143,7 +143,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this AgencyTransaction. # noqa: E501 - Group name # noqa: E501 + Group name. # noqa: E501 :return: The group_name of this AgencyTransaction. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this AgencyTransaction. - Group name # noqa: E501 + Group name. # noqa: E501 :param group_name: The group_name of this AgencyTransaction. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def group_name(self, group_name): def fee(self): """Gets the fee of this AgencyTransaction. # noqa: E501 - Fee # noqa: E501 + Fee. # noqa: E501 :return: The fee of this AgencyTransaction. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this AgencyTransaction. - Fee # noqa: E501 + Fee. # noqa: E501 :param fee: The fee of this AgencyTransaction. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def fee(self, fee): def fee_asset(self): """Gets the fee_asset of this AgencyTransaction. # noqa: E501 - Fee currency # noqa: E501 + Fee currency. # noqa: E501 :return: The fee_asset of this AgencyTransaction. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def fee_asset(self): def fee_asset(self, fee_asset): """Sets the fee_asset of this AgencyTransaction. - Fee currency # noqa: E501 + Fee currency. # noqa: E501 :param fee_asset: The fee_asset of this AgencyTransaction. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def fee_asset(self, fee_asset): def currency_pair(self): """Gets the currency_pair of this AgencyTransaction. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this AgencyTransaction. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this AgencyTransaction. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this AgencyTransaction. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this AgencyTransaction. # noqa: E501 - Commission Amount # noqa: E501 + Commission Amount. # noqa: E501 :return: The amount of this AgencyTransaction. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this AgencyTransaction. - Commission Amount # noqa: E501 + Commission Amount. # noqa: E501 :param amount: The amount of this AgencyTransaction. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def amount(self, amount): def amount_asset(self): """Gets the amount_asset of this AgencyTransaction. # noqa: E501 - Commission Asset # noqa: E501 + Commission Asset. # noqa: E501 :return: The amount_asset of this AgencyTransaction. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def amount_asset(self): def amount_asset(self, amount_asset): """Sets the amount_asset of this AgencyTransaction. - Commission Asset # noqa: E501 + Commission Asset. # noqa: E501 :param amount_asset: The amount_asset of this AgencyTransaction. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def amount_asset(self, amount_asset): def source(self): """Gets the source of this AgencyTransaction. # noqa: E501 - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 :return: The source of this AgencyTransaction. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def source(self): def source(self, source): """Sets the source of this AgencyTransaction. - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501 + Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 :param source: The source of this AgencyTransaction. # noqa: E501 :type: str diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py index f763169..4824fae 100644 --- a/gate_api/models/agency_transaction_history.py +++ b/gate_api/models/agency_transaction_history.py @@ -67,7 +67,7 @@ def __init__(self, currency_pair=None, total=None, list=None, local_vars_configu def currency_pair(self): """Gets the currency_pair of this AgencyTransactionHistory. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this AgencyTransactionHistory. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this AgencyTransactionHistory. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this AgencyTransactionHistory. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency_pair(self, currency_pair): def total(self): """Gets the total of this AgencyTransactionHistory. # noqa: E501 - Total # noqa: E501 + Total. # noqa: E501 :return: The total of this AgencyTransactionHistory. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def total(self): def total(self, total): """Sets the total of this AgencyTransactionHistory. - Total # noqa: E501 + Total. # noqa: E501 :param total: The total of this AgencyTransactionHistory. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def total(self, total): def list(self): """Gets the list of this AgencyTransactionHistory. # noqa: E501 - List of transaction history # noqa: E501 + List of transaction history. # noqa: E501 :return: The list of this AgencyTransactionHistory. # noqa: E501 :rtype: list[AgencyTransaction] @@ -124,7 +124,7 @@ def list(self): def list(self, list): """Sets the list of this AgencyTransactionHistory. - List of transaction history # noqa: E501 + List of transaction history. # noqa: E501 :param list: The list of this AgencyTransactionHistory. # noqa: E501 :type: list[AgencyTransaction] diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py index 3e25e28..b4b8261 100644 --- a/gate_api/models/auto_repay_setting.py +++ b/gate_api/models/auto_repay_setting.py @@ -57,7 +57,7 @@ def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 def status(self): """Gets the status of this AutoRepaySetting. # noqa: E501 - Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501 + Auto repayment status. `on` - enabled, `off` - disabled. # noqa: E501 :return: The status of this AutoRepaySetting. # noqa: E501 :rtype: str @@ -68,7 +68,7 @@ def status(self): def status(self, status): """Sets the status of this AutoRepaySetting. - Auto repayment status. `on` - enabled, `off` - disabled # noqa: E501 + Auto repayment status. `on` - enabled, `off` - disabled. # noqa: E501 :param status: The status of this AutoRepaySetting. # noqa: E501 :type: str diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py index 99829ee..f71b418 100644 --- a/gate_api/models/batch_amend_item.py +++ b/gate_api/models/batch_amend_item.py @@ -110,7 +110,7 @@ def order_id(self, order_id): def currency_pair(self): """Gets the currency_pair of this BatchAmendItem. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this BatchAmendItem. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BatchAmendItem. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this BatchAmendItem. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this BatchAmendItem. # noqa: E501 - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :return: The amend_text of this BatchAmendItem. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this BatchAmendItem. - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :param amend_text: The amend_text of this BatchAmendItem. # noqa: E501 :type: str diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py index 18061a2..bd76cce 100644 --- a/gate_api/models/batch_amend_order_req.py +++ b/gate_api/models/batch_amend_order_req.py @@ -77,7 +77,7 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N def order_id(self): """Gets the order_id of this BatchAmendOrderReq. # noqa: E501 - Order id, order_id and text must contain at least one # noqa: E501 + Order id, order_id and text must contain at least one. # noqa: E501 :return: The order_id of this BatchAmendOrderReq. # noqa: E501 :rtype: int @@ -88,7 +88,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this BatchAmendOrderReq. - Order id, order_id and text must contain at least one # noqa: E501 + Order id, order_id and text must contain at least one. # noqa: E501 :param order_id: The order_id of this BatchAmendOrderReq. # noqa: E501 :type: int @@ -100,7 +100,7 @@ def order_id(self, order_id): def text(self): """Gets the text of this BatchAmendOrderReq. # noqa: E501 - User-defined order text, at least one of order_id and text must be passed # noqa: E501 + User-defined order text, at least one of order_id and text must be passed. # noqa: E501 :return: The text of this BatchAmendOrderReq. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def text(self): def text(self, text): """Sets the text of this BatchAmendOrderReq. - User-defined order text, at least one of order_id and text must be passed # noqa: E501 + User-defined order text, at least one of order_id and text must be passed. # noqa: E501 :param text: The text of this BatchAmendOrderReq. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def text(self, text): def size(self): """Gets the size of this BatchAmendOrderReq. # noqa: E501 - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 :return: The size of this BatchAmendOrderReq. # noqa: E501 :rtype: int @@ -134,7 +134,7 @@ def size(self): def size(self, size): """Sets the size of this BatchAmendOrderReq. - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 :param size: The size of this BatchAmendOrderReq. # noqa: E501 :type: int @@ -169,7 +169,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this BatchAmendOrderReq. # noqa: E501 - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :return: The amend_text of this BatchAmendOrderReq. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this BatchAmendOrderReq. - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :param amend_text: The amend_text of this BatchAmendOrderReq. # noqa: E501 :type: str diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py index 9181c70..a7dba9c 100644 --- a/gate_api/models/batch_futures_order.py +++ b/gate_api/models/batch_futures_order.py @@ -192,7 +192,7 @@ def __init__(self, succeeded=None, label=None, detail=None, id=None, user=None, def succeeded(self): """Gets the succeeded of this BatchFuturesOrder. # noqa: E501 - Whether the batch of orders succeeded # noqa: E501 + Whether the batch of orders succeeded. # noqa: E501 :return: The succeeded of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -203,7 +203,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this BatchFuturesOrder. - Whether the batch of orders succeeded # noqa: E501 + Whether the batch of orders succeeded. # noqa: E501 :param succeeded: The succeeded of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -215,7 +215,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this BatchFuturesOrder. # noqa: E501 - Error label, only exists if execution fails # noqa: E501 + Error label, only exists if execution fails. # noqa: E501 :return: The label of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -226,7 +226,7 @@ def label(self): def label(self, label): """Sets the label of this BatchFuturesOrder. - Error label, only exists if execution fails # noqa: E501 + Error label, only exists if execution fails. # noqa: E501 :param label: The label of this BatchFuturesOrder. # noqa: E501 :type: str @@ -261,7 +261,7 @@ def detail(self, detail): def id(self): """Gets the id of this BatchFuturesOrder. # noqa: E501 - Futures order ID # noqa: E501 + Futures order ID. # noqa: E501 :return: The id of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -272,7 +272,7 @@ def id(self): def id(self, id): """Sets the id of this BatchFuturesOrder. - Futures order ID # noqa: E501 + Futures order ID. # noqa: E501 :param id: The id of this BatchFuturesOrder. # noqa: E501 :type: int @@ -284,7 +284,7 @@ def id(self, id): def user(self): """Gets the user of this BatchFuturesOrder. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -295,7 +295,7 @@ def user(self): def user(self, user): """Sets the user of this BatchFuturesOrder. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this BatchFuturesOrder. # noqa: E501 :type: int @@ -307,7 +307,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this BatchFuturesOrder. # noqa: E501 - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :return: The create_time of this BatchFuturesOrder. # noqa: E501 :rtype: float @@ -318,7 +318,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this BatchFuturesOrder. - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :param create_time: The create_time of this BatchFuturesOrder. # noqa: E501 :type: float @@ -330,7 +330,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this BatchFuturesOrder. # noqa: E501 - Order finished time. Not returned if order is open # noqa: E501 + Order finished time. Not returned if order is open. # noqa: E501 :return: The finish_time of this BatchFuturesOrder. # noqa: E501 :rtype: float @@ -341,7 +341,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this BatchFuturesOrder. - Order finished time. Not returned if order is open # noqa: E501 + Order finished time. Not returned if order is open. # noqa: E501 :param finish_time: The finish_time of this BatchFuturesOrder. # noqa: E501 :type: float @@ -353,7 +353,7 @@ def finish_time(self, finish_time): def finish_as(self): """Gets the finish_as of this BatchFuturesOrder. # noqa: E501 - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :return: The finish_as of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -364,7 +364,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this BatchFuturesOrder. - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :param finish_as: The finish_as of this BatchFuturesOrder. # noqa: E501 :type: str @@ -411,7 +411,7 @@ def status(self, status): def contract(self): """Gets the contract of this BatchFuturesOrder. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -422,7 +422,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this BatchFuturesOrder. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this BatchFuturesOrder. # noqa: E501 :type: str @@ -480,7 +480,7 @@ def iceberg(self, iceberg): def price(self): """Gets the price of this BatchFuturesOrder. # noqa: E501 - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 :return: The price of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -491,7 +491,7 @@ def price(self): def price(self, price): """Sets the price of this BatchFuturesOrder. - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 :param price: The price of this BatchFuturesOrder. # noqa: E501 :type: str @@ -503,7 +503,7 @@ def price(self, price): def close(self): """Gets the close of this BatchFuturesOrder. # noqa: E501 - Set as `true` to close the position, with `size` set to 0 # noqa: E501 + Set as `true` to close the position, with `size` set to 0. # noqa: E501 :return: The close of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -514,7 +514,7 @@ def close(self): def close(self, close): """Sets the close of this BatchFuturesOrder. - Set as `true` to close the position, with `size` set to 0 # noqa: E501 + Set as `true` to close the position, with `size` set to 0. # noqa: E501 :param close: The close of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -526,7 +526,7 @@ def close(self, close): def is_close(self): """Gets the is_close of this BatchFuturesOrder. # noqa: E501 - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :return: The is_close of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -537,7 +537,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this BatchFuturesOrder. - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :param is_close: The is_close of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -549,7 +549,7 @@ def is_close(self, is_close): def reduce_only(self): """Gets the reduce_only of this BatchFuturesOrder. # noqa: E501 - Set as `true` to be reduce-only order # noqa: E501 + Set as `true` to be reduce-only order. # noqa: E501 :return: The reduce_only of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -560,7 +560,7 @@ def reduce_only(self): def reduce_only(self, reduce_only): """Sets the reduce_only of this BatchFuturesOrder. - Set as `true` to be reduce-only order # noqa: E501 + Set as `true` to be reduce-only order. # noqa: E501 :param reduce_only: The reduce_only of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -572,7 +572,7 @@ def reduce_only(self, reduce_only): def is_reduce_only(self): """Gets the is_reduce_only of this BatchFuturesOrder. # noqa: E501 - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :return: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -583,7 +583,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this BatchFuturesOrder. - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :param is_reduce_only: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -595,7 +595,7 @@ def is_reduce_only(self, is_reduce_only): def is_liq(self): """Gets the is_liq of this BatchFuturesOrder. # noqa: E501 - Is the order for liquidation # noqa: E501 + Is the order for liquidation. # noqa: E501 :return: The is_liq of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -606,7 +606,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this BatchFuturesOrder. - Is the order for liquidation # noqa: E501 + Is the order for liquidation. # noqa: E501 :param is_liq: The is_liq of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -647,7 +647,7 @@ def tif(self, tif): def left(self): """Gets the left of this BatchFuturesOrder. # noqa: E501 - Size left to be traded # noqa: E501 + Size left to be traded. # noqa: E501 :return: The left of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -658,7 +658,7 @@ def left(self): def left(self, left): """Sets the left of this BatchFuturesOrder. - Size left to be traded # noqa: E501 + Size left to be traded. # noqa: E501 :param left: The left of this BatchFuturesOrder. # noqa: E501 :type: int @@ -670,7 +670,7 @@ def left(self, left): def fill_price(self): """Gets the fill_price of this BatchFuturesOrder. # noqa: E501 - Fill price of the order # noqa: E501 + Fill price of the order. # noqa: E501 :return: The fill_price of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -681,7 +681,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this BatchFuturesOrder. - Fill price of the order # noqa: E501 + Fill price of the order. # noqa: E501 :param fill_price: The fill_price of this BatchFuturesOrder. # noqa: E501 :type: str @@ -716,7 +716,7 @@ def text(self, text): def tkfr(self): """Gets the tkfr of this BatchFuturesOrder. # noqa: E501 - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :return: The tkfr of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -727,7 +727,7 @@ def tkfr(self): def tkfr(self, tkfr): """Sets the tkfr of this BatchFuturesOrder. - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :param tkfr: The tkfr of this BatchFuturesOrder. # noqa: E501 :type: str @@ -739,7 +739,7 @@ def tkfr(self, tkfr): def mkfr(self): """Gets the mkfr of this BatchFuturesOrder. # noqa: E501 - Maker fee # noqa: E501 + Maker fee. # noqa: E501 :return: The mkfr of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -750,7 +750,7 @@ def mkfr(self): def mkfr(self, mkfr): """Sets the mkfr of this BatchFuturesOrder. - Maker fee # noqa: E501 + Maker fee. # noqa: E501 :param mkfr: The mkfr of this BatchFuturesOrder. # noqa: E501 :type: str @@ -762,7 +762,7 @@ def mkfr(self, mkfr): def refu(self): """Gets the refu of this BatchFuturesOrder. # noqa: E501 - Reference user ID # noqa: E501 + Reference user ID. # noqa: E501 :return: The refu of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -773,7 +773,7 @@ def refu(self): def refu(self, refu): """Sets the refu of this BatchFuturesOrder. - Reference user ID # noqa: E501 + Reference user ID. # noqa: E501 :param refu: The refu of this BatchFuturesOrder. # noqa: E501 :type: int @@ -814,7 +814,7 @@ def auto_size(self, auto_size): def stp_act(self): """Gets the stp_act of this BatchFuturesOrder. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -825,7 +825,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this BatchFuturesOrder. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this BatchFuturesOrder. # noqa: E501 :type: str diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py index 4f1e64f..3a6af81 100644 --- a/gate_api/models/batch_order.py +++ b/gate_api/models/batch_order.py @@ -237,7 +237,7 @@ def __init__(self, order_id=None, amend_text=None, text=None, succeeded=None, la def order_id(self): """Gets the order_id of this BatchOrder. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this BatchOrder. # noqa: E501 :rtype: str @@ -248,7 +248,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this BatchOrder. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this BatchOrder. # noqa: E501 :type: str @@ -260,7 +260,7 @@ def order_id(self, order_id): def amend_text(self): """Gets the amend_text of this BatchOrder. # noqa: E501 - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :return: The amend_text of this BatchOrder. # noqa: E501 :rtype: str @@ -271,7 +271,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this BatchOrder. - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :param amend_text: The amend_text of this BatchOrder. # noqa: E501 :type: str @@ -306,7 +306,7 @@ def text(self, text): def succeeded(self): """Gets the succeeded of this BatchOrder. # noqa: E501 - Whether the batch of orders succeeded # noqa: E501 + Whether the batch of orders succeeded. # noqa: E501 :return: The succeeded of this BatchOrder. # noqa: E501 :rtype: bool @@ -317,7 +317,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this BatchOrder. - Whether the batch of orders succeeded # noqa: E501 + Whether the batch of orders succeeded. # noqa: E501 :param succeeded: The succeeded of this BatchOrder. # noqa: E501 :type: bool @@ -329,7 +329,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this BatchOrder. # noqa: E501 - Error label, if any, otherwise an empty string # noqa: E501 + Error label, if any, otherwise an empty string. # noqa: E501 :return: The label of this BatchOrder. # noqa: E501 :rtype: str @@ -340,7 +340,7 @@ def label(self): def label(self, label): """Sets the label of this BatchOrder. - Error label, if any, otherwise an empty string # noqa: E501 + Error label, if any, otherwise an empty string. # noqa: E501 :param label: The label of this BatchOrder. # noqa: E501 :type: str @@ -352,7 +352,7 @@ def label(self, label): def message(self): """Gets the message of this BatchOrder. # noqa: E501 - Detailed error message, if any, otherwise an empty string # noqa: E501 + Detailed error message, if any, otherwise an empty string. # noqa: E501 :return: The message of this BatchOrder. # noqa: E501 :rtype: str @@ -363,7 +363,7 @@ def message(self): def message(self, message): """Sets the message of this BatchOrder. - Detailed error message, if any, otherwise an empty string # noqa: E501 + Detailed error message, if any, otherwise an empty string. # noqa: E501 :param message: The message of this BatchOrder. # noqa: E501 :type: str @@ -375,7 +375,7 @@ def message(self, message): def id(self): """Gets the id of this BatchOrder. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this BatchOrder. # noqa: E501 :rtype: str @@ -386,7 +386,7 @@ def id(self): def id(self, id): """Sets the id of this BatchOrder. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this BatchOrder. # noqa: E501 :type: str @@ -398,7 +398,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this BatchOrder. # noqa: E501 - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :return: The create_time of this BatchOrder. # noqa: E501 :rtype: str @@ -409,7 +409,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this BatchOrder. - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :param create_time: The create_time of this BatchOrder. # noqa: E501 :type: str @@ -421,7 +421,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this BatchOrder. # noqa: E501 - Last modification time of order # noqa: E501 + Last modification time of order. # noqa: E501 :return: The update_time of this BatchOrder. # noqa: E501 :rtype: str @@ -432,7 +432,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this BatchOrder. - Last modification time of order # noqa: E501 + Last modification time of order. # noqa: E501 :param update_time: The update_time of this BatchOrder. # noqa: E501 :type: str @@ -444,7 +444,7 @@ def update_time(self, update_time): def create_time_ms(self): """Gets the create_time_ms of this BatchOrder. # noqa: E501 - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :return: The create_time_ms of this BatchOrder. # noqa: E501 :rtype: int @@ -455,7 +455,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this BatchOrder. - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :param create_time_ms: The create_time_ms of this BatchOrder. # noqa: E501 :type: int @@ -467,7 +467,7 @@ def create_time_ms(self, create_time_ms): def update_time_ms(self): """Gets the update_time_ms of this BatchOrder. # noqa: E501 - Last modification time of order (in milliseconds) # noqa: E501 + Last modification time of order (in milliseconds). # noqa: E501 :return: The update_time_ms of this BatchOrder. # noqa: E501 :rtype: int @@ -478,7 +478,7 @@ def update_time_ms(self): def update_time_ms(self, update_time_ms): """Sets the update_time_ms of this BatchOrder. - Last modification time of order (in milliseconds) # noqa: E501 + Last modification time of order (in milliseconds). # noqa: E501 :param update_time_ms: The update_time_ms of this BatchOrder. # noqa: E501 :type: int @@ -519,7 +519,7 @@ def status(self, status): def currency_pair(self): """Gets the currency_pair of this BatchOrder. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this BatchOrder. # noqa: E501 :rtype: str @@ -530,7 +530,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BatchOrder. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this BatchOrder. # noqa: E501 :type: str @@ -600,7 +600,7 @@ def account(self, account): def side(self): """Gets the side of this BatchOrder. # noqa: E501 - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :return: The side of this BatchOrder. # noqa: E501 :rtype: str @@ -611,7 +611,7 @@ def side(self): def side(self, side): """Sets the side of this BatchOrder. - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :param side: The side of this BatchOrder. # noqa: E501 :type: str @@ -629,7 +629,7 @@ def side(self, side): def amount(self): """Gets the amount of this BatchOrder. # noqa: E501 - Trade amount # noqa: E501 + Trade amount. # noqa: E501 :return: The amount of this BatchOrder. # noqa: E501 :rtype: str @@ -640,7 +640,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BatchOrder. - Trade amount # noqa: E501 + Trade amount. # noqa: E501 :param amount: The amount of this BatchOrder. # noqa: E501 :type: str @@ -652,7 +652,7 @@ def amount(self, amount): def price(self): """Gets the price of this BatchOrder. # noqa: E501 - Order price # noqa: E501 + Order price. # noqa: E501 :return: The price of this BatchOrder. # noqa: E501 :rtype: str @@ -663,7 +663,7 @@ def price(self): def price(self, price): """Sets the price of this BatchOrder. - Order price # noqa: E501 + Order price. # noqa: E501 :param price: The price of this BatchOrder. # noqa: E501 :type: str @@ -704,7 +704,7 @@ def time_in_force(self, time_in_force): def iceberg(self): """Gets the iceberg of this BatchOrder. # noqa: E501 - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 :return: The iceberg of this BatchOrder. # noqa: E501 :rtype: str @@ -715,7 +715,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this BatchOrder. - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 :param iceberg: The iceberg of this BatchOrder. # noqa: E501 :type: str @@ -773,7 +773,7 @@ def auto_repay(self, auto_repay): def left(self): """Gets the left of this BatchOrder. # noqa: E501 - Amount left to fill # noqa: E501 + Amount left to fill. # noqa: E501 :return: The left of this BatchOrder. # noqa: E501 :rtype: str @@ -784,7 +784,7 @@ def left(self): def left(self, left): """Sets the left of this BatchOrder. - Amount left to fill # noqa: E501 + Amount left to fill. # noqa: E501 :param left: The left of this BatchOrder. # noqa: E501 :type: str @@ -796,7 +796,7 @@ def left(self, left): def filled_amount(self): """Gets the filled_amount of this BatchOrder. # noqa: E501 - Amount traded to fill # noqa: E501 + Amount traded to fill. # noqa: E501 :return: The filled_amount of this BatchOrder. # noqa: E501 :rtype: str @@ -807,7 +807,7 @@ def filled_amount(self): def filled_amount(self, filled_amount): """Sets the filled_amount of this BatchOrder. - Amount traded to fill # noqa: E501 + Amount traded to fill. # noqa: E501 :param filled_amount: The filled_amount of this BatchOrder. # noqa: E501 :type: str @@ -819,7 +819,7 @@ def filled_amount(self, filled_amount): def fill_price(self): """Gets the fill_price of this BatchOrder. # noqa: E501 - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 :return: The fill_price of this BatchOrder. # noqa: E501 :rtype: str @@ -830,7 +830,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this BatchOrder. - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 :param fill_price: The fill_price of this BatchOrder. # noqa: E501 :type: str @@ -842,7 +842,7 @@ def fill_price(self, fill_price): def filled_total(self): """Gets the filled_total of this BatchOrder. # noqa: E501 - Total filled in quote currency # noqa: E501 + Total filled in quote currency. # noqa: E501 :return: The filled_total of this BatchOrder. # noqa: E501 :rtype: str @@ -853,7 +853,7 @@ def filled_total(self): def filled_total(self, filled_total): """Sets the filled_total of this BatchOrder. - Total filled in quote currency # noqa: E501 + Total filled in quote currency. # noqa: E501 :param filled_total: The filled_total of this BatchOrder. # noqa: E501 :type: str @@ -865,7 +865,7 @@ def filled_total(self, filled_total): def avg_deal_price(self): """Gets the avg_deal_price of this BatchOrder. # noqa: E501 - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :return: The avg_deal_price of this BatchOrder. # noqa: E501 :rtype: str @@ -876,7 +876,7 @@ def avg_deal_price(self): def avg_deal_price(self, avg_deal_price): """Sets the avg_deal_price of this BatchOrder. - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :param avg_deal_price: The avg_deal_price of this BatchOrder. # noqa: E501 :type: str @@ -888,7 +888,7 @@ def avg_deal_price(self, avg_deal_price): def fee(self): """Gets the fee of this BatchOrder. # noqa: E501 - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :return: The fee of this BatchOrder. # noqa: E501 :rtype: str @@ -899,7 +899,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this BatchOrder. - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :param fee: The fee of this BatchOrder. # noqa: E501 :type: str @@ -911,7 +911,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this BatchOrder. # noqa: E501 - Fee currency unit # noqa: E501 + Fee currency unit. # noqa: E501 :return: The fee_currency of this BatchOrder. # noqa: E501 :rtype: str @@ -922,7 +922,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this BatchOrder. - Fee currency unit # noqa: E501 + Fee currency unit. # noqa: E501 :param fee_currency: The fee_currency of this BatchOrder. # noqa: E501 :type: str @@ -934,7 +934,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this BatchOrder. # noqa: E501 - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :return: The point_fee of this BatchOrder. # noqa: E501 :rtype: str @@ -945,7 +945,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this BatchOrder. - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :param point_fee: The point_fee of this BatchOrder. # noqa: E501 :type: str @@ -957,7 +957,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this BatchOrder. # noqa: E501 - GT used to deduct fee # noqa: E501 + GT used to deduct fee. # noqa: E501 :return: The gt_fee of this BatchOrder. # noqa: E501 :rtype: str @@ -968,7 +968,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this BatchOrder. - GT used to deduct fee # noqa: E501 + GT used to deduct fee. # noqa: E501 :param gt_fee: The gt_fee of this BatchOrder. # noqa: E501 :type: str @@ -980,7 +980,7 @@ def gt_fee(self, gt_fee): def gt_discount(self): """Gets the gt_discount of this BatchOrder. # noqa: E501 - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :return: The gt_discount of this BatchOrder. # noqa: E501 :rtype: bool @@ -991,7 +991,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this BatchOrder. - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :param gt_discount: The gt_discount of this BatchOrder. # noqa: E501 :type: bool @@ -1003,7 +1003,7 @@ def gt_discount(self, gt_discount): def rebated_fee(self): """Gets the rebated_fee of this BatchOrder. # noqa: E501 - Rebated fee # noqa: E501 + Rebated fee. # noqa: E501 :return: The rebated_fee of this BatchOrder. # noqa: E501 :rtype: str @@ -1014,7 +1014,7 @@ def rebated_fee(self): def rebated_fee(self, rebated_fee): """Sets the rebated_fee of this BatchOrder. - Rebated fee # noqa: E501 + Rebated fee. # noqa: E501 :param rebated_fee: The rebated_fee of this BatchOrder. # noqa: E501 :type: str @@ -1026,7 +1026,7 @@ def rebated_fee(self, rebated_fee): def rebated_fee_currency(self): """Gets the rebated_fee_currency of this BatchOrder. # noqa: E501 - Rebated fee currency unit # noqa: E501 + Rebated fee currency unit. # noqa: E501 :return: The rebated_fee_currency of this BatchOrder. # noqa: E501 :rtype: str @@ -1037,7 +1037,7 @@ def rebated_fee_currency(self): def rebated_fee_currency(self, rebated_fee_currency): """Sets the rebated_fee_currency of this BatchOrder. - Rebated fee currency unit # noqa: E501 + Rebated fee currency unit. # noqa: E501 :param rebated_fee_currency: The rebated_fee_currency of this BatchOrder. # noqa: E501 :type: str @@ -1072,7 +1072,7 @@ def stp_id(self, stp_id): def stp_act(self): """Gets the stp_act of this BatchOrder. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this BatchOrder. # noqa: E501 :rtype: str @@ -1083,7 +1083,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this BatchOrder. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this BatchOrder. # noqa: E501 :type: str diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py index bcbe4a1..8de8eeb 100644 --- a/gate_api/models/borrow_currency_info.py +++ b/gate_api/models/borrow_currency_info.py @@ -77,7 +77,7 @@ def __init__(self, currency=None, index_price=None, left_repay_principal=None, l def currency(self): """Gets the currency of this BorrowCurrencyInfo. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this BorrowCurrencyInfo. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this BorrowCurrencyInfo. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this BorrowCurrencyInfo. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def index_price(self, index_price): def left_repay_principal(self): """Gets the left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 - outstanding principal # noqa: E501 + outstanding principal. # noqa: E501 :return: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def left_repay_principal(self): def left_repay_principal(self, left_repay_principal): """Sets the left_repay_principal of this BorrowCurrencyInfo. - outstanding principal # noqa: E501 + outstanding principal. # noqa: E501 :param left_repay_principal: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def left_repay_principal(self, left_repay_principal): def left_repay_interest(self): """Gets the left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 - outstanding interest # noqa: E501 + outstanding interest. # noqa: E501 :return: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def left_repay_interest(self): def left_repay_interest(self, left_repay_interest): """Sets the left_repay_interest of this BorrowCurrencyInfo. - outstanding interest # noqa: E501 + outstanding interest. # noqa: E501 :param left_repay_interest: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def left_repay_interest(self, left_repay_interest): def left_repay_usdt(self): """Gets the left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 - Value of left total repayments amount in USDT # noqa: E501 + Value of left total repayments amount in USDT. # noqa: E501 :return: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def left_repay_usdt(self): def left_repay_usdt(self, left_repay_usdt): """Sets the left_repay_usdt of this BorrowCurrencyInfo. - Value of left total repayments amount in USDT # noqa: E501 + Value of left total repayments amount in USDT. # noqa: E501 :param left_repay_usdt: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 :type: str diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py index 1a400d3..db81209 100644 --- a/gate_api/models/broker_commission.py +++ b/gate_api/models/broker_commission.py @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this BrokerCommission. # noqa: E501 - Total # noqa: E501 + Total. # noqa: E501 :return: The total of this BrokerCommission. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this BrokerCommission. - Total # noqa: E501 + Total. # noqa: E501 :param total: The total of this BrokerCommission. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this BrokerCommission. # noqa: E501 - List of comission history # noqa: E501 + List of comission history. # noqa: E501 :return: The list of this BrokerCommission. # noqa: E501 :rtype: list[BrokerCommission1] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this BrokerCommission. - List of comission history # noqa: E501 + List of comission history. # noqa: E501 :param list: The list of this BrokerCommission. # noqa: E501 :type: list[BrokerCommission1] diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py index c5649e1..88a08f3 100644 --- a/gate_api/models/broker_commission1.py +++ b/gate_api/models/broker_commission1.py @@ -42,7 +42,8 @@ class BrokerCommission1(object): 'rebate_fee': 'str', 'source': 'str', 'currency_pair': 'str', - 'sub_broker_info': 'BrokerCommissionSubBrokerInfo' + 'sub_broker_info': 'BrokerCommissionSubBrokerInfo', + 'alpha_contract_addr': 'str' } attribute_map = { @@ -55,11 +56,12 @@ class BrokerCommission1(object): 'rebate_fee': 'rebate_fee', 'source': 'source', 'currency_pair': 'currency_pair', - 'sub_broker_info': 'sub_broker_info' + 'sub_broker_info': 'sub_broker_info', + 'alpha_contract_addr': 'alpha_contract_addr' } - def __init__(self, commission_time=None, user_id=None, group_name=None, amount=None, fee=None, fee_asset=None, rebate_fee=None, source=None, currency_pair=None, sub_broker_info=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, Configuration) -> None + def __init__(self, commission_time=None, user_id=None, group_name=None, amount=None, fee=None, fee_asset=None, rebate_fee=None, source=None, currency_pair=None, sub_broker_info=None, alpha_contract_addr=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, str, Configuration) -> None """BrokerCommission1 - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -75,6 +77,7 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, amount=N self._source = None self._currency_pair = None self._sub_broker_info = None + self._alpha_contract_addr = None self.discriminator = None if commission_time is not None: @@ -97,12 +100,14 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, amount=N self.currency_pair = currency_pair if sub_broker_info is not None: self.sub_broker_info = sub_broker_info + if alpha_contract_addr is not None: + self.alpha_contract_addr = alpha_contract_addr @property def commission_time(self): """Gets the commission_time of this BrokerCommission1. # noqa: E501 - Commission Time. (unix timestamp) # noqa: E501 + Commission Time. (unix timestamp). # noqa: E501 :return: The commission_time of this BrokerCommission1. # noqa: E501 :rtype: int @@ -113,7 +118,7 @@ def commission_time(self): def commission_time(self, commission_time): """Sets the commission_time of this BrokerCommission1. - Commission Time. (unix timestamp) # noqa: E501 + Commission Time. (unix timestamp). # noqa: E501 :param commission_time: The commission_time of this BrokerCommission1. # noqa: E501 :type: int @@ -125,7 +130,7 @@ def commission_time(self, commission_time): def user_id(self): """Gets the user_id of this BrokerCommission1. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this BrokerCommission1. # noqa: E501 :rtype: int @@ -136,7 +141,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this BrokerCommission1. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this BrokerCommission1. # noqa: E501 :type: int @@ -148,7 +153,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this BrokerCommission1. # noqa: E501 - Group name # noqa: E501 + Group name. # noqa: E501 :return: The group_name of this BrokerCommission1. # noqa: E501 :rtype: str @@ -159,7 +164,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this BrokerCommission1. - Group name # noqa: E501 + Group name. # noqa: E501 :param group_name: The group_name of this BrokerCommission1. # noqa: E501 :type: str @@ -171,7 +176,7 @@ def group_name(self, group_name): def amount(self): """Gets the amount of this BrokerCommission1. # noqa: E501 - The amount of commission rebates # noqa: E501 + The amount of commission rebates. # noqa: E501 :return: The amount of this BrokerCommission1. # noqa: E501 :rtype: str @@ -182,7 +187,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BrokerCommission1. - The amount of commission rebates # noqa: E501 + The amount of commission rebates. # noqa: E501 :param amount: The amount of this BrokerCommission1. # noqa: E501 :type: str @@ -194,7 +199,7 @@ def amount(self, amount): def fee(self): """Gets the fee of this BrokerCommission1. # noqa: E501 - Fee # noqa: E501 + Fee. # noqa: E501 :return: The fee of this BrokerCommission1. # noqa: E501 :rtype: str @@ -205,7 +210,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this BrokerCommission1. - Fee # noqa: E501 + Fee. # noqa: E501 :param fee: The fee of this BrokerCommission1. # noqa: E501 :type: str @@ -217,7 +222,7 @@ def fee(self, fee): def fee_asset(self): """Gets the fee_asset of this BrokerCommission1. # noqa: E501 - Fee currency # noqa: E501 + Fee currency. # noqa: E501 :return: The fee_asset of this BrokerCommission1. # noqa: E501 :rtype: str @@ -228,7 +233,7 @@ def fee_asset(self): def fee_asset(self, fee_asset): """Sets the fee_asset of this BrokerCommission1. - Fee currency # noqa: E501 + Fee currency. # noqa: E501 :param fee_asset: The fee_asset of this BrokerCommission1. # noqa: E501 :type: str @@ -240,7 +245,7 @@ def fee_asset(self, fee_asset): def rebate_fee(self): """Gets the rebate_fee of this BrokerCommission1. # noqa: E501 - The income from rebates, converted to USDT # noqa: E501 + The income from rebates, converted to USDT. # noqa: E501 :return: The rebate_fee of this BrokerCommission1. # noqa: E501 :rtype: str @@ -251,7 +256,7 @@ def rebate_fee(self): def rebate_fee(self, rebate_fee): """Sets the rebate_fee of this BrokerCommission1. - The income from rebates, converted to USDT # noqa: E501 + The income from rebates, converted to USDT. # noqa: E501 :param rebate_fee: The rebate_fee of this BrokerCommission1. # noqa: E501 :type: str @@ -263,7 +268,7 @@ def rebate_fee(self, rebate_fee): def source(self): """Gets the source of this BrokerCommission1. # noqa: E501 - Rebate Type: Spot、Futures、Options # noqa: E501 + Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 :return: The source of this BrokerCommission1. # noqa: E501 :rtype: str @@ -274,7 +279,7 @@ def source(self): def source(self, source): """Sets the source of this BrokerCommission1. - Rebate Type: Spot、Futures、Options # noqa: E501 + Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 :param source: The source of this BrokerCommission1. # noqa: E501 :type: str @@ -286,7 +291,7 @@ def source(self, source): def currency_pair(self): """Gets the currency_pair of this BrokerCommission1. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this BrokerCommission1. # noqa: E501 :rtype: str @@ -297,7 +302,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BrokerCommission1. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this BrokerCommission1. # noqa: E501 :type: str @@ -326,6 +331,29 @@ def sub_broker_info(self, sub_broker_info): self._sub_broker_info = sub_broker_info + @property + def alpha_contract_addr(self): + """Gets the alpha_contract_addr of this BrokerCommission1. # noqa: E501 + + Alpha token address # noqa: E501 + + :return: The alpha_contract_addr of this BrokerCommission1. # noqa: E501 + :rtype: str + """ + return self._alpha_contract_addr + + @alpha_contract_addr.setter + def alpha_contract_addr(self, alpha_contract_addr): + """Sets the alpha_contract_addr of this BrokerCommission1. + + Alpha token address # noqa: E501 + + :param alpha_contract_addr: The alpha_contract_addr of this BrokerCommission1. # noqa: E501 + :type: str + """ + + self._alpha_contract_addr = alpha_contract_addr + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/broker_commission_sub_broker_info.py b/gate_api/models/broker_commission_sub_broker_info.py index 8227a43..f945318 100644 --- a/gate_api/models/broker_commission_sub_broker_info.py +++ b/gate_api/models/broker_commission_sub_broker_info.py @@ -72,7 +72,7 @@ def __init__(self, user_id=None, original_commission_rate=None, relative_commiss def user_id(self): """Gets the user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker user ID # noqa: E501 + The sub broker user ID. # noqa: E501 :return: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: int @@ -83,7 +83,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this BrokerCommissionSubBrokerInfo. - The sub broker user ID # noqa: E501 + The sub broker user ID. # noqa: E501 :param user_id: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: int @@ -95,7 +95,7 @@ def user_id(self, user_id): def original_commission_rate(self): """Gets the original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker original commission rate # noqa: E501 + The sub broker original commission rate. # noqa: E501 :return: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def original_commission_rate(self): def original_commission_rate(self, original_commission_rate): """Sets the original_commission_rate of this BrokerCommissionSubBrokerInfo. - The sub broker original commission rate # noqa: E501 + The sub broker original commission rate. # noqa: E501 :param original_commission_rate: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def original_commission_rate(self, original_commission_rate): def relative_commission_rate(self): """Gets the relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker relative commission rate # noqa: E501 + The sub broker relative commission rate. # noqa: E501 :return: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def relative_commission_rate(self): def relative_commission_rate(self, relative_commission_rate): """Sets the relative_commission_rate of this BrokerCommissionSubBrokerInfo. - The sub broker relative commission rate # noqa: E501 + The sub broker relative commission rate. # noqa: E501 :param relative_commission_rate: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def relative_commission_rate(self, relative_commission_rate): def commission_rate(self): """Gets the commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker actual commission rate # noqa: E501 + The sub broker actual commission rate. # noqa: E501 :return: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def commission_rate(self): def commission_rate(self, commission_rate): """Sets the commission_rate of this BrokerCommissionSubBrokerInfo. - The sub broker actual commission rate # noqa: E501 + The sub broker actual commission rate. # noqa: E501 :param commission_rate: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: str diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py index 5fbac5c..fb67ecd 100644 --- a/gate_api/models/broker_transaction.py +++ b/gate_api/models/broker_transaction.py @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this BrokerTransaction. # noqa: E501 - Total # noqa: E501 + Total. # noqa: E501 :return: The total of this BrokerTransaction. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this BrokerTransaction. - Total # noqa: E501 + Total. # noqa: E501 :param total: The total of this BrokerTransaction. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this BrokerTransaction. # noqa: E501 - List of transaction history # noqa: E501 + List of transaction history. # noqa: E501 :return: The list of this BrokerTransaction. # noqa: E501 :rtype: list[BrokerTransaction1] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this BrokerTransaction. - List of transaction history # noqa: E501 + List of transaction history. # noqa: E501 :param list: The list of this BrokerTransaction. # noqa: E501 :type: list[BrokerTransaction1] diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py index 0df44f3..fdbf97b 100644 --- a/gate_api/models/broker_transaction1.py +++ b/gate_api/models/broker_transaction1.py @@ -41,7 +41,8 @@ class BrokerTransaction1(object): 'amount': 'str', 'fee_asset': 'str', 'source': 'str', - 'sub_broker_info': 'BrokerCommissionSubBrokerInfo' + 'sub_broker_info': 'BrokerCommissionSubBrokerInfo', + 'alpha_contract_addr': 'str' } attribute_map = { @@ -53,11 +54,12 @@ class BrokerTransaction1(object): 'amount': 'amount', 'fee_asset': 'fee_asset', 'source': 'source', - 'sub_broker_info': 'sub_broker_info' + 'sub_broker_info': 'sub_broker_info', + 'alpha_contract_addr': 'alpha_contract_addr' } - def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, currency_pair=None, amount=None, fee_asset=None, source=None, sub_broker_info=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, Configuration) -> None + def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=None, currency_pair=None, amount=None, fee_asset=None, source=None, sub_broker_info=None, alpha_contract_addr=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, str, str, str, str, str, str, BrokerCommissionSubBrokerInfo, str, Configuration) -> None """BrokerTransaction1 - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -72,6 +74,7 @@ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=Non self._fee_asset = None self._source = None self._sub_broker_info = None + self._alpha_contract_addr = None self.discriminator = None if transaction_time is not None: @@ -92,12 +95,14 @@ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=Non self.source = source if sub_broker_info is not None: self.sub_broker_info = sub_broker_info + if alpha_contract_addr is not None: + self.alpha_contract_addr = alpha_contract_addr @property def transaction_time(self): """Gets the transaction_time of this BrokerTransaction1. # noqa: E501 - Transaction Time. (unix timestamp) # noqa: E501 + Transaction Time. (unix timestamp). # noqa: E501 :return: The transaction_time of this BrokerTransaction1. # noqa: E501 :rtype: int @@ -108,7 +113,7 @@ def transaction_time(self): def transaction_time(self, transaction_time): """Sets the transaction_time of this BrokerTransaction1. - Transaction Time. (unix timestamp) # noqa: E501 + Transaction Time. (unix timestamp). # noqa: E501 :param transaction_time: The transaction_time of this BrokerTransaction1. # noqa: E501 :type: int @@ -120,7 +125,7 @@ def transaction_time(self, transaction_time): def user_id(self): """Gets the user_id of this BrokerTransaction1. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this BrokerTransaction1. # noqa: E501 :rtype: int @@ -131,7 +136,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this BrokerTransaction1. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this BrokerTransaction1. # noqa: E501 :type: int @@ -143,7 +148,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this BrokerTransaction1. # noqa: E501 - Group name # noqa: E501 + Group name. # noqa: E501 :return: The group_name of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -154,7 +159,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this BrokerTransaction1. - Group name # noqa: E501 + Group name. # noqa: E501 :param group_name: The group_name of this BrokerTransaction1. # noqa: E501 :type: str @@ -166,7 +171,7 @@ def group_name(self, group_name): def fee(self): """Gets the fee of this BrokerTransaction1. # noqa: E501 - fee (usdt) # noqa: E501 + fee (usdt). # noqa: E501 :return: The fee of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -177,7 +182,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this BrokerTransaction1. - fee (usdt) # noqa: E501 + fee (usdt). # noqa: E501 :param fee: The fee of this BrokerTransaction1. # noqa: E501 :type: str @@ -189,7 +194,7 @@ def fee(self, fee): def currency_pair(self): """Gets the currency_pair of this BrokerTransaction1. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -200,7 +205,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BrokerTransaction1. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this BrokerTransaction1. # noqa: E501 :type: str @@ -212,7 +217,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this BrokerTransaction1. # noqa: E501 - Commission Amount # noqa: E501 + Commission Amount. # noqa: E501 :return: The amount of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -223,7 +228,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BrokerTransaction1. - Commission Amount # noqa: E501 + Commission Amount. # noqa: E501 :param amount: The amount of this BrokerTransaction1. # noqa: E501 :type: str @@ -235,7 +240,7 @@ def amount(self, amount): def fee_asset(self): """Gets the fee_asset of this BrokerTransaction1. # noqa: E501 - Fee currency # noqa: E501 + Fee currency. # noqa: E501 :return: The fee_asset of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -246,7 +251,7 @@ def fee_asset(self): def fee_asset(self, fee_asset): """Sets the fee_asset of this BrokerTransaction1. - Fee currency # noqa: E501 + Fee currency. # noqa: E501 :param fee_asset: The fee_asset of this BrokerTransaction1. # noqa: E501 :type: str @@ -258,7 +263,7 @@ def fee_asset(self, fee_asset): def source(self): """Gets the source of this BrokerTransaction1. # noqa: E501 - Rebate Type: Spot、Futures、Options # noqa: E501 + Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 :return: The source of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -269,7 +274,7 @@ def source(self): def source(self, source): """Sets the source of this BrokerTransaction1. - Rebate Type: Spot、Futures、Options # noqa: E501 + Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 :param source: The source of this BrokerTransaction1. # noqa: E501 :type: str @@ -298,6 +303,29 @@ def sub_broker_info(self, sub_broker_info): self._sub_broker_info = sub_broker_info + @property + def alpha_contract_addr(self): + """Gets the alpha_contract_addr of this BrokerTransaction1. # noqa: E501 + + Alpha token address # noqa: E501 + + :return: The alpha_contract_addr of this BrokerTransaction1. # noqa: E501 + :rtype: str + """ + return self._alpha_contract_addr + + @alpha_contract_addr.setter + def alpha_contract_addr(self, alpha_contract_addr): + """Sets the alpha_contract_addr of this BrokerTransaction1. + + Alpha token address # noqa: E501 + + :param alpha_contract_addr: The alpha_contract_addr of this BrokerTransaction1. # noqa: E501 + :type: str + """ + + self._alpha_contract_addr = alpha_contract_addr + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py index ed26ad3..2894fe2 100644 --- a/gate_api/models/cancel_batch_order.py +++ b/gate_api/models/cancel_batch_order.py @@ -70,7 +70,7 @@ def __init__(self, currency_pair=None, id=None, account=None, action_mode=None, def currency_pair(self): """Gets the currency_pair of this CancelBatchOrder. # noqa: E501 - Order currency pair # noqa: E501 + Order currency pair. # noqa: E501 :return: The currency_pair of this CancelBatchOrder. # noqa: E501 :rtype: str @@ -81,7 +81,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CancelBatchOrder. - Order currency pair # noqa: E501 + Order currency pair. # noqa: E501 :param currency_pair: The currency_pair of this CancelBatchOrder. # noqa: E501 :type: str diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py index 9f54d3b..1017b65 100644 --- a/gate_api/models/cancel_order_result.py +++ b/gate_api/models/cancel_order_result.py @@ -87,7 +87,7 @@ def __init__(self, currency_pair=None, id=None, text=None, succeeded=None, label def currency_pair(self): """Gets the currency_pair of this CancelOrderResult. # noqa: E501 - Order currency pair # noqa: E501 + Order currency pair. # noqa: E501 :return: The currency_pair of this CancelOrderResult. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CancelOrderResult. - Order currency pair # noqa: E501 + Order currency pair. # noqa: E501 :param currency_pair: The currency_pair of this CancelOrderResult. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def currency_pair(self, currency_pair): def id(self): """Gets the id of this CancelOrderResult. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this CancelOrderResult. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def id(self): def id(self, id): """Sets the id of this CancelOrderResult. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this CancelOrderResult. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def id(self, id): def text(self): """Gets the text of this CancelOrderResult. # noqa: E501 - Custom order information # noqa: E501 + Custom order information. # noqa: E501 :return: The text of this CancelOrderResult. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def text(self): def text(self, text): """Sets the text of this CancelOrderResult. - Custom order information # noqa: E501 + Custom order information. # noqa: E501 :param text: The text of this CancelOrderResult. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def text(self, text): def succeeded(self): """Gets the succeeded of this CancelOrderResult. # noqa: E501 - Whether cancellation succeeded # noqa: E501 + Whether cancellation succeeded. # noqa: E501 :return: The succeeded of this CancelOrderResult. # noqa: E501 :rtype: bool @@ -167,7 +167,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this CancelOrderResult. - Whether cancellation succeeded # noqa: E501 + Whether cancellation succeeded. # noqa: E501 :param succeeded: The succeeded of this CancelOrderResult. # noqa: E501 :type: bool @@ -179,7 +179,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this CancelOrderResult. # noqa: E501 - Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 + Error label when failed to cancel the order; emtpy if succeeded. # noqa: E501 :return: The label of this CancelOrderResult. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def label(self): def label(self, label): """Sets the label of this CancelOrderResult. - Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 + Error label when failed to cancel the order; emtpy if succeeded. # noqa: E501 :param label: The label of this CancelOrderResult. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def label(self, label): def message(self): """Gets the message of this CancelOrderResult. # noqa: E501 - Error message when failed to cancel the order; empty if succeeded # noqa: E501 + Error message when failed to cancel the order; empty if succeeded. # noqa: E501 :return: The message of this CancelOrderResult. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def message(self): def message(self, message): """Sets the message of this CancelOrderResult. - Error message when failed to cancel the order; empty if succeeded # noqa: E501 + Error message when failed to cancel the order; empty if succeeded. # noqa: E501 :param message: The message of this CancelOrderResult. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def message(self, message): def account(self): """Gets the account of this CancelOrderResult. # noqa: E501 - Default is empty (deprecated) # noqa: E501 + Default is empty (deprecated). # noqa: E501 :return: The account of this CancelOrderResult. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def account(self): def account(self, account): """Sets the account of this CancelOrderResult. - Default is empty (deprecated) # noqa: E501 + Default is empty (deprecated). # noqa: E501 :param account: The account of this CancelOrderResult. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py index 82b2560..b518256 100644 --- a/gate_api/models/collateral_adjust.py +++ b/gate_api/models/collateral_adjust.py @@ -65,7 +65,7 @@ def __init__(self, order_id=None, type=None, collaterals=None, local_vars_config def order_id(self): """Gets the order_id of this CollateralAdjust. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this CollateralAdjust. # noqa: E501 :rtype: int @@ -76,7 +76,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralAdjust. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this CollateralAdjust. # noqa: E501 :type: int @@ -115,7 +115,7 @@ def type(self, type): def collaterals(self): """Gets the collaterals of this CollateralAdjust. # noqa: E501 - Collateral Currency List # noqa: E501 + Collateral Currency List. # noqa: E501 :return: The collaterals of this CollateralAdjust. # noqa: E501 :rtype: list[CollateralCurrency] @@ -126,7 +126,7 @@ def collaterals(self): def collaterals(self, collaterals): """Sets the collaterals of this CollateralAdjust. - Collateral Currency List # noqa: E501 + Collateral Currency List. # noqa: E501 :param collaterals: The collaterals of this CollateralAdjust. # noqa: E501 :type: list[CollateralCurrency] diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py index a09b795..ba3cdb6 100644 --- a/gate_api/models/collateral_adjust_res.py +++ b/gate_api/models/collateral_adjust_res.py @@ -62,7 +62,7 @@ def __init__(self, order_id=None, collateral_currencies=None, local_vars_configu def order_id(self): """Gets the order_id of this CollateralAdjustRes. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this CollateralAdjustRes. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralAdjustRes. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this CollateralAdjustRes. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def order_id(self, order_id): def collateral_currencies(self): """Gets the collateral_currencies of this CollateralAdjustRes. # noqa: E501 - Collateral Currency Information # noqa: E501 + Collateral Currency Information. # noqa: E501 :return: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 :rtype: list[CollateralCurrencyRes] @@ -96,7 +96,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this CollateralAdjustRes. - Collateral Currency Information # noqa: E501 + Collateral Currency Information. # noqa: E501 :param collateral_currencies: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 :type: list[CollateralCurrencyRes] diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py index 41da376..66e6d3e 100644 --- a/gate_api/models/collateral_align.py +++ b/gate_api/models/collateral_align.py @@ -68,7 +68,7 @@ def __init__(self, order_id=None, collateral_currency=None, collateral_amount=No def order_id(self): """Gets the order_id of this CollateralAlign. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this CollateralAlign. # noqa: E501 :rtype: int @@ -79,7 +79,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralAlign. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this CollateralAlign. # noqa: E501 :type: int @@ -93,7 +93,7 @@ def order_id(self, order_id): def collateral_currency(self): """Gets the collateral_currency of this CollateralAlign. # noqa: E501 - Collateral # noqa: E501 + Collateral. # noqa: E501 :return: The collateral_currency of this CollateralAlign. # noqa: E501 :rtype: str @@ -104,7 +104,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralAlign. - Collateral # noqa: E501 + Collateral. # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralAlign. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def collateral_currency(self, collateral_currency): def collateral_amount(self): """Gets the collateral_amount of this CollateralAlign. # noqa: E501 - Collateral amount # noqa: E501 + Collateral amount. # noqa: E501 :return: The collateral_amount of this CollateralAlign. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this CollateralAlign. - Collateral amount # noqa: E501 + Collateral amount. # noqa: E501 :param collateral_amount: The collateral_amount of this CollateralAlign. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py index 8058f53..860ad54 100644 --- a/gate_api/models/collateral_currency.py +++ b/gate_api/models/collateral_currency.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this CollateralCurrency. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this CollateralCurrency. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrency. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this CollateralCurrency. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this CollateralCurrency. # noqa: E501 - Size # noqa: E501 + Size. # noqa: E501 :return: The amount of this CollateralCurrency. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CollateralCurrency. - Size # noqa: E501 + Size. # noqa: E501 :param amount: The amount of this CollateralCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py index 7ab7829..da217c4 100644 --- a/gate_api/models/collateral_currency_info.py +++ b/gate_api/models/collateral_currency_info.py @@ -72,7 +72,7 @@ def __init__(self, currency=None, index_price=None, left_collateral=None, left_c def currency(self): """Gets the currency of this CollateralCurrencyInfo. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrencyInfo. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this CollateralCurrencyInfo. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this CollateralCurrencyInfo. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this CollateralCurrencyInfo. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this CollateralCurrencyInfo. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def index_price(self, index_price): def left_collateral(self): """Gets the left_collateral of this CollateralCurrencyInfo. # noqa: E501 - Left Collateral Amount # noqa: E501 + Left Collateral Amount. # noqa: E501 :return: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def left_collateral(self): def left_collateral(self, left_collateral): """Sets the left_collateral of this CollateralCurrencyInfo. - Left Collateral Amount # noqa: E501 + Left Collateral Amount. # noqa: E501 :param left_collateral: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def left_collateral(self, left_collateral): def left_collateral_usdt(self): """Gets the left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 - Value of left collateral amount in USDT # noqa: E501 + Value of left collateral amount in USDT. # noqa: E501 :return: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def left_collateral_usdt(self): def left_collateral_usdt(self, left_collateral_usdt): """Sets the left_collateral_usdt of this CollateralCurrencyInfo. - Value of left collateral amount in USDT # noqa: E501 + Value of left collateral amount in USDT. # noqa: E501 :param left_collateral_usdt: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py index 26f9de1..754a599 100644 --- a/gate_api/models/collateral_currency_res.py +++ b/gate_api/models/collateral_currency_res.py @@ -77,7 +77,7 @@ def __init__(self, succeeded=None, label=None, message=None, currency=None, amou def succeeded(self): """Gets the succeeded of this CollateralCurrencyRes. # noqa: E501 - Update success status # noqa: E501 + Update success status. # noqa: E501 :return: The succeeded of this CollateralCurrencyRes. # noqa: E501 :rtype: bool @@ -88,7 +88,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this CollateralCurrencyRes. - Update success status # noqa: E501 + Update success status. # noqa: E501 :param succeeded: The succeeded of this CollateralCurrencyRes. # noqa: E501 :type: bool @@ -146,7 +146,7 @@ def message(self, message): def currency(self): """Gets the currency of this CollateralCurrencyRes. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this CollateralCurrencyRes. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrencyRes. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this CollateralCurrencyRes. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py index 49104ea..1512865 100644 --- a/gate_api/models/collateral_current_rate.py +++ b/gate_api/models/collateral_current_rate.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, current_rate=None, local_vars_configuration=No def currency(self): """Gets the currency of this CollateralCurrentRate. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this CollateralCurrentRate. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrentRate. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this CollateralCurrentRate. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def current_rate(self): """Gets the current_rate of this CollateralCurrentRate. # noqa: E501 - Currency current interest rate # noqa: E501 + Currency current interest rate. # noqa: E501 :return: The current_rate of this CollateralCurrentRate. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def current_rate(self): def current_rate(self, current_rate): """Sets the current_rate of this CollateralCurrentRate. - Currency current interest rate # noqa: E501 + Currency current interest rate. # noqa: E501 :param current_rate: The current_rate of this CollateralCurrentRate. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py index 4bf8eff..92be996 100644 --- a/gate_api/models/collateral_fix_rate.py +++ b/gate_api/models/collateral_fix_rate.py @@ -72,7 +72,7 @@ def __init__(self, currency=None, rate_7d=None, rate_30d=None, update_time=None, def currency(self): """Gets the currency of this CollateralFixRate. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this CollateralFixRate. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralFixRate. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this CollateralFixRate. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def rate_7d(self): """Gets the rate_7d of this CollateralFixRate. # noqa: E501 - Fixed interest rate for a lending period of 7 days # noqa: E501 + Fixed interest rate for a lending period of 7 days. # noqa: E501 :return: The rate_7d of this CollateralFixRate. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def rate_7d(self): def rate_7d(self, rate_7d): """Sets the rate_7d of this CollateralFixRate. - Fixed interest rate for a lending period of 7 days # noqa: E501 + Fixed interest rate for a lending period of 7 days. # noqa: E501 :param rate_7d: The rate_7d of this CollateralFixRate. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def rate_7d(self, rate_7d): def rate_30d(self): """Gets the rate_30d of this CollateralFixRate. # noqa: E501 - Fixed interest rate for a lending period of 30 days # noqa: E501 + Fixed interest rate for a lending period of 30 days. # noqa: E501 :return: The rate_30d of this CollateralFixRate. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def rate_30d(self): def rate_30d(self, rate_30d): """Sets the rate_30d of this CollateralFixRate. - Fixed interest rate for a lending period of 30 days # noqa: E501 + Fixed interest rate for a lending period of 30 days. # noqa: E501 :param rate_30d: The rate_30d of this CollateralFixRate. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def rate_30d(self, rate_30d): def update_time(self): """Gets the update_time of this CollateralFixRate. # noqa: E501 - Update time, timestamp, unit in seconds # noqa: E501 + Update time, timestamp, unit in seconds. # noqa: E501 :return: The update_time of this CollateralFixRate. # noqa: E501 :rtype: int @@ -152,7 +152,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this CollateralFixRate. - Update time, timestamp, unit in seconds # noqa: E501 + Update time, timestamp, unit in seconds. # noqa: E501 :param update_time: The update_time of this CollateralFixRate. # noqa: E501 :type: int diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py index 2c0809a..fb1c0f5 100644 --- a/gate_api/models/collateral_loan_currency.py +++ b/gate_api/models/collateral_loan_currency.py @@ -62,7 +62,7 @@ def __init__(self, loan_currency=None, collateral_currency=None, local_vars_conf def loan_currency(self): """Gets the loan_currency of this CollateralLoanCurrency. # noqa: E501 - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :return: The loan_currency of this CollateralLoanCurrency. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def loan_currency(self): def loan_currency(self, loan_currency): """Sets the loan_currency of this CollateralLoanCurrency. - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :param loan_currency: The loan_currency of this CollateralLoanCurrency. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def loan_currency(self, loan_currency): def collateral_currency(self): """Gets the collateral_currency of this CollateralLoanCurrency. # noqa: E501 - List of supported collateral currencies # noqa: E501 + List of supported collateral currencies. # noqa: E501 :return: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 :rtype: list[str] @@ -96,7 +96,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralLoanCurrency. - List of supported collateral currencies # noqa: E501 + List of supported collateral currencies. # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 :type: list[str] diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py index 2f115ee..c843fa2 100644 --- a/gate_api/models/collateral_ltv.py +++ b/gate_api/models/collateral_ltv.py @@ -67,7 +67,7 @@ def __init__(self, init_ltv=None, alert_ltv=None, liquidate_ltv=None, local_vars def init_ltv(self): """Gets the init_ltv of this CollateralLtv. # noqa: E501 - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :return: The init_ltv of this CollateralLtv. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this CollateralLtv. - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :param init_ltv: The init_ltv of this CollateralLtv. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def init_ltv(self, init_ltv): def alert_ltv(self): """Gets the alert_ltv of this CollateralLtv. # noqa: E501 - Warning collateralization ratio # noqa: E501 + Warning collateralization ratio. # noqa: E501 :return: The alert_ltv of this CollateralLtv. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def alert_ltv(self): def alert_ltv(self, alert_ltv): """Sets the alert_ltv of this CollateralLtv. - Warning collateralization ratio # noqa: E501 + Warning collateralization ratio. # noqa: E501 :param alert_ltv: The alert_ltv of this CollateralLtv. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def alert_ltv(self, alert_ltv): def liquidate_ltv(self): """Gets the liquidate_ltv of this CollateralLtv. # noqa: E501 - The liquidation collateralization rate # noqa: E501 + The liquidation collateralization rate. # noqa: E501 :return: The liquidate_ltv of this CollateralLtv. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def liquidate_ltv(self): def liquidate_ltv(self, liquidate_ltv): """Sets the liquidate_ltv of this CollateralLtv. - The liquidation collateralization rate # noqa: E501 + The liquidation collateralization rate. # noqa: E501 :param liquidate_ltv: The liquidate_ltv of this CollateralLtv. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py index 21db0e5..fe1271a 100644 --- a/gate_api/models/collateral_order.py +++ b/gate_api/models/collateral_order.py @@ -132,7 +132,7 @@ def __init__(self, order_id=None, collateral_currency=None, collateral_amount=No def order_id(self): """Gets the order_id of this CollateralOrder. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this CollateralOrder. # noqa: E501 :rtype: int @@ -143,7 +143,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralOrder. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this CollateralOrder. # noqa: E501 :type: int @@ -155,7 +155,7 @@ def order_id(self, order_id): def collateral_currency(self): """Gets the collateral_currency of this CollateralOrder. # noqa: E501 - Collateral # noqa: E501 + Collateral. # noqa: E501 :return: The collateral_currency of this CollateralOrder. # noqa: E501 :rtype: str @@ -166,7 +166,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralOrder. - Collateral # noqa: E501 + Collateral. # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralOrder. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def collateral_currency(self, collateral_currency): def collateral_amount(self): """Gets the collateral_amount of this CollateralOrder. # noqa: E501 - Collateral amount # noqa: E501 + Collateral amount. # noqa: E501 :return: The collateral_amount of this CollateralOrder. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this CollateralOrder. - Collateral amount # noqa: E501 + Collateral amount. # noqa: E501 :param collateral_amount: The collateral_amount of this CollateralOrder. # noqa: E501 :type: str @@ -201,7 +201,7 @@ def collateral_amount(self, collateral_amount): def borrow_currency(self): """Gets the borrow_currency of this CollateralOrder. # noqa: E501 - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :return: The borrow_currency of this CollateralOrder. # noqa: E501 :rtype: str @@ -212,7 +212,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CollateralOrder. - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :param borrow_currency: The borrow_currency of this CollateralOrder. # noqa: E501 :type: str @@ -224,7 +224,7 @@ def borrow_currency(self, borrow_currency): def borrow_amount(self): """Gets the borrow_amount of this CollateralOrder. # noqa: E501 - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :return: The borrow_amount of this CollateralOrder. # noqa: E501 :rtype: str @@ -235,7 +235,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CollateralOrder. - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :param borrow_amount: The borrow_amount of this CollateralOrder. # noqa: E501 :type: str @@ -247,7 +247,7 @@ def borrow_amount(self, borrow_amount): def repaid_amount(self): """Gets the repaid_amount of this CollateralOrder. # noqa: E501 - Repaid amount # noqa: E501 + Repaid amount. # noqa: E501 :return: The repaid_amount of this CollateralOrder. # noqa: E501 :rtype: str @@ -258,7 +258,7 @@ def repaid_amount(self): def repaid_amount(self, repaid_amount): """Sets the repaid_amount of this CollateralOrder. - Repaid amount # noqa: E501 + Repaid amount. # noqa: E501 :param repaid_amount: The repaid_amount of this CollateralOrder. # noqa: E501 :type: str @@ -270,7 +270,7 @@ def repaid_amount(self, repaid_amount): def repaid_principal(self): """Gets the repaid_principal of this CollateralOrder. # noqa: E501 - Repaid principal # noqa: E501 + Repaid principal. # noqa: E501 :return: The repaid_principal of this CollateralOrder. # noqa: E501 :rtype: str @@ -281,7 +281,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this CollateralOrder. - Repaid principal # noqa: E501 + Repaid principal. # noqa: E501 :param repaid_principal: The repaid_principal of this CollateralOrder. # noqa: E501 :type: str @@ -293,7 +293,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this CollateralOrder. # noqa: E501 - Repaid interest # noqa: E501 + Repaid interest. # noqa: E501 :return: The repaid_interest of this CollateralOrder. # noqa: E501 :rtype: str @@ -304,7 +304,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this CollateralOrder. - Repaid interest # noqa: E501 + Repaid interest. # noqa: E501 :param repaid_interest: The repaid_interest of this CollateralOrder. # noqa: E501 :type: str @@ -316,7 +316,7 @@ def repaid_interest(self, repaid_interest): def init_ltv(self): """Gets the init_ltv of this CollateralOrder. # noqa: E501 - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :return: The init_ltv of this CollateralOrder. # noqa: E501 :rtype: str @@ -327,7 +327,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this CollateralOrder. - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :param init_ltv: The init_ltv of this CollateralOrder. # noqa: E501 :type: str @@ -339,7 +339,7 @@ def init_ltv(self, init_ltv): def current_ltv(self): """Gets the current_ltv of this CollateralOrder. # noqa: E501 - The current collateralization rate # noqa: E501 + The current collateralization rate. # noqa: E501 :return: The current_ltv of this CollateralOrder. # noqa: E501 :rtype: str @@ -350,7 +350,7 @@ def current_ltv(self): def current_ltv(self, current_ltv): """Sets the current_ltv of this CollateralOrder. - The current collateralization rate # noqa: E501 + The current collateralization rate. # noqa: E501 :param current_ltv: The current_ltv of this CollateralOrder. # noqa: E501 :type: str @@ -362,7 +362,7 @@ def current_ltv(self, current_ltv): def liquidate_ltv(self): """Gets the liquidate_ltv of this CollateralOrder. # noqa: E501 - The liquidation collateralization rate # noqa: E501 + The liquidation collateralization rate. # noqa: E501 :return: The liquidate_ltv of this CollateralOrder. # noqa: E501 :rtype: str @@ -373,7 +373,7 @@ def liquidate_ltv(self): def liquidate_ltv(self, liquidate_ltv): """Sets the liquidate_ltv of this CollateralOrder. - The liquidation collateralization rate # noqa: E501 + The liquidation collateralization rate. # noqa: E501 :param liquidate_ltv: The liquidate_ltv of this CollateralOrder. # noqa: E501 :type: str @@ -408,7 +408,7 @@ def status(self, status): def borrow_time(self): """Gets the borrow_time of this CollateralOrder. # noqa: E501 - Borrowing time, timestamp in seconds # noqa: E501 + Borrowing time, timestamp in seconds. # noqa: E501 :return: The borrow_time of this CollateralOrder. # noqa: E501 :rtype: int @@ -419,7 +419,7 @@ def borrow_time(self): def borrow_time(self, borrow_time): """Sets the borrow_time of this CollateralOrder. - Borrowing time, timestamp in seconds # noqa: E501 + Borrowing time, timestamp in seconds. # noqa: E501 :param borrow_time: The borrow_time of this CollateralOrder. # noqa: E501 :type: int @@ -454,7 +454,7 @@ def left_repay_total(self, left_repay_total): def left_repay_principal(self): """Gets the left_repay_principal of this CollateralOrder. # noqa: E501 - outstanding principal # noqa: E501 + outstanding principal. # noqa: E501 :return: The left_repay_principal of this CollateralOrder. # noqa: E501 :rtype: str @@ -465,7 +465,7 @@ def left_repay_principal(self): def left_repay_principal(self, left_repay_principal): """Sets the left_repay_principal of this CollateralOrder. - outstanding principal # noqa: E501 + outstanding principal. # noqa: E501 :param left_repay_principal: The left_repay_principal of this CollateralOrder. # noqa: E501 :type: str @@ -477,7 +477,7 @@ def left_repay_principal(self, left_repay_principal): def left_repay_interest(self): """Gets the left_repay_interest of this CollateralOrder. # noqa: E501 - outstanding interest # noqa: E501 + outstanding interest. # noqa: E501 :return: The left_repay_interest of this CollateralOrder. # noqa: E501 :rtype: str @@ -488,7 +488,7 @@ def left_repay_interest(self): def left_repay_interest(self, left_repay_interest): """Sets the left_repay_interest of this CollateralOrder. - outstanding interest # noqa: E501 + outstanding interest. # noqa: E501 :param left_repay_interest: The left_repay_interest of this CollateralOrder. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py index a2fed8c..24074c2 100644 --- a/gate_api/models/collateral_record.py +++ b/gate_api/models/collateral_record.py @@ -102,7 +102,7 @@ def __init__(self, order_id=None, record_id=None, borrow_currency=None, borrow_a def order_id(self): """Gets the order_id of this CollateralRecord. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this CollateralRecord. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralRecord. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this CollateralRecord. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this CollateralRecord. # noqa: E501 - Collateral record ID # noqa: E501 + Collateral record ID. # noqa: E501 :return: The record_id of this CollateralRecord. # noqa: E501 :rtype: int @@ -136,7 +136,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this CollateralRecord. - Collateral record ID # noqa: E501 + Collateral record ID. # noqa: E501 :param record_id: The record_id of this CollateralRecord. # noqa: E501 :type: int @@ -148,7 +148,7 @@ def record_id(self, record_id): def borrow_currency(self): """Gets the borrow_currency of this CollateralRecord. # noqa: E501 - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :return: The borrow_currency of this CollateralRecord. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CollateralRecord. - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :param borrow_currency: The borrow_currency of this CollateralRecord. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def borrow_currency(self, borrow_currency): def borrow_amount(self): """Gets the borrow_amount of this CollateralRecord. # noqa: E501 - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :return: The borrow_amount of this CollateralRecord. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CollateralRecord. - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :param borrow_amount: The borrow_amount of this CollateralRecord. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def borrow_amount(self, borrow_amount): def collateral_currency(self): """Gets the collateral_currency of this CollateralRecord. # noqa: E501 - Collateral # noqa: E501 + Collateral. # noqa: E501 :return: The collateral_currency of this CollateralRecord. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralRecord. - Collateral # noqa: E501 + Collateral. # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralRecord. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def collateral_currency(self, collateral_currency): def before_collateral(self): """Gets the before_collateral of this CollateralRecord. # noqa: E501 - The collateral amount before adjustment # noqa: E501 + The collateral amount before adjustment. # noqa: E501 :return: The before_collateral of this CollateralRecord. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def before_collateral(self): def before_collateral(self, before_collateral): """Sets the before_collateral of this CollateralRecord. - The collateral amount before adjustment # noqa: E501 + The collateral amount before adjustment. # noqa: E501 :param before_collateral: The before_collateral of this CollateralRecord. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def before_collateral(self, before_collateral): def after_collateral(self): """Gets the after_collateral of this CollateralRecord. # noqa: E501 - The collateral amount after adjustment # noqa: E501 + The collateral amount after adjustment. # noqa: E501 :return: The after_collateral of this CollateralRecord. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def after_collateral(self): def after_collateral(self, after_collateral): """Sets the after_collateral of this CollateralRecord. - The collateral amount after adjustment # noqa: E501 + The collateral amount after adjustment. # noqa: E501 :param after_collateral: The after_collateral of this CollateralRecord. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def after_collateral(self, after_collateral): def before_ltv(self): """Gets the before_ltv of this CollateralRecord. # noqa: E501 - The collateral ratio before adjustment # noqa: E501 + The collateral ratio before adjustment. # noqa: E501 :return: The before_ltv of this CollateralRecord. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def before_ltv(self): def before_ltv(self, before_ltv): """Sets the before_ltv of this CollateralRecord. - The collateral ratio before adjustment # noqa: E501 + The collateral ratio before adjustment. # noqa: E501 :param before_ltv: The before_ltv of this CollateralRecord. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def before_ltv(self, before_ltv): def after_ltv(self): """Gets the after_ltv of this CollateralRecord. # noqa: E501 - The collateral ratio after adjustment # noqa: E501 + The collateral ratio after adjustment. # noqa: E501 :return: The after_ltv of this CollateralRecord. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def after_ltv(self): def after_ltv(self, after_ltv): """Sets the after_ltv of this CollateralRecord. - The collateral ratio after adjustment # noqa: E501 + The collateral ratio after adjustment. # noqa: E501 :param after_ltv: The after_ltv of this CollateralRecord. # noqa: E501 :type: str @@ -309,7 +309,7 @@ def after_ltv(self, after_ltv): def operate_time(self): """Gets the operate_time of this CollateralRecord. # noqa: E501 - Timestamp of the operation, in seconds # noqa: E501 + Timestamp of the operation, in seconds. # noqa: E501 :return: The operate_time of this CollateralRecord. # noqa: E501 :rtype: int @@ -320,7 +320,7 @@ def operate_time(self): def operate_time(self, operate_time): """Sets the operate_time of this CollateralRecord. - Timestamp of the operation, in seconds # noqa: E501 + Timestamp of the operation, in seconds. # noqa: E501 :param operate_time: The operate_time of this CollateralRecord. # noqa: E501 :type: int diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index 2abb580..221a0c9 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -242,7 +242,7 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No def name(self): """Gets the name of this Contract. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The name of this Contract. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def name(self): def name(self, name): """Sets the name of this Contract. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param name: The name of this Contract. # noqa: E501 :type: str @@ -265,7 +265,7 @@ def name(self, name): def type(self): """Gets the type of this Contract. # noqa: E501 - Futures contract type # noqa: E501 + Futures contract type. # noqa: E501 :return: The type of this Contract. # noqa: E501 :rtype: str @@ -276,7 +276,7 @@ def type(self): def type(self, type): """Sets the type of this Contract. - Futures contract type # noqa: E501 + Futures contract type. # noqa: E501 :param type: The type of this Contract. # noqa: E501 :type: str @@ -294,7 +294,7 @@ def type(self, type): def quanto_multiplier(self): """Gets the quanto_multiplier of this Contract. # noqa: E501 - Multiplier used in converting from invoicing to settlement currency # noqa: E501 + Multiplier used in converting from invoicing to settlement currency. # noqa: E501 :return: The quanto_multiplier of this Contract. # noqa: E501 :rtype: str @@ -305,7 +305,7 @@ def quanto_multiplier(self): def quanto_multiplier(self, quanto_multiplier): """Sets the quanto_multiplier of this Contract. - Multiplier used in converting from invoicing to settlement currency # noqa: E501 + Multiplier used in converting from invoicing to settlement currency. # noqa: E501 :param quanto_multiplier: The quanto_multiplier of this Contract. # noqa: E501 :type: str @@ -317,7 +317,7 @@ def quanto_multiplier(self, quanto_multiplier): def leverage_min(self): """Gets the leverage_min of this Contract. # noqa: E501 - Minimum leverage # noqa: E501 + Minimum leverage. # noqa: E501 :return: The leverage_min of this Contract. # noqa: E501 :rtype: str @@ -328,7 +328,7 @@ def leverage_min(self): def leverage_min(self, leverage_min): """Sets the leverage_min of this Contract. - Minimum leverage # noqa: E501 + Minimum leverage. # noqa: E501 :param leverage_min: The leverage_min of this Contract. # noqa: E501 :type: str @@ -340,7 +340,7 @@ def leverage_min(self, leverage_min): def leverage_max(self): """Gets the leverage_max of this Contract. # noqa: E501 - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :return: The leverage_max of this Contract. # noqa: E501 :rtype: str @@ -351,7 +351,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this Contract. - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :param leverage_max: The leverage_max of this Contract. # noqa: E501 :type: str @@ -363,7 +363,7 @@ def leverage_max(self, leverage_max): def maintenance_rate(self): """Gets the maintenance_rate of this Contract. # noqa: E501 - Maintenance rate of margin # noqa: E501 + Maintenance rate of margin. # noqa: E501 :return: The maintenance_rate of this Contract. # noqa: E501 :rtype: str @@ -374,7 +374,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this Contract. - Maintenance rate of margin # noqa: E501 + Maintenance rate of margin. # noqa: E501 :param maintenance_rate: The maintenance_rate of this Contract. # noqa: E501 :type: str @@ -386,7 +386,7 @@ def maintenance_rate(self, maintenance_rate): def mark_type(self): """Gets the mark_type of this Contract. # noqa: E501 - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + Mark price type, internal - based on internal trading, external index price # noqa: E501 :return: The mark_type of this Contract. # noqa: E501 :rtype: str @@ -397,7 +397,7 @@ def mark_type(self): def mark_type(self, mark_type): """Sets the mark_type of this Contract. - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + Mark price type, internal - based on internal trading, external index price # noqa: E501 :param mark_type: The mark_type of this Contract. # noqa: E501 :type: str @@ -415,7 +415,7 @@ def mark_type(self, mark_type): def mark_price(self): """Gets the mark_price of this Contract. # noqa: E501 - Current mark price # noqa: E501 + Current mark price. # noqa: E501 :return: The mark_price of this Contract. # noqa: E501 :rtype: str @@ -426,7 +426,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this Contract. - Current mark price # noqa: E501 + Current mark price. # noqa: E501 :param mark_price: The mark_price of this Contract. # noqa: E501 :type: str @@ -438,7 +438,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this Contract. # noqa: E501 - Current index price # noqa: E501 + Current index price. # noqa: E501 :return: The index_price of this Contract. # noqa: E501 :rtype: str @@ -449,7 +449,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this Contract. - Current index price # noqa: E501 + Current index price. # noqa: E501 :param index_price: The index_price of this Contract. # noqa: E501 :type: str @@ -461,7 +461,7 @@ def index_price(self, index_price): def last_price(self): """Gets the last_price of this Contract. # noqa: E501 - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :return: The last_price of this Contract. # noqa: E501 :rtype: str @@ -472,7 +472,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this Contract. - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :param last_price: The last_price of this Contract. # noqa: E501 :type: str @@ -484,7 +484,7 @@ def last_price(self, last_price): def maker_fee_rate(self): """Gets the maker_fee_rate of this Contract. # noqa: E501 - Maker fee rate, where negative means rebate # noqa: E501 + Maker fee rate, where negative means rebate. # noqa: E501 :return: The maker_fee_rate of this Contract. # noqa: E501 :rtype: str @@ -495,7 +495,7 @@ def maker_fee_rate(self): def maker_fee_rate(self, maker_fee_rate): """Sets the maker_fee_rate of this Contract. - Maker fee rate, where negative means rebate # noqa: E501 + Maker fee rate, where negative means rebate. # noqa: E501 :param maker_fee_rate: The maker_fee_rate of this Contract. # noqa: E501 :type: str @@ -507,7 +507,7 @@ def maker_fee_rate(self, maker_fee_rate): def taker_fee_rate(self): """Gets the taker_fee_rate of this Contract. # noqa: E501 - Taker fee rate # noqa: E501 + Taker fee rate. # noqa: E501 :return: The taker_fee_rate of this Contract. # noqa: E501 :rtype: str @@ -518,7 +518,7 @@ def taker_fee_rate(self): def taker_fee_rate(self, taker_fee_rate): """Sets the taker_fee_rate of this Contract. - Taker fee rate # noqa: E501 + Taker fee rate. # noqa: E501 :param taker_fee_rate: The taker_fee_rate of this Contract. # noqa: E501 :type: str @@ -530,7 +530,7 @@ def taker_fee_rate(self, taker_fee_rate): def order_price_round(self): """Gets the order_price_round of this Contract. # noqa: E501 - Minimum order price increment # noqa: E501 + Minimum order price increment. # noqa: E501 :return: The order_price_round of this Contract. # noqa: E501 :rtype: str @@ -541,7 +541,7 @@ def order_price_round(self): def order_price_round(self, order_price_round): """Sets the order_price_round of this Contract. - Minimum order price increment # noqa: E501 + Minimum order price increment. # noqa: E501 :param order_price_round: The order_price_round of this Contract. # noqa: E501 :type: str @@ -553,7 +553,7 @@ def order_price_round(self, order_price_round): def mark_price_round(self): """Gets the mark_price_round of this Contract. # noqa: E501 - Minimum mark price increment # noqa: E501 + Minimum mark price increment. # noqa: E501 :return: The mark_price_round of this Contract. # noqa: E501 :rtype: str @@ -564,7 +564,7 @@ def mark_price_round(self): def mark_price_round(self, mark_price_round): """Sets the mark_price_round of this Contract. - Minimum mark price increment # noqa: E501 + Minimum mark price increment. # noqa: E501 :param mark_price_round: The mark_price_round of this Contract. # noqa: E501 :type: str @@ -576,7 +576,7 @@ def mark_price_round(self, mark_price_round): def funding_rate(self): """Gets the funding_rate of this Contract. # noqa: E501 - Current funding rate # noqa: E501 + Current funding rate. # noqa: E501 :return: The funding_rate of this Contract. # noqa: E501 :rtype: str @@ -587,7 +587,7 @@ def funding_rate(self): def funding_rate(self, funding_rate): """Sets the funding_rate of this Contract. - Current funding rate # noqa: E501 + Current funding rate. # noqa: E501 :param funding_rate: The funding_rate of this Contract. # noqa: E501 :type: str @@ -599,7 +599,7 @@ def funding_rate(self, funding_rate): def funding_interval(self): """Gets the funding_interval of this Contract. # noqa: E501 - Funding application interval, unit in seconds # noqa: E501 + Funding application interval, unit in seconds. # noqa: E501 :return: The funding_interval of this Contract. # noqa: E501 :rtype: int @@ -610,7 +610,7 @@ def funding_interval(self): def funding_interval(self, funding_interval): """Sets the funding_interval of this Contract. - Funding application interval, unit in seconds # noqa: E501 + Funding application interval, unit in seconds. # noqa: E501 :param funding_interval: The funding_interval of this Contract. # noqa: E501 :type: int @@ -622,7 +622,7 @@ def funding_interval(self, funding_interval): def funding_next_apply(self): """Gets the funding_next_apply of this Contract. # noqa: E501 - Next funding time # noqa: E501 + Next funding time. # noqa: E501 :return: The funding_next_apply of this Contract. # noqa: E501 :rtype: float @@ -633,7 +633,7 @@ def funding_next_apply(self): def funding_next_apply(self, funding_next_apply): """Sets the funding_next_apply of this Contract. - Next funding time # noqa: E501 + Next funding time. # noqa: E501 :param funding_next_apply: The funding_next_apply of this Contract. # noqa: E501 :type: float @@ -645,7 +645,7 @@ def funding_next_apply(self, funding_next_apply): def risk_limit_base(self): """Gets the risk_limit_base of this Contract. # noqa: E501 - Risk limit base,deprecated # noqa: E501 + Risk limit base,deprecated. # noqa: E501 :return: The risk_limit_base of this Contract. # noqa: E501 :rtype: str @@ -656,7 +656,7 @@ def risk_limit_base(self): def risk_limit_base(self, risk_limit_base): """Sets the risk_limit_base of this Contract. - Risk limit base,deprecated # noqa: E501 + Risk limit base,deprecated. # noqa: E501 :param risk_limit_base: The risk_limit_base of this Contract. # noqa: E501 :type: str @@ -668,7 +668,7 @@ def risk_limit_base(self, risk_limit_base): def risk_limit_step(self): """Gets the risk_limit_step of this Contract. # noqa: E501 - Step of adjusting risk limit,deprecated # noqa: E501 + Step of adjusting risk limit,deprecated. # noqa: E501 :return: The risk_limit_step of this Contract. # noqa: E501 :rtype: str @@ -679,7 +679,7 @@ def risk_limit_step(self): def risk_limit_step(self, risk_limit_step): """Sets the risk_limit_step of this Contract. - Step of adjusting risk limit,deprecated # noqa: E501 + Step of adjusting risk limit,deprecated. # noqa: E501 :param risk_limit_step: The risk_limit_step of this Contract. # noqa: E501 :type: str @@ -714,7 +714,7 @@ def risk_limit_max(self, risk_limit_max): def order_size_min(self): """Gets the order_size_min of this Contract. # noqa: E501 - Minimum order size the contract allowed # noqa: E501 + Minimum order size the contract allowed. # noqa: E501 :return: The order_size_min of this Contract. # noqa: E501 :rtype: int @@ -725,7 +725,7 @@ def order_size_min(self): def order_size_min(self, order_size_min): """Sets the order_size_min of this Contract. - Minimum order size the contract allowed # noqa: E501 + Minimum order size the contract allowed. # noqa: E501 :param order_size_min: The order_size_min of this Contract. # noqa: E501 :type: int @@ -737,7 +737,7 @@ def order_size_min(self, order_size_min): def order_size_max(self): """Gets the order_size_max of this Contract. # noqa: E501 - Maximum order size the contract allowed # noqa: E501 + Maximum order size the contract allowed. # noqa: E501 :return: The order_size_max of this Contract. # noqa: E501 :rtype: int @@ -748,7 +748,7 @@ def order_size_max(self): def order_size_max(self, order_size_max): """Sets the order_size_max of this Contract. - Maximum order size the contract allowed # noqa: E501 + Maximum order size the contract allowed. # noqa: E501 :param order_size_max: The order_size_max of this Contract. # noqa: E501 :type: int @@ -783,7 +783,7 @@ def order_price_deviate(self, order_price_deviate): def ref_discount_rate(self): """Gets the ref_discount_rate of this Contract. # noqa: E501 - Referral fee rate discount # noqa: E501 + Referral fee rate discount. # noqa: E501 :return: The ref_discount_rate of this Contract. # noqa: E501 :rtype: str @@ -794,7 +794,7 @@ def ref_discount_rate(self): def ref_discount_rate(self, ref_discount_rate): """Sets the ref_discount_rate of this Contract. - Referral fee rate discount # noqa: E501 + Referral fee rate discount. # noqa: E501 :param ref_discount_rate: The ref_discount_rate of this Contract. # noqa: E501 :type: str @@ -806,7 +806,7 @@ def ref_discount_rate(self, ref_discount_rate): def ref_rebate_rate(self): """Gets the ref_rebate_rate of this Contract. # noqa: E501 - Referrer commission rate # noqa: E501 + Referrer commission rate. # noqa: E501 :return: The ref_rebate_rate of this Contract. # noqa: E501 :rtype: str @@ -817,7 +817,7 @@ def ref_rebate_rate(self): def ref_rebate_rate(self, ref_rebate_rate): """Sets the ref_rebate_rate of this Contract. - Referrer commission rate # noqa: E501 + Referrer commission rate. # noqa: E501 :param ref_rebate_rate: The ref_rebate_rate of this Contract. # noqa: E501 :type: str @@ -829,7 +829,7 @@ def ref_rebate_rate(self, ref_rebate_rate): def orderbook_id(self): """Gets the orderbook_id of this Contract. # noqa: E501 - Current orderbook ID # noqa: E501 + Current orderbook ID. # noqa: E501 :return: The orderbook_id of this Contract. # noqa: E501 :rtype: int @@ -840,7 +840,7 @@ def orderbook_id(self): def orderbook_id(self, orderbook_id): """Sets the orderbook_id of this Contract. - Current orderbook ID # noqa: E501 + Current orderbook ID. # noqa: E501 :param orderbook_id: The orderbook_id of this Contract. # noqa: E501 :type: int @@ -852,7 +852,7 @@ def orderbook_id(self, orderbook_id): def trade_id(self): """Gets the trade_id of this Contract. # noqa: E501 - Current trade ID # noqa: E501 + Current trade ID. # noqa: E501 :return: The trade_id of this Contract. # noqa: E501 :rtype: int @@ -863,7 +863,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this Contract. - Current trade ID # noqa: E501 + Current trade ID. # noqa: E501 :param trade_id: The trade_id of this Contract. # noqa: E501 :type: int @@ -875,7 +875,7 @@ def trade_id(self, trade_id): def trade_size(self): """Gets the trade_size of this Contract. # noqa: E501 - Historical accumulated trade size # noqa: E501 + Historical accumulated trade size. # noqa: E501 :return: The trade_size of this Contract. # noqa: E501 :rtype: int @@ -886,7 +886,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this Contract. - Historical accumulated trade size # noqa: E501 + Historical accumulated trade size. # noqa: E501 :param trade_size: The trade_size of this Contract. # noqa: E501 :type: int @@ -898,7 +898,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this Contract. # noqa: E501 - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :return: The position_size of this Contract. # noqa: E501 :rtype: int @@ -909,7 +909,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this Contract. - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :param position_size: The position_size of this Contract. # noqa: E501 :type: int @@ -921,7 +921,7 @@ def position_size(self, position_size): def config_change_time(self): """Gets the config_change_time of this Contract. # noqa: E501 - Last changed time of configuration # noqa: E501 + Last changed time of configuration. # noqa: E501 :return: The config_change_time of this Contract. # noqa: E501 :rtype: float @@ -932,7 +932,7 @@ def config_change_time(self): def config_change_time(self, config_change_time): """Sets the config_change_time of this Contract. - Last changed time of configuration # noqa: E501 + Last changed time of configuration. # noqa: E501 :param config_change_time: The config_change_time of this Contract. # noqa: E501 :type: float @@ -944,7 +944,7 @@ def config_change_time(self, config_change_time): def in_delisting(self): """Gets the in_delisting of this Contract. # noqa: E501 - `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline # noqa: E501 + `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` contract is offline # noqa: E501 :return: The in_delisting of this Contract. # noqa: E501 :rtype: bool @@ -955,7 +955,7 @@ def in_delisting(self): def in_delisting(self, in_delisting): """Sets the in_delisting of this Contract. - `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` And when position_size=0, it means the contract is offline # noqa: E501 + `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` contract is offline # noqa: E501 :param in_delisting: The in_delisting of this Contract. # noqa: E501 :type: bool @@ -967,7 +967,7 @@ def in_delisting(self, in_delisting): def orders_limit(self): """Gets the orders_limit of this Contract. # noqa: E501 - Maximum number of open orders # noqa: E501 + Maximum number of open orders. # noqa: E501 :return: The orders_limit of this Contract. # noqa: E501 :rtype: int @@ -978,7 +978,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this Contract. - Maximum number of open orders # noqa: E501 + Maximum number of open orders. # noqa: E501 :param orders_limit: The orders_limit of this Contract. # noqa: E501 :type: int @@ -990,7 +990,7 @@ def orders_limit(self, orders_limit): def enable_bonus(self): """Gets the enable_bonus of this Contract. # noqa: E501 - Whether bouns is enabled # noqa: E501 + Whether bouns is enabled. # noqa: E501 :return: The enable_bonus of this Contract. # noqa: E501 :rtype: bool @@ -1001,7 +1001,7 @@ def enable_bonus(self): def enable_bonus(self, enable_bonus): """Sets the enable_bonus of this Contract. - Whether bouns is enabled # noqa: E501 + Whether bouns is enabled. # noqa: E501 :param enable_bonus: The enable_bonus of this Contract. # noqa: E501 :type: bool @@ -1013,7 +1013,7 @@ def enable_bonus(self, enable_bonus): def enable_credit(self): """Gets the enable_credit of this Contract. # noqa: E501 - Whether portfolio margin account is enabled # noqa: E501 + Whether portfolio margin account is enabled. # noqa: E501 :return: The enable_credit of this Contract. # noqa: E501 :rtype: bool @@ -1024,7 +1024,7 @@ def enable_credit(self): def enable_credit(self, enable_credit): """Sets the enable_credit of this Contract. - Whether portfolio margin account is enabled # noqa: E501 + Whether portfolio margin account is enabled. # noqa: E501 :param enable_credit: The enable_credit of this Contract. # noqa: E501 :type: bool @@ -1036,7 +1036,7 @@ def enable_credit(self, enable_credit): def create_time(self): """Gets the create_time of this Contract. # noqa: E501 - Created time of the contract # noqa: E501 + Created time of the contract. # noqa: E501 :return: The create_time of this Contract. # noqa: E501 :rtype: float @@ -1047,7 +1047,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this Contract. - Created time of the contract # noqa: E501 + Created time of the contract. # noqa: E501 :param create_time: The create_time of this Contract. # noqa: E501 :type: float @@ -1082,7 +1082,7 @@ def funding_cap_ratio(self, funding_cap_ratio): def status(self): """Gets the status of this Contract. # noqa: E501 - Contract Status Types include: prelaunch, trading, delisting, delisted # noqa: E501 + Contract Status Types include: prelaunch, trading, delisting, delisted. # noqa: E501 :return: The status of this Contract. # noqa: E501 :rtype: str @@ -1093,7 +1093,7 @@ def status(self): def status(self, status): """Sets the status of this Contract. - Contract Status Types include: prelaunch, trading, delisting, delisted # noqa: E501 + Contract Status Types include: prelaunch, trading, delisting, delisted. # noqa: E501 :param status: The status of this Contract. # noqa: E501 :type: str @@ -1105,7 +1105,7 @@ def status(self, status): def launch_time(self): """Gets the launch_time of this Contract. # noqa: E501 - Contract expiry timestamp # noqa: E501 + Contract expiry timestamp. # noqa: E501 :return: The launch_time of this Contract. # noqa: E501 :rtype: int @@ -1116,7 +1116,7 @@ def launch_time(self): def launch_time(self, launch_time): """Sets the launch_time of this Contract. - Contract expiry timestamp # noqa: E501 + Contract expiry timestamp. # noqa: E501 :param launch_time: The launch_time of this Contract. # noqa: E501 :type: int diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index 536bbf3..a5b8dca 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -117,7 +117,7 @@ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=No def time(self): """Gets the time of this ContractStat. # noqa: E501 - Stat timestamp # noqa: E501 + Stat timestamp. # noqa: E501 :return: The time of this ContractStat. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def time(self): def time(self, time): """Sets the time of this ContractStat. - Stat timestamp # noqa: E501 + Stat timestamp. # noqa: E501 :param time: The time of this ContractStat. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def time(self, time): def lsr_taker(self): """Gets the lsr_taker of this ContractStat. # noqa: E501 - Long/short account number ratio # noqa: E501 + Long/short account number ratio. # noqa: E501 :return: The lsr_taker of this ContractStat. # noqa: E501 :rtype: float @@ -151,7 +151,7 @@ def lsr_taker(self): def lsr_taker(self, lsr_taker): """Sets the lsr_taker of this ContractStat. - Long/short account number ratio # noqa: E501 + Long/short account number ratio. # noqa: E501 :param lsr_taker: The lsr_taker of this ContractStat. # noqa: E501 :type: float @@ -163,7 +163,7 @@ def lsr_taker(self, lsr_taker): def lsr_account(self): """Gets the lsr_account of this ContractStat. # noqa: E501 - Long/short taker size ratio # noqa: E501 + Long/short taker size ratio. # noqa: E501 :return: The lsr_account of this ContractStat. # noqa: E501 :rtype: float @@ -174,7 +174,7 @@ def lsr_account(self): def lsr_account(self, lsr_account): """Sets the lsr_account of this ContractStat. - Long/short taker size ratio # noqa: E501 + Long/short taker size ratio. # noqa: E501 :param lsr_account: The lsr_account of this ContractStat. # noqa: E501 :type: float @@ -186,7 +186,7 @@ def lsr_account(self, lsr_account): def long_liq_size(self): """Gets the long_liq_size of this ContractStat. # noqa: E501 - Long liquidation size # noqa: E501 + Long liquidation size. # noqa: E501 :return: The long_liq_size of this ContractStat. # noqa: E501 :rtype: int @@ -197,7 +197,7 @@ def long_liq_size(self): def long_liq_size(self, long_liq_size): """Sets the long_liq_size of this ContractStat. - Long liquidation size # noqa: E501 + Long liquidation size. # noqa: E501 :param long_liq_size: The long_liq_size of this ContractStat. # noqa: E501 :type: int @@ -209,7 +209,7 @@ def long_liq_size(self, long_liq_size): def long_liq_amount(self): """Gets the long_liq_amount of this ContractStat. # noqa: E501 - Long liquidation amount(base currency) # noqa: E501 + Long liquidation amount(base currency). # noqa: E501 :return: The long_liq_amount of this ContractStat. # noqa: E501 :rtype: float @@ -220,7 +220,7 @@ def long_liq_amount(self): def long_liq_amount(self, long_liq_amount): """Sets the long_liq_amount of this ContractStat. - Long liquidation amount(base currency) # noqa: E501 + Long liquidation amount(base currency). # noqa: E501 :param long_liq_amount: The long_liq_amount of this ContractStat. # noqa: E501 :type: float @@ -232,7 +232,7 @@ def long_liq_amount(self, long_liq_amount): def long_liq_usd(self): """Gets the long_liq_usd of this ContractStat. # noqa: E501 - Long liquidation volume(quote currency) # noqa: E501 + Long liquidation volume(quote currency). # noqa: E501 :return: The long_liq_usd of this ContractStat. # noqa: E501 :rtype: float @@ -243,7 +243,7 @@ def long_liq_usd(self): def long_liq_usd(self, long_liq_usd): """Sets the long_liq_usd of this ContractStat. - Long liquidation volume(quote currency) # noqa: E501 + Long liquidation volume(quote currency). # noqa: E501 :param long_liq_usd: The long_liq_usd of this ContractStat. # noqa: E501 :type: float @@ -255,7 +255,7 @@ def long_liq_usd(self, long_liq_usd): def short_liq_size(self): """Gets the short_liq_size of this ContractStat. # noqa: E501 - Short liquidation size # noqa: E501 + Short liquidation size. # noqa: E501 :return: The short_liq_size of this ContractStat. # noqa: E501 :rtype: int @@ -266,7 +266,7 @@ def short_liq_size(self): def short_liq_size(self, short_liq_size): """Sets the short_liq_size of this ContractStat. - Short liquidation size # noqa: E501 + Short liquidation size. # noqa: E501 :param short_liq_size: The short_liq_size of this ContractStat. # noqa: E501 :type: int @@ -278,7 +278,7 @@ def short_liq_size(self, short_liq_size): def short_liq_amount(self): """Gets the short_liq_amount of this ContractStat. # noqa: E501 - Short liquidation amount(base currency) # noqa: E501 + Short liquidation amount(base currency). # noqa: E501 :return: The short_liq_amount of this ContractStat. # noqa: E501 :rtype: float @@ -289,7 +289,7 @@ def short_liq_amount(self): def short_liq_amount(self, short_liq_amount): """Sets the short_liq_amount of this ContractStat. - Short liquidation amount(base currency) # noqa: E501 + Short liquidation amount(base currency). # noqa: E501 :param short_liq_amount: The short_liq_amount of this ContractStat. # noqa: E501 :type: float @@ -301,7 +301,7 @@ def short_liq_amount(self, short_liq_amount): def short_liq_usd(self): """Gets the short_liq_usd of this ContractStat. # noqa: E501 - Short liquidation volume(quote currency) # noqa: E501 + Short liquidation volume(quote currency). # noqa: E501 :return: The short_liq_usd of this ContractStat. # noqa: E501 :rtype: float @@ -312,7 +312,7 @@ def short_liq_usd(self): def short_liq_usd(self, short_liq_usd): """Sets the short_liq_usd of this ContractStat. - Short liquidation volume(quote currency) # noqa: E501 + Short liquidation volume(quote currency). # noqa: E501 :param short_liq_usd: The short_liq_usd of this ContractStat. # noqa: E501 :type: float @@ -324,7 +324,7 @@ def short_liq_usd(self, short_liq_usd): def open_interest(self): """Gets the open_interest of this ContractStat. # noqa: E501 - Open interest size # noqa: E501 + Open interest size. # noqa: E501 :return: The open_interest of this ContractStat. # noqa: E501 :rtype: int @@ -335,7 +335,7 @@ def open_interest(self): def open_interest(self, open_interest): """Sets the open_interest of this ContractStat. - Open interest size # noqa: E501 + Open interest size. # noqa: E501 :param open_interest: The open_interest of this ContractStat. # noqa: E501 :type: int @@ -347,7 +347,7 @@ def open_interest(self, open_interest): def open_interest_usd(self): """Gets the open_interest_usd of this ContractStat. # noqa: E501 - Open interest volume(quote currency) # noqa: E501 + Open interest volume(quote currency). # noqa: E501 :return: The open_interest_usd of this ContractStat. # noqa: E501 :rtype: float @@ -358,7 +358,7 @@ def open_interest_usd(self): def open_interest_usd(self, open_interest_usd): """Sets the open_interest_usd of this ContractStat. - Open interest volume(quote currency) # noqa: E501 + Open interest volume(quote currency). # noqa: E501 :param open_interest_usd: The open_interest_usd of this ContractStat. # noqa: E501 :type: float @@ -370,7 +370,7 @@ def open_interest_usd(self, open_interest_usd): def top_lsr_account(self): """Gets the top_lsr_account of this ContractStat. # noqa: E501 - Top trader long/short account ratio # noqa: E501 + Top trader long/short account ratio. # noqa: E501 :return: The top_lsr_account of this ContractStat. # noqa: E501 :rtype: float @@ -381,7 +381,7 @@ def top_lsr_account(self): def top_lsr_account(self, top_lsr_account): """Sets the top_lsr_account of this ContractStat. - Top trader long/short account ratio # noqa: E501 + Top trader long/short account ratio. # noqa: E501 :param top_lsr_account: The top_lsr_account of this ContractStat. # noqa: E501 :type: float @@ -393,7 +393,7 @@ def top_lsr_account(self, top_lsr_account): def top_lsr_size(self): """Gets the top_lsr_size of this ContractStat. # noqa: E501 - Top trader long/short position ratio # noqa: E501 + Top trader long/short position ratio. # noqa: E501 :return: The top_lsr_size of this ContractStat. # noqa: E501 :rtype: float @@ -404,7 +404,7 @@ def top_lsr_size(self): def top_lsr_size(self, top_lsr_size): """Sets the top_lsr_size of this ContractStat. - Top trader long/short position ratio # noqa: E501 + Top trader long/short position ratio. # noqa: E501 :param top_lsr_size: The top_lsr_size of this ContractStat. # noqa: E501 :type: float diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py index e8d6361..9cd8342 100644 --- a/gate_api/models/convert_small_balance.py +++ b/gate_api/models/convert_small_balance.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, is_all=None, local_vars_configuration=None): def currency(self): """Gets the currency of this ConvertSmallBalance. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this ConvertSmallBalance. # noqa: E501 :rtype: list[str] @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this ConvertSmallBalance. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this ConvertSmallBalance. # noqa: E501 :type: list[str] @@ -85,7 +85,7 @@ def currency(self, currency): def is_all(self): """Gets the is_all of this ConvertSmallBalance. # noqa: E501 - Whether to exchange all # noqa: E501 + Whether to exchange all. # noqa: E501 :return: The is_all of this ConvertSmallBalance. # noqa: E501 :rtype: bool @@ -96,7 +96,7 @@ def is_all(self): def is_all(self, is_all): """Sets the is_all of this ConvertSmallBalance. - Whether to exchange all # noqa: E501 + Whether to exchange all. # noqa: E501 :param is_all: The is_all of this ConvertSmallBalance. # noqa: E501 :type: bool diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py index 1297dc9..51f7106 100644 --- a/gate_api/models/countdown_cancel_all_futures_task.py +++ b/gate_api/models/countdown_cancel_all_futures_task.py @@ -86,7 +86,7 @@ def timeout(self, timeout): def contract(self): """Gets the contract of this CountdownCancelAllFuturesTask. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 :rtype: str @@ -97,7 +97,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this CountdownCancelAllFuturesTask. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 :type: str diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py index 60d25b1..44422f8 100644 --- a/gate_api/models/countdown_cancel_all_options_task.py +++ b/gate_api/models/countdown_cancel_all_options_task.py @@ -91,7 +91,7 @@ def timeout(self, timeout): def contract(self): """Gets the contract of this CountdownCancelAllOptionsTask. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 :rtype: str @@ -102,7 +102,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this CountdownCancelAllOptionsTask. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param contract: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def contract(self, contract): def underlying(self): """Gets the underlying of this CountdownCancelAllOptionsTask. # noqa: E501 - Underlying # noqa: E501 + Underlying. # noqa: E501 :return: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this CountdownCancelAllOptionsTask. - Underlying # noqa: E501 + Underlying. # noqa: E501 :param underlying: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 :type: str diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py index 60b2e1d..0e7af6a 100644 --- a/gate_api/models/countdown_cancel_all_spot_task.py +++ b/gate_api/models/countdown_cancel_all_spot_task.py @@ -86,7 +86,7 @@ def timeout(self, timeout): def currency_pair(self): """Gets the currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 :rtype: str @@ -97,7 +97,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CountdownCancelAllSpotTask. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 :type: str diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py index 11532b7..85a8524 100644 --- a/gate_api/models/create_collateral_order.py +++ b/gate_api/models/create_collateral_order.py @@ -68,7 +68,7 @@ def __init__(self, collateral_amount=None, collateral_currency=None, borrow_amou def collateral_amount(self): """Gets the collateral_amount of this CreateCollateralOrder. # noqa: E501 - Collateral amount # noqa: E501 + Collateral amount. # noqa: E501 :return: The collateral_amount of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -79,7 +79,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this CreateCollateralOrder. - Collateral amount # noqa: E501 + Collateral amount. # noqa: E501 :param collateral_amount: The collateral_amount of this CreateCollateralOrder. # noqa: E501 :type: str @@ -93,7 +93,7 @@ def collateral_amount(self, collateral_amount): def collateral_currency(self): """Gets the collateral_currency of this CreateCollateralOrder. # noqa: E501 - Collateral # noqa: E501 + Collateral. # noqa: E501 :return: The collateral_currency of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -104,7 +104,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CreateCollateralOrder. - Collateral # noqa: E501 + Collateral. # noqa: E501 :param collateral_currency: The collateral_currency of this CreateCollateralOrder. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def collateral_currency(self, collateral_currency): def borrow_amount(self): """Gets the borrow_amount of this CreateCollateralOrder. # noqa: E501 - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :return: The borrow_amount of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CreateCollateralOrder. - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :param borrow_amount: The borrow_amount of this CreateCollateralOrder. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def borrow_amount(self, borrow_amount): def borrow_currency(self): """Gets the borrow_currency of this CreateCollateralOrder. # noqa: E501 - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :return: The borrow_currency of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CreateCollateralOrder. - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :param borrow_currency: The borrow_currency of this CreateCollateralOrder. # noqa: E501 :type: str diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py index 9461b6f..9e3c00b 100644 --- a/gate_api/models/create_multi_collateral_order.py +++ b/gate_api/models/create_multi_collateral_order.py @@ -95,7 +95,7 @@ def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=N def order_id(self): """Gets the order_id of this CreateMultiCollateralOrder. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CreateMultiCollateralOrder. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def order_id(self, order_id): def order_type(self): """Gets the order_type of this CreateMultiCollateralOrder. # noqa: E501 - current - current, fixed - fixed, if not specified, default to current # noqa: E501 + current - current, fixed - fixed, if not specified, default to current. # noqa: E501 :return: The order_type of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def order_type(self): def order_type(self, order_type): """Sets the order_type of this CreateMultiCollateralOrder. - current - current, fixed - fixed, if not specified, default to current # noqa: E501 + current - current, fixed - fixed, if not specified, default to current. # noqa: E501 :param order_type: The order_type of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -164,7 +164,7 @@ def fixed_type(self, fixed_type): def fixed_rate(self): """Gets the fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 - Fixed interest rate, must be specified for fixed # noqa: E501 + Fixed interest rate, must be specified for fixed. # noqa: E501 :return: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -175,7 +175,7 @@ def fixed_rate(self): def fixed_rate(self, fixed_rate): """Sets the fixed_rate of this CreateMultiCollateralOrder. - Fixed interest rate, must be specified for fixed # noqa: E501 + Fixed interest rate, must be specified for fixed. # noqa: E501 :param fixed_rate: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -187,7 +187,7 @@ def fixed_rate(self, fixed_rate): def auto_renew(self): """Gets the auto_renew of this CreateMultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic renewal # noqa: E501 + Fixed interest rate, automatic renewal. # noqa: E501 :return: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 :rtype: bool @@ -198,7 +198,7 @@ def auto_renew(self): def auto_renew(self, auto_renew): """Sets the auto_renew of this CreateMultiCollateralOrder. - Fixed interest rate, automatic renewal # noqa: E501 + Fixed interest rate, automatic renewal. # noqa: E501 :param auto_renew: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 :type: bool @@ -210,7 +210,7 @@ def auto_renew(self, auto_renew): def auto_repay(self): """Gets the auto_repay of this CreateMultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic repayment # noqa: E501 + Fixed interest rate, automatic repayment. # noqa: E501 :return: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 :rtype: bool @@ -221,7 +221,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this CreateMultiCollateralOrder. - Fixed interest rate, automatic repayment # noqa: E501 + Fixed interest rate, automatic repayment. # noqa: E501 :param auto_repay: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 :type: bool @@ -233,7 +233,7 @@ def auto_repay(self, auto_repay): def borrow_currency(self): """Gets the borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :return: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -244,7 +244,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CreateMultiCollateralOrder. - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :param borrow_currency: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def borrow_currency(self, borrow_currency): def borrow_amount(self): """Gets the borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :return: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CreateMultiCollateralOrder. - Borrowing amount # noqa: E501 + Borrowing amount. # noqa: E501 :param borrow_amount: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -283,7 +283,7 @@ def borrow_amount(self, borrow_amount): def collateral_currencies(self): """Gets the collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 - Collateral currency and amount # noqa: E501 + Collateral currency and amount. # noqa: E501 :return: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 :rtype: list[CollateralCurrency] @@ -294,7 +294,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this CreateMultiCollateralOrder. - Collateral currency and amount # noqa: E501 + Collateral currency and amount. # noqa: E501 :param collateral_currencies: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 :type: list[CollateralCurrency] diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py index 1fda1c1..a0e84e6 100644 --- a/gate_api/models/create_uni_lend.py +++ b/gate_api/models/create_uni_lend.py @@ -69,7 +69,7 @@ def __init__(self, currency=None, amount=None, type=None, min_rate=None, local_v def currency(self): """Gets the currency of this CreateUniLend. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this CreateUniLend. # noqa: E501 :rtype: str @@ -80,7 +80,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CreateUniLend. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this CreateUniLend. # noqa: E501 :type: str @@ -94,7 +94,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this CreateUniLend. # noqa: E501 - The amount of currency could be lent # noqa: E501 + The amount of currency could be lent. # noqa: E501 :return: The amount of this CreateUniLend. # noqa: E501 :rtype: str @@ -105,7 +105,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CreateUniLend. - The amount of currency could be lent # noqa: E501 + The amount of currency could be lent. # noqa: E501 :param amount: The amount of this CreateUniLend. # noqa: E501 :type: str @@ -119,7 +119,7 @@ def amount(self, amount): def type(self): """Gets the type of this CreateUniLend. # noqa: E501 - type: lend - lend, redeem - redeem # noqa: E501 + type: lend - lend, redeem - redeem. # noqa: E501 :return: The type of this CreateUniLend. # noqa: E501 :rtype: str @@ -130,7 +130,7 @@ def type(self): def type(self, type): """Sets the type of this CreateUniLend. - type: lend - lend, redeem - redeem # noqa: E501 + type: lend - lend, redeem - redeem. # noqa: E501 :param type: The type of this CreateUniLend. # noqa: E501 :type: str diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py index 43b70b7..8b5dd75 100644 --- a/gate_api/models/create_uni_loan.py +++ b/gate_api/models/create_uni_loan.py @@ -73,7 +73,7 @@ def __init__(self, currency=None, type=None, amount=None, repaid_all=None, curre def currency(self): """Gets the currency of this CreateUniLoan. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this CreateUniLoan. # noqa: E501 :rtype: str @@ -84,7 +84,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CreateUniLoan. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this CreateUniLoan. # noqa: E501 :type: str @@ -98,7 +98,7 @@ def currency(self, currency): def type(self): """Gets the type of this CreateUniLoan. # noqa: E501 - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :return: The type of this CreateUniLoan. # noqa: E501 :rtype: str @@ -109,7 +109,7 @@ def type(self): def type(self, type): """Sets the type of this CreateUniLoan. - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :param type: The type of this CreateUniLoan. # noqa: E501 :type: str @@ -129,7 +129,7 @@ def type(self, type): def amount(self): """Gets the amount of this CreateUniLoan. # noqa: E501 - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :return: The amount of this CreateUniLoan. # noqa: E501 :rtype: str @@ -140,7 +140,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CreateUniLoan. - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :param amount: The amount of this CreateUniLoan. # noqa: E501 :type: str @@ -154,7 +154,7 @@ def amount(self, amount): def repaid_all(self): """Gets the repaid_all of this CreateUniLoan. # noqa: E501 - Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501 + Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and repaid in full. # noqa: E501 :return: The repaid_all of this CreateUniLoan. # noqa: E501 :rtype: bool @@ -165,7 +165,7 @@ def repaid_all(self): def repaid_all(self, repaid_all): """Sets the repaid_all of this CreateUniLoan. - Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. # noqa: E501 + Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and repaid in full. # noqa: E501 :param repaid_all: The repaid_all of this CreateUniLoan. # noqa: E501 :type: bool @@ -177,7 +177,7 @@ def repaid_all(self, repaid_all): def currency_pair(self): """Gets the currency_pair of this CreateUniLoan. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this CreateUniLoan. # noqa: E501 :rtype: str @@ -188,7 +188,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CreateUniLoan. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this CreateUniLoan. # noqa: E501 :type: str diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py index 20f275e..9e28312 100644 --- a/gate_api/models/cross_margin_balance.py +++ b/gate_api/models/cross_margin_balance.py @@ -72,7 +72,7 @@ def __init__(self, available=None, freeze=None, borrowed=None, interest=None, lo def available(self): """Gets the available of this CrossMarginBalance. # noqa: E501 - Available amount # noqa: E501 + Available amount. # noqa: E501 :return: The available of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def available(self): def available(self, available): """Sets the available of this CrossMarginBalance. - Available amount # noqa: E501 + Available amount. # noqa: E501 :param available: The available of this CrossMarginBalance. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def available(self, available): def freeze(self): """Gets the freeze of this CrossMarginBalance. # noqa: E501 - Locked amount # noqa: E501 + Locked amount. # noqa: E501 :return: The freeze of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def freeze(self): def freeze(self, freeze): """Sets the freeze of this CrossMarginBalance. - Locked amount # noqa: E501 + Locked amount. # noqa: E501 :param freeze: The freeze of this CrossMarginBalance. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def freeze(self, freeze): def borrowed(self): """Gets the borrowed of this CrossMarginBalance. # noqa: E501 - Borrowed amount # noqa: E501 + Borrowed amount. # noqa: E501 :return: The borrowed of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this CrossMarginBalance. - Borrowed amount # noqa: E501 + Borrowed amount. # noqa: E501 :param borrowed: The borrowed of this CrossMarginBalance. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def borrowed(self, borrowed): def interest(self): """Gets the interest of this CrossMarginBalance. # noqa: E501 - Unpaid interests # noqa: E501 + Unpaid interests. # noqa: E501 :return: The interest of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this CrossMarginBalance. - Unpaid interests # noqa: E501 + Unpaid interests. # noqa: E501 :param interest: The interest of this CrossMarginBalance. # noqa: E501 :type: str diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py index 9e224d9..d548e15 100644 --- a/gate_api/models/cross_margin_loan.py +++ b/gate_api/models/cross_margin_loan.py @@ -100,7 +100,7 @@ def __init__(self, id=None, create_time=None, update_time=None, currency=None, a def id(self): """Gets the id of this CrossMarginLoan. # noqa: E501 - Loan record ID # noqa: E501 + Loan record ID. # noqa: E501 :return: The id of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def id(self): def id(self, id): """Sets the id of this CrossMarginLoan. - Loan record ID # noqa: E501 + Loan record ID. # noqa: E501 :param id: The id of this CrossMarginLoan. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this CrossMarginLoan. # noqa: E501 - Creation timestamp, in milliseconds # noqa: E501 + Creation timestamp, in milliseconds. # noqa: E501 :return: The create_time of this CrossMarginLoan. # noqa: E501 :rtype: int @@ -134,7 +134,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this CrossMarginLoan. - Creation timestamp, in milliseconds # noqa: E501 + Creation timestamp, in milliseconds. # noqa: E501 :param create_time: The create_time of this CrossMarginLoan. # noqa: E501 :type: int @@ -146,7 +146,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this CrossMarginLoan. # noqa: E501 - Update timestamp, in milliseconds # noqa: E501 + Update timestamp, in milliseconds. # noqa: E501 :return: The update_time of this CrossMarginLoan. # noqa: E501 :rtype: int @@ -157,7 +157,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this CrossMarginLoan. - Update timestamp, in milliseconds # noqa: E501 + Update timestamp, in milliseconds. # noqa: E501 :param update_time: The update_time of this CrossMarginLoan. # noqa: E501 :type: int @@ -169,7 +169,7 @@ def update_time(self, update_time): def currency(self): """Gets the currency of this CrossMarginLoan. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CrossMarginLoan. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this CrossMarginLoan. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this CrossMarginLoan. # noqa: E501 - Borrowed amount # noqa: E501 + Borrowed amount. # noqa: E501 :return: The amount of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CrossMarginLoan. - Borrowed amount # noqa: E501 + Borrowed amount. # noqa: E501 :param amount: The amount of this CrossMarginLoan. # noqa: E501 :type: str @@ -219,7 +219,7 @@ def amount(self, amount): def text(self): """Gets the text of this CrossMarginLoan. # noqa: E501 - User defined custom ID # noqa: E501 + User defined custom ID. # noqa: E501 :return: The text of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -230,7 +230,7 @@ def text(self): def text(self, text): """Sets the text of this CrossMarginLoan. - User defined custom ID # noqa: E501 + User defined custom ID. # noqa: E501 :param text: The text of this CrossMarginLoan. # noqa: E501 :type: str @@ -271,7 +271,7 @@ def status(self, status): def repaid(self): """Gets the repaid of this CrossMarginLoan. # noqa: E501 - Repaid amount # noqa: E501 + Repaid amount. # noqa: E501 :return: The repaid of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -282,7 +282,7 @@ def repaid(self): def repaid(self, repaid): """Sets the repaid of this CrossMarginLoan. - Repaid amount # noqa: E501 + Repaid amount. # noqa: E501 :param repaid: The repaid of this CrossMarginLoan. # noqa: E501 :type: str @@ -294,7 +294,7 @@ def repaid(self, repaid): def repaid_interest(self): """Gets the repaid_interest of this CrossMarginLoan. # noqa: E501 - Repaid interest # noqa: E501 + Repaid interest. # noqa: E501 :return: The repaid_interest of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -305,7 +305,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this CrossMarginLoan. - Repaid interest # noqa: E501 + Repaid interest. # noqa: E501 :param repaid_interest: The repaid_interest of this CrossMarginLoan. # noqa: E501 :type: str @@ -317,7 +317,7 @@ def repaid_interest(self, repaid_interest): def unpaid_interest(self): """Gets the unpaid_interest of this CrossMarginLoan. # noqa: E501 - Outstanding interest yet to be paid # noqa: E501 + Outstanding interest yet to be paid. # noqa: E501 :return: The unpaid_interest of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -328,7 +328,7 @@ def unpaid_interest(self): def unpaid_interest(self, unpaid_interest): """Sets the unpaid_interest of this CrossMarginLoan. - Outstanding interest yet to be paid # noqa: E501 + Outstanding interest yet to be paid. # noqa: E501 :param unpaid_interest: The unpaid_interest of this CrossMarginLoan. # noqa: E501 :type: str diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py index c699aed..62f977d 100644 --- a/gate_api/models/cross_margin_repayment.py +++ b/gate_api/models/cross_margin_repayment.py @@ -87,7 +87,7 @@ def __init__(self, id=None, create_time=None, loan_id=None, currency=None, princ def id(self): """Gets the id of this CrossMarginRepayment. # noqa: E501 - Loan record ID # noqa: E501 + Loan record ID. # noqa: E501 :return: The id of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def id(self): def id(self, id): """Sets the id of this CrossMarginRepayment. - Loan record ID # noqa: E501 + Loan record ID. # noqa: E501 :param id: The id of this CrossMarginRepayment. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this CrossMarginRepayment. # noqa: E501 - Repayment time # noqa: E501 + Repayment time. # noqa: E501 :return: The create_time of this CrossMarginRepayment. # noqa: E501 :rtype: int @@ -121,7 +121,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this CrossMarginRepayment. - Repayment time # noqa: E501 + Repayment time. # noqa: E501 :param create_time: The create_time of this CrossMarginRepayment. # noqa: E501 :type: int @@ -133,7 +133,7 @@ def create_time(self, create_time): def loan_id(self): """Gets the loan_id of this CrossMarginRepayment. # noqa: E501 - Loan record ID # noqa: E501 + Loan record ID. # noqa: E501 :return: The loan_id of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def loan_id(self): def loan_id(self, loan_id): """Sets the loan_id of this CrossMarginRepayment. - Loan record ID # noqa: E501 + Loan record ID. # noqa: E501 :param loan_id: The loan_id of this CrossMarginRepayment. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def loan_id(self, loan_id): def currency(self): """Gets the currency of this CrossMarginRepayment. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CrossMarginRepayment. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this CrossMarginRepayment. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def currency(self, currency): def principal(self): """Gets the principal of this CrossMarginRepayment. # noqa: E501 - Repaid principal # noqa: E501 + Repaid principal. # noqa: E501 :return: The principal of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def principal(self): def principal(self, principal): """Sets the principal of this CrossMarginRepayment. - Repaid principal # noqa: E501 + Repaid principal. # noqa: E501 :param principal: The principal of this CrossMarginRepayment. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def principal(self, principal): def interest(self): """Gets the interest of this CrossMarginRepayment. # noqa: E501 - Repaid interest # noqa: E501 + Repaid interest. # noqa: E501 :return: The interest of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this CrossMarginRepayment. - Repaid interest # noqa: E501 + Repaid interest. # noqa: E501 :param interest: The interest of this CrossMarginRepayment. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def interest(self, interest): def repayment_type(self): """Gets the repayment_type of this CrossMarginRepayment. # noqa: E501 - Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation # noqa: E501 + Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment after cancellation # noqa: E501 :return: The repayment_type of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def repayment_type(self): def repayment_type(self, repayment_type): """Sets the repayment_type of this CrossMarginRepayment. - Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation # noqa: E501 + Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment after cancellation # noqa: E501 :param repayment_type: The repayment_type of this CrossMarginRepayment. # noqa: E501 :type: str diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py index aab1819..546f292 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -102,7 +102,7 @@ def __init__(self, currency=None, name=None, delisted=None, withdraw_disabled=No def currency(self): """Gets the currency of this Currency. # noqa: E501 - Currency symbol # noqa: E501 + Currency symbol. # noqa: E501 :return: The currency of this Currency. # noqa: E501 :rtype: str @@ -113,7 +113,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this Currency. - Currency symbol # noqa: E501 + Currency symbol. # noqa: E501 :param currency: The currency of this Currency. # noqa: E501 :type: str @@ -125,7 +125,7 @@ def currency(self, currency): def name(self): """Gets the name of this Currency. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The name of this Currency. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def name(self): def name(self, name): """Sets the name of this Currency. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param name: The name of this Currency. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def name(self, name): def delisted(self): """Gets the delisted of this Currency. # noqa: E501 - Whether currency is de-listed # noqa: E501 + Whether currency is de-listed. # noqa: E501 :return: The delisted of this Currency. # noqa: E501 :rtype: bool @@ -159,7 +159,7 @@ def delisted(self): def delisted(self, delisted): """Sets the delisted of this Currency. - Whether currency is de-listed # noqa: E501 + Whether currency is de-listed. # noqa: E501 :param delisted: The delisted of this Currency. # noqa: E501 :type: bool @@ -171,7 +171,7 @@ def delisted(self, delisted): def withdraw_disabled(self): """Gets the withdraw_disabled of this Currency. # noqa: E501 - Whether currency's withdrawal is disabled (deprecated) # noqa: E501 + Whether currency's withdrawal is disabled (deprecated). # noqa: E501 :return: The withdraw_disabled of this Currency. # noqa: E501 :rtype: bool @@ -182,7 +182,7 @@ def withdraw_disabled(self): def withdraw_disabled(self, withdraw_disabled): """Sets the withdraw_disabled of this Currency. - Whether currency's withdrawal is disabled (deprecated) # noqa: E501 + Whether currency's withdrawal is disabled (deprecated). # noqa: E501 :param withdraw_disabled: The withdraw_disabled of this Currency. # noqa: E501 :type: bool @@ -194,7 +194,7 @@ def withdraw_disabled(self, withdraw_disabled): def withdraw_delayed(self): """Gets the withdraw_delayed of this Currency. # noqa: E501 - Whether currency's withdrawal is delayed (deprecated) # noqa: E501 + Whether currency's withdrawal is delayed (deprecated). # noqa: E501 :return: The withdraw_delayed of this Currency. # noqa: E501 :rtype: bool @@ -205,7 +205,7 @@ def withdraw_delayed(self): def withdraw_delayed(self, withdraw_delayed): """Sets the withdraw_delayed of this Currency. - Whether currency's withdrawal is delayed (deprecated) # noqa: E501 + Whether currency's withdrawal is delayed (deprecated). # noqa: E501 :param withdraw_delayed: The withdraw_delayed of this Currency. # noqa: E501 :type: bool @@ -217,7 +217,7 @@ def withdraw_delayed(self, withdraw_delayed): def deposit_disabled(self): """Gets the deposit_disabled of this Currency. # noqa: E501 - Whether currency's deposit is disabled (deprecated) # noqa: E501 + Whether currency's deposit is disabled (deprecated). # noqa: E501 :return: The deposit_disabled of this Currency. # noqa: E501 :rtype: bool @@ -228,7 +228,7 @@ def deposit_disabled(self): def deposit_disabled(self, deposit_disabled): """Sets the deposit_disabled of this Currency. - Whether currency's deposit is disabled (deprecated) # noqa: E501 + Whether currency's deposit is disabled (deprecated). # noqa: E501 :param deposit_disabled: The deposit_disabled of this Currency. # noqa: E501 :type: bool @@ -240,7 +240,7 @@ def deposit_disabled(self, deposit_disabled): def trade_disabled(self): """Gets the trade_disabled of this Currency. # noqa: E501 - Whether currency's trading is disabled # noqa: E501 + Whether currency's trading is disabled. # noqa: E501 :return: The trade_disabled of this Currency. # noqa: E501 :rtype: bool @@ -251,7 +251,7 @@ def trade_disabled(self): def trade_disabled(self, trade_disabled): """Sets the trade_disabled of this Currency. - Whether currency's trading is disabled # noqa: E501 + Whether currency's trading is disabled. # noqa: E501 :param trade_disabled: The trade_disabled of this Currency. # noqa: E501 :type: bool @@ -286,7 +286,7 @@ def fixed_rate(self, fixed_rate): def chain(self): """Gets the chain of this Currency. # noqa: E501 - The main chain corresponding to the coin # noqa: E501 + The main chain corresponding to the coin. # noqa: E501 :return: The chain of this Currency. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this Currency. - The main chain corresponding to the coin # noqa: E501 + The main chain corresponding to the coin. # noqa: E501 :param chain: The chain of this Currency. # noqa: E501 :type: str @@ -309,7 +309,7 @@ def chain(self, chain): def chains(self): """Gets the chains of this Currency. # noqa: E501 - All links corresponding to coins # noqa: E501 + All links corresponding to coins. # noqa: E501 :return: The chains of this Currency. # noqa: E501 :rtype: list[SpotCurrencyChain] @@ -320,7 +320,7 @@ def chains(self): def chains(self, chains): """Sets the chains of this Currency. - All links corresponding to coins # noqa: E501 + All links corresponding to coins. # noqa: E501 :param chains: The chains of this Currency. # noqa: E501 :type: list[SpotCurrencyChain] diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py index 819e78d..bbe35ef 100644 --- a/gate_api/models/currency_chain.py +++ b/gate_api/models/currency_chain.py @@ -92,7 +92,7 @@ def __init__(self, chain=None, name_cn=None, name_en=None, contract_address=None def chain(self): """Gets the chain of this CurrencyChain. # noqa: E501 - Chain name # noqa: E501 + Chain name. # noqa: E501 :return: The chain of this CurrencyChain. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this CurrencyChain. - Chain name # noqa: E501 + Chain name. # noqa: E501 :param chain: The chain of this CurrencyChain. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def chain(self, chain): def name_cn(self): """Gets the name_cn of this CurrencyChain. # noqa: E501 - Chain name in Chinese # noqa: E501 + Chain name in Chinese. # noqa: E501 :return: The name_cn of this CurrencyChain. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def name_cn(self): def name_cn(self, name_cn): """Sets the name_cn of this CurrencyChain. - Chain name in Chinese # noqa: E501 + Chain name in Chinese. # noqa: E501 :param name_cn: The name_cn of this CurrencyChain. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def name_cn(self, name_cn): def name_en(self): """Gets the name_en of this CurrencyChain. # noqa: E501 - Chain name in English # noqa: E501 + Chain name in English. # noqa: E501 :return: The name_en of this CurrencyChain. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def name_en(self): def name_en(self, name_en): """Sets the name_en of this CurrencyChain. - Chain name in English # noqa: E501 + Chain name in English. # noqa: E501 :param name_en: The name_en of this CurrencyChain. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def contract_address(self, contract_address): def is_disabled(self): """Gets the is_disabled of this CurrencyChain. # noqa: E501 - If it is disabled. 0 means NOT being disabled # noqa: E501 + If it is disabled. 0 means NOT being disabled. # noqa: E501 :return: The is_disabled of this CurrencyChain. # noqa: E501 :rtype: int @@ -195,7 +195,7 @@ def is_disabled(self): def is_disabled(self, is_disabled): """Sets the is_disabled of this CurrencyChain. - If it is disabled. 0 means NOT being disabled # noqa: E501 + If it is disabled. 0 means NOT being disabled. # noqa: E501 :param is_disabled: The is_disabled of this CurrencyChain. # noqa: E501 :type: int @@ -207,7 +207,7 @@ def is_disabled(self, is_disabled): def is_deposit_disabled(self): """Gets the is_deposit_disabled of this CurrencyChain. # noqa: E501 - Is deposit disabled. 0 means not # noqa: E501 + Is deposit disabled. 0 means not. # noqa: E501 :return: The is_deposit_disabled of this CurrencyChain. # noqa: E501 :rtype: int @@ -218,7 +218,7 @@ def is_deposit_disabled(self): def is_deposit_disabled(self, is_deposit_disabled): """Sets the is_deposit_disabled of this CurrencyChain. - Is deposit disabled. 0 means not # noqa: E501 + Is deposit disabled. 0 means not. # noqa: E501 :param is_deposit_disabled: The is_deposit_disabled of this CurrencyChain. # noqa: E501 :type: int @@ -230,7 +230,7 @@ def is_deposit_disabled(self, is_deposit_disabled): def is_withdraw_disabled(self): """Gets the is_withdraw_disabled of this CurrencyChain. # noqa: E501 - Is withdrawal disabled. 0 means not # noqa: E501 + Is withdrawal disabled. 0 means not. # noqa: E501 :return: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 :rtype: int @@ -241,7 +241,7 @@ def is_withdraw_disabled(self): def is_withdraw_disabled(self, is_withdraw_disabled): """Sets the is_withdraw_disabled of this CurrencyChain. - Is withdrawal disabled. 0 means not # noqa: E501 + Is withdrawal disabled. 0 means not. # noqa: E501 :param is_withdraw_disabled: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 :type: int @@ -253,7 +253,7 @@ def is_withdraw_disabled(self, is_withdraw_disabled): def decimal(self): """Gets the decimal of this CurrencyChain. # noqa: E501 - Withdrawal precision # noqa: E501 + Withdrawal precision. # noqa: E501 :return: The decimal of this CurrencyChain. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def decimal(self): def decimal(self, decimal): """Sets the decimal of this CurrencyChain. - Withdrawal precision # noqa: E501 + Withdrawal precision. # noqa: E501 :param decimal: The decimal of this CurrencyChain. # noqa: E501 :type: str diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index a9c48f6..a528d77 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -147,7 +147,7 @@ def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=No def id(self): """Gets the id of this CurrencyPair. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The id of this CurrencyPair. # noqa: E501 :rtype: str @@ -158,7 +158,7 @@ def id(self): def id(self, id): """Sets the id of this CurrencyPair. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param id: The id of this CurrencyPair. # noqa: E501 :type: str @@ -170,7 +170,7 @@ def id(self, id): def base(self): """Gets the base of this CurrencyPair. # noqa: E501 - Base currency # noqa: E501 + Base currency. # noqa: E501 :return: The base of this CurrencyPair. # noqa: E501 :rtype: str @@ -181,7 +181,7 @@ def base(self): def base(self, base): """Sets the base of this CurrencyPair. - Base currency # noqa: E501 + Base currency. # noqa: E501 :param base: The base of this CurrencyPair. # noqa: E501 :type: str @@ -193,7 +193,7 @@ def base(self, base): def base_name(self): """Gets the base_name of this CurrencyPair. # noqa: E501 - Transaction currency name # noqa: E501 + Transaction currency name. # noqa: E501 :return: The base_name of this CurrencyPair. # noqa: E501 :rtype: str @@ -204,7 +204,7 @@ def base_name(self): def base_name(self, base_name): """Sets the base_name of this CurrencyPair. - Transaction currency name # noqa: E501 + Transaction currency name. # noqa: E501 :param base_name: The base_name of this CurrencyPair. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def base_name(self, base_name): def quote(self): """Gets the quote of this CurrencyPair. # noqa: E501 - Quote currency # noqa: E501 + Quote currency. # noqa: E501 :return: The quote of this CurrencyPair. # noqa: E501 :rtype: str @@ -227,7 +227,7 @@ def quote(self): def quote(self, quote): """Sets the quote of this CurrencyPair. - Quote currency # noqa: E501 + Quote currency. # noqa: E501 :param quote: The quote of this CurrencyPair. # noqa: E501 :type: str @@ -239,7 +239,7 @@ def quote(self, quote): def quote_name(self): """Gets the quote_name of this CurrencyPair. # noqa: E501 - Name of the denominated currency # noqa: E501 + Name of the denominated currency. # noqa: E501 :return: The quote_name of this CurrencyPair. # noqa: E501 :rtype: str @@ -250,7 +250,7 @@ def quote_name(self): def quote_name(self, quote_name): """Sets the quote_name of this CurrencyPair. - Name of the denominated currency # noqa: E501 + Name of the denominated currency. # noqa: E501 :param quote_name: The quote_name of this CurrencyPair. # noqa: E501 :type: str @@ -262,7 +262,7 @@ def quote_name(self, quote_name): def fee(self): """Gets the fee of this CurrencyPair. # noqa: E501 - Trading fee # noqa: E501 + Trading fee. # noqa: E501 :return: The fee of this CurrencyPair. # noqa: E501 :rtype: str @@ -273,7 +273,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this CurrencyPair. - Trading fee # noqa: E501 + Trading fee. # noqa: E501 :param fee: The fee of this CurrencyPair. # noqa: E501 :type: str @@ -285,7 +285,7 @@ def fee(self, fee): def min_base_amount(self): """Gets the min_base_amount of this CurrencyPair. # noqa: E501 - Minimum amount of base currency to trade, `null` means no limit # noqa: E501 + Minimum amount of base currency to trade, `null` means no limit. # noqa: E501 :return: The min_base_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -296,7 +296,7 @@ def min_base_amount(self): def min_base_amount(self, min_base_amount): """Sets the min_base_amount of this CurrencyPair. - Minimum amount of base currency to trade, `null` means no limit # noqa: E501 + Minimum amount of base currency to trade, `null` means no limit. # noqa: E501 :param min_base_amount: The min_base_amount of this CurrencyPair. # noqa: E501 :type: str @@ -308,7 +308,7 @@ def min_base_amount(self, min_base_amount): def min_quote_amount(self): """Gets the min_quote_amount of this CurrencyPair. # noqa: E501 - Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 + Minimum amount of quote currency to trade, `null` means no limit. # noqa: E501 :return: The min_quote_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -319,7 +319,7 @@ def min_quote_amount(self): def min_quote_amount(self, min_quote_amount): """Sets the min_quote_amount of this CurrencyPair. - Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 + Minimum amount of quote currency to trade, `null` means no limit. # noqa: E501 :param min_quote_amount: The min_quote_amount of this CurrencyPair. # noqa: E501 :type: str @@ -331,7 +331,7 @@ def min_quote_amount(self, min_quote_amount): def max_base_amount(self): """Gets the max_base_amount of this CurrencyPair. # noqa: E501 - Maximum amount of base currency to trade, `null` means no limit # noqa: E501 + Maximum amount of base currency to trade, `null` means no limit. # noqa: E501 :return: The max_base_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -342,7 +342,7 @@ def max_base_amount(self): def max_base_amount(self, max_base_amount): """Sets the max_base_amount of this CurrencyPair. - Maximum amount of base currency to trade, `null` means no limit # noqa: E501 + Maximum amount of base currency to trade, `null` means no limit. # noqa: E501 :param max_base_amount: The max_base_amount of this CurrencyPair. # noqa: E501 :type: str @@ -354,7 +354,7 @@ def max_base_amount(self, max_base_amount): def max_quote_amount(self): """Gets the max_quote_amount of this CurrencyPair. # noqa: E501 - Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 + Maximum amount of quote currency to trade, `null` means no limit. # noqa: E501 :return: The max_quote_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -365,7 +365,7 @@ def max_quote_amount(self): def max_quote_amount(self, max_quote_amount): """Sets the max_quote_amount of this CurrencyPair. - Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 + Maximum amount of quote currency to trade, `null` means no limit. # noqa: E501 :param max_quote_amount: The max_quote_amount of this CurrencyPair. # noqa: E501 :type: str @@ -377,7 +377,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 + Amount scale. # noqa: E501 :return: The amount_precision of this CurrencyPair. # noqa: E501 :rtype: int @@ -388,7 +388,7 @@ def amount_precision(self): def amount_precision(self, amount_precision): """Sets the amount_precision of this CurrencyPair. - Amount scale # noqa: E501 + Amount scale. # noqa: E501 :param amount_precision: The amount_precision of this CurrencyPair. # noqa: E501 :type: int @@ -400,7 +400,7 @@ def amount_precision(self, amount_precision): def precision(self): """Gets the precision of this CurrencyPair. # noqa: E501 - Price scale # noqa: E501 + Price scale. # noqa: E501 :return: The precision of this CurrencyPair. # noqa: E501 :rtype: int @@ -411,7 +411,7 @@ def precision(self): def precision(self, precision): """Sets the precision of this CurrencyPair. - Price scale # noqa: E501 + Price scale. # noqa: E501 :param precision: The precision of this CurrencyPair. # noqa: E501 :type: int @@ -423,7 +423,7 @@ def precision(self, precision): def trade_status(self): """Gets the trade_status of this CurrencyPair. # noqa: E501 - How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501 + How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: sold # noqa: E501 :return: The trade_status of this CurrencyPair. # noqa: E501 :rtype: str @@ -434,7 +434,7 @@ def trade_status(self): def trade_status(self, trade_status): """Sets the trade_status of this CurrencyPair. - How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: can be bought or sold # noqa: E501 + How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: sold # noqa: E501 :param trade_status: The trade_status of this CurrencyPair. # noqa: E501 :type: str @@ -452,7 +452,7 @@ def trade_status(self, trade_status): def sell_start(self): """Gets the sell_start of this CurrencyPair. # noqa: E501 - Sell start unix timestamp in seconds # noqa: E501 + Sell start unix timestamp in seconds. # noqa: E501 :return: The sell_start of this CurrencyPair. # noqa: E501 :rtype: int @@ -463,7 +463,7 @@ def sell_start(self): def sell_start(self, sell_start): """Sets the sell_start of this CurrencyPair. - Sell start unix timestamp in seconds # noqa: E501 + Sell start unix timestamp in seconds. # noqa: E501 :param sell_start: The sell_start of this CurrencyPair. # noqa: E501 :type: int @@ -475,7 +475,7 @@ def sell_start(self, sell_start): def buy_start(self): """Gets the buy_start of this CurrencyPair. # noqa: E501 - Buy start unix timestamp in seconds # noqa: E501 + Buy start unix timestamp in seconds. # noqa: E501 :return: The buy_start of this CurrencyPair. # noqa: E501 :rtype: int @@ -486,7 +486,7 @@ def buy_start(self): def buy_start(self, buy_start): """Sets the buy_start of this CurrencyPair. - Buy start unix timestamp in seconds # noqa: E501 + Buy start unix timestamp in seconds. # noqa: E501 :param buy_start: The buy_start of this CurrencyPair. # noqa: E501 :type: int @@ -498,7 +498,7 @@ def buy_start(self, buy_start): def delisting_time(self): """Gets the delisting_time of this CurrencyPair. # noqa: E501 - Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501 + Expected time to remove the shelves, Unix timestamp in seconds. # noqa: E501 :return: The delisting_time of this CurrencyPair. # noqa: E501 :rtype: int @@ -509,7 +509,7 @@ def delisting_time(self): def delisting_time(self, delisting_time): """Sets the delisting_time of this CurrencyPair. - Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501 + Expected time to remove the shelves, Unix timestamp in seconds. # noqa: E501 :param delisting_time: The delisting_time of this CurrencyPair. # noqa: E501 :type: int @@ -521,7 +521,7 @@ def delisting_time(self, delisting_time): def type(self): """Gets the type of this CurrencyPair. # noqa: E501 - Trading pair type, normal: normal, premarket: pre-market # noqa: E501 + Trading pair type, normal: normal, premarket: pre-market. # noqa: E501 :return: The type of this CurrencyPair. # noqa: E501 :rtype: str @@ -532,7 +532,7 @@ def type(self): def type(self, type): """Sets the type of this CurrencyPair. - Trading pair type, normal: normal, premarket: pre-market # noqa: E501 + Trading pair type, normal: normal, premarket: pre-market. # noqa: E501 :param type: The type of this CurrencyPair. # noqa: E501 :type: str @@ -544,7 +544,7 @@ def type(self, type): def trade_url(self): """Gets the trade_url of this CurrencyPair. # noqa: E501 - Transaction link # noqa: E501 + Transaction link. # noqa: E501 :return: The trade_url of this CurrencyPair. # noqa: E501 :rtype: str @@ -555,7 +555,7 @@ def trade_url(self): def trade_url(self, trade_url): """Sets the trade_url of this CurrencyPair. - Transaction link # noqa: E501 + Transaction link. # noqa: E501 :param trade_url: The trade_url of this CurrencyPair. # noqa: E501 :type: str @@ -567,7 +567,7 @@ def trade_url(self, trade_url): def st_tag(self): """Gets the st_tag of this CurrencyPair. # noqa: E501 - Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501 + Whether the trading pair is in ST risk assessment, false - No, true - Yes. # noqa: E501 :return: The st_tag of this CurrencyPair. # noqa: E501 :rtype: bool @@ -578,7 +578,7 @@ def st_tag(self): def st_tag(self, st_tag): """Sets the st_tag of this CurrencyPair. - Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501 + Whether the trading pair is in ST risk assessment, false - No, true - Yes. # noqa: E501 :param st_tag: The st_tag of this CurrencyPair. # noqa: E501 :type: bool diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py index de6261d..2288c09 100644 --- a/gate_api/models/currency_quota.py +++ b/gate_api/models/currency_quota.py @@ -77,7 +77,7 @@ def __init__(self, currency=None, index_price=None, min_quota=None, left_quota=N def currency(self): """Gets the currency of this CurrencyQuota. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this CurrencyQuota. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CurrencyQuota. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this CurrencyQuota. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this CurrencyQuota. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this CurrencyQuota. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this CurrencyQuota. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this CurrencyQuota. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def index_price(self, index_price): def min_quota(self): """Gets the min_quota of this CurrencyQuota. # noqa: E501 - Minimum borrowing/collateral quota for the currency # noqa: E501 + Minimum borrowing/collateral quota for the currency. # noqa: E501 :return: The min_quota of this CurrencyQuota. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def min_quota(self): def min_quota(self, min_quota): """Sets the min_quota of this CurrencyQuota. - Minimum borrowing/collateral quota for the currency # noqa: E501 + Minimum borrowing/collateral quota for the currency. # noqa: E501 :param min_quota: The min_quota of this CurrencyQuota. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def min_quota(self, min_quota): def left_quota(self): """Gets the left_quota of this CurrencyQuota. # noqa: E501 - Remaining borrowing/collateral limit for the currency # noqa: E501 + Remaining borrowing/collateral limit for the currency. # noqa: E501 :return: The left_quota of this CurrencyQuota. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def left_quota(self): def left_quota(self, left_quota): """Sets the left_quota of this CurrencyQuota. - Remaining borrowing/collateral limit for the currency # noqa: E501 + Remaining borrowing/collateral limit for the currency. # noqa: E501 :param left_quota: The left_quota of this CurrencyQuota. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def left_quota(self, left_quota): def left_quote_usdt(self): """Gets the left_quote_usdt of this CurrencyQuota. # noqa: E501 - Remaining currency limit converted to USDT # noqa: E501 + Remaining currency limit converted to USDT. # noqa: E501 :return: The left_quote_usdt of this CurrencyQuota. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def left_quote_usdt(self): def left_quote_usdt(self, left_quote_usdt): """Sets the left_quote_usdt of this CurrencyQuota. - Remaining currency limit converted to USDT # noqa: E501 + Remaining currency limit converted to USDT. # noqa: E501 :param left_quote_usdt: The left_quote_usdt of this CurrencyQuota. # noqa: E501 :type: str diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py index 305d86f..5919508 100644 --- a/gate_api/models/debit_fee.py +++ b/gate_api/models/debit_fee.py @@ -56,7 +56,7 @@ def __init__(self, enabled=None, local_vars_configuration=None): # noqa: E501 def enabled(self): """Gets the enabled of this DebitFee. # noqa: E501 - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :return: The enabled of this DebitFee. # noqa: E501 :rtype: bool @@ -67,7 +67,7 @@ def enabled(self): def enabled(self, enabled): """Sets the enabled of this DebitFee. - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :param enabled: The enabled of this DebitFee. # noqa: E501 :type: bool diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py index 025cc0b..672129f 100644 --- a/gate_api/models/delivery_candlestick.py +++ b/gate_api/models/delivery_candlestick.py @@ -82,7 +82,7 @@ def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_co def t(self): """Gets the t of this DeliveryCandlestick. # noqa: E501 - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :return: The t of this DeliveryCandlestick. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def t(self): def t(self, t): """Sets the t of this DeliveryCandlestick. - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :param t: The t of this DeliveryCandlestick. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def t(self, t): def v(self): """Gets the v of this DeliveryCandlestick. # noqa: E501 - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 :return: The v of this DeliveryCandlestick. # noqa: E501 :rtype: int @@ -116,7 +116,7 @@ def v(self): def v(self, v): """Sets the v of this DeliveryCandlestick. - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 :param v: The v of this DeliveryCandlestick. # noqa: E501 :type: int @@ -128,7 +128,7 @@ def v(self, v): def c(self): """Gets the c of this DeliveryCandlestick. # noqa: E501 - Close price (quote currency) # noqa: E501 + Close price (quote currency). # noqa: E501 :return: The c of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def c(self): def c(self, c): """Sets the c of this DeliveryCandlestick. - Close price (quote currency) # noqa: E501 + Close price (quote currency). # noqa: E501 :param c: The c of this DeliveryCandlestick. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def c(self, c): def h(self): """Gets the h of this DeliveryCandlestick. # noqa: E501 - Highest price (quote currency) # noqa: E501 + Highest price (quote currency). # noqa: E501 :return: The h of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def h(self): def h(self, h): """Sets the h of this DeliveryCandlestick. - Highest price (quote currency) # noqa: E501 + Highest price (quote currency). # noqa: E501 :param h: The h of this DeliveryCandlestick. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def h(self, h): def l(self): """Gets the l of this DeliveryCandlestick. # noqa: E501 - Lowest price (quote currency) # noqa: E501 + Lowest price (quote currency). # noqa: E501 :return: The l of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def l(self): def l(self, l): """Sets the l of this DeliveryCandlestick. - Lowest price (quote currency) # noqa: E501 + Lowest price (quote currency). # noqa: E501 :param l: The l of this DeliveryCandlestick. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def l(self, l): def o(self): """Gets the o of this DeliveryCandlestick. # noqa: E501 - Open price (quote currency) # noqa: E501 + Open price (quote currency). # noqa: E501 :return: The o of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def o(self): def o(self, o): """Sets the o of this DeliveryCandlestick. - Open price (quote currency) # noqa: E501 + Open price (quote currency). # noqa: E501 :param o: The o of this DeliveryCandlestick. # noqa: E501 :type: str diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py index ad6c046..b6fa44e 100644 --- a/gate_api/models/delivery_contract.py +++ b/gate_api/models/delivery_contract.py @@ -242,7 +242,7 @@ def __init__(self, name=None, underlying=None, cycle=None, type=None, quanto_mul def name(self): """Gets the name of this DeliveryContract. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The name of this DeliveryContract. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def name(self): def name(self, name): """Sets the name of this DeliveryContract. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param name: The name of this DeliveryContract. # noqa: E501 :type: str @@ -265,7 +265,7 @@ def name(self, name): def underlying(self): """Gets the underlying of this DeliveryContract. # noqa: E501 - Underlying # noqa: E501 + Underlying. # noqa: E501 :return: The underlying of this DeliveryContract. # noqa: E501 :rtype: str @@ -276,7 +276,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this DeliveryContract. - Underlying # noqa: E501 + Underlying. # noqa: E501 :param underlying: The underlying of this DeliveryContract. # noqa: E501 :type: str @@ -288,7 +288,7 @@ def underlying(self, underlying): def cycle(self): """Gets the cycle of this DeliveryContract. # noqa: E501 - Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 + Cycle type, e.g. WEEKLY, QUARTERLY. # noqa: E501 :return: The cycle of this DeliveryContract. # noqa: E501 :rtype: str @@ -299,7 +299,7 @@ def cycle(self): def cycle(self, cycle): """Sets the cycle of this DeliveryContract. - Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 + Cycle type, e.g. WEEKLY, QUARTERLY. # noqa: E501 :param cycle: The cycle of this DeliveryContract. # noqa: E501 :type: str @@ -317,7 +317,7 @@ def cycle(self, cycle): def type(self): """Gets the type of this DeliveryContract. # noqa: E501 - Futures contract type # noqa: E501 + Futures contract type. # noqa: E501 :return: The type of this DeliveryContract. # noqa: E501 :rtype: str @@ -328,7 +328,7 @@ def type(self): def type(self, type): """Sets the type of this DeliveryContract. - Futures contract type # noqa: E501 + Futures contract type. # noqa: E501 :param type: The type of this DeliveryContract. # noqa: E501 :type: str @@ -346,7 +346,7 @@ def type(self, type): def quanto_multiplier(self): """Gets the quanto_multiplier of this DeliveryContract. # noqa: E501 - Multiplier used in converting from invoicing to settlement currency # noqa: E501 + Multiplier used in converting from invoicing to settlement currency. # noqa: E501 :return: The quanto_multiplier of this DeliveryContract. # noqa: E501 :rtype: str @@ -357,7 +357,7 @@ def quanto_multiplier(self): def quanto_multiplier(self, quanto_multiplier): """Sets the quanto_multiplier of this DeliveryContract. - Multiplier used in converting from invoicing to settlement currency # noqa: E501 + Multiplier used in converting from invoicing to settlement currency. # noqa: E501 :param quanto_multiplier: The quanto_multiplier of this DeliveryContract. # noqa: E501 :type: str @@ -369,7 +369,7 @@ def quanto_multiplier(self, quanto_multiplier): def leverage_min(self): """Gets the leverage_min of this DeliveryContract. # noqa: E501 - Minimum leverage # noqa: E501 + Minimum leverage. # noqa: E501 :return: The leverage_min of this DeliveryContract. # noqa: E501 :rtype: str @@ -380,7 +380,7 @@ def leverage_min(self): def leverage_min(self, leverage_min): """Sets the leverage_min of this DeliveryContract. - Minimum leverage # noqa: E501 + Minimum leverage. # noqa: E501 :param leverage_min: The leverage_min of this DeliveryContract. # noqa: E501 :type: str @@ -392,7 +392,7 @@ def leverage_min(self, leverage_min): def leverage_max(self): """Gets the leverage_max of this DeliveryContract. # noqa: E501 - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :return: The leverage_max of this DeliveryContract. # noqa: E501 :rtype: str @@ -403,7 +403,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this DeliveryContract. - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :param leverage_max: The leverage_max of this DeliveryContract. # noqa: E501 :type: str @@ -415,7 +415,7 @@ def leverage_max(self, leverage_max): def maintenance_rate(self): """Gets the maintenance_rate of this DeliveryContract. # noqa: E501 - Maintenance rate of margin # noqa: E501 + Maintenance rate of margin. # noqa: E501 :return: The maintenance_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -426,7 +426,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this DeliveryContract. - Maintenance rate of margin # noqa: E501 + Maintenance rate of margin. # noqa: E501 :param maintenance_rate: The maintenance_rate of this DeliveryContract. # noqa: E501 :type: str @@ -438,7 +438,7 @@ def maintenance_rate(self, maintenance_rate): def mark_type(self): """Gets the mark_type of this DeliveryContract. # noqa: E501 - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + Mark price type, internal - based on internal trading, external index price # noqa: E501 :return: The mark_type of this DeliveryContract. # noqa: E501 :rtype: str @@ -449,7 +449,7 @@ def mark_type(self): def mark_type(self, mark_type): """Sets the mark_type of this DeliveryContract. - Mark price type, internal - based on internal trading, index - based on external index price # noqa: E501 + Mark price type, internal - based on internal trading, external index price # noqa: E501 :param mark_type: The mark_type of this DeliveryContract. # noqa: E501 :type: str @@ -467,7 +467,7 @@ def mark_type(self, mark_type): def mark_price(self): """Gets the mark_price of this DeliveryContract. # noqa: E501 - Current mark price # noqa: E501 + Current mark price. # noqa: E501 :return: The mark_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -478,7 +478,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this DeliveryContract. - Current mark price # noqa: E501 + Current mark price. # noqa: E501 :param mark_price: The mark_price of this DeliveryContract. # noqa: E501 :type: str @@ -490,7 +490,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this DeliveryContract. # noqa: E501 - Current index price # noqa: E501 + Current index price. # noqa: E501 :return: The index_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -501,7 +501,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this DeliveryContract. - Current index price # noqa: E501 + Current index price. # noqa: E501 :param index_price: The index_price of this DeliveryContract. # noqa: E501 :type: str @@ -513,7 +513,7 @@ def index_price(self, index_price): def last_price(self): """Gets the last_price of this DeliveryContract. # noqa: E501 - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :return: The last_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -524,7 +524,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this DeliveryContract. - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :param last_price: The last_price of this DeliveryContract. # noqa: E501 :type: str @@ -536,7 +536,7 @@ def last_price(self, last_price): def maker_fee_rate(self): """Gets the maker_fee_rate of this DeliveryContract. # noqa: E501 - Maker fee rate, where negative means rebate # noqa: E501 + Maker fee rate, where negative means rebate. # noqa: E501 :return: The maker_fee_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -547,7 +547,7 @@ def maker_fee_rate(self): def maker_fee_rate(self, maker_fee_rate): """Sets the maker_fee_rate of this DeliveryContract. - Maker fee rate, where negative means rebate # noqa: E501 + Maker fee rate, where negative means rebate. # noqa: E501 :param maker_fee_rate: The maker_fee_rate of this DeliveryContract. # noqa: E501 :type: str @@ -559,7 +559,7 @@ def maker_fee_rate(self, maker_fee_rate): def taker_fee_rate(self): """Gets the taker_fee_rate of this DeliveryContract. # noqa: E501 - Taker fee rate # noqa: E501 + Taker fee rate. # noqa: E501 :return: The taker_fee_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -570,7 +570,7 @@ def taker_fee_rate(self): def taker_fee_rate(self, taker_fee_rate): """Sets the taker_fee_rate of this DeliveryContract. - Taker fee rate # noqa: E501 + Taker fee rate. # noqa: E501 :param taker_fee_rate: The taker_fee_rate of this DeliveryContract. # noqa: E501 :type: str @@ -582,7 +582,7 @@ def taker_fee_rate(self, taker_fee_rate): def order_price_round(self): """Gets the order_price_round of this DeliveryContract. # noqa: E501 - Minimum order price increment # noqa: E501 + Minimum order price increment. # noqa: E501 :return: The order_price_round of this DeliveryContract. # noqa: E501 :rtype: str @@ -593,7 +593,7 @@ def order_price_round(self): def order_price_round(self, order_price_round): """Sets the order_price_round of this DeliveryContract. - Minimum order price increment # noqa: E501 + Minimum order price increment. # noqa: E501 :param order_price_round: The order_price_round of this DeliveryContract. # noqa: E501 :type: str @@ -605,7 +605,7 @@ def order_price_round(self, order_price_round): def mark_price_round(self): """Gets the mark_price_round of this DeliveryContract. # noqa: E501 - Minimum mark price increment # noqa: E501 + Minimum mark price increment. # noqa: E501 :return: The mark_price_round of this DeliveryContract. # noqa: E501 :rtype: str @@ -616,7 +616,7 @@ def mark_price_round(self): def mark_price_round(self, mark_price_round): """Sets the mark_price_round of this DeliveryContract. - Minimum mark price increment # noqa: E501 + Minimum mark price increment. # noqa: E501 :param mark_price_round: The mark_price_round of this DeliveryContract. # noqa: E501 :type: str @@ -628,7 +628,7 @@ def mark_price_round(self, mark_price_round): def basis_rate(self): """Gets the basis_rate of this DeliveryContract. # noqa: E501 - Fair basis rate # noqa: E501 + Fair basis rate. # noqa: E501 :return: The basis_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -639,7 +639,7 @@ def basis_rate(self): def basis_rate(self, basis_rate): """Sets the basis_rate of this DeliveryContract. - Fair basis rate # noqa: E501 + Fair basis rate. # noqa: E501 :param basis_rate: The basis_rate of this DeliveryContract. # noqa: E501 :type: str @@ -651,7 +651,7 @@ def basis_rate(self, basis_rate): def basis_value(self): """Gets the basis_value of this DeliveryContract. # noqa: E501 - Fair basis value # noqa: E501 + Fair basis value. # noqa: E501 :return: The basis_value of this DeliveryContract. # noqa: E501 :rtype: str @@ -662,7 +662,7 @@ def basis_value(self): def basis_value(self, basis_value): """Sets the basis_value of this DeliveryContract. - Fair basis value # noqa: E501 + Fair basis value. # noqa: E501 :param basis_value: The basis_value of this DeliveryContract. # noqa: E501 :type: str @@ -674,7 +674,7 @@ def basis_value(self, basis_value): def basis_impact_value(self): """Gets the basis_impact_value of this DeliveryContract. # noqa: E501 - Funding used for calculating impact bid, ask price # noqa: E501 + Funding used for calculating impact bid, ask price. # noqa: E501 :return: The basis_impact_value of this DeliveryContract. # noqa: E501 :rtype: str @@ -685,7 +685,7 @@ def basis_impact_value(self): def basis_impact_value(self, basis_impact_value): """Sets the basis_impact_value of this DeliveryContract. - Funding used for calculating impact bid, ask price # noqa: E501 + Funding used for calculating impact bid, ask price. # noqa: E501 :param basis_impact_value: The basis_impact_value of this DeliveryContract. # noqa: E501 :type: str @@ -697,7 +697,7 @@ def basis_impact_value(self, basis_impact_value): def settle_price(self): """Gets the settle_price of this DeliveryContract. # noqa: E501 - Settle price # noqa: E501 + Settle price. # noqa: E501 :return: The settle_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -708,7 +708,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this DeliveryContract. - Settle price # noqa: E501 + Settle price. # noqa: E501 :param settle_price: The settle_price of this DeliveryContract. # noqa: E501 :type: str @@ -720,7 +720,7 @@ def settle_price(self, settle_price): def settle_price_interval(self): """Gets the settle_price_interval of this DeliveryContract. # noqa: E501 - Settle price update interval # noqa: E501 + Settle price update interval. # noqa: E501 :return: The settle_price_interval of this DeliveryContract. # noqa: E501 :rtype: int @@ -731,7 +731,7 @@ def settle_price_interval(self): def settle_price_interval(self, settle_price_interval): """Sets the settle_price_interval of this DeliveryContract. - Settle price update interval # noqa: E501 + Settle price update interval. # noqa: E501 :param settle_price_interval: The settle_price_interval of this DeliveryContract. # noqa: E501 :type: int @@ -743,7 +743,7 @@ def settle_price_interval(self, settle_price_interval): def settle_price_duration(self): """Gets the settle_price_duration of this DeliveryContract. # noqa: E501 - Settle price update duration in seconds # noqa: E501 + Settle price update duration in seconds. # noqa: E501 :return: The settle_price_duration of this DeliveryContract. # noqa: E501 :rtype: int @@ -754,7 +754,7 @@ def settle_price_duration(self): def settle_price_duration(self, settle_price_duration): """Sets the settle_price_duration of this DeliveryContract. - Settle price update duration in seconds # noqa: E501 + Settle price update duration in seconds. # noqa: E501 :param settle_price_duration: The settle_price_duration of this DeliveryContract. # noqa: E501 :type: int @@ -766,7 +766,7 @@ def settle_price_duration(self, settle_price_duration): def expire_time(self): """Gets the expire_time of this DeliveryContract. # noqa: E501 - Contract expiry timestamp # noqa: E501 + Contract expiry timestamp. # noqa: E501 :return: The expire_time of this DeliveryContract. # noqa: E501 :rtype: int @@ -777,7 +777,7 @@ def expire_time(self): def expire_time(self, expire_time): """Sets the expire_time of this DeliveryContract. - Contract expiry timestamp # noqa: E501 + Contract expiry timestamp. # noqa: E501 :param expire_time: The expire_time of this DeliveryContract. # noqa: E501 :type: int @@ -789,7 +789,7 @@ def expire_time(self, expire_time): def risk_limit_base(self): """Gets the risk_limit_base of this DeliveryContract. # noqa: E501 - Risk limit base # noqa: E501 + Risk limit base. # noqa: E501 :return: The risk_limit_base of this DeliveryContract. # noqa: E501 :rtype: str @@ -800,7 +800,7 @@ def risk_limit_base(self): def risk_limit_base(self, risk_limit_base): """Sets the risk_limit_base of this DeliveryContract. - Risk limit base # noqa: E501 + Risk limit base. # noqa: E501 :param risk_limit_base: The risk_limit_base of this DeliveryContract. # noqa: E501 :type: str @@ -812,7 +812,7 @@ def risk_limit_base(self, risk_limit_base): def risk_limit_step(self): """Gets the risk_limit_step of this DeliveryContract. # noqa: E501 - Step of adjusting risk limit # noqa: E501 + Step of adjusting risk limit. # noqa: E501 :return: The risk_limit_step of this DeliveryContract. # noqa: E501 :rtype: str @@ -823,7 +823,7 @@ def risk_limit_step(self): def risk_limit_step(self, risk_limit_step): """Sets the risk_limit_step of this DeliveryContract. - Step of adjusting risk limit # noqa: E501 + Step of adjusting risk limit. # noqa: E501 :param risk_limit_step: The risk_limit_step of this DeliveryContract. # noqa: E501 :type: str @@ -835,7 +835,7 @@ def risk_limit_step(self, risk_limit_step): def risk_limit_max(self): """Gets the risk_limit_max of this DeliveryContract. # noqa: E501 - Maximum risk limit the contract allowed # noqa: E501 + Maximum risk limit the contract allowed. # noqa: E501 :return: The risk_limit_max of this DeliveryContract. # noqa: E501 :rtype: str @@ -846,7 +846,7 @@ def risk_limit_max(self): def risk_limit_max(self, risk_limit_max): """Sets the risk_limit_max of this DeliveryContract. - Maximum risk limit the contract allowed # noqa: E501 + Maximum risk limit the contract allowed. # noqa: E501 :param risk_limit_max: The risk_limit_max of this DeliveryContract. # noqa: E501 :type: str @@ -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 the contract allowed # noqa: E501 + Minimum order size the contract allowed. # 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 the contract allowed # noqa: E501 + Minimum order size the contract allowed. # 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 the contract allowed # noqa: E501 + Maximum order size the contract allowed. # 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 the contract allowed # noqa: E501 + Maximum order size the contract allowed. # noqa: E501 :param order_size_max: The order_size_max of this DeliveryContract. # noqa: E501 :type: int @@ -927,7 +927,7 @@ def order_price_deviate(self, order_price_deviate): def ref_discount_rate(self): """Gets the ref_discount_rate of this DeliveryContract. # noqa: E501 - Referral fee rate discount # noqa: E501 + Referral fee rate discount. # noqa: E501 :return: The ref_discount_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -938,7 +938,7 @@ def ref_discount_rate(self): def ref_discount_rate(self, ref_discount_rate): """Sets the ref_discount_rate of this DeliveryContract. - Referral fee rate discount # noqa: E501 + Referral fee rate discount. # noqa: E501 :param ref_discount_rate: The ref_discount_rate of this DeliveryContract. # noqa: E501 :type: str @@ -950,7 +950,7 @@ def ref_discount_rate(self, ref_discount_rate): def ref_rebate_rate(self): """Gets the ref_rebate_rate of this DeliveryContract. # noqa: E501 - Referrer commission rate # noqa: E501 + Referrer commission rate. # noqa: E501 :return: The ref_rebate_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -961,7 +961,7 @@ def ref_rebate_rate(self): def ref_rebate_rate(self, ref_rebate_rate): """Sets the ref_rebate_rate of this DeliveryContract. - Referrer commission rate # noqa: E501 + Referrer commission rate. # noqa: E501 :param ref_rebate_rate: The ref_rebate_rate of this DeliveryContract. # noqa: E501 :type: str @@ -973,7 +973,7 @@ def ref_rebate_rate(self, ref_rebate_rate): def orderbook_id(self): """Gets the orderbook_id of this DeliveryContract. # noqa: E501 - Current orderbook ID # noqa: E501 + Current orderbook ID. # noqa: E501 :return: The orderbook_id of this DeliveryContract. # noqa: E501 :rtype: int @@ -984,7 +984,7 @@ def orderbook_id(self): def orderbook_id(self, orderbook_id): """Sets the orderbook_id of this DeliveryContract. - Current orderbook ID # noqa: E501 + Current orderbook ID. # noqa: E501 :param orderbook_id: The orderbook_id of this DeliveryContract. # noqa: E501 :type: int @@ -996,7 +996,7 @@ def orderbook_id(self, orderbook_id): def trade_id(self): """Gets the trade_id of this DeliveryContract. # noqa: E501 - Current trade ID # noqa: E501 + Current trade ID. # noqa: E501 :return: The trade_id of this DeliveryContract. # noqa: E501 :rtype: int @@ -1007,7 +1007,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this DeliveryContract. - Current trade ID # noqa: E501 + Current trade ID. # noqa: E501 :param trade_id: The trade_id of this DeliveryContract. # noqa: E501 :type: int @@ -1019,7 +1019,7 @@ def trade_id(self, trade_id): def trade_size(self): """Gets the trade_size of this DeliveryContract. # noqa: E501 - Historical accumulated trade size # noqa: E501 + Historical accumulated trade size. # noqa: E501 :return: The trade_size of this DeliveryContract. # noqa: E501 :rtype: int @@ -1030,7 +1030,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this DeliveryContract. - Historical accumulated trade size # noqa: E501 + Historical accumulated trade size. # noqa: E501 :param trade_size: The trade_size of this DeliveryContract. # noqa: E501 :type: int @@ -1042,7 +1042,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this DeliveryContract. # noqa: E501 - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :return: The position_size of this DeliveryContract. # noqa: E501 :rtype: int @@ -1053,7 +1053,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this DeliveryContract. - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :param position_size: The position_size of this DeliveryContract. # noqa: E501 :type: int @@ -1065,7 +1065,7 @@ def position_size(self, position_size): def config_change_time(self): """Gets the config_change_time of this DeliveryContract. # noqa: E501 - Last changed time of configuration # noqa: E501 + Last changed time of configuration. # noqa: E501 :return: The config_change_time of this DeliveryContract. # noqa: E501 :rtype: float @@ -1076,7 +1076,7 @@ def config_change_time(self): def config_change_time(self, config_change_time): """Sets the config_change_time of this DeliveryContract. - Last changed time of configuration # noqa: E501 + Last changed time of configuration. # noqa: E501 :param config_change_time: The config_change_time of this DeliveryContract. # noqa: E501 :type: float @@ -1088,7 +1088,7 @@ def config_change_time(self, config_change_time): def in_delisting(self): """Gets the in_delisting of this DeliveryContract. # noqa: E501 - Contract is delisting # noqa: E501 + Contract is delisting. # noqa: E501 :return: The in_delisting of this DeliveryContract. # noqa: E501 :rtype: bool @@ -1099,7 +1099,7 @@ def in_delisting(self): def in_delisting(self, in_delisting): """Sets the in_delisting of this DeliveryContract. - Contract is delisting # noqa: E501 + Contract is delisting. # noqa: E501 :param in_delisting: The in_delisting of this DeliveryContract. # noqa: E501 :type: bool @@ -1111,7 +1111,7 @@ def in_delisting(self, in_delisting): def orders_limit(self): """Gets the orders_limit of this DeliveryContract. # noqa: E501 - Maximum number of open orders # noqa: E501 + Maximum number of open orders. # noqa: E501 :return: The orders_limit of this DeliveryContract. # noqa: E501 :rtype: int @@ -1122,7 +1122,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this DeliveryContract. - Maximum number of open orders # noqa: E501 + Maximum number of open orders. # noqa: E501 :param orders_limit: The orders_limit of this DeliveryContract. # noqa: E501 :type: int diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py index 5aaefc0..a75acae 100644 --- a/gate_api/models/delivery_settlement.py +++ b/gate_api/models/delivery_settlement.py @@ -97,7 +97,7 @@ def __init__(self, time=None, contract=None, leverage=None, size=None, margin=No def time(self): """Gets the time of this DeliverySettlement. # noqa: E501 - Liquidation time # noqa: E501 + Liquidation time. # noqa: E501 :return: The time of this DeliverySettlement. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def time(self): def time(self, time): """Sets the time of this DeliverySettlement. - Liquidation time # noqa: E501 + Liquidation time. # noqa: E501 :param time: The time of this DeliverySettlement. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def time(self, time): def contract(self): """Gets the contract of this DeliverySettlement. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this DeliverySettlement. # noqa: E501 :rtype: str @@ -131,7 +131,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this DeliverySettlement. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this DeliverySettlement. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def contract(self, contract): def leverage(self): """Gets the leverage of this DeliverySettlement. # noqa: E501 - Position leverage # noqa: E501 + Position leverage. # 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 + Position leverage. # noqa: E501 :param leverage: The leverage of this DeliverySettlement. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def leverage(self, leverage): def size(self): """Gets the size of this DeliverySettlement. # noqa: E501 - Position size # noqa: E501 + Position size. # noqa: E501 :return: The size of this DeliverySettlement. # noqa: E501 :rtype: int @@ -177,7 +177,7 @@ def size(self): def size(self, size): """Sets the size of this DeliverySettlement. - Position size # noqa: E501 + Position size. # noqa: E501 :param size: The size of this DeliverySettlement. # noqa: E501 :type: int @@ -189,7 +189,7 @@ def size(self, size): def margin(self): """Gets the margin of this DeliverySettlement. # noqa: E501 - Position margin # noqa: E501 + Position 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 + Position margin. # noqa: E501 :param margin: The margin of this DeliverySettlement. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def margin(self, margin): def entry_price(self): """Gets the entry_price of this DeliverySettlement. # noqa: E501 - Average entry price # noqa: E501 + Average entry price. # noqa: E501 :return: The entry_price of this DeliverySettlement. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this DeliverySettlement. - Average entry price # noqa: E501 + Average entry price. # noqa: E501 :param entry_price: The entry_price of this DeliverySettlement. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def entry_price(self, entry_price): def settle_price(self): """Gets the settle_price of this DeliverySettlement. # noqa: E501 - Settled price # noqa: E501 + Settled price. # noqa: E501 :return: The settle_price of this DeliverySettlement. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this DeliverySettlement. - Settled price # noqa: E501 + Settled price. # noqa: E501 :param settle_price: The settle_price of this DeliverySettlement. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def settle_price(self, settle_price): def profit(self): """Gets the profit of this DeliverySettlement. # noqa: E501 - Profit # noqa: E501 + Profit. # noqa: E501 :return: The profit of this DeliverySettlement. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def profit(self): def profit(self, profit): """Sets the profit of this DeliverySettlement. - Profit # noqa: E501 + Profit. # noqa: E501 :param profit: The profit of this DeliverySettlement. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def profit(self, profit): def fee(self): """Gets the fee of this DeliverySettlement. # noqa: E501 - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :return: The fee of this DeliverySettlement. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this DeliverySettlement. - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :param fee: The fee of this DeliverySettlement. # noqa: E501 :type: str diff --git a/gate_api/models/delivery_ticker.py b/gate_api/models/delivery_ticker.py index 87eb57c..a7692f6 100644 --- a/gate_api/models/delivery_ticker.py +++ b/gate_api/models/delivery_ticker.py @@ -167,7 +167,7 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= def contract(self): """Gets the contract of this DeliveryTicker. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this DeliveryTicker. # noqa: E501 :rtype: str @@ -178,7 +178,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this DeliveryTicker. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this DeliveryTicker. # noqa: E501 :type: str @@ -190,7 +190,7 @@ def contract(self, contract): def last(self): """Gets the last of this DeliveryTicker. # noqa: E501 - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :return: The last of this DeliveryTicker. # noqa: E501 :rtype: str @@ -201,7 +201,7 @@ def last(self): def last(self, last): """Sets the last of this DeliveryTicker. - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :param last: The last of this DeliveryTicker. # noqa: E501 :type: str @@ -236,7 +236,7 @@ def change_percentage(self, change_percentage): def total_size(self): """Gets the total_size of this DeliveryTicker. # noqa: E501 - Contract total size # noqa: E501 + Contract total size. # noqa: E501 :return: The total_size of this DeliveryTicker. # noqa: E501 :rtype: str @@ -247,7 +247,7 @@ def total_size(self): def total_size(self, total_size): """Sets the total_size of this DeliveryTicker. - Contract total size # noqa: E501 + Contract total size. # noqa: E501 :param total_size: The total_size of this DeliveryTicker. # noqa: E501 :type: str @@ -259,7 +259,7 @@ def total_size(self, total_size): def low_24h(self): """Gets the low_24h of this DeliveryTicker. # noqa: E501 - Lowest trading price in recent 24h # noqa: E501 + Lowest trading price in recent 24h. # noqa: E501 :return: The low_24h of this DeliveryTicker. # noqa: E501 :rtype: str @@ -270,7 +270,7 @@ def low_24h(self): def low_24h(self, low_24h): """Sets the low_24h of this DeliveryTicker. - Lowest trading price in recent 24h # noqa: E501 + Lowest trading price in recent 24h. # noqa: E501 :param low_24h: The low_24h of this DeliveryTicker. # noqa: E501 :type: str @@ -282,7 +282,7 @@ def low_24h(self, low_24h): def high_24h(self): """Gets the high_24h of this DeliveryTicker. # noqa: E501 - Highest trading price in recent 24h # noqa: E501 + Highest trading price in recent 24h. # noqa: E501 :return: The high_24h of this DeliveryTicker. # noqa: E501 :rtype: str @@ -293,7 +293,7 @@ def high_24h(self): def high_24h(self, high_24h): """Sets the high_24h of this DeliveryTicker. - Highest trading price in recent 24h # noqa: E501 + Highest trading price in recent 24h. # noqa: E501 :param high_24h: The high_24h of this DeliveryTicker. # noqa: E501 :type: str @@ -305,7 +305,7 @@ def high_24h(self, high_24h): def volume_24h(self): """Gets the volume_24h of this DeliveryTicker. # noqa: E501 - Trade size in recent 24h # noqa: E501 + Trade size in recent 24h. # noqa: E501 :return: The volume_24h of this DeliveryTicker. # noqa: E501 :rtype: str @@ -316,7 +316,7 @@ def volume_24h(self): def volume_24h(self, volume_24h): """Sets the volume_24h of this DeliveryTicker. - Trade size in recent 24h # noqa: E501 + Trade size in recent 24h. # noqa: E501 :param volume_24h: The volume_24h of this DeliveryTicker. # noqa: E501 :type: str @@ -374,7 +374,7 @@ def volume_24h_usd(self, volume_24h_usd): def volume_24h_base(self): """Gets the volume_24h_base of this DeliveryTicker. # noqa: E501 - Trade volume in recent 24h, in base currency # noqa: E501 + Trade volume in recent 24h, in base currency. # noqa: E501 :return: The volume_24h_base of this DeliveryTicker. # noqa: E501 :rtype: str @@ -385,7 +385,7 @@ def volume_24h_base(self): def volume_24h_base(self, volume_24h_base): """Sets the volume_24h_base of this DeliveryTicker. - Trade volume in recent 24h, in base currency # noqa: E501 + Trade volume in recent 24h, in base currency. # noqa: E501 :param volume_24h_base: The volume_24h_base of this DeliveryTicker. # noqa: E501 :type: str @@ -397,7 +397,7 @@ def volume_24h_base(self, volume_24h_base): def volume_24h_quote(self): """Gets the volume_24h_quote of this DeliveryTicker. # noqa: E501 - Trade volume in recent 24h, in quote currency # noqa: E501 + Trade volume in recent 24h, in quote currency. # noqa: E501 :return: The volume_24h_quote of this DeliveryTicker. # noqa: E501 :rtype: str @@ -408,7 +408,7 @@ def volume_24h_quote(self): def volume_24h_quote(self, volume_24h_quote): """Sets the volume_24h_quote of this DeliveryTicker. - Trade volume in recent 24h, in quote currency # noqa: E501 + Trade volume in recent 24h, in quote currency. # noqa: E501 :param volume_24h_quote: The volume_24h_quote of this DeliveryTicker. # noqa: E501 :type: str @@ -420,7 +420,7 @@ def volume_24h_quote(self, volume_24h_quote): def volume_24h_settle(self): """Gets the volume_24h_settle of this DeliveryTicker. # noqa: E501 - Trade volume in recent 24h, in settle currency # noqa: E501 + Trade volume in recent 24h, in settle currency. # noqa: E501 :return: The volume_24h_settle of this DeliveryTicker. # noqa: E501 :rtype: str @@ -431,7 +431,7 @@ def volume_24h_settle(self): def volume_24h_settle(self, volume_24h_settle): """Sets the volume_24h_settle of this DeliveryTicker. - Trade volume in recent 24h, in settle currency # noqa: E501 + Trade volume in recent 24h, in settle currency. # noqa: E501 :param volume_24h_settle: The volume_24h_settle of this DeliveryTicker. # noqa: E501 :type: str @@ -443,7 +443,7 @@ def volume_24h_settle(self, volume_24h_settle): def mark_price(self): """Gets the mark_price of this DeliveryTicker. # noqa: E501 - Recent mark price # noqa: E501 + Recent mark price. # noqa: E501 :return: The mark_price of this DeliveryTicker. # noqa: E501 :rtype: str @@ -454,7 +454,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this DeliveryTicker. - Recent mark price # noqa: E501 + Recent mark price. # noqa: E501 :param mark_price: The mark_price of this DeliveryTicker. # noqa: E501 :type: str @@ -466,7 +466,7 @@ def mark_price(self, mark_price): def funding_rate(self): """Gets the funding_rate of this DeliveryTicker. # noqa: E501 - Funding rate # noqa: E501 + Funding rate. # noqa: E501 :return: The funding_rate of this DeliveryTicker. # noqa: E501 :rtype: str @@ -477,7 +477,7 @@ def funding_rate(self): def funding_rate(self, funding_rate): """Sets the funding_rate of this DeliveryTicker. - Funding rate # noqa: E501 + Funding rate. # noqa: E501 :param funding_rate: The funding_rate of this DeliveryTicker. # noqa: E501 :type: str @@ -489,7 +489,7 @@ def funding_rate(self, funding_rate): def funding_rate_indicative(self): """Gets the funding_rate_indicative of this DeliveryTicker. # noqa: E501 - Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 :return: The funding_rate_indicative of this DeliveryTicker. # noqa: E501 :rtype: str @@ -500,7 +500,7 @@ def funding_rate_indicative(self): def funding_rate_indicative(self, funding_rate_indicative): """Sets the funding_rate_indicative of this DeliveryTicker. - Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 :param funding_rate_indicative: The funding_rate_indicative of this DeliveryTicker. # noqa: E501 :type: str @@ -512,7 +512,7 @@ def funding_rate_indicative(self, funding_rate_indicative): def index_price(self): """Gets the index_price of this DeliveryTicker. # noqa: E501 - Index price # noqa: E501 + Index price. # noqa: E501 :return: The index_price of this DeliveryTicker. # noqa: E501 :rtype: str @@ -523,7 +523,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this DeliveryTicker. - Index price # noqa: E501 + Index price. # noqa: E501 :param index_price: The index_price of this DeliveryTicker. # noqa: E501 :type: str @@ -558,7 +558,7 @@ def quanto_base_rate(self, quanto_base_rate): def basis_rate(self): """Gets the basis_rate of this DeliveryTicker. # noqa: E501 - Basis rate # noqa: E501 + Basis rate. # noqa: E501 :return: The basis_rate of this DeliveryTicker. # noqa: E501 :rtype: str @@ -569,7 +569,7 @@ def basis_rate(self): def basis_rate(self, basis_rate): """Sets the basis_rate of this DeliveryTicker. - Basis rate # noqa: E501 + Basis rate. # noqa: E501 :param basis_rate: The basis_rate of this DeliveryTicker. # noqa: E501 :type: str @@ -581,7 +581,7 @@ def basis_rate(self, basis_rate): def basis_value(self): """Gets the basis_value of this DeliveryTicker. # noqa: E501 - Basis value # noqa: E501 + Basis value. # noqa: E501 :return: The basis_value of this DeliveryTicker. # noqa: E501 :rtype: str @@ -592,7 +592,7 @@ def basis_value(self): def basis_value(self, basis_value): """Sets the basis_value of this DeliveryTicker. - Basis value # noqa: E501 + Basis value. # noqa: E501 :param basis_value: The basis_value of this DeliveryTicker. # noqa: E501 :type: str @@ -604,7 +604,7 @@ def basis_value(self, basis_value): def lowest_ask(self): """Gets the lowest_ask of this DeliveryTicker. # noqa: E501 - Recent lowest ask # noqa: E501 + Recent lowest ask. # noqa: E501 :return: The lowest_ask of this DeliveryTicker. # noqa: E501 :rtype: str @@ -615,7 +615,7 @@ def lowest_ask(self): def lowest_ask(self, lowest_ask): """Sets the lowest_ask of this DeliveryTicker. - Recent lowest ask # noqa: E501 + Recent lowest ask. # noqa: E501 :param lowest_ask: The lowest_ask of this DeliveryTicker. # noqa: E501 :type: str @@ -627,7 +627,7 @@ def lowest_ask(self, lowest_ask): def lowest_size(self): """Gets the lowest_size of this DeliveryTicker. # noqa: E501 - The latest seller's lowest price order quantity # noqa: E501 + The latest seller's lowest price order quantity. # noqa: E501 :return: The lowest_size of this DeliveryTicker. # noqa: E501 :rtype: str @@ -638,7 +638,7 @@ def lowest_size(self): def lowest_size(self, lowest_size): """Sets the lowest_size of this DeliveryTicker. - The latest seller's lowest price order quantity # noqa: E501 + The latest seller's lowest price order quantity. # noqa: E501 :param lowest_size: The lowest_size of this DeliveryTicker. # noqa: E501 :type: str @@ -650,7 +650,7 @@ def lowest_size(self, lowest_size): def highest_bid(self): """Gets the highest_bid of this DeliveryTicker. # noqa: E501 - Recent highest bid # noqa: E501 + Recent highest bid. # noqa: E501 :return: The highest_bid of this DeliveryTicker. # noqa: E501 :rtype: str @@ -661,7 +661,7 @@ def highest_bid(self): def highest_bid(self, highest_bid): """Sets the highest_bid of this DeliveryTicker. - Recent highest bid # noqa: E501 + Recent highest bid. # noqa: E501 :param highest_bid: The highest_bid of this DeliveryTicker. # noqa: E501 :type: str @@ -673,7 +673,7 @@ def highest_bid(self, highest_bid): def highest_size(self): """Gets the highest_size of this DeliveryTicker. # noqa: E501 - The latest buyer's highest price order volume # noqa: E501 + The latest buyer's highest price order volume. # noqa: E501 :return: The highest_size of this DeliveryTicker. # noqa: E501 :rtype: str @@ -684,7 +684,7 @@ def highest_size(self): def highest_size(self, highest_size): """Sets the highest_size of this DeliveryTicker. - The latest buyer's highest price order volume # noqa: E501 + The latest buyer's highest price order volume. # noqa: E501 :param highest_size: The highest_size of this DeliveryTicker. # noqa: E501 :type: str diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py index 9a5cdf3..e957503 100644 --- a/gate_api/models/deposit_address.py +++ b/gate_api/models/deposit_address.py @@ -65,7 +65,7 @@ def __init__(self, currency=None, address=None, multichain_addresses=None, local def currency(self): """Gets the currency of this DepositAddress. # noqa: E501 - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :return: The currency of this DepositAddress. # noqa: E501 :rtype: str @@ -76,7 +76,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this DepositAddress. - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :param currency: The currency of this DepositAddress. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def address(self): """Gets the address of this DepositAddress. # noqa: E501 - Deposit address # noqa: E501 + Deposit address. # noqa: E501 :return: The address of this DepositAddress. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def address(self): def address(self, address): """Sets the address of this DepositAddress. - Deposit address # noqa: E501 + Deposit address. # noqa: E501 :param address: The address of this DepositAddress. # noqa: E501 :type: str diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py index 2cf4d9a..814e143 100644 --- a/gate_api/models/deposit_record.py +++ b/gate_api/models/deposit_record.py @@ -99,7 +99,7 @@ def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, a def id(self): """Gets the id of this DepositRecord. # noqa: E501 - Record ID # noqa: E501 + Record ID. # noqa: E501 :return: The id of this DepositRecord. # noqa: E501 :rtype: str @@ -110,7 +110,7 @@ def id(self): def id(self, id): """Sets the id of this DepositRecord. - Record ID # noqa: E501 + Record ID. # noqa: E501 :param id: The id of this DepositRecord. # noqa: E501 :type: str @@ -122,7 +122,7 @@ def id(self, id): def txid(self): """Gets the txid of this DepositRecord. # noqa: E501 - Hash record of the withdrawal # noqa: E501 + Hash record of the withdrawal. # noqa: E501 :return: The txid of this DepositRecord. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def txid(self): def txid(self, txid): """Sets the txid of this DepositRecord. - Hash record of the withdrawal # noqa: E501 + Hash record of the withdrawal. # noqa: E501 :param txid: The txid of this DepositRecord. # noqa: E501 :type: str @@ -168,7 +168,7 @@ def withdraw_order_id(self, withdraw_order_id): def timestamp(self): """Gets the timestamp of this DepositRecord. # noqa: E501 - Operation time # noqa: E501 + Operation time. # noqa: E501 :return: The timestamp of this DepositRecord. # noqa: E501 :rtype: str @@ -179,7 +179,7 @@ def timestamp(self): def timestamp(self, timestamp): """Sets the timestamp of this DepositRecord. - Operation time # noqa: E501 + Operation time. # noqa: E501 :param timestamp: The timestamp of this DepositRecord. # noqa: E501 :type: str @@ -191,7 +191,7 @@ def timestamp(self, timestamp): def amount(self): """Gets the amount of this DepositRecord. # noqa: E501 - Currency amount # noqa: E501 + Currency amount. # noqa: E501 :return: The amount of this DepositRecord. # noqa: E501 :rtype: str @@ -202,7 +202,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this DepositRecord. - Currency amount # noqa: E501 + Currency amount. # noqa: E501 :param amount: The amount of this DepositRecord. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def amount(self, amount): def currency(self): """Gets the currency of this DepositRecord. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this DepositRecord. # noqa: E501 :rtype: str @@ -227,7 +227,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this DepositRecord. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this DepositRecord. # noqa: E501 :type: str @@ -241,7 +241,7 @@ def currency(self, currency): def address(self): """Gets the address of this DepositRecord. # noqa: E501 - Withdrawal address. Required for withdrawals # noqa: E501 + Withdrawal address. Required for withdrawals. # noqa: E501 :return: The address of this DepositRecord. # noqa: E501 :rtype: str @@ -252,7 +252,7 @@ def address(self): def address(self, address): """Sets the address of this DepositRecord. - Withdrawal address. Required for withdrawals # noqa: E501 + Withdrawal address. Required for withdrawals. # noqa: E501 :param address: The address of this DepositRecord. # noqa: E501 :type: str @@ -264,7 +264,7 @@ def address(self, address): def memo(self): """Gets the memo of this DepositRecord. # noqa: E501 - Additional remarks with regards to the withdrawal # noqa: E501 + Additional remarks with regards to the withdrawal. # noqa: E501 :return: The memo of this DepositRecord. # noqa: E501 :rtype: str @@ -275,7 +275,7 @@ def memo(self): def memo(self, memo): """Sets the memo of this DepositRecord. - Additional remarks with regards to the withdrawal # noqa: E501 + Additional remarks with regards to the withdrawal. # noqa: E501 :param memo: The memo of this DepositRecord. # noqa: E501 :type: str @@ -310,7 +310,7 @@ def status(self, status): def chain(self): """Gets the chain of this DepositRecord. # noqa: E501 - Name of the chain used in withdrawals # noqa: E501 + Name of the chain used in withdrawals. # noqa: E501 :return: The chain of this DepositRecord. # noqa: E501 :rtype: str @@ -321,7 +321,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this DepositRecord. - Name of the chain used in withdrawals # noqa: E501 + Name of the chain used in withdrawals. # noqa: E501 :param chain: The chain of this DepositRecord. # noqa: E501 :type: str diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py index 3a3cdde..40312d5 100644 --- a/gate_api/models/dual_get_orders.py +++ b/gate_api/models/dual_get_orders.py @@ -137,7 +137,7 @@ def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settl def id(self): """Gets the id of this DualGetOrders. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this DualGetOrders. # noqa: E501 :rtype: int @@ -148,7 +148,7 @@ def id(self): def id(self, id): """Sets the id of this DualGetOrders. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this DualGetOrders. # noqa: E501 :type: int @@ -160,7 +160,7 @@ def id(self, id): def plan_id(self): """Gets the plan_id of this DualGetOrders. # noqa: E501 - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :return: The plan_id of this DualGetOrders. # noqa: E501 :rtype: int @@ -171,7 +171,7 @@ def plan_id(self): def plan_id(self, plan_id): """Sets the plan_id of this DualGetOrders. - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :param plan_id: The plan_id of this DualGetOrders. # noqa: E501 :type: int @@ -183,7 +183,7 @@ def plan_id(self, plan_id): def copies(self): """Gets the copies of this DualGetOrders. # noqa: E501 - Copies # noqa: E501 + Copies. # noqa: E501 :return: The copies of this DualGetOrders. # noqa: E501 :rtype: str @@ -194,7 +194,7 @@ def copies(self): def copies(self, copies): """Sets the copies of this DualGetOrders. - Copies # noqa: E501 + Copies. # noqa: E501 :param copies: The copies of this DualGetOrders. # noqa: E501 :type: str @@ -206,7 +206,7 @@ def copies(self, copies): def invest_amount(self): """Gets the invest_amount of this DualGetOrders. # noqa: E501 - Investment Amount # noqa: E501 + Investment Amount. # noqa: E501 :return: The invest_amount of this DualGetOrders. # noqa: E501 :rtype: str @@ -217,7 +217,7 @@ def invest_amount(self): def invest_amount(self, invest_amount): """Sets the invest_amount of this DualGetOrders. - Investment Amount # noqa: E501 + Investment Amount. # noqa: E501 :param invest_amount: The invest_amount of this DualGetOrders. # noqa: E501 :type: str @@ -229,7 +229,7 @@ def invest_amount(self, invest_amount): def settlement_amount(self): """Gets the settlement_amount of this DualGetOrders. # noqa: E501 - Settlement Amount # noqa: E501 + Settlement Amount. # noqa: E501 :return: The settlement_amount of this DualGetOrders. # noqa: E501 :rtype: str @@ -240,7 +240,7 @@ def settlement_amount(self): def settlement_amount(self, settlement_amount): """Sets the settlement_amount of this DualGetOrders. - Settlement Amount # noqa: E501 + Settlement Amount. # noqa: E501 :param settlement_amount: The settlement_amount of this DualGetOrders. # noqa: E501 :type: str @@ -252,7 +252,7 @@ def settlement_amount(self, settlement_amount): def create_time(self): """Gets the create_time of this DualGetOrders. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The create_time of this DualGetOrders. # noqa: E501 :rtype: int @@ -263,7 +263,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this DualGetOrders. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param create_time: The create_time of this DualGetOrders. # noqa: E501 :type: int @@ -275,7 +275,7 @@ def create_time(self, create_time): def complete_time(self): """Gets the complete_time of this DualGetOrders. # noqa: E501 - Completion Time # noqa: E501 + Completion Time. # noqa: E501 :return: The complete_time of this DualGetOrders. # noqa: E501 :rtype: int @@ -286,7 +286,7 @@ def complete_time(self): def complete_time(self, complete_time): """Sets the complete_time of this DualGetOrders. - Completion Time # noqa: E501 + Completion Time. # noqa: E501 :param complete_time: The complete_time of this DualGetOrders. # noqa: E501 :type: int @@ -321,7 +321,7 @@ def status(self, status): def invest_currency(self): """Gets the invest_currency of this DualGetOrders. # noqa: E501 - Investment Currency # noqa: E501 + Investment Currency. # noqa: E501 :return: The invest_currency of this DualGetOrders. # noqa: E501 :rtype: str @@ -332,7 +332,7 @@ def invest_currency(self): def invest_currency(self, invest_currency): """Sets the invest_currency of this DualGetOrders. - Investment Currency # noqa: E501 + Investment Currency. # noqa: E501 :param invest_currency: The invest_currency of this DualGetOrders. # noqa: E501 :type: str @@ -344,7 +344,7 @@ def invest_currency(self, invest_currency): def exercise_currency(self): """Gets the exercise_currency of this DualGetOrders. # noqa: E501 - Strike Currency # noqa: E501 + Strike Currency. # noqa: E501 :return: The exercise_currency of this DualGetOrders. # noqa: E501 :rtype: str @@ -355,7 +355,7 @@ def exercise_currency(self): def exercise_currency(self, exercise_currency): """Sets the exercise_currency of this DualGetOrders. - Strike Currency # noqa: E501 + Strike Currency. # noqa: E501 :param exercise_currency: The exercise_currency of this DualGetOrders. # noqa: E501 :type: str @@ -367,7 +367,7 @@ def exercise_currency(self, exercise_currency): def exercise_price(self): """Gets the exercise_price of this DualGetOrders. # noqa: E501 - Strike price # noqa: E501 + Strike price. # noqa: E501 :return: The exercise_price of this DualGetOrders. # noqa: E501 :rtype: str @@ -378,7 +378,7 @@ def exercise_price(self): def exercise_price(self, exercise_price): """Sets the exercise_price of this DualGetOrders. - Strike price # noqa: E501 + Strike price. # noqa: E501 :param exercise_price: The exercise_price of this DualGetOrders. # noqa: E501 :type: str @@ -390,7 +390,7 @@ def exercise_price(self, exercise_price): def settlement_price(self): """Gets the settlement_price of this DualGetOrders. # noqa: E501 - settlement price # noqa: E501 + settlement price. # noqa: E501 :return: The settlement_price of this DualGetOrders. # noqa: E501 :rtype: str @@ -401,7 +401,7 @@ def settlement_price(self): def settlement_price(self, settlement_price): """Sets the settlement_price of this DualGetOrders. - settlement price # noqa: E501 + settlement price. # noqa: E501 :param settlement_price: The settlement_price of this DualGetOrders. # noqa: E501 :type: str @@ -413,7 +413,7 @@ def settlement_price(self, settlement_price): def settlement_currency(self): """Gets the settlement_currency of this DualGetOrders. # noqa: E501 - Settle currency # noqa: E501 + Settle currency. # noqa: E501 :return: The settlement_currency of this DualGetOrders. # noqa: E501 :rtype: str @@ -424,7 +424,7 @@ def settlement_currency(self): def settlement_currency(self, settlement_currency): """Sets the settlement_currency of this DualGetOrders. - Settle currency # noqa: E501 + Settle currency. # noqa: E501 :param settlement_currency: The settlement_currency of this DualGetOrders. # noqa: E501 :type: str @@ -436,7 +436,7 @@ def settlement_currency(self, settlement_currency): def apy_display(self): """Gets the apy_display of this DualGetOrders. # noqa: E501 - APY # noqa: E501 + APY. # noqa: E501 :return: The apy_display of this DualGetOrders. # noqa: E501 :rtype: str @@ -447,7 +447,7 @@ def apy_display(self): def apy_display(self, apy_display): """Sets the apy_display of this DualGetOrders. - APY # noqa: E501 + APY. # noqa: E501 :param apy_display: The apy_display of this DualGetOrders. # noqa: E501 :type: str @@ -459,7 +459,7 @@ def apy_display(self, apy_display): def apy_settlement(self): """Gets the apy_settlement of this DualGetOrders. # noqa: E501 - Settlement APY # noqa: E501 + Settlement APY. # noqa: E501 :return: The apy_settlement of this DualGetOrders. # noqa: E501 :rtype: str @@ -470,7 +470,7 @@ def apy_settlement(self): def apy_settlement(self, apy_settlement): """Sets the apy_settlement of this DualGetOrders. - Settlement APY # noqa: E501 + Settlement APY. # noqa: E501 :param apy_settlement: The apy_settlement of this DualGetOrders. # noqa: E501 :type: str @@ -482,7 +482,7 @@ def apy_settlement(self, apy_settlement): def delivery_time(self): """Gets the delivery_time of this DualGetOrders. # noqa: E501 - Settlement time # noqa: E501 + Settlement time. # noqa: E501 :return: The delivery_time of this DualGetOrders. # noqa: E501 :rtype: int @@ -493,7 +493,7 @@ def delivery_time(self): def delivery_time(self, delivery_time): """Sets the delivery_time of this DualGetOrders. - Settlement time # noqa: E501 + Settlement time. # noqa: E501 :param delivery_time: The delivery_time of this DualGetOrders. # noqa: E501 :type: int @@ -505,7 +505,7 @@ def delivery_time(self, delivery_time): def text(self): """Gets the text of this DualGetOrders. # noqa: E501 - Custom order information # noqa: E501 + Custom order information. # noqa: E501 :return: The text of this DualGetOrders. # noqa: E501 :rtype: str @@ -516,7 +516,7 @@ def text(self): def text(self, text): """Sets the text of this DualGetOrders. - Custom order information # noqa: E501 + Custom order information. # noqa: E501 :param text: The text of this DualGetOrders. # noqa: E501 :type: str diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py index 208b83a..f3ad42b 100644 --- a/gate_api/models/dual_get_plans.py +++ b/gate_api/models/dual_get_plans.py @@ -117,7 +117,7 @@ def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise def id(self): """Gets the id of this DualGetPlans. # noqa: E501 - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :return: The id of this DualGetPlans. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def id(self): def id(self, id): """Sets the id of this DualGetPlans. - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :param id: The id of this DualGetPlans. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def id(self, id): def instrument_name(self): """Gets the instrument_name of this DualGetPlans. # noqa: E501 - Instrument Name # noqa: E501 + Instrument Name. # noqa: E501 :return: The instrument_name of this DualGetPlans. # noqa: E501 :rtype: str @@ -151,7 +151,7 @@ def instrument_name(self): def instrument_name(self, instrument_name): """Sets the instrument_name of this DualGetPlans. - Instrument Name # noqa: E501 + Instrument Name. # noqa: E501 :param instrument_name: The instrument_name of this DualGetPlans. # noqa: E501 :type: str @@ -163,7 +163,7 @@ def instrument_name(self, instrument_name): def invest_currency(self): """Gets the invest_currency of this DualGetPlans. # noqa: E501 - Investment Currency # noqa: E501 + Investment Currency. # noqa: E501 :return: The invest_currency of this DualGetPlans. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def invest_currency(self): def invest_currency(self, invest_currency): """Sets the invest_currency of this DualGetPlans. - Investment Currency # noqa: E501 + Investment Currency. # noqa: E501 :param invest_currency: The invest_currency of this DualGetPlans. # noqa: E501 :type: str @@ -186,7 +186,7 @@ def invest_currency(self, invest_currency): def exercise_currency(self): """Gets the exercise_currency of this DualGetPlans. # noqa: E501 - Strike Currency # noqa: E501 + Strike Currency. # noqa: E501 :return: The exercise_currency of this DualGetPlans. # noqa: E501 :rtype: str @@ -197,7 +197,7 @@ def exercise_currency(self): def exercise_currency(self, exercise_currency): """Sets the exercise_currency of this DualGetPlans. - Strike Currency # noqa: E501 + Strike Currency. # noqa: E501 :param exercise_currency: The exercise_currency of this DualGetPlans. # noqa: E501 :type: str @@ -209,7 +209,7 @@ def exercise_currency(self, exercise_currency): def exercise_price(self): """Gets the exercise_price of this DualGetPlans. # noqa: E501 - Strike price # noqa: E501 + Strike price. # noqa: E501 :return: The exercise_price of this DualGetPlans. # noqa: E501 :rtype: float @@ -220,7 +220,7 @@ def exercise_price(self): def exercise_price(self, exercise_price): """Sets the exercise_price of this DualGetPlans. - Strike price # noqa: E501 + Strike price. # noqa: E501 :param exercise_price: The exercise_price of this DualGetPlans. # noqa: E501 :type: float @@ -232,7 +232,7 @@ def exercise_price(self, exercise_price): def delivery_time(self): """Gets the delivery_time of this DualGetPlans. # noqa: E501 - Settlement time # noqa: E501 + Settlement time. # noqa: E501 :return: The delivery_time of this DualGetPlans. # noqa: E501 :rtype: int @@ -243,7 +243,7 @@ def delivery_time(self): def delivery_time(self, delivery_time): """Sets the delivery_time of this DualGetPlans. - Settlement time # noqa: E501 + Settlement time. # noqa: E501 :param delivery_time: The delivery_time of this DualGetPlans. # noqa: E501 :type: int @@ -255,7 +255,7 @@ def delivery_time(self, delivery_time): def min_copies(self): """Gets the min_copies of this DualGetPlans. # noqa: E501 - Minimum Copies # noqa: E501 + Minimum Copies. # noqa: E501 :return: The min_copies of this DualGetPlans. # noqa: E501 :rtype: int @@ -266,7 +266,7 @@ def min_copies(self): def min_copies(self, min_copies): """Sets the min_copies of this DualGetPlans. - Minimum Copies # noqa: E501 + Minimum Copies. # noqa: E501 :param min_copies: The min_copies of this DualGetPlans. # noqa: E501 :type: int @@ -278,7 +278,7 @@ def min_copies(self, min_copies): def max_copies(self): """Gets the max_copies of this DualGetPlans. # noqa: E501 - Maximum Copies # noqa: E501 + Maximum Copies. # noqa: E501 :return: The max_copies of this DualGetPlans. # noqa: E501 :rtype: int @@ -289,7 +289,7 @@ def max_copies(self): def max_copies(self, max_copies): """Sets the max_copies of this DualGetPlans. - Maximum Copies # noqa: E501 + Maximum Copies. # noqa: E501 :param max_copies: The max_copies of this DualGetPlans. # noqa: E501 :type: int @@ -301,7 +301,7 @@ def max_copies(self, max_copies): def per_value(self): """Gets the per_value of this DualGetPlans. # noqa: E501 - Per Unit Value # noqa: E501 + Per Unit Value. # noqa: E501 :return: The per_value of this DualGetPlans. # noqa: E501 :rtype: str @@ -312,7 +312,7 @@ def per_value(self): def per_value(self, per_value): """Sets the per_value of this DualGetPlans. - Per Unit Value # noqa: E501 + Per Unit Value. # noqa: E501 :param per_value: The per_value of this DualGetPlans. # noqa: E501 :type: str @@ -324,7 +324,7 @@ def per_value(self, per_value): def apy_display(self): """Gets the apy_display of this DualGetPlans. # noqa: E501 - APY # noqa: E501 + APY. # noqa: E501 :return: The apy_display of this DualGetPlans. # noqa: E501 :rtype: str @@ -335,7 +335,7 @@ def apy_display(self): def apy_display(self, apy_display): """Sets the apy_display of this DualGetPlans. - APY # noqa: E501 + APY. # noqa: E501 :param apy_display: The apy_display of this DualGetPlans. # noqa: E501 :type: str @@ -347,7 +347,7 @@ def apy_display(self, apy_display): def start_time(self): """Gets the start_time of this DualGetPlans. # noqa: E501 - start time # noqa: E501 + start time. # noqa: E501 :return: The start_time of this DualGetPlans. # noqa: E501 :rtype: int @@ -358,7 +358,7 @@ def start_time(self): def start_time(self, start_time): """Sets the start_time of this DualGetPlans. - start time # noqa: E501 + start time. # noqa: E501 :param start_time: The start_time of this DualGetPlans. # noqa: E501 :type: int @@ -370,7 +370,7 @@ def start_time(self, start_time): def end_time(self): """Gets the end_time of this DualGetPlans. # noqa: E501 - Finished time # noqa: E501 + Finished time. # noqa: E501 :return: The end_time of this DualGetPlans. # noqa: E501 :rtype: int @@ -381,7 +381,7 @@ def end_time(self): def end_time(self, end_time): """Sets the end_time of this DualGetPlans. - Finished time # noqa: E501 + Finished time. # noqa: E501 :param end_time: The end_time of this DualGetPlans. # noqa: E501 :type: int diff --git a/gate_api/models/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py index 7b8b389..c3d3237 100644 --- a/gate_api/models/eth2_rate_list.py +++ b/gate_api/models/eth2_rate_list.py @@ -67,7 +67,7 @@ def __init__(self, date_time=None, date=None, rate=None, local_vars_configuratio def date_time(self): """Gets the date_time of this Eth2RateList. # noqa: E501 - Date and Time Stamp # noqa: E501 + Date and Time Stamp. # noqa: E501 :return: The date_time of this Eth2RateList. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def date_time(self): def date_time(self, date_time): """Sets the date_time of this Eth2RateList. - Date and Time Stamp # noqa: E501 + Date and Time Stamp. # noqa: E501 :param date_time: The date_time of this Eth2RateList. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def date_time(self, date_time): def date(self): """Gets the date of this Eth2RateList. # noqa: E501 - Date # noqa: E501 + Date. # noqa: E501 :return: The date of this Eth2RateList. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def date(self): def date(self, date): """Sets the date of this Eth2RateList. - Date # noqa: E501 + Date. # noqa: E501 :param date: The date of this Eth2RateList. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def date(self, date): def rate(self): """Gets the rate of this Eth2RateList. # noqa: E501 - percentage # noqa: E501 + percentage. # noqa: E501 :return: The rate of this Eth2RateList. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def rate(self): def rate(self, rate): """Sets the rate of this Eth2RateList. - percentage # noqa: E501 + percentage. # noqa: E501 :param rate: The rate of this Eth2RateList. # noqa: E501 :type: str diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py index 2693017..d2b6ddf 100644 --- a/gate_api/models/eth2_swap.py +++ b/gate_api/models/eth2_swap.py @@ -60,7 +60,7 @@ def __init__(self, side=None, amount=None, local_vars_configuration=None): # no def side(self): """Gets the side of this Eth2Swap. # noqa: E501 - 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) # noqa: E501 + 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH). # noqa: E501 :return: The side of this Eth2Swap. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def side(self): def side(self, side): """Sets the side of this Eth2Swap. - 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) # noqa: E501 + 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH). # noqa: E501 :param side: The side of this Eth2Swap. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def side(self, side): def amount(self): """Gets the amount of this Eth2Swap. # noqa: E501 - amount # noqa: E501 + amount. # noqa: E501 :return: The amount of this Eth2Swap. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Eth2Swap. - amount # noqa: E501 + amount. # noqa: E501 :param amount: The amount of this Eth2Swap. # noqa: E501 :type: str diff --git a/gate_api/models/find_coin.py b/gate_api/models/find_coin.py index 599957a..4662668 100644 --- a/gate_api/models/find_coin.py +++ b/gate_api/models/find_coin.py @@ -62,7 +62,7 @@ def __init__(self, coin=None, cointype=None, local_vars_configuration=None): # def coin(self): """Gets the coin of this FindCoin. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The coin of this FindCoin. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def coin(self): def coin(self, coin): """Sets the coin of this FindCoin. - Currency # noqa: E501 + Currency. # noqa: E501 :param coin: The coin of this FindCoin. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def coin(self, coin): def cointype(self): """Gets the cointype of this FindCoin. # noqa: E501 - Coin Type swap-Voucher lock-Locked # noqa: E501 + Coin Type swap-Voucher lock-Locked. # noqa: E501 :return: The cointype of this FindCoin. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def cointype(self): def cointype(self, cointype): """Sets the cointype of this FindCoin. - Coin Type swap-Voucher lock-Locked # noqa: E501 + Coin Type swap-Voucher lock-Locked. # noqa: E501 :param cointype: The cointype of this FindCoin. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py index 9cb705e..f2e2432 100644 --- a/gate_api/models/flash_swap_currency_pair.py +++ b/gate_api/models/flash_swap_currency_pair.py @@ -110,7 +110,7 @@ def currency_pair(self, currency_pair): def sell_currency(self): """Gets the sell_currency of this FlashSwapCurrencyPair. # noqa: E501 - The currency to be sold # noqa: E501 + The currency to be sold. # noqa: E501 :return: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def sell_currency(self): def sell_currency(self, sell_currency): """Sets the sell_currency of this FlashSwapCurrencyPair. - The currency to be sold # noqa: E501 + The currency to be sold. # noqa: E501 :param sell_currency: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def sell_currency(self, sell_currency): def buy_currency(self): """Gets the buy_currency of this FlashSwapCurrencyPair. # noqa: E501 - The currency to be bought # noqa: E501 + The currency to be bought. # noqa: E501 :return: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def buy_currency(self): def buy_currency(self, buy_currency): """Sets the buy_currency of this FlashSwapCurrencyPair. - The currency to be bought # noqa: E501 + The currency to be bought. # noqa: E501 :param buy_currency: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def buy_currency(self, buy_currency): def sell_min_amount(self): """Gets the sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - The minimum quantity required for selling # noqa: E501 + The minimum quantity required for selling. # noqa: E501 :return: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def sell_min_amount(self): def sell_min_amount(self, sell_min_amount): """Sets the sell_min_amount of this FlashSwapCurrencyPair. - The minimum quantity required for selling # noqa: E501 + The minimum quantity required for selling. # noqa: E501 :param sell_min_amount: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def sell_min_amount(self, sell_min_amount): def sell_max_amount(self): """Gets the sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - The maximum quantity allowed for selling # noqa: E501 + The maximum quantity allowed for selling. # noqa: E501 :return: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def sell_max_amount(self): def sell_max_amount(self, sell_max_amount): """Sets the sell_max_amount of this FlashSwapCurrencyPair. - The maximum quantity allowed for selling # noqa: E501 + The maximum quantity allowed for selling. # noqa: E501 :param sell_max_amount: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def sell_max_amount(self, sell_max_amount): def buy_min_amount(self): """Gets the buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - The minimum quantity required for buying # noqa: E501 + The minimum quantity required for buying. # noqa: E501 :return: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def buy_min_amount(self): def buy_min_amount(self, buy_min_amount): """Sets the buy_min_amount of this FlashSwapCurrencyPair. - The minimum quantity required for buying # noqa: E501 + The minimum quantity required for buying. # noqa: E501 :param buy_min_amount: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def buy_min_amount(self, buy_min_amount): def buy_max_amount(self): """Gets the buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - The maximum quantity allowed for buying # noqa: E501 + The maximum quantity allowed for buying. # noqa: E501 :return: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def buy_max_amount(self): def buy_max_amount(self, buy_max_amount): """Sets the buy_max_amount of this FlashSwapCurrencyPair. - The maximum quantity allowed for buying # noqa: E501 + The maximum quantity allowed for buying. # noqa: E501 :param buy_max_amount: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py index fc7deb8..a715330 100644 --- a/gate_api/models/flash_swap_order.py +++ b/gate_api/models/flash_swap_order.py @@ -97,7 +97,7 @@ def __init__(self, id=None, create_time=None, user_id=None, sell_currency=None, def id(self): """Gets the id of this FlashSwapOrder. # noqa: E501 - Flash swap order ID # noqa: E501 + Flash swap order ID. # noqa: E501 :return: The id of this FlashSwapOrder. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def id(self): def id(self, id): """Sets the id of this FlashSwapOrder. - Flash swap order ID # noqa: E501 + Flash swap order ID. # noqa: E501 :param id: The id of this FlashSwapOrder. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this FlashSwapOrder. # noqa: E501 - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :return: The create_time of this FlashSwapOrder. # noqa: E501 :rtype: int @@ -131,7 +131,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FlashSwapOrder. - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :param create_time: The create_time of this FlashSwapOrder. # noqa: E501 :type: int @@ -143,7 +143,7 @@ def create_time(self, create_time): def user_id(self): """Gets the user_id of this FlashSwapOrder. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this FlashSwapOrder. # noqa: E501 :rtype: int @@ -154,7 +154,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this FlashSwapOrder. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this FlashSwapOrder. # noqa: E501 :type: int @@ -166,7 +166,7 @@ def user_id(self, user_id): def sell_currency(self): """Gets the sell_currency of this FlashSwapOrder. # noqa: E501 - Currency to sell # noqa: E501 + Currency to sell. # noqa: E501 :return: The sell_currency of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def sell_currency(self): def sell_currency(self, sell_currency): """Sets the sell_currency of this FlashSwapOrder. - Currency to sell # noqa: E501 + Currency to sell. # noqa: E501 :param sell_currency: The sell_currency of this FlashSwapOrder. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def sell_currency(self, sell_currency): def sell_amount(self): """Gets the sell_amount of this FlashSwapOrder. # noqa: E501 - Amount to sell # noqa: E501 + Amount to sell. # noqa: E501 :return: The sell_amount of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def sell_amount(self): def sell_amount(self, sell_amount): """Sets the sell_amount of this FlashSwapOrder. - Amount to sell # noqa: E501 + Amount to sell. # noqa: E501 :param sell_amount: The sell_amount of this FlashSwapOrder. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def sell_amount(self, sell_amount): def buy_currency(self): """Gets the buy_currency of this FlashSwapOrder. # noqa: E501 - Currency to buy # noqa: E501 + Currency to buy. # noqa: E501 :return: The buy_currency of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def buy_currency(self): def buy_currency(self, buy_currency): """Sets the buy_currency of this FlashSwapOrder. - Currency to buy # noqa: E501 + Currency to buy. # noqa: E501 :param buy_currency: The buy_currency of this FlashSwapOrder. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def buy_currency(self, buy_currency): def buy_amount(self): """Gets the buy_amount of this FlashSwapOrder. # noqa: E501 - Amount to buy # noqa: E501 + Amount to buy. # noqa: E501 :return: The buy_amount of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def buy_amount(self): def buy_amount(self, buy_amount): """Sets the buy_amount of this FlashSwapOrder. - Amount to buy # noqa: E501 + Amount to buy. # noqa: E501 :param buy_amount: The buy_amount of this FlashSwapOrder. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def buy_amount(self, buy_amount): def price(self): """Gets the price of this FlashSwapOrder. # noqa: E501 - Price # noqa: E501 + Price. # noqa: E501 :return: The price of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def price(self): def price(self, price): """Sets the price of this FlashSwapOrder. - Price # noqa: E501 + Price. # noqa: E501 :param price: The price of this FlashSwapOrder. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py index c4badfe..ca4413a 100644 --- a/gate_api/models/flash_swap_order_preview.py +++ b/gate_api/models/flash_swap_order_preview.py @@ -82,7 +82,7 @@ def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_cu def preview_id(self): """Gets the preview_id of this FlashSwapOrderPreview. # noqa: E501 - Preview result ID # noqa: E501 + Preview result ID. # noqa: E501 :return: The preview_id of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def preview_id(self): def preview_id(self, preview_id): """Sets the preview_id of this FlashSwapOrderPreview. - Preview result ID # noqa: E501 + Preview result ID. # noqa: E501 :param preview_id: The preview_id of this FlashSwapOrderPreview. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def sell_currency(self, sell_currency): def sell_amount(self): """Gets the sell_amount of this FlashSwapOrderPreview. # noqa: E501 - Amount to sell # noqa: E501 + Amount to sell. # noqa: E501 :return: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def sell_amount(self): def sell_amount(self, sell_amount): """Sets the sell_amount of this FlashSwapOrderPreview. - Amount to sell # noqa: E501 + Amount to sell. # noqa: E501 :param sell_amount: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def buy_currency(self, buy_currency): def buy_amount(self): """Gets the buy_amount of this FlashSwapOrderPreview. # noqa: E501 - Amount to buy # noqa: E501 + Amount to buy. # noqa: E501 :return: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def buy_amount(self): def buy_amount(self, buy_amount): """Sets the buy_amount of this FlashSwapOrderPreview. - Amount to buy # noqa: E501 + Amount to buy. # noqa: E501 :param buy_amount: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def buy_amount(self, buy_amount): def price(self): """Gets the price of this FlashSwapOrderPreview. # noqa: E501 - Price # noqa: E501 + Price. # noqa: E501 :return: The price of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def price(self): def price(self, price): """Sets the price of this FlashSwapOrderPreview. - Price # noqa: E501 + Price. # noqa: E501 :param price: The price of this FlashSwapOrderPreview. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py index 8390892..5cc1661 100644 --- a/gate_api/models/flash_swap_order_request.py +++ b/gate_api/models/flash_swap_order_request.py @@ -72,7 +72,7 @@ def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_cu def preview_id(self): """Gets the preview_id of this FlashSwapOrderRequest. # noqa: E501 - Preview result ID # noqa: E501 + Preview result ID. # noqa: E501 :return: The preview_id of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def preview_id(self): def preview_id(self, preview_id): """Sets the preview_id of this FlashSwapOrderRequest. - Preview result ID # noqa: E501 + Preview result ID. # noqa: E501 :param preview_id: The preview_id of this FlashSwapOrderRequest. # noqa: E501 :type: str @@ -122,7 +122,7 @@ def sell_currency(self, sell_currency): def sell_amount(self): """Gets the sell_amount of this FlashSwapOrderRequest. # noqa: E501 - Amount to sell (based on the preview result) # noqa: E501 + Amount to sell (based on the preview result). # noqa: E501 :return: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def sell_amount(self): def sell_amount(self, sell_amount): """Sets the sell_amount of this FlashSwapOrderRequest. - Amount to sell (based on the preview result) # noqa: E501 + Amount to sell (based on the preview result). # noqa: E501 :param sell_amount: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 :type: str @@ -172,7 +172,7 @@ def buy_currency(self, buy_currency): def buy_amount(self): """Gets the buy_amount of this FlashSwapOrderRequest. # noqa: E501 - Amount to buy (based on the preview result) # noqa: E501 + Amount to buy (based on the preview result). # noqa: E501 :return: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -183,7 +183,7 @@ def buy_amount(self): def buy_amount(self, buy_amount): """Sets the buy_amount of this FlashSwapOrderRequest. - Amount to buy (based on the preview result) # noqa: E501 + Amount to buy (based on the preview result). # noqa: E501 :param buy_amount: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py index 1085947..6b5016d 100644 --- a/gate_api/models/funding_account.py +++ b/gate_api/models/funding_account.py @@ -77,7 +77,7 @@ def __init__(self, currency=None, available=None, locked=None, lent=None, total_ def currency(self): """Gets the currency of this FundingAccount. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this FundingAccount. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this FundingAccount. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this FundingAccount. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def available(self): """Gets the available of this FundingAccount. # noqa: E501 - Available assets to lend, which is identical to spot account `available` # noqa: E501 + Available assets to lend, which is identical to spot account `available`. # noqa: E501 :return: The available of this FundingAccount. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def available(self): def available(self, available): """Sets the available of this FundingAccount. - Available assets to lend, which is identical to spot account `available` # noqa: E501 + Available assets to lend, which is identical to spot account `available`. # noqa: E501 :param available: The available of this FundingAccount. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def available(self, available): def locked(self): """Gets the locked of this FundingAccount. # noqa: E501 - Locked amount. i.e. amount in `open` loans # noqa: E501 + Locked amount. i.e. amount in `open` loans. # noqa: E501 :return: The locked of this FundingAccount. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this FundingAccount. - Locked amount. i.e. amount in `open` loans # noqa: E501 + Locked amount. i.e. amount in `open` loans. # noqa: E501 :param locked: The locked of this FundingAccount. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def locked(self, locked): def lent(self): """Gets the lent of this FundingAccount. # noqa: E501 - Outstanding loan amount yet to be repaid # noqa: E501 + Outstanding loan amount yet to be repaid. # noqa: E501 :return: The lent of this FundingAccount. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def lent(self): def lent(self, lent): """Sets the lent of this FundingAccount. - Outstanding loan amount yet to be repaid # noqa: E501 + Outstanding loan amount yet to be repaid. # noqa: E501 :param lent: The lent of this FundingAccount. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def lent(self, lent): def total_lent(self): """Gets the total_lent of this FundingAccount. # noqa: E501 - Amount used for lending. total_lent = lent + locked # noqa: E501 + Amount used for lending. total_lent = lent + locked. # noqa: E501 :return: The total_lent of this FundingAccount. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def total_lent(self): def total_lent(self, total_lent): """Sets the total_lent of this FundingAccount. - Amount used for lending. total_lent = lent + locked # noqa: E501 + Amount used for lending. total_lent = lent + locked. # noqa: E501 :param total_lent: The total_lent of this FundingAccount. # noqa: E501 :type: str diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py index 7d0e33b..d3ea258 100644 --- a/gate_api/models/funding_rate_record.py +++ b/gate_api/models/funding_rate_record.py @@ -62,7 +62,7 @@ def __init__(self, t=None, r=None, local_vars_configuration=None): # noqa: E501 def t(self): """Gets the t of this FundingRateRecord. # noqa: E501 - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :return: The t of this FundingRateRecord. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def t(self): def t(self, t): """Sets the t of this FundingRateRecord. - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :param t: The t of this FundingRateRecord. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def t(self, t): def r(self): """Gets the r of this FundingRateRecord. # noqa: E501 - Funding rate # noqa: E501 + Funding rate. # noqa: E501 :return: The r of this FundingRateRecord. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def r(self): def r(self, r): """Sets the r of this FundingRateRecord. - Funding rate # noqa: E501 + Funding rate. # noqa: E501 :param r: The r of this FundingRateRecord. # noqa: E501 :type: str diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py index 2799ed5..1886a56 100644 --- a/gate_api/models/future_cancel_order_result.py +++ b/gate_api/models/future_cancel_order_result.py @@ -72,7 +72,7 @@ def __init__(self, id=None, user_id=None, succeeded=None, message=None, local_va def id(self): """Gets the id of this FutureCancelOrderResult. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this FutureCancelOrderResult. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def id(self): def id(self, id): """Sets the id of this FutureCancelOrderResult. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this FutureCancelOrderResult. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def id(self, id): def user_id(self): """Gets the user_id of this FutureCancelOrderResult. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this FutureCancelOrderResult. # noqa: E501 :rtype: int @@ -106,7 +106,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this FutureCancelOrderResult. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this FutureCancelOrderResult. # noqa: E501 :type: int @@ -118,7 +118,7 @@ def user_id(self, user_id): def succeeded(self): """Gets the succeeded of this FutureCancelOrderResult. # noqa: E501 - Whether cancellation succeeded # noqa: E501 + Whether cancellation succeeded. # noqa: E501 :return: The succeeded of this FutureCancelOrderResult. # noqa: E501 :rtype: bool @@ -129,7 +129,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this FutureCancelOrderResult. - Whether cancellation succeeded # noqa: E501 + Whether cancellation succeeded. # noqa: E501 :param succeeded: The succeeded of this FutureCancelOrderResult. # noqa: E501 :type: bool @@ -141,7 +141,7 @@ def succeeded(self, succeeded): def message(self): """Gets the message of this FutureCancelOrderResult. # noqa: E501 - Error message when failed to cancel the order; empty if succeeded # noqa: E501 + Error message when failed to cancel the order; empty if succeeded. # noqa: E501 :return: The message of this FutureCancelOrderResult. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def message(self): def message(self, message): """Sets the message of this FutureCancelOrderResult. - Error message when failed to cancel the order; empty if succeeded # noqa: E501 + Error message when failed to cancel the order; empty if succeeded. # noqa: E501 :param message: The message of this FutureCancelOrderResult. # noqa: E501 :type: str diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py index 9ba2273..029d544 100644 --- a/gate_api/models/futures_account.py +++ b/gate_api/models/futures_account.py @@ -205,7 +205,7 @@ def total(self, total): def unrealised_pnl(self): """Gets the unrealised_pnl of this FuturesAccount. # noqa: E501 - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :return: The unrealised_pnl of this FuturesAccount. # noqa: E501 :rtype: str @@ -216,7 +216,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this FuturesAccount. - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this FuturesAccount. # noqa: E501 :type: str @@ -228,7 +228,7 @@ def unrealised_pnl(self, unrealised_pnl): def position_margin(self): """Gets the position_margin of this FuturesAccount. # noqa: E501 - Position margin # noqa: E501 + Position margin. # noqa: E501 :return: The position_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -239,7 +239,7 @@ def position_margin(self): def position_margin(self, position_margin): """Sets the position_margin of this FuturesAccount. - Position margin # noqa: E501 + Position margin. # noqa: E501 :param position_margin: The position_margin of this FuturesAccount. # noqa: E501 :type: str @@ -251,7 +251,7 @@ def position_margin(self, position_margin): def order_margin(self): """Gets the order_margin of this FuturesAccount. # noqa: E501 - Order margin of unfinished orders # noqa: E501 + Order margin of unfinished orders. # noqa: E501 :return: The order_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -262,7 +262,7 @@ def order_margin(self): def order_margin(self, order_margin): """Sets the order_margin of this FuturesAccount. - Order margin of unfinished orders # noqa: E501 + Order margin of unfinished orders. # noqa: E501 :param order_margin: The order_margin of this FuturesAccount. # noqa: E501 :type: str @@ -274,7 +274,7 @@ def order_margin(self, order_margin): def available(self): """Gets the available of this FuturesAccount. # noqa: E501 - The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 + The available balance for transferring or trading(including bonus. Bonus can't be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 :return: The available of this FuturesAccount. # noqa: E501 :rtype: str @@ -285,7 +285,7 @@ def available(self): def available(self, available): """Sets the available of this FuturesAccount. - The available balance for transferring or trading(including bonus. Bonus can't be be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 + The available balance for transferring or trading(including bonus. Bonus can't be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 :param available: The available of this FuturesAccount. # noqa: E501 :type: str @@ -297,7 +297,7 @@ def available(self, available): def point(self): """Gets the point of this FuturesAccount. # noqa: E501 - POINT amount # noqa: E501 + POINT amount. # noqa: E501 :return: The point of this FuturesAccount. # noqa: E501 :rtype: str @@ -308,7 +308,7 @@ def point(self): def point(self, point): """Sets the point of this FuturesAccount. - POINT amount # noqa: E501 + POINT amount. # noqa: E501 :param point: The point of this FuturesAccount. # noqa: E501 :type: str @@ -320,7 +320,7 @@ def point(self, point): def currency(self): """Gets the currency of this FuturesAccount. # noqa: E501 - Settle currency # noqa: E501 + Settle currency. # noqa: E501 :return: The currency of this FuturesAccount. # noqa: E501 :rtype: str @@ -331,7 +331,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this FuturesAccount. - Settle currency # noqa: E501 + Settle currency. # noqa: E501 :param currency: The currency of this FuturesAccount. # noqa: E501 :type: str @@ -343,7 +343,7 @@ def currency(self, currency): def in_dual_mode(self): """Gets the in_dual_mode of this FuturesAccount. # noqa: E501 - Whether dual mode is enabled # noqa: E501 + Whether dual mode is enabled. # noqa: E501 :return: The in_dual_mode of this FuturesAccount. # noqa: E501 :rtype: bool @@ -354,7 +354,7 @@ def in_dual_mode(self): def in_dual_mode(self, in_dual_mode): """Sets the in_dual_mode of this FuturesAccount. - Whether dual mode is enabled # noqa: E501 + Whether dual mode is enabled. # noqa: E501 :param in_dual_mode: The in_dual_mode of this FuturesAccount. # noqa: E501 :type: bool @@ -366,7 +366,7 @@ def in_dual_mode(self, in_dual_mode): def enable_credit(self): """Gets the enable_credit of this FuturesAccount. # noqa: E501 - Whether portfolio margin account mode is enabled # noqa: E501 + Whether portfolio margin account mode is enabled. # noqa: E501 :return: The enable_credit of this FuturesAccount. # noqa: E501 :rtype: bool @@ -377,7 +377,7 @@ def enable_credit(self): def enable_credit(self, enable_credit): """Sets the enable_credit of this FuturesAccount. - Whether portfolio margin account mode is enabled # noqa: E501 + Whether portfolio margin account mode is enabled. # noqa: E501 :param enable_credit: The enable_credit of this FuturesAccount. # noqa: E501 :type: bool @@ -389,7 +389,7 @@ def enable_credit(self, enable_credit): def position_initial_margin(self): """Gets the position_initial_margin of this FuturesAccount. # noqa: E501 - Initial margin position, applicable to the portfolio margin account model # noqa: E501 + Initial margin position, applicable to the portfolio margin account model. # noqa: E501 :return: The position_initial_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -400,7 +400,7 @@ def position_initial_margin(self): def position_initial_margin(self, position_initial_margin): """Sets the position_initial_margin of this FuturesAccount. - Initial margin position, applicable to the portfolio margin account model # noqa: E501 + Initial margin position, applicable to the portfolio margin account model. # noqa: E501 :param position_initial_margin: The position_initial_margin of this FuturesAccount. # noqa: E501 :type: str @@ -435,7 +435,7 @@ def maintenance_margin(self, maintenance_margin): def bonus(self): """Gets the bonus of this FuturesAccount. # noqa: E501 - Perpetual Contract Bonus # noqa: E501 + Perpetual Contract Bonus. # noqa: E501 :return: The bonus of this FuturesAccount. # noqa: E501 :rtype: str @@ -446,7 +446,7 @@ def bonus(self): def bonus(self, bonus): """Sets the bonus of this FuturesAccount. - Perpetual Contract Bonus # noqa: E501 + Perpetual Contract Bonus. # noqa: E501 :param bonus: The bonus of this FuturesAccount. # noqa: E501 :type: str @@ -458,7 +458,7 @@ def bonus(self, bonus): def enable_evolved_classic(self): """Gets the enable_evolved_classic of this FuturesAccount. # noqa: E501 - Classic account margin mode, true-new mode, false-old mode # noqa: E501 + Classic account margin mode, true-new mode, false-old mode. # noqa: E501 :return: The enable_evolved_classic of this FuturesAccount. # noqa: E501 :rtype: bool @@ -469,7 +469,7 @@ def enable_evolved_classic(self): def enable_evolved_classic(self, enable_evolved_classic): """Sets the enable_evolved_classic of this FuturesAccount. - Classic account margin mode, true-new mode, false-old mode # noqa: E501 + Classic account margin mode, true-new mode, false-old mode. # noqa: E501 :param enable_evolved_classic: The enable_evolved_classic of this FuturesAccount. # noqa: E501 :type: bool @@ -596,7 +596,7 @@ def cross_available(self, cross_available): def cross_margin_balance(self): """Gets the cross_margin_balance of this FuturesAccount. # noqa: E501 - Full margin balance, suitable for the new classic account margin model # noqa: E501 + Full margin balance, suitable for the new classic account margin model. # noqa: E501 :return: The cross_margin_balance of this FuturesAccount. # noqa: E501 :rtype: str @@ -607,7 +607,7 @@ def cross_margin_balance(self): def cross_margin_balance(self, cross_margin_balance): """Sets the cross_margin_balance of this FuturesAccount. - Full margin balance, suitable for the new classic account margin model # noqa: E501 + Full margin balance, suitable for the new classic account margin model. # noqa: E501 :param cross_margin_balance: The cross_margin_balance of this FuturesAccount. # noqa: E501 :type: str @@ -665,7 +665,7 @@ def cross_imr(self, cross_imr): def isolated_position_margin(self): """Gets the isolated_position_margin of this FuturesAccount. # noqa: E501 - Ware -position margin, suitable for the new classic account margin model # noqa: E501 + Ware -position margin, suitable for the new classic account margin model. # noqa: E501 :return: The isolated_position_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -676,7 +676,7 @@ def isolated_position_margin(self): def isolated_position_margin(self, isolated_position_margin): """Sets the isolated_position_margin of this FuturesAccount. - Ware -position margin, suitable for the new classic account margin model # noqa: E501 + Ware -position margin, suitable for the new classic account margin model. # noqa: E501 :param isolated_position_margin: The isolated_position_margin of this FuturesAccount. # noqa: E501 :type: str @@ -688,7 +688,7 @@ def isolated_position_margin(self, isolated_position_margin): def enable_new_dual_mode(self): """Gets the enable_new_dual_mode of this FuturesAccount. # noqa: E501 - Whether to open a new two-way position mode # noqa: E501 + Whether to open a new two-way position mode. # noqa: E501 :return: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 :rtype: bool @@ -699,7 +699,7 @@ def enable_new_dual_mode(self): def enable_new_dual_mode(self, enable_new_dual_mode): """Sets the enable_new_dual_mode of this FuturesAccount. - Whether to open a new two-way position mode # noqa: E501 + Whether to open a new two-way position mode. # noqa: E501 :param enable_new_dual_mode: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 :type: bool @@ -734,7 +734,7 @@ def margin_mode(self, margin_mode): def enable_tiered_mm(self): """Gets the enable_tiered_mm of this FuturesAccount. # noqa: E501 - Whether to enable tiered maintenance margin calculation # noqa: E501 + Whether to enable tiered maintenance margin calculation. # noqa: E501 :return: The enable_tiered_mm of this FuturesAccount. # noqa: E501 :rtype: bool @@ -745,7 +745,7 @@ def enable_tiered_mm(self): def enable_tiered_mm(self, enable_tiered_mm): """Sets the enable_tiered_mm of this FuturesAccount. - Whether to enable tiered maintenance margin calculation # noqa: E501 + Whether to enable tiered maintenance margin calculation. # noqa: E501 :param enable_tiered_mm: The enable_tiered_mm of this FuturesAccount. # noqa: E501 :type: bool diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py index 49e1632..c00ae26 100644 --- a/gate_api/models/futures_account_book.py +++ b/gate_api/models/futures_account_book.py @@ -92,7 +92,7 @@ def __init__(self, time=None, change=None, balance=None, type=None, text=None, c def time(self): """Gets the time of this FuturesAccountBook. # noqa: E501 - Change time # noqa: E501 + Change time. # noqa: E501 :return: The time of this FuturesAccountBook. # noqa: E501 :rtype: float @@ -103,7 +103,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesAccountBook. - Change time # noqa: E501 + Change time. # noqa: E501 :param time: The time of this FuturesAccountBook. # noqa: E501 :type: float @@ -115,7 +115,7 @@ def time(self, time): def change(self): """Gets the change of this FuturesAccountBook. # noqa: E501 - Change amount # noqa: E501 + Change amount. # noqa: E501 :return: The change of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def change(self): def change(self, change): """Sets the change of this FuturesAccountBook. - Change amount # noqa: E501 + Change amount. # noqa: E501 :param change: The change of this FuturesAccountBook. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def change(self, change): def balance(self): """Gets the balance of this FuturesAccountBook. # noqa: E501 - Balance after change # noqa: E501 + Balance after change. # noqa: E501 :return: The balance of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this FuturesAccountBook. - Balance after change # noqa: E501 + Balance after change. # noqa: E501 :param balance: The balance of this FuturesAccountBook. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def balance(self, balance): def type(self): """Gets the type of this FuturesAccountBook. # noqa: E501 - Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 + Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 :return: The type of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def type(self): def type(self, type): """Sets the type of this FuturesAccountBook. - Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 + Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 :param type: The type of this FuturesAccountBook. # noqa: E501 :type: str @@ -190,7 +190,7 @@ def type(self, type): def text(self): """Gets the text of this FuturesAccountBook. # noqa: E501 - Comment # noqa: E501 + Comment. # noqa: E501 :return: The text of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -201,7 +201,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesAccountBook. - Comment # noqa: E501 + Comment. # noqa: E501 :param text: The text of this FuturesAccountBook. # noqa: E501 :type: str @@ -236,7 +236,7 @@ def contract(self, contract): def trade_id(self): """Gets the trade_id of this FuturesAccountBook. # noqa: E501 - trade id # noqa: E501 + trade id. # noqa: E501 :return: The trade_id of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -247,7 +247,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this FuturesAccountBook. - trade id # noqa: E501 + trade id. # noqa: E501 :param trade_id: The trade_id of this FuturesAccountBook. # noqa: E501 :type: str @@ -259,7 +259,7 @@ def trade_id(self, trade_id): def id(self): """Gets the id of this FuturesAccountBook. # noqa: E501 - Account change record ID # noqa: E501 + Account change record ID. # noqa: E501 :return: The id of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -270,7 +270,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesAccountBook. - Account change record ID # noqa: E501 + Account change record ID. # noqa: E501 :param id: The id of this FuturesAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py index bd8bd35..363e287 100644 --- a/gate_api/models/futures_account_history.py +++ b/gate_api/models/futures_account_history.py @@ -102,7 +102,7 @@ def __init__(self, dnw=None, pnl=None, fee=None, refr=None, fund=None, point_dnw def dnw(self): """Gets the dnw of this FuturesAccountHistory. # noqa: E501 - total amount of deposit and withdraw # noqa: E501 + total amount of deposit and withdraw. # noqa: E501 :return: The dnw of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -113,7 +113,7 @@ def dnw(self): def dnw(self, dnw): """Sets the dnw of this FuturesAccountHistory. - total amount of deposit and withdraw # noqa: E501 + total amount of deposit and withdraw. # noqa: E501 :param dnw: The dnw of this FuturesAccountHistory. # noqa: E501 :type: str @@ -125,7 +125,7 @@ def dnw(self, dnw): def pnl(self): """Gets the pnl of this FuturesAccountHistory. # noqa: E501 - total amount of trading profit and loss # noqa: E501 + total amount of trading profit and loss. # noqa: E501 :return: The pnl of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def pnl(self): def pnl(self, pnl): """Sets the pnl of this FuturesAccountHistory. - total amount of trading profit and loss # noqa: E501 + total amount of trading profit and loss. # noqa: E501 :param pnl: The pnl of this FuturesAccountHistory. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def pnl(self, pnl): def fee(self): """Gets the fee of this FuturesAccountHistory. # noqa: E501 - total amount of fee # noqa: E501 + total amount of fee. # noqa: E501 :return: The fee of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this FuturesAccountHistory. - total amount of fee # noqa: E501 + total amount of fee. # noqa: E501 :param fee: The fee of this FuturesAccountHistory. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def fee(self, fee): def refr(self): """Gets the refr of this FuturesAccountHistory. # noqa: E501 - total amount of referrer rebates # noqa: E501 + total amount of referrer rebates. # noqa: E501 :return: The refr of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def refr(self): def refr(self, refr): """Sets the refr of this FuturesAccountHistory. - total amount of referrer rebates # noqa: E501 + total amount of referrer rebates. # noqa: E501 :param refr: The refr of this FuturesAccountHistory. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def refr(self, refr): def fund(self): """Gets the fund of this FuturesAccountHistory. # noqa: E501 - total amount of funding costs # noqa: E501 + total amount of funding costs. # noqa: E501 :return: The fund of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def fund(self): def fund(self, fund): """Sets the fund of this FuturesAccountHistory. - total amount of funding costs # noqa: E501 + total amount of funding costs. # noqa: E501 :param fund: The fund of this FuturesAccountHistory. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def fund(self, fund): def point_dnw(self): """Gets the point_dnw of this FuturesAccountHistory. # noqa: E501 - total amount of point deposit and withdraw # noqa: E501 + total amount of point deposit and withdraw. # noqa: E501 :return: The point_dnw of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def point_dnw(self): def point_dnw(self, point_dnw): """Sets the point_dnw of this FuturesAccountHistory. - total amount of point deposit and withdraw # noqa: E501 + total amount of point deposit and withdraw. # noqa: E501 :param point_dnw: The point_dnw of this FuturesAccountHistory. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def point_dnw(self, point_dnw): def point_fee(self): """Gets the point_fee of this FuturesAccountHistory. # noqa: E501 - total amount of point fee # noqa: E501 + total amount of point fee. # noqa: E501 :return: The point_fee of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this FuturesAccountHistory. - total amount of point fee # noqa: E501 + total amount of point fee. # noqa: E501 :param point_fee: The point_fee of this FuturesAccountHistory. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def point_fee(self, point_fee): def point_refr(self): """Gets the point_refr of this FuturesAccountHistory. # noqa: E501 - total amount of referrer rebates of point fee # noqa: E501 + total amount of referrer rebates of point fee. # noqa: E501 :return: The point_refr of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def point_refr(self): def point_refr(self, point_refr): """Sets the point_refr of this FuturesAccountHistory. - total amount of referrer rebates of point fee # noqa: E501 + total amount of referrer rebates of point fee. # noqa: E501 :param point_refr: The point_refr of this FuturesAccountHistory. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def point_refr(self, point_refr): def bonus_dnw(self): """Gets the bonus_dnw of this FuturesAccountHistory. # noqa: E501 - total amount of perpetual contract bonus transfer # noqa: E501 + total amount of perpetual contract bonus transfer. # noqa: E501 :return: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def bonus_dnw(self): def bonus_dnw(self, bonus_dnw): """Sets the bonus_dnw of this FuturesAccountHistory. - total amount of perpetual contract bonus transfer # noqa: E501 + total amount of perpetual contract bonus transfer. # noqa: E501 :param bonus_dnw: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 :type: str @@ -309,7 +309,7 @@ def bonus_dnw(self, bonus_dnw): def bonus_offset(self): """Gets the bonus_offset of this FuturesAccountHistory. # noqa: E501 - total amount of perpetual contract bonus deduction # noqa: E501 + total amount of perpetual contract bonus deduction. # noqa: E501 :return: The bonus_offset of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -320,7 +320,7 @@ def bonus_offset(self): def bonus_offset(self, bonus_offset): """Sets the bonus_offset of this FuturesAccountHistory. - total amount of perpetual contract bonus deduction # noqa: E501 + total amount of perpetual contract bonus deduction. # noqa: E501 :param bonus_offset: The bonus_offset of this FuturesAccountHistory. # noqa: E501 :type: str diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py index c024a58..b736dc7 100644 --- a/gate_api/models/futures_auto_deleverage.py +++ b/gate_api/models/futures_auto_deleverage.py @@ -102,7 +102,7 @@ def __init__(self, time=None, user=None, order_id=None, contract=None, leverage= def time(self): """Gets the time of this FuturesAutoDeleverage. # noqa: E501 - Automatic deleveraging time # noqa: E501 + Automatic deleveraging time. # noqa: E501 :return: The time of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesAutoDeleverage. - Automatic deleveraging time # noqa: E501 + Automatic deleveraging time. # noqa: E501 :param time: The time of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def time(self, time): def user(self): """Gets the user of this FuturesAutoDeleverage. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -136,7 +136,7 @@ def user(self): def user(self, user): """Sets the user of this FuturesAutoDeleverage. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -148,7 +148,7 @@ def user(self, user): def order_id(self): """Gets the order_id of this FuturesAutoDeleverage. # noqa: E501 - Order ID. Order IDs before 2023-02-20 are null # noqa: E501 + Order ID. Order IDs before 2023-02-20 are null. # noqa: E501 :return: The order_id of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -159,7 +159,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this FuturesAutoDeleverage. - Order ID. Order IDs before 2023-02-20 are null # noqa: E501 + Order ID. Order IDs before 2023-02-20 are null. # noqa: E501 :param order_id: The order_id of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -171,7 +171,7 @@ def order_id(self, order_id): def contract(self): """Gets the contract of this FuturesAutoDeleverage. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesAutoDeleverage. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def contract(self, contract): def leverage(self): """Gets the leverage of this FuturesAutoDeleverage. # noqa: E501 - Position leverage # noqa: E501 + Position leverage. # noqa: E501 :return: The leverage of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this FuturesAutoDeleverage. - Position leverage # noqa: E501 + Position leverage. # noqa: E501 :param leverage: The leverage of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def leverage(self, leverage): def cross_leverage_limit(self): """Gets the cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 :return: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def cross_leverage_limit(self): def cross_leverage_limit(self, cross_leverage_limit): """Sets the cross_leverage_limit of this FuturesAutoDeleverage. - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 :param cross_leverage_limit: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def cross_leverage_limit(self, cross_leverage_limit): def entry_price(self): """Gets the entry_price of this FuturesAutoDeleverage. # noqa: E501 - Average entry price # noqa: E501 + Average entry price. # noqa: E501 :return: The entry_price of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this FuturesAutoDeleverage. - Average entry price # noqa: E501 + Average entry price. # noqa: E501 :param entry_price: The entry_price of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def entry_price(self, entry_price): def fill_price(self): """Gets the fill_price of this FuturesAutoDeleverage. # noqa: E501 - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :return: The fill_price of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesAutoDeleverage. - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :param fill_price: The fill_price of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def fill_price(self, fill_price): def trade_size(self): """Gets the trade_size of this FuturesAutoDeleverage. # noqa: E501 - Trading size # noqa: E501 + Trading size. # noqa: E501 :return: The trade_size of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -297,7 +297,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this FuturesAutoDeleverage. - Trading size # noqa: E501 + Trading size. # noqa: E501 :param trade_size: The trade_size of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -309,7 +309,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this FuturesAutoDeleverage. # noqa: E501 - Positions after auto-deleveraging # noqa: E501 + Positions after auto-deleveraging. # noqa: E501 :return: The position_size of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -320,7 +320,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this FuturesAutoDeleverage. - Positions after auto-deleveraging # noqa: E501 + Positions after auto-deleveraging. # noqa: E501 :param position_size: The position_size of this FuturesAutoDeleverage. # noqa: E501 :type: int diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py index d810873..910ba97 100644 --- a/gate_api/models/futures_batch_amend_order_request.py +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -77,7 +77,7 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N def order_id(self): """Gets the order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 - Order id, order_id and text must contain at least one # noqa: E501 + Order id, order_id and text must contain at least one. # noqa: E501 :return: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: int @@ -88,7 +88,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this FuturesBatchAmendOrderRequest. - Order id, order_id and text must contain at least one # noqa: E501 + Order id, order_id and text must contain at least one. # noqa: E501 :param order_id: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: int @@ -100,7 +100,7 @@ def order_id(self, order_id): def text(self): """Gets the text of this FuturesBatchAmendOrderRequest. # noqa: E501 - User-defined order text, at least one of order_id and text must be passed # noqa: E501 + User-defined order text, at least one of order_id and text must be passed. # noqa: E501 :return: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesBatchAmendOrderRequest. - User-defined order text, at least one of order_id and text must be passed # noqa: E501 + User-defined order text, at least one of order_id and text must be passed. # noqa: E501 :param text: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def text(self, text): def size(self): """Gets the size of this FuturesBatchAmendOrderRequest. # noqa: E501 - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 :return: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: int @@ -134,7 +134,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesBatchAmendOrderRequest. - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, other orders that only reduce positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 :param size: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: int @@ -169,7 +169,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :return: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this FuturesBatchAmendOrderRequest. - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :param amend_text: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py index f40563c..3094ad9 100644 --- a/gate_api/models/futures_candlestick.py +++ b/gate_api/models/futures_candlestick.py @@ -87,7 +87,7 @@ def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, sum=None, loc def t(self): """Gets the t of this FuturesCandlestick. # noqa: E501 - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :return: The t of this FuturesCandlestick. # noqa: E501 :rtype: float @@ -98,7 +98,7 @@ def t(self): def t(self, t): """Sets the t of this FuturesCandlestick. - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :param t: The t of this FuturesCandlestick. # noqa: E501 :type: float @@ -110,7 +110,7 @@ def t(self, t): def v(self): """Gets the v of this FuturesCandlestick. # noqa: E501 - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 :return: The v of this FuturesCandlestick. # noqa: E501 :rtype: int @@ -121,7 +121,7 @@ def v(self): def v(self, v): """Sets the v of this FuturesCandlestick. - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 :param v: The v of this FuturesCandlestick. # noqa: E501 :type: int @@ -133,7 +133,7 @@ def v(self, v): def c(self): """Gets the c of this FuturesCandlestick. # noqa: E501 - Close price (quote currency) # noqa: E501 + Close price (quote currency). # noqa: E501 :return: The c of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def c(self): def c(self, c): """Sets the c of this FuturesCandlestick. - Close price (quote currency) # noqa: E501 + Close price (quote currency). # noqa: E501 :param c: The c of this FuturesCandlestick. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def c(self, c): def h(self): """Gets the h of this FuturesCandlestick. # noqa: E501 - Highest price (quote currency) # noqa: E501 + Highest price (quote currency). # noqa: E501 :return: The h of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def h(self): def h(self, h): """Sets the h of this FuturesCandlestick. - Highest price (quote currency) # noqa: E501 + Highest price (quote currency). # noqa: E501 :param h: The h of this FuturesCandlestick. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def h(self, h): def l(self): """Gets the l of this FuturesCandlestick. # noqa: E501 - Lowest price (quote currency) # noqa: E501 + Lowest price (quote currency). # noqa: E501 :return: The l of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def l(self): def l(self, l): """Sets the l of this FuturesCandlestick. - Lowest price (quote currency) # noqa: E501 + Lowest price (quote currency). # noqa: E501 :param l: The l of this FuturesCandlestick. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def l(self, l): def o(self): """Gets the o of this FuturesCandlestick. # noqa: E501 - Open price (quote currency) # noqa: E501 + Open price (quote currency). # noqa: E501 :return: The o of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def o(self): def o(self, o): """Sets the o of this FuturesCandlestick. - Open price (quote currency) # noqa: E501 + Open price (quote currency). # noqa: E501 :param o: The o of this FuturesCandlestick. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def o(self, o): def sum(self): """Gets the sum of this FuturesCandlestick. # noqa: E501 - Trading volume (unit: Quote currency) # noqa: E501 + Trading volume (unit: Quote currency). # noqa: E501 :return: The sum of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def sum(self): def sum(self, sum): """Sets the sum of this FuturesCandlestick. - Trading volume (unit: Quote currency) # noqa: E501 + Trading volume (unit: Quote currency). # noqa: E501 :param sum: The sum of this FuturesCandlestick. # noqa: E501 :type: str diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py index 7b34cd8..92a437e 100644 --- a/gate_api/models/futures_fee.py +++ b/gate_api/models/futures_fee.py @@ -62,7 +62,7 @@ def __init__(self, taker_fee=None, maker_fee=None, local_vars_configuration=None def taker_fee(self): """Gets the taker_fee of this FuturesFee. # noqa: E501 - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :return: The taker_fee of this FuturesFee. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def taker_fee(self): def taker_fee(self, taker_fee): """Sets the taker_fee of this FuturesFee. - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :param taker_fee: The taker_fee of this FuturesFee. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def taker_fee(self, taker_fee): def maker_fee(self): """Gets the maker_fee of this FuturesFee. # noqa: E501 - maker fee # noqa: E501 + maker fee. # noqa: E501 :return: The maker_fee of this FuturesFee. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def maker_fee(self): def maker_fee(self, maker_fee): """Sets the maker_fee of this FuturesFee. - maker fee # noqa: E501 + maker fee. # noqa: E501 :param maker_fee: The maker_fee of this FuturesFee. # noqa: E501 :type: str diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py index 94be61b..5f6c799 100644 --- a/gate_api/models/futures_index_constituents.py +++ b/gate_api/models/futures_index_constituents.py @@ -62,7 +62,7 @@ def __init__(self, index=None, constituents=None, local_vars_configuration=None) def index(self): """Gets the index of this FuturesIndexConstituents. # noqa: E501 - Index name # noqa: E501 + Index name. # noqa: E501 :return: The index of this FuturesIndexConstituents. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def index(self): def index(self, index): """Sets the index of this FuturesIndexConstituents. - Index name # noqa: E501 + Index name. # noqa: E501 :param index: The index of this FuturesIndexConstituents. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def index(self, index): def constituents(self): """Gets the constituents of this FuturesIndexConstituents. # noqa: E501 - Constituents # noqa: E501 + Constituents. # noqa: E501 :return: The constituents of this FuturesIndexConstituents. # noqa: E501 :rtype: list[IndexConstituent] @@ -96,7 +96,7 @@ def constituents(self): def constituents(self, constituents): """Sets the constituents of this FuturesIndexConstituents. - Constituents # noqa: E501 + Constituents. # noqa: E501 :param constituents: The constituents of this FuturesIndexConstituents. # noqa: E501 :type: list[IndexConstituent] diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py index 52b3a90..16a22df 100644 --- a/gate_api/models/futures_initial_order.py +++ b/gate_api/models/futures_initial_order.py @@ -100,7 +100,7 @@ def __init__(self, contract=None, size=None, price=None, close=False, tif='gtc', def contract(self): """Gets the contract of this FuturesInitialOrder. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesInitialOrder. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this FuturesInitialOrder. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def size(self, size): def price(self): """Gets the price of this FuturesInitialOrder. # noqa: E501 - Order price. Set to 0 to use market price # noqa: E501 + Order price. Set to 0 to use market price. # noqa: E501 :return: The price of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesInitialOrder. - Order price. Set to 0 to use market price # noqa: E501 + Order price. Set to 0 to use market price. # noqa: E501 :param price: The price of this FuturesInitialOrder. # noqa: E501 :type: str @@ -196,7 +196,7 @@ def close(self, close): def tif(self): """Gets the tif of this FuturesInitialOrder. # noqa: E501 - Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 + Time in force strategy, default is gtc, market order currently only supports ioc mode mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 :return: The tif of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -207,7 +207,7 @@ def tif(self): def tif(self, tif): """Sets the tif of this FuturesInitialOrder. - Time in force strategy, default is gtc, market order currently only supports ioc mode Market order currently only supports ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 + Time in force strategy, default is gtc, market order currently only supports ioc mode mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 :param tif: The tif of this FuturesInitialOrder. # noqa: E501 :type: str @@ -294,7 +294,7 @@ def auto_size(self, auto_size): def is_reduce_only(self): """Gets the is_reduce_only of this FuturesInitialOrder. # noqa: E501 - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :return: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 :rtype: bool @@ -305,7 +305,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this FuturesInitialOrder. - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :param is_reduce_only: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 :type: bool @@ -317,7 +317,7 @@ def is_reduce_only(self, is_reduce_only): def is_close(self): """Gets the is_close of this FuturesInitialOrder. # noqa: E501 - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :return: The is_close of this FuturesInitialOrder. # noqa: E501 :rtype: bool @@ -328,7 +328,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this FuturesInitialOrder. - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :param is_close: The is_close of this FuturesInitialOrder. # noqa: E501 :type: bool diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py index 448dd48..121a550 100644 --- a/gate_api/models/futures_limit_risk_tiers.py +++ b/gate_api/models/futures_limit_risk_tiers.py @@ -87,7 +87,7 @@ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_ra def tier(self): """Gets the tier of this FuturesLimitRiskTiers. # noqa: E501 - Tier # noqa: E501 + Tier. # noqa: E501 :return: The tier of this FuturesLimitRiskTiers. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this FuturesLimitRiskTiers. - Tier # noqa: E501 + Tier. # noqa: E501 :param tier: The tier of this FuturesLimitRiskTiers. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def tier(self, tier): def risk_limit(self): """Gets the risk_limit of this FuturesLimitRiskTiers. # noqa: E501 - Position risk limit # noqa: E501 + Position risk limit. # noqa: E501 :return: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def risk_limit(self): def risk_limit(self, risk_limit): """Sets the risk_limit of this FuturesLimitRiskTiers. - Position risk limit # noqa: E501 + Position risk limit. # noqa: E501 :param risk_limit: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def risk_limit(self, risk_limit): def initial_rate(self): """Gets the initial_rate of this FuturesLimitRiskTiers. # noqa: E501 - Initial margin rate # noqa: E501 + Initial margin rate. # noqa: E501 :return: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def initial_rate(self): def initial_rate(self, initial_rate): """Sets the initial_rate of this FuturesLimitRiskTiers. - Initial margin rate # noqa: E501 + Initial margin rate. # noqa: E501 :param initial_rate: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def initial_rate(self, initial_rate): def maintenance_rate(self): """Gets the maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 - Maintenance margin rate # noqa: E501 + Maintenance margin rate. # noqa: E501 :return: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this FuturesLimitRiskTiers. - Maintenance margin rate # noqa: E501 + Maintenance margin rate. # noqa: E501 :param maintenance_rate: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def maintenance_rate(self, maintenance_rate): def leverage_max(self): """Gets the leverage_max of this FuturesLimitRiskTiers. # noqa: E501 - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :return: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this FuturesLimitRiskTiers. - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :param leverage_max: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def leverage_max(self, leverage_max): def contract(self): """Gets the contract of this FuturesLimitRiskTiers. # noqa: E501 - Markets, visible only during market pagination requests # noqa: E501 + Markets, visible only during market pagination requests. # noqa: E501 :return: The contract of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesLimitRiskTiers. - Markets, visible only during market pagination requests # noqa: E501 + Markets, visible only during market pagination requests. # noqa: E501 :param contract: The contract of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def contract(self, contract): def deduction(self): """Gets the deduction of this FuturesLimitRiskTiers. # noqa: E501 - Maintenance margin quick calculation deduction # noqa: E501 + Maintenance margin quick calculation deduction. # noqa: E501 :return: The deduction of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def deduction(self): def deduction(self, deduction): """Sets the deduction of this FuturesLimitRiskTiers. - Maintenance margin quick calculation deduction # noqa: E501 + Maintenance margin quick calculation deduction. # noqa: E501 :param deduction: The deduction of this FuturesLimitRiskTiers. # noqa: E501 :type: str diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py index 15fe47f..d57b282 100644 --- a/gate_api/models/futures_liq_order.py +++ b/gate_api/models/futures_liq_order.py @@ -87,7 +87,7 @@ def __init__(self, time=None, contract=None, size=None, order_size=None, order_p def time(self): """Gets the time of this FuturesLiqOrder. # noqa: E501 - Liquidation time # noqa: E501 + Liquidation time. # noqa: E501 :return: The time of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesLiqOrder. - Liquidation time # noqa: E501 + Liquidation time. # noqa: E501 :param time: The time of this FuturesLiqOrder. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def time(self, time): def contract(self): """Gets the contract of this FuturesLiqOrder. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this FuturesLiqOrder. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesLiqOrder. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this FuturesLiqOrder. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def contract(self, contract): def size(self): """Gets the size of this FuturesLiqOrder. # noqa: E501 - User position size # noqa: E501 + User position size. # noqa: E501 :return: The size of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -144,7 +144,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesLiqOrder. - User position size # noqa: E501 + User position size. # noqa: E501 :param size: The size of this FuturesLiqOrder. # noqa: E501 :type: int @@ -156,7 +156,7 @@ def size(self, size): def order_size(self): """Gets the order_size of this FuturesLiqOrder. # noqa: E501 - Number of forced liquidation orders # noqa: E501 + Number of forced liquidation orders. # noqa: E501 :return: The order_size of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -167,7 +167,7 @@ def order_size(self): def order_size(self, order_size): """Sets the order_size of this FuturesLiqOrder. - Number of forced liquidation orders # noqa: E501 + Number of forced liquidation orders. # noqa: E501 :param order_size: The order_size of this FuturesLiqOrder. # noqa: E501 :type: int @@ -179,7 +179,7 @@ def order_size(self, order_size): def order_price(self): """Gets the order_price of this FuturesLiqOrder. # noqa: E501 - Liquidation order price # noqa: E501 + Liquidation order price. # noqa: E501 :return: The order_price of this FuturesLiqOrder. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def order_price(self): def order_price(self, order_price): """Sets the order_price of this FuturesLiqOrder. - Liquidation order price # noqa: E501 + Liquidation order price. # noqa: E501 :param order_price: The order_price of this FuturesLiqOrder. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def order_price(self, order_price): def fill_price(self): """Gets the fill_price of this FuturesLiqOrder. # noqa: E501 - Liquidation order average taker price # noqa: E501 + Liquidation order average taker price. # noqa: E501 :return: The fill_price of this FuturesLiqOrder. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesLiqOrder. - Liquidation order average taker price # noqa: E501 + Liquidation order average taker price. # noqa: E501 :param fill_price: The fill_price of this FuturesLiqOrder. # noqa: E501 :type: str @@ -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 + System liquidation order maker size. # noqa: E501 :return: The left of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def left(self): def left(self, left): """Sets the left of this FuturesLiqOrder. - System liquidation order maker size # noqa: E501 + System liquidation order maker size. # noqa: E501 :param left: The left of this FuturesLiqOrder. # noqa: E501 :type: int diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py index 41cba35..9e27ab5 100644 --- a/gate_api/models/futures_liquidate.py +++ b/gate_api/models/futures_liquidate.py @@ -112,7 +112,7 @@ def __init__(self, time=None, contract=None, leverage=None, size=None, margin=No def time(self): """Gets the time of this FuturesLiquidate. # noqa: E501 - Liquidation time # noqa: E501 + Liquidation time. # noqa: E501 :return: The time of this FuturesLiquidate. # noqa: E501 :rtype: int @@ -123,7 +123,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesLiquidate. - Liquidation time # noqa: E501 + Liquidation time. # noqa: E501 :param time: The time of this FuturesLiquidate. # noqa: E501 :type: int @@ -135,7 +135,7 @@ def time(self, time): def contract(self): """Gets the contract of this FuturesLiquidate. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesLiquidate. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this FuturesLiquidate. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def leverage(self, leverage): def size(self): """Gets the size of this FuturesLiquidate. # noqa: E501 - Position size # noqa: E501 + Position size. # noqa: E501 :return: The size of this FuturesLiquidate. # noqa: E501 :rtype: int @@ -192,7 +192,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesLiquidate. - Position size # noqa: E501 + Position size. # noqa: E501 :param size: The size of this FuturesLiquidate. # noqa: E501 :type: int @@ -319,7 +319,7 @@ def order_id(self, order_id): def order_price(self): """Gets the order_price of this FuturesLiquidate. # noqa: E501 - Liquidation order price # noqa: E501 + Liquidation order price. # noqa: E501 :return: The order_price of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -330,7 +330,7 @@ def order_price(self): def order_price(self, order_price): """Sets the order_price of this FuturesLiquidate. - Liquidation order price # noqa: E501 + Liquidation order price. # noqa: E501 :param order_price: The order_price of this FuturesLiquidate. # noqa: E501 :type: str @@ -342,7 +342,7 @@ def order_price(self, order_price): def fill_price(self): """Gets the fill_price of this FuturesLiquidate. # noqa: E501 - Liquidation order average taker price # noqa: E501 + Liquidation order average taker price. # noqa: E501 :return: The fill_price of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -353,7 +353,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesLiquidate. - Liquidation order average taker price # noqa: E501 + Liquidation order average taker price. # noqa: E501 :param fill_price: The fill_price of this FuturesLiquidate. # noqa: E501 :type: str @@ -365,7 +365,7 @@ def fill_price(self, fill_price): def left(self): """Gets the left of this FuturesLiquidate. # noqa: E501 - Liquidation order maker size # noqa: E501 + Liquidation order maker size. # noqa: E501 :return: The left of this FuturesLiquidate. # noqa: E501 :rtype: int @@ -376,7 +376,7 @@ def left(self): def left(self, left): """Sets the left of this FuturesLiquidate. - Liquidation order maker size # noqa: E501 + Liquidation order maker size. # noqa: E501 :param left: The left of this FuturesLiquidate. # noqa: E501 :type: int diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index 24ce0d6..9bd08b7 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -58,8 +58,7 @@ class FuturesOrder(object): 'auto_size': 'str', 'stp_id': 'int', 'stp_act': 'str', - 'amend_text': 'str', - 'biz_info': 'str' + 'amend_text': 'str' } attribute_map = { @@ -88,12 +87,11 @@ class FuturesOrder(object): 'auto_size': 'auto_size', 'stp_id': 'stp_id', 'stp_act': 'stp_act', - 'amend_text': 'amend_text', - 'biz_info': 'biz_info' + 'amend_text': 'amend_text' } - def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_id=None, stp_act=None, amend_text=None, biz_info=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, str, Configuration) -> None + def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_id=None, stp_act=None, amend_text=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, Configuration) -> None """FuturesOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -125,7 +123,6 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis self._stp_id = None self._stp_act = None self._amend_text = None - self._biz_info = None self.discriminator = None if id is not None: @@ -178,14 +175,12 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis self.stp_act = stp_act if amend_text is not None: self.amend_text = amend_text - if biz_info is not None: - self.biz_info = biz_info @property def id(self): """Gets the id of this FuturesOrder. # noqa: E501 - Futures order ID # noqa: E501 + Futures order ID. # noqa: E501 :return: The id of this FuturesOrder. # noqa: E501 :rtype: int @@ -196,7 +191,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesOrder. - Futures order ID # noqa: E501 + Futures order ID. # noqa: E501 :param id: The id of this FuturesOrder. # noqa: E501 :type: int @@ -208,7 +203,7 @@ def id(self, id): def user(self): """Gets the user of this FuturesOrder. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this FuturesOrder. # noqa: E501 :rtype: int @@ -219,7 +214,7 @@ def user(self): def user(self, user): """Sets the user of this FuturesOrder. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this FuturesOrder. # noqa: E501 :type: int @@ -231,7 +226,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this FuturesOrder. # noqa: E501 - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :return: The create_time of this FuturesOrder. # noqa: E501 :rtype: float @@ -242,7 +237,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FuturesOrder. - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :param create_time: The create_time of this FuturesOrder. # noqa: E501 :type: float @@ -254,7 +249,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this FuturesOrder. # noqa: E501 - Order finished time. Not returned if order is open # noqa: E501 + Order finished time. Not returned if order is open. # noqa: E501 :return: The finish_time of this FuturesOrder. # noqa: E501 :rtype: float @@ -265,7 +260,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this FuturesOrder. - Order finished time. Not returned if order is open # noqa: E501 + Order finished time. Not returned if order is open. # noqa: E501 :param finish_time: The finish_time of this FuturesOrder. # noqa: E501 :type: float @@ -277,7 +272,7 @@ def finish_time(self, finish_time): def finish_as(self): """Gets the finish_as of this FuturesOrder. # noqa: E501 - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :return: The finish_as of this FuturesOrder. # noqa: E501 :rtype: str @@ -288,7 +283,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this FuturesOrder. - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :param finish_as: The finish_as of this FuturesOrder. # noqa: E501 :type: str @@ -335,7 +330,7 @@ def status(self, status): def contract(self): """Gets the contract of this FuturesOrder. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this FuturesOrder. # noqa: E501 :rtype: str @@ -346,7 +341,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesOrder. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this FuturesOrder. # noqa: E501 :type: str @@ -408,7 +403,7 @@ def iceberg(self, iceberg): def price(self): """Gets the price of this FuturesOrder. # noqa: E501 - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 :return: The price of this FuturesOrder. # noqa: E501 :rtype: str @@ -419,7 +414,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesOrder. - Order price. 0 for market order with `tif` set as `ioc` # noqa: E501 + Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 :param price: The price of this FuturesOrder. # noqa: E501 :type: str @@ -431,7 +426,7 @@ def price(self, price): def close(self): """Gets the close of this FuturesOrder. # noqa: E501 - Set as `true` to close the position, with `size` set to 0 # noqa: E501 + Set as `true` to close the position, with `size` set to 0. # noqa: E501 :return: The close of this FuturesOrder. # noqa: E501 :rtype: bool @@ -442,7 +437,7 @@ def close(self): def close(self, close): """Sets the close of this FuturesOrder. - Set as `true` to close the position, with `size` set to 0 # noqa: E501 + Set as `true` to close the position, with `size` set to 0. # noqa: E501 :param close: The close of this FuturesOrder. # noqa: E501 :type: bool @@ -454,7 +449,7 @@ def close(self, close): def is_close(self): """Gets the is_close of this FuturesOrder. # noqa: E501 - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :return: The is_close of this FuturesOrder. # noqa: E501 :rtype: bool @@ -465,7 +460,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this FuturesOrder. - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :param is_close: The is_close of this FuturesOrder. # noqa: E501 :type: bool @@ -477,7 +472,7 @@ def is_close(self, is_close): def reduce_only(self): """Gets the reduce_only of this FuturesOrder. # noqa: E501 - Set as `true` to be reduce-only order # noqa: E501 + Set as `true` to be reduce-only order. # noqa: E501 :return: The reduce_only of this FuturesOrder. # noqa: E501 :rtype: bool @@ -488,7 +483,7 @@ def reduce_only(self): def reduce_only(self, reduce_only): """Sets the reduce_only of this FuturesOrder. - Set as `true` to be reduce-only order # noqa: E501 + Set as `true` to be reduce-only order. # noqa: E501 :param reduce_only: The reduce_only of this FuturesOrder. # noqa: E501 :type: bool @@ -500,7 +495,7 @@ def reduce_only(self, reduce_only): def is_reduce_only(self): """Gets the is_reduce_only of this FuturesOrder. # noqa: E501 - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :return: The is_reduce_only of this FuturesOrder. # noqa: E501 :rtype: bool @@ -511,7 +506,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this FuturesOrder. - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :param is_reduce_only: The is_reduce_only of this FuturesOrder. # noqa: E501 :type: bool @@ -523,7 +518,7 @@ def is_reduce_only(self, is_reduce_only): def is_liq(self): """Gets the is_liq of this FuturesOrder. # noqa: E501 - Is the order for liquidation # noqa: E501 + Is the order for liquidation. # noqa: E501 :return: The is_liq of this FuturesOrder. # noqa: E501 :rtype: bool @@ -534,7 +529,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this FuturesOrder. - Is the order for liquidation # noqa: E501 + Is the order for liquidation. # noqa: E501 :param is_liq: The is_liq of this FuturesOrder. # noqa: E501 :type: bool @@ -575,7 +570,7 @@ def tif(self, tif): def left(self): """Gets the left of this FuturesOrder. # noqa: E501 - Size left to be traded # noqa: E501 + Size left to be traded. # noqa: E501 :return: The left of this FuturesOrder. # noqa: E501 :rtype: int @@ -586,7 +581,7 @@ def left(self): def left(self, left): """Sets the left of this FuturesOrder. - Size left to be traded # noqa: E501 + Size left to be traded. # noqa: E501 :param left: The left of this FuturesOrder. # noqa: E501 :type: int @@ -598,7 +593,7 @@ def left(self, left): def fill_price(self): """Gets the fill_price of this FuturesOrder. # noqa: E501 - Fill price of the order # noqa: E501 + Fill price of the order. # noqa: E501 :return: The fill_price of this FuturesOrder. # noqa: E501 :rtype: str @@ -609,7 +604,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesOrder. - Fill price of the order # noqa: E501 + Fill price of the order. # noqa: E501 :param fill_price: The fill_price of this FuturesOrder. # noqa: E501 :type: str @@ -621,7 +616,7 @@ def fill_price(self, fill_price): def text(self): """Gets the text of this FuturesOrder. # noqa: E501 - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-xxx: a. Liquidation under the classic account’s new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-xxx: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 + Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-x: new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-x: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 :return: The text of this FuturesOrder. # noqa: E501 :rtype: str @@ -632,7 +627,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesOrder. - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-xxx: a. Liquidation under the classic account’s new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-xxx: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 + Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-x: new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-x: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 :param text: The text of this FuturesOrder. # noqa: E501 :type: str @@ -644,7 +639,7 @@ def text(self, text): def tkfr(self): """Gets the tkfr of this FuturesOrder. # noqa: E501 - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :return: The tkfr of this FuturesOrder. # noqa: E501 :rtype: str @@ -655,7 +650,7 @@ def tkfr(self): def tkfr(self, tkfr): """Sets the tkfr of this FuturesOrder. - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :param tkfr: The tkfr of this FuturesOrder. # noqa: E501 :type: str @@ -667,7 +662,7 @@ def tkfr(self, tkfr): def mkfr(self): """Gets the mkfr of this FuturesOrder. # noqa: E501 - Maker fee # noqa: E501 + Maker fee. # noqa: E501 :return: The mkfr of this FuturesOrder. # noqa: E501 :rtype: str @@ -678,7 +673,7 @@ def mkfr(self): def mkfr(self, mkfr): """Sets the mkfr of this FuturesOrder. - Maker fee # noqa: E501 + Maker fee. # noqa: E501 :param mkfr: The mkfr of this FuturesOrder. # noqa: E501 :type: str @@ -690,7 +685,7 @@ def mkfr(self, mkfr): def refu(self): """Gets the refu of this FuturesOrder. # noqa: E501 - Reference user ID # noqa: E501 + Reference user ID. # noqa: E501 :return: The refu of this FuturesOrder. # noqa: E501 :rtype: int @@ -701,7 +696,7 @@ def refu(self): def refu(self, refu): """Sets the refu of this FuturesOrder. - Reference user ID # noqa: E501 + Reference user ID. # noqa: E501 :param refu: The refu of this FuturesOrder. # noqa: E501 :type: int @@ -765,7 +760,7 @@ def stp_id(self, stp_id): def stp_act(self): """Gets the stp_act of this FuturesOrder. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this FuturesOrder. # noqa: E501 :rtype: str @@ -776,7 +771,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this FuturesOrder. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this FuturesOrder. # noqa: E501 :type: str @@ -794,7 +789,7 @@ def stp_act(self, stp_act): def amend_text(self): """Gets the amend_text of this FuturesOrder. # noqa: E501 - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :return: The amend_text of this FuturesOrder. # noqa: E501 :rtype: str @@ -805,7 +800,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this FuturesOrder. - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :param amend_text: The amend_text of this FuturesOrder. # noqa: E501 :type: str @@ -813,29 +808,6 @@ def amend_text(self, amend_text): self._amend_text = amend_text - @property - def biz_info(self): - """Gets the biz_info of this FuturesOrder. # noqa: E501 - - Additional information # noqa: E501 - - :return: The biz_info of this FuturesOrder. # noqa: E501 - :rtype: str - """ - return self._biz_info - - @biz_info.setter - def biz_info(self, biz_info): - """Sets the biz_info of this FuturesOrder. - - Additional information # noqa: E501 - - :param biz_info: The biz_info of this FuturesOrder. # noqa: E501 - :type: str - """ - - self._biz_info = biz_info - 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 2de0040..267b361 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -35,21 +35,17 @@ class FuturesOrderAmendment(object): openapi_types = { 'size': 'int', 'price': 'str', - 'amend_text': 'str', - 'biz_info': 'str', - 'bbo': 'str' + 'amend_text': 'str' } attribute_map = { 'size': 'size', 'price': 'price', - 'amend_text': 'amend_text', - 'biz_info': 'biz_info', - 'bbo': 'bbo' + 'amend_text': 'amend_text' } - def __init__(self, size=None, price=None, amend_text=None, biz_info=None, bbo=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, str, str, Configuration) -> None + def __init__(self, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, Configuration) -> None """FuturesOrderAmendment - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -58,8 +54,6 @@ def __init__(self, size=None, price=None, amend_text=None, biz_info=None, bbo=No self._size = None self._price = None self._amend_text = None - self._biz_info = None - self._bbo = None self.discriminator = None if size is not None: @@ -68,10 +62,6 @@ def __init__(self, size=None, price=None, amend_text=None, biz_info=None, bbo=No self.price = price if amend_text is not None: self.amend_text = amend_text - if biz_info is not None: - self.biz_info = biz_info - if bbo is not None: - self.bbo = bbo @property def size(self): @@ -123,7 +113,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this FuturesOrderAmendment. # noqa: E501 - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :return: The amend_text of this FuturesOrderAmendment. # noqa: E501 :rtype: str @@ -134,7 +124,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this FuturesOrderAmendment. - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :param amend_text: The amend_text of this FuturesOrderAmendment. # noqa: E501 :type: str @@ -142,52 +132,6 @@ def amend_text(self, amend_text): self._amend_text = amend_text - @property - def biz_info(self): - """Gets the biz_info of this FuturesOrderAmendment. # noqa: E501 - - Users can annotate this modification with information. # noqa: E501 - - :return: The biz_info of this FuturesOrderAmendment. # noqa: E501 - :rtype: str - """ - return self._biz_info - - @biz_info.setter - def biz_info(self, biz_info): - """Sets the biz_info of this FuturesOrderAmendment. - - Users can annotate this modification with information. # noqa: E501 - - :param biz_info: The biz_info of this FuturesOrderAmendment. # noqa: E501 - :type: str - """ - - self._biz_info = biz_info - - @property - def bbo(self): - """Gets the bbo of this FuturesOrderAmendment. # noqa: E501 - - Users are able to modify the offer price manually. # noqa: E501 - - :return: The bbo of this FuturesOrderAmendment. # noqa: E501 - :rtype: str - """ - return self._bbo - - @bbo.setter - def bbo(self, bbo): - """Sets the bbo of this FuturesOrderAmendment. - - Users are able to modify the offer price manually. # noqa: E501 - - :param bbo: The bbo of this FuturesOrderAmendment. # noqa: E501 - :type: str - """ - - self._bbo = bbo - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py index 12d27a6..48e22d5 100644 --- a/gate_api/models/futures_order_book.py +++ b/gate_api/models/futures_order_book.py @@ -98,7 +98,7 @@ def id(self, id): def current(self): """Gets the current of this FuturesOrderBook. # noqa: E501 - Response data generation timestamp # noqa: E501 + Response data generation timestamp. # noqa: E501 :return: The current of this FuturesOrderBook. # noqa: E501 :rtype: float @@ -109,7 +109,7 @@ def current(self): def current(self, current): """Sets the current of this FuturesOrderBook. - Response data generation timestamp # noqa: E501 + Response data generation timestamp. # noqa: E501 :param current: The current of this FuturesOrderBook. # noqa: E501 :type: float @@ -121,7 +121,7 @@ def current(self, current): def update(self): """Gets the update of this FuturesOrderBook. # noqa: E501 - Order book changed timestamp # noqa: E501 + Order book changed timestamp. # noqa: E501 :return: The update of this FuturesOrderBook. # noqa: E501 :rtype: float @@ -132,7 +132,7 @@ def update(self): def update(self, update): """Sets the update of this FuturesOrderBook. - Order book changed timestamp # noqa: E501 + Order book changed timestamp. # noqa: E501 :param update: The update of this FuturesOrderBook. # noqa: E501 :type: float @@ -144,7 +144,7 @@ def update(self, update): def asks(self): """Gets the asks of this FuturesOrderBook. # noqa: E501 - Asks order depth # noqa: E501 + Asks order depth. # noqa: E501 :return: The asks of this FuturesOrderBook. # noqa: E501 :rtype: list[FuturesOrderBookItem] @@ -155,7 +155,7 @@ def asks(self): def asks(self, asks): """Sets the asks of this FuturesOrderBook. - Asks order depth # noqa: E501 + Asks order depth. # noqa: E501 :param asks: The asks of this FuturesOrderBook. # noqa: E501 :type: list[FuturesOrderBookItem] @@ -169,7 +169,7 @@ def asks(self, asks): def bids(self): """Gets the bids of this FuturesOrderBook. # noqa: E501 - Bids order depth # noqa: E501 + Bids order depth. # noqa: E501 :return: The bids of this FuturesOrderBook. # noqa: E501 :rtype: list[FuturesOrderBookItem] @@ -180,7 +180,7 @@ def bids(self): def bids(self, bids): """Sets the bids of this FuturesOrderBook. - Bids order depth # noqa: E501 + Bids order depth. # noqa: E501 :param bids: The bids of this FuturesOrderBook. # noqa: E501 :type: list[FuturesOrderBookItem] diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py index 9ebc223..da75584 100644 --- a/gate_api/models/futures_order_book_item.py +++ b/gate_api/models/futures_order_book_item.py @@ -62,7 +62,7 @@ def __init__(self, p=None, s=None, local_vars_configuration=None): # noqa: E501 def p(self): """Gets the p of this FuturesOrderBookItem. # noqa: E501 - Price (quote currency) # noqa: E501 + Price (quote currency). # noqa: E501 :return: The p of this FuturesOrderBookItem. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def p(self): def p(self, p): """Sets the p of this FuturesOrderBookItem. - Price (quote currency) # noqa: E501 + Price (quote currency). # noqa: E501 :param p: The p of this FuturesOrderBookItem. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def p(self, p): def s(self): """Gets the s of this FuturesOrderBookItem. # noqa: E501 - Size # noqa: E501 + Size. # noqa: E501 :return: The s of this FuturesOrderBookItem. # noqa: E501 :rtype: int @@ -96,7 +96,7 @@ def s(self): def s(self, s): """Sets the s of this FuturesOrderBookItem. - Size # noqa: E501 + Size. # noqa: E501 :param s: The s of this FuturesOrderBookItem. # noqa: E501 :type: int diff --git a/gate_api/models/futures_position_cross_mode.py b/gate_api/models/futures_position_cross_mode.py index a5778a2..1297bb6 100644 --- a/gate_api/models/futures_position_cross_mode.py +++ b/gate_api/models/futures_position_cross_mode.py @@ -60,7 +60,7 @@ def __init__(self, mode=None, contract=None, local_vars_configuration=None): # def mode(self): """Gets the mode of this FuturesPositionCrossMode. # noqa: E501 - Full position-by-position model, ISOLATED-by-position, CROSS-full position # noqa: E501 + Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 :return: The mode of this FuturesPositionCrossMode. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this FuturesPositionCrossMode. - Full position-by-position model, ISOLATED-by-position, CROSS-full position # noqa: E501 + Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 :param mode: The mode of this FuturesPositionCrossMode. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def mode(self, mode): def contract(self): """Gets the contract of this FuturesPositionCrossMode. # noqa: E501 - Contract Market # noqa: E501 + Contract Market. # noqa: E501 :return: The contract of this FuturesPositionCrossMode. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesPositionCrossMode. - Contract Market # noqa: E501 + Contract Market. # noqa: E501 :param contract: The contract of this FuturesPositionCrossMode. # noqa: E501 :type: str diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py index dcd47b7..f4b3a62 100644 --- a/gate_api/models/futures_premium_index.py +++ b/gate_api/models/futures_premium_index.py @@ -77,7 +77,7 @@ def __init__(self, t=None, c=None, h=None, l=None, o=None, local_vars_configurat def t(self): """Gets the t of this FuturesPremiumIndex. # noqa: E501 - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :return: The t of this FuturesPremiumIndex. # noqa: E501 :rtype: float @@ -88,7 +88,7 @@ def t(self): def t(self, t): """Sets the t of this FuturesPremiumIndex. - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :param t: The t of this FuturesPremiumIndex. # noqa: E501 :type: float @@ -100,7 +100,7 @@ def t(self, t): def c(self): """Gets the c of this FuturesPremiumIndex. # noqa: E501 - Close price # noqa: E501 + Close price. # noqa: E501 :return: The c of this FuturesPremiumIndex. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def c(self): def c(self, c): """Sets the c of this FuturesPremiumIndex. - Close price # noqa: E501 + Close price. # noqa: E501 :param c: The c of this FuturesPremiumIndex. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def c(self, c): def h(self): """Gets the h of this FuturesPremiumIndex. # noqa: E501 - Highest price # noqa: E501 + Highest 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 + Highest 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 + Lowest 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 + Lowest price`. # noqa: E501 :param l: The l of this FuturesPremiumIndex. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def l(self, l): def o(self): """Gets the o of this FuturesPremiumIndex. # noqa: E501 - Open price # noqa: E501 + Open price. # noqa: E501 :return: The o of this FuturesPremiumIndex. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def o(self): def o(self, o): """Sets the o of this FuturesPremiumIndex. - Open price # noqa: E501 + Open price. # noqa: E501 :param o: The o of this FuturesPremiumIndex. # noqa: E501 :type: str diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py index 02fb0ac..300b245 100644 --- a/gate_api/models/futures_price_trigger.py +++ b/gate_api/models/futures_price_trigger.py @@ -106,7 +106,7 @@ def strategy_type(self, strategy_type): def price_type(self): """Gets the price_type of this FuturesPriceTrigger. # noqa: E501 - Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501 + Price type. 0 - latest deal price, 1 - mark price, 2 - index price. # noqa: E501 :return: The price_type of this FuturesPriceTrigger. # noqa: E501 :rtype: int @@ -117,7 +117,7 @@ def price_type(self): def price_type(self, price_type): """Sets the price_type of this FuturesPriceTrigger. - Price type. 0 - latest deal price, 1 - mark price, 2 - index price # noqa: E501 + Price type. 0 - latest deal price, 1 - mark price, 2 - index price. # noqa: E501 :param price_type: The price_type of this FuturesPriceTrigger. # noqa: E501 :type: int @@ -135,7 +135,7 @@ def price_type(self, price_type): def price(self): """Gets the price of this FuturesPriceTrigger. # noqa: E501 - Value of price on price triggered, or price gap on price gap triggered # noqa: E501 + Value of price on price triggered, or price gap on price gap triggered. # noqa: E501 :return: The price of this FuturesPriceTrigger. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesPriceTrigger. - Value of price on price triggered, or price gap on price gap triggered # noqa: E501 + Value of price on price triggered, or price gap on price gap triggered. # noqa: E501 :param price: The price of this FuturesPriceTrigger. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def price(self, price): def rule(self): """Gets the rule of this FuturesPriceTrigger. # noqa: E501 - Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 + Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 :return: The rule of this FuturesPriceTrigger. # noqa: E501 :rtype: int @@ -169,7 +169,7 @@ def rule(self): def rule(self, rule): """Sets the rule of this FuturesPriceTrigger. - Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - 2: Indicates that the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 + Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 :param rule: The rule of this FuturesPriceTrigger. # noqa: E501 :type: int diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index 062f02b..a726c29 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -156,7 +156,7 @@ def trigger(self, trigger): def id(self): """Gets the id of this FuturesPriceTriggeredOrder. # noqa: E501 - Auto order ID # noqa: E501 + Auto order ID. # noqa: E501 :return: The id of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -167,7 +167,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesPriceTriggeredOrder. - Auto order ID # noqa: E501 + Auto order ID. # noqa: E501 :param id: The id of this FuturesPriceTriggeredOrder. # noqa: E501 :type: int @@ -179,7 +179,7 @@ def id(self, id): def user(self): """Gets the user of this FuturesPriceTriggeredOrder. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def user(self): def user(self, user): """Sets the user of this FuturesPriceTriggeredOrder. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this FuturesPriceTriggeredOrder. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this FuturesPriceTriggeredOrder. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: float @@ -213,7 +213,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FuturesPriceTriggeredOrder. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param create_time: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 :type: float @@ -225,7 +225,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 - Finished time # noqa: E501 + Finished time. # noqa: E501 :return: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: float @@ -236,7 +236,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this FuturesPriceTriggeredOrder. - Finished time # noqa: E501 + Finished time. # noqa: E501 :param finish_time: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 :type: float @@ -248,7 +248,7 @@ def finish_time(self, finish_time): def trade_id(self): """Gets the trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 - ID of the newly created order on condition triggered # noqa: E501 + ID of the newly created order on condition triggered. # noqa: E501 :return: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -259,7 +259,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this FuturesPriceTriggeredOrder. - ID of the newly created order on condition triggered # noqa: E501 + ID of the newly created order on condition triggered. # noqa: E501 :param trade_id: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 :type: int @@ -271,7 +271,7 @@ def trade_id(self, trade_id): def status(self): """Gets the status of this FuturesPriceTriggeredOrder. # noqa: E501 - Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501 + Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is close-short-order # noqa: E501 :return: The status of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -282,7 +282,7 @@ def status(self): def status(self, status): """Sets the status of this FuturesPriceTriggeredOrder. - Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is invalid, only for close-long-order or close-short-order # noqa: E501 + Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is close-short-order # noqa: E501 :param status: The status of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str @@ -300,7 +300,7 @@ def status(self, status): def finish_as(self): """Gets the finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 - How order is finished # noqa: E501 + How order is finished. # noqa: E501 :return: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -311,7 +311,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this FuturesPriceTriggeredOrder. - How order is finished # noqa: E501 + How order is finished. # noqa: E501 :param finish_as: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str @@ -329,7 +329,7 @@ def finish_as(self, finish_as): def reason(self): """Gets the reason of this FuturesPriceTriggeredOrder. # noqa: E501 - Additional remarks on how the order was finished # noqa: E501 + Additional remarks on how the order was finished. # noqa: E501 :return: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -340,7 +340,7 @@ def reason(self): def reason(self, reason): """Sets the reason of this FuturesPriceTriggeredOrder. - Additional remarks on how the order was finished # noqa: E501 + Additional remarks on how the order was finished. # noqa: E501 :param reason: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str @@ -352,7 +352,7 @@ def reason(self, reason): def order_type(self): """Gets the order_type of this FuturesPriceTriggeredOrder. # noqa: E501 - Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 + Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 :return: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -363,7 +363,7 @@ def order_type(self): def order_type(self, order_type): """Sets the order_type of this FuturesPriceTriggeredOrder. - Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: Entrusted order stop profit and stop loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 + Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 :param order_type: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str diff --git a/gate_api/models/futures_risk_limit_tier.py b/gate_api/models/futures_risk_limit_tier.py index 08e3e6a..3946e2e 100644 --- a/gate_api/models/futures_risk_limit_tier.py +++ b/gate_api/models/futures_risk_limit_tier.py @@ -82,7 +82,7 @@ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_ra def tier(self): """Gets the tier of this FuturesRiskLimitTier. # noqa: E501 - Tier # noqa: E501 + Tier. # noqa: E501 :return: The tier of this FuturesRiskLimitTier. # noqa: E501 :rtype: int @@ -93,7 +93,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this FuturesRiskLimitTier. - Tier # noqa: E501 + Tier. # noqa: E501 :param tier: The tier of this FuturesRiskLimitTier. # noqa: E501 :type: int @@ -105,7 +105,7 @@ def tier(self, tier): def risk_limit(self): """Gets the risk_limit of this FuturesRiskLimitTier. # noqa: E501 - Position risk limit # noqa: E501 + Position risk limit. # noqa: E501 :return: The risk_limit of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def risk_limit(self): def risk_limit(self, risk_limit): """Sets the risk_limit of this FuturesRiskLimitTier. - Position risk limit # noqa: E501 + Position risk limit. # noqa: E501 :param risk_limit: The risk_limit of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def risk_limit(self, risk_limit): def initial_rate(self): """Gets the initial_rate of this FuturesRiskLimitTier. # noqa: E501 - Initial margin rate # noqa: E501 + Initial margin rate. # noqa: E501 :return: The initial_rate of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def initial_rate(self): def initial_rate(self, initial_rate): """Sets the initial_rate of this FuturesRiskLimitTier. - Initial margin rate # noqa: E501 + Initial margin rate. # noqa: E501 :param initial_rate: The initial_rate of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def initial_rate(self, initial_rate): def maintenance_rate(self): """Gets the maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 - Maintenance margin rate # noqa: E501 + Maintenance margin rate. # noqa: E501 :return: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this FuturesRiskLimitTier. - Maintenance margin rate # noqa: E501 + Maintenance margin rate. # noqa: E501 :param maintenance_rate: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def maintenance_rate(self, maintenance_rate): def leverage_max(self): """Gets the leverage_max of this FuturesRiskLimitTier. # noqa: E501 - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :return: The leverage_max of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this FuturesRiskLimitTier. - Maximum leverage # noqa: E501 + Maximum leverage. # noqa: E501 :param leverage_max: The leverage_max of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def leverage_max(self, leverage_max): def deduction(self): """Gets the deduction of this FuturesRiskLimitTier. # noqa: E501 - Maintenance margin quick calculation deduction # noqa: E501 + Maintenance margin quick calculation deduction. # noqa: E501 :return: The deduction of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def deduction(self): def deduction(self, deduction): """Sets the deduction of this FuturesRiskLimitTier. - Maintenance margin quick calculation deduction # noqa: E501 + Maintenance margin quick calculation deduction. # noqa: E501 :param deduction: The deduction of this FuturesRiskLimitTier. # noqa: E501 :type: str diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py index 14557b9..6ecbc82 100644 --- a/gate_api/models/futures_ticker.py +++ b/gate_api/models/futures_ticker.py @@ -157,7 +157,7 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= def contract(self): """Gets the contract of this FuturesTicker. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this FuturesTicker. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesTicker. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this FuturesTicker. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def contract(self, contract): def last(self): """Gets the last of this FuturesTicker. # noqa: E501 - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :return: The last of this FuturesTicker. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def last(self): def last(self, last): """Sets the last of this FuturesTicker. - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :param last: The last of this FuturesTicker. # noqa: E501 :type: str @@ -226,7 +226,7 @@ def change_percentage(self, change_percentage): def total_size(self): """Gets the total_size of this FuturesTicker. # noqa: E501 - Contract total size # noqa: E501 + Contract total size. # noqa: E501 :return: The total_size of this FuturesTicker. # noqa: E501 :rtype: str @@ -237,7 +237,7 @@ def total_size(self): def total_size(self, total_size): """Sets the total_size of this FuturesTicker. - Contract total size # noqa: E501 + Contract total size. # noqa: E501 :param total_size: The total_size of this FuturesTicker. # noqa: E501 :type: str @@ -249,7 +249,7 @@ def total_size(self, total_size): def low_24h(self): """Gets the low_24h of this FuturesTicker. # noqa: E501 - Lowest trading price in recent 24h # noqa: E501 + Lowest trading price in recent 24h. # noqa: E501 :return: The low_24h of this FuturesTicker. # noqa: E501 :rtype: str @@ -260,7 +260,7 @@ def low_24h(self): def low_24h(self, low_24h): """Sets the low_24h of this FuturesTicker. - Lowest trading price in recent 24h # noqa: E501 + Lowest trading price in recent 24h. # noqa: E501 :param low_24h: The low_24h of this FuturesTicker. # noqa: E501 :type: str @@ -272,7 +272,7 @@ def low_24h(self, low_24h): def high_24h(self): """Gets the high_24h of this FuturesTicker. # noqa: E501 - Highest trading price in recent 24h # noqa: E501 + Highest trading price in recent 24h. # noqa: E501 :return: The high_24h of this FuturesTicker. # noqa: E501 :rtype: str @@ -283,7 +283,7 @@ def high_24h(self): def high_24h(self, high_24h): """Sets the high_24h of this FuturesTicker. - Highest trading price in recent 24h # noqa: E501 + Highest trading price in recent 24h. # noqa: E501 :param high_24h: The high_24h of this FuturesTicker. # noqa: E501 :type: str @@ -295,7 +295,7 @@ def high_24h(self, high_24h): def volume_24h(self): """Gets the volume_24h of this FuturesTicker. # noqa: E501 - Trade size in recent 24h # noqa: E501 + Trade size in recent 24h. # noqa: E501 :return: The volume_24h of this FuturesTicker. # noqa: E501 :rtype: str @@ -306,7 +306,7 @@ def volume_24h(self): def volume_24h(self, volume_24h): """Sets the volume_24h of this FuturesTicker. - Trade size in recent 24h # noqa: E501 + Trade size in recent 24h. # noqa: E501 :param volume_24h: The volume_24h of this FuturesTicker. # noqa: E501 :type: str @@ -364,7 +364,7 @@ def volume_24h_usd(self, volume_24h_usd): def volume_24h_base(self): """Gets the volume_24h_base of this FuturesTicker. # noqa: E501 - Trade volume in recent 24h, in base currency # noqa: E501 + Trade volume in recent 24h, in base currency. # noqa: E501 :return: The volume_24h_base of this FuturesTicker. # noqa: E501 :rtype: str @@ -375,7 +375,7 @@ def volume_24h_base(self): def volume_24h_base(self, volume_24h_base): """Sets the volume_24h_base of this FuturesTicker. - Trade volume in recent 24h, in base currency # noqa: E501 + Trade volume in recent 24h, in base currency. # noqa: E501 :param volume_24h_base: The volume_24h_base of this FuturesTicker. # noqa: E501 :type: str @@ -387,7 +387,7 @@ def volume_24h_base(self, volume_24h_base): def volume_24h_quote(self): """Gets the volume_24h_quote of this FuturesTicker. # noqa: E501 - Trade volume in recent 24h, in quote currency # noqa: E501 + Trade volume in recent 24h, in quote currency. # noqa: E501 :return: The volume_24h_quote of this FuturesTicker. # noqa: E501 :rtype: str @@ -398,7 +398,7 @@ def volume_24h_quote(self): def volume_24h_quote(self, volume_24h_quote): """Sets the volume_24h_quote of this FuturesTicker. - Trade volume in recent 24h, in quote currency # noqa: E501 + Trade volume in recent 24h, in quote currency. # noqa: E501 :param volume_24h_quote: The volume_24h_quote of this FuturesTicker. # noqa: E501 :type: str @@ -410,7 +410,7 @@ def volume_24h_quote(self, volume_24h_quote): def volume_24h_settle(self): """Gets the volume_24h_settle of this FuturesTicker. # noqa: E501 - Trade volume in recent 24h, in settle currency # noqa: E501 + Trade volume in recent 24h, in settle currency. # noqa: E501 :return: The volume_24h_settle of this FuturesTicker. # noqa: E501 :rtype: str @@ -421,7 +421,7 @@ def volume_24h_settle(self): def volume_24h_settle(self, volume_24h_settle): """Sets the volume_24h_settle of this FuturesTicker. - Trade volume in recent 24h, in settle currency # noqa: E501 + Trade volume in recent 24h, in settle currency. # noqa: E501 :param volume_24h_settle: The volume_24h_settle of this FuturesTicker. # noqa: E501 :type: str @@ -433,7 +433,7 @@ def volume_24h_settle(self, volume_24h_settle): def mark_price(self): """Gets the mark_price of this FuturesTicker. # noqa: E501 - Recent mark price # noqa: E501 + Recent mark price. # noqa: E501 :return: The mark_price of this FuturesTicker. # noqa: E501 :rtype: str @@ -444,7 +444,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this FuturesTicker. - Recent mark price # noqa: E501 + Recent mark price. # noqa: E501 :param mark_price: The mark_price of this FuturesTicker. # noqa: E501 :type: str @@ -456,7 +456,7 @@ def mark_price(self, mark_price): def funding_rate(self): """Gets the funding_rate of this FuturesTicker. # noqa: E501 - Funding rate # noqa: E501 + Funding rate. # noqa: E501 :return: The funding_rate of this FuturesTicker. # noqa: E501 :rtype: str @@ -467,7 +467,7 @@ def funding_rate(self): def funding_rate(self, funding_rate): """Sets the funding_rate of this FuturesTicker. - Funding rate # noqa: E501 + Funding rate. # noqa: E501 :param funding_rate: The funding_rate of this FuturesTicker. # noqa: E501 :type: str @@ -479,7 +479,7 @@ def funding_rate(self, funding_rate): def funding_rate_indicative(self): """Gets the funding_rate_indicative of this FuturesTicker. # noqa: E501 - Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 :return: The funding_rate_indicative of this FuturesTicker. # noqa: E501 :rtype: str @@ -490,7 +490,7 @@ def funding_rate_indicative(self): def funding_rate_indicative(self, funding_rate_indicative): """Sets the funding_rate_indicative of this FuturesTicker. - Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 :param funding_rate_indicative: The funding_rate_indicative of this FuturesTicker. # noqa: E501 :type: str @@ -502,7 +502,7 @@ def funding_rate_indicative(self, funding_rate_indicative): def index_price(self): """Gets the index_price of this FuturesTicker. # noqa: E501 - Index price # noqa: E501 + Index price. # noqa: E501 :return: The index_price of this FuturesTicker. # noqa: E501 :rtype: str @@ -513,7 +513,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this FuturesTicker. - Index price # noqa: E501 + Index price. # noqa: E501 :param index_price: The index_price of this FuturesTicker. # noqa: E501 :type: str @@ -548,7 +548,7 @@ def quanto_base_rate(self, quanto_base_rate): def lowest_ask(self): """Gets the lowest_ask of this FuturesTicker. # noqa: E501 - Recent lowest ask # noqa: E501 + Recent lowest ask. # noqa: E501 :return: The lowest_ask of this FuturesTicker. # noqa: E501 :rtype: str @@ -559,7 +559,7 @@ def lowest_ask(self): def lowest_ask(self, lowest_ask): """Sets the lowest_ask of this FuturesTicker. - Recent lowest ask # noqa: E501 + Recent lowest ask. # noqa: E501 :param lowest_ask: The lowest_ask of this FuturesTicker. # noqa: E501 :type: str @@ -571,7 +571,7 @@ def lowest_ask(self, lowest_ask): def lowest_size(self): """Gets the lowest_size of this FuturesTicker. # noqa: E501 - The latest seller's lowest price order quantity # noqa: E501 + The latest seller's lowest price order quantity. # noqa: E501 :return: The lowest_size of this FuturesTicker. # noqa: E501 :rtype: str @@ -582,7 +582,7 @@ def lowest_size(self): def lowest_size(self, lowest_size): """Sets the lowest_size of this FuturesTicker. - The latest seller's lowest price order quantity # noqa: E501 + The latest seller's lowest price order quantity. # noqa: E501 :param lowest_size: The lowest_size of this FuturesTicker. # noqa: E501 :type: str @@ -594,7 +594,7 @@ def lowest_size(self, lowest_size): def highest_bid(self): """Gets the highest_bid of this FuturesTicker. # noqa: E501 - Recent highest bid # noqa: E501 + Recent highest bid. # noqa: E501 :return: The highest_bid of this FuturesTicker. # noqa: E501 :rtype: str @@ -605,7 +605,7 @@ def highest_bid(self): def highest_bid(self, highest_bid): """Sets the highest_bid of this FuturesTicker. - Recent highest bid # noqa: E501 + Recent highest bid. # noqa: E501 :param highest_bid: The highest_bid of this FuturesTicker. # noqa: E501 :type: str @@ -617,7 +617,7 @@ def highest_bid(self, highest_bid): def highest_size(self): """Gets the highest_size of this FuturesTicker. # noqa: E501 - The latest buyer's highest price order volume # noqa: E501 + The latest buyer's highest price order volume. # noqa: E501 :return: The highest_size of this FuturesTicker. # noqa: E501 :rtype: str @@ -628,7 +628,7 @@ def highest_size(self): def highest_size(self, highest_size): """Sets the highest_size of this FuturesTicker. - The latest buyer's highest price order volume # noqa: E501 + The latest buyer's highest price order volume. # noqa: E501 :param highest_size: The highest_size of this FuturesTicker. # noqa: E501 :type: str diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py index 0b0a14f..d4cd164 100644 --- a/gate_api/models/futures_trade.py +++ b/gate_api/models/futures_trade.py @@ -87,7 +87,7 @@ def __init__(self, id=None, create_time=None, create_time_ms=None, contract=None def id(self): """Gets the id of this FuturesTrade. # noqa: E501 - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :return: The id of this FuturesTrade. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesTrade. - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :param id: The id of this FuturesTrade. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this FuturesTrade. # noqa: E501 - Trading time # noqa: E501 + Trading time. # noqa: E501 :return: The create_time of this FuturesTrade. # noqa: E501 :rtype: float @@ -121,7 +121,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FuturesTrade. - Trading time # noqa: E501 + Trading time. # noqa: E501 :param create_time: The create_time of this FuturesTrade. # noqa: E501 :type: float @@ -156,7 +156,7 @@ def create_time_ms(self, create_time_ms): def contract(self): """Gets the contract of this FuturesTrade. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this FuturesTrade. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesTrade. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this FuturesTrade. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def contract(self, contract): def size(self): """Gets the size of this FuturesTrade. # noqa: E501 - Trading size # noqa: E501 + Trading size. # noqa: E501 :return: The size of this FuturesTrade. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesTrade. - Trading size # noqa: E501 + Trading size. # noqa: E501 :param size: The size of this FuturesTrade. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def size(self, size): def price(self): """Gets the price of this FuturesTrade. # noqa: E501 - Trading price (quote currency) # noqa: E501 + Trading price (quote currency). # noqa: E501 :return: The price of this FuturesTrade. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesTrade. - Trading price (quote currency) # noqa: E501 + Trading price (quote currency). # noqa: E501 :param price: The price of this FuturesTrade. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def price(self, price): def is_internal(self): """Gets the is_internal of this FuturesTrade. # noqa: E501 - Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501 + Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. an internal trade, this field will not be returned. # noqa: E501 :return: The is_internal of this FuturesTrade. # noqa: E501 :rtype: bool @@ -236,7 +236,7 @@ def is_internal(self): def is_internal(self, is_internal): """Sets the is_internal of this FuturesTrade. - Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned. # noqa: E501 + Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. an internal trade, this field will not be returned. # noqa: E501 :param is_internal: The is_internal of this FuturesTrade. # noqa: E501 :type: bool diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py index 7399829..fac1cc2 100644 --- a/gate_api/models/index_constituent.py +++ b/gate_api/models/index_constituent.py @@ -62,7 +62,7 @@ def __init__(self, exchange=None, symbols=None, local_vars_configuration=None): def exchange(self): """Gets the exchange of this IndexConstituent. # noqa: E501 - Exchange # noqa: E501 + Exchange. # noqa: E501 :return: The exchange of this IndexConstituent. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def exchange(self): def exchange(self, exchange): """Sets the exchange of this IndexConstituent. - Exchange # noqa: E501 + Exchange. # noqa: E501 :param exchange: The exchange of this IndexConstituent. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def exchange(self, exchange): def symbols(self): """Gets the symbols of this IndexConstituent. # noqa: E501 - Symbol list # noqa: E501 + Symbol list. # noqa: E501 :return: The symbols of this IndexConstituent. # noqa: E501 :rtype: list[str] @@ -96,7 +96,7 @@ def symbols(self): def symbols(self, symbols): """Sets the symbols of this IndexConstituent. - Symbol list # noqa: E501 + Symbol list. # noqa: E501 :param symbols: The symbols of this IndexConstituent. # noqa: E501 :type: list[str] diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py index c15d0fb..d78ad89 100644 --- a/gate_api/models/inline_response2001.py +++ b/gate_api/models/inline_response2001.py @@ -83,7 +83,7 @@ def currency(self, currency): def est_rate(self): """Gets the est_rate of this InlineResponse2001. # noqa: E501 - Unconverted percentage # noqa: E501 + Unconverted percentage. # noqa: E501 :return: The est_rate of this InlineResponse2001. # noqa: E501 :rtype: str @@ -94,7 +94,7 @@ def est_rate(self): def est_rate(self, est_rate): """Sets the est_rate of this InlineResponse2001. - Unconverted percentage # noqa: E501 + Unconverted percentage. # noqa: E501 :param est_rate: The est_rate of this InlineResponse2001. # noqa: E501 :type: str diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py index b0381b8..82b0aac 100644 --- a/gate_api/models/insurance_record.py +++ b/gate_api/models/insurance_record.py @@ -62,7 +62,7 @@ def __init__(self, t=None, b=None, local_vars_configuration=None): # noqa: E501 def t(self): """Gets the t of this InsuranceRecord. # noqa: E501 - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :return: The t of this InsuranceRecord. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def t(self): def t(self, t): """Sets the t of this InsuranceRecord. - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :param t: The t of this InsuranceRecord. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def t(self, t): def b(self): """Gets the b of this InsuranceRecord. # noqa: E501 - Insurance balance # noqa: E501 + Insurance balance. # noqa: E501 :return: The b of this InsuranceRecord. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def b(self): def b(self, b): """Sets the b of this InsuranceRecord. - Insurance balance # noqa: E501 + Insurance balance. # noqa: E501 :param b: The b of this InsuranceRecord. # noqa: E501 :type: str diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py index 404e9cd..ec95174 100644 --- a/gate_api/models/ledger_record.py +++ b/gate_api/models/ledger_record.py @@ -109,7 +109,7 @@ def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, a def id(self): """Gets the id of this LedgerRecord. # noqa: E501 - Record ID # noqa: E501 + Record ID. # noqa: E501 :return: The id of this LedgerRecord. # noqa: E501 :rtype: str @@ -120,7 +120,7 @@ def id(self): def id(self, id): """Sets the id of this LedgerRecord. - Record ID # noqa: E501 + Record ID. # noqa: E501 :param id: The id of this LedgerRecord. # noqa: E501 :type: str @@ -132,7 +132,7 @@ def id(self, id): def txid(self): """Gets the txid of this LedgerRecord. # noqa: E501 - Hash record of the withdrawal # noqa: E501 + Hash record of the withdrawal. # noqa: E501 :return: The txid of this LedgerRecord. # noqa: E501 :rtype: str @@ -143,7 +143,7 @@ def txid(self): def txid(self, txid): """Sets the txid of this LedgerRecord. - Hash record of the withdrawal # noqa: E501 + Hash record of the withdrawal. # noqa: E501 :param txid: The txid of this LedgerRecord. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def withdraw_order_id(self, withdraw_order_id): def timestamp(self): """Gets the timestamp of this LedgerRecord. # noqa: E501 - Operation time # noqa: E501 + Operation time. # noqa: E501 :return: The timestamp of this LedgerRecord. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def timestamp(self): def timestamp(self, timestamp): """Sets the timestamp of this LedgerRecord. - Operation time # noqa: E501 + Operation time. # noqa: E501 :param timestamp: The timestamp of this LedgerRecord. # noqa: E501 :type: str @@ -201,7 +201,7 @@ def timestamp(self, timestamp): def amount(self): """Gets the amount of this LedgerRecord. # noqa: E501 - Currency amount # noqa: E501 + Currency amount. # noqa: E501 :return: The amount of this LedgerRecord. # noqa: E501 :rtype: str @@ -212,7 +212,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this LedgerRecord. - Currency amount # noqa: E501 + Currency amount. # noqa: E501 :param amount: The amount of this LedgerRecord. # noqa: E501 :type: str @@ -226,7 +226,7 @@ def amount(self, amount): def currency(self): """Gets the currency of this LedgerRecord. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this LedgerRecord. # noqa: E501 :rtype: str @@ -237,7 +237,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this LedgerRecord. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this LedgerRecord. # noqa: E501 :type: str @@ -251,7 +251,7 @@ def currency(self, currency): def address(self): """Gets the address of this LedgerRecord. # noqa: E501 - Withdrawal address. Required for withdrawals # noqa: E501 + Withdrawal address. Required for withdrawals. # noqa: E501 :return: The address of this LedgerRecord. # noqa: E501 :rtype: str @@ -262,7 +262,7 @@ def address(self): def address(self, address): """Sets the address of this LedgerRecord. - Withdrawal address. Required for withdrawals # noqa: E501 + Withdrawal address. Required for withdrawals. # noqa: E501 :param address: The address of this LedgerRecord. # noqa: E501 :type: str @@ -274,7 +274,7 @@ def address(self, address): def memo(self): """Gets the memo of this LedgerRecord. # noqa: E501 - Additional remarks with regards to the withdrawal # noqa: E501 + Additional remarks with regards to the withdrawal. # noqa: E501 :return: The memo of this LedgerRecord. # noqa: E501 :rtype: str @@ -285,7 +285,7 @@ def memo(self): def memo(self, memo): """Sets the memo of this LedgerRecord. - Additional remarks with regards to the withdrawal # noqa: E501 + Additional remarks with regards to the withdrawal. # noqa: E501 :param memo: The memo of this LedgerRecord. # noqa: E501 :type: str @@ -366,7 +366,7 @@ def status(self, status): def chain(self): """Gets the chain of this LedgerRecord. # noqa: E501 - Name of the chain used in withdrawals # noqa: E501 + Name of the chain used in withdrawals. # noqa: E501 :return: The chain of this LedgerRecord. # noqa: E501 :rtype: str @@ -377,7 +377,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this LedgerRecord. - Name of the chain used in withdrawals # noqa: E501 + Name of the chain used in withdrawals. # noqa: E501 :param chain: The chain of this LedgerRecord. # noqa: E501 :type: str diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py index c1a67d9..e573c7d 100644 --- a/gate_api/models/liquidate_order.py +++ b/gate_api/models/liquidate_order.py @@ -97,7 +97,7 @@ def text(self, text): def currency_pair(self): """Gets the currency_pair of this LiquidateOrder. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this LiquidateOrder. # noqa: E501 :rtype: str @@ -108,7 +108,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this LiquidateOrder. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this LiquidateOrder. # noqa: E501 :type: str @@ -122,7 +122,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this LiquidateOrder. # noqa: E501 - Trade amount # noqa: E501 + Trade amount. # noqa: E501 :return: The amount of this LiquidateOrder. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this LiquidateOrder. - Trade amount # noqa: E501 + Trade amount. # noqa: E501 :param amount: The amount of this LiquidateOrder. # noqa: E501 :type: str @@ -147,7 +147,7 @@ def amount(self, amount): def price(self): """Gets the price of this LiquidateOrder. # noqa: E501 - Order price # noqa: E501 + Order price. # noqa: E501 :return: The price of this LiquidateOrder. # noqa: E501 :rtype: str @@ -158,7 +158,7 @@ def price(self): def price(self, price): """Sets the price of this LiquidateOrder. - Order price # noqa: E501 + Order price. # noqa: E501 :param price: The price of this LiquidateOrder. # noqa: E501 :type: str diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py index 34b54ee..acd3572 100644 --- a/gate_api/models/margin_account.py +++ b/gate_api/models/margin_account.py @@ -92,7 +92,7 @@ def __init__(self, currency_pair=None, account_type=None, leverage=None, locked= def currency_pair(self): """Gets the currency_pair of this MarginAccount. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this MarginAccount. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginAccount. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this MarginAccount. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def currency_pair(self, currency_pair): def account_type(self): """Gets the account_type of this MarginAccount. # noqa: E501 - Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 + Account type, risk - risk rate account, mmr - maintenance margin market not activated # noqa: E501 :return: The account_type of this MarginAccount. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def account_type(self): def account_type(self, account_type): """Sets the account_type of this MarginAccount. - Account type, risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 + Account type, risk - risk rate account, mmr - maintenance margin market not activated # noqa: E501 :param account_type: The account_type of this MarginAccount. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def account_type(self, account_type): def leverage(self): """Gets the leverage of this MarginAccount. # noqa: E501 - User current market leverage multiple # noqa: E501 + User current market leverage multiple. # noqa: E501 :return: The leverage of this MarginAccount. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this MarginAccount. - User current market leverage multiple # noqa: E501 + User current market leverage multiple. # noqa: E501 :param leverage: The leverage of this MarginAccount. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def leverage(self, leverage): def locked(self): """Gets the locked of this MarginAccount. # noqa: E501 - Whether account is locked # noqa: E501 + Whether account is locked. # noqa: E501 :return: The locked of this MarginAccount. # noqa: E501 :rtype: bool @@ -172,7 +172,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this MarginAccount. - Whether account is locked # noqa: E501 + Whether account is locked. # noqa: E501 :param locked: The locked of this MarginAccount. # noqa: E501 :type: bool @@ -207,7 +207,7 @@ def risk(self, risk): def mmr(self): """Gets the mmr of this MarginAccount. # noqa: E501 - Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) # noqa: E501 + Leveraged Account Current Maintenance Margin Rate (returned when the Account is Account) # noqa: E501 :return: The mmr of this MarginAccount. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def mmr(self): def mmr(self, mmr): """Sets the mmr of this MarginAccount. - Leveraged Account Current Maintenance Margin Rate (returned when the Account is a Maintenance Margin Rate Account) # noqa: E501 + Leveraged Account Current Maintenance Margin Rate (returned when the Account is Account) # noqa: E501 :param mmr: The mmr of this MarginAccount. # noqa: E501 :type: str diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py index 2683b19..7d4839e 100644 --- a/gate_api/models/margin_account_book.py +++ b/gate_api/models/margin_account_book.py @@ -92,7 +92,7 @@ def __init__(self, id=None, time=None, time_ms=None, currency=None, currency_pai def id(self): """Gets the id of this MarginAccountBook. # noqa: E501 - Balance change record ID # noqa: E501 + Balance change record ID. # noqa: E501 :return: The id of this MarginAccountBook. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this MarginAccountBook. - Balance change record ID # noqa: E501 + Balance change record ID. # noqa: E501 :param id: The id of this MarginAccountBook. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def id(self, id): def time(self): """Gets the time of this MarginAccountBook. # noqa: E501 - Balance changed timestamp # noqa: E501 + Balance changed timestamp. # noqa: E501 :return: The time of this MarginAccountBook. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def time(self): def time(self, time): """Sets the time of this MarginAccountBook. - Balance changed timestamp # noqa: E501 + Balance changed timestamp. # noqa: E501 :param time: The time of this MarginAccountBook. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def time(self, time): def time_ms(self): """Gets the time_ms of this MarginAccountBook. # noqa: E501 - The timestamp of the change (in milliseconds) # noqa: E501 + The timestamp of the change (in milliseconds). # noqa: E501 :return: The time_ms of this MarginAccountBook. # noqa: E501 :rtype: int @@ -149,7 +149,7 @@ def time_ms(self): def time_ms(self, time_ms): """Sets the time_ms of this MarginAccountBook. - The timestamp of the change (in milliseconds) # noqa: E501 + The timestamp of the change (in milliseconds). # noqa: E501 :param time_ms: The time_ms of this MarginAccountBook. # noqa: E501 :type: int @@ -161,7 +161,7 @@ def time_ms(self, time_ms): def currency(self): """Gets the currency of this MarginAccountBook. # noqa: E501 - Currency changed # noqa: E501 + Currency changed. # noqa: E501 :return: The currency of this MarginAccountBook. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MarginAccountBook. - Currency changed # noqa: E501 + Currency changed. # noqa: E501 :param currency: The currency of this MarginAccountBook. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this MarginAccountBook. # noqa: E501 - Account currency pair # noqa: E501 + Account currency pair. # noqa: E501 :return: The currency_pair of this MarginAccountBook. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginAccountBook. - Account currency pair # noqa: E501 + Account currency pair. # noqa: E501 :param currency_pair: The currency_pair of this MarginAccountBook. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def currency_pair(self, currency_pair): def change(self): """Gets the change of this MarginAccountBook. # noqa: E501 - Amount changed. Positive value means transferring in, while negative out # noqa: E501 + Amount changed. Positive value means transferring in, while negative out. # noqa: E501 :return: The change of this MarginAccountBook. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def change(self): def change(self, change): """Sets the change of this MarginAccountBook. - Amount changed. Positive value means transferring in, while negative out # noqa: E501 + Amount changed. Positive value means transferring in, while negative out. # noqa: E501 :param change: The change of this MarginAccountBook. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def change(self, change): def balance(self): """Gets the balance of this MarginAccountBook. # noqa: E501 - Balance after change # noqa: E501 + Balance after change. # noqa: E501 :return: The balance of this MarginAccountBook. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this MarginAccountBook. - Balance after change # noqa: E501 + Balance after change. # noqa: E501 :param balance: The balance of this MarginAccountBook. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def balance(self, balance): def type(self): """Gets the type of this MarginAccountBook. # noqa: E501 - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 :return: The type of this MarginAccountBook. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def type(self): def type(self, type): """Sets the type of this MarginAccountBook. - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 :param type: The type of this MarginAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py index ce14474..cc82db8 100644 --- a/gate_api/models/margin_account_currency.py +++ b/gate_api/models/margin_account_currency.py @@ -77,7 +77,7 @@ def __init__(self, currency=None, available=None, locked=None, borrowed=None, in def currency(self): """Gets the currency of this MarginAccountCurrency. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MarginAccountCurrency. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this MarginAccountCurrency. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def available(self, available): def locked(self): """Gets the locked of this MarginAccountCurrency. # noqa: E501 - Locked amount, used in margin trading # noqa: E501 + Locked amount, used in margin trading. # noqa: E501 :return: The locked of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this MarginAccountCurrency. - Locked amount, used in margin trading # noqa: E501 + Locked amount, used in margin trading. # noqa: E501 :param locked: The locked of this MarginAccountCurrency. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def locked(self, locked): def borrowed(self): """Gets the borrowed of this MarginAccountCurrency. # noqa: E501 - Borrowed amount # noqa: E501 + Borrowed amount. # noqa: E501 :return: The borrowed of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this MarginAccountCurrency. - Borrowed amount # noqa: E501 + Borrowed amount. # noqa: E501 :param borrowed: The borrowed of this MarginAccountCurrency. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def borrowed(self, borrowed): def interest(self): """Gets the interest of this MarginAccountCurrency. # noqa: E501 - Unpaid interests # noqa: E501 + Unpaid interests. # noqa: E501 :return: The interest of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this MarginAccountCurrency. - Unpaid interests # noqa: E501 + Unpaid interests. # noqa: E501 :param interest: The interest of this MarginAccountCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py index 456f305..f0032f5 100644 --- a/gate_api/models/margin_leverage_tier.py +++ b/gate_api/models/margin_leverage_tier.py @@ -67,7 +67,7 @@ def __init__(self, upper_limit=None, mmr=None, leverage=None, local_vars_configu def upper_limit(self): """Gets the upper_limit of this MarginLeverageTier. # noqa: E501 - Maximum loan limit # noqa: E501 + Maximum loan limit. # noqa: E501 :return: The upper_limit of this MarginLeverageTier. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def upper_limit(self): def upper_limit(self, upper_limit): """Sets the upper_limit of this MarginLeverageTier. - Maximum loan limit # noqa: E501 + Maximum loan limit. # noqa: E501 :param upper_limit: The upper_limit of this MarginLeverageTier. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def upper_limit(self, upper_limit): def mmr(self): """Gets the mmr of this MarginLeverageTier. # noqa: E501 - Maintenance margin rate # noqa: E501 + Maintenance margin rate. # noqa: E501 :return: The mmr of this MarginLeverageTier. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def mmr(self): def mmr(self, mmr): """Sets the mmr of this MarginLeverageTier. - Maintenance margin rate # noqa: E501 + Maintenance margin rate. # noqa: E501 :param mmr: The mmr of this MarginLeverageTier. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def mmr(self, mmr): def leverage(self): """Gets the leverage of this MarginLeverageTier. # noqa: E501 - Maximum leverage multiple # noqa: E501 + Maximum leverage multiple. # noqa: E501 :return: The leverage of this MarginLeverageTier. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this MarginLeverageTier. - Maximum leverage multiple # noqa: E501 + Maximum leverage multiple. # noqa: E501 :param leverage: The leverage of this MarginLeverageTier. # noqa: E501 :type: str diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py index 04c05dc..2b6197d 100644 --- a/gate_api/models/margin_market_leverage.py +++ b/gate_api/models/margin_market_leverage.py @@ -61,7 +61,7 @@ def __init__(self, currency_pair=None, leverage=None, local_vars_configuration=N def currency_pair(self): """Gets the currency_pair of this MarginMarketLeverage. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this MarginMarketLeverage. # noqa: E501 :rtype: str @@ -72,7 +72,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginMarketLeverage. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this MarginMarketLeverage. # noqa: E501 :type: str @@ -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 + Position leverage. # 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 + Position leverage. # 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 8d82b53..b2b52d5 100644 --- a/gate_api/models/margin_tiers.py +++ b/gate_api/models/margin_tiers.py @@ -77,7 +77,7 @@ def __init__(self, tier=None, margin_rate=None, lower_limit=None, upper_limit=No def tier(self): """Gets the tier of this MarginTiers. # noqa: E501 - Tier # noqa: E501 + Tier. # noqa: E501 :return: The tier of this MarginTiers. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this MarginTiers. - Tier # noqa: E501 + Tier. # noqa: E501 :param tier: The tier of this MarginTiers. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def tier(self, tier): def margin_rate(self): """Gets the margin_rate of this MarginTiers. # noqa: E501 - Discount # noqa: E501 + Discount. # noqa: E501 :return: The margin_rate of this MarginTiers. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def margin_rate(self): def margin_rate(self, margin_rate): """Sets the margin_rate of this MarginTiers. - Discount # noqa: E501 + Discount. # noqa: E501 :param margin_rate: The margin_rate of this MarginTiers. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def margin_rate(self, margin_rate): def lower_limit(self): """Gets the lower_limit of this MarginTiers. # noqa: E501 - Lower limit # noqa: E501 + Lower limit. # noqa: E501 :return: The lower_limit of this MarginTiers. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def lower_limit(self): def lower_limit(self, lower_limit): """Sets the lower_limit of this MarginTiers. - Lower limit # noqa: E501 + Lower limit. # noqa: E501 :param lower_limit: The lower_limit of this MarginTiers. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def lower_limit(self, lower_limit): def upper_limit(self): """Gets the upper_limit of this MarginTiers. # noqa: E501 - Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 + Upper limit, \"\" indicates greater than (the last tier). # noqa: E501 :return: The upper_limit of this MarginTiers. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def upper_limit(self): def upper_limit(self, upper_limit): """Sets the upper_limit of this MarginTiers. - Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 + Upper limit, \"\" indicates greater than (the last tier). # noqa: E501 :param upper_limit: The upper_limit of this MarginTiers. # noqa: E501 :type: str @@ -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 + Position leverage. # 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 + Position leverage. # noqa: E501 :param leverage: The leverage of this MarginTiers. # noqa: E501 :type: str diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py index 62a5394..cf3f320 100644 --- a/gate_api/models/margin_transferable.py +++ b/gate_api/models/margin_transferable.py @@ -67,7 +67,7 @@ def __init__(self, currency=None, currency_pair=None, amount=None, local_vars_co def currency(self): """Gets the currency of this MarginTransferable. # noqa: E501 - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :return: The currency of this MarginTransferable. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MarginTransferable. - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :param currency: The currency of this MarginTransferable. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this MarginTransferable. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this MarginTransferable. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginTransferable. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this MarginTransferable. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this MarginTransferable. # noqa: E501 - Max transferable amount # noqa: E501 + Max transferable amount. # noqa: E501 :return: The amount of this MarginTransferable. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this MarginTransferable. - Max transferable amount # noqa: E501 + Max transferable amount. # noqa: E501 :param amount: The amount of this MarginTransferable. # noqa: E501 :type: str diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py index 96d847f..c72038b 100644 --- a/gate_api/models/max_uni_borrowable.py +++ b/gate_api/models/max_uni_borrowable.py @@ -65,7 +65,7 @@ def __init__(self, currency=None, currency_pair=None, borrowable=None, local_var def currency(self): """Gets the currency of this MaxUniBorrowable. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this MaxUniBorrowable. # noqa: E501 :rtype: str @@ -76,7 +76,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MaxUniBorrowable. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this MaxUniBorrowable. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this MaxUniBorrowable. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this MaxUniBorrowable. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MaxUniBorrowable. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this MaxUniBorrowable. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def currency_pair(self, currency_pair): def borrowable(self): """Gets the borrowable of this MaxUniBorrowable. # noqa: E501 - Maximum borrowable # noqa: E501 + Maximum borrowable. # noqa: E501 :return: The borrowable of this MaxUniBorrowable. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def borrowable(self): def borrowable(self, borrowable): """Sets the borrowable of this MaxUniBorrowable. - Maximum borrowable # noqa: E501 + Maximum borrowable. # noqa: E501 :param borrowable: The borrowable of this MaxUniBorrowable. # noqa: E501 :type: str diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py index 11a134f..a9e9674 100644 --- a/gate_api/models/mock_futures_order.py +++ b/gate_api/models/mock_futures_order.py @@ -114,7 +114,7 @@ def size(self, size): def left(self): """Gets the left of this MockFuturesOrder. # noqa: E501 - Unfilled contract quantity, involved in actual calculation # noqa: E501 + Unfilled contract quantity, involved in actual calculation. # noqa: E501 :return: The left of this MockFuturesOrder. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def left(self): def left(self, left): """Sets the left of this MockFuturesOrder. - Unfilled contract quantity, involved in actual calculation # noqa: E501 + Unfilled contract quantity, involved in actual calculation. # noqa: E501 :param left: The left of this MockFuturesOrder. # noqa: E501 :type: str diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py index dcbc8ce..d323423 100644 --- a/gate_api/models/mock_margin_result.py +++ b/gate_api/models/mock_margin_result.py @@ -87,7 +87,7 @@ def __init__(self, type=None, profit_loss_ranges=None, max_loss=None, mr1=None, def type(self): """Gets the type of this MockMarginResult. # noqa: E501 - Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 + Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` position # noqa: E501 :return: The type of this MockMarginResult. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def type(self): def type(self, type): """Sets the type of this MockMarginResult. - Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 + Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` position # noqa: E501 :param type: The type of this MockMarginResult. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def type(self, type): def profit_loss_ranges(self): """Gets the profit_loss_ranges of this MockMarginResult. # noqa: E501 - The results of 33 pressure scenarios for MR1 # noqa: E501 + The results of 3 pressure scenarios for MR1. # noqa: E501 :return: The profit_loss_ranges of this MockMarginResult. # noqa: E501 :rtype: list[ProfitLossRange] @@ -121,7 +121,7 @@ def profit_loss_ranges(self): def profit_loss_ranges(self, profit_loss_ranges): """Sets the profit_loss_ranges of this MockMarginResult. - The results of 33 pressure scenarios for MR1 # noqa: E501 + The results of 3 pressure scenarios for MR1. # noqa: E501 :param profit_loss_ranges: The profit_loss_ranges of this MockMarginResult. # noqa: E501 :type: list[ProfitLossRange] @@ -156,7 +156,7 @@ def max_loss(self, max_loss): def mr1(self): """Gets the mr1 of this MockMarginResult. # noqa: E501 - Stress testing # noqa: E501 + Stress testing. # noqa: E501 :return: The mr1 of this MockMarginResult. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def mr1(self): def mr1(self, mr1): """Sets the mr1 of this MockMarginResult. - Stress testing # noqa: E501 + Stress testing. # noqa: E501 :param mr1: The mr1 of this MockMarginResult. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def mr1(self, mr1): def mr2(self): """Gets the mr2 of this MockMarginResult. # noqa: E501 - Basis spread risk # noqa: E501 + Basis spread risk. # noqa: E501 :return: The mr2 of this MockMarginResult. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def mr2(self): def mr2(self, mr2): """Sets the mr2 of this MockMarginResult. - Basis spread risk # noqa: E501 + Basis spread risk. # noqa: E501 :param mr2: The mr2 of this MockMarginResult. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def mr2(self, mr2): def mr3(self): """Gets the mr3 of this MockMarginResult. # noqa: E501 - Volatility spread risk # noqa: E501 + Volatility spread risk. # noqa: E501 :return: The mr3 of this MockMarginResult. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def mr3(self): def mr3(self, mr3): """Sets the mr3 of this MockMarginResult. - Volatility spread risk # noqa: E501 + Volatility spread risk. # noqa: E501 :param mr3: The mr3 of this MockMarginResult. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def mr3(self, mr3): def mr4(self): """Gets the mr4 of this MockMarginResult. # noqa: E501 - Option short risk # noqa: E501 + Option short risk. # noqa: E501 :return: The mr4 of this MockMarginResult. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def mr4(self): def mr4(self, mr4): """Sets the mr4 of this MockMarginResult. - Option short risk # noqa: E501 + Option short risk. # noqa: E501 :param mr4: The mr4 of this MockMarginResult. # noqa: E501 :type: str diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py index c9fd9de..ea77569 100644 --- a/gate_api/models/mock_options_order.py +++ b/gate_api/models/mock_options_order.py @@ -89,7 +89,7 @@ def options_name(self, options_name): def size(self): """Gets the size of this MockOptionsOrder. # noqa: E501 - Initial order quantity, not involved in actual calculation # noqa: E501 + Initial order quantity, not involved in actual calculation. # noqa: E501 :return: The size of this MockOptionsOrder. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def size(self): def size(self, size): """Sets the size of this MockOptionsOrder. - Initial order quantity, not involved in actual calculation # noqa: E501 + Initial order quantity, not involved in actual calculation. # noqa: E501 :param size: The size of this MockOptionsOrder. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def size(self, size): def left(self): """Gets the left of this MockOptionsOrder. # noqa: E501 - Unfilled contract quantity, involved in actual calculation # noqa: E501 + Unfilled contract quantity, involved in actual calculation. # noqa: E501 :return: The left of this MockOptionsOrder. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def left(self): def left(self, left): """Sets the left of this MockOptionsOrder. - Unfilled contract quantity, involved in actual calculation # noqa: E501 + Unfilled contract quantity, involved in actual calculation. # noqa: E501 :param left: The left of this MockOptionsOrder. # noqa: E501 :type: str diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py index 889f296..cf5b251 100644 --- a/gate_api/models/mock_risk_unit.py +++ b/gate_api/models/mock_risk_unit.py @@ -97,7 +97,7 @@ def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_ def symbol(self): """Gets the symbol of this MockRiskUnit. # noqa: E501 - Risk unit name # noqa: E501 + Risk unit name. # noqa: E501 :return: The symbol of this MockRiskUnit. # noqa: E501 :rtype: str @@ -108,7 +108,7 @@ def symbol(self): def symbol(self, symbol): """Sets the symbol of this MockRiskUnit. - Risk unit name # noqa: E501 + Risk unit name. # noqa: E501 :param symbol: The symbol of this MockRiskUnit. # noqa: E501 :type: str @@ -120,7 +120,7 @@ def symbol(self, symbol): def spot_in_use(self): """Gets the spot_in_use of this MockRiskUnit. # noqa: E501 - Spot usage # noqa: E501 + Spot usage. # noqa: E501 :return: The spot_in_use of this MockRiskUnit. # noqa: E501 :rtype: str @@ -131,7 +131,7 @@ def spot_in_use(self): def spot_in_use(self, spot_in_use): """Sets the spot_in_use of this MockRiskUnit. - Spot usage # noqa: E501 + Spot usage. # noqa: E501 :param spot_in_use: The spot_in_use of this MockRiskUnit. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def spot_in_use(self, spot_in_use): def maintain_margin(self): """Gets the maintain_margin of this MockRiskUnit. # noqa: E501 - Maintenance margin # noqa: E501 + Maintenance margin. # noqa: E501 :return: The maintain_margin of this MockRiskUnit. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def maintain_margin(self): def maintain_margin(self, maintain_margin): """Sets the maintain_margin of this MockRiskUnit. - Maintenance margin # noqa: E501 + Maintenance margin. # noqa: E501 :param maintain_margin: The maintain_margin of this MockRiskUnit. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def maintain_margin(self, maintain_margin): def initial_margin(self): """Gets the initial_margin of this MockRiskUnit. # noqa: E501 - Initial margin # noqa: E501 + Initial margin. # noqa: E501 :return: The initial_margin of this MockRiskUnit. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def initial_margin(self): def initial_margin(self, initial_margin): """Sets the initial_margin of this MockRiskUnit. - Initial margin # noqa: E501 + Initial margin. # noqa: E501 :param initial_margin: The initial_margin of this MockRiskUnit. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def initial_margin(self, initial_margin): def margin_result(self): """Gets the margin_result of this MockRiskUnit. # noqa: E501 - Margin result # noqa: E501 + Margin result. # noqa: E501 :return: The margin_result of this MockRiskUnit. # noqa: E501 :rtype: list[MockMarginResult] @@ -200,7 +200,7 @@ def margin_result(self): def margin_result(self, margin_result): """Sets the margin_result of this MockRiskUnit. - Margin result # noqa: E501 + Margin result. # noqa: E501 :param margin_result: The margin_result of this MockRiskUnit. # noqa: E501 :type: list[MockMarginResult] @@ -212,7 +212,7 @@ def margin_result(self, margin_result): def delta(self): """Gets the delta of this MockRiskUnit. # noqa: E501 - Total Delta of risk unit # noqa: E501 + Total Delta of risk unit. # noqa: E501 :return: The delta of this MockRiskUnit. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this MockRiskUnit. - Total Delta of risk unit # noqa: E501 + Total Delta of risk unit. # noqa: E501 :param delta: The delta of this MockRiskUnit. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this MockRiskUnit. # noqa: E501 - Total Gamma of risk unit # noqa: E501 + Total Gamma of risk unit. # noqa: E501 :return: The gamma of this MockRiskUnit. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this MockRiskUnit. - Total Gamma of risk unit # noqa: E501 + Total Gamma of risk unit. # noqa: E501 :param gamma: The gamma of this MockRiskUnit. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def gamma(self, gamma): def theta(self): """Gets the theta of this MockRiskUnit. # noqa: E501 - Total Theta of risk unit # noqa: E501 + Total Theta of risk unit. # noqa: E501 :return: The theta of this MockRiskUnit. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this MockRiskUnit. - Total Theta of risk unit # noqa: E501 + Total Theta of risk unit. # noqa: E501 :param theta: The theta of this MockRiskUnit. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def theta(self, theta): def vega(self): """Gets the vega of this MockRiskUnit. # noqa: E501 - Total Vega of risk unit # noqa: E501 + Total Vega of risk unit. # noqa: E501 :return: The vega of this MockRiskUnit. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this MockRiskUnit. - Total Vega of risk unit # noqa: E501 + Total Vega of risk unit. # noqa: E501 :param vega: The vega of this MockRiskUnit. # noqa: E501 :type: str diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py index 4f0289a..3631ab7 100644 --- a/gate_api/models/mock_spot_balance.py +++ b/gate_api/models/mock_spot_balance.py @@ -60,7 +60,7 @@ def __init__(self, currency=None, equity=None, local_vars_configuration=None): def currency(self): """Gets the currency of this MockSpotBalance. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this MockSpotBalance. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MockSpotBalance. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this MockSpotBalance. # noqa: E501 :type: str diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py index 16734cf..a6fd363 100644 --- a/gate_api/models/mock_spot_order.py +++ b/gate_api/models/mock_spot_order.py @@ -73,7 +73,7 @@ def __init__(self, currency_pairs=None, order_price=None, count=None, left=None, def currency_pairs(self): """Gets the currency_pairs of this MockSpotOrder. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pairs of this MockSpotOrder. # noqa: E501 :rtype: str @@ -84,7 +84,7 @@ def currency_pairs(self): def currency_pairs(self, currency_pairs): """Sets the currency_pairs of this MockSpotOrder. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pairs: The currency_pairs of this MockSpotOrder. # noqa: E501 :type: str @@ -98,7 +98,7 @@ def currency_pairs(self, currency_pairs): def order_price(self): """Gets the order_price of this MockSpotOrder. # noqa: E501 - Price # noqa: E501 + Price. # noqa: E501 :return: The order_price of this MockSpotOrder. # noqa: E501 :rtype: str @@ -109,7 +109,7 @@ def order_price(self): def order_price(self, order_price): """Sets the order_price of this MockSpotOrder. - Price # noqa: E501 + Price. # noqa: E501 :param order_price: The order_price of this MockSpotOrder. # noqa: E501 :type: str diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py index d9766a6..f96d2fa 100644 --- a/gate_api/models/multi_chain_address_item.py +++ b/gate_api/models/multi_chain_address_item.py @@ -77,7 +77,7 @@ def __init__(self, chain=None, address=None, payment_id=None, payment_name=None, def chain(self): """Gets the chain of this MultiChainAddressItem. # noqa: E501 - Name of the chain # noqa: E501 + Name of the chain. # noqa: E501 :return: The chain of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this MultiChainAddressItem. - Name of the chain # noqa: E501 + Name of the chain. # noqa: E501 :param chain: The chain of this MultiChainAddressItem. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def chain(self, chain): def address(self): """Gets the address of this MultiChainAddressItem. # noqa: E501 - Deposit address # noqa: E501 + Deposit address. # noqa: E501 :return: The address of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def address(self): def address(self, address): """Sets the address of this MultiChainAddressItem. - Deposit address # noqa: E501 + Deposit address. # noqa: E501 :param address: The address of this MultiChainAddressItem. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def address(self, address): def payment_id(self): """Gets the payment_id of this MultiChainAddressItem. # noqa: E501 - Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 + Notes that some currencies required(e.g., Tag, Memo) when depositing. # noqa: E501 :return: The payment_id of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def payment_id(self): def payment_id(self, payment_id): """Sets the payment_id of this MultiChainAddressItem. - Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 + Notes that some currencies required(e.g., Tag, Memo) when depositing. # noqa: E501 :param payment_id: The payment_id of this MultiChainAddressItem. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def payment_id(self, payment_id): def payment_name(self): """Gets the payment_name of this MultiChainAddressItem. # noqa: E501 - Note type, `Tag` or `Memo` # noqa: E501 + Note type, `Tag` or `Memo`. # noqa: E501 :return: The payment_name of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def payment_name(self): def payment_name(self, payment_name): """Sets the payment_name of this MultiChainAddressItem. - Note type, `Tag` or `Memo` # noqa: E501 + Note type, `Tag` or `Memo`. # noqa: E501 :param payment_name: The payment_name of this MultiChainAddressItem. # noqa: E501 :type: str diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py index 2c1e4b1..e427bc1 100644 --- a/gate_api/models/multi_collateral_currency.py +++ b/gate_api/models/multi_collateral_currency.py @@ -62,7 +62,7 @@ def __init__(self, loan_currencies=None, collateral_currencies=None, local_vars_ def loan_currencies(self): """Gets the loan_currencies of this MultiCollateralCurrency. # noqa: E501 - List of supported borrowing currencies # noqa: E501 + List of supported borrowing currencies. # noqa: E501 :return: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 :rtype: list[MultiLoanItem] @@ -73,7 +73,7 @@ def loan_currencies(self): def loan_currencies(self, loan_currencies): """Sets the loan_currencies of this MultiCollateralCurrency. - List of supported borrowing currencies # noqa: E501 + List of supported borrowing currencies. # noqa: E501 :param loan_currencies: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 :type: list[MultiLoanItem] @@ -85,7 +85,7 @@ def loan_currencies(self, loan_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiCollateralCurrency. # noqa: E501 - List of supported collateral currencies # noqa: E501 + List of supported collateral currencies. # noqa: E501 :return: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 :rtype: list[MultiCollateralItem] @@ -96,7 +96,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiCollateralCurrency. - List of supported collateral currencies # noqa: E501 + List of supported collateral currencies. # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 :type: list[MultiCollateralItem] diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py index e3fc386..6061d1a 100644 --- a/gate_api/models/multi_collateral_item.py +++ b/gate_api/models/multi_collateral_item.py @@ -67,7 +67,7 @@ def __init__(self, currency=None, index_price=None, discount=None, local_vars_co def currency(self): """Gets the currency of this MultiCollateralItem. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this MultiCollateralItem. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiCollateralItem. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this MultiCollateralItem. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this MultiCollateralItem. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this MultiCollateralItem. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this MultiCollateralItem. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this MultiCollateralItem. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def index_price(self, index_price): def discount(self): """Gets the discount of this MultiCollateralItem. # noqa: E501 - Discount # noqa: E501 + Discount. # noqa: E501 :return: The discount of this MultiCollateralItem. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def discount(self): def discount(self, discount): """Sets the discount of this MultiCollateralItem. - Discount # noqa: E501 + Discount. # noqa: E501 :param discount: The discount of this MultiCollateralItem. # noqa: E501 :type: str diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py index 25ba1fe..7102914 100644 --- a/gate_api/models/multi_collateral_order.py +++ b/gate_api/models/multi_collateral_order.py @@ -122,7 +122,7 @@ def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=N def order_id(self): """Gets the order_id of this MultiCollateralOrder. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiCollateralOrder. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this MultiCollateralOrder. # noqa: E501 :type: str @@ -145,7 +145,7 @@ def order_id(self, order_id): def order_type(self): """Gets the order_type of this MultiCollateralOrder. # noqa: E501 - current - current, fixed - fixed # noqa: E501 + current - current, fixed - fixed. # noqa: E501 :return: The order_type of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -156,7 +156,7 @@ def order_type(self): def order_type(self, order_type): """Sets the order_type of this MultiCollateralOrder. - current - current, fixed - fixed # noqa: E501 + current - current, fixed - fixed. # noqa: E501 :param order_type: The order_type of this MultiCollateralOrder. # noqa: E501 :type: str @@ -191,7 +191,7 @@ def fixed_type(self, fixed_type): def fixed_rate(self): """Gets the fixed_rate of this MultiCollateralOrder. # noqa: E501 - Fixed interest rate # noqa: E501 + Fixed interest rate. # noqa: E501 :return: The fixed_rate of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -202,7 +202,7 @@ def fixed_rate(self): def fixed_rate(self, fixed_rate): """Sets the fixed_rate of this MultiCollateralOrder. - Fixed interest rate # noqa: E501 + Fixed interest rate. # noqa: E501 :param fixed_rate: The fixed_rate of this MultiCollateralOrder. # noqa: E501 :type: str @@ -237,7 +237,7 @@ def expire_time(self, expire_time): def auto_renew(self): """Gets the auto_renew of this MultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic renewal # noqa: E501 + Fixed interest rate, automatic renewal. # noqa: E501 :return: The auto_renew of this MultiCollateralOrder. # noqa: E501 :rtype: bool @@ -248,7 +248,7 @@ def auto_renew(self): def auto_renew(self, auto_renew): """Sets the auto_renew of this MultiCollateralOrder. - Fixed interest rate, automatic renewal # noqa: E501 + Fixed interest rate, automatic renewal. # noqa: E501 :param auto_renew: The auto_renew of this MultiCollateralOrder. # noqa: E501 :type: bool @@ -260,7 +260,7 @@ def auto_renew(self, auto_renew): def auto_repay(self): """Gets the auto_repay of this MultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic repayment # noqa: E501 + Fixed interest rate, automatic repayment. # noqa: E501 :return: The auto_repay of this MultiCollateralOrder. # noqa: E501 :rtype: bool @@ -271,7 +271,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this MultiCollateralOrder. - Fixed interest rate, automatic repayment # noqa: E501 + Fixed interest rate, automatic repayment. # noqa: E501 :param auto_repay: The auto_repay of this MultiCollateralOrder. # noqa: E501 :type: bool @@ -283,7 +283,7 @@ def auto_repay(self, auto_repay): def current_ltv(self): """Gets the current_ltv of this MultiCollateralOrder. # noqa: E501 - The current collateralization rate # noqa: E501 + The current collateralization rate. # noqa: E501 :return: The current_ltv of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -294,7 +294,7 @@ def current_ltv(self): def current_ltv(self, current_ltv): """Sets the current_ltv of this MultiCollateralOrder. - The current collateralization rate # noqa: E501 + The current collateralization rate. # noqa: E501 :param current_ltv: The current_ltv of this MultiCollateralOrder. # noqa: E501 :type: str @@ -329,7 +329,7 @@ def status(self, status): def borrow_time(self): """Gets the borrow_time of this MultiCollateralOrder. # noqa: E501 - Borrowing time, timestamp in seconds # noqa: E501 + Borrowing time, timestamp in seconds. # noqa: E501 :return: The borrow_time of this MultiCollateralOrder. # noqa: E501 :rtype: int @@ -340,7 +340,7 @@ def borrow_time(self): def borrow_time(self, borrow_time): """Sets the borrow_time of this MultiCollateralOrder. - Borrowing time, timestamp in seconds # noqa: E501 + Borrowing time, timestamp in seconds. # noqa: E501 :param borrow_time: The borrow_time of this MultiCollateralOrder. # noqa: E501 :type: int @@ -352,7 +352,7 @@ def borrow_time(self, borrow_time): def total_left_repay_usdt(self): """Gets the total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 - Value of Left repay amount converted in USDT # noqa: E501 + Value of Left repay amount converted in USDT. # noqa: E501 :return: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -363,7 +363,7 @@ def total_left_repay_usdt(self): def total_left_repay_usdt(self, total_left_repay_usdt): """Sets the total_left_repay_usdt of this MultiCollateralOrder. - Value of Left repay amount converted in USDT # noqa: E501 + Value of Left repay amount converted in USDT. # noqa: E501 :param total_left_repay_usdt: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 :type: str @@ -375,7 +375,7 @@ def total_left_repay_usdt(self, total_left_repay_usdt): def total_left_collateral_usdt(self): """Gets the total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 - Value of Collateral amount in USDT # noqa: E501 + Value of Collateral amount in USDT. # noqa: E501 :return: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -386,7 +386,7 @@ def total_left_collateral_usdt(self): def total_left_collateral_usdt(self, total_left_collateral_usdt): """Sets the total_left_collateral_usdt of this MultiCollateralOrder. - Value of Collateral amount in USDT # noqa: E501 + Value of Collateral amount in USDT. # noqa: E501 :param total_left_collateral_usdt: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 :type: str @@ -398,7 +398,7 @@ def total_left_collateral_usdt(self, total_left_collateral_usdt): def borrow_currencies(self): """Gets the borrow_currencies of this MultiCollateralOrder. # noqa: E501 - Borrowing Currency List # noqa: E501 + Borrowing Currency List. # noqa: E501 :return: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 :rtype: list[BorrowCurrencyInfo] @@ -409,7 +409,7 @@ def borrow_currencies(self): def borrow_currencies(self, borrow_currencies): """Sets the borrow_currencies of this MultiCollateralOrder. - Borrowing Currency List # noqa: E501 + Borrowing Currency List. # noqa: E501 :param borrow_currencies: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 :type: list[BorrowCurrencyInfo] @@ -421,7 +421,7 @@ def borrow_currencies(self, borrow_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiCollateralOrder. # noqa: E501 - Collateral Currency List # noqa: E501 + Collateral Currency List. # noqa: E501 :return: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 :rtype: list[CollateralCurrencyInfo] @@ -432,7 +432,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiCollateralOrder. - Collateral Currency List # noqa: E501 + Collateral Currency List. # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 :type: list[CollateralCurrencyInfo] diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py index f291ae8..934366a 100644 --- a/gate_api/models/multi_collateral_record.py +++ b/gate_api/models/multi_collateral_record.py @@ -87,7 +87,7 @@ def __init__(self, order_id=None, record_id=None, before_ltv=None, after_ltv=Non def order_id(self): """Gets the order_id of this MultiCollateralRecord. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this MultiCollateralRecord. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiCollateralRecord. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this MultiCollateralRecord. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this MultiCollateralRecord. # noqa: E501 - Collateral record ID # noqa: E501 + Collateral record ID. # noqa: E501 :return: The record_id of this MultiCollateralRecord. # noqa: E501 :rtype: int @@ -121,7 +121,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this MultiCollateralRecord. - Collateral record ID # noqa: E501 + Collateral record ID. # noqa: E501 :param record_id: The record_id of this MultiCollateralRecord. # noqa: E501 :type: int @@ -133,7 +133,7 @@ def record_id(self, record_id): def before_ltv(self): """Gets the before_ltv of this MultiCollateralRecord. # noqa: E501 - The collateral ratio before adjustment # noqa: E501 + The collateral ratio before adjustment. # noqa: E501 :return: The before_ltv of this MultiCollateralRecord. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def before_ltv(self): def before_ltv(self, before_ltv): """Sets the before_ltv of this MultiCollateralRecord. - The collateral ratio before adjustment # noqa: E501 + The collateral ratio before adjustment. # noqa: E501 :param before_ltv: The before_ltv of this MultiCollateralRecord. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def before_ltv(self, before_ltv): def after_ltv(self): """Gets the after_ltv of this MultiCollateralRecord. # noqa: E501 - The collateral ratio before adjustment # noqa: E501 + The collateral ratio before adjustment. # noqa: E501 :return: The after_ltv of this MultiCollateralRecord. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def after_ltv(self): def after_ltv(self, after_ltv): """Sets the after_ltv of this MultiCollateralRecord. - The collateral ratio before adjustment # noqa: E501 + The collateral ratio before adjustment. # noqa: E501 :param after_ltv: The after_ltv of this MultiCollateralRecord. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def operate_time(self, operate_time): def borrow_currencies(self): """Gets the borrow_currencies of this MultiCollateralRecord. # noqa: E501 - Borrowing Currency List # noqa: E501 + Borrowing Currency List. # noqa: E501 :return: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 :rtype: list[MultiCollateralRecordCurrency] @@ -213,7 +213,7 @@ def borrow_currencies(self): def borrow_currencies(self, borrow_currencies): """Sets the borrow_currencies of this MultiCollateralRecord. - Borrowing Currency List # noqa: E501 + Borrowing Currency List. # noqa: E501 :param borrow_currencies: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 :type: list[MultiCollateralRecordCurrency] @@ -225,7 +225,7 @@ def borrow_currencies(self, borrow_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiCollateralRecord. # noqa: E501 - Collateral Currency List # noqa: E501 + Collateral Currency List. # noqa: E501 :return: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 :rtype: list[MultiCollateralRecordCurrency] @@ -236,7 +236,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiCollateralRecord. - Collateral Currency List # noqa: E501 + Collateral Currency List. # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 :type: list[MultiCollateralRecordCurrency] diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py index 568216a..f8228fd 100644 --- a/gate_api/models/multi_collateral_record_currency.py +++ b/gate_api/models/multi_collateral_record_currency.py @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, before_amount=None, before_a def currency(self): """Gets the currency of this MultiCollateralRecordCurrency. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiCollateralRecordCurrency. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this MultiCollateralRecordCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this MultiCollateralRecordCurrency. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this MultiCollateralRecordCurrency. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def before_amount(self): """Gets the before_amount of this MultiCollateralRecordCurrency. # noqa: E501 - Amount before the operation # noqa: E501 + Amount before the operation. # noqa: E501 :return: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def before_amount(self): def before_amount(self, before_amount): """Sets the before_amount of this MultiCollateralRecordCurrency. - Amount before the operation # noqa: E501 + Amount before the operation. # noqa: E501 :param before_amount: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py index e579d9a..4fa410c 100644 --- a/gate_api/models/multi_loan_item.py +++ b/gate_api/models/multi_loan_item.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, price=None, local_vars_configuration=None): # def currency(self): """Gets the currency of this MultiLoanItem. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this MultiLoanItem. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiLoanItem. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this MultiLoanItem. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def price(self): """Gets the price of this MultiLoanItem. # noqa: E501 - Latest price of the currency # noqa: E501 + Latest price of the currency. # noqa: E501 :return: The price of this MultiLoanItem. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def price(self): def price(self, price): """Sets the price of this MultiLoanItem. - Latest price of the currency # noqa: E501 + Latest price of the currency. # noqa: E501 :param price: The price of this MultiLoanItem. # noqa: E501 :type: str diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py index b829477..d95fb06 100644 --- a/gate_api/models/multi_loan_repay_item.py +++ b/gate_api/models/multi_loan_repay_item.py @@ -67,7 +67,7 @@ def __init__(self, currency=None, amount=None, repaid_all=None, local_vars_confi def currency(self): """Gets the currency of this MultiLoanRepayItem. # noqa: E501 - Repayment currency # noqa: E501 + Repayment currency. # noqa: E501 :return: The currency of this MultiLoanRepayItem. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiLoanRepayItem. - Repayment currency # noqa: E501 + Repayment currency. # noqa: E501 :param currency: The currency of this MultiLoanRepayItem. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this MultiLoanRepayItem. # noqa: E501 - Size # noqa: E501 + Size. # noqa: E501 :return: The amount of this MultiLoanRepayItem. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this MultiLoanRepayItem. - Size # noqa: E501 + Size. # noqa: E501 :param amount: The amount of this MultiLoanRepayItem. # noqa: E501 :type: str diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py index bd0a73f..e648539 100644 --- a/gate_api/models/multi_repay_record.py +++ b/gate_api/models/multi_repay_record.py @@ -112,7 +112,7 @@ def __init__(self, order_id=None, record_id=None, init_ltv=None, before_ltv=None def order_id(self): """Gets the order_id of this MultiRepayRecord. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this MultiRepayRecord. # noqa: E501 :rtype: int @@ -123,7 +123,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiRepayRecord. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this MultiRepayRecord. # noqa: E501 :type: int @@ -135,7 +135,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this MultiRepayRecord. # noqa: E501 - Repayment record ID # noqa: E501 + Repayment record ID. # noqa: E501 :return: The record_id of this MultiRepayRecord. # noqa: E501 :rtype: int @@ -146,7 +146,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this MultiRepayRecord. - Repayment record ID # noqa: E501 + Repayment record ID. # noqa: E501 :param record_id: The record_id of this MultiRepayRecord. # noqa: E501 :type: int @@ -158,7 +158,7 @@ def record_id(self, record_id): def init_ltv(self): """Gets the init_ltv of this MultiRepayRecord. # noqa: E501 - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :return: The init_ltv of this MultiRepayRecord. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this MultiRepayRecord. - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :param init_ltv: The init_ltv of this MultiRepayRecord. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def init_ltv(self, init_ltv): def before_ltv(self): """Gets the before_ltv of this MultiRepayRecord. # noqa: E501 - Ltv before the operation # noqa: E501 + Ltv before the operation. # noqa: E501 :return: The before_ltv of this MultiRepayRecord. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def before_ltv(self): def before_ltv(self, before_ltv): """Sets the before_ltv of this MultiRepayRecord. - Ltv before the operation # noqa: E501 + Ltv before the operation. # noqa: E501 :param before_ltv: The before_ltv of this MultiRepayRecord. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def before_ltv(self, before_ltv): def after_ltv(self): """Gets the after_ltv of this MultiRepayRecord. # noqa: E501 - Ltv after the operation # noqa: E501 + Ltv after the operation. # noqa: E501 :return: The after_ltv of this MultiRepayRecord. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def after_ltv(self): def after_ltv(self, after_ltv): """Sets the after_ltv of this MultiRepayRecord. - Ltv after the operation # noqa: E501 + Ltv after the operation. # noqa: E501 :param after_ltv: The after_ltv of this MultiRepayRecord. # noqa: E501 :type: str @@ -273,7 +273,7 @@ def repay_time(self, repay_time): def borrow_currencies(self): """Gets the borrow_currencies of this MultiRepayRecord. # noqa: E501 - List of borrowing information # noqa: E501 + List of borrowing information. # noqa: E501 :return: The borrow_currencies of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordCurrency] @@ -284,7 +284,7 @@ def borrow_currencies(self): def borrow_currencies(self, borrow_currencies): """Sets the borrow_currencies of this MultiRepayRecord. - List of borrowing information # noqa: E501 + List of borrowing information. # noqa: E501 :param borrow_currencies: The borrow_currencies of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordCurrency] @@ -296,7 +296,7 @@ def borrow_currencies(self, borrow_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiRepayRecord. # noqa: E501 - List of collateral information # noqa: E501 + List of collateral information. # noqa: E501 :return: The collateral_currencies of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordCurrency] @@ -307,7 +307,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiRepayRecord. - List of collateral information # noqa: E501 + List of collateral information. # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordCurrency] @@ -319,7 +319,7 @@ def collateral_currencies(self, collateral_currencies): def repaid_currencies(self): """Gets the repaid_currencies of this MultiRepayRecord. # noqa: E501 - Repay Currency List # noqa: E501 + Repay Currency List. # noqa: E501 :return: The repaid_currencies of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordRepaidCurrency] @@ -330,7 +330,7 @@ def repaid_currencies(self): def repaid_currencies(self, repaid_currencies): """Sets the repaid_currencies of this MultiRepayRecord. - Repay Currency List # noqa: E501 + Repay Currency List. # noqa: E501 :param repaid_currencies: The repaid_currencies of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordRepaidCurrency] @@ -342,7 +342,7 @@ def repaid_currencies(self, repaid_currencies): def total_interest_list(self): """Gets the total_interest_list of this MultiRepayRecord. # noqa: E501 - Total Interest List # noqa: E501 + Total Interest List. # noqa: E501 :return: The total_interest_list of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordTotalInterest] @@ -353,7 +353,7 @@ def total_interest_list(self): def total_interest_list(self, total_interest_list): """Sets the total_interest_list of this MultiRepayRecord. - Total Interest List # noqa: E501 + Total Interest List. # noqa: E501 :param total_interest_list: The total_interest_list of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordTotalInterest] @@ -365,7 +365,7 @@ def total_interest_list(self, total_interest_list): def left_repay_interest_list(self): """Gets the left_repay_interest_list of this MultiRepayRecord. # noqa: E501 - List of left repay interest # noqa: E501 + List of left repay interest. # noqa: E501 :return: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordLeftInterest] @@ -376,7 +376,7 @@ def left_repay_interest_list(self): def left_repay_interest_list(self, left_repay_interest_list): """Sets the left_repay_interest_list of this MultiRepayRecord. - List of left repay interest # noqa: E501 + List of left repay interest. # noqa: E501 :param left_repay_interest_list: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordLeftInterest] diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py index 538989b..ec33cf0 100644 --- a/gate_api/models/multi_repay_resp.py +++ b/gate_api/models/multi_repay_resp.py @@ -62,7 +62,7 @@ def __init__(self, order_id=None, repaid_currencies=None, local_vars_configurati def order_id(self): """Gets the order_id of this MultiRepayResp. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this MultiRepayResp. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiRepayResp. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this MultiRepayResp. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def order_id(self, order_id): def repaid_currencies(self): """Gets the repaid_currencies of this MultiRepayResp. # noqa: E501 - Repay Currency List # noqa: E501 + Repay Currency List. # noqa: E501 :return: The repaid_currencies of this MultiRepayResp. # noqa: E501 :rtype: list[RepayCurrencyRes] @@ -96,7 +96,7 @@ def repaid_currencies(self): def repaid_currencies(self, repaid_currencies): """Sets the repaid_currencies of this MultiRepayResp. - Repay Currency List # noqa: E501 + Repay Currency List. # noqa: E501 :param repaid_currencies: The repaid_currencies of this MultiRepayResp. # noqa: E501 :type: list[RepayCurrencyRes] diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py index 2116ec1..59af70c 100644 --- a/gate_api/models/my_futures_trade.py +++ b/gate_api/models/my_futures_trade.py @@ -107,7 +107,7 @@ def __init__(self, id=None, create_time=None, contract=None, order_id=None, size def id(self): """Gets the id of this MyFuturesTrade. # noqa: E501 - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :return: The id of this MyFuturesTrade. # noqa: E501 :rtype: int @@ -118,7 +118,7 @@ def id(self): def id(self, id): """Sets the id of this MyFuturesTrade. - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :param id: The id of this MyFuturesTrade. # noqa: E501 :type: int @@ -130,7 +130,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this MyFuturesTrade. # noqa: E501 - Trading time # noqa: E501 + Trading time. # noqa: E501 :return: The create_time of this MyFuturesTrade. # noqa: E501 :rtype: float @@ -141,7 +141,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this MyFuturesTrade. - Trading time # noqa: E501 + Trading time. # noqa: E501 :param create_time: The create_time of this MyFuturesTrade. # noqa: E501 :type: float @@ -153,7 +153,7 @@ def create_time(self, create_time): def contract(self): """Gets the contract of this MyFuturesTrade. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -164,7 +164,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this MyFuturesTrade. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this MyFuturesTrade. # noqa: E501 :type: str @@ -176,7 +176,7 @@ def contract(self, contract): def order_id(self): """Gets the order_id of this MyFuturesTrade. # noqa: E501 - Order ID related # noqa: E501 + Order ID related. # noqa: E501 :return: The order_id of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -187,7 +187,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MyFuturesTrade. - Order ID related # noqa: E501 + Order ID related. # noqa: E501 :param order_id: The order_id of this MyFuturesTrade. # noqa: E501 :type: str @@ -199,7 +199,7 @@ def order_id(self, order_id): def size(self): """Gets the size of this MyFuturesTrade. # noqa: E501 - Trading size # noqa: E501 + Trading size. # noqa: E501 :return: The size of this MyFuturesTrade. # noqa: E501 :rtype: int @@ -210,7 +210,7 @@ def size(self): def size(self, size): """Sets the size of this MyFuturesTrade. - Trading size # noqa: E501 + Trading size. # noqa: E501 :param size: The size of this MyFuturesTrade. # noqa: E501 :type: int @@ -222,7 +222,7 @@ def size(self, size): def close_size(self): """Gets the close_size of this MyFuturesTrade. # noqa: E501 - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :return: The close_size of this MyFuturesTrade. # noqa: E501 :rtype: int @@ -233,7 +233,7 @@ def close_size(self): def close_size(self, close_size): """Sets the close_size of this MyFuturesTrade. - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :param close_size: The close_size of this MyFuturesTrade. # noqa: E501 :type: int @@ -245,7 +245,7 @@ def close_size(self, close_size): def price(self): """Gets the price of this MyFuturesTrade. # noqa: E501 - Trading price # noqa: E501 + Trading price. # noqa: E501 :return: The price of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -256,7 +256,7 @@ def price(self): def price(self, price): """Sets the price of this MyFuturesTrade. - Trading price # noqa: E501 + Trading price. # noqa: E501 :param price: The price of this MyFuturesTrade. # noqa: E501 :type: str @@ -268,7 +268,7 @@ def price(self, price): def role(self): """Gets the role of this MyFuturesTrade. # noqa: E501 - Trade role. Available values are `taker` and `maker` # noqa: E501 + Trade role. Available values are `taker` and `maker`. # noqa: E501 :return: The role of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -279,7 +279,7 @@ def role(self): def role(self, role): """Sets the role of this MyFuturesTrade. - Trade role. Available values are `taker` and `maker` # noqa: E501 + Trade role. Available values are `taker` and `maker`. # noqa: E501 :param role: The role of this MyFuturesTrade. # noqa: E501 :type: str @@ -297,7 +297,7 @@ def role(self, role): def text(self): """Gets the text of this MyFuturesTrade. # noqa: E501 - User defined information # noqa: E501 + User defined information. # noqa: E501 :return: The text of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -308,7 +308,7 @@ def text(self): def text(self, text): """Sets the text of this MyFuturesTrade. - User defined information # noqa: E501 + User defined information. # noqa: E501 :param text: The text of this MyFuturesTrade. # noqa: E501 :type: str @@ -320,7 +320,7 @@ def text(self, text): def fee(self): """Gets the fee of this MyFuturesTrade. # noqa: E501 - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :return: The fee of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -331,7 +331,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this MyFuturesTrade. - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :param fee: The fee of this MyFuturesTrade. # noqa: E501 :type: str @@ -343,7 +343,7 @@ def fee(self, fee): def point_fee(self): """Gets the point_fee of this MyFuturesTrade. # noqa: E501 - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :return: The point_fee of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -354,7 +354,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this MyFuturesTrade. - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :param point_fee: The point_fee of this MyFuturesTrade. # noqa: E501 :type: str diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py index 0929a3f..a6589ca 100644 --- a/gate_api/models/my_futures_trade_time_range.py +++ b/gate_api/models/my_futures_trade_time_range.py @@ -107,7 +107,7 @@ def __init__(self, trade_id=None, create_time=None, contract=None, order_id=None def trade_id(self): """Gets the trade_id of this MyFuturesTradeTimeRange. # noqa: E501 - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :return: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -118,7 +118,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this MyFuturesTradeTimeRange. - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :param trade_id: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -130,7 +130,7 @@ def trade_id(self, trade_id): def create_time(self): """Gets the create_time of this MyFuturesTradeTimeRange. # noqa: E501 - Trading time # noqa: E501 + Trading time. # noqa: E501 :return: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: float @@ -141,7 +141,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this MyFuturesTradeTimeRange. - Trading time # noqa: E501 + Trading time. # noqa: E501 :param create_time: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 :type: float @@ -153,7 +153,7 @@ def create_time(self, create_time): def contract(self): """Gets the contract of this MyFuturesTradeTimeRange. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -164,7 +164,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this MyFuturesTradeTimeRange. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -176,7 +176,7 @@ def contract(self, contract): def order_id(self): """Gets the order_id of this MyFuturesTradeTimeRange. # noqa: E501 - Order ID related # noqa: E501 + Order ID related. # noqa: E501 :return: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -187,7 +187,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MyFuturesTradeTimeRange. - Order ID related # noqa: E501 + Order ID related. # noqa: E501 :param order_id: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -199,7 +199,7 @@ def order_id(self, order_id): def size(self): """Gets the size of this MyFuturesTradeTimeRange. # noqa: E501 - Trading size # noqa: E501 + Trading size. # noqa: E501 :return: The size of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: int @@ -210,7 +210,7 @@ def size(self): def size(self, size): """Sets the size of this MyFuturesTradeTimeRange. - Trading size # noqa: E501 + Trading size. # noqa: E501 :param size: The size of this MyFuturesTradeTimeRange. # noqa: E501 :type: int @@ -222,7 +222,7 @@ def size(self, size): def close_size(self): """Gets the close_size of this MyFuturesTradeTimeRange. # noqa: E501 - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :return: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: int @@ -233,7 +233,7 @@ def close_size(self): def close_size(self, close_size): """Sets the close_size of this MyFuturesTradeTimeRange. - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short postion close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :param close_size: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 :type: int @@ -245,7 +245,7 @@ def close_size(self, close_size): def price(self): """Gets the price of this MyFuturesTradeTimeRange. # noqa: E501 - Trading price # noqa: E501 + Trading price. # noqa: E501 :return: The price of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -256,7 +256,7 @@ def price(self): def price(self, price): """Sets the price of this MyFuturesTradeTimeRange. - Trading price # noqa: E501 + Trading price. # noqa: E501 :param price: The price of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -268,7 +268,7 @@ def price(self, price): def role(self): """Gets the role of this MyFuturesTradeTimeRange. # noqa: E501 - Trade role. Available values are `taker` and `maker` # noqa: E501 + Trade role. Available values are `taker` and `maker`. # noqa: E501 :return: The role of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -279,7 +279,7 @@ def role(self): def role(self, role): """Sets the role of this MyFuturesTradeTimeRange. - Trade role. Available values are `taker` and `maker` # noqa: E501 + Trade role. Available values are `taker` and `maker`. # noqa: E501 :param role: The role of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -297,7 +297,7 @@ def role(self, role): def text(self): """Gets the text of this MyFuturesTradeTimeRange. # noqa: E501 - User defined information # noqa: E501 + User defined information. # noqa: E501 :return: The text of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -308,7 +308,7 @@ def text(self): def text(self, text): """Sets the text of this MyFuturesTradeTimeRange. - User defined information # noqa: E501 + User defined information. # noqa: E501 :param text: The text of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -320,7 +320,7 @@ def text(self, text): def fee(self): """Gets the fee of this MyFuturesTradeTimeRange. # noqa: E501 - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :return: The fee of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -331,7 +331,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this MyFuturesTradeTimeRange. - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :param fee: The fee of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -343,7 +343,7 @@ def fee(self, fee): def point_fee(self): """Gets the point_fee of this MyFuturesTradeTimeRange. # noqa: E501 - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :return: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -354,7 +354,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this MyFuturesTradeTimeRange. - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :param point_fee: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 :type: str diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py index 007bd54..46f20a4 100644 --- a/gate_api/models/open_orders.py +++ b/gate_api/models/open_orders.py @@ -67,7 +67,7 @@ def __init__(self, currency_pair=None, total=None, orders=None, local_vars_confi def currency_pair(self): """Gets the currency_pair of this OpenOrders. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this OpenOrders. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this OpenOrders. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this OpenOrders. # noqa: E501 :type: str diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py index 3da4de1..051f2bb 100644 --- a/gate_api/models/options_account.py +++ b/gate_api/models/options_account.py @@ -147,7 +147,7 @@ def __init__(self, user=None, total=None, position_value=None, equity=None, shor def user(self): """Gets the user of this OptionsAccount. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this OptionsAccount. # noqa: E501 :rtype: int @@ -158,7 +158,7 @@ def user(self): def user(self, user): """Sets the user of this OptionsAccount. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this OptionsAccount. # noqa: E501 :type: int @@ -170,7 +170,7 @@ def user(self, user): def total(self): """Gets the total of this OptionsAccount. # noqa: E501 - Account balance # noqa: E501 + Account balance. # noqa: E501 :return: The total of this OptionsAccount. # noqa: E501 :rtype: str @@ -181,7 +181,7 @@ def total(self): def total(self, total): """Sets the total of this OptionsAccount. - Account balance # noqa: E501 + Account balance. # noqa: E501 :param total: The total of this OptionsAccount. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def position_value(self, position_value): def equity(self): """Gets the equity of this OptionsAccount. # noqa: E501 - Account equity, the sum of account balance and position value # noqa: E501 + Account equity, the sum of account balance and position value. # noqa: E501 :return: The equity of this OptionsAccount. # noqa: E501 :rtype: str @@ -227,7 +227,7 @@ def equity(self): def equity(self, equity): """Sets the equity of this OptionsAccount. - Account equity, the sum of account balance and position value # noqa: E501 + Account equity, the sum of account balance and position value. # noqa: E501 :param equity: The equity of this OptionsAccount. # noqa: E501 :type: str @@ -239,7 +239,7 @@ def equity(self, equity): def short_enabled(self): """Gets the short_enabled of this OptionsAccount. # noqa: E501 - If the account is allowed to short # noqa: E501 + If the account is allowed to short. # noqa: E501 :return: The short_enabled of this OptionsAccount. # noqa: E501 :rtype: bool @@ -250,7 +250,7 @@ def short_enabled(self): def short_enabled(self, short_enabled): """Sets the short_enabled of this OptionsAccount. - If the account is allowed to short # noqa: E501 + If the account is allowed to short. # noqa: E501 :param short_enabled: The short_enabled of this OptionsAccount. # noqa: E501 :type: bool @@ -262,7 +262,7 @@ def short_enabled(self, short_enabled): def mmp_enabled(self): """Gets the mmp_enabled of this OptionsAccount. # noqa: E501 - Whether to enable MMP # noqa: E501 + Whether to enable MMP. # noqa: E501 :return: The mmp_enabled of this OptionsAccount. # noqa: E501 :rtype: bool @@ -273,7 +273,7 @@ def mmp_enabled(self): def mmp_enabled(self, mmp_enabled): """Sets the mmp_enabled of this OptionsAccount. - Whether to enable MMP # noqa: E501 + Whether to enable MMP. # noqa: E501 :param mmp_enabled: The mmp_enabled of this OptionsAccount. # noqa: E501 :type: bool @@ -285,7 +285,7 @@ def mmp_enabled(self, mmp_enabled): def liq_triggered(self): """Gets the liq_triggered of this OptionsAccount. # noqa: E501 - Whether to trigger position liquidation # noqa: E501 + Whether to trigger position liquidation. # noqa: E501 :return: The liq_triggered of this OptionsAccount. # noqa: E501 :rtype: bool @@ -296,7 +296,7 @@ def liq_triggered(self): def liq_triggered(self, liq_triggered): """Sets the liq_triggered of this OptionsAccount. - Whether to trigger position liquidation # noqa: E501 + Whether to trigger position liquidation. # noqa: E501 :param liq_triggered: The liq_triggered of this OptionsAccount. # noqa: E501 :type: bool @@ -337,7 +337,7 @@ def margin_mode(self, margin_mode): def unrealised_pnl(self): """Gets the unrealised_pnl of this OptionsAccount. # noqa: E501 - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :return: The unrealised_pnl of this OptionsAccount. # noqa: E501 :rtype: str @@ -348,7 +348,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this OptionsAccount. - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this OptionsAccount. # noqa: E501 :type: str @@ -360,7 +360,7 @@ def unrealised_pnl(self, unrealised_pnl): def init_margin(self): """Gets the init_margin of this OptionsAccount. # noqa: E501 - Initial position margin # noqa: E501 + Initial position margin. # noqa: E501 :return: The init_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -371,7 +371,7 @@ def init_margin(self): def init_margin(self, init_margin): """Sets the init_margin of this OptionsAccount. - Initial position margin # noqa: E501 + Initial position margin. # noqa: E501 :param init_margin: The init_margin of this OptionsAccount. # noqa: E501 :type: str @@ -383,7 +383,7 @@ def init_margin(self, init_margin): def maint_margin(self): """Gets the maint_margin of this OptionsAccount. # noqa: E501 - Position maintenance margin # noqa: E501 + Position maintenance margin. # noqa: E501 :return: The maint_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -394,7 +394,7 @@ def maint_margin(self): def maint_margin(self, maint_margin): """Sets the maint_margin of this OptionsAccount. - Position maintenance margin # noqa: E501 + Position maintenance margin. # noqa: E501 :param maint_margin: The maint_margin of this OptionsAccount. # noqa: E501 :type: str @@ -406,7 +406,7 @@ def maint_margin(self, maint_margin): def order_margin(self): """Gets the order_margin of this OptionsAccount. # noqa: E501 - Order margin of unfinished orders # noqa: E501 + Order margin of unfinished orders. # noqa: E501 :return: The order_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -417,7 +417,7 @@ def order_margin(self): def order_margin(self, order_margin): """Sets the order_margin of this OptionsAccount. - Order margin of unfinished orders # noqa: E501 + Order margin of unfinished orders. # noqa: E501 :param order_margin: The order_margin of this OptionsAccount. # noqa: E501 :type: str @@ -429,7 +429,7 @@ def order_margin(self, order_margin): def ask_order_margin(self): """Gets the ask_order_margin of this OptionsAccount. # noqa: E501 - Margin for outstanding sell orders # noqa: E501 + Margin for outstanding sell orders. # noqa: E501 :return: The ask_order_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -440,7 +440,7 @@ def ask_order_margin(self): def ask_order_margin(self, ask_order_margin): """Sets the ask_order_margin of this OptionsAccount. - Margin for outstanding sell orders # noqa: E501 + Margin for outstanding sell orders. # noqa: E501 :param ask_order_margin: The ask_order_margin of this OptionsAccount. # noqa: E501 :type: str @@ -452,7 +452,7 @@ def ask_order_margin(self, ask_order_margin): def bid_order_margin(self): """Gets the bid_order_margin of this OptionsAccount. # noqa: E501 - Margin for outstanding buy orders # noqa: E501 + Margin for outstanding buy orders. # noqa: E501 :return: The bid_order_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -463,7 +463,7 @@ def bid_order_margin(self): def bid_order_margin(self, bid_order_margin): """Sets the bid_order_margin of this OptionsAccount. - Margin for outstanding buy orders # noqa: E501 + Margin for outstanding buy orders. # noqa: E501 :param bid_order_margin: The bid_order_margin of this OptionsAccount. # noqa: E501 :type: str @@ -475,7 +475,7 @@ def bid_order_margin(self, bid_order_margin): def available(self): """Gets the available of this OptionsAccount. # noqa: E501 - Available balance to transfer out or trade # noqa: E501 + Available balance to transfer out or trade. # noqa: E501 :return: The available of this OptionsAccount. # noqa: E501 :rtype: str @@ -486,7 +486,7 @@ def available(self): def available(self, available): """Sets the available of this OptionsAccount. - Available balance to transfer out or trade # noqa: E501 + Available balance to transfer out or trade. # noqa: E501 :param available: The available of this OptionsAccount. # noqa: E501 :type: str @@ -498,7 +498,7 @@ def available(self, available): def point(self): """Gets the point of this OptionsAccount. # noqa: E501 - POINT amount # noqa: E501 + POINT amount. # noqa: E501 :return: The point of this OptionsAccount. # noqa: E501 :rtype: str @@ -509,7 +509,7 @@ def point(self): def point(self, point): """Sets the point of this OptionsAccount. - POINT amount # noqa: E501 + POINT amount. # noqa: E501 :param point: The point of this OptionsAccount. # noqa: E501 :type: str @@ -521,7 +521,7 @@ def point(self, point): def currency(self): """Gets the currency of this OptionsAccount. # noqa: E501 - Settle currency # noqa: E501 + Settle currency. # noqa: E501 :return: The currency of this OptionsAccount. # noqa: E501 :rtype: str @@ -532,7 +532,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this OptionsAccount. - Settle currency # noqa: E501 + Settle currency. # noqa: E501 :param currency: The currency of this OptionsAccount. # noqa: E501 :type: str @@ -544,7 +544,7 @@ def currency(self, currency): def orders_limit(self): """Gets the orders_limit of this OptionsAccount. # noqa: E501 - Maximum number of outstanding orders # noqa: E501 + Maximum number of outstanding orders. # noqa: E501 :return: The orders_limit of this OptionsAccount. # noqa: E501 :rtype: int @@ -555,7 +555,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this OptionsAccount. - Maximum number of outstanding orders # noqa: E501 + Maximum number of outstanding orders. # noqa: E501 :param orders_limit: The orders_limit of this OptionsAccount. # noqa: E501 :type: int diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py index a3e13e7..e2947b8 100644 --- a/gate_api/models/options_account_book.py +++ b/gate_api/models/options_account_book.py @@ -77,7 +77,7 @@ def __init__(self, time=None, change=None, balance=None, type=None, text=None, l def time(self): """Gets the time of this OptionsAccountBook. # noqa: E501 - Change time # noqa: E501 + Change time. # noqa: E501 :return: The time of this OptionsAccountBook. # noqa: E501 :rtype: float @@ -88,7 +88,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsAccountBook. - Change time # noqa: E501 + Change time. # noqa: E501 :param time: The time of this OptionsAccountBook. # noqa: E501 :type: float @@ -100,7 +100,7 @@ def time(self, time): def change(self): """Gets the change of this OptionsAccountBook. # noqa: E501 - Amount changed (USDT) # noqa: E501 + Amount changed (USDT). # noqa: E501 :return: The change of this OptionsAccountBook. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def change(self): def change(self, change): """Sets the change of this OptionsAccountBook. - Amount changed (USDT) # noqa: E501 + Amount changed (USDT). # noqa: E501 :param change: The change of this OptionsAccountBook. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def change(self, change): def balance(self): """Gets the balance of this OptionsAccountBook. # noqa: E501 - Account total balance after change (USDT) # noqa: E501 + Account total balance after change (USDT). # noqa: E501 :return: The balance of this OptionsAccountBook. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this OptionsAccountBook. - Account total balance after change (USDT) # noqa: E501 + Account total balance after change (USDT). # noqa: E501 :param balance: The balance of this OptionsAccountBook. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def balance(self, balance): def type(self): """Gets the type of this OptionsAccountBook. # noqa: E501 - Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 + Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 :return: The type of this OptionsAccountBook. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def type(self): def type(self, type): """Sets the type of this OptionsAccountBook. - Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 + Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate # noqa: E501 :param type: The type of this OptionsAccountBook. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def type(self, type): def text(self): """Gets the text of this OptionsAccountBook. # noqa: E501 - custom text # noqa: E501 + custom text. # noqa: E501 :return: The text of this OptionsAccountBook. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def text(self): def text(self, text): """Sets the text of this OptionsAccountBook. - custom text # noqa: E501 + custom text. # noqa: E501 :param text: The text of this OptionsAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py index b51b1e1..8dae262 100644 --- a/gate_api/models/options_candlestick.py +++ b/gate_api/models/options_candlestick.py @@ -82,7 +82,7 @@ def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_co def t(self): """Gets the t of this OptionsCandlestick. # noqa: E501 - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :return: The t of this OptionsCandlestick. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def t(self): def t(self, t): """Sets the t of this OptionsCandlestick. - Unix timestamp in seconds # noqa: E501 + Unix timestamp in seconds. # noqa: E501 :param t: The t of this OptionsCandlestick. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def t(self, t): def v(self): """Gets the v of this OptionsCandlestick. # noqa: E501 - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 :return: The v of this OptionsCandlestick. # noqa: E501 :rtype: int @@ -116,7 +116,7 @@ def v(self): def v(self, v): """Sets the v of this OptionsCandlestick. - size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 :param v: The v of this OptionsCandlestick. # noqa: E501 :type: int @@ -128,7 +128,7 @@ def v(self, v): def c(self): """Gets the c of this OptionsCandlestick. # noqa: E501 - Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 + Close price (quote currency, unit: underlying corresponding option price). # noqa: E501 :return: The c of this OptionsCandlestick. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def c(self): def c(self, c): """Sets the c of this OptionsCandlestick. - Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 + Close price (quote currency, unit: underlying corresponding option price). # noqa: E501 :param c: The c of this OptionsCandlestick. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def h(self, h): def l(self): """Gets the l of this OptionsCandlestick. # noqa: E501 - Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 + Lowest price (quote currency, unit: underlying corresponding option price). # noqa: E501 :return: The l of this OptionsCandlestick. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def l(self): def l(self, l): """Sets the l of this OptionsCandlestick. - Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 + Lowest price (quote currency, unit: underlying corresponding option price). # noqa: E501 :param l: The l of this OptionsCandlestick. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def l(self, l): def o(self): """Gets the o of this OptionsCandlestick. # noqa: E501 - Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 + Open price (quote currency, unit: underlying corresponding option price). # noqa: E501 :return: The o of this OptionsCandlestick. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def o(self): def o(self, o): """Sets the o of this OptionsCandlestick. - Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 + Open price (quote currency, unit: underlying corresponding option price). # noqa: E501 :param o: The o of this OptionsCandlestick. # noqa: E501 :type: str diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py index 7ae1504..52c7883 100644 --- a/gate_api/models/options_contract.py +++ b/gate_api/models/options_contract.py @@ -177,7 +177,7 @@ def __init__(self, name=None, tag=None, create_time=None, expiration_time=None, def name(self): """Gets the name of this OptionsContract. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The name of this OptionsContract. # noqa: E501 :rtype: str @@ -188,7 +188,7 @@ def name(self): def name(self, name): """Sets the name of this OptionsContract. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param name: The name of this OptionsContract. # noqa: E501 :type: str @@ -200,7 +200,7 @@ def name(self, name): def tag(self): """Gets the tag of this OptionsContract. # noqa: E501 - tag # noqa: E501 + tag. # noqa: E501 :return: The tag of this OptionsContract. # noqa: E501 :rtype: str @@ -211,7 +211,7 @@ def tag(self): def tag(self, tag): """Sets the tag of this OptionsContract. - tag # noqa: E501 + tag. # noqa: E501 :param tag: The tag of this OptionsContract. # noqa: E501 :type: str @@ -223,7 +223,7 @@ def tag(self, tag): def create_time(self): """Gets the create_time of this OptionsContract. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The create_time of this OptionsContract. # noqa: E501 :rtype: float @@ -234,7 +234,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OptionsContract. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param create_time: The create_time of this OptionsContract. # noqa: E501 :type: float @@ -246,7 +246,7 @@ def create_time(self, create_time): def expiration_time(self): """Gets the expiration_time of this OptionsContract. # noqa: E501 - Expiration time # noqa: E501 + Expiration time. # noqa: E501 :return: The expiration_time of this OptionsContract. # noqa: E501 :rtype: float @@ -257,7 +257,7 @@ def expiration_time(self): def expiration_time(self, expiration_time): """Sets the expiration_time of this OptionsContract. - Expiration time # noqa: E501 + Expiration time. # noqa: E501 :param expiration_time: The expiration_time of this OptionsContract. # noqa: E501 :type: float @@ -269,7 +269,7 @@ def expiration_time(self, expiration_time): def is_call(self): """Gets the is_call of this OptionsContract. # noqa: E501 - `true` means call options, while `false` is put options # noqa: E501 + `true` means call options, while `false` is put options. # noqa: E501 :return: The is_call of this OptionsContract. # noqa: E501 :rtype: bool @@ -280,7 +280,7 @@ def is_call(self): def is_call(self, is_call): """Sets the is_call of this OptionsContract. - `true` means call options, while `false` is put options # noqa: E501 + `true` means call options, while `false` is put options. # noqa: E501 :param is_call: The is_call of this OptionsContract. # noqa: E501 :type: bool @@ -292,7 +292,7 @@ def is_call(self, is_call): def multiplier(self): """Gets the multiplier of this OptionsContract. # noqa: E501 - Multiplier used in converting from invoicing to settlement currency # noqa: E501 + Multiplier used in converting from invoicing to settlement currency. # noqa: E501 :return: The multiplier of this OptionsContract. # noqa: E501 :rtype: str @@ -303,7 +303,7 @@ def multiplier(self): def multiplier(self, multiplier): """Sets the multiplier of this OptionsContract. - Multiplier used in converting from invoicing to settlement currency # noqa: E501 + Multiplier used in converting from invoicing to settlement currency. # noqa: E501 :param multiplier: The multiplier of this OptionsContract. # noqa: E501 :type: str @@ -315,7 +315,7 @@ def multiplier(self, multiplier): def underlying(self): """Gets the underlying of this OptionsContract. # noqa: E501 - Underlying # noqa: E501 + Underlying. # noqa: E501 :return: The underlying of this OptionsContract. # noqa: E501 :rtype: str @@ -326,7 +326,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsContract. - Underlying # noqa: E501 + Underlying. # noqa: E501 :param underlying: The underlying of this OptionsContract. # noqa: E501 :type: str @@ -338,7 +338,7 @@ def underlying(self, underlying): def underlying_price(self): """Gets the underlying_price of this OptionsContract. # noqa: E501 - Underlying price (quote currency) # noqa: E501 + Underlying price (quote currency). # noqa: E501 :return: The underlying_price of this OptionsContract. # noqa: E501 :rtype: str @@ -349,7 +349,7 @@ def underlying_price(self): def underlying_price(self, underlying_price): """Sets the underlying_price of this OptionsContract. - Underlying price (quote currency) # noqa: E501 + Underlying price (quote currency). # noqa: E501 :param underlying_price: The underlying_price of this OptionsContract. # noqa: E501 :type: str @@ -361,7 +361,7 @@ def underlying_price(self, underlying_price): def last_price(self): """Gets the last_price of this OptionsContract. # noqa: E501 - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :return: The last_price of this OptionsContract. # noqa: E501 :rtype: str @@ -372,7 +372,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this OptionsContract. - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :param last_price: The last_price of this OptionsContract. # noqa: E501 :type: str @@ -384,7 +384,7 @@ def last_price(self, last_price): def mark_price(self): """Gets the mark_price of this OptionsContract. # noqa: E501 - Current mark price (quote currency) # noqa: E501 + Current mark price (quote currency). # noqa: E501 :return: The mark_price of this OptionsContract. # noqa: E501 :rtype: str @@ -395,7 +395,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this OptionsContract. - Current mark price (quote currency) # noqa: E501 + Current mark price (quote currency). # noqa: E501 :param mark_price: The mark_price of this OptionsContract. # noqa: E501 :type: str @@ -407,7 +407,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this OptionsContract. # noqa: E501 - Current index price (quote currency) # noqa: E501 + Current index price (quote currency). # noqa: E501 :return: The index_price of this OptionsContract. # noqa: E501 :rtype: str @@ -418,7 +418,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsContract. - Current index price (quote currency) # noqa: E501 + Current index price (quote currency). # noqa: E501 :param index_price: The index_price of this OptionsContract. # noqa: E501 :type: str @@ -430,7 +430,7 @@ def index_price(self, index_price): def maker_fee_rate(self): """Gets the maker_fee_rate of this OptionsContract. # noqa: E501 - Maker fee rate, where negative means rebate # noqa: E501 + Maker fee rate, where negative means rebate. # noqa: E501 :return: The maker_fee_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -441,7 +441,7 @@ def maker_fee_rate(self): def maker_fee_rate(self, maker_fee_rate): """Sets the maker_fee_rate of this OptionsContract. - Maker fee rate, where negative means rebate # noqa: E501 + Maker fee rate, where negative means rebate. # noqa: E501 :param maker_fee_rate: The maker_fee_rate of this OptionsContract. # noqa: E501 :type: str @@ -453,7 +453,7 @@ def maker_fee_rate(self, maker_fee_rate): def taker_fee_rate(self): """Gets the taker_fee_rate of this OptionsContract. # noqa: E501 - Taker fee rate # noqa: E501 + Taker fee rate. # noqa: E501 :return: The taker_fee_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -464,7 +464,7 @@ def taker_fee_rate(self): def taker_fee_rate(self, taker_fee_rate): """Sets the taker_fee_rate of this OptionsContract. - Taker fee rate # noqa: E501 + Taker fee rate. # noqa: E501 :param taker_fee_rate: The taker_fee_rate of this OptionsContract. # noqa: E501 :type: str @@ -476,7 +476,7 @@ def taker_fee_rate(self, taker_fee_rate): def order_price_round(self): """Gets the order_price_round of this OptionsContract. # noqa: E501 - Minimum order price increment # noqa: E501 + Minimum order price increment. # noqa: E501 :return: The order_price_round of this OptionsContract. # noqa: E501 :rtype: str @@ -487,7 +487,7 @@ def order_price_round(self): def order_price_round(self, order_price_round): """Sets the order_price_round of this OptionsContract. - Minimum order price increment # noqa: E501 + Minimum order price increment. # noqa: E501 :param order_price_round: The order_price_round of this OptionsContract. # noqa: E501 :type: str @@ -499,7 +499,7 @@ def order_price_round(self, order_price_round): def mark_price_round(self): """Gets the mark_price_round of this OptionsContract. # noqa: E501 - Minimum mark price increment # noqa: E501 + Minimum mark price increment. # noqa: E501 :return: The mark_price_round of this OptionsContract. # noqa: E501 :rtype: str @@ -510,7 +510,7 @@ def mark_price_round(self): def mark_price_round(self, mark_price_round): """Sets the mark_price_round of this OptionsContract. - Minimum mark price increment # noqa: E501 + Minimum mark price increment. # noqa: E501 :param mark_price_round: The mark_price_round of this OptionsContract. # noqa: E501 :type: str @@ -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 the contract allowed # noqa: E501 + Minimum order size the contract allowed. # 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 the contract allowed # noqa: E501 + Minimum order size the contract allowed. # 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 the contract allowed # noqa: E501 + Maximum order size the contract allowed. # 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 the contract allowed # noqa: E501 + Maximum order size the contract allowed. # noqa: E501 :param order_size_max: The order_size_max of this OptionsContract. # noqa: E501 :type: int @@ -568,7 +568,7 @@ def order_size_max(self, order_size_max): def order_price_deviate(self): """Gets the order_price_deviate of this OptionsContract. # noqa: E501 - The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 + The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 :return: The order_price_deviate of this OptionsContract. # noqa: E501 :rtype: str @@ -579,7 +579,7 @@ def order_price_deviate(self): def order_price_deviate(self, order_price_deviate): """Sets the order_price_deviate of this OptionsContract. - The positive and negative offset allowed between the order price and the current mark price, that is, the order price `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 + The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 :param order_price_deviate: The order_price_deviate of this OptionsContract. # noqa: E501 :type: str @@ -591,7 +591,7 @@ def order_price_deviate(self, order_price_deviate): def ref_discount_rate(self): """Gets the ref_discount_rate of this OptionsContract. # noqa: E501 - Referral fee rate discount # noqa: E501 + Referral fee rate discount. # noqa: E501 :return: The ref_discount_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -602,7 +602,7 @@ def ref_discount_rate(self): def ref_discount_rate(self, ref_discount_rate): """Sets the ref_discount_rate of this OptionsContract. - Referral fee rate discount # noqa: E501 + Referral fee rate discount. # noqa: E501 :param ref_discount_rate: The ref_discount_rate of this OptionsContract. # noqa: E501 :type: str @@ -614,7 +614,7 @@ def ref_discount_rate(self, ref_discount_rate): def ref_rebate_rate(self): """Gets the ref_rebate_rate of this OptionsContract. # noqa: E501 - Referrer commission rate # noqa: E501 + Referrer commission rate. # noqa: E501 :return: The ref_rebate_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -625,7 +625,7 @@ def ref_rebate_rate(self): def ref_rebate_rate(self, ref_rebate_rate): """Sets the ref_rebate_rate of this OptionsContract. - Referrer commission rate # noqa: E501 + Referrer commission rate. # noqa: E501 :param ref_rebate_rate: The ref_rebate_rate of this OptionsContract. # noqa: E501 :type: str @@ -637,7 +637,7 @@ def ref_rebate_rate(self, ref_rebate_rate): def orderbook_id(self): """Gets the orderbook_id of this OptionsContract. # noqa: E501 - Current orderbook ID # noqa: E501 + Current orderbook ID. # noqa: E501 :return: The orderbook_id of this OptionsContract. # noqa: E501 :rtype: int @@ -648,7 +648,7 @@ def orderbook_id(self): def orderbook_id(self, orderbook_id): """Sets the orderbook_id of this OptionsContract. - Current orderbook ID # noqa: E501 + Current orderbook ID. # noqa: E501 :param orderbook_id: The orderbook_id of this OptionsContract. # noqa: E501 :type: int @@ -660,7 +660,7 @@ def orderbook_id(self, orderbook_id): def trade_id(self): """Gets the trade_id of this OptionsContract. # noqa: E501 - Current trade ID # noqa: E501 + Current trade ID. # noqa: E501 :return: The trade_id of this OptionsContract. # noqa: E501 :rtype: int @@ -671,7 +671,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this OptionsContract. - Current trade ID # noqa: E501 + Current trade ID. # noqa: E501 :param trade_id: The trade_id of this OptionsContract. # noqa: E501 :type: int @@ -683,7 +683,7 @@ def trade_id(self, trade_id): def trade_size(self): """Gets the trade_size of this OptionsContract. # noqa: E501 - Historical accumulated trade size # noqa: E501 + Historical accumulated trade size. # noqa: E501 :return: The trade_size of this OptionsContract. # noqa: E501 :rtype: int @@ -694,7 +694,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this OptionsContract. - Historical accumulated trade size # noqa: E501 + Historical accumulated trade size. # noqa: E501 :param trade_size: The trade_size of this OptionsContract. # noqa: E501 :type: int @@ -706,7 +706,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this OptionsContract. # noqa: E501 - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :return: The position_size of this OptionsContract. # noqa: E501 :rtype: int @@ -717,7 +717,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this OptionsContract. - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :param position_size: The position_size of this OptionsContract. # noqa: E501 :type: int @@ -729,7 +729,7 @@ def position_size(self, position_size): def orders_limit(self): """Gets the orders_limit of this OptionsContract. # noqa: E501 - Maximum number of open orders # noqa: E501 + Maximum number of open orders. # noqa: E501 :return: The orders_limit of this OptionsContract. # noqa: E501 :rtype: int @@ -740,7 +740,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this OptionsContract. - Maximum number of open orders # noqa: E501 + Maximum number of open orders. # noqa: E501 :param orders_limit: The orders_limit of this OptionsContract. # noqa: E501 :type: int diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py index 4b10753..44c0790 100644 --- a/gate_api/models/options_mmp.py +++ b/gate_api/models/options_mmp.py @@ -82,7 +82,7 @@ def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=N def underlying(self): """Gets the underlying of this OptionsMMP. # noqa: E501 - Underlying # noqa: E501 + Underlying. # noqa: E501 :return: The underlying of this OptionsMMP. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsMMP. - Underlying # noqa: E501 + Underlying. # noqa: E501 :param underlying: The underlying of this OptionsMMP. # noqa: E501 :type: str @@ -107,7 +107,7 @@ def underlying(self, underlying): def window(self): """Gets the window of this OptionsMMP. # noqa: E501 - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 :return: The window of this OptionsMMP. # noqa: E501 :rtype: int @@ -118,7 +118,7 @@ def window(self): def window(self, window): """Sets the window of this OptionsMMP. - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 :param window: The window of this OptionsMMP. # noqa: E501 :type: int @@ -157,7 +157,7 @@ def frozen_period(self, frozen_period): def qty_limit(self): """Gets the qty_limit of this OptionsMMP. # noqa: E501 - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 :return: The qty_limit of this OptionsMMP. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def qty_limit(self): def qty_limit(self, qty_limit): """Sets the qty_limit of this OptionsMMP. - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 :param qty_limit: The qty_limit of this OptionsMMP. # noqa: E501 :type: str @@ -182,7 +182,7 @@ def qty_limit(self, qty_limit): def delta_limit(self): """Gets the delta_limit of this OptionsMMP. # noqa: E501 - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 :return: The delta_limit of this OptionsMMP. # noqa: E501 :rtype: str @@ -193,7 +193,7 @@ def delta_limit(self): def delta_limit(self, delta_limit): """Sets the delta_limit of this OptionsMMP. - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 :param delta_limit: The delta_limit of this OptionsMMP. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def delta_limit(self, delta_limit): def trigger_time_ms(self): """Gets the trigger_time_ms of this OptionsMMP. # noqa: E501 - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 :return: The trigger_time_ms of this OptionsMMP. # noqa: E501 :rtype: int @@ -218,7 +218,7 @@ def trigger_time_ms(self): def trigger_time_ms(self, trigger_time_ms): """Sets the trigger_time_ms of this OptionsMMP. - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 :param trigger_time_ms: The trigger_time_ms of this OptionsMMP. # noqa: E501 :type: int diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py index 8d7bcae..31678d9 100644 --- a/gate_api/models/options_mmp_reset.py +++ b/gate_api/models/options_mmp_reset.py @@ -86,7 +86,7 @@ def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=N def underlying(self): """Gets the underlying of this OptionsMMPReset. # noqa: E501 - Underlying # noqa: E501 + Underlying. # noqa: E501 :return: The underlying of this OptionsMMPReset. # noqa: E501 :rtype: str @@ -97,7 +97,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsMMPReset. - Underlying # noqa: E501 + Underlying. # noqa: E501 :param underlying: The underlying of this OptionsMMPReset. # noqa: E501 :type: str @@ -111,7 +111,7 @@ def underlying(self, underlying): def window(self): """Gets the window of this OptionsMMPReset. # noqa: E501 - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 :return: The window of this OptionsMMPReset. # noqa: E501 :rtype: int @@ -122,7 +122,7 @@ def window(self): def window(self, window): """Sets the window of this OptionsMMPReset. - Time window (milliseconds), between 1-5000, 0 means disabling MMP # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 :param window: The window of this OptionsMMPReset. # noqa: E501 :type: int @@ -157,7 +157,7 @@ def frozen_period(self, frozen_period): def qty_limit(self): """Gets the qty_limit of this OptionsMMPReset. # noqa: E501 - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 :return: The qty_limit of this OptionsMMPReset. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def qty_limit(self): def qty_limit(self, qty_limit): """Sets the qty_limit of this OptionsMMPReset. - Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 :param qty_limit: The qty_limit of this OptionsMMPReset. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def qty_limit(self, qty_limit): def delta_limit(self): """Gets the delta_limit of this OptionsMMPReset. # noqa: E501 - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 :return: The delta_limit of this OptionsMMPReset. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def delta_limit(self): def delta_limit(self, delta_limit): """Sets the delta_limit of this OptionsMMPReset. - Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 :param delta_limit: The delta_limit of this OptionsMMPReset. # noqa: E501 :type: str @@ -203,7 +203,7 @@ def delta_limit(self, delta_limit): def trigger_time_ms(self): """Gets the trigger_time_ms of this OptionsMMPReset. # noqa: E501 - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 :return: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 :rtype: int @@ -214,7 +214,7 @@ def trigger_time_ms(self): def trigger_time_ms(self, trigger_time_ms): """Sets the trigger_time_ms of this OptionsMMPReset. - Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 :param trigger_time_ms: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 :type: int diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py index 8c5c197..c02472e 100644 --- a/gate_api/models/options_my_settlements.py +++ b/gate_api/models/options_my_settlements.py @@ -97,7 +97,7 @@ def __init__(self, time=None, underlying=None, contract=None, strike_price=None, def time(self): """Gets the time of this OptionsMySettlements. # noqa: E501 - Settlement time # noqa: E501 + Settlement time. # noqa: E501 :return: The time of this OptionsMySettlements. # noqa: E501 :rtype: float @@ -108,7 +108,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsMySettlements. - Settlement time # noqa: E501 + Settlement time. # noqa: E501 :param time: The time of this OptionsMySettlements. # noqa: E501 :type: float @@ -120,7 +120,7 @@ def time(self, time): def underlying(self): """Gets the underlying of this OptionsMySettlements. # noqa: E501 - Underlying # noqa: E501 + Underlying. # noqa: E501 :return: The underlying of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -131,7 +131,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsMySettlements. - Underlying # noqa: E501 + Underlying. # noqa: E501 :param underlying: The underlying of this OptionsMySettlements. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def underlying(self, underlying): def contract(self): """Gets the contract of this OptionsMySettlements. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The contract of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsMySettlements. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param contract: The contract of this OptionsMySettlements. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def contract(self, contract): def strike_price(self): """Gets the strike_price of this OptionsMySettlements. # noqa: E501 - Strike price (quote currency) # noqa: E501 + Strike price (quote currency). # noqa: E501 :return: The strike_price of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def strike_price(self): def strike_price(self, strike_price): """Sets the strike_price of this OptionsMySettlements. - Strike price (quote currency) # noqa: E501 + Strike price (quote currency). # noqa: E501 :param strike_price: The strike_price of this OptionsMySettlements. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def strike_price(self, strike_price): def settle_price(self): """Gets the settle_price of this OptionsMySettlements. # noqa: E501 - Settlement price (quote currency) # noqa: E501 + Settlement price (quote currency). # noqa: E501 :return: The settle_price of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this OptionsMySettlements. - Settlement price (quote currency) # noqa: E501 + Settlement price (quote currency). # noqa: E501 :param settle_price: The settle_price of this OptionsMySettlements. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def settle_price(self, settle_price): def size(self): """Gets the size of this OptionsMySettlements. # noqa: E501 - Size # noqa: E501 + Size. # noqa: E501 :return: The size of this OptionsMySettlements. # noqa: E501 :rtype: int @@ -223,7 +223,7 @@ def size(self): def size(self, size): """Sets the size of this OptionsMySettlements. - Size # noqa: E501 + Size. # noqa: E501 :param size: The size of this OptionsMySettlements. # noqa: E501 :type: int @@ -235,7 +235,7 @@ def size(self, size): def settle_profit(self): """Gets the settle_profit of this OptionsMySettlements. # noqa: E501 - Settlement profit (quote currency) # noqa: E501 + Settlement profit (quote currency). # noqa: E501 :return: The settle_profit of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def settle_profit(self): def settle_profit(self, settle_profit): """Sets the settle_profit of this OptionsMySettlements. - Settlement profit (quote currency) # noqa: E501 + Settlement profit (quote currency). # noqa: E501 :param settle_profit: The settle_profit of this OptionsMySettlements. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def settle_profit(self, settle_profit): def fee(self): """Gets the fee of this OptionsMySettlements. # noqa: E501 - Fee (quote currency) # noqa: E501 + Fee (quote currency). # noqa: E501 :return: The fee of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this OptionsMySettlements. - Fee (quote currency) # noqa: E501 + Fee (quote currency). # noqa: E501 :param fee: The fee of this OptionsMySettlements. # noqa: E501 :type: str diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py index 07ca7d7..0b0769f 100644 --- a/gate_api/models/options_my_trade.py +++ b/gate_api/models/options_my_trade.py @@ -92,7 +92,7 @@ def __init__(self, id=None, create_time=None, contract=None, order_id=None, size def id(self): """Gets the id of this OptionsMyTrade. # noqa: E501 - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :return: The id of this OptionsMyTrade. # noqa: E501 :rtype: int @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this OptionsMyTrade. - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :param id: The id of this OptionsMyTrade. # noqa: E501 :type: int @@ -115,7 +115,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this OptionsMyTrade. # noqa: E501 - Trading time # noqa: E501 + Trading time. # noqa: E501 :return: The create_time of this OptionsMyTrade. # noqa: E501 :rtype: float @@ -126,7 +126,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OptionsMyTrade. - Trading time # noqa: E501 + Trading time. # noqa: E501 :param create_time: The create_time of this OptionsMyTrade. # noqa: E501 :type: float @@ -138,7 +138,7 @@ def create_time(self, create_time): def contract(self): """Gets the contract of this OptionsMyTrade. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The contract of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsMyTrade. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param contract: The contract of this OptionsMyTrade. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def contract(self, contract): def order_id(self): """Gets the order_id of this OptionsMyTrade. # noqa: E501 - Order ID related # noqa: E501 + Order ID related. # noqa: E501 :return: The order_id of this OptionsMyTrade. # noqa: E501 :rtype: int @@ -172,7 +172,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this OptionsMyTrade. - Order ID related # noqa: E501 + Order ID related. # noqa: E501 :param order_id: The order_id of this OptionsMyTrade. # noqa: E501 :type: int @@ -184,7 +184,7 @@ def order_id(self, order_id): def size(self): """Gets the size of this OptionsMyTrade. # noqa: E501 - Trading size # noqa: E501 + Trading size. # noqa: E501 :return: The size of this OptionsMyTrade. # noqa: E501 :rtype: int @@ -195,7 +195,7 @@ def size(self): def size(self, size): """Sets the size of this OptionsMyTrade. - Trading size # noqa: E501 + Trading size. # noqa: E501 :param size: The size of this OptionsMyTrade. # noqa: E501 :type: int @@ -207,7 +207,7 @@ def size(self, size): def price(self): """Gets the price of this OptionsMyTrade. # noqa: E501 - Trading price (quote currency) # noqa: E501 + Trading price (quote currency). # noqa: E501 :return: The price of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def price(self): def price(self, price): """Sets the price of this OptionsMyTrade. - Trading price (quote currency) # noqa: E501 + Trading price (quote currency). # noqa: E501 :param price: The price of this OptionsMyTrade. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def price(self, price): def underlying_price(self): """Gets the underlying_price of this OptionsMyTrade. # noqa: E501 - Underlying price (quote currency) # noqa: E501 + Underlying price (quote currency). # noqa: E501 :return: The underlying_price of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def underlying_price(self): def underlying_price(self, underlying_price): """Sets the underlying_price of this OptionsMyTrade. - Underlying price (quote currency) # noqa: E501 + Underlying price (quote currency). # noqa: E501 :param underlying_price: The underlying_price of this OptionsMyTrade. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def underlying_price(self, underlying_price): def role(self): """Gets the role of this OptionsMyTrade. # noqa: E501 - Trade role. Available values are `taker` and `maker` # noqa: E501 + Trade role. Available values are `taker` and `maker`. # noqa: E501 :return: The role of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def role(self): def role(self, role): """Sets the role of this OptionsMyTrade. - Trade role. Available values are `taker` and `maker` # noqa: E501 + Trade role. Available values are `taker` and `maker`. # noqa: E501 :param role: The role of this OptionsMyTrade. # noqa: E501 :type: str diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py index a994402..4f8dbbb 100644 --- a/gate_api/models/options_order.py +++ b/gate_api/models/options_order.py @@ -175,7 +175,7 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis def id(self): """Gets the id of this OptionsOrder. # noqa: E501 - Options order ID # noqa: E501 + Options order ID. # noqa: E501 :return: The id of this OptionsOrder. # noqa: E501 :rtype: int @@ -186,7 +186,7 @@ def id(self): def id(self, id): """Sets the id of this OptionsOrder. - Options order ID # noqa: E501 + Options order ID. # noqa: E501 :param id: The id of this OptionsOrder. # noqa: E501 :type: int @@ -198,7 +198,7 @@ def id(self, id): def user(self): """Gets the user of this OptionsOrder. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this OptionsOrder. # noqa: E501 :rtype: int @@ -209,7 +209,7 @@ def user(self): def user(self, user): """Sets the user of this OptionsOrder. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this OptionsOrder. # noqa: E501 :type: int @@ -221,7 +221,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this OptionsOrder. # noqa: E501 - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :return: The create_time of this OptionsOrder. # noqa: E501 :rtype: float @@ -232,7 +232,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OptionsOrder. - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :param create_time: The create_time of this OptionsOrder. # noqa: E501 :type: float @@ -244,7 +244,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this OptionsOrder. # noqa: E501 - Order finished time. Not returned if order is open # noqa: E501 + Order finished time. Not returned if order is open. # noqa: E501 :return: The finish_time of this OptionsOrder. # noqa: E501 :rtype: float @@ -255,7 +255,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this OptionsOrder. - Order finished time. Not returned if order is open # noqa: E501 + Order finished time. Not returned if order is open. # noqa: E501 :param finish_time: The finish_time of this OptionsOrder. # noqa: E501 :type: float @@ -267,7 +267,7 @@ def finish_time(self, finish_time): def finish_as(self): """Gets the finish_as of this OptionsOrder. # noqa: E501 - Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 + Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 :return: The finish_as of this OptionsOrder. # noqa: E501 :rtype: str @@ -278,7 +278,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this OptionsOrder. - Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, because reduce_only is set or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 + Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 :param finish_as: The finish_as of this OptionsOrder. # noqa: E501 :type: str @@ -325,7 +325,7 @@ def status(self, status): def contract(self): """Gets the contract of this OptionsOrder. # noqa: E501 - Contract name # noqa: E501 + Contract name. # noqa: E501 :return: The contract of this OptionsOrder. # noqa: E501 :rtype: str @@ -336,7 +336,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsOrder. - Contract name # noqa: E501 + Contract name. # noqa: E501 :param contract: The contract of this OptionsOrder. # noqa: E501 :type: str @@ -398,7 +398,7 @@ def iceberg(self, iceberg): def price(self): """Gets the price of this OptionsOrder. # noqa: E501 - Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501 + Order price. 0 for market order with `tif` set as `ioc` (USDT). # noqa: E501 :return: The price of this OptionsOrder. # noqa: E501 :rtype: str @@ -409,7 +409,7 @@ def price(self): def price(self, price): """Sets the price of this OptionsOrder. - Order price. 0 for market order with `tif` set as `ioc` (USDT) # noqa: E501 + Order price. 0 for market order with `tif` set as `ioc` (USDT). # noqa: E501 :param price: The price of this OptionsOrder. # noqa: E501 :type: str @@ -421,7 +421,7 @@ def price(self, price): def close(self): """Gets the close of this OptionsOrder. # noqa: E501 - Set as `true` to close the position, with `size` set to 0 # noqa: E501 + Set as `true` to close the position, with `size` set to 0. # noqa: E501 :return: The close of this OptionsOrder. # noqa: E501 :rtype: bool @@ -432,7 +432,7 @@ def close(self): def close(self, close): """Sets the close of this OptionsOrder. - Set as `true` to close the position, with `size` set to 0 # noqa: E501 + Set as `true` to close the position, with `size` set to 0. # noqa: E501 :param close: The close of this OptionsOrder. # noqa: E501 :type: bool @@ -444,7 +444,7 @@ def close(self, close): def is_close(self): """Gets the is_close of this OptionsOrder. # noqa: E501 - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :return: The is_close of this OptionsOrder. # noqa: E501 :rtype: bool @@ -455,7 +455,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this OptionsOrder. - Is the order to close position # noqa: E501 + Is the order to close position. # noqa: E501 :param is_close: The is_close of this OptionsOrder. # noqa: E501 :type: bool @@ -467,7 +467,7 @@ def is_close(self, is_close): def reduce_only(self): """Gets the reduce_only of this OptionsOrder. # noqa: E501 - Set as `true` to be reduce-only order # noqa: E501 + Set as `true` to be reduce-only order. # noqa: E501 :return: The reduce_only of this OptionsOrder. # noqa: E501 :rtype: bool @@ -478,7 +478,7 @@ def reduce_only(self): def reduce_only(self, reduce_only): """Sets the reduce_only of this OptionsOrder. - Set as `true` to be reduce-only order # noqa: E501 + Set as `true` to be reduce-only order. # noqa: E501 :param reduce_only: The reduce_only of this OptionsOrder. # noqa: E501 :type: bool @@ -490,7 +490,7 @@ def reduce_only(self, reduce_only): def is_reduce_only(self): """Gets the is_reduce_only of this OptionsOrder. # noqa: E501 - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :return: The is_reduce_only of this OptionsOrder. # noqa: E501 :rtype: bool @@ -501,7 +501,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this OptionsOrder. - Is the order reduce-only # noqa: E501 + Is the order reduce-only. # noqa: E501 :param is_reduce_only: The is_reduce_only of this OptionsOrder. # noqa: E501 :type: bool @@ -513,7 +513,7 @@ def is_reduce_only(self, is_reduce_only): def is_liq(self): """Gets the is_liq of this OptionsOrder. # noqa: E501 - Is the order for liquidation # noqa: E501 + Is the order for liquidation. # noqa: E501 :return: The is_liq of this OptionsOrder. # noqa: E501 :rtype: bool @@ -524,7 +524,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this OptionsOrder. - Is the order for liquidation # noqa: E501 + Is the order for liquidation. # noqa: E501 :param is_liq: The is_liq of this OptionsOrder. # noqa: E501 :type: bool @@ -536,7 +536,7 @@ def is_liq(self, is_liq): def mmp(self): """Gets the mmp of this OptionsOrder. # noqa: E501 - When set to true, delegate to MMP # noqa: E501 + When set to true, delegate to MMP. # noqa: E501 :return: The mmp of this OptionsOrder. # noqa: E501 :rtype: bool @@ -547,7 +547,7 @@ def mmp(self): def mmp(self, mmp): """Sets the mmp of this OptionsOrder. - When set to true, delegate to MMP # noqa: E501 + When set to true, delegate to MMP. # noqa: E501 :param mmp: The mmp of this OptionsOrder. # noqa: E501 :type: bool @@ -611,7 +611,7 @@ def tif(self, tif): def left(self): """Gets the left of this OptionsOrder. # noqa: E501 - Size left to be traded # noqa: E501 + Size left to be traded. # noqa: E501 :return: The left of this OptionsOrder. # noqa: E501 :rtype: int @@ -622,7 +622,7 @@ def left(self): def left(self, left): """Sets the left of this OptionsOrder. - Size left to be traded # noqa: E501 + Size left to be traded. # noqa: E501 :param left: The left of this OptionsOrder. # noqa: E501 :type: int @@ -634,7 +634,7 @@ def left(self, left): def fill_price(self): """Gets the fill_price of this OptionsOrder. # noqa: E501 - Fill price of the order # noqa: E501 + Fill price of the order. # noqa: E501 :return: The fill_price of this OptionsOrder. # noqa: E501 :rtype: str @@ -645,7 +645,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this OptionsOrder. - Fill price of the order # noqa: E501 + Fill price of the order. # noqa: E501 :param fill_price: The fill_price of this OptionsOrder. # noqa: E501 :type: str @@ -680,7 +680,7 @@ def text(self, text): def tkfr(self): """Gets the tkfr of this OptionsOrder. # noqa: E501 - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :return: The tkfr of this OptionsOrder. # noqa: E501 :rtype: str @@ -691,7 +691,7 @@ def tkfr(self): def tkfr(self, tkfr): """Sets the tkfr of this OptionsOrder. - Taker fee # noqa: E501 + Taker fee. # noqa: E501 :param tkfr: The tkfr of this OptionsOrder. # noqa: E501 :type: str @@ -703,7 +703,7 @@ def tkfr(self, tkfr): def mkfr(self): """Gets the mkfr of this OptionsOrder. # noqa: E501 - Maker fee # noqa: E501 + Maker fee. # noqa: E501 :return: The mkfr of this OptionsOrder. # noqa: E501 :rtype: str @@ -714,7 +714,7 @@ def mkfr(self): def mkfr(self, mkfr): """Sets the mkfr of this OptionsOrder. - Maker fee # noqa: E501 + Maker fee. # noqa: E501 :param mkfr: The mkfr of this OptionsOrder. # noqa: E501 :type: str @@ -726,7 +726,7 @@ def mkfr(self, mkfr): def refu(self): """Gets the refu of this OptionsOrder. # noqa: E501 - Reference user ID # noqa: E501 + Reference user ID. # noqa: E501 :return: The refu of this OptionsOrder. # noqa: E501 :rtype: int @@ -737,7 +737,7 @@ def refu(self): def refu(self, refu): """Sets the refu of this OptionsOrder. - Reference user ID # noqa: E501 + Reference user ID. # noqa: E501 :param refu: The refu of this OptionsOrder. # noqa: E501 :type: int @@ -749,7 +749,7 @@ def refu(self, refu): def refr(self): """Gets the refr of this OptionsOrder. # noqa: E501 - Referrer rebate # noqa: E501 + Referrer rebate. # noqa: E501 :return: The refr of this OptionsOrder. # noqa: E501 :rtype: str @@ -760,7 +760,7 @@ def refr(self): def refr(self, refr): """Sets the refr of this OptionsOrder. - Referrer rebate # noqa: E501 + Referrer rebate. # noqa: E501 :param refr: The refr of this OptionsOrder. # noqa: E501 :type: str diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py index fcde424..999715a 100644 --- a/gate_api/models/options_position.py +++ b/gate_api/models/options_position.py @@ -131,7 +131,7 @@ def __init__(self, user=None, underlying=None, underlying_price=None, contract=N def user(self): """Gets the user of this OptionsPosition. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this OptionsPosition. # noqa: E501 :rtype: int @@ -142,7 +142,7 @@ def user(self): def user(self, user): """Sets the user of this OptionsPosition. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this OptionsPosition. # noqa: E501 :type: int @@ -154,7 +154,7 @@ def user(self, user): def underlying(self): """Gets the underlying of this OptionsPosition. # noqa: E501 - Underlying # noqa: E501 + Underlying. # noqa: E501 :return: The underlying of this OptionsPosition. # noqa: E501 :rtype: str @@ -165,7 +165,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsPosition. - Underlying # noqa: E501 + Underlying. # noqa: E501 :param underlying: The underlying of this OptionsPosition. # noqa: E501 :type: str @@ -177,7 +177,7 @@ def underlying(self, underlying): def underlying_price(self): """Gets the underlying_price of this OptionsPosition. # noqa: E501 - Underlying price (quote currency) # noqa: E501 + Underlying price (quote currency). # noqa: E501 :return: The underlying_price of this OptionsPosition. # noqa: E501 :rtype: str @@ -188,7 +188,7 @@ def underlying_price(self): def underlying_price(self, underlying_price): """Sets the underlying_price of this OptionsPosition. - Underlying price (quote currency) # noqa: E501 + Underlying price (quote currency). # noqa: E501 :param underlying_price: The underlying_price of this OptionsPosition. # noqa: E501 :type: str @@ -200,7 +200,7 @@ def underlying_price(self, underlying_price): def contract(self): """Gets the contract of this OptionsPosition. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The contract of this OptionsPosition. # noqa: E501 :rtype: str @@ -211,7 +211,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsPosition. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param contract: The contract of this OptionsPosition. # noqa: E501 :type: str @@ -223,7 +223,7 @@ def contract(self, contract): def size(self): """Gets the size of this OptionsPosition. # noqa: E501 - Position size (contract size) # noqa: E501 + Position size (contract size). # noqa: E501 :return: The size of this OptionsPosition. # noqa: E501 :rtype: int @@ -234,7 +234,7 @@ def size(self): def size(self, size): """Sets the size of this OptionsPosition. - Position size (contract size) # noqa: E501 + Position size (contract size). # noqa: E501 :param size: The size of this OptionsPosition. # noqa: E501 :type: int @@ -246,7 +246,7 @@ def size(self, size): def entry_price(self): """Gets the entry_price of this OptionsPosition. # noqa: E501 - Entry size (quote currency) # noqa: E501 + Entry size (quote currency). # noqa: E501 :return: The entry_price of this OptionsPosition. # noqa: E501 :rtype: str @@ -257,7 +257,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this OptionsPosition. - Entry size (quote currency) # noqa: E501 + Entry size (quote currency). # noqa: E501 :param entry_price: The entry_price of this OptionsPosition. # noqa: E501 :type: str @@ -269,7 +269,7 @@ def entry_price(self, entry_price): def mark_price(self): """Gets the mark_price of this OptionsPosition. # noqa: E501 - Current mark price (quote currency) # noqa: E501 + Current mark price (quote currency). # noqa: E501 :return: The mark_price of this OptionsPosition. # noqa: E501 :rtype: str @@ -280,7 +280,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this OptionsPosition. - Current mark price (quote currency) # noqa: E501 + Current mark price (quote currency). # noqa: E501 :param mark_price: The mark_price of this OptionsPosition. # noqa: E501 :type: str @@ -292,7 +292,7 @@ def mark_price(self, mark_price): def mark_iv(self): """Gets the mark_iv of this OptionsPosition. # noqa: E501 - Implied volatility # noqa: E501 + Implied volatility. # noqa: E501 :return: The mark_iv of this OptionsPosition. # noqa: E501 :rtype: str @@ -303,7 +303,7 @@ def mark_iv(self): def mark_iv(self, mark_iv): """Sets the mark_iv of this OptionsPosition. - Implied volatility # noqa: E501 + Implied volatility. # noqa: E501 :param mark_iv: The mark_iv of this OptionsPosition. # noqa: E501 :type: str @@ -315,7 +315,7 @@ def mark_iv(self, mark_iv): def realised_pnl(self): """Gets the realised_pnl of this OptionsPosition. # noqa: E501 - Realized PNL # noqa: E501 + Realized PNL. # noqa: E501 :return: The realised_pnl of this OptionsPosition. # noqa: E501 :rtype: str @@ -326,7 +326,7 @@ def realised_pnl(self): def realised_pnl(self, realised_pnl): """Sets the realised_pnl of this OptionsPosition. - Realized PNL # noqa: E501 + Realized PNL. # noqa: E501 :param realised_pnl: The realised_pnl of this OptionsPosition. # noqa: E501 :type: str @@ -338,7 +338,7 @@ def realised_pnl(self, realised_pnl): def unrealised_pnl(self): """Gets the unrealised_pnl of this OptionsPosition. # noqa: E501 - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :return: The unrealised_pnl of this OptionsPosition. # noqa: E501 :rtype: str @@ -349,7 +349,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this OptionsPosition. - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this OptionsPosition. # noqa: E501 :type: str @@ -361,7 +361,7 @@ def unrealised_pnl(self, unrealised_pnl): def pending_orders(self): """Gets the pending_orders of this OptionsPosition. # noqa: E501 - Current open orders # noqa: E501 + Current open orders. # noqa: E501 :return: The pending_orders of this OptionsPosition. # noqa: E501 :rtype: int @@ -372,7 +372,7 @@ def pending_orders(self): def pending_orders(self, pending_orders): """Sets the pending_orders of this OptionsPosition. - Current open orders # noqa: E501 + Current open orders. # noqa: E501 :param pending_orders: The pending_orders of this OptionsPosition. # noqa: E501 :type: int @@ -405,7 +405,7 @@ def close_order(self, close_order): def delta(self): """Gets the delta of this OptionsPosition. # noqa: E501 - Delta # noqa: E501 + Delta. # noqa: E501 :return: The delta of this OptionsPosition. # noqa: E501 :rtype: str @@ -416,7 +416,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this OptionsPosition. - Delta # noqa: E501 + Delta. # noqa: E501 :param delta: The delta of this OptionsPosition. # noqa: E501 :type: str @@ -428,7 +428,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this OptionsPosition. # noqa: E501 - Gamma # noqa: E501 + Gamma. # noqa: E501 :return: The gamma of this OptionsPosition. # noqa: E501 :rtype: str @@ -439,7 +439,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this OptionsPosition. - Gamma # noqa: E501 + Gamma. # noqa: E501 :param gamma: The gamma of this OptionsPosition. # noqa: E501 :type: str @@ -451,7 +451,7 @@ def gamma(self, gamma): def vega(self): """Gets the vega of this OptionsPosition. # noqa: E501 - Vega # noqa: E501 + Vega. # noqa: E501 :return: The vega of this OptionsPosition. # noqa: E501 :rtype: str @@ -462,7 +462,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this OptionsPosition. - Vega # noqa: E501 + Vega. # noqa: E501 :param vega: The vega of this OptionsPosition. # noqa: E501 :type: str @@ -474,7 +474,7 @@ def vega(self, vega): def theta(self): """Gets the theta of this OptionsPosition. # noqa: E501 - Theta # noqa: E501 + Theta. # noqa: E501 :return: The theta of this OptionsPosition. # noqa: E501 :rtype: str @@ -485,7 +485,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this OptionsPosition. - Theta # noqa: E501 + Theta. # noqa: E501 :param theta: The theta of this OptionsPosition. # noqa: E501 :type: str diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py index c68d839..616c81b 100644 --- a/gate_api/models/options_position_close.py +++ b/gate_api/models/options_position_close.py @@ -82,7 +82,7 @@ def __init__(self, time=None, contract=None, side=None, pnl=None, text=None, set def time(self): """Gets the time of this OptionsPositionClose. # noqa: E501 - Position close time # noqa: E501 + Position close time. # noqa: E501 :return: The time of this OptionsPositionClose. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsPositionClose. - Position close time # noqa: E501 + Position close time. # noqa: E501 :param time: The time of this OptionsPositionClose. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def time(self, time): def contract(self): """Gets the contract of this OptionsPositionClose. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The contract of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsPositionClose. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param contract: The contract of this OptionsPositionClose. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def contract(self, contract): def side(self): """Gets the side of this OptionsPositionClose. # noqa: E501 - Position side, long or short # noqa: E501 + Position side, long or short. # noqa: E501 :return: The side of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def side(self): def side(self, side): """Sets the side of this OptionsPositionClose. - Position side, long or short # noqa: E501 + Position side, long or short. # noqa: E501 :param side: The side of this OptionsPositionClose. # noqa: E501 :type: str @@ -157,7 +157,7 @@ def side(self, side): def pnl(self): """Gets the pnl of this OptionsPositionClose. # noqa: E501 - PNL # noqa: E501 + PNL. # noqa: E501 :return: The pnl of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def pnl(self): def pnl(self, pnl): """Sets the pnl of this OptionsPositionClose. - PNL # noqa: E501 + PNL. # noqa: E501 :param pnl: The pnl of this OptionsPositionClose. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def pnl(self, pnl): def text(self): """Gets the text of this OptionsPositionClose. # noqa: E501 - Text of close order # noqa: E501 + Text of close order. # noqa: E501 :return: The text of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def text(self): def text(self, text): """Sets the text of this OptionsPositionClose. - Text of close order # noqa: E501 + Text of close order. # noqa: E501 :param text: The text of this OptionsPositionClose. # noqa: E501 :type: str @@ -203,7 +203,7 @@ def text(self, text): def settle_size(self): """Gets the settle_size of this OptionsPositionClose. # noqa: E501 - settlement size # noqa: E501 + settlement size. # noqa: E501 :return: The settle_size of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -214,7 +214,7 @@ def settle_size(self): def settle_size(self, settle_size): """Sets the settle_size of this OptionsPositionClose. - settlement size # noqa: E501 + settlement size. # noqa: E501 :param settle_size: The settle_size of this OptionsPositionClose. # noqa: E501 :type: str diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py index acb1f38..94bd440 100644 --- a/gate_api/models/options_position_close_order.py +++ b/gate_api/models/options_position_close_order.py @@ -67,7 +67,7 @@ def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=No def id(self): """Gets the id of this OptionsPositionCloseOrder. # noqa: E501 - Close order ID # noqa: E501 + Close order ID. # noqa: E501 :return: The id of this OptionsPositionCloseOrder. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def id(self): def id(self, id): """Sets the id of this OptionsPositionCloseOrder. - Close order ID # noqa: E501 + Close order ID. # noqa: E501 :param id: The id of this OptionsPositionCloseOrder. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def id(self, id): def price(self): """Gets the price of this OptionsPositionCloseOrder. # noqa: E501 - Close order price (quote currency) # noqa: E501 + Close order price (quote currency). # noqa: E501 :return: The price of this OptionsPositionCloseOrder. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def price(self): def price(self, price): """Sets the price of this OptionsPositionCloseOrder. - Close order price (quote currency) # noqa: E501 + Close order price (quote currency). # noqa: E501 :param price: The price of this OptionsPositionCloseOrder. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def price(self, price): def is_liq(self): """Gets the is_liq of this OptionsPositionCloseOrder. # noqa: E501 - Is the close order from liquidation # noqa: E501 + Is the close order from liquidation. # noqa: E501 :return: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 :rtype: bool @@ -124,7 +124,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this OptionsPositionCloseOrder. - Is the close order from liquidation # noqa: E501 + Is the close order from liquidation. # noqa: E501 :param is_liq: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 :type: bool diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py index 11981ac..4ecc7c0 100644 --- a/gate_api/models/options_settlement.py +++ b/gate_api/models/options_settlement.py @@ -82,7 +82,7 @@ def __init__(self, time=None, contract=None, profit=None, fee=None, strike_price def time(self): """Gets the time of this OptionsSettlement. # noqa: E501 - Last changed time of configuration # noqa: E501 + Last changed time of configuration. # noqa: E501 :return: The time of this OptionsSettlement. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsSettlement. - Last changed time of configuration # noqa: E501 + Last changed time of configuration. # noqa: E501 :param time: The time of this OptionsSettlement. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def time(self, time): def contract(self): """Gets the contract of this OptionsSettlement. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The contract of this OptionsSettlement. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsSettlement. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param contract: The contract of this OptionsSettlement. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def contract(self, contract): def profit(self): """Gets the profit of this OptionsSettlement. # noqa: E501 - Settlement profit per size (quote currency) # noqa: E501 + Settlement profit per size (quote currency). # noqa: E501 :return: The profit of this OptionsSettlement. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def profit(self): def profit(self, profit): """Sets the profit of this OptionsSettlement. - Settlement profit per size (quote currency) # noqa: E501 + Settlement profit per size (quote currency). # noqa: E501 :param profit: The profit of this OptionsSettlement. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def profit(self, profit): def fee(self): """Gets the fee of this OptionsSettlement. # noqa: E501 - Settlement fee per size (quote currency) # noqa: E501 + Settlement fee per size (quote currency). # noqa: E501 :return: The fee of this OptionsSettlement. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this OptionsSettlement. - Settlement fee per size (quote currency) # noqa: E501 + Settlement fee per size (quote currency). # noqa: E501 :param fee: The fee of this OptionsSettlement. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def fee(self, fee): def strike_price(self): """Gets the strike_price of this OptionsSettlement. # noqa: E501 - Strike price (quote currency) # noqa: E501 + Strike price (quote currency). # noqa: E501 :return: The strike_price of this OptionsSettlement. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def strike_price(self): def strike_price(self, strike_price): """Sets the strike_price of this OptionsSettlement. - Strike price (quote currency) # noqa: E501 + Strike price (quote currency). # noqa: E501 :param strike_price: The strike_price of this OptionsSettlement. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def strike_price(self, strike_price): def settle_price(self): """Gets the settle_price of this OptionsSettlement. # noqa: E501 - Settlement price (quote currency) # noqa: E501 + Settlement price (quote currency). # noqa: E501 :return: The settle_price of this OptionsSettlement. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this OptionsSettlement. - Settlement price (quote currency) # noqa: E501 + Settlement price (quote currency). # noqa: E501 :param settle_price: The settle_price of this OptionsSettlement. # noqa: E501 :type: str diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py index b4fd8d8..d71ba0f 100644 --- a/gate_api/models/options_ticker.py +++ b/gate_api/models/options_ticker.py @@ -142,7 +142,7 @@ def __init__(self, name=None, last_price=None, mark_price=None, index_price=None def name(self): """Gets the name of this OptionsTicker. # noqa: E501 - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :return: The name of this OptionsTicker. # noqa: E501 :rtype: str @@ -153,7 +153,7 @@ def name(self): def name(self, name): """Sets the name of this OptionsTicker. - Options contract name # noqa: E501 + Options contract name. # noqa: E501 :param name: The name of this OptionsTicker. # noqa: E501 :type: str @@ -165,7 +165,7 @@ def name(self, name): def last_price(self): """Gets the last_price of this OptionsTicker. # noqa: E501 - Last trading price (quote currency) # noqa: E501 + Last trading price (quote currency). # noqa: E501 :return: The last_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -176,7 +176,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this OptionsTicker. - Last trading price (quote currency) # noqa: E501 + Last trading price (quote currency). # noqa: E501 :param last_price: The last_price of this OptionsTicker. # noqa: E501 :type: str @@ -188,7 +188,7 @@ def last_price(self, last_price): def mark_price(self): """Gets the mark_price of this OptionsTicker. # noqa: E501 - Current mark price (quote currency) # noqa: E501 + Current mark price (quote currency). # noqa: E501 :return: The mark_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -199,7 +199,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this OptionsTicker. - Current mark price (quote currency) # noqa: E501 + Current mark price (quote currency). # noqa: E501 :param mark_price: The mark_price of this OptionsTicker. # noqa: E501 :type: str @@ -211,7 +211,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this OptionsTicker. # noqa: E501 - Current index price (quote currency) # noqa: E501 + Current index price (quote currency). # noqa: E501 :return: The index_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -222,7 +222,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsTicker. - Current index price (quote currency) # noqa: E501 + Current index price (quote currency). # noqa: E501 :param index_price: The index_price of this OptionsTicker. # noqa: E501 :type: str @@ -234,7 +234,7 @@ def index_price(self, index_price): def ask1_size(self): """Gets the ask1_size of this OptionsTicker. # noqa: E501 - Best ask size # noqa: E501 + Best ask size. # noqa: E501 :return: The ask1_size of this OptionsTicker. # noqa: E501 :rtype: int @@ -245,7 +245,7 @@ def ask1_size(self): def ask1_size(self, ask1_size): """Sets the ask1_size of this OptionsTicker. - Best ask size # noqa: E501 + Best ask size. # noqa: E501 :param ask1_size: The ask1_size of this OptionsTicker. # noqa: E501 :type: int @@ -257,7 +257,7 @@ def ask1_size(self, ask1_size): def ask1_price(self): """Gets the ask1_price of this OptionsTicker. # noqa: E501 - Best ask price # noqa: E501 + Best ask price. # noqa: E501 :return: The ask1_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -268,7 +268,7 @@ def ask1_price(self): def ask1_price(self, ask1_price): """Sets the ask1_price of this OptionsTicker. - Best ask price # noqa: E501 + Best ask price. # noqa: E501 :param ask1_price: The ask1_price of this OptionsTicker. # noqa: E501 :type: str @@ -280,7 +280,7 @@ def ask1_price(self, ask1_price): def bid1_size(self): """Gets the bid1_size of this OptionsTicker. # noqa: E501 - Best bid size # noqa: E501 + Best bid size. # noqa: E501 :return: The bid1_size of this OptionsTicker. # noqa: E501 :rtype: int @@ -291,7 +291,7 @@ def bid1_size(self): def bid1_size(self, bid1_size): """Sets the bid1_size of this OptionsTicker. - Best bid size # noqa: E501 + Best bid size. # noqa: E501 :param bid1_size: The bid1_size of this OptionsTicker. # noqa: E501 :type: int @@ -303,7 +303,7 @@ def bid1_size(self, bid1_size): def bid1_price(self): """Gets the bid1_price of this OptionsTicker. # noqa: E501 - Best bid price # noqa: E501 + Best bid price. # noqa: E501 :return: The bid1_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -314,7 +314,7 @@ def bid1_price(self): def bid1_price(self, bid1_price): """Sets the bid1_price of this OptionsTicker. - Best bid price # noqa: E501 + Best bid price. # noqa: E501 :param bid1_price: The bid1_price of this OptionsTicker. # noqa: E501 :type: str @@ -326,7 +326,7 @@ def bid1_price(self, bid1_price): def position_size(self): """Gets the position_size of this OptionsTicker. # noqa: E501 - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :return: The position_size of this OptionsTicker. # noqa: E501 :rtype: int @@ -337,7 +337,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this OptionsTicker. - Current total long position size # noqa: E501 + Current total long position size. # noqa: E501 :param position_size: The position_size of this OptionsTicker. # noqa: E501 :type: int @@ -349,7 +349,7 @@ def position_size(self, position_size): def mark_iv(self): """Gets the mark_iv of this OptionsTicker. # noqa: E501 - Implied volatility # noqa: E501 + Implied volatility. # noqa: E501 :return: The mark_iv of this OptionsTicker. # noqa: E501 :rtype: str @@ -360,7 +360,7 @@ def mark_iv(self): def mark_iv(self, mark_iv): """Sets the mark_iv of this OptionsTicker. - Implied volatility # noqa: E501 + Implied volatility. # noqa: E501 :param mark_iv: The mark_iv of this OptionsTicker. # noqa: E501 :type: str @@ -372,7 +372,7 @@ def mark_iv(self, mark_iv): def bid_iv(self): """Gets the bid_iv of this OptionsTicker. # noqa: E501 - Bid side implied volatility # noqa: E501 + Bid side implied volatility. # noqa: E501 :return: The bid_iv of this OptionsTicker. # noqa: E501 :rtype: str @@ -383,7 +383,7 @@ def bid_iv(self): def bid_iv(self, bid_iv): """Sets the bid_iv of this OptionsTicker. - Bid side implied volatility # noqa: E501 + Bid side implied volatility. # noqa: E501 :param bid_iv: The bid_iv of this OptionsTicker. # noqa: E501 :type: str @@ -395,7 +395,7 @@ def bid_iv(self, bid_iv): def ask_iv(self): """Gets the ask_iv of this OptionsTicker. # noqa: E501 - Ask side implied volatility # noqa: E501 + Ask side implied volatility. # noqa: E501 :return: The ask_iv of this OptionsTicker. # noqa: E501 :rtype: str @@ -406,7 +406,7 @@ def ask_iv(self): def ask_iv(self, ask_iv): """Sets the ask_iv of this OptionsTicker. - Ask side implied volatility # noqa: E501 + Ask side implied volatility. # noqa: E501 :param ask_iv: The ask_iv of this OptionsTicker. # noqa: E501 :type: str @@ -418,7 +418,7 @@ def ask_iv(self, ask_iv): def leverage(self): """Gets the leverage of this OptionsTicker. # noqa: E501 - Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 + Current leverage. Formula: underlying_price / mark_price * delta. # noqa: E501 :return: The leverage of this OptionsTicker. # noqa: E501 :rtype: str @@ -429,7 +429,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this OptionsTicker. - Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 + Current leverage. Formula: underlying_price / mark_price * delta. # noqa: E501 :param leverage: The leverage of this OptionsTicker. # noqa: E501 :type: str @@ -441,7 +441,7 @@ def leverage(self, leverage): def delta(self): """Gets the delta of this OptionsTicker. # noqa: E501 - Delta # noqa: E501 + Delta. # noqa: E501 :return: The delta of this OptionsTicker. # noqa: E501 :rtype: str @@ -452,7 +452,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this OptionsTicker. - Delta # noqa: E501 + Delta. # noqa: E501 :param delta: The delta of this OptionsTicker. # noqa: E501 :type: str @@ -464,7 +464,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this OptionsTicker. # noqa: E501 - Gamma # noqa: E501 + Gamma. # noqa: E501 :return: The gamma of this OptionsTicker. # noqa: E501 :rtype: str @@ -475,7 +475,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this OptionsTicker. - Gamma # noqa: E501 + Gamma. # noqa: E501 :param gamma: The gamma of this OptionsTicker. # noqa: E501 :type: str @@ -487,7 +487,7 @@ def gamma(self, gamma): def vega(self): """Gets the vega of this OptionsTicker. # noqa: E501 - Vega # noqa: E501 + Vega. # noqa: E501 :return: The vega of this OptionsTicker. # noqa: E501 :rtype: str @@ -498,7 +498,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this OptionsTicker. - Vega # noqa: E501 + Vega. # noqa: E501 :param vega: The vega of this OptionsTicker. # noqa: E501 :type: str @@ -510,7 +510,7 @@ def vega(self, vega): def theta(self): """Gets the theta of this OptionsTicker. # noqa: E501 - Theta # noqa: E501 + Theta. # noqa: E501 :return: The theta of this OptionsTicker. # noqa: E501 :rtype: str @@ -521,7 +521,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this OptionsTicker. - Theta # noqa: E501 + Theta. # noqa: E501 :param theta: The theta of this OptionsTicker. # noqa: E501 :type: str @@ -533,7 +533,7 @@ def theta(self, theta): def rho(self): """Gets the rho of this OptionsTicker. # noqa: E501 - Rho # noqa: E501 + Rho. # noqa: E501 :return: The rho of this OptionsTicker. # noqa: E501 :rtype: str @@ -544,7 +544,7 @@ def rho(self): def rho(self, rho): """Sets the rho of this OptionsTicker. - Rho # noqa: E501 + Rho. # noqa: E501 :param rho: The rho of this OptionsTicker. # noqa: E501 :type: str diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py index 6ea7446..45d86f5 100644 --- a/gate_api/models/options_underlying.py +++ b/gate_api/models/options_underlying.py @@ -62,7 +62,7 @@ def __init__(self, name=None, index_price=None, local_vars_configuration=None): def name(self): """Gets the name of this OptionsUnderlying. # noqa: E501 - Underlying name # noqa: E501 + Underlying name. # noqa: E501 :return: The name of this OptionsUnderlying. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def name(self): def name(self, name): """Sets the name of this OptionsUnderlying. - Underlying name # noqa: E501 + Underlying name. # noqa: E501 :param name: The name of this OptionsUnderlying. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def name(self, name): def index_price(self): """Gets the index_price of this OptionsUnderlying. # noqa: E501 - Spot index price (quote currency) # noqa: E501 + Spot index price (quote currency). # noqa: E501 :return: The index_price of this OptionsUnderlying. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsUnderlying. - Spot index price (quote currency) # noqa: E501 + Spot index price (quote currency). # noqa: E501 :param index_price: The index_price of this OptionsUnderlying. # noqa: E501 :type: str diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py index 8b6b94d..0a4683a 100644 --- a/gate_api/models/options_underlying_ticker.py +++ b/gate_api/models/options_underlying_ticker.py @@ -67,7 +67,7 @@ def __init__(self, trade_put=None, trade_call=None, index_price=None, local_vars def trade_put(self): """Gets the trade_put of this OptionsUnderlyingTicker. # noqa: E501 - Total put options trades amount in last 24h # noqa: E501 + Total put options trades amount in last 24h. # noqa: E501 :return: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def trade_put(self): def trade_put(self, trade_put): """Sets the trade_put of this OptionsUnderlyingTicker. - Total put options trades amount in last 24h # noqa: E501 + Total put options trades amount in last 24h. # noqa: E501 :param trade_put: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def trade_put(self, trade_put): def trade_call(self): """Gets the trade_call of this OptionsUnderlyingTicker. # noqa: E501 - Total call options trades amount in last 24h # noqa: E501 + Total call options trades amount in last 24h. # noqa: E501 :return: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def trade_call(self): def trade_call(self, trade_call): """Sets the trade_call of this OptionsUnderlyingTicker. - Total call options trades amount in last 24h # noqa: E501 + Total call options trades amount in last 24h. # noqa: E501 :param trade_call: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def trade_call(self, trade_call): def index_price(self): """Gets the index_price of this OptionsUnderlyingTicker. # noqa: E501 - Index price (quote currency) # noqa: E501 + Index price (quote currency). # noqa: E501 :return: The index_price of this OptionsUnderlyingTicker. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsUnderlyingTicker. - Index price (quote currency) # noqa: E501 + Index price (quote currency). # noqa: E501 :param index_price: The index_price of this OptionsUnderlyingTicker. # noqa: E501 :type: str diff --git a/gate_api/models/order.py b/gate_api/models/order.py index 02f3a93..a4aabea 100644 --- a/gate_api/models/order.py +++ b/gate_api/models/order.py @@ -229,7 +229,7 @@ def __init__(self, id=None, text=None, amend_text=None, create_time=None, update def id(self): """Gets the id of this Order. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this Order. # noqa: E501 :rtype: str @@ -240,7 +240,7 @@ def id(self): def id(self, id): """Sets the id of this Order. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this Order. # noqa: E501 :type: str @@ -275,7 +275,7 @@ def text(self, text): def amend_text(self): """Gets the amend_text of this Order. # noqa: E501 - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :return: The amend_text of this Order. # noqa: E501 :rtype: str @@ -286,7 +286,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this Order. - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :param amend_text: The amend_text of this Order. # noqa: E501 :type: str @@ -298,7 +298,7 @@ def amend_text(self, amend_text): def create_time(self): """Gets the create_time of this Order. # noqa: E501 - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :return: The create_time of this Order. # noqa: E501 :rtype: str @@ -309,7 +309,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this Order. - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :param create_time: The create_time of this Order. # noqa: E501 :type: str @@ -321,7 +321,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this Order. # noqa: E501 - Last modification time of order # noqa: E501 + Last modification time of order. # noqa: E501 :return: The update_time of this Order. # noqa: E501 :rtype: str @@ -332,7 +332,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this Order. - Last modification time of order # noqa: E501 + Last modification time of order. # noqa: E501 :param update_time: The update_time of this Order. # noqa: E501 :type: str @@ -344,7 +344,7 @@ def update_time(self, update_time): def create_time_ms(self): """Gets the create_time_ms of this Order. # noqa: E501 - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :return: The create_time_ms of this Order. # noqa: E501 :rtype: int @@ -355,7 +355,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this Order. - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :param create_time_ms: The create_time_ms of this Order. # noqa: E501 :type: int @@ -367,7 +367,7 @@ def create_time_ms(self, create_time_ms): def update_time_ms(self): """Gets the update_time_ms of this Order. # noqa: E501 - Last modification time of order (in milliseconds) # noqa: E501 + Last modification time of order (in milliseconds). # noqa: E501 :return: The update_time_ms of this Order. # noqa: E501 :rtype: int @@ -378,7 +378,7 @@ def update_time_ms(self): def update_time_ms(self, update_time_ms): """Sets the update_time_ms of this Order. - Last modification time of order (in milliseconds) # noqa: E501 + Last modification time of order (in milliseconds). # noqa: E501 :param update_time_ms: The update_time_ms of this Order. # noqa: E501 :type: int @@ -419,7 +419,7 @@ def status(self, status): def currency_pair(self): """Gets the currency_pair of this Order. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this Order. # noqa: E501 :rtype: str @@ -430,7 +430,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Order. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this Order. # noqa: E501 :type: str @@ -496,7 +496,7 @@ def account(self, account): def side(self): """Gets the side of this Order. # noqa: E501 - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :return: The side of this Order. # noqa: E501 :rtype: str @@ -507,7 +507,7 @@ def side(self): def side(self, side): """Sets the side of this Order. - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :param side: The side of this Order. # noqa: E501 :type: str @@ -527,7 +527,7 @@ def side(self, side): def amount(self): """Gets the amount of this Order. # noqa: E501 - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 :return: The amount of this Order. # noqa: E501 :rtype: str @@ -538,7 +538,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Order. - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 :param amount: The amount of this Order. # noqa: E501 :type: str @@ -552,7 +552,7 @@ def amount(self, amount): def price(self): """Gets the price of this Order. # noqa: E501 - Price can't be empty when `type`= `limit` # noqa: E501 + Price can't be empty when `type`= `limit`. # noqa: E501 :return: The price of this Order. # noqa: E501 :rtype: str @@ -563,7 +563,7 @@ def price(self): def price(self, price): """Sets the price of this Order. - Price can't be empty when `type`= `limit` # noqa: E501 + Price can't be empty when `type`= `limit`. # noqa: E501 :param price: The price of this Order. # noqa: E501 :type: str @@ -604,7 +604,7 @@ def time_in_force(self, time_in_force): def iceberg(self): """Gets the iceberg of this Order. # noqa: E501 - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 :return: The iceberg of this Order. # noqa: E501 :rtype: str @@ -615,7 +615,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this Order. - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 :param iceberg: The iceberg of this Order. # noqa: E501 :type: str @@ -673,7 +673,7 @@ def auto_repay(self, auto_repay): def left(self): """Gets the left of this Order. # noqa: E501 - Amount left to fill # noqa: E501 + Amount left to fill. # noqa: E501 :return: The left of this Order. # noqa: E501 :rtype: str @@ -684,7 +684,7 @@ def left(self): def left(self, left): """Sets the left of this Order. - Amount left to fill # noqa: E501 + Amount left to fill. # noqa: E501 :param left: The left of this Order. # noqa: E501 :type: str @@ -696,7 +696,7 @@ def left(self, left): def filled_amount(self): """Gets the filled_amount of this Order. # noqa: E501 - Amount traded to fill # noqa: E501 + Amount traded to fill. # noqa: E501 :return: The filled_amount of this Order. # noqa: E501 :rtype: str @@ -707,7 +707,7 @@ def filled_amount(self): def filled_amount(self, filled_amount): """Sets the filled_amount of this Order. - Amount traded to fill # noqa: E501 + Amount traded to fill. # noqa: E501 :param filled_amount: The filled_amount of this Order. # noqa: E501 :type: str @@ -719,7 +719,7 @@ def filled_amount(self, filled_amount): def fill_price(self): """Gets the fill_price of this Order. # noqa: E501 - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 :return: The fill_price of this Order. # noqa: E501 :rtype: str @@ -730,7 +730,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this Order. - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 :param fill_price: The fill_price of this Order. # noqa: E501 :type: str @@ -742,7 +742,7 @@ def fill_price(self, fill_price): def filled_total(self): """Gets the filled_total of this Order. # noqa: E501 - Total filled in quote currency # noqa: E501 + Total filled in quote currency. # noqa: E501 :return: The filled_total of this Order. # noqa: E501 :rtype: str @@ -753,7 +753,7 @@ def filled_total(self): def filled_total(self, filled_total): """Sets the filled_total of this Order. - Total filled in quote currency # noqa: E501 + Total filled in quote currency. # noqa: E501 :param filled_total: The filled_total of this Order. # noqa: E501 :type: str @@ -765,7 +765,7 @@ def filled_total(self, filled_total): def avg_deal_price(self): """Gets the avg_deal_price of this Order. # noqa: E501 - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :return: The avg_deal_price of this Order. # noqa: E501 :rtype: str @@ -776,7 +776,7 @@ def avg_deal_price(self): def avg_deal_price(self, avg_deal_price): """Sets the avg_deal_price of this Order. - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :param avg_deal_price: The avg_deal_price of this Order. # noqa: E501 :type: str @@ -788,7 +788,7 @@ def avg_deal_price(self, avg_deal_price): def fee(self): """Gets the fee of this Order. # noqa: E501 - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :return: The fee of this Order. # noqa: E501 :rtype: str @@ -799,7 +799,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this Order. - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :param fee: The fee of this Order. # noqa: E501 :type: str @@ -811,7 +811,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this Order. # noqa: E501 - Fee currency unit # noqa: E501 + Fee currency unit. # noqa: E501 :return: The fee_currency of this Order. # noqa: E501 :rtype: str @@ -822,7 +822,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this Order. - Fee currency unit # noqa: E501 + Fee currency unit. # noqa: E501 :param fee_currency: The fee_currency of this Order. # noqa: E501 :type: str @@ -834,7 +834,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this Order. # noqa: E501 - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :return: The point_fee of this Order. # noqa: E501 :rtype: str @@ -845,7 +845,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this Order. - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :param point_fee: The point_fee of this Order. # noqa: E501 :type: str @@ -857,7 +857,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this Order. # noqa: E501 - GT used to deduct fee # noqa: E501 + GT used to deduct fee. # noqa: E501 :return: The gt_fee of this Order. # noqa: E501 :rtype: str @@ -868,7 +868,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this Order. - GT used to deduct fee # noqa: E501 + GT used to deduct fee. # noqa: E501 :param gt_fee: The gt_fee of this Order. # noqa: E501 :type: str @@ -880,7 +880,7 @@ def gt_fee(self, gt_fee): def gt_maker_fee(self): """Gets the gt_maker_fee of this Order. # noqa: E501 - GT used to deduct maker fee # noqa: E501 + GT used to deduct maker fee. # noqa: E501 :return: The gt_maker_fee of this Order. # noqa: E501 :rtype: str @@ -891,7 +891,7 @@ def gt_maker_fee(self): def gt_maker_fee(self, gt_maker_fee): """Sets the gt_maker_fee of this Order. - GT used to deduct maker fee # noqa: E501 + GT used to deduct maker fee. # noqa: E501 :param gt_maker_fee: The gt_maker_fee of this Order. # noqa: E501 :type: str @@ -903,7 +903,7 @@ def gt_maker_fee(self, gt_maker_fee): def gt_taker_fee(self): """Gets the gt_taker_fee of this Order. # noqa: E501 - GT used to deduct taker fee # noqa: E501 + GT used to deduct taker fee. # noqa: E501 :return: The gt_taker_fee of this Order. # noqa: E501 :rtype: str @@ -914,7 +914,7 @@ def gt_taker_fee(self): def gt_taker_fee(self, gt_taker_fee): """Sets the gt_taker_fee of this Order. - GT used to deduct taker fee # noqa: E501 + GT used to deduct taker fee. # noqa: E501 :param gt_taker_fee: The gt_taker_fee of this Order. # noqa: E501 :type: str @@ -926,7 +926,7 @@ def gt_taker_fee(self, gt_taker_fee): def gt_discount(self): """Gets the gt_discount of this Order. # noqa: E501 - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :return: The gt_discount of this Order. # noqa: E501 :rtype: bool @@ -937,7 +937,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this Order. - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :param gt_discount: The gt_discount of this Order. # noqa: E501 :type: bool @@ -949,7 +949,7 @@ def gt_discount(self, gt_discount): def rebated_fee(self): """Gets the rebated_fee of this Order. # noqa: E501 - Rebated fee # noqa: E501 + Rebated fee. # noqa: E501 :return: The rebated_fee of this Order. # noqa: E501 :rtype: str @@ -960,7 +960,7 @@ def rebated_fee(self): def rebated_fee(self, rebated_fee): """Sets the rebated_fee of this Order. - Rebated fee # noqa: E501 + Rebated fee. # noqa: E501 :param rebated_fee: The rebated_fee of this Order. # noqa: E501 :type: str @@ -972,7 +972,7 @@ def rebated_fee(self, rebated_fee): def rebated_fee_currency(self): """Gets the rebated_fee_currency of this Order. # noqa: E501 - Rebated fee currency unit # noqa: E501 + Rebated fee currency unit. # noqa: E501 :return: The rebated_fee_currency of this Order. # noqa: E501 :rtype: str @@ -983,7 +983,7 @@ def rebated_fee_currency(self): def rebated_fee_currency(self, rebated_fee_currency): """Sets the rebated_fee_currency of this Order. - Rebated fee currency unit # noqa: E501 + Rebated fee currency unit. # noqa: E501 :param rebated_fee_currency: The rebated_fee_currency of this Order. # noqa: E501 :type: str @@ -1018,7 +1018,7 @@ def stp_id(self, stp_id): def stp_act(self): """Gets the stp_act of this Order. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this Order. # noqa: E501 :rtype: str @@ -1029,7 +1029,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this Order. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this Order. # noqa: E501 :type: str @@ -1047,7 +1047,7 @@ def stp_act(self, stp_act): def finish_as(self): """Gets the finish_as of this Order. # noqa: E501 - Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 + Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 :return: The finish_as of this Order. # noqa: E501 :rtype: str @@ -1058,7 +1058,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this Order. - Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order strategy because tif is set to poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 + Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown # noqa: E501 :param finish_as: The finish_as of this Order. # noqa: E501 :type: str diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py index ed15949..946e68e 100644 --- a/gate_api/models/order_book.py +++ b/gate_api/models/order_book.py @@ -98,7 +98,7 @@ def id(self, id): def current(self): """Gets the current of this OrderBook. # noqa: E501 - The timestamp of the response data being generated (in milliseconds) # noqa: E501 + The timestamp of the response data being generated (in milliseconds). # noqa: E501 :return: The current of this OrderBook. # noqa: E501 :rtype: int @@ -109,7 +109,7 @@ def current(self): def current(self, current): """Sets the current of this OrderBook. - The timestamp of the response data being generated (in milliseconds) # noqa: E501 + The timestamp of the response data being generated (in milliseconds). # noqa: E501 :param current: The current of this OrderBook. # noqa: E501 :type: int @@ -121,7 +121,7 @@ def current(self, current): def update(self): """Gets the update of this OrderBook. # noqa: E501 - The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 + The timestamp of when the orderbook last changed (in milliseconds). # noqa: E501 :return: The update of this OrderBook. # noqa: E501 :rtype: int @@ -132,7 +132,7 @@ def update(self): def update(self, update): """Sets the update of this OrderBook. - The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 + The timestamp of when the orderbook last changed (in milliseconds). # noqa: E501 :param update: The update of this OrderBook. # noqa: E501 :type: int @@ -144,7 +144,7 @@ def update(self, update): def asks(self): """Gets the asks of this OrderBook. # noqa: E501 - Asks order depth # noqa: E501 + Asks order depth. # noqa: E501 :return: The asks of this OrderBook. # noqa: E501 :rtype: list[list[str]] @@ -155,7 +155,7 @@ def asks(self): def asks(self, asks): """Sets the asks of this OrderBook. - Asks order depth # noqa: E501 + Asks order depth. # noqa: E501 :param asks: The asks of this OrderBook. # noqa: E501 :type: list[list[str]] @@ -169,7 +169,7 @@ def asks(self, asks): def bids(self): """Gets the bids of this OrderBook. # noqa: E501 - Bids order depth # noqa: E501 + Bids order depth. # noqa: E501 :return: The bids of this OrderBook. # noqa: E501 :rtype: list[list[str]] @@ -180,7 +180,7 @@ def bids(self): def bids(self, bids): """Sets the bids of this OrderBook. - Bids order depth # noqa: E501 + Bids order depth. # noqa: E501 :param bids: The bids of this OrderBook. # noqa: E501 :type: list[list[str]] diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py index 60b34f3..9f3bd10 100644 --- a/gate_api/models/order_cancel.py +++ b/gate_api/models/order_cancel.py @@ -244,7 +244,7 @@ def __init__(self, id=None, text=None, amend_text=None, succeeded=None, label=No def id(self): """Gets the id of this OrderCancel. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this OrderCancel. # noqa: E501 :rtype: str @@ -255,7 +255,7 @@ def id(self): def id(self, id): """Sets the id of this OrderCancel. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this OrderCancel. # noqa: E501 :type: str @@ -290,7 +290,7 @@ def text(self, text): def amend_text(self): """Gets the amend_text of this OrderCancel. # noqa: E501 - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :return: The amend_text of this OrderCancel. # noqa: E501 :rtype: str @@ -301,7 +301,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this OrderCancel. - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :param amend_text: The amend_text of this OrderCancel. # noqa: E501 :type: str @@ -313,7 +313,7 @@ def amend_text(self, amend_text): def succeeded(self): """Gets the succeeded of this OrderCancel. # noqa: E501 - Whether the batch of orders succeeded # noqa: E501 + Whether the batch of orders succeeded. # noqa: E501 :return: The succeeded of this OrderCancel. # noqa: E501 :rtype: bool @@ -324,7 +324,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this OrderCancel. - Whether the batch of orders succeeded # noqa: E501 + Whether the batch of orders succeeded. # noqa: E501 :param succeeded: The succeeded of this OrderCancel. # noqa: E501 :type: bool @@ -336,7 +336,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this OrderCancel. # noqa: E501 - Error label, if any, otherwise an empty string # noqa: E501 + Error label, if any, otherwise an empty string. # noqa: E501 :return: The label of this OrderCancel. # noqa: E501 :rtype: str @@ -347,7 +347,7 @@ def label(self): def label(self, label): """Sets the label of this OrderCancel. - Error label, if any, otherwise an empty string # noqa: E501 + Error label, if any, otherwise an empty string. # noqa: E501 :param label: The label of this OrderCancel. # noqa: E501 :type: str @@ -359,7 +359,7 @@ def label(self, label): def message(self): """Gets the message of this OrderCancel. # noqa: E501 - Detailed error message, if any, otherwise an empty string # noqa: E501 + Detailed error message, if any, otherwise an empty string. # noqa: E501 :return: The message of this OrderCancel. # noqa: E501 :rtype: str @@ -370,7 +370,7 @@ def message(self): def message(self, message): """Sets the message of this OrderCancel. - Detailed error message, if any, otherwise an empty string # noqa: E501 + Detailed error message, if any, otherwise an empty string. # noqa: E501 :param message: The message of this OrderCancel. # noqa: E501 :type: str @@ -382,7 +382,7 @@ def message(self, message): def create_time(self): """Gets the create_time of this OrderCancel. # noqa: E501 - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :return: The create_time of this OrderCancel. # noqa: E501 :rtype: str @@ -393,7 +393,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OrderCancel. - Creation time of order # noqa: E501 + Creation time of order. # noqa: E501 :param create_time: The create_time of this OrderCancel. # noqa: E501 :type: str @@ -405,7 +405,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this OrderCancel. # noqa: E501 - Last modification time of order # noqa: E501 + Last modification time of order. # noqa: E501 :return: The update_time of this OrderCancel. # noqa: E501 :rtype: str @@ -416,7 +416,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this OrderCancel. - Last modification time of order # noqa: E501 + Last modification time of order. # noqa: E501 :param update_time: The update_time of this OrderCancel. # noqa: E501 :type: str @@ -428,7 +428,7 @@ def update_time(self, update_time): def create_time_ms(self): """Gets the create_time_ms of this OrderCancel. # noqa: E501 - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :return: The create_time_ms of this OrderCancel. # noqa: E501 :rtype: int @@ -439,7 +439,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this OrderCancel. - Creation time of order (in milliseconds) # noqa: E501 + Creation time of order (in milliseconds). # noqa: E501 :param create_time_ms: The create_time_ms of this OrderCancel. # noqa: E501 :type: int @@ -451,7 +451,7 @@ def create_time_ms(self, create_time_ms): def update_time_ms(self): """Gets the update_time_ms of this OrderCancel. # noqa: E501 - Last modification time of order (in milliseconds) # noqa: E501 + Last modification time of order (in milliseconds). # noqa: E501 :return: The update_time_ms of this OrderCancel. # noqa: E501 :rtype: int @@ -462,7 +462,7 @@ def update_time_ms(self): def update_time_ms(self, update_time_ms): """Sets the update_time_ms of this OrderCancel. - Last modification time of order (in milliseconds) # noqa: E501 + Last modification time of order (in milliseconds). # noqa: E501 :param update_time_ms: The update_time_ms of this OrderCancel. # noqa: E501 :type: int @@ -503,7 +503,7 @@ def status(self, status): def currency_pair(self): """Gets the currency_pair of this OrderCancel. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this OrderCancel. # noqa: E501 :rtype: str @@ -514,7 +514,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this OrderCancel. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this OrderCancel. # noqa: E501 :type: str @@ -580,7 +580,7 @@ def account(self, account): def side(self): """Gets the side of this OrderCancel. # noqa: E501 - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :return: The side of this OrderCancel. # noqa: E501 :rtype: str @@ -591,7 +591,7 @@ def side(self): def side(self, side): """Sets the side of this OrderCancel. - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :param side: The side of this OrderCancel. # noqa: E501 :type: str @@ -611,7 +611,7 @@ def side(self, side): def amount(self): """Gets the amount of this OrderCancel. # noqa: E501 - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 :return: The amount of this OrderCancel. # noqa: E501 :rtype: str @@ -622,7 +622,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this OrderCancel. - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 :param amount: The amount of this OrderCancel. # noqa: E501 :type: str @@ -636,7 +636,7 @@ def amount(self, amount): def price(self): """Gets the price of this OrderCancel. # noqa: E501 - Price can't be empty when `type`= `limit` # noqa: E501 + Price can't be empty when `type`= `limit`. # noqa: E501 :return: The price of this OrderCancel. # noqa: E501 :rtype: str @@ -647,7 +647,7 @@ def price(self): def price(self, price): """Sets the price of this OrderCancel. - Price can't be empty when `type`= `limit` # noqa: E501 + Price can't be empty when `type`= `limit`. # noqa: E501 :param price: The price of this OrderCancel. # noqa: E501 :type: str @@ -688,7 +688,7 @@ def time_in_force(self, time_in_force): def iceberg(self): """Gets the iceberg of this OrderCancel. # noqa: E501 - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 :return: The iceberg of this OrderCancel. # noqa: E501 :rtype: str @@ -699,7 +699,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this OrderCancel. - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 :param iceberg: The iceberg of this OrderCancel. # noqa: E501 :type: str @@ -757,7 +757,7 @@ def auto_repay(self, auto_repay): def left(self): """Gets the left of this OrderCancel. # noqa: E501 - Amount left to fill # noqa: E501 + Amount left to fill. # noqa: E501 :return: The left of this OrderCancel. # noqa: E501 :rtype: str @@ -768,7 +768,7 @@ def left(self): def left(self, left): """Sets the left of this OrderCancel. - Amount left to fill # noqa: E501 + Amount left to fill. # noqa: E501 :param left: The left of this OrderCancel. # noqa: E501 :type: str @@ -780,7 +780,7 @@ def left(self, left): def filled_amount(self): """Gets the filled_amount of this OrderCancel. # noqa: E501 - Amount traded to fill # noqa: E501 + Amount traded to fill. # noqa: E501 :return: The filled_amount of this OrderCancel. # noqa: E501 :rtype: str @@ -791,7 +791,7 @@ def filled_amount(self): def filled_amount(self, filled_amount): """Sets the filled_amount of this OrderCancel. - Amount traded to fill # noqa: E501 + Amount traded to fill. # noqa: E501 :param filled_amount: The filled_amount of this OrderCancel. # noqa: E501 :type: str @@ -803,7 +803,7 @@ def filled_amount(self, filled_amount): def fill_price(self): """Gets the fill_price of this OrderCancel. # noqa: E501 - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 :return: The fill_price of this OrderCancel. # noqa: E501 :rtype: str @@ -814,7 +814,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this OrderCancel. - Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 :param fill_price: The fill_price of this OrderCancel. # noqa: E501 :type: str @@ -826,7 +826,7 @@ def fill_price(self, fill_price): def filled_total(self): """Gets the filled_total of this OrderCancel. # noqa: E501 - Total filled in quote currency # noqa: E501 + Total filled in quote currency. # noqa: E501 :return: The filled_total of this OrderCancel. # noqa: E501 :rtype: str @@ -837,7 +837,7 @@ def filled_total(self): def filled_total(self, filled_total): """Sets the filled_total of this OrderCancel. - Total filled in quote currency # noqa: E501 + Total filled in quote currency. # noqa: E501 :param filled_total: The filled_total of this OrderCancel. # noqa: E501 :type: str @@ -849,7 +849,7 @@ def filled_total(self, filled_total): def avg_deal_price(self): """Gets the avg_deal_price of this OrderCancel. # noqa: E501 - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :return: The avg_deal_price of this OrderCancel. # noqa: E501 :rtype: str @@ -860,7 +860,7 @@ def avg_deal_price(self): def avg_deal_price(self, avg_deal_price): """Sets the avg_deal_price of this OrderCancel. - Average fill price # noqa: E501 + Average fill price. # noqa: E501 :param avg_deal_price: The avg_deal_price of this OrderCancel. # noqa: E501 :type: str @@ -872,7 +872,7 @@ def avg_deal_price(self, avg_deal_price): def fee(self): """Gets the fee of this OrderCancel. # noqa: E501 - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :return: The fee of this OrderCancel. # noqa: E501 :rtype: str @@ -883,7 +883,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this OrderCancel. - Fee deducted # noqa: E501 + Fee deducted. # noqa: E501 :param fee: The fee of this OrderCancel. # noqa: E501 :type: str @@ -895,7 +895,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this OrderCancel. # noqa: E501 - Fee currency unit # noqa: E501 + Fee currency unit. # noqa: E501 :return: The fee_currency of this OrderCancel. # noqa: E501 :rtype: str @@ -906,7 +906,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this OrderCancel. - Fee currency unit # noqa: E501 + Fee currency unit. # noqa: E501 :param fee_currency: The fee_currency of this OrderCancel. # noqa: E501 :type: str @@ -918,7 +918,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this OrderCancel. # noqa: E501 - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :return: The point_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -929,7 +929,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this OrderCancel. - Points used to deduct fee # noqa: E501 + Points used to deduct fee. # noqa: E501 :param point_fee: The point_fee of this OrderCancel. # noqa: E501 :type: str @@ -941,7 +941,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this OrderCancel. # noqa: E501 - GT used to deduct fee # noqa: E501 + GT used to deduct fee. # noqa: E501 :return: The gt_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -952,7 +952,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this OrderCancel. - GT used to deduct fee # noqa: E501 + GT used to deduct fee. # noqa: E501 :param gt_fee: The gt_fee of this OrderCancel. # noqa: E501 :type: str @@ -964,7 +964,7 @@ def gt_fee(self, gt_fee): def gt_maker_fee(self): """Gets the gt_maker_fee of this OrderCancel. # noqa: E501 - GT used to deduct maker fee # noqa: E501 + GT used to deduct maker fee. # noqa: E501 :return: The gt_maker_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -975,7 +975,7 @@ def gt_maker_fee(self): def gt_maker_fee(self, gt_maker_fee): """Sets the gt_maker_fee of this OrderCancel. - GT used to deduct maker fee # noqa: E501 + GT used to deduct maker fee. # noqa: E501 :param gt_maker_fee: The gt_maker_fee of this OrderCancel. # noqa: E501 :type: str @@ -987,7 +987,7 @@ def gt_maker_fee(self, gt_maker_fee): def gt_taker_fee(self): """Gets the gt_taker_fee of this OrderCancel. # noqa: E501 - GT used to deduct taker fee # noqa: E501 + GT used to deduct taker fee. # noqa: E501 :return: The gt_taker_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -998,7 +998,7 @@ def gt_taker_fee(self): def gt_taker_fee(self, gt_taker_fee): """Sets the gt_taker_fee of this OrderCancel. - GT used to deduct taker fee # noqa: E501 + GT used to deduct taker fee. # noqa: E501 :param gt_taker_fee: The gt_taker_fee of this OrderCancel. # noqa: E501 :type: str @@ -1010,7 +1010,7 @@ def gt_taker_fee(self, gt_taker_fee): def gt_discount(self): """Gets the gt_discount of this OrderCancel. # noqa: E501 - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :return: The gt_discount of this OrderCancel. # noqa: E501 :rtype: bool @@ -1021,7 +1021,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this OrderCancel. - Whether GT fee discount is used # noqa: E501 + Whether GT fee discount is used. # noqa: E501 :param gt_discount: The gt_discount of this OrderCancel. # noqa: E501 :type: bool @@ -1033,7 +1033,7 @@ def gt_discount(self, gt_discount): def rebated_fee(self): """Gets the rebated_fee of this OrderCancel. # noqa: E501 - Rebated fee # noqa: E501 + Rebated fee. # noqa: E501 :return: The rebated_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -1044,7 +1044,7 @@ def rebated_fee(self): def rebated_fee(self, rebated_fee): """Sets the rebated_fee of this OrderCancel. - Rebated fee # noqa: E501 + Rebated fee. # noqa: E501 :param rebated_fee: The rebated_fee of this OrderCancel. # noqa: E501 :type: str @@ -1056,7 +1056,7 @@ def rebated_fee(self, rebated_fee): def rebated_fee_currency(self): """Gets the rebated_fee_currency of this OrderCancel. # noqa: E501 - Rebated fee currency unit # noqa: E501 + Rebated fee currency unit. # noqa: E501 :return: The rebated_fee_currency of this OrderCancel. # noqa: E501 :rtype: str @@ -1067,7 +1067,7 @@ def rebated_fee_currency(self): def rebated_fee_currency(self, rebated_fee_currency): """Sets the rebated_fee_currency of this OrderCancel. - Rebated fee currency unit # noqa: E501 + Rebated fee currency unit. # noqa: E501 :param rebated_fee_currency: The rebated_fee_currency of this OrderCancel. # noqa: E501 :type: str @@ -1102,7 +1102,7 @@ def stp_id(self, stp_id): def stp_act(self): """Gets the stp_act of this OrderCancel. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this OrderCancel. # noqa: E501 :rtype: str @@ -1113,7 +1113,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this OrderCancel. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this OrderCancel. # noqa: E501 :type: str diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py index abac0ce..fcba399 100644 --- a/gate_api/models/order_patch.py +++ b/gate_api/models/order_patch.py @@ -82,7 +82,7 @@ def __init__(self, currency_pair=None, account=None, amount=None, price=None, am def currency_pair(self): """Gets the currency_pair of this OrderPatch. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this OrderPatch. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this OrderPatch. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this OrderPatch. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def account(self, account): def amount(self): """Gets the amount of this OrderPatch. # noqa: E501 - Trading Quantity. Either amountor pricemust be specified # noqa: E501 + Trading Quantity. Either amountor pricemust be specified. # noqa: E501 :return: The amount of this OrderPatch. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this OrderPatch. - Trading Quantity. Either amountor pricemust be specified # noqa: E501 + Trading Quantity. Either amountor pricemust be specified. # noqa: E501 :param amount: The amount of this OrderPatch. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def amount(self, amount): def price(self): """Gets the price of this OrderPatch. # noqa: E501 - Trading Price. Either amountor pricemust be specified # noqa: E501 + Trading Price. Either amountor pricemust be specified. # noqa: E501 :return: The price of this OrderPatch. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def price(self): def price(self, price): """Sets the price of this OrderPatch. - Trading Price. Either amountor pricemust be specified # noqa: E501 + Trading Price. Either amountor pricemust be specified. # noqa: E501 :param price: The price of this OrderPatch. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this OrderPatch. # noqa: E501 - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :return: The amend_text of this OrderPatch. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this OrderPatch. - Custom info during amending order # noqa: E501 + Custom info during amending order. # noqa: E501 :param amend_text: The amend_text of this OrderPatch. # noqa: E501 :type: str diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py index 6cdd7ab..74219a0 100644 --- a/gate_api/models/order_resp.py +++ b/gate_api/models/order_resp.py @@ -57,7 +57,7 @@ def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 def order_id(self): """Gets the order_id of this OrderResp. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this OrderResp. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this OrderResp. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this OrderResp. # noqa: E501 :type: int diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py index 74050f7..87e129a 100644 --- a/gate_api/models/partner_commission_history.py +++ b/gate_api/models/partner_commission_history.py @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this PartnerCommissionHistory. # noqa: E501 - Total # noqa: E501 + Total. # noqa: E501 :return: The total of this PartnerCommissionHistory. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this PartnerCommissionHistory. - Total # noqa: E501 + Total. # noqa: E501 :param total: The total of this PartnerCommissionHistory. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this PartnerCommissionHistory. # noqa: E501 - List of comission history # noqa: E501 + List of comission history. # noqa: E501 :return: The list of this PartnerCommissionHistory. # noqa: E501 :rtype: list[AgencyCommission] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this PartnerCommissionHistory. - List of comission history # noqa: E501 + List of comission history. # noqa: E501 :param list: The list of this PartnerCommissionHistory. # noqa: E501 :type: list[AgencyCommission] diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py index 187fd3b..e2ef8fd 100644 --- a/gate_api/models/partner_sub.py +++ b/gate_api/models/partner_sub.py @@ -67,7 +67,7 @@ def __init__(self, user_id=None, user_join_time=None, type=None, local_vars_conf def user_id(self): """Gets the user_id of this PartnerSub. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this PartnerSub. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this PartnerSub. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this PartnerSub. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def user_id(self, user_id): def user_join_time(self): """Gets the user_join_time of this PartnerSub. # noqa: E501 - The time when the user joined the system, in seconds Unix timestamp # noqa: E501 + The time when the user joined the system, in seconds Unix timestamp. # noqa: E501 :return: The user_join_time of this PartnerSub. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def user_join_time(self): def user_join_time(self, user_join_time): """Sets the user_join_time of this PartnerSub. - The time when the user joined the system, in seconds Unix timestamp # noqa: E501 + The time when the user joined the system, in seconds Unix timestamp. # noqa: E501 :param user_join_time: The user_join_time of this PartnerSub. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def user_join_time(self, user_join_time): def type(self): """Gets the type of this PartnerSub. # noqa: E501 - Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) # noqa: E501 + Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer). # noqa: E501 :return: The type of this PartnerSub. # noqa: E501 :rtype: int @@ -124,7 +124,7 @@ def type(self): def type(self, type): """Sets the type of this PartnerSub. - Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) # noqa: E501 + Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer). # noqa: E501 :param type: The type of this PartnerSub. # noqa: E501 :type: int diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py index dac5f44..ef5fe38 100644 --- a/gate_api/models/partner_sub_list.py +++ b/gate_api/models/partner_sub_list.py @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this PartnerSubList. # noqa: E501 - Total # noqa: E501 + Total. # noqa: E501 :return: The total of this PartnerSubList. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this PartnerSubList. - Total # noqa: E501 + Total. # noqa: E501 :param total: The total of this PartnerSubList. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this PartnerSubList. # noqa: E501 - Subordinate list # noqa: E501 + Subordinate list. # noqa: E501 :return: The list of this PartnerSubList. # noqa: E501 :rtype: list[PartnerSub] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this PartnerSubList. - Subordinate list # noqa: E501 + Subordinate list. # noqa: E501 :param list: The list of this PartnerSubList. # noqa: E501 :type: list[PartnerSub] diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py index c60b1f3..b21c729 100644 --- a/gate_api/models/partner_transaction_history.py +++ b/gate_api/models/partner_transaction_history.py @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this PartnerTransactionHistory. # noqa: E501 - Total # noqa: E501 + Total. # noqa: E501 :return: The total of this PartnerTransactionHistory. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this PartnerTransactionHistory. - Total # noqa: E501 + Total. # noqa: E501 :param total: The total of this PartnerTransactionHistory. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this PartnerTransactionHistory. # noqa: E501 - List of transaction history # noqa: E501 + List of transaction history. # noqa: E501 :return: The list of this PartnerTransactionHistory. # noqa: E501 :rtype: list[AgencyTransaction] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this PartnerTransactionHistory. - List of transaction history # noqa: E501 + List of transaction history. # noqa: E501 :param list: The list of this PartnerTransactionHistory. # noqa: E501 :type: list[AgencyTransaction] diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py index 0a4f74e..c076441 100644 --- a/gate_api/models/patch_uni_lend.py +++ b/gate_api/models/patch_uni_lend.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, min_rate=None, local_vars_configuration=None): def currency(self): """Gets the currency of this PatchUniLend. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this PatchUniLend. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this PatchUniLend. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this PatchUniLend. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def min_rate(self): """Gets the min_rate of this PatchUniLend. # noqa: E501 - Minimum interest rate # noqa: E501 + Minimum interest rate. # noqa: E501 :return: The min_rate of this PatchUniLend. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def min_rate(self): def min_rate(self, min_rate): """Sets the min_rate of this PatchUniLend. - Minimum interest rate # noqa: E501 + Minimum interest rate. # noqa: E501 :param min_rate: The min_rate of this PatchUniLend. # 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 4541cf1..701708f 100644 --- a/gate_api/models/place_dual_investment_order.py +++ b/gate_api/models/place_dual_investment_order.py @@ -65,7 +65,7 @@ def __init__(self, plan_id=None, amount=None, text=None, local_vars_configuratio def plan_id(self): """Gets the plan_id of this PlaceDualInvestmentOrder. # noqa: E501 - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :return: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 :rtype: str @@ -76,7 +76,7 @@ def plan_id(self): def plan_id(self, plan_id): """Sets the plan_id of this PlaceDualInvestmentOrder. - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :param plan_id: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def plan_id(self, plan_id): def amount(self): """Gets the amount of this PlaceDualInvestmentOrder. # noqa: E501 - Subscription amount, mutually exclusive with the copies field # noqa: E501 + Subscription amount, mutually exclusive with the copies field. # noqa: E501 :return: The amount of this PlaceDualInvestmentOrder. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this PlaceDualInvestmentOrder. - Subscription amount, mutually exclusive with the copies field # noqa: E501 + Subscription amount, mutually exclusive with the copies field. # noqa: E501 :param amount: The amount of this PlaceDualInvestmentOrder. # noqa: E501 :type: str diff --git a/gate_api/models/position.py b/gate_api/models/position.py index f86e8a0..9195ee8 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -216,7 +216,7 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi def user(self): """Gets the user of this Position. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this Position. # noqa: E501 :rtype: int @@ -227,7 +227,7 @@ def user(self): def user(self, user): """Sets the user of this Position. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this Position. # noqa: E501 :type: int @@ -239,7 +239,7 @@ def user(self, user): def contract(self): """Gets the contract of this Position. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this Position. # noqa: E501 :rtype: str @@ -250,7 +250,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this Position. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this Position. # noqa: E501 :type: str @@ -262,7 +262,7 @@ def contract(self, contract): def size(self): """Gets the size of this Position. # noqa: E501 - Position size # noqa: E501 + Position size. # noqa: E501 :return: The size of this Position. # noqa: E501 :rtype: int @@ -273,7 +273,7 @@ def size(self): def size(self, size): """Sets the size of this Position. - Position size # noqa: E501 + Position size. # noqa: E501 :param size: The size of this Position. # noqa: E501 :type: int @@ -308,7 +308,7 @@ def leverage(self, leverage): def risk_limit(self): """Gets the risk_limit of this Position. # noqa: E501 - Position risk limit # noqa: E501 + Position risk limit. # noqa: E501 :return: The risk_limit of this Position. # noqa: E501 :rtype: str @@ -319,7 +319,7 @@ def risk_limit(self): def risk_limit(self, risk_limit): """Sets the risk_limit of this Position. - Position risk limit # noqa: E501 + Position risk limit. # noqa: E501 :param risk_limit: The risk_limit of this Position. # noqa: E501 :type: str @@ -331,7 +331,7 @@ def risk_limit(self, risk_limit): def leverage_max(self): """Gets the leverage_max of this Position. # noqa: E501 - Maximum leverage under current risk limit # noqa: E501 + Maximum leverage under current risk limit. # noqa: E501 :return: The leverage_max of this Position. # noqa: E501 :rtype: str @@ -342,7 +342,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this Position. - Maximum leverage under current risk limit # noqa: E501 + Maximum leverage under current risk limit. # noqa: E501 :param leverage_max: The leverage_max of this Position. # noqa: E501 :type: str @@ -354,7 +354,7 @@ def leverage_max(self, leverage_max): def maintenance_rate(self): """Gets the maintenance_rate of this Position. # noqa: E501 - Maintenance rate under current risk limit # noqa: E501 + Maintenance rate under current risk limit. # noqa: E501 :return: The maintenance_rate of this Position. # noqa: E501 :rtype: str @@ -365,7 +365,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this Position. - Maintenance rate under current risk limit # noqa: E501 + Maintenance rate under current risk limit. # noqa: E501 :param maintenance_rate: The maintenance_rate of this Position. # noqa: E501 :type: str @@ -377,7 +377,7 @@ def maintenance_rate(self, maintenance_rate): def value(self): """Gets the value of this Position. # noqa: E501 - Position value calculated in settlement currency # noqa: E501 + Position value calculated in settlement currency. # noqa: E501 :return: The value of this Position. # noqa: E501 :rtype: str @@ -388,7 +388,7 @@ def value(self): def value(self, value): """Sets the value of this Position. - Position value calculated in settlement currency # noqa: E501 + Position value calculated in settlement currency. # noqa: E501 :param value: The value of this Position. # noqa: E501 :type: str @@ -400,7 +400,7 @@ def value(self, value): def margin(self): """Gets the margin of this Position. # noqa: E501 - Position margin # noqa: E501 + Position margin. # noqa: E501 :return: The margin of this Position. # noqa: E501 :rtype: str @@ -411,7 +411,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this Position. - Position margin # noqa: E501 + Position margin. # noqa: E501 :param margin: The margin of this Position. # noqa: E501 :type: str @@ -423,7 +423,7 @@ def margin(self, margin): def entry_price(self): """Gets the entry_price of this Position. # noqa: E501 - Entry price # noqa: E501 + Entry price. # noqa: E501 :return: The entry_price of this Position. # noqa: E501 :rtype: str @@ -434,7 +434,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this Position. - Entry price # noqa: E501 + Entry price. # noqa: E501 :param entry_price: The entry_price of this Position. # noqa: E501 :type: str @@ -446,7 +446,7 @@ def entry_price(self, entry_price): def liq_price(self): """Gets the liq_price of this Position. # noqa: E501 - Liquidation price # noqa: E501 + Liquidation price. # noqa: E501 :return: The liq_price of this Position. # noqa: E501 :rtype: str @@ -457,7 +457,7 @@ def liq_price(self): def liq_price(self, liq_price): """Sets the liq_price of this Position. - Liquidation price # noqa: E501 + Liquidation price. # noqa: E501 :param liq_price: The liq_price of this Position. # noqa: E501 :type: str @@ -469,7 +469,7 @@ def liq_price(self, liq_price): def mark_price(self): """Gets the mark_price of this Position. # noqa: E501 - Current mark price # noqa: E501 + Current mark price. # noqa: E501 :return: The mark_price of this Position. # noqa: E501 :rtype: str @@ -480,7 +480,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this Position. - Current mark price # noqa: E501 + Current mark price. # noqa: E501 :param mark_price: The mark_price of this Position. # noqa: E501 :type: str @@ -538,7 +538,7 @@ def maintenance_margin(self, maintenance_margin): def unrealised_pnl(self): """Gets the unrealised_pnl of this Position. # noqa: E501 - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :return: The unrealised_pnl of this Position. # noqa: E501 :rtype: str @@ -549,7 +549,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this Position. - Unrealized PNL # noqa: E501 + Unrealized PNL. # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this Position. # noqa: E501 :type: str @@ -561,7 +561,7 @@ def unrealised_pnl(self, unrealised_pnl): def realised_pnl(self): """Gets the realised_pnl of this Position. # noqa: E501 - Realized PNL # noqa: E501 + Realized PNL. # noqa: E501 :return: The realised_pnl of this Position. # noqa: E501 :rtype: str @@ -572,7 +572,7 @@ def realised_pnl(self): def realised_pnl(self, realised_pnl): """Sets the realised_pnl of this Position. - Realized PNL # noqa: E501 + Realized PNL. # noqa: E501 :param realised_pnl: The realised_pnl of this Position. # noqa: E501 :type: str @@ -584,7 +584,7 @@ def realised_pnl(self, realised_pnl): def pnl_pnl(self): """Gets the pnl_pnl of this Position. # noqa: E501 - Realized PNL - Position P/L # noqa: E501 + Realized PNL - Position P/L. # noqa: E501 :return: The pnl_pnl of this Position. # noqa: E501 :rtype: str @@ -595,7 +595,7 @@ def pnl_pnl(self): def pnl_pnl(self, pnl_pnl): """Sets the pnl_pnl of this Position. - Realized PNL - Position P/L # noqa: E501 + Realized PNL - Position P/L. # noqa: E501 :param pnl_pnl: The pnl_pnl of this Position. # noqa: E501 :type: str @@ -607,7 +607,7 @@ def pnl_pnl(self, pnl_pnl): def pnl_fund(self): """Gets the pnl_fund of this Position. # noqa: E501 - Realized PNL - Funding Fees # noqa: E501 + Realized PNL - Funding Fees. # noqa: E501 :return: The pnl_fund of this Position. # noqa: E501 :rtype: str @@ -618,7 +618,7 @@ def pnl_fund(self): def pnl_fund(self, pnl_fund): """Sets the pnl_fund of this Position. - Realized PNL - Funding Fees # noqa: E501 + Realized PNL - Funding Fees. # noqa: E501 :param pnl_fund: The pnl_fund of this Position. # noqa: E501 :type: str @@ -630,7 +630,7 @@ def pnl_fund(self, pnl_fund): def pnl_fee(self): """Gets the pnl_fee of this Position. # noqa: E501 - Realized PNL - Transaction Fees # noqa: E501 + Realized PNL - Transaction Fees. # noqa: E501 :return: The pnl_fee of this Position. # noqa: E501 :rtype: str @@ -641,7 +641,7 @@ def pnl_fee(self): def pnl_fee(self, pnl_fee): """Sets the pnl_fee of this Position. - Realized PNL - Transaction Fees # noqa: E501 + Realized PNL - Transaction Fees. # noqa: E501 :param pnl_fee: The pnl_fee of this Position. # noqa: E501 :type: str @@ -653,7 +653,7 @@ def pnl_fee(self, pnl_fee): def history_pnl(self): """Gets the history_pnl of this Position. # noqa: E501 - History realized PNL # noqa: E501 + History realized PNL. # noqa: E501 :return: The history_pnl of this Position. # noqa: E501 :rtype: str @@ -664,7 +664,7 @@ def history_pnl(self): def history_pnl(self, history_pnl): """Sets the history_pnl of this Position. - History realized PNL # noqa: E501 + History realized PNL. # noqa: E501 :param history_pnl: The history_pnl of this Position. # noqa: E501 :type: str @@ -676,7 +676,7 @@ def history_pnl(self, history_pnl): def last_close_pnl(self): """Gets the last_close_pnl of this Position. # noqa: E501 - PNL of last position close # noqa: E501 + PNL of last position close. # noqa: E501 :return: The last_close_pnl of this Position. # noqa: E501 :rtype: str @@ -687,7 +687,7 @@ def last_close_pnl(self): def last_close_pnl(self, last_close_pnl): """Sets the last_close_pnl of this Position. - PNL of last position close # noqa: E501 + PNL of last position close. # noqa: E501 :param last_close_pnl: The last_close_pnl of this Position. # noqa: E501 :type: str @@ -699,7 +699,7 @@ def last_close_pnl(self, last_close_pnl): def realised_point(self): """Gets the realised_point of this Position. # noqa: E501 - Realized POINT PNL # noqa: E501 + Realized POINT PNL. # noqa: E501 :return: The realised_point of this Position. # noqa: E501 :rtype: str @@ -710,7 +710,7 @@ def realised_point(self): def realised_point(self, realised_point): """Sets the realised_point of this Position. - Realized POINT PNL # noqa: E501 + Realized POINT PNL. # noqa: E501 :param realised_point: The realised_point of this Position. # noqa: E501 :type: str @@ -722,7 +722,7 @@ def realised_point(self, realised_point): def history_point(self): """Gets the history_point of this Position. # noqa: E501 - History realized POINT PNL # noqa: E501 + History realized POINT PNL. # noqa: E501 :return: The history_point of this Position. # noqa: E501 :rtype: str @@ -733,7 +733,7 @@ def history_point(self): def history_point(self, history_point): """Sets the history_point of this Position. - History realized POINT PNL # noqa: E501 + History realized POINT PNL. # noqa: E501 :param history_point: The history_point of this Position. # noqa: E501 :type: str @@ -768,7 +768,7 @@ def adl_ranking(self, adl_ranking): def pending_orders(self): """Gets the pending_orders of this Position. # noqa: E501 - Current open orders # noqa: E501 + Current open orders. # noqa: E501 :return: The pending_orders of this Position. # noqa: E501 :rtype: int @@ -779,7 +779,7 @@ def pending_orders(self): def pending_orders(self, pending_orders): """Sets the pending_orders of this Position. - Current open orders # noqa: E501 + Current open orders. # noqa: E501 :param pending_orders: The pending_orders of this Position. # noqa: E501 :type: int @@ -812,7 +812,7 @@ def close_order(self, close_order): def mode(self): """Gets the mode of this Position. # noqa: E501 - Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501 + Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: mode # noqa: E501 :return: The mode of this Position. # noqa: E501 :rtype: str @@ -823,7 +823,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this Position. - Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode # noqa: E501 + Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: mode # noqa: E501 :param mode: The mode of this Position. # noqa: E501 :type: str @@ -841,7 +841,7 @@ def mode(self, mode): def cross_leverage_limit(self): """Gets the cross_leverage_limit of this Position. # noqa: E501 - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 :return: The cross_leverage_limit of this Position. # noqa: E501 :rtype: str @@ -852,7 +852,7 @@ def cross_leverage_limit(self): def cross_leverage_limit(self, cross_leverage_limit): """Sets the cross_leverage_limit of this Position. - Cross margin leverage(valid only when `leverage` is 0) # noqa: E501 + Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 :param cross_leverage_limit: The cross_leverage_limit of this Position. # noqa: E501 :type: str @@ -864,7 +864,7 @@ def cross_leverage_limit(self, cross_leverage_limit): def update_time(self): """Gets the update_time of this Position. # noqa: E501 - Last update time # noqa: E501 + Last update time. # noqa: E501 :return: The update_time of this Position. # noqa: E501 :rtype: int @@ -875,7 +875,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this Position. - Last update time # noqa: E501 + Last update time. # noqa: E501 :param update_time: The update_time of this Position. # noqa: E501 :type: int @@ -910,7 +910,7 @@ def update_id(self, update_id): def open_time(self): """Gets the open_time of this Position. # noqa: E501 - First Open Time # noqa: E501 + First Open Time. # noqa: E501 :return: The open_time of this Position. # noqa: E501 :rtype: int @@ -921,7 +921,7 @@ def open_time(self): def open_time(self, open_time): """Sets the open_time of this Position. - First Open Time # noqa: E501 + First Open Time. # noqa: E501 :param open_time: The open_time of this Position. # noqa: E501 :type: int @@ -933,7 +933,7 @@ def open_time(self, open_time): def risk_limit_table(self): """Gets the risk_limit_table of this Position. # noqa: E501 - Risk limit table ID # noqa: E501 + Risk limit table ID. # noqa: E501 :return: The risk_limit_table of this Position. # noqa: E501 :rtype: str @@ -944,7 +944,7 @@ def risk_limit_table(self): def risk_limit_table(self, risk_limit_table): """Sets the risk_limit_table of this Position. - Risk limit table ID # noqa: E501 + Risk limit table ID. # noqa: E501 :param risk_limit_table: The risk_limit_table of this Position. # noqa: E501 :type: str @@ -956,7 +956,7 @@ def risk_limit_table(self, risk_limit_table): def average_maintenance_rate(self): """Gets the average_maintenance_rate of this Position. # noqa: E501 - Average maintenance margin rate # noqa: E501 + Average maintenance margin rate. # noqa: E501 :return: The average_maintenance_rate of this Position. # noqa: E501 :rtype: str @@ -967,7 +967,7 @@ def average_maintenance_rate(self): def average_maintenance_rate(self, average_maintenance_rate): """Sets the average_maintenance_rate of this Position. - Average maintenance margin rate # noqa: E501 + Average maintenance margin rate. # noqa: E501 :param average_maintenance_rate: The average_maintenance_rate of this Position. # noqa: E501 :type: str diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py index 8791fd2..95c4614 100644 --- a/gate_api/models/position_close.py +++ b/gate_api/models/position_close.py @@ -117,7 +117,7 @@ def __init__(self, time=None, contract=None, side=None, pnl=None, pnl_pnl=None, def time(self): """Gets the time of this PositionClose. # noqa: E501 - Position close time # noqa: E501 + Position close time. # noqa: E501 :return: The time of this PositionClose. # noqa: E501 :rtype: float @@ -128,7 +128,7 @@ def time(self): def time(self, time): """Sets the time of this PositionClose. - Position close time # noqa: E501 + Position close time. # noqa: E501 :param time: The time of this PositionClose. # noqa: E501 :type: float @@ -140,7 +140,7 @@ def time(self, time): def contract(self): """Gets the contract of this PositionClose. # noqa: E501 - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :return: The contract of this PositionClose. # noqa: E501 :rtype: str @@ -151,7 +151,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this PositionClose. - Futures contract # noqa: E501 + Futures contract. # noqa: E501 :param contract: The contract of this PositionClose. # noqa: E501 :type: str @@ -163,7 +163,7 @@ def contract(self, contract): def side(self): """Gets the side of this PositionClose. # noqa: E501 - Position side, long or short # noqa: E501 + Position side, long or short. # noqa: E501 :return: The side of this PositionClose. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def side(self): def side(self, side): """Sets the side of this PositionClose. - Position side, long or short # noqa: E501 + Position side, long or short. # noqa: E501 :param side: The side of this PositionClose. # noqa: E501 :type: str @@ -192,7 +192,7 @@ def side(self, side): def pnl(self): """Gets the pnl of this PositionClose. # noqa: E501 - PNL # noqa: E501 + PNL. # noqa: E501 :return: The pnl of this PositionClose. # noqa: E501 :rtype: str @@ -203,7 +203,7 @@ def pnl(self): def pnl(self, pnl): """Sets the pnl of this PositionClose. - PNL # noqa: E501 + PNL. # noqa: E501 :param pnl: The pnl of this PositionClose. # noqa: E501 :type: str @@ -215,7 +215,7 @@ def pnl(self, pnl): def pnl_pnl(self): """Gets the pnl_pnl of this PositionClose. # noqa: E501 - PNL - Position P/L # noqa: E501 + PNL - Position P/L. # noqa: E501 :return: The pnl_pnl of this PositionClose. # noqa: E501 :rtype: str @@ -226,7 +226,7 @@ def pnl_pnl(self): def pnl_pnl(self, pnl_pnl): """Sets the pnl_pnl of this PositionClose. - PNL - Position P/L # noqa: E501 + PNL - Position P/L. # noqa: E501 :param pnl_pnl: The pnl_pnl of this PositionClose. # noqa: E501 :type: str @@ -238,7 +238,7 @@ def pnl_pnl(self, pnl_pnl): def pnl_fund(self): """Gets the pnl_fund of this PositionClose. # noqa: E501 - PNL - Funding Fees # noqa: E501 + PNL - Funding Fees. # noqa: E501 :return: The pnl_fund of this PositionClose. # noqa: E501 :rtype: str @@ -249,7 +249,7 @@ def pnl_fund(self): def pnl_fund(self, pnl_fund): """Sets the pnl_fund of this PositionClose. - PNL - Funding Fees # noqa: E501 + PNL - Funding Fees. # noqa: E501 :param pnl_fund: The pnl_fund of this PositionClose. # noqa: E501 :type: str @@ -261,7 +261,7 @@ def pnl_fund(self, pnl_fund): def pnl_fee(self): """Gets the pnl_fee of this PositionClose. # noqa: E501 - PNL - Transaction Fees # noqa: E501 + PNL - Transaction Fees. # noqa: E501 :return: The pnl_fee of this PositionClose. # noqa: E501 :rtype: str @@ -272,7 +272,7 @@ def pnl_fee(self): def pnl_fee(self, pnl_fee): """Sets the pnl_fee of this PositionClose. - PNL - Transaction Fees # noqa: E501 + PNL - Transaction Fees. # noqa: E501 :param pnl_fee: The pnl_fee of this PositionClose. # noqa: E501 :type: str @@ -284,7 +284,7 @@ def pnl_fee(self, pnl_fee): def text(self): """Gets the text of this PositionClose. # noqa: E501 - Text of close order # noqa: E501 + Text of close order. # noqa: E501 :return: The text of this PositionClose. # noqa: E501 :rtype: str @@ -295,7 +295,7 @@ def text(self): def text(self, text): """Sets the text of this PositionClose. - Text of close order # noqa: E501 + Text of close order. # noqa: E501 :param text: The text of this PositionClose. # noqa: E501 :type: str @@ -307,7 +307,7 @@ def text(self, text): def max_size(self): """Gets the max_size of this PositionClose. # noqa: E501 - Max Trade Size # noqa: E501 + Max Trade Size. # noqa: E501 :return: The max_size of this PositionClose. # noqa: E501 :rtype: str @@ -318,7 +318,7 @@ def max_size(self): def max_size(self, max_size): """Sets the max_size of this PositionClose. - Max Trade Size # noqa: E501 + Max Trade Size. # noqa: E501 :param max_size: The max_size of this PositionClose. # noqa: E501 :type: str @@ -330,7 +330,7 @@ def max_size(self, max_size): def accum_size(self): """Gets the accum_size of this PositionClose. # noqa: E501 - Cumulative closed position volume # noqa: E501 + Cumulative closed position volume. # noqa: E501 :return: The accum_size of this PositionClose. # noqa: E501 :rtype: str @@ -341,7 +341,7 @@ def accum_size(self): def accum_size(self, accum_size): """Sets the accum_size of this PositionClose. - Cumulative closed position volume # noqa: E501 + Cumulative closed position volume. # noqa: E501 :param accum_size: The accum_size of this PositionClose. # noqa: E501 :type: str @@ -353,7 +353,7 @@ def accum_size(self, accum_size): def first_open_time(self): """Gets the first_open_time of this PositionClose. # noqa: E501 - First Open Time # noqa: E501 + First Open Time. # noqa: E501 :return: The first_open_time of this PositionClose. # noqa: E501 :rtype: int @@ -364,7 +364,7 @@ def first_open_time(self): def first_open_time(self, first_open_time): """Sets the first_open_time of this PositionClose. - First Open Time # noqa: E501 + First Open Time. # noqa: E501 :param first_open_time: The first_open_time of this PositionClose. # noqa: E501 :type: int @@ -376,7 +376,7 @@ def first_open_time(self, first_open_time): def long_price(self): """Gets the long_price of this PositionClose. # noqa: E501 - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. # noqa: E501 + When 'side' is 'long,' it indicates the opening average price; when closing average price. # noqa: E501 :return: The long_price of this PositionClose. # noqa: E501 :rtype: str @@ -387,7 +387,7 @@ def long_price(self): def long_price(self, long_price): """Sets the long_price of this PositionClose. - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price. # noqa: E501 + When 'side' is 'long,' it indicates the opening average price; when closing average price. # noqa: E501 :param long_price: The long_price of this PositionClose. # noqa: E501 :type: str @@ -399,7 +399,7 @@ def long_price(self, long_price): def short_price(self): """Gets the short_price of this PositionClose. # noqa: E501 - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price # noqa: E501 + When 'side' is 'long,' it indicates the opening average price; when closing average price # noqa: E501 :return: The short_price of this PositionClose. # noqa: E501 :rtype: str @@ -410,7 +410,7 @@ def short_price(self): def short_price(self, short_price): """Sets the short_price of this PositionClose. - When 'side' is 'long,' it indicates the opening average price; when 'side' is 'short,' it indicates the closing average price # noqa: E501 + When 'side' is 'long,' it indicates the opening average price; when closing average price # noqa: E501 :param short_price: The short_price of this PositionClose. # noqa: E501 :type: str diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py index 3046426..cc975f5 100644 --- a/gate_api/models/position_close_order.py +++ b/gate_api/models/position_close_order.py @@ -67,7 +67,7 @@ def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=No def id(self): """Gets the id of this PositionCloseOrder. # noqa: E501 - Close order ID # noqa: E501 + Close order ID. # noqa: E501 :return: The id of this PositionCloseOrder. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def id(self): def id(self, id): """Sets the id of this PositionCloseOrder. - Close order ID # noqa: E501 + Close order ID. # noqa: E501 :param id: The id of this PositionCloseOrder. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def id(self, id): def price(self): """Gets the price of this PositionCloseOrder. # noqa: E501 - Close order price # noqa: E501 + Close order price. # noqa: E501 :return: The price of this PositionCloseOrder. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def price(self): def price(self, price): """Sets the price of this PositionCloseOrder. - Close order price # noqa: E501 + Close order price. # noqa: E501 :param price: The price of this PositionCloseOrder. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def price(self, price): def is_liq(self): """Gets the is_liq of this PositionCloseOrder. # noqa: E501 - Is the close order from liquidation # noqa: E501 + Is the close order from liquidation. # noqa: E501 :return: The is_liq of this PositionCloseOrder. # noqa: E501 :rtype: bool @@ -124,7 +124,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this PositionCloseOrder. - Is the close order from liquidation # noqa: E501 + Is the close order from liquidation. # noqa: E501 :param is_liq: The is_liq of this PositionCloseOrder. # noqa: E501 :type: bool diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py index e577c82..b5566c3 100644 --- a/gate_api/models/profit_loss_range.py +++ b/gate_api/models/profit_loss_range.py @@ -67,7 +67,7 @@ def __init__(self, price_percentage=None, implied_volatility_percentage=None, pr def price_percentage(self): """Gets the price_percentage of this ProfitLossRange. # noqa: E501 - Percentage change in price # noqa: E501 + Percentage change in price. # noqa: E501 :return: The price_percentage of this ProfitLossRange. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def price_percentage(self): def price_percentage(self, price_percentage): """Sets the price_percentage of this ProfitLossRange. - Percentage change in price # noqa: E501 + Percentage change in price. # noqa: E501 :param price_percentage: The price_percentage of this ProfitLossRange. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def price_percentage(self, price_percentage): def implied_volatility_percentage(self): """Gets the implied_volatility_percentage of this ProfitLossRange. # noqa: E501 - Percentage change in implied volatility # noqa: E501 + Percentage change in implied volatility. # noqa: E501 :return: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def implied_volatility_percentage(self): def implied_volatility_percentage(self, implied_volatility_percentage): """Sets the implied_volatility_percentage of this ProfitLossRange. - Percentage change in implied volatility # noqa: E501 + Percentage change in implied volatility. # noqa: E501 :param implied_volatility_percentage: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def implied_volatility_percentage(self, implied_volatility_percentage): def profit_loss(self): """Gets the profit_loss of this ProfitLossRange. # noqa: E501 - PNL # noqa: E501 + PNL. # noqa: E501 :return: The profit_loss of this ProfitLossRange. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def profit_loss(self): def profit_loss(self, profit_loss): """Sets the profit_loss of this ProfitLossRange. - PNL # noqa: E501 + PNL. # noqa: E501 :param profit_loss: The profit_loss of this ProfitLossRange. # noqa: E501 :type: str diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py index 23c9371..a9ed683 100644 --- a/gate_api/models/rebate_user_info.py +++ b/gate_api/models/rebate_user_info.py @@ -57,7 +57,7 @@ def __init__(self, invite_uid=None, local_vars_configuration=None): # noqa: E50 def invite_uid(self): """Gets the invite_uid of this RebateUserInfo. # noqa: E501 - My inviter's UID # noqa: E501 + My inviter's UID. # noqa: E501 :return: The invite_uid of this RebateUserInfo. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def invite_uid(self): def invite_uid(self, invite_uid): """Sets the invite_uid of this RebateUserInfo. - My inviter's UID # noqa: E501 + My inviter's UID. # noqa: E501 :param invite_uid: The invite_uid of this RebateUserInfo. # noqa: E501 :type: int diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py index ac6a5bb..1137fa0 100644 --- a/gate_api/models/repay_currency_res.py +++ b/gate_api/models/repay_currency_res.py @@ -82,7 +82,7 @@ def __init__(self, succeeded=None, label=None, message=None, currency=None, repa def succeeded(self): """Gets the succeeded of this RepayCurrencyRes. # noqa: E501 - Has the repayment been successful # noqa: E501 + Has the repayment been successful. # noqa: E501 :return: The succeeded of this RepayCurrencyRes. # noqa: E501 :rtype: bool @@ -93,7 +93,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this RepayCurrencyRes. - Has the repayment been successful # noqa: E501 + Has the repayment been successful. # noqa: E501 :param succeeded: The succeeded of this RepayCurrencyRes. # noqa: E501 :type: bool @@ -151,7 +151,7 @@ def message(self, message): def currency(self): """Gets the currency of this RepayCurrencyRes. # noqa: E501 - Repayment currency # noqa: E501 + Repayment currency. # noqa: E501 :return: The currency of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayCurrencyRes. - Repayment currency # noqa: E501 + Repayment currency. # noqa: E501 :param currency: The currency of this RepayCurrencyRes. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def currency(self, currency): def repaid_principal(self): """Gets the repaid_principal of this RepayCurrencyRes. # noqa: E501 - Principal # noqa: E501 + Principal. # noqa: E501 :return: The repaid_principal of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this RepayCurrencyRes. - Principal # noqa: E501 + Principal. # noqa: E501 :param repaid_principal: The repaid_principal of this RepayCurrencyRes. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this RepayCurrencyRes. # noqa: E501 - Principal # noqa: E501 + Principal. # noqa: E501 :return: The repaid_interest of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this RepayCurrencyRes. - Principal # noqa: E501 + Principal. # noqa: E501 :param repaid_interest: The repaid_interest of this RepayCurrencyRes. # noqa: E501 :type: str diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py index ff22c97..c683b0a 100644 --- a/gate_api/models/repay_loan.py +++ b/gate_api/models/repay_loan.py @@ -64,7 +64,7 @@ def __init__(self, order_id=None, repay_amount=None, repaid_all=None, local_vars def order_id(self): """Gets the order_id of this RepayLoan. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this RepayLoan. # noqa: E501 :rtype: int @@ -75,7 +75,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this RepayLoan. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this RepayLoan. # noqa: E501 :type: int @@ -89,7 +89,7 @@ def order_id(self, order_id): def repay_amount(self): """Gets the repay_amount of this RepayLoan. # noqa: E501 - Repayment amount, it is mandatory when making partial repayments # noqa: E501 + Repayment amount, it is mandatory when making partial repayments. # noqa: E501 :return: The repay_amount of this RepayLoan. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def repay_amount(self): def repay_amount(self, repay_amount): """Sets the repay_amount of this RepayLoan. - Repayment amount, it is mandatory when making partial repayments # noqa: E501 + Repayment amount, it is mandatory when making partial repayments. # noqa: E501 :param repay_amount: The repay_amount of this RepayLoan. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def repay_amount(self, repay_amount): def repaid_all(self): """Gets the repaid_all of this RepayLoan. # noqa: E501 - Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 + Repayment method, set to `true` for full repayment, and `false` for partial repayment; When partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 :return: The repaid_all of this RepayLoan. # noqa: E501 :rtype: bool @@ -125,7 +125,7 @@ def repaid_all(self): def repaid_all(self, repaid_all): """Sets the repaid_all of this RepayLoan. - Repayment method, set to `true` for full repayment, and `false` for partial repayment; When set to false for partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 + Repayment method, set to `true` for full repayment, and `false` for partial repayment; When partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. # noqa: E501 :param repaid_all: The repaid_all of this RepayLoan. # noqa: E501 :type: bool diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py index b687b14..9052f77 100644 --- a/gate_api/models/repay_multi_loan.py +++ b/gate_api/models/repay_multi_loan.py @@ -60,7 +60,7 @@ def __init__(self, order_id=None, repay_items=None, local_vars_configuration=Non def order_id(self): """Gets the order_id of this RepayMultiLoan. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this RepayMultiLoan. # noqa: E501 :rtype: int @@ -71,7 +71,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this RepayMultiLoan. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this RepayMultiLoan. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def order_id(self, order_id): def repay_items(self): """Gets the repay_items of this RepayMultiLoan. # noqa: E501 - Repay Currency Item # noqa: E501 + Repay Currency Item. # noqa: E501 :return: The repay_items of this RepayMultiLoan. # noqa: E501 :rtype: list[MultiLoanRepayItem] @@ -96,7 +96,7 @@ def repay_items(self): def repay_items(self, repay_items): """Sets the repay_items of this RepayMultiLoan. - Repay Currency Item # noqa: E501 + Repay Currency Item. # noqa: E501 :param repay_items: The repay_items of this RepayMultiLoan. # noqa: E501 :type: list[MultiLoanRepayItem] diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py index 86829ad..37e3b9c 100644 --- a/gate_api/models/repay_record.py +++ b/gate_api/models/repay_record.py @@ -117,7 +117,7 @@ def __init__(self, order_id=None, record_id=None, repaid_amount=None, borrow_cur def order_id(self): """Gets the order_id of this RepayRecord. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The order_id of this RepayRecord. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this RepayRecord. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param order_id: The order_id of this RepayRecord. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this RepayRecord. # noqa: E501 - Repayment record ID # noqa: E501 + Repayment record ID. # noqa: E501 :return: The record_id of this RepayRecord. # noqa: E501 :rtype: int @@ -151,7 +151,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this RepayRecord. - Repayment record ID # noqa: E501 + Repayment record ID. # noqa: E501 :param record_id: The record_id of this RepayRecord. # noqa: E501 :type: int @@ -163,7 +163,7 @@ def record_id(self, record_id): def repaid_amount(self): """Gets the repaid_amount of this RepayRecord. # noqa: E501 - Repayment amount # noqa: E501 + Repayment amount. # noqa: E501 :return: The repaid_amount of this RepayRecord. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def repaid_amount(self): def repaid_amount(self, repaid_amount): """Sets the repaid_amount of this RepayRecord. - Repayment amount # noqa: E501 + Repayment amount. # noqa: E501 :param repaid_amount: The repaid_amount of this RepayRecord. # noqa: E501 :type: str @@ -186,7 +186,7 @@ def repaid_amount(self, repaid_amount): def borrow_currency(self): """Gets the borrow_currency of this RepayRecord. # noqa: E501 - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :return: The borrow_currency of this RepayRecord. # noqa: E501 :rtype: str @@ -197,7 +197,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this RepayRecord. - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :param borrow_currency: The borrow_currency of this RepayRecord. # noqa: E501 :type: str @@ -209,7 +209,7 @@ def borrow_currency(self, borrow_currency): def collateral_currency(self): """Gets the collateral_currency of this RepayRecord. # noqa: E501 - Collateral # noqa: E501 + Collateral. # noqa: E501 :return: The collateral_currency of this RepayRecord. # noqa: E501 :rtype: str @@ -220,7 +220,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this RepayRecord. - Collateral # noqa: E501 + Collateral. # noqa: E501 :param collateral_currency: The collateral_currency of this RepayRecord. # noqa: E501 :type: str @@ -232,7 +232,7 @@ def collateral_currency(self, collateral_currency): def init_ltv(self): """Gets the init_ltv of this RepayRecord. # noqa: E501 - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :return: The init_ltv of this RepayRecord. # noqa: E501 :rtype: str @@ -243,7 +243,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this RepayRecord. - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :param init_ltv: The init_ltv of this RepayRecord. # noqa: E501 :type: str @@ -255,7 +255,7 @@ def init_ltv(self, init_ltv): def borrow_time(self): """Gets the borrow_time of this RepayRecord. # noqa: E501 - Borrowing time, timestamp # noqa: E501 + Borrowing time, timestamp. # noqa: E501 :return: The borrow_time of this RepayRecord. # noqa: E501 :rtype: int @@ -266,7 +266,7 @@ def borrow_time(self): def borrow_time(self, borrow_time): """Sets the borrow_time of this RepayRecord. - Borrowing time, timestamp # noqa: E501 + Borrowing time, timestamp. # noqa: E501 :param borrow_time: The borrow_time of this RepayRecord. # noqa: E501 :type: int @@ -278,7 +278,7 @@ def borrow_time(self, borrow_time): def repay_time(self): """Gets the repay_time of this RepayRecord. # noqa: E501 - Repayment time, timestamp # noqa: E501 + Repayment time, timestamp. # noqa: E501 :return: The repay_time of this RepayRecord. # noqa: E501 :rtype: int @@ -289,7 +289,7 @@ def repay_time(self): def repay_time(self, repay_time): """Sets the repay_time of this RepayRecord. - Repayment time, timestamp # noqa: E501 + Repayment time, timestamp. # noqa: E501 :param repay_time: The repay_time of this RepayRecord. # noqa: E501 :type: int @@ -301,7 +301,7 @@ def repay_time(self, repay_time): def total_interest(self): """Gets the total_interest of this RepayRecord. # noqa: E501 - Total interest # noqa: E501 + Total interest. # noqa: E501 :return: The total_interest of this RepayRecord. # noqa: E501 :rtype: str @@ -312,7 +312,7 @@ def total_interest(self): def total_interest(self, total_interest): """Sets the total_interest of this RepayRecord. - Total interest # noqa: E501 + Total interest. # noqa: E501 :param total_interest: The total_interest of this RepayRecord. # noqa: E501 :type: str @@ -324,7 +324,7 @@ def total_interest(self, total_interest): def before_left_principal(self): """Gets the before_left_principal of this RepayRecord. # noqa: E501 - Principal to be repaid before repayment # noqa: E501 + Principal to be repaid before repayment. # noqa: E501 :return: The before_left_principal of this RepayRecord. # noqa: E501 :rtype: str @@ -335,7 +335,7 @@ def before_left_principal(self): def before_left_principal(self, before_left_principal): """Sets the before_left_principal of this RepayRecord. - Principal to be repaid before repayment # noqa: E501 + Principal to be repaid before repayment. # noqa: E501 :param before_left_principal: The before_left_principal of this RepayRecord. # noqa: E501 :type: str @@ -347,7 +347,7 @@ def before_left_principal(self, before_left_principal): def after_left_principal(self): """Gets the after_left_principal of this RepayRecord. # noqa: E501 - Principal to be repaid after repayment # noqa: E501 + Principal to be repaid after repayment. # noqa: E501 :return: The after_left_principal of this RepayRecord. # noqa: E501 :rtype: str @@ -358,7 +358,7 @@ def after_left_principal(self): def after_left_principal(self, after_left_principal): """Sets the after_left_principal of this RepayRecord. - Principal to be repaid after repayment # noqa: E501 + Principal to be repaid after repayment. # noqa: E501 :param after_left_principal: The after_left_principal of this RepayRecord. # noqa: E501 :type: str @@ -370,7 +370,7 @@ def after_left_principal(self, after_left_principal): def before_left_collateral(self): """Gets the before_left_collateral of this RepayRecord. # noqa: E501 - Collateral quantity before repayment # noqa: E501 + Collateral quantity before repayment. # noqa: E501 :return: The before_left_collateral of this RepayRecord. # noqa: E501 :rtype: str @@ -381,7 +381,7 @@ def before_left_collateral(self): def before_left_collateral(self, before_left_collateral): """Sets the before_left_collateral of this RepayRecord. - Collateral quantity before repayment # noqa: E501 + Collateral quantity before repayment. # noqa: E501 :param before_left_collateral: The before_left_collateral of this RepayRecord. # noqa: E501 :type: str @@ -393,7 +393,7 @@ def before_left_collateral(self, before_left_collateral): def after_left_collateral(self): """Gets the after_left_collateral of this RepayRecord. # noqa: E501 - Collateral quantity after repayment # noqa: E501 + Collateral quantity after repayment. # noqa: E501 :return: The after_left_collateral of this RepayRecord. # noqa: E501 :rtype: str @@ -404,7 +404,7 @@ def after_left_collateral(self): def after_left_collateral(self, after_left_collateral): """Sets the after_left_collateral of this RepayRecord. - Collateral quantity after repayment # noqa: E501 + Collateral quantity after repayment. # noqa: E501 :param after_left_collateral: The after_left_collateral of this RepayRecord. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py index d020960..2200f99 100644 --- a/gate_api/models/repay_record_currency.py +++ b/gate_api/models/repay_record_currency.py @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, before_amount=None, before_a def currency(self): """Gets the currency of this RepayRecordCurrency. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordCurrency. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this RepayRecordCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordCurrency. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordCurrency. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this RepayRecordCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def before_amount(self): """Gets the before_amount of this RepayRecordCurrency. # noqa: E501 - Amount before the operation # noqa: E501 + Amount before the operation. # noqa: E501 :return: The before_amount of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def before_amount(self): def before_amount(self, before_amount): """Sets the before_amount of this RepayRecordCurrency. - Amount before the operation # noqa: E501 + Amount before the operation. # noqa: E501 :param before_amount: The before_amount of this RepayRecordCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py index d83d87f..05a50b7 100644 --- a/gate_api/models/repay_record_left_interest.py +++ b/gate_api/models/repay_record_left_interest.py @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, before_amount=None, before_a def currency(self): """Gets the currency of this RepayRecordLeftInterest. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordLeftInterest. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordLeftInterest. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordLeftInterest. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def before_amount(self): """Gets the before_amount of this RepayRecordLeftInterest. # noqa: E501 - Interest amount before repayment # noqa: E501 + Interest amount before repayment. # noqa: E501 :return: The before_amount of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def before_amount(self): def before_amount(self, before_amount): """Sets the before_amount of this RepayRecordLeftInterest. - Interest amount before repayment # noqa: E501 + Interest amount before repayment. # noqa: E501 :param before_amount: The before_amount of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def before_amount(self, before_amount): def before_amount_usdt(self): """Gets the before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - Converted value of interest before repayment in USDT # noqa: E501 + Converted value of interest before repayment in USDT. # noqa: E501 :return: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def before_amount_usdt(self): def before_amount_usdt(self, before_amount_usdt): """Sets the before_amount_usdt of this RepayRecordLeftInterest. - Converted value of interest before repayment in USDT # noqa: E501 + Converted value of interest before repayment in USDT. # noqa: E501 :param before_amount_usdt: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def before_amount_usdt(self, before_amount_usdt): def after_amount(self): """Gets the after_amount of this RepayRecordLeftInterest. # noqa: E501 - Interest amount after repayment # noqa: E501 + Interest amount after repayment. # noqa: E501 :return: The after_amount of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def after_amount(self): def after_amount(self, after_amount): """Sets the after_amount of this RepayRecordLeftInterest. - Interest amount after repayment # noqa: E501 + Interest amount after repayment. # noqa: E501 :param after_amount: The after_amount of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def after_amount(self, after_amount): def after_amount_usdt(self): """Gets the after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - Converted value of interest after repayment in USDT # noqa: E501 + Converted value of interest after repayment in USDT. # noqa: E501 :return: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def after_amount_usdt(self): def after_amount_usdt(self, after_amount_usdt): """Sets the after_amount_usdt of this RepayRecordLeftInterest. - Converted value of interest after repayment in USDT # noqa: E501 + Converted value of interest after repayment in USDT. # noqa: E501 :param after_amount_usdt: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py index 68629ab..b681dd7 100644 --- a/gate_api/models/repay_record_repaid_currency.py +++ b/gate_api/models/repay_record_repaid_currency.py @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, repaid_amount=None, repaid_p def currency(self): """Gets the currency of this RepayRecordRepaidCurrency. # noqa: E501 - Repayment currency # noqa: E501 + Repayment currency. # noqa: E501 :return: The currency of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordRepaidCurrency. - Repayment currency # noqa: E501 + Repayment currency. # noqa: E501 :param currency: The currency of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordRepaidCurrency. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordRepaidCurrency. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def repaid_amount(self): """Gets the repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 - Repayment amount # noqa: E501 + Repayment amount. # noqa: E501 :return: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def repaid_amount(self): def repaid_amount(self, repaid_amount): """Sets the repaid_amount of this RepayRecordRepaidCurrency. - Repayment amount # noqa: E501 + Repayment amount. # noqa: E501 :param repaid_amount: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def repaid_amount(self, repaid_amount): def repaid_principal(self): """Gets the repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 - Principal # noqa: E501 + Principal. # noqa: E501 :return: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this RepayRecordRepaidCurrency. - Principal # noqa: E501 + Principal. # noqa: E501 :param repaid_principal: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 - Interest # noqa: E501 + Interest. # noqa: E501 :return: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this RepayRecordRepaidCurrency. - Interest # noqa: E501 + Interest. # noqa: E501 :param repaid_interest: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def repaid_interest(self, repaid_interest): def repaid_amount_usdt(self): """Gets the repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 - Value of the repayment amount in USDT # noqa: E501 + Value of the repayment amount in USDT. # noqa: E501 :return: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def repaid_amount_usdt(self): def repaid_amount_usdt(self, repaid_amount_usdt): """Sets the repaid_amount_usdt of this RepayRecordRepaidCurrency. - Value of the repayment amount in USDT # noqa: E501 + Value of the repayment amount in USDT. # noqa: E501 :param repaid_amount_usdt: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py index 002bcf0..0d8a839 100644 --- a/gate_api/models/repay_record_total_interest.py +++ b/gate_api/models/repay_record_total_interest.py @@ -72,7 +72,7 @@ def __init__(self, currency=None, index_price=None, amount=None, amount_usdt=Non def currency(self): """Gets the currency of this RepayRecordTotalInterest. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordTotalInterest. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this RepayRecordTotalInterest. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordTotalInterest. # noqa: E501 - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :return: The index_price of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordTotalInterest. - Currency Index Price # noqa: E501 + Currency Index Price. # noqa: E501 :param index_price: The index_price of this RepayRecordTotalInterest. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def index_price(self, index_price): def amount(self): """Gets the amount of this RepayRecordTotalInterest. # noqa: E501 - Interest Amount # noqa: E501 + Interest Amount. # noqa: E501 :return: The amount of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this RepayRecordTotalInterest. - Interest Amount # noqa: E501 + Interest Amount. # noqa: E501 :param amount: The amount of this RepayRecordTotalInterest. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def amount(self, amount): def amount_usdt(self): """Gets the amount_usdt of this RepayRecordTotalInterest. # noqa: E501 - Interest amount converted to USDT # noqa: E501 + Interest amount converted to USDT. # noqa: E501 :return: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def amount_usdt(self): def amount_usdt(self, amount_usdt): """Sets the amount_usdt of this RepayRecordTotalInterest. - Interest amount converted to USDT # noqa: E501 + Interest amount converted to USDT. # noqa: E501 :param amount_usdt: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 :type: str diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py index c9f337b..2446ead 100644 --- a/gate_api/models/repay_resp.py +++ b/gate_api/models/repay_resp.py @@ -62,7 +62,7 @@ def __init__(self, repaid_principal=None, repaid_interest=None, local_vars_confi def repaid_principal(self): """Gets the repaid_principal of this RepayResp. # noqa: E501 - Principal # noqa: E501 + Principal. # noqa: E501 :return: The repaid_principal of this RepayResp. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this RepayResp. - Principal # noqa: E501 + Principal. # noqa: E501 :param repaid_principal: The repaid_principal of this RepayResp. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this RepayResp. # noqa: E501 - Interest # noqa: E501 + Interest. # noqa: E501 :return: The repaid_interest of this RepayResp. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this RepayResp. - Interest # noqa: E501 + Interest. # noqa: E501 :param repaid_interest: The repaid_interest of this RepayResp. # noqa: E501 :type: str diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py index 72ba774..69c1549 100644 --- a/gate_api/models/risk_units.py +++ b/gate_api/models/risk_units.py @@ -92,7 +92,7 @@ def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_ def symbol(self): """Gets the symbol of this RiskUnits. # noqa: E501 - Risk unit flag # noqa: E501 + Risk unit flag. # noqa: E501 :return: The symbol of this RiskUnits. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def symbol(self): def symbol(self, symbol): """Sets the symbol of this RiskUnits. - Risk unit flag # noqa: E501 + Risk unit flag. # noqa: E501 :param symbol: The symbol of this RiskUnits. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def symbol(self, symbol): def spot_in_use(self): """Gets the spot_in_use of this RiskUnits. # noqa: E501 - Spot hedging utilization # noqa: E501 + Spot hedging utilization. # noqa: E501 :return: The spot_in_use of this RiskUnits. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def spot_in_use(self): def spot_in_use(self, spot_in_use): """Sets the spot_in_use of this RiskUnits. - Spot hedging utilization # noqa: E501 + Spot hedging utilization. # noqa: E501 :param spot_in_use: The spot_in_use of this RiskUnits. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def spot_in_use(self, spot_in_use): def maintain_margin(self): """Gets the maintain_margin of this RiskUnits. # noqa: E501 - Maintenance margin for risk unit # noqa: E501 + Maintenance margin for risk unit. # noqa: E501 :return: The maintain_margin of this RiskUnits. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def maintain_margin(self): def maintain_margin(self, maintain_margin): """Sets the maintain_margin of this RiskUnits. - Maintenance margin for risk unit # noqa: E501 + Maintenance margin for risk unit. # noqa: E501 :param maintain_margin: The maintain_margin of this RiskUnits. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def maintain_margin(self, maintain_margin): def initial_margin(self): """Gets the initial_margin of this RiskUnits. # noqa: E501 - Initial margin for risk unit # noqa: E501 + Initial margin for risk unit. # noqa: E501 :return: The initial_margin of this RiskUnits. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def initial_margin(self): def initial_margin(self, initial_margin): """Sets the initial_margin of this RiskUnits. - Initial margin for risk unit # noqa: E501 + Initial margin for risk unit. # noqa: E501 :param initial_margin: The initial_margin of this RiskUnits. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def initial_margin(self, initial_margin): def delta(self): """Gets the delta of this RiskUnits. # noqa: E501 - Total Delta of risk unit # noqa: E501 + Total Delta of risk unit. # noqa: E501 :return: The delta of this RiskUnits. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this RiskUnits. - Total Delta of risk unit # noqa: E501 + Total Delta of risk unit. # noqa: E501 :param delta: The delta of this RiskUnits. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this RiskUnits. # noqa: E501 - Total Gamma of risk unit # noqa: E501 + Total Gamma of risk unit. # noqa: E501 :return: The gamma of this RiskUnits. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this RiskUnits. - Total Gamma of risk unit # noqa: E501 + Total Gamma of risk unit. # noqa: E501 :param gamma: The gamma of this RiskUnits. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def gamma(self, gamma): def theta(self): """Gets the theta of this RiskUnits. # noqa: E501 - Total Theta of risk unit # noqa: E501 + Total Theta of risk unit. # noqa: E501 :return: The theta of this RiskUnits. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this RiskUnits. - Total Theta of risk unit # noqa: E501 + Total Theta of risk unit. # noqa: E501 :param theta: The theta of this RiskUnits. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def theta(self, theta): def vega(self): """Gets the vega of this RiskUnits. # noqa: E501 - Total Vega of risk unit # noqa: E501 + Total Vega of risk unit. # noqa: E501 :return: The vega of this RiskUnits. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this RiskUnits. - Total Vega of risk unit # noqa: E501 + Total Vega of risk unit. # noqa: E501 :param vega: The vega of this RiskUnits. # noqa: E501 :type: str diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py index 7d00e6d..180f0ca 100644 --- a/gate_api/models/saved_address.py +++ b/gate_api/models/saved_address.py @@ -82,7 +82,7 @@ def __init__(self, currency=None, chain=None, address=None, name=None, tag=None, def currency(self): """Gets the currency of this SavedAddress. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this SavedAddress. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SavedAddress. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this SavedAddress. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def chain(self): """Gets the chain of this SavedAddress. # noqa: E501 - Chain name # noqa: E501 + Chain name. # noqa: E501 :return: The chain of this SavedAddress. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this SavedAddress. - Chain name # noqa: E501 + Chain name. # noqa: E501 :param chain: The chain of this SavedAddress. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def chain(self, chain): def address(self): """Gets the address of this SavedAddress. # noqa: E501 - Address # noqa: E501 + Address. # noqa: E501 :return: The address of this SavedAddress. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def address(self): def address(self, address): """Sets the address of this SavedAddress. - Address # noqa: E501 + Address. # noqa: E501 :param address: The address of this SavedAddress. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def address(self, address): def name(self): """Gets the name of this SavedAddress. # noqa: E501 - Name # noqa: E501 + Name. # noqa: E501 :return: The name of this SavedAddress. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def name(self): def name(self, name): """Sets the name of this SavedAddress. - Name # noqa: E501 + Name. # noqa: E501 :param name: The name of this SavedAddress. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def name(self, name): def tag(self): """Gets the tag of this SavedAddress. # noqa: E501 - Tag # noqa: E501 + Tag. # noqa: E501 :return: The tag of this SavedAddress. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def tag(self): def tag(self, tag): """Sets the tag of this SavedAddress. - Tag # noqa: E501 + Tag. # noqa: E501 :param tag: The tag of this SavedAddress. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def tag(self, tag): def verified(self): """Gets the verified of this SavedAddress. # noqa: E501 - Whether to pass the verification 0-unverified, 1-verified # noqa: E501 + Whether to pass the verification 0-unverified, 1-verified. # noqa: E501 :return: The verified of this SavedAddress. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def verified(self): def verified(self, verified): """Sets the verified of this SavedAddress. - Whether to pass the verification 0-unverified, 1-verified # noqa: E501 + Whether to pass the verification 0-unverified, 1-verified. # noqa: E501 :param verified: The verified of this SavedAddress. # noqa: E501 :type: str diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py index 5460ac0..bb5ff42 100644 --- a/gate_api/models/small_balance.py +++ b/gate_api/models/small_balance.py @@ -72,7 +72,7 @@ def __init__(self, currency=None, available_balance=None, estimated_as_btc=None, def currency(self): """Gets the currency of this SmallBalance. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this SmallBalance. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SmallBalance. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this SmallBalance. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def available_balance(self): """Gets the available_balance of this SmallBalance. # noqa: E501 - Available balance # noqa: E501 + Available balance. # noqa: E501 :return: The available_balance of this SmallBalance. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def available_balance(self): def available_balance(self, available_balance): """Sets the available_balance of this SmallBalance. - Available balance # noqa: E501 + Available balance. # noqa: E501 :param available_balance: The available_balance of this SmallBalance. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def available_balance(self, available_balance): def estimated_as_btc(self): """Gets the estimated_as_btc of this SmallBalance. # noqa: E501 - Estimated as BTC # noqa: E501 + Estimated as BTC. # noqa: E501 :return: The estimated_as_btc of this SmallBalance. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def estimated_as_btc(self): def estimated_as_btc(self, estimated_as_btc): """Sets the estimated_as_btc of this SmallBalance. - Estimated as BTC # noqa: E501 + Estimated as BTC. # noqa: E501 :param estimated_as_btc: The estimated_as_btc of this SmallBalance. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def estimated_as_btc(self, estimated_as_btc): def convertible_to_gt(self): """Gets the convertible_to_gt of this SmallBalance. # noqa: E501 - Estimated conversion to GT # noqa: E501 + Estimated conversion to GT. # noqa: E501 :return: The convertible_to_gt of this SmallBalance. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def convertible_to_gt(self): def convertible_to_gt(self, convertible_to_gt): """Sets the convertible_to_gt of this SmallBalance. - Estimated conversion to GT # noqa: E501 + Estimated conversion to GT. # noqa: E501 :param convertible_to_gt: The convertible_to_gt of this SmallBalance. # noqa: E501 :type: str diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py index 1385fbe..b7a420a 100644 --- a/gate_api/models/small_balance_history.py +++ b/gate_api/models/small_balance_history.py @@ -77,7 +77,7 @@ def __init__(self, id=None, currency=None, amount=None, gt_amount=None, create_t def id(self): """Gets the id of this SmallBalanceHistory. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def id(self): def id(self, id): """Sets the id of this SmallBalanceHistory. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this SmallBalanceHistory. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def id(self, id): def currency(self): """Gets the currency of this SmallBalanceHistory. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SmallBalanceHistory. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this SmallBalanceHistory. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this SmallBalanceHistory. # noqa: E501 - amount # noqa: E501 + amount. # noqa: E501 :return: The amount of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SmallBalanceHistory. - amount # noqa: E501 + amount. # noqa: E501 :param amount: The amount of this SmallBalanceHistory. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def amount(self, amount): def gt_amount(self): """Gets the gt_amount of this SmallBalanceHistory. # noqa: E501 - GT amount # noqa: E501 + GT amount. # noqa: E501 :return: The gt_amount of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def gt_amount(self): def gt_amount(self, gt_amount): """Sets the gt_amount of this SmallBalanceHistory. - GT amount # noqa: E501 + GT amount. # noqa: E501 :param gt_amount: The gt_amount of this SmallBalanceHistory. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def gt_amount(self, gt_amount): def create_time(self): """Gets the create_time of this SmallBalanceHistory. # noqa: E501 - Exchange time (in seconds) # noqa: E501 + Exchange time (in seconds). # noqa: E501 :return: The create_time of this SmallBalanceHistory. # noqa: E501 :rtype: int @@ -180,7 +180,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this SmallBalanceHistory. - Exchange time (in seconds) # noqa: E501 + Exchange time (in seconds). # noqa: E501 :param create_time: The create_time of this SmallBalanceHistory. # noqa: E501 :type: int diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py index d3375ba..79f3eb8 100644 --- a/gate_api/models/spot_account.py +++ b/gate_api/models/spot_account.py @@ -72,7 +72,7 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, l def currency(self): """Gets the currency of this SpotAccount. # noqa: E501 - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :return: The currency of this SpotAccount. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SpotAccount. - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :param currency: The currency of this SpotAccount. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def available(self): """Gets the available of this SpotAccount. # noqa: E501 - Available amount # noqa: E501 + Available amount. # noqa: E501 :return: The available of this SpotAccount. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def available(self): def available(self, available): """Sets the available of this SpotAccount. - Available amount # noqa: E501 + Available amount. # noqa: E501 :param available: The available of this SpotAccount. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def available(self, available): def locked(self): """Gets the locked of this SpotAccount. # noqa: E501 - Locked amount, used in trading # noqa: E501 + Locked amount, used in trading. # noqa: E501 :return: The locked of this SpotAccount. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this SpotAccount. - Locked amount, used in trading # noqa: E501 + Locked amount, used in trading. # noqa: E501 :param locked: The locked of this SpotAccount. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def locked(self, locked): def update_id(self): """Gets the update_id of this SpotAccount. # noqa: E501 - Version number # noqa: E501 + Version number. # noqa: E501 :return: The update_id of this SpotAccount. # noqa: E501 :rtype: int @@ -152,7 +152,7 @@ def update_id(self): def update_id(self, update_id): """Sets the update_id of this SpotAccount. - Version number # noqa: E501 + Version number. # noqa: E501 :param update_id: The update_id of this SpotAccount. # noqa: E501 :type: int diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py index a5cbd8f..7f3d6f6 100644 --- a/gate_api/models/spot_account_book.py +++ b/gate_api/models/spot_account_book.py @@ -92,7 +92,7 @@ def __init__(self, id=None, time=None, currency=None, change=None, balance=None, def id(self): """Gets the id of this SpotAccountBook. # noqa: E501 - Balance change record ID # noqa: E501 + Balance change record ID. # noqa: E501 :return: The id of this SpotAccountBook. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this SpotAccountBook. - Balance change record ID # noqa: E501 + Balance change record ID. # noqa: E501 :param id: The id of this SpotAccountBook. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def id(self, id): def time(self): """Gets the time of this SpotAccountBook. # noqa: E501 - The timestamp of the change (in milliseconds) # noqa: E501 + The timestamp of the change (in milliseconds). # noqa: E501 :return: The time of this SpotAccountBook. # noqa: E501 :rtype: int @@ -126,7 +126,7 @@ def time(self): def time(self, time): """Sets the time of this SpotAccountBook. - The timestamp of the change (in milliseconds) # noqa: E501 + The timestamp of the change (in milliseconds). # noqa: E501 :param time: The time of this SpotAccountBook. # noqa: E501 :type: int @@ -138,7 +138,7 @@ def time(self, time): def currency(self): """Gets the currency of this SpotAccountBook. # noqa: E501 - Currency changed # noqa: E501 + Currency changed. # noqa: E501 :return: The currency of this SpotAccountBook. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SpotAccountBook. - Currency changed # noqa: E501 + Currency changed. # noqa: E501 :param currency: The currency of this SpotAccountBook. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def currency(self, currency): def change(self): """Gets the change of this SpotAccountBook. # noqa: E501 - Amount changed. Positive value means transferring in, while negative out # noqa: E501 + Amount changed. Positive value means transferring in, while negative out. # noqa: E501 :return: The change of this SpotAccountBook. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def change(self): def change(self, change): """Sets the change of this SpotAccountBook. - Amount changed. Positive value means transferring in, while negative out # noqa: E501 + Amount changed. Positive value means transferring in, while negative out. # noqa: E501 :param change: The change of this SpotAccountBook. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def change(self, change): def balance(self): """Gets the balance of this SpotAccountBook. # noqa: E501 - Balance after change # noqa: E501 + Balance after change. # noqa: E501 :return: The balance of this SpotAccountBook. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this SpotAccountBook. - Balance after change # noqa: E501 + Balance after change. # noqa: E501 :param balance: The balance of this SpotAccountBook. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def balance(self, balance): def type(self): """Gets the type of this SpotAccountBook. # noqa: E501 - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 :return: The type of this SpotAccountBook. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def type(self): def type(self, type): """Sets the type of this SpotAccountBook. - Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 + Account book type. Please refer to [account book type](#accountbook-type) for more detail # noqa: E501 :param type: The type of this SpotAccountBook. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def type(self, type): def code(self): """Gets the code of this SpotAccountBook. # noqa: E501 - Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 + Account change code, see [Asset Record Code] (Asset Record Code). # noqa: E501 :return: The code of this SpotAccountBook. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def code(self): def code(self, code): """Sets the code of this SpotAccountBook. - Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 + Account change code, see [Asset Record Code] (Asset Record Code). # noqa: E501 :param code: The code of this SpotAccountBook. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def code(self, code): def text(self): """Gets the text of this SpotAccountBook. # noqa: E501 - Additional information # noqa: E501 + Additional information. # noqa: E501 :return: The text of this SpotAccountBook. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def text(self): def text(self, text): """Sets the text of this SpotAccountBook. - Additional information # noqa: E501 + Additional information. # noqa: E501 :param text: The text of this SpotAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py index e2bf39b..418cd6f 100644 --- a/gate_api/models/spot_currency_chain.py +++ b/gate_api/models/spot_currency_chain.py @@ -77,7 +77,7 @@ def __init__(self, name=None, addr=None, withdraw_disabled=None, withdraw_delaye def name(self): """Gets the name of this SpotCurrencyChain. # noqa: E501 - Chain name # noqa: E501 + Chain name. # noqa: E501 :return: The name of this SpotCurrencyChain. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def name(self): def name(self, name): """Sets the name of this SpotCurrencyChain. - Chain name # noqa: E501 + Chain name. # noqa: E501 :param name: The name of this SpotCurrencyChain. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def name(self, name): def addr(self): """Gets the addr of this SpotCurrencyChain. # noqa: E501 - token address # noqa: E501 + token address. # noqa: E501 :return: The addr of this SpotCurrencyChain. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def addr(self): def addr(self, addr): """Sets the addr of this SpotCurrencyChain. - token address # noqa: E501 + token address. # noqa: E501 :param addr: The addr of this SpotCurrencyChain. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def addr(self, addr): def withdraw_disabled(self): """Gets the withdraw_disabled of this SpotCurrencyChain. # noqa: E501 - Whether currency's withdrawal is disabled # noqa: E501 + Whether currency's withdrawal is disabled. # noqa: E501 :return: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 :rtype: bool @@ -134,7 +134,7 @@ def withdraw_disabled(self): def withdraw_disabled(self, withdraw_disabled): """Sets the withdraw_disabled of this SpotCurrencyChain. - Whether currency's withdrawal is disabled # noqa: E501 + Whether currency's withdrawal is disabled. # noqa: E501 :param withdraw_disabled: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 :type: bool @@ -146,7 +146,7 @@ def withdraw_disabled(self, withdraw_disabled): def withdraw_delayed(self): """Gets the withdraw_delayed of this SpotCurrencyChain. # noqa: E501 - Whether currency's withdrawal is delayed # noqa: E501 + Whether currency's withdrawal is delayed. # noqa: E501 :return: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 :rtype: bool @@ -157,7 +157,7 @@ def withdraw_delayed(self): def withdraw_delayed(self, withdraw_delayed): """Sets the withdraw_delayed of this SpotCurrencyChain. - Whether currency's withdrawal is delayed # noqa: E501 + Whether currency's withdrawal is delayed. # noqa: E501 :param withdraw_delayed: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 :type: bool @@ -169,7 +169,7 @@ def withdraw_delayed(self, withdraw_delayed): def deposit_disabled(self): """Gets the deposit_disabled of this SpotCurrencyChain. # noqa: E501 - Whether currency's deposit is disabled # noqa: E501 + Whether currency's deposit is disabled. # noqa: E501 :return: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 :rtype: bool @@ -180,7 +180,7 @@ def deposit_disabled(self): def deposit_disabled(self, deposit_disabled): """Sets the deposit_disabled of this SpotCurrencyChain. - Whether currency's deposit is disabled # noqa: E501 + Whether currency's deposit is disabled. # noqa: E501 :param deposit_disabled: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 :type: bool diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py index e8d5818..c9c322f 100644 --- a/gate_api/models/spot_fee.py +++ b/gate_api/models/spot_fee.py @@ -102,7 +102,7 @@ def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=Non def user_id(self): """Gets the user_id of this SpotFee. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this SpotFee. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SpotFee. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this SpotFee. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def user_id(self, user_id): def taker_fee(self): """Gets the taker_fee of this SpotFee. # noqa: E501 - taker fee rate # noqa: E501 + taker fee rate. # noqa: E501 :return: The taker_fee of this SpotFee. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def taker_fee(self): def taker_fee(self, taker_fee): """Sets the taker_fee of this SpotFee. - taker fee rate # noqa: E501 + taker fee rate. # noqa: E501 :param taker_fee: The taker_fee of this SpotFee. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def taker_fee(self, taker_fee): def maker_fee(self): """Gets the maker_fee of this SpotFee. # noqa: E501 - maker fee rate # noqa: E501 + maker fee rate. # noqa: E501 :return: The maker_fee of this SpotFee. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def maker_fee(self): def maker_fee(self, maker_fee): """Sets the maker_fee of this SpotFee. - maker fee rate # noqa: E501 + maker fee rate. # noqa: E501 :param maker_fee: The maker_fee of this SpotFee. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def maker_fee(self, maker_fee): def gt_discount(self): """Gets the gt_discount of this SpotFee. # noqa: E501 - If GT deduction is enabled # noqa: E501 + If GT deduction is enabled. # noqa: E501 :return: The gt_discount of this SpotFee. # noqa: E501 :rtype: bool @@ -182,7 +182,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this SpotFee. - If GT deduction is enabled # noqa: E501 + If GT deduction is enabled. # noqa: E501 :param gt_discount: The gt_discount of this SpotFee. # noqa: E501 :type: bool @@ -240,7 +240,7 @@ def gt_maker_fee(self, gt_maker_fee): def loan_fee(self): """Gets the loan_fee of this SpotFee. # noqa: E501 - Loan fee rate of margin lending # noqa: E501 + Loan fee rate of margin lending. # noqa: E501 :return: The loan_fee of this SpotFee. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def loan_fee(self): def loan_fee(self, loan_fee): """Sets the loan_fee of this SpotFee. - Loan fee rate of margin lending # noqa: E501 + Loan fee rate of margin lending. # noqa: E501 :param loan_fee: The loan_fee of this SpotFee. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def loan_fee(self, loan_fee): def point_type(self): """Gets the point_type of this SpotFee. # noqa: E501 - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 :return: The point_type of this SpotFee. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def point_type(self): def point_type(self, point_type): """Sets the point_type of this SpotFee. - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 :param point_type: The point_type of this SpotFee. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def point_type(self, point_type): def currency_pair(self): """Gets the currency_pair of this SpotFee. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this SpotFee. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this SpotFee. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this SpotFee. # noqa: E501 :type: str diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py index 5890835..3c8df1b 100644 --- a/gate_api/models/spot_insurance_history.py +++ b/gate_api/models/spot_insurance_history.py @@ -67,7 +67,7 @@ def __init__(self, currency=None, balance=None, time=None, local_vars_configurat def currency(self): """Gets the currency of this SpotInsuranceHistory. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this SpotInsuranceHistory. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SpotInsuranceHistory. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this SpotInsuranceHistory. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def balance(self): """Gets the balance of this SpotInsuranceHistory. # noqa: E501 - balance # noqa: E501 + balance. # noqa: E501 :return: The balance of this SpotInsuranceHistory. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this SpotInsuranceHistory. - balance # noqa: E501 + balance. # noqa: E501 :param balance: The balance of this SpotInsuranceHistory. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def balance(self, balance): def time(self): """Gets the time of this SpotInsuranceHistory. # noqa: E501 - Creation time, timestamp, milliseconds # noqa: E501 + Creation time, timestamp, milliseconds. # noqa: E501 :return: The time of this SpotInsuranceHistory. # noqa: E501 :rtype: int @@ -124,7 +124,7 @@ def time(self): def time(self, time): """Sets the time of this SpotInsuranceHistory. - Creation time, timestamp, milliseconds # noqa: E501 + Creation time, timestamp, milliseconds. # noqa: E501 :param time: The time of this SpotInsuranceHistory. # noqa: E501 :type: int diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py index a360f89..3059392 100644 --- a/gate_api/models/spot_price_put_order.py +++ b/gate_api/models/spot_price_put_order.py @@ -153,7 +153,7 @@ def side(self, side): def price(self): """Gets the price of this SpotPricePutOrder. # noqa: E501 - Order price # noqa: E501 + Order price. # noqa: E501 :return: The price of this SpotPricePutOrder. # noqa: E501 :rtype: str @@ -164,7 +164,7 @@ def price(self): def price(self, price): """Sets the price of this SpotPricePutOrder. - Order price # noqa: E501 + Order price. # noqa: E501 :param price: The price of this SpotPricePutOrder. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def price(self, price): def amount(self): """Gets the amount of this SpotPricePutOrder. # noqa: E501 - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 :return: The amount of this SpotPricePutOrder. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SpotPricePutOrder. - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 :param amount: The amount of this SpotPricePutOrder. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def time_in_force(self, time_in_force): def auto_borrow(self): """Gets the auto_borrow of this SpotPricePutOrder. # noqa: E501 - Whether to borrow coins automatically # noqa: E501 + Whether to borrow coins automatically. # noqa: E501 :return: The auto_borrow of this SpotPricePutOrder. # noqa: E501 :rtype: bool @@ -274,7 +274,7 @@ def auto_borrow(self): def auto_borrow(self, auto_borrow): """Sets the auto_borrow of this SpotPricePutOrder. - Whether to borrow coins automatically # noqa: E501 + Whether to borrow coins automatically. # noqa: E501 :param auto_borrow: The auto_borrow of this SpotPricePutOrder. # noqa: E501 :type: bool @@ -286,7 +286,7 @@ def auto_borrow(self, auto_borrow): def auto_repay(self): """Gets the auto_repay of this SpotPricePutOrder. # noqa: E501 - Whether to repay the loan automatically # noqa: E501 + Whether to repay the loan automatically. # noqa: E501 :return: The auto_repay of this SpotPricePutOrder. # noqa: E501 :rtype: bool @@ -297,7 +297,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this SpotPricePutOrder. - Whether to repay the loan automatically # noqa: E501 + Whether to repay the loan automatically. # noqa: E501 :param auto_repay: The auto_repay of this SpotPricePutOrder. # noqa: E501 :type: bool diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py index ef32d75..3eba96a 100644 --- a/gate_api/models/spot_price_trigger.py +++ b/gate_api/models/spot_price_trigger.py @@ -64,7 +64,7 @@ def __init__(self, price=None, rule=None, expiration=None, local_vars_configurat def price(self): """Gets the price of this SpotPriceTrigger. # noqa: E501 - Trigger price # noqa: E501 + Trigger price. # noqa: E501 :return: The price of this SpotPriceTrigger. # noqa: E501 :rtype: str @@ -75,7 +75,7 @@ def price(self): def price(self, price): """Sets the price of this SpotPriceTrigger. - Trigger price # noqa: E501 + Trigger price. # noqa: E501 :param price: The price of this SpotPriceTrigger. # noqa: E501 :type: str @@ -89,7 +89,7 @@ def price(self, price): def rule(self): """Gets the rule of this SpotPriceTrigger. # noqa: E501 - Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: triggered when market price less than or equal to `price` field # noqa: E501 + Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: or equal to `price` field # noqa: E501 :return: The rule of this SpotPriceTrigger. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def rule(self): def rule(self, rule): """Sets the rule of this SpotPriceTrigger. - Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: triggered when market price less than or equal to `price` field # noqa: E501 + Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: or equal to `price` field # noqa: E501 :param rule: The rule of this SpotPriceTrigger. # noqa: E501 :type: str diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py index 38e3f72..0fc0e29 100644 --- a/gate_api/models/spot_price_triggered_order.py +++ b/gate_api/models/spot_price_triggered_order.py @@ -145,7 +145,7 @@ def put(self, put): def id(self): """Gets the id of this SpotPriceTriggeredOrder. # noqa: E501 - Auto order ID # noqa: E501 + Auto order ID. # noqa: E501 :return: The id of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -156,7 +156,7 @@ def id(self): def id(self, id): """Sets the id of this SpotPriceTriggeredOrder. - Auto order ID # noqa: E501 + Auto order ID. # noqa: E501 :param id: The id of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -168,7 +168,7 @@ def id(self, id): def user(self): """Gets the user of this SpotPriceTriggeredOrder. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -179,7 +179,7 @@ def user(self): def user(self, user): """Sets the user of this SpotPriceTriggeredOrder. - User ID # noqa: E501 + User ID. # noqa: E501 :param user: The user of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -191,7 +191,7 @@ def user(self, user): def market(self): """Gets the market of this SpotPriceTriggeredOrder. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The market of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -202,7 +202,7 @@ def market(self): def market(self, market): """Sets the market of this SpotPriceTriggeredOrder. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param market: The market of this SpotPriceTriggeredOrder. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def market(self, market): def ctime(self): """Gets the ctime of this SpotPriceTriggeredOrder. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -227,7 +227,7 @@ def ctime(self): def ctime(self, ctime): """Sets the ctime of this SpotPriceTriggeredOrder. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param ctime: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -239,7 +239,7 @@ def ctime(self, ctime): def ftime(self): """Gets the ftime of this SpotPriceTriggeredOrder. # noqa: E501 - Finished time # noqa: E501 + Finished time. # noqa: E501 :return: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -250,7 +250,7 @@ def ftime(self): def ftime(self, ftime): """Sets the ftime of this SpotPriceTriggeredOrder. - Finished time # noqa: E501 + Finished time. # noqa: E501 :param ftime: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -262,7 +262,7 @@ def ftime(self, ftime): def fired_order_id(self): """Gets the fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 - ID of the newly created order on condition triggered # noqa: E501 + ID of the newly created order on condition triggered. # noqa: E501 :return: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -273,7 +273,7 @@ def fired_order_id(self): def fired_order_id(self, fired_order_id): """Sets the fired_order_id of this SpotPriceTriggeredOrder. - ID of the newly created order on condition triggered # noqa: E501 + ID of the newly created order on condition triggered. # noqa: E501 :param fired_order_id: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -308,7 +308,7 @@ def status(self, status): def reason(self): """Gets the reason of this SpotPriceTriggeredOrder. # noqa: E501 - Additional remarks on how the order was finished # noqa: E501 + Additional remarks on how the order was finished. # noqa: E501 :return: The reason of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -319,7 +319,7 @@ def reason(self): def reason(self, reason): """Sets the reason of this SpotPriceTriggeredOrder. - Additional remarks on how the order was finished # noqa: E501 + Additional remarks on how the order was finished. # noqa: E501 :param reason: The reason of this SpotPriceTriggeredOrder. # noqa: E501 :type: str diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py index 6aec9b4..5e73856 100644 --- a/gate_api/models/stp_group.py +++ b/gate_api/models/stp_group.py @@ -71,7 +71,7 @@ def __init__(self, id=None, name=None, creator_id=None, create_time=None, local_ def id(self): """Gets the id of this StpGroup. # noqa: E501 - STP Group ID # noqa: E501 + STP Group ID. # noqa: E501 :return: The id of this StpGroup. # noqa: E501 :rtype: int @@ -82,7 +82,7 @@ def id(self): def id(self, id): """Sets the id of this StpGroup. - STP Group ID # noqa: E501 + STP Group ID. # noqa: E501 :param id: The id of this StpGroup. # noqa: E501 :type: int @@ -94,7 +94,7 @@ def id(self, id): def name(self): """Gets the name of this StpGroup. # noqa: E501 - STP Group name # noqa: E501 + STP Group name. # noqa: E501 :return: The name of this StpGroup. # noqa: E501 :rtype: str @@ -105,7 +105,7 @@ def name(self): def name(self, name): """Sets the name of this StpGroup. - STP Group name # noqa: E501 + STP Group name. # noqa: E501 :param name: The name of this StpGroup. # noqa: E501 :type: str @@ -119,7 +119,7 @@ def name(self, name): def creator_id(self): """Gets the creator_id of this StpGroup. # noqa: E501 - Creator ID # noqa: E501 + Creator ID. # noqa: E501 :return: The creator_id of this StpGroup. # noqa: E501 :rtype: int @@ -130,7 +130,7 @@ def creator_id(self): def creator_id(self, creator_id): """Sets the creator_id of this StpGroup. - Creator ID # noqa: E501 + Creator ID. # noqa: E501 :param creator_id: The creator_id of this StpGroup. # noqa: E501 :type: int @@ -142,7 +142,7 @@ def creator_id(self, creator_id): def create_time(self): """Gets the create_time of this StpGroup. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The create_time of this StpGroup. # noqa: E501 :rtype: int @@ -153,7 +153,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this StpGroup. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param create_time: The create_time of this StpGroup. # noqa: E501 :type: int diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py index 077ce99..cac81e2 100644 --- a/gate_api/models/stp_group_user.py +++ b/gate_api/models/stp_group_user.py @@ -67,7 +67,7 @@ def __init__(self, user_id=None, stp_id=None, create_time=None, local_vars_confi def user_id(self): """Gets the user_id of this StpGroupUser. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this StpGroupUser. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this StpGroupUser. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this StpGroupUser. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def user_id(self, user_id): def stp_id(self): """Gets the stp_id of this StpGroupUser. # noqa: E501 - STP Group ID # noqa: E501 + STP Group ID. # noqa: E501 :return: The stp_id of this StpGroupUser. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def stp_id(self): def stp_id(self, stp_id): """Sets the stp_id of this StpGroupUser. - STP Group ID # noqa: E501 + STP Group ID. # noqa: E501 :param stp_id: The stp_id of this StpGroupUser. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def stp_id(self, stp_id): def create_time(self): """Gets the create_time of this StpGroupUser. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The create_time of this StpGroupUser. # noqa: E501 :rtype: int @@ -124,7 +124,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this StpGroupUser. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param create_time: The create_time of this StpGroupUser. # noqa: E501 :type: int diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py index ac16896..e0d8727 100644 --- a/gate_api/models/structured_buy.py +++ b/gate_api/models/structured_buy.py @@ -62,7 +62,7 @@ def __init__(self, pid=None, amount=None, local_vars_configuration=None): # noq def pid(self): """Gets the pid of this StructuredBuy. # noqa: E501 - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :return: The pid of this StructuredBuy. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def pid(self): def pid(self, pid): """Sets the pid of this StructuredBuy. - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :param pid: The pid of this StructuredBuy. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def pid(self, pid): def amount(self): """Gets the amount of this StructuredBuy. # noqa: E501 - Purchase Amount # noqa: E501 + Purchase Amount. # noqa: E501 :return: The amount of this StructuredBuy. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this StructuredBuy. - Purchase Amount # noqa: E501 + Purchase Amount. # noqa: E501 :param amount: The amount of this StructuredBuy. # noqa: E501 :type: str diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py index c502028..2d469a5 100644 --- a/gate_api/models/structured_get_project_list.py +++ b/gate_api/models/structured_get_project_list.py @@ -112,7 +112,7 @@ def __init__(self, id=None, type=None, name_en=None, investment_coin=None, inves def id(self): """Gets the id of this StructuredGetProjectList. # noqa: E501 - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :return: The id of this StructuredGetProjectList. # noqa: E501 :rtype: int @@ -123,7 +123,7 @@ def id(self): def id(self, id): """Sets the id of this StructuredGetProjectList. - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :param id: The id of this StructuredGetProjectList. # noqa: E501 :type: int @@ -158,7 +158,7 @@ def type(self, type): def name_en(self): """Gets the name_en of this StructuredGetProjectList. # noqa: E501 - name # noqa: E501 + name. # noqa: E501 :return: The name_en of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def name_en(self): def name_en(self, name_en): """Sets the name_en of this StructuredGetProjectList. - name # noqa: E501 + name. # noqa: E501 :param name_en: The name_en of this StructuredGetProjectList. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def name_en(self, name_en): def investment_coin(self): """Gets the investment_coin of this StructuredGetProjectList. # noqa: E501 - Investment Currency # noqa: E501 + Investment Currency. # noqa: E501 :return: The investment_coin of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def investment_coin(self): def investment_coin(self, investment_coin): """Sets the investment_coin of this StructuredGetProjectList. - Investment Currency # noqa: E501 + Investment Currency. # noqa: E501 :param investment_coin: The investment_coin of this StructuredGetProjectList. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def investment_coin(self, investment_coin): def investment_period(self): """Gets the investment_period of this StructuredGetProjectList. # noqa: E501 - Investment term # noqa: E501 + Investment term. # noqa: E501 :return: The investment_period of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def investment_period(self): def investment_period(self, investment_period): """Sets the investment_period of this StructuredGetProjectList. - Investment term # noqa: E501 + Investment term. # noqa: E501 :param investment_period: The investment_period of this StructuredGetProjectList. # noqa: E501 :type: str @@ -227,7 +227,7 @@ def investment_period(self, investment_period): def min_annual_rate(self): """Gets the min_annual_rate of this StructuredGetProjectList. # noqa: E501 - Minimum annual rate # noqa: E501 + Minimum annual rate. # noqa: E501 :return: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -238,7 +238,7 @@ def min_annual_rate(self): def min_annual_rate(self, min_annual_rate): """Sets the min_annual_rate of this StructuredGetProjectList. - Minimum annual rate # noqa: E501 + Minimum annual rate. # noqa: E501 :param min_annual_rate: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 :type: str @@ -250,7 +250,7 @@ def min_annual_rate(self, min_annual_rate): def mid_annual_rate(self): """Gets the mid_annual_rate of this StructuredGetProjectList. # noqa: E501 - Intermediate annual rate # noqa: E501 + Intermediate annual rate. # noqa: E501 :return: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -261,7 +261,7 @@ def mid_annual_rate(self): def mid_annual_rate(self, mid_annual_rate): """Sets the mid_annual_rate of this StructuredGetProjectList. - Intermediate annual rate # noqa: E501 + Intermediate annual rate. # noqa: E501 :param mid_annual_rate: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 :type: str @@ -273,7 +273,7 @@ def mid_annual_rate(self, mid_annual_rate): def max_annual_rate(self): """Gets the max_annual_rate of this StructuredGetProjectList. # noqa: E501 - Maximum annual rate # noqa: E501 + Maximum annual rate. # noqa: E501 :return: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -284,7 +284,7 @@ def max_annual_rate(self): def max_annual_rate(self, max_annual_rate): """Sets the max_annual_rate of this StructuredGetProjectList. - Maximum annual rate # noqa: E501 + Maximum annual rate. # noqa: E501 :param max_annual_rate: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 :type: str @@ -296,7 +296,7 @@ def max_annual_rate(self, max_annual_rate): def watch_market(self): """Gets the watch_market of this StructuredGetProjectList. # noqa: E501 - Watch market # noqa: E501 + Watch market. # noqa: E501 :return: The watch_market of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -307,7 +307,7 @@ def watch_market(self): def watch_market(self, watch_market): """Sets the watch_market of this StructuredGetProjectList. - Watch market # noqa: E501 + Watch market. # noqa: E501 :param watch_market: The watch_market of this StructuredGetProjectList. # noqa: E501 :type: str @@ -319,7 +319,7 @@ def watch_market(self, watch_market): def start_time(self): """Gets the start_time of this StructuredGetProjectList. # noqa: E501 - start time # noqa: E501 + start time. # noqa: E501 :return: The start_time of this StructuredGetProjectList. # noqa: E501 :rtype: int @@ -330,7 +330,7 @@ def start_time(self): def start_time(self, start_time): """Sets the start_time of this StructuredGetProjectList. - start time # noqa: E501 + start time. # noqa: E501 :param start_time: The start_time of this StructuredGetProjectList. # noqa: E501 :type: int @@ -342,7 +342,7 @@ def start_time(self, start_time): def end_time(self): """Gets the end_time of this StructuredGetProjectList. # noqa: E501 - Finished time # noqa: E501 + Finished time. # noqa: E501 :return: The end_time of this StructuredGetProjectList. # noqa: E501 :rtype: int @@ -353,7 +353,7 @@ def end_time(self): def end_time(self, end_time): """Sets the end_time of this StructuredGetProjectList. - Finished time # noqa: E501 + Finished time. # noqa: E501 :param end_time: The end_time of this StructuredGetProjectList. # noqa: E501 :type: int diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py index df002f9..6c7caba 100644 --- a/gate_api/models/structured_order_list.py +++ b/gate_api/models/structured_order_list.py @@ -87,7 +87,7 @@ def __init__(self, id=None, pid=None, lock_coin=None, amount=None, status=None, def id(self): """Gets the id of this StructuredOrderList. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this StructuredOrderList. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def id(self): def id(self, id): """Sets the id of this StructuredOrderList. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this StructuredOrderList. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def id(self, id): def pid(self): """Gets the pid of this StructuredOrderList. # noqa: E501 - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :return: The pid of this StructuredOrderList. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def pid(self): def pid(self, pid): """Sets the pid of this StructuredOrderList. - Plan ID # noqa: E501 + Plan ID. # noqa: E501 :param pid: The pid of this StructuredOrderList. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def pid(self, pid): def lock_coin(self): """Gets the lock_coin of this StructuredOrderList. # noqa: E501 - Locked coin # noqa: E501 + Locked coin. # noqa: E501 :return: The lock_coin of this StructuredOrderList. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def lock_coin(self): def lock_coin(self, lock_coin): """Sets the lock_coin of this StructuredOrderList. - Locked coin # noqa: E501 + Locked coin. # noqa: E501 :param lock_coin: The lock_coin of this StructuredOrderList. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def lock_coin(self, lock_coin): def amount(self): """Gets the amount of this StructuredOrderList. # noqa: E501 - Locked amount # noqa: E501 + Locked amount. # noqa: E501 :return: The amount of this StructuredOrderList. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this StructuredOrderList. - Locked amount # noqa: E501 + Locked amount. # noqa: E501 :param amount: The amount of this StructuredOrderList. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def status(self, status): def income(self): """Gets the income of this StructuredOrderList. # noqa: E501 - Income # noqa: E501 + Income. # noqa: E501 :return: The income of this StructuredOrderList. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def income(self): def income(self, income): """Sets the income of this StructuredOrderList. - Income # noqa: E501 + Income. # noqa: E501 :param income: The income of this StructuredOrderList. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def income(self, income): def create_time(self): """Gets the create_time of this StructuredOrderList. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this StructuredOrderList. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this StructuredOrderList. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this StructuredOrderList. # noqa: E501 :type: int diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py index 1f2abdb..bac5c96 100644 --- a/gate_api/models/sub_account.py +++ b/gate_api/models/sub_account.py @@ -91,7 +91,7 @@ def __init__(self, remark=None, login_name=None, password=None, email=None, stat def remark(self): """Gets the remark of this SubAccount. # noqa: E501 - custom text # noqa: E501 + custom text. # noqa: E501 :return: The remark of this SubAccount. # noqa: E501 :rtype: str @@ -102,7 +102,7 @@ def remark(self): def remark(self, remark): """Sets the remark of this SubAccount. - custom text # noqa: E501 + custom text. # noqa: E501 :param remark: The remark of this SubAccount. # noqa: E501 :type: str @@ -139,7 +139,7 @@ def login_name(self, login_name): def password(self): """Gets the password of this SubAccount. # noqa: E501 - The sub-account's password. (Default: the same as main account's password) # noqa: E501 + The sub-account's password. (Default: the same as main account's password). # noqa: E501 :return: The password of this SubAccount. # noqa: E501 :rtype: str @@ -150,7 +150,7 @@ def password(self): def password(self, password): """Sets the password of this SubAccount. - The sub-account's password. (Default: the same as main account's password) # noqa: E501 + The sub-account's password. (Default: the same as main account's password). # noqa: E501 :param password: The password of this SubAccount. # noqa: E501 :type: str @@ -185,7 +185,7 @@ def email(self, email): def state(self): """Gets the state of this SubAccount. # noqa: E501 - State: 1-normal, 2-locked\" # noqa: E501 + State: 1-normal, 2-locked\". # noqa: E501 :return: The state of this SubAccount. # noqa: E501 :rtype: int @@ -196,7 +196,7 @@ def state(self): def state(self, state): """Sets the state of this SubAccount. - State: 1-normal, 2-locked\" # noqa: E501 + State: 1-normal, 2-locked\". # noqa: E501 :param state: The state of this SubAccount. # noqa: E501 :type: int @@ -208,7 +208,7 @@ def state(self, state): def type(self): """Gets the type of this SubAccount. # noqa: E501 - \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501 + \"Sub-account type: 1 - sub-account, 3 - cross margin account. # noqa: E501 :return: The type of this SubAccount. # noqa: E501 :rtype: int @@ -219,7 +219,7 @@ def type(self): def type(self, type): """Sets the type of this SubAccount. - \"Sub-account type: 1 - sub-account, 3 - cross margin account # noqa: E501 + \"Sub-account type: 1 - sub-account, 3 - cross margin account. # noqa: E501 :param type: The type of this SubAccount. # noqa: E501 :type: int @@ -231,7 +231,7 @@ def type(self, type): def user_id(self): """Gets the user_id of this SubAccount. # noqa: E501 - The user id of the sub-account # noqa: E501 + The user id of the sub-account. # noqa: E501 :return: The user_id of this SubAccount. # noqa: E501 :rtype: int @@ -242,7 +242,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SubAccount. - The user id of the sub-account # noqa: E501 + The user id of the sub-account. # noqa: E501 :param user_id: The user_id of this SubAccount. # noqa: E501 :type: int @@ -254,7 +254,7 @@ def user_id(self, user_id): def create_time(self): """Gets the create_time of this SubAccount. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this SubAccount. # noqa: E501 :rtype: int @@ -265,7 +265,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this SubAccount. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this SubAccount. # noqa: E501 :type: int diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py index 3fdf25f..fa82fa7 100644 --- a/gate_api/models/sub_account_balance.py +++ b/gate_api/models/sub_account_balance.py @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountBalance. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The uid of this SubAccountBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountBalance. - User ID # noqa: E501 + User ID. # noqa: E501 :param uid: The uid of this SubAccountBalance. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def uid(self, uid): def available(self): """Gets the available of this SubAccountBalance. # noqa: E501 - Available balances of currencies # noqa: E501 + Available balances of currencies. # noqa: E501 :return: The available of this SubAccountBalance. # noqa: E501 :rtype: dict(str, str) @@ -96,7 +96,7 @@ def available(self): def available(self, available): """Sets the available of this SubAccountBalance. - Available balances of currencies # noqa: E501 + Available balances of currencies. # noqa: E501 :param available: The available of this SubAccountBalance. # noqa: E501 :type: dict(str, str) diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py index bb0b969..69d1352 100644 --- a/gate_api/models/sub_account_cross_margin_balance.py +++ b/gate_api/models/sub_account_cross_margin_balance.py @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountCrossMarginBalance. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The uid of this SubAccountCrossMarginBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountCrossMarginBalance. - User ID # noqa: E501 + User ID. # noqa: E501 :param uid: The uid of this SubAccountCrossMarginBalance. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py index e978c65..b783058 100644 --- a/gate_api/models/sub_account_futures_balance.py +++ b/gate_api/models/sub_account_futures_balance.py @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountFuturesBalance. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The uid of this SubAccountFuturesBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountFuturesBalance. - User ID # noqa: E501 + User ID. # noqa: E501 :param uid: The uid of this SubAccountFuturesBalance. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def uid(self, uid): def available(self): """Gets the available of this SubAccountFuturesBalance. # noqa: E501 - Futures account balances # noqa: E501 + Futures account balances. # noqa: E501 :return: The available of this SubAccountFuturesBalance. # noqa: E501 :rtype: dict(str, FuturesAccount) @@ -96,7 +96,7 @@ def available(self): def available(self, available): """Sets the available of this SubAccountFuturesBalance. - Futures account balances # noqa: E501 + Futures account balances. # noqa: E501 :param available: The available of this SubAccountFuturesBalance. # noqa: E501 :type: dict(str, FuturesAccount) diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py index 3fd17ae..139a0fe 100644 --- a/gate_api/models/sub_account_key.py +++ b/gate_api/models/sub_account_key.py @@ -102,7 +102,7 @@ def __init__(self, user_id=None, mode=None, name=None, perms=None, ip_whitelist= def user_id(self): """Gets the user_id of this SubAccountKey. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this SubAccountKey. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SubAccountKey. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this SubAccountKey. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def user_id(self, user_id): def mode(self): """Gets the mode of this SubAccountKey. # noqa: E501 - Mode: 1 - classic 2 - portfolio account # noqa: E501 + Mode: 1 - classic 2 - portfolio account. # noqa: E501 :return: The mode of this SubAccountKey. # noqa: E501 :rtype: int @@ -136,7 +136,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this SubAccountKey. - Mode: 1 - classic 2 - portfolio account # noqa: E501 + Mode: 1 - classic 2 - portfolio account. # noqa: E501 :param mode: The mode of this SubAccountKey. # noqa: E501 :type: int @@ -148,7 +148,7 @@ def mode(self, mode): def name(self): """Gets the name of this SubAccountKey. # noqa: E501 - API key name # noqa: E501 + API key name. # noqa: E501 :return: The name of this SubAccountKey. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def name(self): def name(self, name): """Sets the name of this SubAccountKey. - API key name # noqa: E501 + API key name. # noqa: E501 :param name: The name of this SubAccountKey. # noqa: E501 :type: str @@ -192,7 +192,7 @@ def perms(self, perms): def ip_whitelist(self): """Gets the ip_whitelist of this SubAccountKey. # noqa: E501 - ip white list (list will be removed if no value is passed) # noqa: E501 + ip white list (list will be removed if no value is passed). # noqa: E501 :return: The ip_whitelist of this SubAccountKey. # noqa: E501 :rtype: list[str] @@ -203,7 +203,7 @@ def ip_whitelist(self): def ip_whitelist(self, ip_whitelist): """Sets the ip_whitelist of this SubAccountKey. - ip white list (list will be removed if no value is passed) # noqa: E501 + ip white list (list will be removed if no value is passed). # noqa: E501 :param ip_whitelist: The ip_whitelist of this SubAccountKey. # noqa: E501 :type: list[str] @@ -215,7 +215,7 @@ def ip_whitelist(self, ip_whitelist): def key(self): """Gets the key of this SubAccountKey. # noqa: E501 - API Key # noqa: E501 + API Key. # noqa: E501 :return: The key of this SubAccountKey. # noqa: E501 :rtype: str @@ -226,7 +226,7 @@ def key(self): def key(self, key): """Sets the key of this SubAccountKey. - API Key # noqa: E501 + API Key. # noqa: E501 :param key: The key of this SubAccountKey. # noqa: E501 :type: str @@ -238,7 +238,7 @@ def key(self, key): def state(self): """Gets the state of this SubAccountKey. # noqa: E501 - State 1 - normal 2 - locked 3 - frozen # noqa: E501 + State 1 - normal 2 - locked 3 - frozen. # noqa: E501 :return: The state of this SubAccountKey. # noqa: E501 :rtype: int @@ -249,7 +249,7 @@ def state(self): def state(self, state): """Sets the state of this SubAccountKey. - State 1 - normal 2 - locked 3 - frozen # noqa: E501 + State 1 - normal 2 - locked 3 - frozen. # noqa: E501 :param state: The state of this SubAccountKey. # noqa: E501 :type: int @@ -261,7 +261,7 @@ def state(self, state): def created_at(self): """Gets the created_at of this SubAccountKey. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The created_at of this SubAccountKey. # noqa: E501 :rtype: int @@ -272,7 +272,7 @@ def created_at(self): def created_at(self, created_at): """Sets the created_at of this SubAccountKey. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param created_at: The created_at of this SubAccountKey. # noqa: E501 :type: int @@ -284,7 +284,7 @@ def created_at(self, created_at): def updated_at(self): """Gets the updated_at of this SubAccountKey. # noqa: E501 - Last update time # noqa: E501 + Last update time. # noqa: E501 :return: The updated_at of this SubAccountKey. # noqa: E501 :rtype: int @@ -295,7 +295,7 @@ def updated_at(self): def updated_at(self, updated_at): """Sets the updated_at of this SubAccountKey. - Last update time # noqa: E501 + Last update time. # noqa: E501 :param updated_at: The updated_at of this SubAccountKey. # noqa: E501 :type: int @@ -307,7 +307,7 @@ def updated_at(self, updated_at): def last_access(self): """Gets the last_access of this SubAccountKey. # noqa: E501 - Last access time # noqa: E501 + Last access time. # noqa: E501 :return: The last_access of this SubAccountKey. # noqa: E501 :rtype: int @@ -318,7 +318,7 @@ def last_access(self): def last_access(self, last_access): """Sets the last_access of this SubAccountKey. - Last access time # noqa: E501 + Last access time. # noqa: E501 :param last_access: The last_access of this SubAccountKey. # noqa: E501 :type: int diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py index 11edeb0..f0a9f32 100644 --- a/gate_api/models/sub_account_key_perms.py +++ b/gate_api/models/sub_account_key_perms.py @@ -85,7 +85,7 @@ def name(self, name): def read_only(self): """Gets the read_only of this SubAccountKeyPerms. # noqa: E501 - read only # noqa: E501 + read only. # noqa: E501 :return: The read_only of this SubAccountKeyPerms. # noqa: E501 :rtype: bool @@ -96,7 +96,7 @@ def read_only(self): def read_only(self, read_only): """Sets the read_only of this SubAccountKeyPerms. - read only # noqa: E501 + read only. # noqa: E501 :param read_only: The read_only of this SubAccountKeyPerms. # noqa: E501 :type: bool diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py index 0e8dec4..ed03b66 100644 --- a/gate_api/models/sub_account_margin_balance.py +++ b/gate_api/models/sub_account_margin_balance.py @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountMarginBalance. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The uid of this SubAccountMarginBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountMarginBalance. - User ID # noqa: E501 + User ID. # noqa: E501 :param uid: The uid of this SubAccountMarginBalance. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def uid(self, uid): def available(self): """Gets the available of this SubAccountMarginBalance. # noqa: E501 - Margin account balances # noqa: E501 + Margin account balances. # noqa: E501 :return: The available of this SubAccountMarginBalance. # noqa: E501 :rtype: list[MarginAccount] @@ -96,7 +96,7 @@ def available(self): def available(self, available): """Sets the available of this SubAccountMarginBalance. - Margin account balances # noqa: E501 + Margin account balances. # noqa: E501 :param available: The available of this SubAccountMarginBalance. # noqa: E501 :type: list[MarginAccount] diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py index 54a083c..ff353ad 100644 --- a/gate_api/models/sub_account_to_sub_account.py +++ b/gate_api/models/sub_account_to_sub_account.py @@ -81,7 +81,7 @@ def __init__(self, currency=None, sub_account_type=None, sub_account_from=None, def currency(self): """Gets the currency of this SubAccountToSubAccount. # noqa: E501 - Transfer currency name # noqa: E501 + Transfer currency name. # noqa: E501 :return: The currency of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -92,7 +92,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SubAccountToSubAccount. - Transfer currency name # noqa: E501 + Transfer currency name. # noqa: E501 :param currency: The currency of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -129,7 +129,7 @@ def sub_account_type(self, sub_account_type): def sub_account_from(self): """Gets the sub_account_from of this SubAccountToSubAccount. # noqa: E501 - Transfer from the user id of the sub-account # noqa: E501 + Transfer from the user id of the sub-account. # noqa: E501 :return: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -140,7 +140,7 @@ def sub_account_from(self): def sub_account_from(self, sub_account_from): """Sets the sub_account_from of this SubAccountToSubAccount. - Transfer from the user id of the sub-account # noqa: E501 + Transfer from the user id of the sub-account. # noqa: E501 :param sub_account_from: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def sub_account_from_type(self, sub_account_from_type): def sub_account_to(self): """Gets the sub_account_to of this SubAccountToSubAccount. # noqa: E501 - Transfer to the user id of the sub-account # noqa: E501 + Transfer to the user id of the sub-account. # noqa: E501 :return: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def sub_account_to(self): def sub_account_to(self, sub_account_to): """Sets the sub_account_to of this SubAccountToSubAccount. - Transfer to the user id of the sub-account # noqa: E501 + Transfer to the user id of the sub-account. # noqa: E501 :param sub_account_to: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -229,7 +229,7 @@ def sub_account_to_type(self, sub_account_to_type): def amount(self): """Gets the amount of this SubAccountToSubAccount. # noqa: E501 - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :return: The amount of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -240,7 +240,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SubAccountToSubAccount. - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :param amount: The amount of this SubAccountToSubAccount. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py index 5426a30..09ff172 100644 --- a/gate_api/models/sub_account_transfer.py +++ b/gate_api/models/sub_account_transfer.py @@ -78,7 +78,7 @@ def __init__(self, sub_account=None, sub_account_type='spot', currency=None, amo def sub_account(self): """Gets the sub_account of this SubAccountTransfer. # noqa: E501 - Sub account user ID # noqa: E501 + Sub account user ID. # noqa: E501 :return: The sub_account of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -89,7 +89,7 @@ def sub_account(self): def sub_account(self, sub_account): """Sets the sub_account of this SubAccountTransfer. - Sub account user ID # noqa: E501 + Sub account user ID. # noqa: E501 :param sub_account: The sub_account of this SubAccountTransfer. # noqa: E501 :type: str @@ -126,7 +126,7 @@ def sub_account_type(self, sub_account_type): def currency(self): """Gets the currency of this SubAccountTransfer. # noqa: E501 - Transfer currency name # noqa: E501 + Transfer currency name. # noqa: E501 :return: The currency of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -137,7 +137,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SubAccountTransfer. - Transfer currency name # noqa: E501 + Transfer currency name. # noqa: E501 :param currency: The currency of this SubAccountTransfer. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this SubAccountTransfer. # noqa: E501 - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :return: The amount of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SubAccountTransfer. - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :param amount: The amount of this SubAccountTransfer. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_transfer_record_item.py b/gate_api/models/sub_account_transfer_record_item.py index ad7a9fd..ed02651 100644 --- a/gate_api/models/sub_account_transfer_record_item.py +++ b/gate_api/models/sub_account_transfer_record_item.py @@ -98,7 +98,7 @@ def __init__(self, timest=None, uid=None, sub_account=None, sub_account_type='sp def timest(self): """Gets the timest of this SubAccountTransferRecordItem. # noqa: E501 - Transfer timestamp # noqa: E501 + Transfer timestamp. # noqa: E501 :return: The timest of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -109,7 +109,7 @@ def timest(self): def timest(self, timest): """Sets the timest of this SubAccountTransferRecordItem. - Transfer timestamp # noqa: E501 + Transfer timestamp. # noqa: E501 :param timest: The timest of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -121,7 +121,7 @@ def timest(self, timest): def uid(self): """Gets the uid of this SubAccountTransferRecordItem. # noqa: E501 - Main account user ID # noqa: E501 + Main account user ID. # noqa: E501 :return: The uid of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -132,7 +132,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountTransferRecordItem. - Main account user ID # noqa: E501 + Main account user ID. # noqa: E501 :param uid: The uid of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -144,7 +144,7 @@ def uid(self, uid): def sub_account(self): """Gets the sub_account of this SubAccountTransferRecordItem. # noqa: E501 - Sub account user ID # noqa: E501 + Sub account user ID. # noqa: E501 :return: The sub_account of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -155,7 +155,7 @@ def sub_account(self): def sub_account(self, sub_account): """Sets the sub_account of this SubAccountTransferRecordItem. - Sub account user ID # noqa: E501 + Sub account user ID. # noqa: E501 :param sub_account: The sub_account of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -192,7 +192,7 @@ def sub_account_type(self, sub_account_type): def currency(self): """Gets the currency of this SubAccountTransferRecordItem. # noqa: E501 - Transfer currency name # noqa: E501 + Transfer currency name. # noqa: E501 :return: The currency of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -203,7 +203,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SubAccountTransferRecordItem. - Transfer currency name # noqa: E501 + Transfer currency name. # noqa: E501 :param currency: The currency of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this SubAccountTransferRecordItem. # noqa: E501 - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :return: The amount of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SubAccountTransferRecordItem. - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :param amount: The amount of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -267,7 +267,7 @@ def direction(self, direction): def source(self): """Gets the source of this SubAccountTransferRecordItem. # noqa: E501 - Where the operation is initiated from # noqa: E501 + Where the operation is initiated from. # noqa: E501 :return: The source of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -278,7 +278,7 @@ def source(self): def source(self, source): """Sets the source of this SubAccountTransferRecordItem. - Where the operation is initiated from # noqa: E501 + Where the operation is initiated from. # noqa: E501 :param source: The source of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -313,7 +313,7 @@ def client_order_id(self, client_order_id): def status(self): """Gets the status of this SubAccountTransferRecordItem. # noqa: E501 - Sub-account transfer record status, currently only success # noqa: E501 + Sub-account transfer record status, currently only success. # noqa: E501 :return: The status of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -324,7 +324,7 @@ def status(self): def status(self, status): """Sets the status of this SubAccountTransferRecordItem. - Sub-account transfer record status, currently only success # noqa: E501 + Sub-account transfer record status, currently only success. # noqa: E501 :param status: The status of this SubAccountTransferRecordItem. # noqa: E501 :type: str diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py index 232a25b..3f877de 100644 --- a/gate_api/models/sub_cross_margin_account.py +++ b/gate_api/models/sub_cross_margin_account.py @@ -155,7 +155,7 @@ def user_id(self, user_id): def locked(self): """Gets the locked of this SubCrossMarginAccount. # noqa: E501 - Whether account is locked # noqa: E501 + Whether account is locked. # noqa: E501 :return: The locked of this SubCrossMarginAccount. # noqa: E501 :rtype: bool @@ -166,7 +166,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this SubCrossMarginAccount. - Whether account is locked # noqa: E501 + Whether account is locked. # noqa: E501 :param locked: The locked of this SubCrossMarginAccount. # noqa: E501 :type: bool @@ -245,7 +245,7 @@ def borrowed(self, borrowed): def borrowed_net(self): """Gets the borrowed_net of this SubCrossMarginAccount. # noqa: E501 - Total borrowed value in USDT * borrowed factor # noqa: E501 + Total borrowed value in USDT * borrowed factor. # noqa: E501 :return: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -256,7 +256,7 @@ def borrowed_net(self): def borrowed_net(self, borrowed_net): """Sets the borrowed_net of this SubCrossMarginAccount. - Total borrowed value in USDT * borrowed factor # noqa: E501 + Total borrowed value in USDT * borrowed factor. # noqa: E501 :param borrowed_net: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -268,7 +268,7 @@ def borrowed_net(self, borrowed_net): def net(self): """Gets the net of this SubCrossMarginAccount. # noqa: E501 - Total net assets in USDT # noqa: E501 + Total net assets in USDT. # noqa: E501 :return: The net of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -279,7 +279,7 @@ def net(self): def net(self, net): """Sets the net of this SubCrossMarginAccount. - Total net assets in USDT # noqa: E501 + Total net assets in USDT. # noqa: E501 :param net: The net of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -291,7 +291,7 @@ def net(self, net): def leverage(self): """Gets the leverage of this SubCrossMarginAccount. # noqa: E501 - Position leverage # noqa: E501 + Position leverage. # 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 + Position leverage. # noqa: E501 :param leverage: The leverage of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -360,7 +360,7 @@ def risk(self, risk): def total_initial_margin(self): """Gets the total_initial_margin of this SubCrossMarginAccount. # noqa: E501 - Total initial margin # noqa: E501 + Total initial margin. # noqa: E501 :return: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -371,7 +371,7 @@ def total_initial_margin(self): def total_initial_margin(self, total_initial_margin): """Sets the total_initial_margin of this SubCrossMarginAccount. - Total initial margin # noqa: E501 + Total initial margin. # noqa: E501 :param total_initial_margin: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -383,7 +383,7 @@ def total_initial_margin(self, total_initial_margin): def total_margin_balance(self): """Gets the total_margin_balance of this SubCrossMarginAccount. # noqa: E501 - Total margin balance # noqa: E501 + Total margin balance. # noqa: E501 :return: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -394,7 +394,7 @@ def total_margin_balance(self): def total_margin_balance(self, total_margin_balance): """Sets the total_margin_balance of this SubCrossMarginAccount. - Total margin balance # noqa: E501 + Total margin balance. # noqa: E501 :param total_margin_balance: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -406,7 +406,7 @@ def total_margin_balance(self, total_margin_balance): def total_maintenance_margin(self): """Gets the total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 - Total maintenance margin # noqa: E501 + Total maintenance margin. # noqa: E501 :return: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -417,7 +417,7 @@ def total_maintenance_margin(self): def total_maintenance_margin(self, total_maintenance_margin): """Sets the total_maintenance_margin of this SubCrossMarginAccount. - Total maintenance margin # noqa: E501 + Total maintenance margin. # noqa: E501 :param total_maintenance_margin: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -429,7 +429,7 @@ def total_maintenance_margin(self, total_maintenance_margin): def total_initial_margin_rate(self): """Gets the total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 - Total initial margin rate # noqa: E501 + Total initial margin rate. # noqa: E501 :return: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -440,7 +440,7 @@ def total_initial_margin_rate(self): def total_initial_margin_rate(self, total_initial_margin_rate): """Sets the total_initial_margin_rate of this SubCrossMarginAccount. - Total initial margin rate # noqa: E501 + Total initial margin rate. # noqa: E501 :param total_initial_margin_rate: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -452,7 +452,7 @@ def total_initial_margin_rate(self, total_initial_margin_rate): def total_maintenance_margin_rate(self): """Gets the total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 - Total maintenance margin rate # noqa: E501 + Total maintenance margin rate. # noqa: E501 :return: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -463,7 +463,7 @@ def total_maintenance_margin_rate(self): def total_maintenance_margin_rate(self, total_maintenance_margin_rate): """Sets the total_maintenance_margin_rate of this SubCrossMarginAccount. - Total maintenance margin rate # noqa: E501 + Total maintenance margin rate. # noqa: E501 :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -475,7 +475,7 @@ def total_maintenance_margin_rate(self, total_maintenance_margin_rate): def total_available_margin(self): """Gets the total_available_margin of this SubCrossMarginAccount. # noqa: E501 - Total available margin # noqa: E501 + Total available margin. # noqa: E501 :return: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -486,7 +486,7 @@ def total_available_margin(self): def total_available_margin(self, total_available_margin): """Sets the total_available_margin of this SubCrossMarginAccount. - Total available margin # noqa: E501 + Total available margin. # noqa: E501 :param total_available_margin: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 :type: str diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py index dc053fc..e9ba6cf 100644 --- a/gate_api/models/sub_user_mode.py +++ b/gate_api/models/sub_user_mode.py @@ -67,7 +67,7 @@ def __init__(self, user_id=None, is_unified=None, mode=None, local_vars_configur def user_id(self): """Gets the user_id of this SubUserMode. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this SubUserMode. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SubUserMode. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this SubUserMode. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def user_id(self, user_id): def is_unified(self): """Gets the is_unified of this SubUserMode. # noqa: E501 - Is it a unified account? # noqa: E501 + Is it a unified account?. # noqa: E501 :return: The is_unified of this SubUserMode. # noqa: E501 :rtype: bool @@ -101,7 +101,7 @@ def is_unified(self): def is_unified(self, is_unified): """Sets the is_unified of this SubUserMode. - Is it a unified account? # noqa: E501 + Is it a unified account?. # noqa: E501 :param is_unified: The is_unified of this SubUserMode. # noqa: E501 :type: bool diff --git a/gate_api/models/swap_coin.py b/gate_api/models/swap_coin.py index 9ceee05..c32db80 100644 --- a/gate_api/models/swap_coin.py +++ b/gate_api/models/swap_coin.py @@ -69,7 +69,7 @@ def __init__(self, coin=None, side=None, amount=None, pid=None, local_vars_confi def coin(self): """Gets the coin of this SwapCoin. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The coin of this SwapCoin. # noqa: E501 :rtype: str @@ -80,7 +80,7 @@ def coin(self): def coin(self, coin): """Sets the coin of this SwapCoin. - Currency # noqa: E501 + Currency. # noqa: E501 :param coin: The coin of this SwapCoin. # noqa: E501 :type: str @@ -94,7 +94,7 @@ def coin(self, coin): def side(self): """Gets the side of this SwapCoin. # noqa: E501 - 0 - Stake 1 - Redeem # noqa: E501 + 0 - Stake 1 - Redeem. # noqa: E501 :return: The side of this SwapCoin. # noqa: E501 :rtype: str @@ -105,7 +105,7 @@ def side(self): def side(self, side): """Sets the side of this SwapCoin. - 0 - Stake 1 - Redeem # noqa: E501 + 0 - Stake 1 - Redeem. # noqa: E501 :param side: The side of this SwapCoin. # noqa: E501 :type: str @@ -119,7 +119,7 @@ def side(self, side): def amount(self): """Gets the amount of this SwapCoin. # noqa: E501 - Size # noqa: E501 + Size. # noqa: E501 :return: The amount of this SwapCoin. # noqa: E501 :rtype: str @@ -130,7 +130,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SwapCoin. - Size # noqa: E501 + Size. # noqa: E501 :param amount: The amount of this SwapCoin. # noqa: E501 :type: str @@ -144,7 +144,7 @@ def amount(self, amount): def pid(self): """Gets the pid of this SwapCoin. # noqa: E501 - DeFi-type Mining Protocol Identifier # noqa: E501 + DeFi-type Mining Protocol Identifier. # noqa: E501 :return: The pid of this SwapCoin. # noqa: E501 :rtype: int @@ -155,7 +155,7 @@ def pid(self): def pid(self, pid): """Sets the pid of this SwapCoin. - DeFi-type Mining Protocol Identifier # noqa: E501 + DeFi-type Mining Protocol Identifier. # noqa: E501 :param pid: The pid of this SwapCoin. # noqa: E501 :type: int diff --git a/gate_api/models/swap_coin_struct.py b/gate_api/models/swap_coin_struct.py index 43c71ec..a1d13f6 100644 --- a/gate_api/models/swap_coin_struct.py +++ b/gate_api/models/swap_coin_struct.py @@ -34,70 +34,100 @@ class SwapCoinStruct(object): """ openapi_types = { 'id': 'int', + 'pid': 'int', 'uid': 'int', 'coin': 'str', 'type': 'int', + 'subtype': 'str', 'amount': 'str', 'exchange_rate': 'str', - 'pid': 'int', + 'exchange_amount': 'str', + 'update_stamp': 'int', + 'create_stamp': 'int', 'status': 'int', - 'create_stamp': 'int' + 'protocol_type': 'int', + 'client_order_id': 'str', + 'source': 'str' } attribute_map = { 'id': 'id', + 'pid': 'pid', 'uid': 'uid', 'coin': 'coin', 'type': 'type', + 'subtype': 'subtype', 'amount': 'amount', 'exchange_rate': 'exchange_rate', - 'pid': 'pid', + 'exchange_amount': 'exchange_amount', + 'update_stamp': 'updateStamp', + 'create_stamp': 'createStamp', 'status': 'status', - 'create_stamp': 'createStamp' + 'protocol_type': 'protocol_type', + 'client_order_id': 'client_order_id', + 'source': 'source' } - def __init__(self, id=None, uid=None, coin=None, type=None, amount=None, exchange_rate=None, pid=None, status=None, create_stamp=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, str, int, str, str, int, int, int, Configuration) -> None + def __init__(self, id=None, pid=None, uid=None, coin=None, type=None, subtype=None, amount=None, exchange_rate=None, exchange_amount=None, update_stamp=None, create_stamp=None, status=None, protocol_type=None, client_order_id=None, source=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, int, str, int, str, str, str, str, int, int, int, int, str, str, Configuration) -> None """SwapCoinStruct - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._id = None + self._pid = None self._uid = None self._coin = None self._type = None + self._subtype = None self._amount = None self._exchange_rate = None - self._pid = None - self._status = None + self._exchange_amount = None + self._update_stamp = None self._create_stamp = None + self._status = None + self._protocol_type = None + self._client_order_id = None + self._source = None self.discriminator = None if id is not None: self.id = id + if pid is not None: + self.pid = pid if uid is not None: self.uid = uid if coin is not None: self.coin = coin if type is not None: self.type = type + if subtype is not None: + self.subtype = subtype if amount is not None: self.amount = amount if exchange_rate is not None: self.exchange_rate = exchange_rate - if pid is not None: - self.pid = pid - if status is not None: - self.status = status + if exchange_amount is not None: + self.exchange_amount = exchange_amount + if update_stamp is not None: + self.update_stamp = update_stamp if create_stamp is not None: self.create_stamp = create_stamp + if status is not None: + self.status = status + if protocol_type is not None: + self.protocol_type = protocol_type + if client_order_id is not None: + self.client_order_id = client_order_id + if source is not None: + self.source = source @property def id(self): """Gets the id of this SwapCoinStruct. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -108,7 +138,7 @@ def id(self): def id(self, id): """Sets the id of this SwapCoinStruct. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this SwapCoinStruct. # noqa: E501 :type: int @@ -116,11 +146,34 @@ def id(self, id): self._id = id + @property + def pid(self): + """Gets the pid of this SwapCoinStruct. # noqa: E501 + + Plan ID. # noqa: E501 + + :return: The pid of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this SwapCoinStruct. + + Plan ID. # noqa: E501 + + :param pid: The pid of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._pid = pid + @property def uid(self): """Gets the uid of this SwapCoinStruct. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The uid of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -131,7 +184,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SwapCoinStruct. - User ID # noqa: E501 + User ID. # noqa: E501 :param uid: The uid of this SwapCoinStruct. # noqa: E501 :type: int @@ -143,7 +196,7 @@ def uid(self, uid): def coin(self): """Gets the coin of this SwapCoinStruct. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The coin of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -154,7 +207,7 @@ def coin(self): def coin(self, coin): """Sets the coin of this SwapCoinStruct. - Currency # noqa: E501 + Currency. # noqa: E501 :param coin: The coin of this SwapCoinStruct. # noqa: E501 :type: str @@ -166,7 +219,7 @@ def coin(self, coin): def type(self): """Gets the type of this SwapCoinStruct. # noqa: E501 - Type: 0-Lock, 1-Certificate # noqa: E501 + 类型 0-质押 1-赎回 # noqa: E501 :return: The type of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -177,7 +230,7 @@ def type(self): def type(self, type): """Sets the type of this SwapCoinStruct. - Type: 0-Lock, 1-Certificate # noqa: E501 + 类型 0-质押 1-赎回 # noqa: E501 :param type: The type of this SwapCoinStruct. # noqa: E501 :type: int @@ -185,11 +238,34 @@ def type(self, type): self._type = type + @property + def subtype(self): + """Gets the subtype of this SwapCoinStruct. # noqa: E501 + + 子类型 # noqa: E501 + + :return: The subtype of this SwapCoinStruct. # noqa: E501 + :rtype: str + """ + return self._subtype + + @subtype.setter + def subtype(self, subtype): + """Sets the subtype of this SwapCoinStruct. + + 子类型 # noqa: E501 + + :param subtype: The subtype of this SwapCoinStruct. # noqa: E501 + :type: str + """ + + self._subtype = subtype + @property def amount(self): """Gets the amount of this SwapCoinStruct. # noqa: E501 - Amount # noqa: E501 + Amount. # noqa: E501 :return: The amount of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -200,7 +276,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SwapCoinStruct. - Amount # noqa: E501 + Amount. # noqa: E501 :param amount: The amount of this SwapCoinStruct. # noqa: E501 :type: str @@ -212,7 +288,7 @@ def amount(self, amount): def exchange_rate(self): """Gets the exchange_rate of this SwapCoinStruct. # noqa: E501 - Exchange Ratio # noqa: E501 + Exchange Ratio. # noqa: E501 :return: The exchange_rate of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -223,7 +299,7 @@ def exchange_rate(self): def exchange_rate(self, exchange_rate): """Sets the exchange_rate of this SwapCoinStruct. - Exchange Ratio # noqa: E501 + Exchange Ratio. # noqa: E501 :param exchange_rate: The exchange_rate of this SwapCoinStruct. # noqa: E501 :type: str @@ -232,33 +308,79 @@ def exchange_rate(self, exchange_rate): self._exchange_rate = exchange_rate @property - def pid(self): - """Gets the pid of this SwapCoinStruct. # noqa: E501 + def exchange_amount(self): + """Gets the exchange_amount of this SwapCoinStruct. # noqa: E501 - Plan ID # noqa: E501 + 兑换金额 # noqa: E501 - :return: The pid of this SwapCoinStruct. # noqa: E501 + :return: The exchange_amount of this SwapCoinStruct. # noqa: E501 + :rtype: str + """ + return self._exchange_amount + + @exchange_amount.setter + def exchange_amount(self, exchange_amount): + """Sets the exchange_amount of this SwapCoinStruct. + + 兑换金额 # noqa: E501 + + :param exchange_amount: The exchange_amount of this SwapCoinStruct. # noqa: E501 + :type: str + """ + + self._exchange_amount = exchange_amount + + @property + def update_stamp(self): + """Gets the update_stamp of this SwapCoinStruct. # noqa: E501 + + 更新时间戳 # noqa: E501 + + :return: The update_stamp of this SwapCoinStruct. # noqa: E501 :rtype: int """ - return self._pid + return self._update_stamp - @pid.setter - def pid(self, pid): - """Sets the pid of this SwapCoinStruct. + @update_stamp.setter + def update_stamp(self, update_stamp): + """Sets the update_stamp of this SwapCoinStruct. - Plan ID # noqa: E501 + 更新时间戳 # noqa: E501 - :param pid: The pid of this SwapCoinStruct. # noqa: E501 + :param update_stamp: The update_stamp of this SwapCoinStruct. # noqa: E501 :type: int """ - self._pid = pid + self._update_stamp = update_stamp + + @property + def create_stamp(self): + """Gets the create_stamp of this SwapCoinStruct. # noqa: E501 + + Transaction timestamp. # noqa: E501 + + :return: The create_stamp of this SwapCoinStruct. # noqa: E501 + :rtype: int + """ + return self._create_stamp + + @create_stamp.setter + def create_stamp(self, create_stamp): + """Sets the create_stamp of this SwapCoinStruct. + + Transaction timestamp. # noqa: E501 + + :param create_stamp: The create_stamp of this SwapCoinStruct. # noqa: E501 + :type: int + """ + + self._create_stamp = create_stamp @property def status(self): """Gets the status of this SwapCoinStruct. # noqa: E501 - status 1-success # noqa: E501 + status 1-success. # noqa: E501 :return: The status of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -269,7 +391,7 @@ def status(self): def status(self, status): """Sets the status of this SwapCoinStruct. - status 1-success # noqa: E501 + status 1-success. # noqa: E501 :param status: The status of this SwapCoinStruct. # noqa: E501 :type: int @@ -278,27 +400,73 @@ def status(self, status): self._status = status @property - def create_stamp(self): - """Gets the create_stamp of this SwapCoinStruct. # noqa: E501 + def protocol_type(self): + """Gets the protocol_type of this SwapCoinStruct. # noqa: E501 - Transaction timestamp # noqa: E501 + DEFI协议类型 # noqa: E501 - :return: The create_stamp of this SwapCoinStruct. # noqa: E501 + :return: The protocol_type of this SwapCoinStruct. # noqa: E501 :rtype: int """ - return self._create_stamp + return self._protocol_type - @create_stamp.setter - def create_stamp(self, create_stamp): - """Sets the create_stamp of this SwapCoinStruct. + @protocol_type.setter + def protocol_type(self, protocol_type): + """Sets the protocol_type of this SwapCoinStruct. - Transaction timestamp # noqa: E501 + DEFI协议类型 # noqa: E501 - :param create_stamp: The create_stamp of this SwapCoinStruct. # noqa: E501 + :param protocol_type: The protocol_type of this SwapCoinStruct. # noqa: E501 :type: int """ - self._create_stamp = create_stamp + self._protocol_type = protocol_type + + @property + def client_order_id(self): + """Gets the client_order_id of this SwapCoinStruct. # noqa: E501 + + 参考ID # noqa: E501 + + :return: The client_order_id of this SwapCoinStruct. # noqa: E501 + :rtype: str + """ + return self._client_order_id + + @client_order_id.setter + def client_order_id(self, client_order_id): + """Sets the client_order_id of this SwapCoinStruct. + + 参考ID # noqa: E501 + + :param client_order_id: The client_order_id of this SwapCoinStruct. # noqa: E501 + :type: str + """ + + self._client_order_id = client_order_id + + @property + def source(self): + """Gets the source of this SwapCoinStruct. # noqa: E501 + + Order source. # noqa: E501 + + :return: The source of this SwapCoinStruct. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this SwapCoinStruct. + + Order source. # noqa: E501 + + :param source: The source of this SwapCoinStruct. # noqa: E501 + :type: str + """ + + self._source = source def to_dict(self): """Returns the model properties as a dict""" diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py index 3860560..df6d7cb 100644 --- a/gate_api/models/system_time.py +++ b/gate_api/models/system_time.py @@ -57,7 +57,7 @@ def __init__(self, server_time=None, local_vars_configuration=None): # noqa: E5 def server_time(self): """Gets the server_time of this SystemTime. # noqa: E501 - Server current time(ms) # noqa: E501 + Server current time(ms). # noqa: E501 :return: The server_time of this SystemTime. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def server_time(self): def server_time(self, server_time): """Sets the server_time of this SystemTime. - Server current time(ms) # noqa: E501 + Server current time(ms). # noqa: E501 :param server_time: The server_time of this SystemTime. # noqa: E501 :type: int diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py index 2bcd34c..64172b5 100644 --- a/gate_api/models/ticker.py +++ b/gate_api/models/ticker.py @@ -134,7 +134,7 @@ def __init__(self, currency_pair=None, last=None, lowest_ask=None, lowest_size=N def currency_pair(self): """Gets the currency_pair of this Ticker. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this Ticker. # noqa: E501 :rtype: str @@ -145,7 +145,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Ticker. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this Ticker. # noqa: E501 :type: str @@ -157,7 +157,7 @@ def currency_pair(self, currency_pair): def last(self): """Gets the last of this Ticker. # noqa: E501 - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :return: The last of this Ticker. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def last(self): def last(self, last): """Sets the last of this Ticker. - Last trading price # noqa: E501 + Last trading price. # noqa: E501 :param last: The last of this Ticker. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def last(self, last): def lowest_ask(self): """Gets the lowest_ask of this Ticker. # noqa: E501 - Recent lowest ask # noqa: E501 + Recent lowest ask. # noqa: E501 :return: The lowest_ask of this Ticker. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def lowest_ask(self): def lowest_ask(self, lowest_ask): """Sets the lowest_ask of this Ticker. - Recent lowest ask # noqa: E501 + Recent lowest ask. # noqa: E501 :param lowest_ask: The lowest_ask of this Ticker. # noqa: E501 :type: str @@ -226,7 +226,7 @@ def lowest_size(self, lowest_size): def highest_bid(self): """Gets the highest_bid of this Ticker. # noqa: E501 - Recent highest bid # noqa: E501 + Recent highest bid. # noqa: E501 :return: The highest_bid of this Ticker. # noqa: E501 :rtype: str @@ -237,7 +237,7 @@ def highest_bid(self): def highest_bid(self, highest_bid): """Sets the highest_bid of this Ticker. - Recent highest bid # noqa: E501 + Recent highest bid. # noqa: E501 :param highest_bid: The highest_bid of this Ticker. # noqa: E501 :type: str @@ -272,7 +272,7 @@ def highest_size(self, highest_size): def change_percentage(self): """Gets the change_percentage of this Ticker. # noqa: E501 - Change percentage in the last 24h # noqa: E501 + Change percentage in the last 24h. # noqa: E501 :return: The change_percentage of this Ticker. # noqa: E501 :rtype: str @@ -283,7 +283,7 @@ def change_percentage(self): def change_percentage(self, change_percentage): """Sets the change_percentage of this Ticker. - Change percentage in the last 24h # noqa: E501 + Change percentage in the last 24h. # noqa: E501 :param change_percentage: The change_percentage of this Ticker. # noqa: E501 :type: str @@ -295,7 +295,7 @@ def change_percentage(self, change_percentage): def change_utc0(self): """Gets the change_utc0 of this Ticker. # noqa: E501 - utc0 timezone, the percentage change in the last 24 hours # noqa: E501 + utc0 timezone, the percentage change in the last 24 hours. # noqa: E501 :return: The change_utc0 of this Ticker. # noqa: E501 :rtype: str @@ -306,7 +306,7 @@ def change_utc0(self): def change_utc0(self, change_utc0): """Sets the change_utc0 of this Ticker. - utc0 timezone, the percentage change in the last 24 hours # noqa: E501 + utc0 timezone, the percentage change in the last 24 hours. # noqa: E501 :param change_utc0: The change_utc0 of this Ticker. # noqa: E501 :type: str @@ -318,7 +318,7 @@ def change_utc0(self, change_utc0): def change_utc8(self): """Gets the change_utc8 of this Ticker. # noqa: E501 - utc8 timezone, the percentage change in the last 24 hours # noqa: E501 + utc8 timezone, the percentage change in the last 24 hours. # noqa: E501 :return: The change_utc8 of this Ticker. # noqa: E501 :rtype: str @@ -329,7 +329,7 @@ def change_utc8(self): def change_utc8(self, change_utc8): """Sets the change_utc8 of this Ticker. - utc8 timezone, the percentage change in the last 24 hours # noqa: E501 + utc8 timezone, the percentage change in the last 24 hours. # noqa: E501 :param change_utc8: The change_utc8 of this Ticker. # noqa: E501 :type: str @@ -341,7 +341,7 @@ def change_utc8(self, change_utc8): def base_volume(self): """Gets the base_volume of this Ticker. # noqa: E501 - Base currency trade volume in the last 24h # noqa: E501 + Base currency trade volume in the last 24h. # noqa: E501 :return: The base_volume of this Ticker. # noqa: E501 :rtype: str @@ -352,7 +352,7 @@ def base_volume(self): def base_volume(self, base_volume): """Sets the base_volume of this Ticker. - Base currency trade volume in the last 24h # noqa: E501 + Base currency trade volume in the last 24h. # noqa: E501 :param base_volume: The base_volume of this Ticker. # noqa: E501 :type: str @@ -364,7 +364,7 @@ def base_volume(self, base_volume): def quote_volume(self): """Gets the quote_volume of this Ticker. # noqa: E501 - Quote currency trade volume in the last 24h # noqa: E501 + Quote currency trade volume in the last 24h. # noqa: E501 :return: The quote_volume of this Ticker. # noqa: E501 :rtype: str @@ -375,7 +375,7 @@ def quote_volume(self): def quote_volume(self, quote_volume): """Sets the quote_volume of this Ticker. - Quote currency trade volume in the last 24h # noqa: E501 + Quote currency trade volume in the last 24h. # noqa: E501 :param quote_volume: The quote_volume of this Ticker. # noqa: E501 :type: str @@ -387,7 +387,7 @@ def quote_volume(self, quote_volume): def high_24h(self): """Gets the high_24h of this Ticker. # noqa: E501 - Highest price in 24h # noqa: E501 + Highest price in 24h. # noqa: E501 :return: The high_24h of this Ticker. # noqa: E501 :rtype: str @@ -398,7 +398,7 @@ def high_24h(self): def high_24h(self, high_24h): """Sets the high_24h of this Ticker. - Highest price in 24h # noqa: E501 + Highest price in 24h. # noqa: E501 :param high_24h: The high_24h of this Ticker. # noqa: E501 :type: str @@ -410,7 +410,7 @@ def high_24h(self, high_24h): def low_24h(self): """Gets the low_24h of this Ticker. # noqa: E501 - Lowest price in 24h # noqa: E501 + Lowest price in 24h. # noqa: E501 :return: The low_24h of this Ticker. # noqa: E501 :rtype: str @@ -421,7 +421,7 @@ def low_24h(self): def low_24h(self, low_24h): """Sets the low_24h of this Ticker. - Lowest price in 24h # noqa: E501 + Lowest price in 24h. # noqa: E501 :param low_24h: The low_24h of this Ticker. # noqa: E501 :type: str @@ -433,7 +433,7 @@ def low_24h(self, low_24h): def etf_net_value(self): """Gets the etf_net_value of this Ticker. # noqa: E501 - ETF net value # noqa: E501 + ETF net value. # noqa: E501 :return: The etf_net_value of this Ticker. # noqa: E501 :rtype: str @@ -444,7 +444,7 @@ def etf_net_value(self): def etf_net_value(self, etf_net_value): """Sets the etf_net_value of this Ticker. - ETF net value # noqa: E501 + ETF net value. # noqa: E501 :param etf_net_value: The etf_net_value of this Ticker. # noqa: E501 :type: str @@ -456,7 +456,7 @@ def etf_net_value(self, etf_net_value): def etf_pre_net_value(self): """Gets the etf_pre_net_value of this Ticker. # noqa: E501 - ETF previous net value at re-balancing time # noqa: E501 + ETF previous net value at re-balancing time. # noqa: E501 :return: The etf_pre_net_value of this Ticker. # noqa: E501 :rtype: str @@ -467,7 +467,7 @@ def etf_pre_net_value(self): def etf_pre_net_value(self, etf_pre_net_value): """Sets the etf_pre_net_value of this Ticker. - ETF previous net value at re-balancing time # noqa: E501 + ETF previous net value at re-balancing time. # noqa: E501 :param etf_pre_net_value: The etf_pre_net_value of this Ticker. # noqa: E501 :type: str @@ -479,7 +479,7 @@ def etf_pre_net_value(self, etf_pre_net_value): def etf_pre_timestamp(self): """Gets the etf_pre_timestamp of this Ticker. # noqa: E501 - ETF previous re-balancing time # noqa: E501 + ETF previous re-balancing time. # noqa: E501 :return: The etf_pre_timestamp of this Ticker. # noqa: E501 :rtype: int @@ -490,7 +490,7 @@ def etf_pre_timestamp(self): def etf_pre_timestamp(self, etf_pre_timestamp): """Sets the etf_pre_timestamp of this Ticker. - ETF previous re-balancing time # noqa: E501 + ETF previous re-balancing time. # noqa: E501 :param etf_pre_timestamp: The etf_pre_timestamp of this Ticker. # noqa: E501 :type: int @@ -502,7 +502,7 @@ def etf_pre_timestamp(self, etf_pre_timestamp): def etf_leverage(self): """Gets the etf_leverage of this Ticker. # noqa: E501 - ETF current leverage # noqa: E501 + ETF current leverage. # noqa: E501 :return: The etf_leverage of this Ticker. # noqa: E501 :rtype: str @@ -513,7 +513,7 @@ def etf_leverage(self): def etf_leverage(self, etf_leverage): """Sets the etf_leverage of this Ticker. - ETF current leverage # noqa: E501 + ETF current leverage. # noqa: E501 :param etf_leverage: The etf_leverage of this Ticker. # noqa: E501 :type: str diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py index 87eff38..481440f 100644 --- a/gate_api/models/trade.py +++ b/gate_api/models/trade.py @@ -132,7 +132,7 @@ def __init__(self, id=None, create_time=None, create_time_ms=None, currency_pair def id(self): """Gets the id of this Trade. # noqa: E501 - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :return: The id of this Trade. # noqa: E501 :rtype: str @@ -143,7 +143,7 @@ def id(self): def id(self, id): """Sets the id of this Trade. - Trade ID # noqa: E501 + Trade ID. # noqa: E501 :param id: The id of this Trade. # noqa: E501 :type: str @@ -155,7 +155,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this Trade. # noqa: E501 - Trading time # noqa: E501 + Trading time. # noqa: E501 :return: The create_time of this Trade. # noqa: E501 :rtype: str @@ -166,7 +166,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this Trade. - Trading time # noqa: E501 + Trading time. # noqa: E501 :param create_time: The create_time of this Trade. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def create_time(self, create_time): def create_time_ms(self): """Gets the create_time_ms of this Trade. # noqa: E501 - Trading time, with millisecond precision # noqa: E501 + Trading time, with millisecond precision. # noqa: E501 :return: The create_time_ms of this Trade. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this Trade. - Trading time, with millisecond precision # noqa: E501 + Trading time, with millisecond precision. # noqa: E501 :param create_time_ms: The create_time_ms of this Trade. # noqa: E501 :type: str @@ -201,7 +201,7 @@ def create_time_ms(self, create_time_ms): def currency_pair(self): """Gets the currency_pair of this Trade. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this Trade. # noqa: E501 :rtype: str @@ -212,7 +212,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Trade. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this Trade. # noqa: E501 :type: str @@ -224,7 +224,7 @@ def currency_pair(self, currency_pair): def side(self): """Gets the side of this Trade. # noqa: E501 - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :return: The side of this Trade. # noqa: E501 :rtype: str @@ -235,7 +235,7 @@ def side(self): def side(self, side): """Sets the side of this Trade. - Buy or sell order # noqa: E501 + Buy or sell order. # noqa: E501 :param side: The side of this Trade. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def side(self, side): def role(self): """Gets the role of this Trade. # noqa: E501 - Trade role. No value in public endpoints # noqa: E501 + Trade role. No value in public endpoints. # noqa: E501 :return: The role of this Trade. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def role(self): def role(self, role): """Sets the role of this Trade. - Trade role. No value in public endpoints # noqa: E501 + Trade role. No value in public endpoints. # noqa: E501 :param role: The role of this Trade. # noqa: E501 :type: str @@ -282,7 +282,7 @@ def role(self, role): def amount(self): """Gets the amount of this Trade. # noqa: E501 - Trade amount # noqa: E501 + Trade amount. # noqa: E501 :return: The amount of this Trade. # noqa: E501 :rtype: str @@ -293,7 +293,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Trade. - Trade amount # noqa: E501 + Trade amount. # noqa: E501 :param amount: The amount of this Trade. # noqa: E501 :type: str @@ -305,7 +305,7 @@ def amount(self, amount): def price(self): """Gets the price of this Trade. # noqa: E501 - Order price # noqa: E501 + Order price. # noqa: E501 :return: The price of this Trade. # noqa: E501 :rtype: str @@ -316,7 +316,7 @@ def price(self): def price(self, price): """Sets the price of this Trade. - Order price # noqa: E501 + Order price. # noqa: E501 :param price: The price of this Trade. # noqa: E501 :type: str @@ -328,7 +328,7 @@ def price(self, price): def order_id(self): """Gets the order_id of this Trade. # noqa: E501 - Related order ID. No value in public endpoints # noqa: E501 + Related order ID. No value in public endpoints. # noqa: E501 :return: The order_id of this Trade. # noqa: E501 :rtype: str @@ -339,7 +339,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this Trade. - Related order ID. No value in public endpoints # noqa: E501 + Related order ID. No value in public endpoints. # noqa: E501 :param order_id: The order_id of this Trade. # noqa: E501 :type: str @@ -351,7 +351,7 @@ def order_id(self, order_id): def fee(self): """Gets the fee of this Trade. # noqa: E501 - Fee deducted. No value in public endpoints # noqa: E501 + Fee deducted. No value in public endpoints. # noqa: E501 :return: The fee of this Trade. # noqa: E501 :rtype: str @@ -362,7 +362,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this Trade. - Fee deducted. No value in public endpoints # noqa: E501 + Fee deducted. No value in public endpoints. # noqa: E501 :param fee: The fee of this Trade. # noqa: E501 :type: str @@ -374,7 +374,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this Trade. # noqa: E501 - Fee currency unit. No value in public endpoints # noqa: E501 + Fee currency unit. No value in public endpoints. # noqa: E501 :return: The fee_currency of this Trade. # noqa: E501 :rtype: str @@ -385,7 +385,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this Trade. - Fee currency unit. No value in public endpoints # noqa: E501 + Fee currency unit. No value in public endpoints. # noqa: E501 :param fee_currency: The fee_currency of this Trade. # noqa: E501 :type: str @@ -397,7 +397,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this Trade. # noqa: E501 - Points used to deduct fee. No value in public endpoints # noqa: E501 + Points used to deduct fee. No value in public endpoints. # noqa: E501 :return: The point_fee of this Trade. # noqa: E501 :rtype: str @@ -408,7 +408,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this Trade. - Points used to deduct fee. No value in public endpoints # noqa: E501 + Points used to deduct fee. No value in public endpoints. # noqa: E501 :param point_fee: The point_fee of this Trade. # noqa: E501 :type: str @@ -420,7 +420,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this Trade. # noqa: E501 - GT used to deduct fee. No value in public endpoints # noqa: E501 + GT used to deduct fee. No value in public endpoints. # noqa: E501 :return: The gt_fee of this Trade. # noqa: E501 :rtype: str @@ -431,7 +431,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this Trade. - GT used to deduct fee. No value in public endpoints # noqa: E501 + GT used to deduct fee. No value in public endpoints. # noqa: E501 :param gt_fee: The gt_fee of this Trade. # noqa: E501 :type: str @@ -443,7 +443,7 @@ def gt_fee(self, gt_fee): def amend_text(self): """Gets the amend_text of this Trade. # noqa: E501 - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :return: The amend_text of this Trade. # noqa: E501 :rtype: str @@ -454,7 +454,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this Trade. - The custom data that the user remarked when amending the order # noqa: E501 + The custom data that the user remarked when amending the order. # noqa: E501 :param amend_text: The amend_text of this Trade. # noqa: E501 :type: str @@ -489,7 +489,7 @@ def sequence_id(self, sequence_id): def text(self): """Gets the text of this Trade. # noqa: E501 - User defined information. No value in public endpoints # noqa: E501 + User defined information. No value in public endpoints. # noqa: E501 :return: The text of this Trade. # noqa: E501 :rtype: str @@ -500,7 +500,7 @@ def text(self): def text(self, text): """Sets the text of this Trade. - User defined information. No value in public endpoints # noqa: E501 + User defined information. No value in public endpoints. # noqa: E501 :param text: The text of this Trade. # noqa: E501 :type: str diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py index 7d3de32..6edf8a6 100644 --- a/gate_api/models/trade_fee.py +++ b/gate_api/models/trade_fee.py @@ -117,7 +117,7 @@ def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=Non def user_id(self): """Gets the user_id of this TradeFee. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this TradeFee. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this TradeFee. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this TradeFee. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def user_id(self, user_id): def taker_fee(self): """Gets the taker_fee of this TradeFee. # noqa: E501 - taker fee rate # noqa: E501 + taker fee rate. # noqa: E501 :return: The taker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -151,7 +151,7 @@ def taker_fee(self): def taker_fee(self, taker_fee): """Sets the taker_fee of this TradeFee. - taker fee rate # noqa: E501 + taker fee rate. # noqa: E501 :param taker_fee: The taker_fee of this TradeFee. # noqa: E501 :type: str @@ -163,7 +163,7 @@ def taker_fee(self, taker_fee): def maker_fee(self): """Gets the maker_fee of this TradeFee. # noqa: E501 - maker fee rate # noqa: E501 + maker fee rate. # noqa: E501 :return: The maker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def maker_fee(self): def maker_fee(self, maker_fee): """Sets the maker_fee of this TradeFee. - maker fee rate # noqa: E501 + maker fee rate. # noqa: E501 :param maker_fee: The maker_fee of this TradeFee. # noqa: E501 :type: str @@ -186,7 +186,7 @@ def maker_fee(self, maker_fee): def gt_discount(self): """Gets the gt_discount of this TradeFee. # noqa: E501 - If GT deduction is enabled # noqa: E501 + If GT deduction is enabled. # noqa: E501 :return: The gt_discount of this TradeFee. # noqa: E501 :rtype: bool @@ -197,7 +197,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this TradeFee. - If GT deduction is enabled # noqa: E501 + If GT deduction is enabled. # noqa: E501 :param gt_discount: The gt_discount of this TradeFee. # noqa: E501 :type: bool @@ -255,7 +255,7 @@ def gt_maker_fee(self, gt_maker_fee): def loan_fee(self): """Gets the loan_fee of this TradeFee. # noqa: E501 - Loan fee rate of margin lending # noqa: E501 + Loan fee rate of margin lending. # noqa: E501 :return: The loan_fee of this TradeFee. # noqa: E501 :rtype: str @@ -266,7 +266,7 @@ def loan_fee(self): def loan_fee(self, loan_fee): """Sets the loan_fee of this TradeFee. - Loan fee rate of margin lending # noqa: E501 + Loan fee rate of margin lending. # noqa: E501 :param loan_fee: The loan_fee of this TradeFee. # noqa: E501 :type: str @@ -278,7 +278,7 @@ def loan_fee(self, loan_fee): def point_type(self): """Gets the point_type of this TradeFee. # noqa: E501 - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 :return: The point_type of this TradeFee. # noqa: E501 :rtype: str @@ -289,7 +289,7 @@ def point_type(self): def point_type(self, point_type): """Sets the point_type of this TradeFee. - Point type. 0 - Initial version. 1 - new version since 202009 # noqa: E501 + Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 :param point_type: The point_type of this TradeFee. # noqa: E501 :type: str @@ -301,7 +301,7 @@ def point_type(self, point_type): def futures_taker_fee(self): """Gets the futures_taker_fee of this TradeFee. # noqa: E501 - Futures trading taker fee # noqa: E501 + Futures trading taker fee. # noqa: E501 :return: The futures_taker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -312,7 +312,7 @@ def futures_taker_fee(self): def futures_taker_fee(self, futures_taker_fee): """Sets the futures_taker_fee of this TradeFee. - Futures trading taker fee # noqa: E501 + Futures trading taker fee. # noqa: E501 :param futures_taker_fee: The futures_taker_fee of this TradeFee. # noqa: E501 :type: str @@ -324,7 +324,7 @@ def futures_taker_fee(self, futures_taker_fee): def futures_maker_fee(self): """Gets the futures_maker_fee of this TradeFee. # noqa: E501 - Future trading maker fee # noqa: E501 + Future trading maker fee. # noqa: E501 :return: The futures_maker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -335,7 +335,7 @@ def futures_maker_fee(self): def futures_maker_fee(self, futures_maker_fee): """Sets the futures_maker_fee of this TradeFee. - Future trading maker fee # noqa: E501 + Future trading maker fee. # noqa: E501 :param futures_maker_fee: The futures_maker_fee of this TradeFee. # noqa: E501 :type: str @@ -347,7 +347,7 @@ def futures_maker_fee(self, futures_maker_fee): def delivery_taker_fee(self): """Gets the delivery_taker_fee of this TradeFee. # noqa: E501 - Delivery trading taker fee # noqa: E501 + Delivery trading taker fee. # noqa: E501 :return: The delivery_taker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -358,7 +358,7 @@ def delivery_taker_fee(self): def delivery_taker_fee(self, delivery_taker_fee): """Sets the delivery_taker_fee of this TradeFee. - Delivery trading taker fee # noqa: E501 + Delivery trading taker fee. # noqa: E501 :param delivery_taker_fee: The delivery_taker_fee of this TradeFee. # noqa: E501 :type: str @@ -370,7 +370,7 @@ def delivery_taker_fee(self, delivery_taker_fee): def delivery_maker_fee(self): """Gets the delivery_maker_fee of this TradeFee. # noqa: E501 - Delivery trading maker fee # noqa: E501 + Delivery trading maker fee. # noqa: E501 :return: The delivery_maker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -381,7 +381,7 @@ def delivery_maker_fee(self): def delivery_maker_fee(self, delivery_maker_fee): """Sets the delivery_maker_fee of this TradeFee. - Delivery trading maker fee # noqa: E501 + Delivery trading maker fee. # noqa: E501 :param delivery_maker_fee: The delivery_maker_fee of this TradeFee. # noqa: E501 :type: str diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py index b8b08c0..9c0e435 100644 --- a/gate_api/models/transaction_id.py +++ b/gate_api/models/transaction_id.py @@ -57,7 +57,7 @@ def __init__(self, tx_id=None, local_vars_configuration=None): # noqa: E501 def tx_id(self): """Gets the tx_id of this TransactionID. # noqa: E501 - Order id # noqa: E501 + Order id. # noqa: E501 :return: The tx_id of this TransactionID. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def tx_id(self): def tx_id(self, tx_id): """Sets the tx_id of this TransactionID. - Order id # noqa: E501 + Order id. # noqa: E501 :param tx_id: The tx_id of this TransactionID. # noqa: E501 :type: int diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py index e9b6eba..1cd1b15 100644 --- a/gate_api/models/transfer.py +++ b/gate_api/models/transfer.py @@ -103,7 +103,7 @@ def currency(self, currency): def _from(self): """Gets the _from of this Transfer. # noqa: E501 - Account to transfer from # noqa: E501 + Account to transfer from. # noqa: E501 :return: The _from of this Transfer. # noqa: E501 :rtype: str @@ -114,7 +114,7 @@ def _from(self): def _from(self, _from): """Sets the _from of this Transfer. - Account to transfer from # noqa: E501 + Account to transfer from. # noqa: E501 :param _from: The _from of this Transfer. # noqa: E501 :type: str @@ -134,7 +134,7 @@ def _from(self, _from): def to(self): """Gets the to of this Transfer. # noqa: E501 - Account to transfer to # noqa: E501 + Account to transfer to. # noqa: E501 :return: The to of this Transfer. # noqa: E501 :rtype: str @@ -145,7 +145,7 @@ def to(self): def to(self, to): """Sets the to of this Transfer. - Account to transfer to # noqa: E501 + Account to transfer to. # noqa: E501 :param to: The to of this Transfer. # noqa: E501 :type: str @@ -165,7 +165,7 @@ def to(self, to): def amount(self): """Gets the amount of this Transfer. # noqa: E501 - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :return: The amount of this Transfer. # noqa: E501 :rtype: str @@ -176,7 +176,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Transfer. - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :param amount: The amount of this Transfer. # noqa: E501 :type: str @@ -190,7 +190,7 @@ def amount(self, amount): def currency_pair(self): """Gets the currency_pair of this Transfer. # noqa: E501 - Margin currency pair. Required if transfer from or to margin account # noqa: E501 + Margin currency pair. Required if transfer from or to margin account. # noqa: E501 :return: The currency_pair of this Transfer. # noqa: E501 :rtype: str @@ -201,7 +201,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Transfer. - Margin currency pair. Required if transfer from or to margin account # noqa: E501 + Margin currency pair. Required if transfer from or to margin account. # noqa: E501 :param currency_pair: The currency_pair of this Transfer. # noqa: E501 :type: str diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py index 05b319f..a9ffd50 100644 --- a/gate_api/models/transfer_order_status.py +++ b/gate_api/models/transfer_order_status.py @@ -62,7 +62,7 @@ def __init__(self, tx_id=None, status=None, local_vars_configuration=None): # n def tx_id(self): """Gets the tx_id of this TransferOrderStatus. # noqa: E501 - Order id # noqa: E501 + Order id. # noqa: E501 :return: The tx_id of this TransferOrderStatus. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def tx_id(self): def tx_id(self, tx_id): """Sets the tx_id of this TransferOrderStatus. - Order id # noqa: E501 + Order id. # noqa: E501 :param tx_id: The tx_id of this TransferOrderStatus. # noqa: E501 :type: str diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py index 37b706e..897dda6 100644 --- a/gate_api/models/transferables_result.py +++ b/gate_api/models/transferables_result.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this TransferablesResult. # noqa: E501 - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :return: The currency of this TransferablesResult. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this TransferablesResult. - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :param currency: The currency of this TransferablesResult. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this TransferablesResult. # noqa: E501 - The maximum amount that can be transferred out # noqa: E501 + The maximum amount that can be transferred out. # noqa: E501 :return: The amount of this TransferablesResult. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this TransferablesResult. - The maximum amount that can be transferred out # noqa: E501 + The maximum amount that can be transferred out. # noqa: E501 :param amount: The amount of this TransferablesResult. # noqa: E501 :type: str diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py index d474a2e..1d7bf67 100644 --- a/gate_api/models/trigger_order_response.py +++ b/gate_api/models/trigger_order_response.py @@ -57,7 +57,7 @@ def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 def id(self): """Gets the id of this TriggerOrderResponse. # noqa: E501 - Auto order ID # noqa: E501 + Auto order ID. # noqa: E501 :return: The id of this TriggerOrderResponse. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def id(self): def id(self, id): """Sets the id of this TriggerOrderResponse. - Auto order ID # noqa: E501 + Auto order ID. # noqa: E501 :param id: The id of this TriggerOrderResponse. # noqa: E501 :type: int diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py index a6986ea..481dbdc 100644 --- a/gate_api/models/trigger_time.py +++ b/gate_api/models/trigger_time.py @@ -57,7 +57,7 @@ def __init__(self, trigger_time=None, local_vars_configuration=None): # noqa: E def trigger_time(self): """Gets the trigger_time of this TriggerTime. # noqa: E501 - Timestamp of the end of the countdown, in milliseconds # noqa: E501 + Timestamp of the end of the countdown, in milliseconds. # noqa: E501 :return: The trigger_time of this TriggerTime. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def trigger_time(self): def trigger_time(self, trigger_time): """Sets the trigger_time of this TriggerTime. - Timestamp of the end of the countdown, in milliseconds # noqa: E501 + Timestamp of the end of the countdown, in milliseconds. # noqa: E501 :param trigger_time: The trigger_time of this TriggerTime. # noqa: E501 :type: int diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py index c0c1249..d84d7a2 100644 --- a/gate_api/models/uid_push_order.py +++ b/gate_api/models/uid_push_order.py @@ -97,7 +97,7 @@ def __init__(self, id=None, push_uid=None, receive_uid=None, currency=None, amou def id(self): """Gets the id of this UidPushOrder. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this UidPushOrder. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def id(self): def id(self, id): """Sets the id of this UidPushOrder. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this UidPushOrder. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def id(self, id): def push_uid(self): """Gets the push_uid of this UidPushOrder. # noqa: E501 - Initiator User ID # noqa: E501 + Initiator User ID. # noqa: E501 :return: The push_uid of this UidPushOrder. # noqa: E501 :rtype: int @@ -131,7 +131,7 @@ def push_uid(self): def push_uid(self, push_uid): """Sets the push_uid of this UidPushOrder. - Initiator User ID # noqa: E501 + Initiator User ID. # noqa: E501 :param push_uid: The push_uid of this UidPushOrder. # noqa: E501 :type: int @@ -143,7 +143,7 @@ def push_uid(self, push_uid): def receive_uid(self): """Gets the receive_uid of this UidPushOrder. # noqa: E501 - Recipient User ID # noqa: E501 + Recipient User ID. # noqa: E501 :return: The receive_uid of this UidPushOrder. # noqa: E501 :rtype: int @@ -154,7 +154,7 @@ def receive_uid(self): def receive_uid(self, receive_uid): """Sets the receive_uid of this UidPushOrder. - Recipient User ID # noqa: E501 + Recipient User ID. # noqa: E501 :param receive_uid: The receive_uid of this UidPushOrder. # noqa: E501 :type: int @@ -166,7 +166,7 @@ def receive_uid(self, receive_uid): def currency(self): """Gets the currency of this UidPushOrder. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UidPushOrder. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UidPushOrder. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UidPushOrder. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UidPushOrder. # noqa: E501 - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :return: The amount of this UidPushOrder. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UidPushOrder. - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :param amount: The amount of this UidPushOrder. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def amount(self, amount): def create_time(self): """Gets the create_time of this UidPushOrder. # noqa: E501 - Creation time # noqa: E501 + Creation time. # noqa: E501 :return: The create_time of this UidPushOrder. # noqa: E501 :rtype: int @@ -223,7 +223,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UidPushOrder. - Creation time # noqa: E501 + Creation time. # noqa: E501 :param create_time: The create_time of this UidPushOrder. # noqa: E501 :type: int @@ -258,7 +258,7 @@ def status(self, status): def message(self): """Gets the message of this UidPushOrder. # noqa: E501 - PENDING Reason Tips # noqa: E501 + PENDING Reason Tips. # noqa: E501 :return: The message of this UidPushOrder. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def message(self): def message(self, message): """Sets the message of this UidPushOrder. - PENDING Reason Tips # noqa: E501 + PENDING Reason Tips. # noqa: E501 :param message: The message of this UidPushOrder. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def message(self, message): def transaction_type(self): """Gets the transaction_type of this UidPushOrder. # noqa: E501 - Order Type # noqa: E501 + Order Type. # noqa: E501 :return: The transaction_type of this UidPushOrder. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def transaction_type(self): def transaction_type(self, transaction_type): """Sets the transaction_type of this UidPushOrder. - Order Type # noqa: E501 + Order Type. # noqa: E501 :param transaction_type: The transaction_type of this UidPushOrder. # noqa: E501 :type: str diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py index ff1598d..023be07 100644 --- a/gate_api/models/uid_push_withdrawal.py +++ b/gate_api/models/uid_push_withdrawal.py @@ -64,7 +64,7 @@ def __init__(self, receive_uid=None, currency=None, amount=None, local_vars_conf def receive_uid(self): """Gets the receive_uid of this UidPushWithdrawal. # noqa: E501 - Recipient UID # noqa: E501 + Recipient UID. # noqa: E501 :return: The receive_uid of this UidPushWithdrawal. # noqa: E501 :rtype: int @@ -75,7 +75,7 @@ def receive_uid(self): def receive_uid(self, receive_uid): """Sets the receive_uid of this UidPushWithdrawal. - Recipient UID # noqa: E501 + Recipient UID. # noqa: E501 :param receive_uid: The receive_uid of this UidPushWithdrawal. # noqa: E501 :type: int @@ -89,7 +89,7 @@ def receive_uid(self, receive_uid): def currency(self): """Gets the currency of this UidPushWithdrawal. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UidPushWithdrawal. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UidPushWithdrawal. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UidPushWithdrawal. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UidPushWithdrawal. # noqa: E501 - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :return: The amount of this UidPushWithdrawal. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UidPushWithdrawal. - Transfer amount # noqa: E501 + Transfer amount. # noqa: E501 :param amount: The amount of this UidPushWithdrawal. # noqa: E501 :type: str diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py index 9c1d14d..464885e 100644 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -57,7 +57,7 @@ def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 def id(self): """Gets the id of this UidPushWithdrawalResp. # noqa: E501 - Order ID # noqa: E501 + Order ID. # noqa: E501 :return: The id of this UidPushWithdrawalResp. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def id(self): def id(self, id): """Sets the id of this UidPushWithdrawalResp. - Order ID # noqa: E501 + Order ID. # noqa: E501 :param id: The id of this UidPushWithdrawalResp. # noqa: E501 :type: int diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py index 925efda..5f9accf 100644 --- a/gate_api/models/uni_currency.py +++ b/gate_api/models/uni_currency.py @@ -77,7 +77,7 @@ def __init__(self, currency=None, min_lend_amount=None, max_lend_amount=None, ma def currency(self): """Gets the currency of this UniCurrency. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UniCurrency. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniCurrency. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UniCurrency. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def min_lend_amount(self, min_lend_amount): def max_lend_amount(self): """Gets the max_lend_amount of this UniCurrency. # noqa: E501 - The total maximum lending amount, in USDT # noqa: E501 + The total maximum lending amount, in USDT. # noqa: E501 :return: The max_lend_amount of this UniCurrency. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def max_lend_amount(self): def max_lend_amount(self, max_lend_amount): """Sets the max_lend_amount of this UniCurrency. - The total maximum lending amount, in USDT # noqa: E501 + The total maximum lending amount, in USDT. # noqa: E501 :param max_lend_amount: The max_lend_amount of this UniCurrency. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def max_lend_amount(self, max_lend_amount): def max_rate(self): """Gets the max_rate of this UniCurrency. # noqa: E501 - Maximum rate (Hourly) # noqa: E501 + Maximum rate (Hourly). # noqa: E501 :return: The max_rate of this UniCurrency. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def max_rate(self): def max_rate(self, max_rate): """Sets the max_rate of this UniCurrency. - Maximum rate (Hourly) # noqa: E501 + Maximum rate (Hourly). # noqa: E501 :param max_rate: The max_rate of this UniCurrency. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def max_rate(self, max_rate): def min_rate(self): """Gets the min_rate of this UniCurrency. # noqa: E501 - Minimum rate (Hourly) # noqa: E501 + Minimum rate (Hourly). # noqa: E501 :return: The min_rate of this UniCurrency. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def min_rate(self): def min_rate(self, min_rate): """Sets the min_rate of this UniCurrency. - Minimum rate (Hourly) # noqa: E501 + Minimum rate (Hourly). # noqa: E501 :param min_rate: The min_rate of this UniCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py index a7c870d..9511bf7 100644 --- a/gate_api/models/uni_currency_interest.py +++ b/gate_api/models/uni_currency_interest.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, interest_status=None, local_vars_configuration def currency(self): """Gets the currency of this UniCurrencyInterest. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UniCurrencyInterest. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniCurrencyInterest. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UniCurrencyInterest. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def interest_status(self): """Gets the interest_status of this UniCurrencyInterest. # noqa: E501 - Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501 :return: The interest_status of this UniCurrencyInterest. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def interest_status(self): def interest_status(self, interest_status): """Sets the interest_status of this UniCurrencyInterest. - Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501 :param interest_status: The interest_status of this UniCurrencyInterest. # noqa: E501 :type: str diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py index 9e5c16f..3e39ad9 100644 --- a/gate_api/models/uni_currency_pair.py +++ b/gate_api/models/uni_currency_pair.py @@ -72,7 +72,7 @@ def __init__(self, currency_pair=None, base_min_borrow_amount=None, quote_min_bo def currency_pair(self): """Gets the currency_pair of this UniCurrencyPair. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this UniCurrencyPair. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniCurrencyPair. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this UniCurrencyPair. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency_pair(self, currency_pair): def base_min_borrow_amount(self): """Gets the base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - Minimum borrow amount of base currency # noqa: E501 + Minimum borrow amount of base currency. # noqa: E501 :return: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def base_min_borrow_amount(self): def base_min_borrow_amount(self, base_min_borrow_amount): """Sets the base_min_borrow_amount of this UniCurrencyPair. - Minimum borrow amount of base currency # noqa: E501 + Minimum borrow amount of base currency. # noqa: E501 :param base_min_borrow_amount: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def base_min_borrow_amount(self, base_min_borrow_amount): def quote_min_borrow_amount(self): """Gets the quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - Minimum borrow amount of quote currency # noqa: E501 + Minimum borrow amount of quote currency. # noqa: E501 :return: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def quote_min_borrow_amount(self): def quote_min_borrow_amount(self, quote_min_borrow_amount): """Sets the quote_min_borrow_amount of this UniCurrencyPair. - Minimum borrow amount of quote currency # noqa: E501 + Minimum borrow amount of quote currency. # noqa: E501 :param quote_min_borrow_amount: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :type: str @@ -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 + Position leverage. # 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 + Position leverage. # noqa: E501 :param leverage: The leverage of this UniCurrencyPair. # noqa: E501 :type: str diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py index 002cdd9..0be8bec 100644 --- a/gate_api/models/uni_interest_record.py +++ b/gate_api/models/uni_interest_record.py @@ -82,7 +82,7 @@ def __init__(self, status=None, currency=None, actual_rate=None, interest=None, def status(self): """Gets the status of this UniInterestRecord. # noqa: E501 - Status: 0 - fail, 1 - success # noqa: E501 + Status: 0 - fail, 1 - success. # noqa: E501 :return: The status of this UniInterestRecord. # noqa: E501 :rtype: int @@ -93,7 +93,7 @@ def status(self): def status(self, status): """Sets the status of this UniInterestRecord. - Status: 0 - fail, 1 - success # noqa: E501 + Status: 0 - fail, 1 - success. # noqa: E501 :param status: The status of this UniInterestRecord. # noqa: E501 :type: int @@ -105,7 +105,7 @@ def status(self, status): def currency(self): """Gets the currency of this UniInterestRecord. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UniInterestRecord. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniInterestRecord. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UniInterestRecord. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def currency(self, currency): def actual_rate(self): """Gets the actual_rate of this UniInterestRecord. # noqa: E501 - Actual Rate # noqa: E501 + Actual Rate. # noqa: E501 :return: The actual_rate of this UniInterestRecord. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def actual_rate(self): def actual_rate(self, actual_rate): """Sets the actual_rate of this UniInterestRecord. - Actual Rate # noqa: E501 + Actual Rate. # noqa: E501 :param actual_rate: The actual_rate of this UniInterestRecord. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def actual_rate(self, actual_rate): def interest(self): """Gets the interest of this UniInterestRecord. # noqa: E501 - Interest # noqa: E501 + Interest. # noqa: E501 :return: The interest of this UniInterestRecord. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this UniInterestRecord. - Interest # noqa: E501 + Interest. # noqa: E501 :param interest: The interest of this UniInterestRecord. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def interest(self, interest): def interest_status(self): """Gets the interest_status of this UniInterestRecord. # noqa: E501 - Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501 :return: The interest_status of this UniInterestRecord. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def interest_status(self): def interest_status(self, interest_status): """Sets the interest_status of this UniInterestRecord. - Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501 :param interest_status: The interest_status of this UniInterestRecord. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def interest_status(self, interest_status): def create_time(self): """Gets the create_time of this UniInterestRecord. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this UniInterestRecord. # noqa: E501 :rtype: int @@ -208,7 +208,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniInterestRecord. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this UniInterestRecord. # noqa: E501 :type: int diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py index 5fba2cb..16bd0ae 100644 --- a/gate_api/models/uni_lend.py +++ b/gate_api/models/uni_lend.py @@ -102,7 +102,7 @@ def __init__(self, currency=None, current_amount=None, amount=None, lent_amount= def currency(self): """Gets the currency of this UniLend. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UniLend. # noqa: E501 :rtype: str @@ -113,7 +113,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLend. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UniLend. # noqa: E501 :type: str @@ -125,7 +125,7 @@ def currency(self, currency): def current_amount(self): """Gets the current_amount of this UniLend. # noqa: E501 - Current amount # noqa: E501 + Current amount. # noqa: E501 :return: The current_amount of this UniLend. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def current_amount(self): def current_amount(self, current_amount): """Sets the current_amount of this UniLend. - Current amount # noqa: E501 + Current amount. # noqa: E501 :param current_amount: The current_amount of this UniLend. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def current_amount(self, current_amount): def amount(self): """Gets the amount of this UniLend. # noqa: E501 - Total amount # noqa: E501 + Total amount. # noqa: E501 :return: The amount of this UniLend. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLend. - Total amount # noqa: E501 + Total amount. # noqa: E501 :param amount: The amount of this UniLend. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def amount(self, amount): def lent_amount(self): """Gets the lent_amount of this UniLend. # noqa: E501 - Lent amount # noqa: E501 + Lent amount. # noqa: E501 :return: The lent_amount of this UniLend. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def lent_amount(self): def lent_amount(self, lent_amount): """Sets the lent_amount of this UniLend. - Lent amount # noqa: E501 + Lent amount. # noqa: E501 :param lent_amount: The lent_amount of this UniLend. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def lent_amount(self, lent_amount): def frozen_amount(self): """Gets the frozen_amount of this UniLend. # noqa: E501 - Frozen amount # noqa: E501 + Frozen amount. # noqa: E501 :return: The frozen_amount of this UniLend. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def frozen_amount(self): def frozen_amount(self, frozen_amount): """Sets the frozen_amount of this UniLend. - Frozen amount # noqa: E501 + Frozen amount. # noqa: E501 :param frozen_amount: The frozen_amount of this UniLend. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def frozen_amount(self, frozen_amount): def min_rate(self): """Gets the min_rate of this UniLend. # noqa: E501 - Minimum interest rate # noqa: E501 + Minimum interest rate. # noqa: E501 :return: The min_rate of this UniLend. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def min_rate(self): def min_rate(self, min_rate): """Sets the min_rate of this UniLend. - Minimum interest rate # noqa: E501 + Minimum interest rate. # noqa: E501 :param min_rate: The min_rate of this UniLend. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def min_rate(self, min_rate): def interest_status(self): """Gets the interest_status of this UniLend. # noqa: E501 - Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501 :return: The interest_status of this UniLend. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def interest_status(self): def interest_status(self, interest_status): """Sets the interest_status of this UniLend. - Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment Interest reinvestment # noqa: E501 + Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment # noqa: E501 :param interest_status: The interest_status of this UniLend. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def interest_status(self, interest_status): def reinvest_left_amount(self): """Gets the reinvest_left_amount of this UniLend. # noqa: E501 - Amount not reinvested # noqa: E501 + Amount not reinvested. # noqa: E501 :return: The reinvest_left_amount of this UniLend. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def reinvest_left_amount(self): def reinvest_left_amount(self, reinvest_left_amount): """Sets the reinvest_left_amount of this UniLend. - Amount not reinvested # noqa: E501 + Amount not reinvested. # noqa: E501 :param reinvest_left_amount: The reinvest_left_amount of this UniLend. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def reinvest_left_amount(self, reinvest_left_amount): def create_time(self): """Gets the create_time of this UniLend. # noqa: E501 - Created time of the lending order # noqa: E501 + Created time of the lending order. # noqa: E501 :return: The create_time of this UniLend. # noqa: E501 :rtype: int @@ -297,7 +297,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLend. - Created time of the lending order # noqa: E501 + Created time of the lending order. # noqa: E501 :param create_time: The create_time of this UniLend. # noqa: E501 :type: int @@ -309,7 +309,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this UniLend. # noqa: E501 - Upated time of the lending order # noqa: E501 + Upated time of the lending order. # noqa: E501 :return: The update_time of this UniLend. # noqa: E501 :rtype: int @@ -320,7 +320,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this UniLend. - Upated time of the lending order # noqa: E501 + Upated time of the lending order. # noqa: E501 :param update_time: The update_time of this UniLend. # noqa: E501 :type: int diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py index c3fc581..f6375ee 100644 --- a/gate_api/models/uni_lend_interest.py +++ b/gate_api/models/uni_lend_interest.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, interest=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UniLendInterest. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UniLendInterest. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLendInterest. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UniLendInterest. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def interest(self): """Gets the interest of this UniLendInterest. # noqa: E501 - Interest # noqa: E501 + Interest. # noqa: E501 :return: The interest of this UniLendInterest. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this UniLendInterest. - Interest # noqa: E501 + Interest. # noqa: E501 :param interest: The interest of this UniLendInterest. # noqa: E501 :type: str diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py index 3613f6e..bf2d677 100644 --- a/gate_api/models/uni_lend_record.py +++ b/gate_api/models/uni_lend_record.py @@ -87,7 +87,7 @@ def __init__(self, currency=None, amount=None, last_wallet_amount=None, last_len def currency(self): """Gets the currency of this UniLendRecord. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UniLendRecord. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLendRecord. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UniLendRecord. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UniLendRecord. # noqa: E501 - current amount # noqa: E501 + current amount. # noqa: E501 :return: The amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLendRecord. - current amount # noqa: E501 + current amount. # noqa: E501 :param amount: The amount of this UniLendRecord. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def amount(self, amount): def last_wallet_amount(self): """Gets the last_wallet_amount of this UniLendRecord. # noqa: E501 - Last wallet amount # noqa: E501 + Last wallet amount. # noqa: E501 :return: The last_wallet_amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def last_wallet_amount(self): def last_wallet_amount(self, last_wallet_amount): """Sets the last_wallet_amount of this UniLendRecord. - Last wallet amount # noqa: E501 + Last wallet amount. # noqa: E501 :param last_wallet_amount: The last_wallet_amount of this UniLendRecord. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def last_wallet_amount(self, last_wallet_amount): def last_lent_amount(self): """Gets the last_lent_amount of this UniLendRecord. # noqa: E501 - Last lent amount # noqa: E501 + Last lent amount. # noqa: E501 :return: The last_lent_amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def last_lent_amount(self): def last_lent_amount(self, last_lent_amount): """Sets the last_lent_amount of this UniLendRecord. - Last lent amount # noqa: E501 + Last lent amount. # noqa: E501 :param last_lent_amount: The last_lent_amount of this UniLendRecord. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def last_lent_amount(self, last_lent_amount): def last_frozen_amount(self): """Gets the last_frozen_amount of this UniLendRecord. # noqa: E501 - Last frozen amount # noqa: E501 + Last frozen amount. # noqa: E501 :return: The last_frozen_amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def last_frozen_amount(self): def last_frozen_amount(self, last_frozen_amount): """Sets the last_frozen_amount of this UniLendRecord. - Last frozen amount # noqa: E501 + Last frozen amount. # noqa: E501 :param last_frozen_amount: The last_frozen_amount of this UniLendRecord. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def last_frozen_amount(self, last_frozen_amount): def type(self): """Gets the type of this UniLendRecord. # noqa: E501 - Record type: lend - lend, redeem - redeem # noqa: E501 + Record type: lend - lend, redeem - redeem. # noqa: E501 :return: The type of this UniLendRecord. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def type(self): def type(self, type): """Sets the type of this UniLendRecord. - Record type: lend - lend, redeem - redeem # noqa: E501 + Record type: lend - lend, redeem - redeem. # noqa: E501 :param type: The type of this UniLendRecord. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def type(self, type): def create_time(self): """Gets the create_time of this UniLendRecord. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this UniLendRecord. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLendRecord. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this UniLendRecord. # noqa: E501 :type: int diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py index 70f351d..c132dfe 100644 --- a/gate_api/models/uni_loan.py +++ b/gate_api/models/uni_loan.py @@ -82,7 +82,7 @@ def __init__(self, currency=None, currency_pair=None, amount=None, type=None, cr def currency(self): """Gets the currency of this UniLoan. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UniLoan. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLoan. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UniLoan. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this UniLoan. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this UniLoan. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniLoan. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this UniLoan. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this UniLoan. # noqa: E501 - amount # noqa: E501 + amount. # noqa: E501 :return: The amount of this UniLoan. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLoan. - amount # noqa: E501 + amount. # noqa: E501 :param amount: The amount of this UniLoan. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def amount(self, amount): def type(self): """Gets the type of this UniLoan. # noqa: E501 - Loan type, platform - platform, margin - margin # noqa: E501 + Loan type, platform - platform, margin - margin. # noqa: E501 :return: The type of this UniLoan. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def type(self): def type(self, type): """Sets the type of this UniLoan. - Loan type, platform - platform, margin - margin # noqa: E501 + Loan type, platform - platform, margin - margin. # noqa: E501 :param type: The type of this UniLoan. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def type(self, type): def create_time(self): """Gets the create_time of this UniLoan. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this UniLoan. # noqa: E501 :rtype: int @@ -185,7 +185,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLoan. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this UniLoan. # noqa: E501 :type: int @@ -197,7 +197,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this UniLoan. # noqa: E501 - Updated time # noqa: E501 + Updated time. # noqa: E501 :return: The update_time of this UniLoan. # noqa: E501 :rtype: int @@ -208,7 +208,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this UniLoan. - Updated time # noqa: E501 + Updated time. # noqa: E501 :param update_time: The update_time of this UniLoan. # noqa: E501 :type: int diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py index f73d997..4a28393 100644 --- a/gate_api/models/uni_loan_interest_record.py +++ b/gate_api/models/uni_loan_interest_record.py @@ -87,7 +87,7 @@ def __init__(self, currency=None, currency_pair=None, actual_rate=None, interest def currency(self): """Gets the currency of this UniLoanInterestRecord. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLoanInterestRecord. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this UniLoanInterestRecord. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniLoanInterestRecord. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def currency_pair(self, currency_pair): def actual_rate(self): """Gets the actual_rate of this UniLoanInterestRecord. # noqa: E501 - Actual rate # noqa: E501 + Actual rate. # noqa: E501 :return: The actual_rate of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def actual_rate(self): def actual_rate(self, actual_rate): """Sets the actual_rate of this UniLoanInterestRecord. - Actual rate # noqa: E501 + Actual rate. # noqa: E501 :param actual_rate: The actual_rate of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def actual_rate(self, actual_rate): def interest(self): """Gets the interest of this UniLoanInterestRecord. # noqa: E501 - Interest # noqa: E501 + Interest. # noqa: E501 :return: The interest of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this UniLoanInterestRecord. - Interest # noqa: E501 + Interest. # noqa: E501 :param interest: The interest of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def interest(self, interest): def status(self): """Gets the status of this UniLoanInterestRecord. # noqa: E501 - Status: 0 - fail, 1 - success # noqa: E501 + Status: 0 - fail, 1 - success. # noqa: E501 :return: The status of this UniLoanInterestRecord. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def status(self): def status(self, status): """Sets the status of this UniLoanInterestRecord. - Status: 0 - fail, 1 - success # noqa: E501 + Status: 0 - fail, 1 - success. # noqa: E501 :param status: The status of this UniLoanInterestRecord. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def status(self, status): def type(self): """Gets the type of this UniLoanInterestRecord. # noqa: E501 - Type, platform - platform,margin - margin # noqa: E501 + Type, platform - platform,margin - margin. # noqa: E501 :return: The type of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def type(self): def type(self, type): """Sets the type of this UniLoanInterestRecord. - Type, platform - platform,margin - margin # noqa: E501 + Type, platform - platform,margin - margin. # noqa: E501 :param type: The type of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def type(self, type): def create_time(self): """Gets the create_time of this UniLoanInterestRecord. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this UniLoanInterestRecord. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLoanInterestRecord. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this UniLoanInterestRecord. # noqa: E501 :type: int diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py index 064a72b..4aa5d73 100644 --- a/gate_api/models/uni_loan_record.py +++ b/gate_api/models/uni_loan_record.py @@ -77,7 +77,7 @@ def __init__(self, type=None, currency_pair=None, currency=None, amount=None, cr def type(self): """Gets the type of this UniLoanRecord. # noqa: E501 - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :return: The type of this UniLoanRecord. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def type(self): def type(self, type): """Sets the type of this UniLoanRecord. - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :param type: The type of this UniLoanRecord. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def type(self, type): def currency_pair(self): """Gets the currency_pair of this UniLoanRecord. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this UniLoanRecord. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniLoanRecord. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this UniLoanRecord. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def currency_pair(self, currency_pair): def currency(self): """Gets the currency of this UniLoanRecord. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UniLoanRecord. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLoanRecord. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UniLoanRecord. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UniLoanRecord. # noqa: E501 - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :return: The amount of this UniLoanRecord. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLoanRecord. - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :param amount: The amount of this UniLoanRecord. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def amount(self, amount): def create_time(self): """Gets the create_time of this UniLoanRecord. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this UniLoanRecord. # noqa: E501 :rtype: int @@ -180,7 +180,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLoanRecord. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this UniLoanRecord. # noqa: E501 :type: int diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index 48e5315..7c2dfe7 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -152,7 +152,7 @@ def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, def user_id(self): """Gets the user_id of this UnifiedAccount. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this UnifiedAccount. # noqa: E501 :rtype: int @@ -163,7 +163,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this UnifiedAccount. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this UnifiedAccount. # noqa: E501 :type: int @@ -175,7 +175,7 @@ def user_id(self, user_id): def refresh_time(self): """Gets the refresh_time of this UnifiedAccount. # noqa: E501 - Time of the most recent refresh # noqa: E501 + Time of the most recent refresh. # noqa: E501 :return: The refresh_time of this UnifiedAccount. # noqa: E501 :rtype: int @@ -186,7 +186,7 @@ def refresh_time(self): def refresh_time(self, refresh_time): """Sets the refresh_time of this UnifiedAccount. - Time of the most recent refresh # noqa: E501 + Time of the most recent refresh. # noqa: E501 :param refresh_time: The refresh_time of this UnifiedAccount. # noqa: E501 :type: int @@ -242,7 +242,7 @@ def balances(self, balances): def total(self): """Gets the total of this UnifiedAccount. # noqa: E501 - Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 + Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 :return: The total of this UnifiedAccount. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def total(self): def total(self, total): """Sets the total of this UnifiedAccount. - Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 + Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 :param total: The total of this UnifiedAccount. # noqa: E501 :type: str @@ -495,7 +495,7 @@ def unified_account_total_equity(self, unified_account_total_equity): def leverage(self): """Gets the leverage of this UnifiedAccount. # noqa: E501 - Actual leverage, valid in cross-currency margin/combined margin mode # noqa: E501 + Actual leverage, valid in cross-currency margin/combined margin mode. # noqa: E501 :return: The leverage of this UnifiedAccount. # noqa: E501 :rtype: str @@ -506,7 +506,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this UnifiedAccount. - Actual leverage, valid in cross-currency margin/combined margin mode # noqa: E501 + Actual leverage, valid in cross-currency margin/combined margin mode. # noqa: E501 :param leverage: The leverage of this UnifiedAccount. # noqa: E501 :type: str @@ -564,7 +564,7 @@ def spot_hedge(self, spot_hedge): def use_funding(self): """Gets the use_funding of this UnifiedAccount. # noqa: E501 - Whether to use funds as margin # noqa: E501 + Whether to use funds as margin. # noqa: E501 :return: The use_funding of this UnifiedAccount. # noqa: E501 :rtype: bool @@ -575,7 +575,7 @@ def use_funding(self): def use_funding(self, use_funding): """Sets the use_funding of this UnifiedAccount. - Whether to use funds as margin # noqa: E501 + Whether to use funds as margin. # noqa: E501 :param use_funding: The use_funding of this UnifiedAccount. # noqa: E501 :type: bool @@ -587,7 +587,7 @@ def use_funding(self, use_funding): def is_all_collateral(self): """Gets the is_all_collateral of this UnifiedAccount. # noqa: E501 - Whether all currencies are used as margin, true - All currencies are used as margin, false - No # noqa: E501 + Whether all currencies are used as margin, true - false - No # noqa: E501 :return: The is_all_collateral of this UnifiedAccount. # noqa: E501 :rtype: bool @@ -598,7 +598,7 @@ def is_all_collateral(self): def is_all_collateral(self, is_all_collateral): """Sets the is_all_collateral of this UnifiedAccount. - Whether all currencies are used as margin, true - All currencies are used as margin, false - No # noqa: E501 + Whether all currencies are used as margin, true - false - No # noqa: E501 :param is_all_collateral: The is_all_collateral of this UnifiedAccount. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index 640c736..cd39662 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -290,7 +290,7 @@ def equity(self, equity): def total_freeze(self): """Gets the total_freeze of this UnifiedBalance. # noqa: E501 - Total occupancy (discarded, to be offline field) # noqa: E501 + Total occupancy (discarded, to be offline field). # noqa: E501 :return: The total_freeze of this UnifiedBalance. # noqa: E501 :rtype: str @@ -301,7 +301,7 @@ def total_freeze(self): def total_freeze(self, total_freeze): """Sets the total_freeze of this UnifiedBalance. - Total occupancy (discarded, to be offline field) # noqa: E501 + Total occupancy (discarded, to be offline field). # noqa: E501 :param total_freeze: The total_freeze of this UnifiedBalance. # noqa: E501 :type: str @@ -359,7 +359,7 @@ def spot_in_use(self, spot_in_use): def funding(self): """Gets the funding of this UnifiedBalance. # noqa: E501 - Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch # noqa: E501 + Uniloan financial management amount, effective when turned on as a unified account margin switch # noqa: E501 :return: The funding of this UnifiedBalance. # noqa: E501 :rtype: str @@ -370,7 +370,7 @@ def funding(self): def funding(self, funding): """Sets the funding of this UnifiedBalance. - Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch # noqa: E501 + Uniloan financial management amount, effective when turned on as a unified account margin switch # noqa: E501 :param funding: The funding of this UnifiedBalance. # noqa: E501 :type: str @@ -382,7 +382,7 @@ def funding(self, funding): def funding_version(self): """Gets the funding_version of this UnifiedBalance. # noqa: E501 - Funding version # noqa: E501 + Funding version. # noqa: E501 :return: The funding_version of this UnifiedBalance. # noqa: E501 :rtype: str @@ -393,7 +393,7 @@ def funding_version(self): def funding_version(self, funding_version): """Sets the funding_version of this UnifiedBalance. - Funding version # noqa: E501 + Funding version. # noqa: E501 :param funding_version: The funding_version of this UnifiedBalance. # noqa: E501 :type: str @@ -589,7 +589,7 @@ def available_margin(self, available_margin): def enabled_collateral(self): """Gets the enabled_collateral of this UnifiedBalance. # noqa: E501 - Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501 + Currency enabled as margin: true - Enabled, false - Disabled. # noqa: E501 :return: The enabled_collateral of this UnifiedBalance. # noqa: E501 :rtype: bool @@ -600,7 +600,7 @@ def enabled_collateral(self): def enabled_collateral(self, enabled_collateral): """Sets the enabled_collateral of this UnifiedBalance. - Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501 + Currency enabled as margin: true - Enabled, false - Disabled. # noqa: E501 :param enabled_collateral: The enabled_collateral of this UnifiedBalance. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py index f1ba6f6..51ac569 100644 --- a/gate_api/models/unified_borrowable.py +++ b/gate_api/models/unified_borrowable.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedBorrowable. # noqa: E501 - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :return: The currency of this UnifiedBorrowable. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedBorrowable. - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :param currency: The currency of this UnifiedBorrowable. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedBorrowable. # noqa: E501 - Max borrowable amount # noqa: E501 + Max borrowable amount. # noqa: E501 :return: The amount of this UnifiedBorrowable. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedBorrowable. - Max borrowable amount # noqa: E501 + Max borrowable amount. # noqa: E501 :param amount: The amount of this UnifiedBorrowable. # noqa: E501 :type: str diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/unified_borrowable1.py index a51b359..88aea59 100644 --- a/gate_api/models/unified_borrowable1.py +++ b/gate_api/models/unified_borrowable1.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedBorrowable1. # noqa: E501 - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :return: The currency of this UnifiedBorrowable1. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedBorrowable1. - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :param currency: The currency of this UnifiedBorrowable1. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedBorrowable1. # noqa: E501 - The maximum amount to borrow # noqa: E501 + The maximum amount to borrow. # noqa: E501 :return: The amount of this UnifiedBorrowable1. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedBorrowable1. - The maximum amount to borrow # noqa: E501 + The maximum amount to borrow. # noqa: E501 :param amount: The amount of this UnifiedBorrowable1. # noqa: E501 :type: str diff --git a/gate_api/models/unified_collateral_req.py b/gate_api/models/unified_collateral_req.py index c3e0e00..16b276b 100644 --- a/gate_api/models/unified_collateral_req.py +++ b/gate_api/models/unified_collateral_req.py @@ -67,7 +67,7 @@ def __init__(self, collateral_type=None, enable_list=None, disable_list=None, lo def collateral_type(self): """Gets the collateral_type of this UnifiedCollateralReq. # noqa: E501 - User-set collateral mode0(all)-All currencies used as collateral, 1(custom)-Custom currencies used as collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 + User-set collateral mode0(all)-All currencies used as collateral, collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 :return: The collateral_type of this UnifiedCollateralReq. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def collateral_type(self): def collateral_type(self, collateral_type): """Sets the collateral_type of this UnifiedCollateralReq. - User-set collateral mode0(all)-All currencies used as collateral, 1(custom)-Custom currencies used as collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 + User-set collateral mode0(all)-All currencies used as collateral, collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 :param collateral_type: The collateral_type of this UnifiedCollateralReq. # noqa: E501 :type: int @@ -119,7 +119,7 @@ def enable_list(self, enable_list): def disable_list(self): """Gets the disable_list of this UnifiedCollateralReq. # noqa: E501 - Cancellation list, indicating the logic of cancellation # noqa: E501 + Cancellation list, indicating the logic of cancellation. # noqa: E501 :return: The disable_list of this UnifiedCollateralReq. # noqa: E501 :rtype: list[str] @@ -130,7 +130,7 @@ def disable_list(self): def disable_list(self, disable_list): """Sets the disable_list of this UnifiedCollateralReq. - Cancellation list, indicating the logic of cancellation # noqa: E501 + Cancellation list, indicating the logic of cancellation. # noqa: E501 :param disable_list: The disable_list of this UnifiedCollateralReq. # noqa: E501 :type: list[str] diff --git a/gate_api/models/unified_collateral_res.py b/gate_api/models/unified_collateral_res.py index 231d4dc..39aca87 100644 --- a/gate_api/models/unified_collateral_res.py +++ b/gate_api/models/unified_collateral_res.py @@ -57,7 +57,7 @@ def __init__(self, is_success=None, local_vars_configuration=None): # noqa: E50 def is_success(self): """Gets the is_success of this UnifiedCollateralRes. # noqa: E501 - Whether the setting was successful # noqa: E501 + Whether the setting was successful. # noqa: E501 :return: The is_success of this UnifiedCollateralRes. # noqa: E501 :rtype: bool @@ -68,7 +68,7 @@ def is_success(self): def is_success(self, is_success): """Sets the is_success of this UnifiedCollateralRes. - Whether the setting was successful # noqa: E501 + Whether the setting was successful. # noqa: E501 :param is_success: The is_success of this UnifiedCollateralRes. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py index b8a3619..38ee3db 100644 --- a/gate_api/models/unified_currency.py +++ b/gate_api/models/unified_currency.py @@ -82,7 +82,7 @@ def __init__(self, name=None, prec=None, min_borrow_amount=None, user_max_borrow def name(self): """Gets the name of this UnifiedCurrency. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The name of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def name(self): def name(self, name): """Sets the name of this UnifiedCurrency. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param name: The name of this UnifiedCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def name(self, name): def prec(self): """Gets the prec of this UnifiedCurrency. # noqa: E501 - Currency precision # noqa: E501 + Currency precision. # noqa: E501 :return: The prec of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def prec(self): def prec(self, prec): """Sets the prec of this UnifiedCurrency. - Currency precision # noqa: E501 + Currency precision. # noqa: E501 :param prec: The prec of this UnifiedCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def prec(self, prec): def min_borrow_amount(self): """Gets the min_borrow_amount of this UnifiedCurrency. # noqa: E501 - The minimum debit limit is the unit of currency # noqa: E501 + The minimum debit limit is the unit of currency. # noqa: E501 :return: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def min_borrow_amount(self): def min_borrow_amount(self, min_borrow_amount): """Sets the min_borrow_amount of this UnifiedCurrency. - The minimum debit limit is the unit of currency # noqa: E501 + The minimum debit limit is the unit of currency. # noqa: E501 :param min_borrow_amount: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def min_borrow_amount(self, min_borrow_amount): def user_max_borrow_amount(self): """Gets the user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - The minimum debit limit is the unit of currency # noqa: E501 + The minimum debit limit is the unit of currency. # noqa: E501 :return: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def user_max_borrow_amount(self): def user_max_borrow_amount(self, user_max_borrow_amount): """Sets the user_max_borrow_amount of this UnifiedCurrency. - The minimum debit limit is the unit of currency # noqa: E501 + The minimum debit limit is the unit of currency. # noqa: E501 :param user_max_borrow_amount: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def user_max_borrow_amount(self, user_max_borrow_amount): def total_max_borrow_amount(self): """Gets the total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - The maximum debit limit for the platform is USDT # noqa: E501 + The maximum debit limit for the platform is USDT. # noqa: E501 :return: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def total_max_borrow_amount(self): def total_max_borrow_amount(self, total_max_borrow_amount): """Sets the total_max_borrow_amount of this UnifiedCurrency. - The maximum debit limit for the platform is USDT # noqa: E501 + The maximum debit limit for the platform is USDT. # noqa: E501 :param total_max_borrow_amount: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py index f3db9b4..77cb853 100644 --- a/gate_api/models/unified_discount.py +++ b/gate_api/models/unified_discount.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, discount_tiers=None, local_vars_configuration= def currency(self): """Gets the currency of this UnifiedDiscount. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UnifiedDiscount. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedDiscount. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UnifiedDiscount. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def discount_tiers(self): """Gets the discount_tiers of this UnifiedDiscount. # noqa: E501 - Tiered discount # noqa: E501 + Tiered discount. # noqa: E501 :return: The discount_tiers of this UnifiedDiscount. # noqa: E501 :rtype: list[UnifiedDiscountTiers] @@ -96,7 +96,7 @@ def discount_tiers(self): def discount_tiers(self, discount_tiers): """Sets the discount_tiers of this UnifiedDiscount. - Tiered discount # noqa: E501 + Tiered discount. # noqa: E501 :param discount_tiers: The discount_tiers of this UnifiedDiscount. # noqa: E501 :type: list[UnifiedDiscountTiers] diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py index e7fa508..7834158 100644 --- a/gate_api/models/unified_discount_tiers.py +++ b/gate_api/models/unified_discount_tiers.py @@ -77,7 +77,7 @@ def __init__(self, tier=None, discount=None, lower_limit=None, upper_limit=None, def tier(self): """Gets the tier of this UnifiedDiscountTiers. # noqa: E501 - Tier # noqa: E501 + Tier. # noqa: E501 :return: The tier of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this UnifiedDiscountTiers. - Tier # noqa: E501 + Tier. # noqa: E501 :param tier: The tier of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def tier(self, tier): def discount(self): """Gets the discount of this UnifiedDiscountTiers. # noqa: E501 - Discount # noqa: E501 + Discount. # noqa: E501 :return: The discount of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def discount(self): def discount(self, discount): """Sets the discount of this UnifiedDiscountTiers. - Discount # noqa: E501 + Discount. # noqa: E501 :param discount: The discount of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def discount(self, discount): def lower_limit(self): """Gets the lower_limit of this UnifiedDiscountTiers. # noqa: E501 - Lower limit # noqa: E501 + Lower limit. # noqa: E501 :return: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def lower_limit(self): def lower_limit(self, lower_limit): """Sets the lower_limit of this UnifiedDiscountTiers. - Lower limit # noqa: E501 + Lower limit. # noqa: E501 :param lower_limit: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def lower_limit(self, lower_limit): def upper_limit(self): """Gets the upper_limit of this UnifiedDiscountTiers. # noqa: E501 - Upper limit,+ indicates positive infinity # noqa: E501 + Upper limit,+ indicates positive infinity. # noqa: E501 :return: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def upper_limit(self): def upper_limit(self, upper_limit): """Sets the upper_limit of this UnifiedDiscountTiers. - Upper limit,+ indicates positive infinity # noqa: E501 + Upper limit,+ indicates positive infinity. # noqa: E501 :param upper_limit: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -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 + Position leverage. # 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 + Position leverage. # noqa: E501 :param leverage: The leverage of this UnifiedDiscountTiers. # noqa: E501 :type: str diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py index 0aa3975..2dddf84 100644 --- a/gate_api/models/unified_history_loan_rate.py +++ b/gate_api/models/unified_history_loan_rate.py @@ -72,7 +72,7 @@ def __init__(self, currency=None, tier=None, tier_up_rate=None, rates=None, loca def currency(self): """Gets the currency of this UnifiedHistoryLoanRate. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UnifiedHistoryLoanRate. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedHistoryLoanRate. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UnifiedHistoryLoanRate. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def tier(self): """Gets the tier of this UnifiedHistoryLoanRate. # noqa: E501 - The VIP level of the floating rate required # noqa: E501 + The VIP level of the floating rate required. # noqa: E501 :return: The tier of this UnifiedHistoryLoanRate. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this UnifiedHistoryLoanRate. - The VIP level of the floating rate required # noqa: E501 + The VIP level of the floating rate required. # noqa: E501 :param tier: The tier of this UnifiedHistoryLoanRate. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def tier(self, tier): def tier_up_rate(self): """Gets the tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 - VIP level corresponding floating rate # noqa: E501 + VIP level corresponding floating rate. # noqa: E501 :return: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def tier_up_rate(self): def tier_up_rate(self, tier_up_rate): """Sets the tier_up_rate of this UnifiedHistoryLoanRate. - VIP level corresponding floating rate # noqa: E501 + VIP level corresponding floating rate. # noqa: E501 :param tier_up_rate: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 :type: str diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py index f5b4a25..e468266 100644 --- a/gate_api/models/unified_history_loan_rate_rates.py +++ b/gate_api/models/unified_history_loan_rate_rates.py @@ -62,7 +62,7 @@ def __init__(self, time=None, rate=None, local_vars_configuration=None): # noqa def time(self): """Gets the time of this UnifiedHistoryLoanRateRates. # noqa: E501 - The hourly timestamp corresponding to the interest rate, in milliseconds # noqa: E501 + The hourly timestamp corresponding to the interest rate, in milliseconds. # noqa: E501 :return: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def time(self): def time(self, time): """Sets the time of this UnifiedHistoryLoanRateRates. - The hourly timestamp corresponding to the interest rate, in milliseconds # noqa: E501 + The hourly timestamp corresponding to the interest rate, in milliseconds. # noqa: E501 :param time: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def time(self, time): def rate(self): """Gets the rate of this UnifiedHistoryLoanRateRates. # noqa: E501 - Historical interest rates for this hour # noqa: E501 + Historical interest rates for this hour. # noqa: E501 :return: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def rate(self): def rate(self, rate): """Sets the rate of this UnifiedHistoryLoanRateRates. - Historical interest rates for this hour # noqa: E501 + Historical interest rates for this hour. # noqa: E501 :param rate: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 :type: str diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py index 343e23c..0def7ee 100644 --- a/gate_api/models/unified_leverage_config.py +++ b/gate_api/models/unified_leverage_config.py @@ -87,7 +87,7 @@ def __init__(self, current_leverage=None, min_leverage=None, max_leverage=None, def current_leverage(self): """Gets the current_leverage of this UnifiedLeverageConfig. # noqa: E501 - Current leverage ratio # noqa: E501 + Current leverage ratio. # noqa: E501 :return: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def current_leverage(self): def current_leverage(self, current_leverage): """Sets the current_leverage of this UnifiedLeverageConfig. - Current leverage ratio # noqa: E501 + Current leverage ratio. # noqa: E501 :param current_leverage: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def current_leverage(self, current_leverage): def min_leverage(self): """Gets the min_leverage of this UnifiedLeverageConfig. # noqa: E501 - Minimum adjustable leverage ratio # noqa: E501 + Minimum adjustable leverage ratio. # noqa: E501 :return: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def min_leverage(self): def min_leverage(self, min_leverage): """Sets the min_leverage of this UnifiedLeverageConfig. - Minimum adjustable leverage ratio # noqa: E501 + Minimum adjustable leverage ratio. # noqa: E501 :param min_leverage: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def min_leverage(self, min_leverage): def max_leverage(self): """Gets the max_leverage of this UnifiedLeverageConfig. # noqa: E501 - Maximum adjustable leverage ratio # noqa: E501 + Maximum adjustable leverage ratio. # noqa: E501 :return: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def max_leverage(self): def max_leverage(self, max_leverage): """Sets the max_leverage of this UnifiedLeverageConfig. - Maximum adjustable leverage ratio # noqa: E501 + Maximum adjustable leverage ratio. # noqa: E501 :param max_leverage: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def max_leverage(self, max_leverage): def debit(self): """Gets the debit of this UnifiedLeverageConfig. # noqa: E501 - Current liabilities # noqa: E501 + Current liabilities. # noqa: E501 :return: The debit of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def debit(self): def debit(self, debit): """Sets the debit of this UnifiedLeverageConfig. - Current liabilities # noqa: E501 + Current liabilities. # noqa: E501 :param debit: The debit of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def debit(self, debit): def available_margin(self): """Gets the available_margin of this UnifiedLeverageConfig. # noqa: E501 - Available Margin # noqa: E501 + Available Margin. # noqa: E501 :return: The available_margin of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def available_margin(self): def available_margin(self, available_margin): """Sets the available_margin of this UnifiedLeverageConfig. - Available Margin # noqa: E501 + Available Margin. # noqa: E501 :param available_margin: The available_margin of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def available_margin(self, available_margin): def borrowable(self): """Gets the borrowable of this UnifiedLeverageConfig. # noqa: E501 - The current leverage you can choose is # noqa: E501 + The current leverage you can choose is. # noqa: E501 :return: The borrowable of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def borrowable(self): def borrowable(self, borrowable): """Sets the borrowable of this UnifiedLeverageConfig. - The current leverage you can choose is # noqa: E501 + The current leverage you can choose is. # noqa: E501 :param borrowable: The borrowable of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def borrowable(self, borrowable): def except_leverage_borrowable(self): """Gets the except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 - The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller # noqa: E501 + The maximum amount of margin that can be borrowed and the be borrowed, whichever is smaller # noqa: E501 :return: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def except_leverage_borrowable(self): def except_leverage_borrowable(self, except_leverage_borrowable): """Sets the except_leverage_borrowable of this UnifiedLeverageConfig. - The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller # noqa: E501 + The maximum amount of margin that can be borrowed and the be borrowed, whichever is smaller # noqa: E501 :param except_leverage_borrowable: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 :type: str diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py index ea970c7..a2acf90 100644 --- a/gate_api/models/unified_leverage_setting.py +++ b/gate_api/models/unified_leverage_setting.py @@ -60,7 +60,7 @@ def __init__(self, currency=None, leverage=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedLeverageSetting. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UnifiedLeverageSetting. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedLeverageSetting. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UnifiedLeverageSetting. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def leverage(self): """Gets the leverage of this UnifiedLeverageSetting. # noqa: E501 - multiple # noqa: E501 + multiple. # noqa: E501 :return: The leverage of this UnifiedLeverageSetting. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this UnifiedLeverageSetting. - multiple # noqa: E501 + multiple. # noqa: E501 :param leverage: The leverage of this UnifiedLeverageSetting. # noqa: E501 :type: str diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py index dd1df3c..a404fd0 100644 --- a/gate_api/models/unified_loan.py +++ b/gate_api/models/unified_loan.py @@ -74,7 +74,7 @@ def __init__(self, currency=None, type=None, amount=None, repaid_all=None, text= def currency(self): """Gets the currency of this UnifiedLoan. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UnifiedLoan. # noqa: E501 :rtype: str @@ -85,7 +85,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedLoan. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UnifiedLoan. # noqa: E501 :type: str @@ -99,7 +99,7 @@ def currency(self, currency): def type(self): """Gets the type of this UnifiedLoan. # noqa: E501 - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :return: The type of this UnifiedLoan. # noqa: E501 :rtype: str @@ -110,7 +110,7 @@ def type(self): def type(self, type): """Sets the type of this UnifiedLoan. - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :param type: The type of this UnifiedLoan. # noqa: E501 :type: str @@ -130,7 +130,7 @@ def type(self, type): def amount(self): """Gets the amount of this UnifiedLoan. # noqa: E501 - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :return: The amount of this UnifiedLoan. # noqa: E501 :rtype: str @@ -141,7 +141,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedLoan. - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :param amount: The amount of this UnifiedLoan. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def repaid_all(self, repaid_all): def text(self): """Gets the text of this UnifiedLoan. # noqa: E501 - User defined custom ID # noqa: E501 + User defined custom ID. # noqa: E501 :return: The text of this UnifiedLoan. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def text(self): def text(self, text): """Sets the text of this UnifiedLoan. - User defined custom ID # noqa: E501 + User defined custom ID. # noqa: E501 :param text: The text of this UnifiedLoan. # noqa: E501 :type: str diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py index 3b52a11..fb868f1 100644 --- a/gate_api/models/unified_loan_record.py +++ b/gate_api/models/unified_loan_record.py @@ -92,7 +92,7 @@ def __init__(self, id=None, type=None, repayment_type=None, borrow_type=None, cu def id(self): """Gets the id of this UnifiedLoanRecord. # noqa: E501 - ID # noqa: E501 + ID. # noqa: E501 :return: The id of this UnifiedLoanRecord. # noqa: E501 :rtype: int @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this UnifiedLoanRecord. - ID # noqa: E501 + ID. # noqa: E501 :param id: The id of this UnifiedLoanRecord. # noqa: E501 :type: int @@ -115,7 +115,7 @@ def id(self, id): def type(self): """Gets the type of this UnifiedLoanRecord. # noqa: E501 - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :return: The type of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def type(self): def type(self, type): """Sets the type of this UnifiedLoanRecord. - type: borrow - borrow, repay - repay # noqa: E501 + type: borrow - borrow, repay - repay. # noqa: E501 :param type: The type of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def type(self, type): def repayment_type(self): """Gets the repayment_type of this UnifiedLoanRecord. # noqa: E501 - Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 + Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 :return: The repayment_type of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def repayment_type(self): def repayment_type(self, repayment_type): """Sets the repayment_type of this UnifiedLoanRecord. - Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 + Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 :param repayment_type: The repayment_type of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def borrow_type(self, borrow_type): def currency_pair(self): """Gets the currency_pair of this UnifiedLoanRecord. # noqa: E501 - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :return: The currency_pair of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UnifiedLoanRecord. - Currency pair # noqa: E501 + Currency pair. # noqa: E501 :param currency_pair: The currency_pair of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def currency_pair(self, currency_pair): def currency(self): """Gets the currency of this UnifiedLoanRecord. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedLoanRecord. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedLoanRecord. # noqa: E501 - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :return: The amount of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedLoanRecord. - The amount of lending or repaying # noqa: E501 + The amount of lending or repaying. # noqa: E501 :param amount: The amount of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def amount(self, amount): def create_time(self): """Gets the create_time of this UnifiedLoanRecord. # noqa: E501 - Created time # noqa: E501 + Created time. # noqa: E501 :return: The create_time of this UnifiedLoanRecord. # noqa: E501 :rtype: int @@ -264,7 +264,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UnifiedLoanRecord. - Created time # noqa: E501 + Created time. # noqa: E501 :param create_time: The create_time of this UnifiedLoanRecord. # noqa: E501 :type: int diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py index 9d1bd88..cac2485 100644 --- a/gate_api/models/unified_loan_result.py +++ b/gate_api/models/unified_loan_result.py @@ -57,7 +57,7 @@ def __init__(self, tran_id=None, local_vars_configuration=None): # noqa: E501 def tran_id(self): """Gets the tran_id of this UnifiedLoanResult. # noqa: E501 - Transaction id # noqa: E501 + Transaction id. # noqa: E501 :return: The tran_id of this UnifiedLoanResult. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def tran_id(self): def tran_id(self, tran_id): """Sets the tran_id of this UnifiedLoanResult. - Transaction id # noqa: E501 + Transaction id. # noqa: E501 :param tran_id: The tran_id of this UnifiedLoanResult. # noqa: E501 :type: int diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py index 49c2a0c..d516c89 100644 --- a/gate_api/models/unified_margin_tiers.py +++ b/gate_api/models/unified_margin_tiers.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, margin_tiers=None, local_vars_configuration=No def currency(self): """Gets the currency of this UnifiedMarginTiers. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this UnifiedMarginTiers. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedMarginTiers. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this UnifiedMarginTiers. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def margin_tiers(self): """Gets the margin_tiers of this UnifiedMarginTiers. # noqa: E501 - Margin tiers # noqa: E501 + Margin tiers. # noqa: E501 :return: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 :rtype: list[MarginTiers] @@ -96,7 +96,7 @@ def margin_tiers(self): def margin_tiers(self, margin_tiers): """Sets the margin_tiers of this UnifiedMarginTiers. - Margin tiers # noqa: E501 + Margin tiers. # noqa: E501 :param margin_tiers: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 :type: list[MarginTiers] diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py index c94c283..4c22e43 100644 --- a/gate_api/models/unified_portfolio_input.py +++ b/gate_api/models/unified_portfolio_input.py @@ -87,7 +87,7 @@ def __init__(self, spot_balances=None, spot_orders=None, futures_positions=None, def spot_balances(self): """Gets the spot_balances of this UnifiedPortfolioInput. # noqa: E501 - Spot # noqa: E501 + Spot. # noqa: E501 :return: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockSpotBalance] @@ -98,7 +98,7 @@ def spot_balances(self): def spot_balances(self, spot_balances): """Sets the spot_balances of this UnifiedPortfolioInput. - Spot # noqa: E501 + Spot. # noqa: E501 :param spot_balances: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockSpotBalance] @@ -110,7 +110,7 @@ def spot_balances(self, spot_balances): def spot_orders(self): """Gets the spot_orders of this UnifiedPortfolioInput. # noqa: E501 - Spot orders # noqa: E501 + Spot orders. # noqa: E501 :return: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockSpotOrder] @@ -121,7 +121,7 @@ def spot_orders(self): def spot_orders(self, spot_orders): """Sets the spot_orders of this UnifiedPortfolioInput. - Spot orders # noqa: E501 + Spot orders. # noqa: E501 :param spot_orders: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockSpotOrder] @@ -133,7 +133,7 @@ def spot_orders(self, spot_orders): def futures_positions(self): """Gets the futures_positions of this UnifiedPortfolioInput. # noqa: E501 - Futures positions # noqa: E501 + Futures positions. # noqa: E501 :return: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockFuturesPosition] @@ -144,7 +144,7 @@ def futures_positions(self): def futures_positions(self, futures_positions): """Sets the futures_positions of this UnifiedPortfolioInput. - Futures positions # noqa: E501 + Futures positions. # noqa: E501 :param futures_positions: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockFuturesPosition] @@ -156,7 +156,7 @@ def futures_positions(self, futures_positions): def futures_orders(self): """Gets the futures_orders of this UnifiedPortfolioInput. # noqa: E501 - Futures order # noqa: E501 + Futures order. # noqa: E501 :return: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockFuturesOrder] @@ -167,7 +167,7 @@ def futures_orders(self): def futures_orders(self, futures_orders): """Sets the futures_orders of this UnifiedPortfolioInput. - Futures order # noqa: E501 + Futures order. # noqa: E501 :param futures_orders: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockFuturesOrder] @@ -179,7 +179,7 @@ def futures_orders(self, futures_orders): def options_positions(self): """Gets the options_positions of this UnifiedPortfolioInput. # noqa: E501 - Options positions # noqa: E501 + Options positions. # noqa: E501 :return: The options_positions of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockOptionsPosition] @@ -190,7 +190,7 @@ def options_positions(self): def options_positions(self, options_positions): """Sets the options_positions of this UnifiedPortfolioInput. - Options positions # noqa: E501 + Options positions. # noqa: E501 :param options_positions: The options_positions of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockOptionsPosition] @@ -202,7 +202,7 @@ def options_positions(self, options_positions): def options_orders(self): """Gets the options_orders of this UnifiedPortfolioInput. # noqa: E501 - Option orders # noqa: E501 + Option orders. # noqa: E501 :return: The options_orders of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockOptionsOrder] @@ -213,7 +213,7 @@ def options_orders(self): def options_orders(self, options_orders): """Sets the options_orders of this UnifiedPortfolioInput. - Option orders # noqa: E501 + Option orders. # noqa: E501 :param options_orders: The options_orders of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockOptionsOrder] diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py index e0cbeff..2bb0605 100644 --- a/gate_api/models/unified_portfolio_output.py +++ b/gate_api/models/unified_portfolio_output.py @@ -95,7 +95,7 @@ def maintain_margin_total(self, maintain_margin_total): def initial_margin_total(self): """Gets the initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. # noqa: E501 + Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, orders. # noqa: E501 :return: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def initial_margin_total(self): def initial_margin_total(self, initial_margin_total): """Sets the initial_margin_total of this UnifiedPortfolioOutput. - Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. # noqa: E501 + Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, orders. # noqa: E501 :param initial_margin_total: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def initial_margin_total(self, initial_margin_total): def calculate_time(self): """Gets the calculate_time of this UnifiedPortfolioOutput. # noqa: E501 - Calculate time # noqa: E501 + Calculate time. # noqa: E501 :return: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 :rtype: int @@ -129,7 +129,7 @@ def calculate_time(self): def calculate_time(self, calculate_time): """Sets the calculate_time of this UnifiedPortfolioOutput. - Calculate time # noqa: E501 + Calculate time. # noqa: E501 :param calculate_time: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 :type: int @@ -141,7 +141,7 @@ def calculate_time(self, calculate_time): def risk_unit(self): """Gets the risk_unit of this UnifiedPortfolioOutput. # noqa: E501 - Risk unit # noqa: E501 + Risk unit. # noqa: E501 :return: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 :rtype: list[MockRiskUnit] @@ -152,7 +152,7 @@ def risk_unit(self): def risk_unit(self, risk_unit): """Sets the risk_unit of this UnifiedPortfolioOutput. - Risk unit # noqa: E501 + Risk unit. # noqa: E501 :param risk_unit: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 :type: list[MockRiskUnit] diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py index 1f2db0b..32eebfa 100644 --- a/gate_api/models/unified_risk_units.py +++ b/gate_api/models/unified_risk_units.py @@ -67,7 +67,7 @@ def __init__(self, user_id=None, spot_hedge=None, risk_units=None, local_vars_co def user_id(self): """Gets the user_id of this UnifiedRiskUnits. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The user_id of this UnifiedRiskUnits. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this UnifiedRiskUnits. - User ID # noqa: E501 + User ID. # noqa: E501 :param user_id: The user_id of this UnifiedRiskUnits. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def spot_hedge(self, spot_hedge): def risk_units(self): """Gets the risk_units of this UnifiedRiskUnits. # noqa: E501 - Risk unit # noqa: E501 + Risk unit. # noqa: E501 :return: The risk_units of this UnifiedRiskUnits. # noqa: E501 :rtype: list[RiskUnits] @@ -124,7 +124,7 @@ def risk_units(self): def risk_units(self, risk_units): """Sets the risk_units of this UnifiedRiskUnits. - Risk unit # noqa: E501 + Risk unit. # noqa: E501 :param risk_units: The risk_units of this UnifiedRiskUnits. # noqa: E501 :type: list[RiskUnits] diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py index ed71eec..abddea0 100644 --- a/gate_api/models/unified_settings.py +++ b/gate_api/models/unified_settings.py @@ -95,7 +95,7 @@ def usdt_futures(self, usdt_futures): def spot_hedge(self): """Gets the spot_hedge of this UnifiedSettings. # noqa: E501 - Spot hedging switch. # noqa: E501 + Spot hedging switch. # noqa: E501 :return: The spot_hedge of this UnifiedSettings. # noqa: E501 :rtype: bool @@ -106,7 +106,7 @@ def spot_hedge(self): def spot_hedge(self, spot_hedge): """Sets the spot_hedge of this UnifiedSettings. - Spot hedging switch. # noqa: E501 + Spot hedging switch. # noqa: E501 :param spot_hedge: The spot_hedge of this UnifiedSettings. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py index f2ae878..a9ec826 100644 --- a/gate_api/models/unified_transferable.py +++ b/gate_api/models/unified_transferable.py @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedTransferable. # noqa: E501 - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :return: The currency of this UnifiedTransferable. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedTransferable. - Currency detail # noqa: E501 + Currency detail. # noqa: E501 :param currency: The currency of this UnifiedTransferable. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedTransferable. # noqa: E501 - The maximum amount that can be transferred out # noqa: E501 + The maximum amount that can be transferred out. # noqa: E501 :return: The amount of this UnifiedTransferable. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedTransferable. - The maximum amount that can be transferred out # noqa: E501 + The maximum amount that can be transferred out. # noqa: E501 :param amount: The amount of this UnifiedTransferable. # noqa: E501 :type: str diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py index 1a1cf0c..e8341c0 100644 --- a/gate_api/models/user_ltv_info.py +++ b/gate_api/models/user_ltv_info.py @@ -87,7 +87,7 @@ def __init__(self, collateral_currency=None, borrow_currency=None, init_ltv=None def collateral_currency(self): """Gets the collateral_currency of this UserLtvInfo. # noqa: E501 - Collateral # noqa: E501 + Collateral. # noqa: E501 :return: The collateral_currency of this UserLtvInfo. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this UserLtvInfo. - Collateral # noqa: E501 + Collateral. # noqa: E501 :param collateral_currency: The collateral_currency of this UserLtvInfo. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def collateral_currency(self, collateral_currency): def borrow_currency(self): """Gets the borrow_currency of this UserLtvInfo. # noqa: E501 - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :return: The borrow_currency of this UserLtvInfo. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this UserLtvInfo. - Borrowed currency # noqa: E501 + Borrowed currency. # noqa: E501 :param borrow_currency: The borrow_currency of this UserLtvInfo. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def borrow_currency(self, borrow_currency): def init_ltv(self): """Gets the init_ltv of this UserLtvInfo. # noqa: E501 - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :return: The init_ltv of this UserLtvInfo. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this UserLtvInfo. - The initial collateralization rate # noqa: E501 + The initial collateralization rate. # noqa: E501 :param init_ltv: The init_ltv of this UserLtvInfo. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def init_ltv(self, init_ltv): def alert_ltv(self): """Gets the alert_ltv of this UserLtvInfo. # noqa: E501 - Warning collateralization ratio # noqa: E501 + Warning collateralization ratio. # noqa: E501 :return: The alert_ltv of this UserLtvInfo. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def alert_ltv(self): def alert_ltv(self, alert_ltv): """Sets the alert_ltv of this UserLtvInfo. - Warning collateralization ratio # noqa: E501 + Warning collateralization ratio. # noqa: E501 :param alert_ltv: The alert_ltv of this UserLtvInfo. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def alert_ltv(self, alert_ltv): def liquidate_ltv(self): """Gets the liquidate_ltv of this UserLtvInfo. # noqa: E501 - The liquidation collateralization rate # noqa: E501 + The liquidation collateralization rate. # noqa: E501 :return: The liquidate_ltv of this UserLtvInfo. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def liquidate_ltv(self): def liquidate_ltv(self, liquidate_ltv): """Sets the liquidate_ltv of this UserLtvInfo. - The liquidation collateralization rate # noqa: E501 + The liquidation collateralization rate. # noqa: E501 :param liquidate_ltv: The liquidate_ltv of this UserLtvInfo. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def liquidate_ltv(self, liquidate_ltv): def min_borrow_amount(self): """Gets the min_borrow_amount of this UserLtvInfo. # noqa: E501 - Minimum borrowable amount for the loan currency # noqa: E501 + Minimum borrowable amount for the loan currency. # noqa: E501 :return: The min_borrow_amount of this UserLtvInfo. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def min_borrow_amount(self): def min_borrow_amount(self, min_borrow_amount): """Sets the min_borrow_amount of this UserLtvInfo. - Minimum borrowable amount for the loan currency # noqa: E501 + Minimum borrowable amount for the loan currency. # noqa: E501 :param min_borrow_amount: The min_borrow_amount of this UserLtvInfo. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def min_borrow_amount(self, min_borrow_amount): def left_borrowable_amount(self): """Gets the left_borrowable_amount of this UserLtvInfo. # noqa: E501 - Remaining borrowable amount for the loan currency # noqa: E501 + Remaining borrowable amount for the loan currency. # noqa: E501 :return: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def left_borrowable_amount(self): def left_borrowable_amount(self, left_borrowable_amount): """Sets the left_borrowable_amount of this UserLtvInfo. - Remaining borrowable amount for the loan currency # noqa: E501 + Remaining borrowable amount for the loan currency. # noqa: E501 :param left_borrowable_amount: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 :type: str diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py index 499812a..b43ed57 100644 --- a/gate_api/models/user_sub.py +++ b/gate_api/models/user_sub.py @@ -72,7 +72,7 @@ def __init__(self, uid=None, belong=None, type=None, ref_uid=None, local_vars_co def uid(self): """Gets the uid of this UserSub. # noqa: E501 - User ID # noqa: E501 + User ID. # noqa: E501 :return: The uid of this UserSub. # noqa: E501 :rtype: int @@ -83,7 +83,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this UserSub. - User ID # noqa: E501 + User ID. # noqa: E501 :param uid: The uid of this UserSub. # noqa: E501 :type: int @@ -118,7 +118,7 @@ def belong(self, belong): def type(self): """Gets the type of this UserSub. # noqa: E501 - Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 + Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 :return: The type of this UserSub. # noqa: E501 :rtype: int @@ -129,7 +129,7 @@ def type(self): def type(self, type): """Sets the type of this UserSub. - Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 + Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 :param type: The type of this UserSub. # noqa: E501 :type: int @@ -141,7 +141,7 @@ def type(self, type): def ref_uid(self): """Gets the ref_uid of this UserSub. # noqa: E501 - Inviter user ID # noqa: E501 + Inviter user ID. # noqa: E501 :return: The ref_uid of this UserSub. # noqa: E501 :rtype: int @@ -152,7 +152,7 @@ def ref_uid(self): def ref_uid(self, ref_uid): """Sets the ref_uid of this UserSub. - Inviter user ID # noqa: E501 + Inviter user ID. # noqa: E501 :param ref_uid: The ref_uid of this UserSub. # noqa: E501 :type: int diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py index a499c55..c233960 100644 --- a/gate_api/models/user_sub_relation.py +++ b/gate_api/models/user_sub_relation.py @@ -57,7 +57,7 @@ def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 def list(self): """Gets the list of this UserSubRelation. # noqa: E501 - Subordinate relationship list # noqa: E501 + Subordinate relationship list. # noqa: E501 :return: The list of this UserSubRelation. # noqa: E501 :rtype: list[UserSub] @@ -68,7 +68,7 @@ def list(self): def list(self, list): """Sets the list of this UserSubRelation. - Subordinate relationship list # noqa: E501 + Subordinate relationship list. # noqa: E501 :param list: The list of this UserSubRelation. # noqa: E501 :type: list[UserSub] diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py index 8fa2598..eff80a1 100644 --- a/gate_api/models/user_total_amount.py +++ b/gate_api/models/user_total_amount.py @@ -62,7 +62,7 @@ def __init__(self, borrow_amount=None, collateral_amount=None, local_vars_config def borrow_amount(self): """Gets the borrow_amount of this UserTotalAmount. # noqa: E501 - Total borrowing amount, calculated in USDT # noqa: E501 + Total borrowing amount, calculated in USDT. # noqa: E501 :return: The borrow_amount of this UserTotalAmount. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this UserTotalAmount. - Total borrowing amount, calculated in USDT # noqa: E501 + Total borrowing amount, calculated in USDT. # noqa: E501 :param borrow_amount: The borrow_amount of this UserTotalAmount. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def borrow_amount(self, borrow_amount): def collateral_amount(self): """Gets the collateral_amount of this UserTotalAmount. # noqa: E501 - Total collateral amount, calculated in USDT # noqa: E501 + Total collateral amount, calculated in USDT. # noqa: E501 :return: The collateral_amount of this UserTotalAmount. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this UserTotalAmount. - Total collateral amount, calculated in USDT # noqa: E501 + Total collateral amount, calculated in USDT. # noqa: E501 :param collateral_amount: The collateral_amount of this UserTotalAmount. # noqa: E501 :type: str diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py index ebb1336..f47c4cb 100644 --- a/gate_api/models/withdraw_status.py +++ b/gate_api/models/withdraw_status.py @@ -112,7 +112,7 @@ def __init__(self, currency=None, name=None, name_cn=None, deposit=None, withdra def currency(self): """Gets the currency of this WithdrawStatus. # noqa: E501 - Currency # noqa: E501 + Currency. # noqa: E501 :return: The currency of this WithdrawStatus. # noqa: E501 :rtype: str @@ -123,7 +123,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this WithdrawStatus. - Currency # noqa: E501 + Currency. # noqa: E501 :param currency: The currency of this WithdrawStatus. # noqa: E501 :type: str @@ -135,7 +135,7 @@ def currency(self, currency): def name(self): """Gets the name of this WithdrawStatus. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The name of this WithdrawStatus. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def name(self): def name(self, name): """Sets the name of this WithdrawStatus. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param name: The name of this WithdrawStatus. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def name(self, name): def name_cn(self): """Gets the name_cn of this WithdrawStatus. # noqa: E501 - Currency Chinese name # noqa: E501 + Currency Chinese name. # noqa: E501 :return: The name_cn of this WithdrawStatus. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def name_cn(self): def name_cn(self, name_cn): """Sets the name_cn of this WithdrawStatus. - Currency Chinese name # noqa: E501 + Currency Chinese name. # noqa: E501 :param name_cn: The name_cn of this WithdrawStatus. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def name_cn(self, name_cn): def deposit(self): """Gets the deposit of this WithdrawStatus. # noqa: E501 - Deposits fee # noqa: E501 + Deposits fee. # noqa: E501 :return: The deposit of this WithdrawStatus. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def deposit(self): def deposit(self, deposit): """Sets the deposit of this WithdrawStatus. - Deposits fee # noqa: E501 + Deposits fee. # noqa: E501 :param deposit: The deposit of this WithdrawStatus. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def deposit(self, deposit): def withdraw_percent(self): """Gets the withdraw_percent of this WithdrawStatus. # noqa: E501 - Withdrawal fee rate percentage # noqa: E501 + Withdrawal fee rate percentage. # noqa: E501 :return: The withdraw_percent of this WithdrawStatus. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def withdraw_percent(self): def withdraw_percent(self, withdraw_percent): """Sets the withdraw_percent of this WithdrawStatus. - Withdrawal fee rate percentage # noqa: E501 + Withdrawal fee rate percentage. # noqa: E501 :param withdraw_percent: The withdraw_percent of this WithdrawStatus. # noqa: E501 :type: str @@ -227,7 +227,7 @@ def withdraw_percent(self, withdraw_percent): def withdraw_fix(self): """Gets the withdraw_fix of this WithdrawStatus. # noqa: E501 - Fixed withdrawal fee # noqa: E501 + Fixed withdrawal fee. # noqa: E501 :return: The withdraw_fix of this WithdrawStatus. # noqa: E501 :rtype: str @@ -238,7 +238,7 @@ def withdraw_fix(self): def withdraw_fix(self, withdraw_fix): """Sets the withdraw_fix of this WithdrawStatus. - Fixed withdrawal fee # noqa: E501 + Fixed withdrawal fee. # noqa: E501 :param withdraw_fix: The withdraw_fix of this WithdrawStatus. # noqa: E501 :type: str @@ -250,7 +250,7 @@ def withdraw_fix(self, withdraw_fix): def withdraw_day_limit(self): """Gets the withdraw_day_limit of this WithdrawStatus. # noqa: E501 - Daily allowed withdrawal amount # noqa: E501 + Daily allowed withdrawal amount. # noqa: E501 :return: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 :rtype: str @@ -261,7 +261,7 @@ def withdraw_day_limit(self): def withdraw_day_limit(self, withdraw_day_limit): """Sets the withdraw_day_limit of this WithdrawStatus. - Daily allowed withdrawal amount # noqa: E501 + Daily allowed withdrawal amount. # noqa: E501 :param withdraw_day_limit: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 :type: str @@ -273,7 +273,7 @@ def withdraw_day_limit(self, withdraw_day_limit): def withdraw_amount_mini(self): """Gets the withdraw_amount_mini of this WithdrawStatus. # noqa: E501 - Minimum withdrawal amount # noqa: E501 + Minimum withdrawal amount. # noqa: E501 :return: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 :rtype: str @@ -284,7 +284,7 @@ def withdraw_amount_mini(self): def withdraw_amount_mini(self, withdraw_amount_mini): """Sets the withdraw_amount_mini of this WithdrawStatus. - Minimum withdrawal amount # noqa: E501 + Minimum withdrawal amount. # noqa: E501 :param withdraw_amount_mini: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 :type: str @@ -296,7 +296,7 @@ def withdraw_amount_mini(self, withdraw_amount_mini): def withdraw_day_limit_remain(self): """Gets the withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 - Daily withdrawal amount left # noqa: E501 + Daily withdrawal amount left. # noqa: E501 :return: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 :rtype: str @@ -307,7 +307,7 @@ def withdraw_day_limit_remain(self): def withdraw_day_limit_remain(self, withdraw_day_limit_remain): """Sets the withdraw_day_limit_remain of this WithdrawStatus. - Daily withdrawal amount left # noqa: E501 + Daily withdrawal amount left. # noqa: E501 :param withdraw_day_limit_remain: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 :type: str @@ -319,7 +319,7 @@ def withdraw_day_limit_remain(self, withdraw_day_limit_remain): def withdraw_eachtime_limit(self): """Gets the withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 - Maximum amount for each withdrawal # noqa: E501 + Maximum amount for each withdrawal. # noqa: E501 :return: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 :rtype: str @@ -330,7 +330,7 @@ def withdraw_eachtime_limit(self): def withdraw_eachtime_limit(self, withdraw_eachtime_limit): """Sets the withdraw_eachtime_limit of this WithdrawStatus. - Maximum amount for each withdrawal # noqa: E501 + Maximum amount for each withdrawal. # noqa: E501 :param withdraw_eachtime_limit: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 :type: str @@ -342,7 +342,7 @@ def withdraw_eachtime_limit(self, withdraw_eachtime_limit): def withdraw_fix_on_chains(self): """Gets the withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 - Fixed withdrawal fee on multiple chains # noqa: E501 + Fixed withdrawal fee on multiple chains. # noqa: E501 :return: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 :rtype: dict(str, str) @@ -353,7 +353,7 @@ def withdraw_fix_on_chains(self): def withdraw_fix_on_chains(self, withdraw_fix_on_chains): """Sets the withdraw_fix_on_chains of this WithdrawStatus. - Fixed withdrawal fee on multiple chains # noqa: E501 + Fixed withdrawal fee on multiple chains. # noqa: E501 :param withdraw_fix_on_chains: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 :type: dict(str, str) @@ -365,7 +365,7 @@ def withdraw_fix_on_chains(self, withdraw_fix_on_chains): def withdraw_percent_on_chains(self): """Gets the withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 - Percentage withdrawal fee on multiple chains # noqa: E501 + Percentage withdrawal fee on multiple chains. # noqa: E501 :return: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 :rtype: dict(str, str) @@ -376,7 +376,7 @@ def withdraw_percent_on_chains(self): def withdraw_percent_on_chains(self, withdraw_percent_on_chains): """Sets the withdraw_percent_on_chains of this WithdrawStatus. - Percentage withdrawal fee on multiple chains # noqa: E501 + Percentage withdrawal fee on multiple chains. # noqa: E501 :param withdraw_percent_on_chains: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 :type: dict(str, str) diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index 7ddc49e..680a75b 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -119,7 +119,7 @@ def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None def id(self): """Gets the id of this WithdrawalRecord. # noqa: E501 - Record ID # noqa: E501 + Record ID. # noqa: E501 :return: The id of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -130,7 +130,7 @@ def id(self): def id(self, id): """Sets the id of this WithdrawalRecord. - Record ID # noqa: E501 + Record ID. # noqa: E501 :param id: The id of this WithdrawalRecord. # noqa: E501 :type: str @@ -142,7 +142,7 @@ def id(self, id): def txid(self): """Gets the txid of this WithdrawalRecord. # noqa: E501 - Hash record of the withdrawal # noqa: E501 + Hash record of the withdrawal. # noqa: E501 :return: The txid of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -153,7 +153,7 @@ def txid(self): def txid(self, txid): """Sets the txid of this WithdrawalRecord. - Hash record of the withdrawal # noqa: E501 + Hash record of the withdrawal. # noqa: E501 :param txid: The txid of this WithdrawalRecord. # noqa: E501 :type: str @@ -165,7 +165,7 @@ def txid(self, txid): def block_number(self): """Gets the block_number of this WithdrawalRecord. # noqa: E501 - Block Number # noqa: E501 + Block Number. # noqa: E501 :return: The block_number of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -176,7 +176,7 @@ def block_number(self): def block_number(self, block_number): """Sets the block_number of this WithdrawalRecord. - Block Number # noqa: E501 + Block Number. # noqa: E501 :param block_number: The block_number of this WithdrawalRecord. # noqa: E501 :type: str @@ -211,7 +211,7 @@ def withdraw_order_id(self, withdraw_order_id): def timestamp(self): """Gets the timestamp of this WithdrawalRecord. # noqa: E501 - Operation time # noqa: E501 + Operation time. # noqa: E501 :return: The timestamp of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -222,7 +222,7 @@ def timestamp(self): def timestamp(self, timestamp): """Sets the timestamp of this WithdrawalRecord. - Operation time # noqa: E501 + Operation time. # noqa: E501 :param timestamp: The timestamp of this WithdrawalRecord. # noqa: E501 :type: str @@ -234,7 +234,7 @@ def timestamp(self, timestamp): def amount(self): """Gets the amount of this WithdrawalRecord. # noqa: E501 - Currency amount # noqa: E501 + Currency amount. # noqa: E501 :return: The amount of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -245,7 +245,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this WithdrawalRecord. - Currency amount # noqa: E501 + Currency amount. # noqa: E501 :param amount: The amount of this WithdrawalRecord. # noqa: E501 :type: str @@ -259,7 +259,7 @@ def amount(self, amount): def fee(self): """Gets the fee of this WithdrawalRecord. # noqa: E501 - fee # noqa: E501 + fee. # noqa: E501 :return: The fee of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -270,7 +270,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this WithdrawalRecord. - fee # noqa: E501 + fee. # noqa: E501 :param fee: The fee of this WithdrawalRecord. # noqa: E501 :type: str @@ -282,7 +282,7 @@ def fee(self, fee): def currency(self): """Gets the currency of this WithdrawalRecord. # noqa: E501 - Currency name # noqa: E501 + Currency name. # noqa: E501 :return: The currency of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -293,7 +293,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this WithdrawalRecord. - Currency name # noqa: E501 + Currency name. # noqa: E501 :param currency: The currency of this WithdrawalRecord. # noqa: E501 :type: str @@ -307,7 +307,7 @@ def currency(self, currency): def address(self): """Gets the address of this WithdrawalRecord. # noqa: E501 - Withdrawal address # noqa: E501 + Withdrawal address. # noqa: E501 :return: The address of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -318,7 +318,7 @@ def address(self): def address(self, address): """Sets the address of this WithdrawalRecord. - Withdrawal address # noqa: E501 + Withdrawal address. # noqa: E501 :param address: The address of this WithdrawalRecord. # noqa: E501 :type: str @@ -353,7 +353,7 @@ def fail_reason(self, fail_reason): def timestamp2(self): """Gets the timestamp2 of this WithdrawalRecord. # noqa: E501 - The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success # noqa: E501 + The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the # noqa: E501 :return: The timestamp2 of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -364,7 +364,7 @@ def timestamp2(self): def timestamp2(self, timestamp2): """Sets the timestamp2 of this WithdrawalRecord. - The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the time to withdrawal success # noqa: E501 + The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the # noqa: E501 :param timestamp2: The timestamp2 of this WithdrawalRecord. # noqa: E501 :type: str @@ -376,7 +376,7 @@ def timestamp2(self, timestamp2): def memo(self): """Gets the memo of this WithdrawalRecord. # noqa: E501 - Additional remarks with regards to the withdrawal # noqa: E501 + Additional remarks with regards to the withdrawal. # noqa: E501 :return: The memo of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -387,7 +387,7 @@ def memo(self): def memo(self, memo): """Sets the memo of this WithdrawalRecord. - Additional remarks with regards to the withdrawal # noqa: E501 + Additional remarks with regards to the withdrawal. # noqa: E501 :param memo: The memo of this WithdrawalRecord. # noqa: E501 :type: str @@ -422,7 +422,7 @@ def status(self, status): def chain(self): """Gets the chain of this WithdrawalRecord. # noqa: E501 - Name of the chain used in withdrawals # noqa: E501 + Name of the chain used in withdrawals. # noqa: E501 :return: The chain of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -433,7 +433,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this WithdrawalRecord. - Name of the chain used in withdrawals # noqa: E501 + Name of the chain used in withdrawals. # noqa: E501 :param chain: The chain of this WithdrawalRecord. # noqa: E501 :type: str diff --git a/setup.py b/setup.py index 535fadd..a0b4e42 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.102.1" +VERSION = "6.102.6" # To install the library, run the following # # python setup.py install From 6cead1c02165d1407b454ce09ebc1e416dfbe0b6 Mon Sep 17 00:00:00 2001 From: gateio Date: Thu, 24 Jul 2025 09:27:31 +0000 Subject: [PATCH 17/20] update to v6.103.0 --- README.md | 6 +- docs/FuturesApi.md | 90 ++++++++++++++++- docs/InlineObject.md | 11 +++ gate_api/__init__.py | 3 +- gate_api/api/futures_api.py | 159 +++++++++++++++++++++++++++++++ gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 +- gate_api/models/__init__.py | 1 + gate_api/models/inline_object.py | 153 +++++++++++++++++++++++++++++ setup.py | 2 +- 10 files changed, 420 insertions(+), 11 deletions(-) create mode 100644 docs/InlineObject.md create mode 100644 gate_api/models/inline_object.py diff --git a/README.md b/README.md index 71b1b9d..217d9b9 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ for implementing API-based automated trading. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v4.102.6 -- Package version: 6.102.6 +- API version: v4.103.0 +- Package version: 6.103.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) @@ -241,6 +241,7 @@ Class | Method | HTTP request | Description *FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin. *FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage. *FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode. +*FuturesApi* | [**update_dual_comp_position_cross_mode**](docs/FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | 双仓模式下切换全逐仓模式 *FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit. *FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode. *FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode. @@ -485,6 +486,7 @@ Class | Method | HTTP request | Description - [FuturesTicker](docs/FuturesTicker.md) - [FuturesTrade](docs/FuturesTrade.md) - [IndexConstituent](docs/IndexConstituent.md) + - [InlineObject](docs/InlineObject.md) - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) - [InsuranceRecord](docs/InsuranceRecord.md) diff --git a/docs/FuturesApi.md b/docs/FuturesApi.md index bf1b06d..8b7359b 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description [**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin. [**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage. [**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode. +[**update_dual_comp_position_cross_mode**](FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | 双仓模式下切换全逐仓模式 [**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit. [**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode. [**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode. @@ -1404,6 +1405,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) +# **update_dual_comp_position_cross_mode** +> list[Position] update_dual_comp_position_cross_mode(settle, inline_object) + +双仓模式下切换全逐仓模式 + +### Example + +* Api Key Authentication (apiv4): +```python +from __future__ import print_function +import gate_api +from gate_api.exceptions import ApiException, GateApiException +# Defining the host is optional and defaults to https://api.gateio.ws/api/v4 +# See configuration.py for a list of all supported configuration parameters. +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure APIv4 key authorization +configuration = gate_api.Configuration( + host = "https://api.gateio.ws/api/v4", + key = "YOU_API_KEY", + secret = "YOUR_API_SECRET" +) + +api_client = gate_api.ApiClient(configuration) +# Create an instance of the API class +api_instance = gate_api.FuturesApi(api_client) +settle = 'usdt' # str | Settle currency. +inline_object = gate_api.InlineObject() # InlineObject | + +try: + # 双仓模式下切换全逐仓模式 + api_response = api_instance.update_dual_comp_position_cross_mode(settle, inline_object) + print(api_response) +except GateApiException as ex: + print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) +except ApiException as e: + print("Exception when calling FuturesApi->update_dual_comp_position_cross_mode: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **settle** | **str**| Settle currency. | + **inline_object** | [**InlineObject**](InlineObject.md)| | + +### Return type + +[**list[Position]**](Position.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **update_position_risk_limit** > Position update_position_risk_limit(settle, contract, risk_limit) @@ -2664,7 +2734,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_liquidates** -> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, at=at) +> list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) List liquidation history. @@ -2695,11 +2765,14 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency. contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) at = 0 # int | Specify a liquidation timestamp. (optional) (default to 0) try: # List liquidation history. - api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, at=at) + api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -2714,6 +2787,9 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency. | **contract** | **str**| Futures contract, return related data only if specified. | [optional] **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **at** | **int**| Specify a liquidation timestamp. | [optional] [default to 0] ### Return type @@ -2737,7 +2813,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_auto_deleverages** -> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, at=at) +> list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) List Auto-Deleveraging History. @@ -2768,11 +2844,14 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency. contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +_from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) +to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) at = 0 # int | Specify an auto-deleveraging timestamp. (optional) (default to 0) try: # List Auto-Deleveraging History. - api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, at=at) + api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -2787,6 +2866,9 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency. | **contract** | **str**| Futures contract, return related data only if specified. | [optional] **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] + **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **at** | **int**| Specify an auto-deleveraging timestamp. | [optional] [default to 0] ### Return type diff --git a/docs/InlineObject.md b/docs/InlineObject.md new file mode 100644 index 0000000..93fb3c4 --- /dev/null +++ b/docs/InlineObject.md @@ -0,0 +1,11 @@ +# InlineObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | Full position-by-position model, ISOLATED-by-position, CROSS-full position. | +**contract** | **str** | Contract Market. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 140abbc..da366ea 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.102.6" +__version__ = "6.103.0" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi @@ -138,6 +138,7 @@ from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.index_constituent import IndexConstituent +from gate_api.models.inline_object import InlineObject from gate_api.models.inline_response200 import InlineResponse200 from gate_api.models.inline_response2001 import InlineResponse2001 from gate_api.models.insurance_record import InsuranceRecord diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index 3230541..321bc01 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -2687,6 +2687,131 @@ def update_position_cross_mode_with_http_info(self, settle, futures_position_cro _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def update_dual_comp_position_cross_mode(self, settle, inline_object, **kwargs): # noqa: E501 + """双仓模式下切换全逐仓模式 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_comp_position_cross_mode(settle, inline_object, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency. (required) + :param InlineObject inline_object: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: list[gate_api.Position] + :return: If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_dual_comp_position_cross_mode_with_http_info(settle, inline_object, **kwargs) # noqa: E501 + + def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_object, **kwargs): # noqa: E501 + """双仓模式下切换全逐仓模式 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_dual_comp_position_cross_mode_with_http_info(settle, inline_object, async_req=True) + >>> result = thread.get() + + :param bool async_req: execute request asynchronously + :param str settle: Settle currency. (required) + :param InlineObject inline_object: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :rtype: tuple(list[gate_api.Position], status_code(int), headers(HTTPHeaderDict)) + :return: If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'settle', + 'inline_object' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for k, v in six.iteritems(local_var_params['kwargs']): + if k not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_dual_comp_position_cross_mode" % k + ) + local_var_params[k] = v + del local_var_params['kwargs'] + # verify the required parameter 'settle' is set + if self.api_client.client_side_validation and ('settle' not in local_var_params or # noqa: E501 + local_var_params['settle'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `settle` when calling `update_dual_comp_position_cross_mode`") # noqa: E501 + # verify the required parameter 'inline_object' is set + if self.api_client.client_side_validation and ('inline_object' not in local_var_params or # noqa: E501 + local_var_params['inline_object'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inline_object` when calling `update_dual_comp_position_cross_mode`") # noqa: E501 + + collection_formats = {} + + 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 'inline_object' in local_var_params: + body_params = local_var_params['inline_object'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['apiv4'] # noqa: E501 + + return self.api_client.call_api( + '/futures/{settle}/dual_comp/positions/cross_mode', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Position]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 """Update position risk limit. # noqa: E501 @@ -5000,6 +5125,9 @@ def list_liquidates(self, settle, **kwargs): # noqa: E501 :param str settle: Settle currency. (required) :param str contract: Futures contract, return related data only if specified. :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int at: Specify a liquidation timestamp. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -5027,6 +5155,9 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 :param str settle: Settle currency. (required) :param str contract: Futures contract, return related data only if specified. :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int at: Specify a liquidation timestamp. :param _return_http_data_only: response data without head status code and headers @@ -5048,6 +5179,9 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 'settle', 'contract', 'limit', + 'offset', + '_from', + 'to', 'at' ] all_params.extend( @@ -5076,6 +5210,8 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value less than or equal to `1000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `list_liquidates`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_liquidates`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} @@ -5087,6 +5223,12 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 query_params.append(('contract', local_var_params['contract'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 query_params.append(('at', local_var_params['at'])) # noqa: E501 @@ -5131,6 +5273,9 @@ def list_auto_deleverages(self, settle, **kwargs): # noqa: E501 :param str settle: Settle currency. (required) :param str contract: Futures contract, return related data only if specified. :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int at: Specify an auto-deleveraging timestamp. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -5158,6 +5303,9 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 :param str settle: Settle currency. (required) :param str contract: Futures contract, return related data only if specified. :param int limit: Maximum number of records to be returned in a single list. + :param int offset: List offset, starting from 0. + :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) + :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param int at: Specify an auto-deleveraging timestamp. :param _return_http_data_only: response data without head status code and headers @@ -5179,6 +5327,9 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 'settle', 'contract', 'limit', + 'offset', + '_from', + 'to', 'at' ] all_params.extend( @@ -5207,6 +5358,8 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value less than or equal to `1000`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `list_auto_deleverages`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `offset` when calling `list_auto_deleverages`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} @@ -5218,6 +5371,12 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 query_params.append(('contract', local_var_params['contract'])) # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 if 'at' in local_var_params and local_var_params['at'] is not None: # noqa: E501 query_params.append(('at', local_var_params['at'])) # noqa: E501 diff --git a/gate_api/api_client.py b/gate_api/api_client.py index b801eaa..9c422c6 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/6.102.6/python' + self.user_agent = 'OpenAPI-Generator/6.103.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 218bc37..a3b7ff7 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.102.6\n"\ - "SDK Package Version: 6.102.6".\ + "Version of the API: v4.103.0\n"\ + "SDK Package Version: 6.103.0".\ 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 d31cd80..b1251eb 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -108,6 +108,7 @@ from gate_api.models.futures_ticker import FuturesTicker from gate_api.models.futures_trade import FuturesTrade from gate_api.models.index_constituent import IndexConstituent +from gate_api.models.inline_object import InlineObject from gate_api.models.inline_response200 import InlineResponse200 from gate_api.models.inline_response2001 import InlineResponse2001 from gate_api.models.insurance_record import InsuranceRecord diff --git a/gate_api/models/inline_object.py b/gate_api/models/inline_object.py new file mode 100644 index 0000000..8008fd8 --- /dev/null +++ b/gate_api/models/inline_object.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gate API + + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + + Contact: support@mail.gate.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from gate_api.configuration import Configuration + + +class InlineObject(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mode': 'str', + 'contract': 'str' + } + + attribute_map = { + 'mode': 'mode', + 'contract': 'contract' + } + + def __init__(self, mode=None, contract=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, Configuration) -> None + """InlineObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._mode = None + self._contract = None + self.discriminator = None + + self.mode = mode + self.contract = contract + + @property + def mode(self): + """Gets the mode of this InlineObject. # noqa: E501 + + Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 + + :return: The mode of this InlineObject. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this InlineObject. + + Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 + + :param mode: The mode of this InlineObject. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and mode is None: # noqa: E501 + raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501 + + self._mode = mode + + @property + def contract(self): + """Gets the contract of this InlineObject. # noqa: E501 + + Contract Market. # noqa: E501 + + :return: The contract of this InlineObject. # noqa: E501 + :rtype: str + """ + return self._contract + + @contract.setter + def contract(self, contract): + """Sets the contract of this InlineObject. + + Contract Market. # noqa: E501 + + :param contract: The contract of this InlineObject. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contract is None: # noqa: E501 + raise ValueError("Invalid value for `contract`, must not be `None`") # noqa: E501 + + self._contract = contract + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineObject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/setup.py b/setup.py index a0b4e42..15047ec 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.102.6" +VERSION = "6.103.0" # To install the library, run the following # # python setup.py install From 744afea9ebf82f69445651cd8af382f5ca499328 Mon Sep 17 00:00:00 2001 From: gateio Date: Thu, 31 Jul 2025 02:50:15 +0000 Subject: [PATCH 18/20] update to v6.104.3 --- README.md | 567 +++++----- docs/AccountApi.md | 108 +- docs/AccountBalance.md | 8 +- docs/AccountDetail.md | 12 +- docs/AccountDetailKey.md | 4 +- docs/AccountRateLimit.md | 6 +- docs/AgencyCommission.md | 12 +- docs/AgencyCommissionHistory.md | 6 +- docs/AgencyTransaction.md | 18 +- docs/AgencyTransactionHistory.md | 6 +- docs/AutoRepaySetting.md | 2 +- docs/BatchAmendItem.md | 14 +- docs/BatchAmendOrderReq.md | 12 +- docs/BatchFuturesOrder.md | 48 +- docs/BatchOrder.md | 62 +- docs/BorrowCurrencyInfo.md | 10 +- docs/BrokerCommission.md | 4 +- docs/BrokerCommission1.md | 20 +- docs/BrokerCommissionSubBrokerInfo.md | 10 +- docs/BrokerTransaction.md | 4 +- docs/BrokerTransaction1.md | 18 +- docs/CancelBatchOrder.md | 4 +- docs/CancelOrderResult.md | 16 +- docs/CollateralAdjust.md | 6 +- docs/CollateralAdjustRes.md | 6 +- docs/CollateralAlign.md | 8 +- docs/CollateralCurrency.md | 4 +- docs/CollateralCurrencyInfo.md | 8 +- docs/CollateralCurrencyRes.md | 10 +- docs/CollateralCurrentRate.md | 6 +- docs/CollateralFixRate.md | 10 +- docs/CollateralLoanApi.md | 164 +-- docs/CollateralLoanCurrency.md | 6 +- docs/CollateralLtv.md | 8 +- docs/CollateralOrder.md | 30 +- docs/CollateralRecord.md | 22 +- docs/Contract.md | 76 +- docs/ContractStat.md | 26 +- docs/ConvertSmallBalance.md | 6 +- docs/CountdownCancelAllFuturesTask.md | 4 +- docs/CountdownCancelAllOptionsTask.md | 6 +- docs/CountdownCancelAllSpotTask.md | 4 +- docs/CreateCollateralOrder.md | 8 +- docs/CreateMultiCollateralOrder.md | 18 +- docs/CreateUniLend.md | 10 +- docs/CreateUniLoan.md | 12 +- docs/CrossMarginBalance.md | 8 +- docs/CrossMarginLoan.md | 18 +- docs/CrossMarginRepayment.md | 12 +- docs/Currency.md | 18 +- docs/CurrencyChain.md | 14 +- docs/CurrencyPair.md | 40 +- docs/CurrencyQuota.md | 12 +- docs/DebitFee.md | 2 +- docs/DeliveryApi.md | 578 +++++----- docs/DeliveryCandlestick.md | 14 +- docs/DeliveryContract.md | 78 +- docs/DeliverySettlement.md | 18 +- docs/DeliveryTicker.md | 44 +- docs/DepositAddress.md | 4 +- docs/DepositRecord.md | 16 +- docs/DualGetOrders.md | 34 +- docs/DualGetPlans.md | 26 +- docs/EarnApi.md | 118 +-- docs/EarnUniApi.md | 150 +-- docs/Eth2RateList.md | 6 +- docs/Eth2Swap.md | 6 +- docs/FindCoin.md | 4 +- docs/FlashSwapApi.md | 80 +- docs/FlashSwapCurrencyPair.md | 16 +- docs/FlashSwapOrder.md | 18 +- docs/FlashSwapOrderPreview.md | 10 +- docs/FlashSwapOrderRequest.md | 8 +- docs/FlashSwapPreviewRequest.md | 6 +- docs/FundingAccount.md | 10 +- docs/FundingRateRecord.md | 4 +- docs/FutureCancelOrderResult.md | 10 +- docs/FuturesAccount.md | 46 +- docs/FuturesAccountBook.md | 14 +- docs/FuturesAccountHistory.md | 22 +- docs/FuturesApi.md | 988 +++++++++--------- docs/FuturesAutoDeleverage.md | 20 +- docs/FuturesBatchAmendOrderRequest.md | 12 +- docs/FuturesCandlestick.md | 16 +- docs/FuturesFee.md | 6 +- docs/FuturesIndexConstituents.md | 4 +- docs/FuturesInitialOrder.md | 14 +- docs/FuturesLimitRiskTiers.md | 16 +- docs/FuturesLiqOrder.md | 14 +- docs/FuturesLiquidate.md | 24 +- docs/FuturesOrder.md | 48 +- docs/FuturesOrderAmendment.md | 4 +- docs/FuturesOrderBook.md | 8 +- docs/FuturesOrderBookItem.md | 4 +- docs/FuturesPositionCrossMode.md | 4 +- docs/FuturesPremiumIndex.md | 12 +- docs/FuturesPriceTrigger.md | 10 +- docs/FuturesPriceTriggeredOrder.md | 22 +- docs/FuturesRiskLimitTier.md | 14 +- docs/FuturesTicker.md | 40 +- docs/FuturesTrade.md | 14 +- docs/IndexConstituent.md | 4 +- docs/InlineObject.md | 4 +- docs/InlineResponse2001.md | 2 +- docs/InsuranceRecord.md | 4 +- docs/LedgerRecord.md | 24 +- docs/LiquidateOrder.md | 12 +- docs/MarginAccount.md | 12 +- docs/MarginAccountBook.md | 14 +- docs/MarginAccountCurrency.md | 12 +- docs/MarginApi.md | 188 ++-- docs/MarginLeverageTier.md | 8 +- docs/MarginMarketLeverage.md | 6 +- docs/MarginTiers.md | 10 +- docs/MarginTransferable.md | 6 +- docs/MarginUniApi.md | 134 +-- docs/MaxUniBorrowable.md | 6 +- docs/MockFuturesOrder.md | 8 +- docs/MockFuturesPosition.md | 6 +- docs/MockMarginResult.md | 14 +- docs/MockOptionsOrder.md | 8 +- docs/MockOptionsPosition.md | 6 +- docs/MockRiskUnit.md | 20 +- docs/MockSpotBalance.md | 6 +- docs/MockSpotOrder.md | 12 +- docs/MultiChainAddressItem.md | 8 +- docs/MultiCollateralCurrency.md | 6 +- docs/MultiCollateralItem.md | 6 +- docs/MultiCollateralLoanApi.md | 180 ++-- docs/MultiCollateralOrder.md | 28 +- docs/MultiCollateralRecord.md | 16 +- docs/MultiCollateralRecordCurrency.md | 12 +- docs/MultiLoanItem.md | 4 +- docs/MultiLoanRepayItem.md | 6 +- docs/MultiRepayRecord.md | 26 +- docs/MultiRepayResp.md | 6 +- docs/MyFuturesTrade.md | 22 +- docs/MyFuturesTradeTimeRange.md | 22 +- docs/OpenOrders.md | 4 +- docs/OptionsAccount.md | 32 +- docs/OptionsAccountBook.md | 8 +- docs/OptionsApi.md | 400 +++---- docs/OptionsCandlestick.md | 12 +- docs/OptionsContract.md | 52 +- docs/OptionsMMP.md | 12 +- docs/OptionsMMPReset.md | 12 +- docs/OptionsMySettlements.md | 18 +- docs/OptionsMyTrade.md | 16 +- docs/OptionsOrder.md | 50 +- docs/OptionsPosition.md | 32 +- docs/OptionsPositionClose.md | 12 +- docs/OptionsPositionCloseOrder.md | 8 +- docs/OptionsSettlement.md | 12 +- docs/OptionsTicker.md | 38 +- docs/OptionsUnderlying.md | 4 +- docs/OptionsUnderlyingTicker.md | 8 +- docs/Order.md | 58 +- docs/OrderBook.md | 8 +- docs/OrderCancel.md | 64 +- docs/OrderPatch.md | 12 +- docs/OrderResp.md | 2 +- docs/PartnerCommissionHistory.md | 4 +- docs/PartnerSub.md | 6 +- docs/PartnerSubList.md | 4 +- docs/PartnerTransactionHistory.md | 4 +- docs/PatchUniLend.md | 4 +- docs/PlaceDualInvestmentOrder.md | 8 +- docs/Position.md | 58 +- docs/PositionClose.md | 26 +- docs/PositionCloseOrder.md | 8 +- docs/ProfitLossRange.md | 8 +- docs/RebateApi.md | 240 ++--- docs/RebateUserInfo.md | 4 +- docs/RepayCurrencyRes.md | 12 +- docs/RepayLoan.md | 6 +- docs/RepayMultiLoan.md | 6 +- docs/RepayRecord.md | 28 +- docs/RepayRecordCurrency.md | 12 +- docs/RepayRecordLeftInterest.md | 12 +- docs/RepayRecordRepaidCurrency.md | 12 +- docs/RepayRecordTotalInterest.md | 8 +- docs/RepayResp.md | 6 +- docs/RiskUnits.md | 16 +- docs/SavedAddress.md | 12 +- docs/SmallBalance.md | 10 +- docs/SmallBalanceHistory.md | 12 +- docs/SpotAccount.md | 8 +- docs/SpotAccountBook.md | 14 +- docs/SpotApi.md | 558 +++++----- docs/SpotCurrencyChain.md | 10 +- docs/SpotFee.md | 16 +- docs/SpotInsuranceHistory.md | 6 +- docs/SpotPricePutOrder.md | 12 +- docs/SpotPriceTrigger.md | 6 +- docs/SpotPriceTriggeredOrder.md | 18 +- docs/StpGroup.md | 8 +- docs/StpGroupUser.md | 6 +- docs/StructuredBuy.md | 6 +- docs/StructuredGetProjectList.md | 24 +- docs/StructuredOrderList.md | 14 +- docs/SubAccount.md | 14 +- docs/SubAccountApi.md | 138 +-- docs/SubAccountBalance.md | 4 +- docs/SubAccountCrossMarginBalance.md | 2 +- docs/SubAccountFuturesBalance.md | 4 +- docs/SubAccountKey.md | 18 +- docs/SubAccountKeyPerms.md | 4 +- docs/SubAccountMarginBalance.md | 4 +- docs/SubAccountToSubAccount.md | 14 +- docs/SubAccountTransfer.md | 12 +- docs/SubAccountTransferRecordItem.md | 20 +- docs/SubCrossMarginAccount.md | 26 +- docs/SubUserMode.md | 6 +- docs/SwapCoin.md | 10 +- docs/SwapCoinStruct.md | 26 +- docs/SystemTime.md | 2 +- docs/Ticker.md | 34 +- docs/TotalBalance.md | 4 +- docs/Trade.md | 32 +- docs/TradeFee.md | 22 +- docs/TransactionID.md | 2 +- docs/Transfer.md | 12 +- docs/TransferOrderStatus.md | 4 +- docs/TransferablesResult.md | 6 +- docs/TriggerOrderResponse.md | 2 +- docs/TriggerTime.md | 2 +- docs/UidPushOrder.md | 18 +- docs/UidPushWithdrawal.md | 6 +- docs/UidPushWithdrawalResp.md | 2 +- docs/UniCurrency.md | 12 +- docs/UniCurrencyInterest.md | 2 +- docs/UniCurrencyPair.md | 10 +- docs/UniInterestRecord.md | 12 +- docs/UniLend.md | 20 +- docs/UniLendInterest.md | 4 +- docs/UniLendRecord.md | 16 +- docs/UniLoan.md | 14 +- docs/UniLoanInterestRecord.md | 16 +- docs/UniLoanRecord.md | 12 +- docs/UnifiedAccount.md | 22 +- docs/UnifiedApi.md | 304 +++--- docs/UnifiedBalance.md | 20 +- docs/UnifiedBorrowable.md | 4 +- docs/UnifiedBorrowable1.md | 6 +- docs/UnifiedCollateralReq.md | 6 +- docs/UnifiedCollateralRes.md | 4 +- docs/UnifiedCurrency.md | 12 +- docs/UnifiedDiscount.md | 6 +- docs/UnifiedDiscountTiers.md | 10 +- docs/UnifiedHistoryLoanRate.md | 8 +- docs/UnifiedHistoryLoanRateRates.md | 4 +- docs/UnifiedLeverageConfig.md | 14 +- docs/UnifiedLeverageSetting.md | 6 +- docs/UnifiedLoan.md | 12 +- docs/UnifiedLoanRecord.md | 18 +- docs/UnifiedLoanResult.md | 4 +- docs/UnifiedMarginTiers.md | 6 +- docs/UnifiedModeSet.md | 2 +- docs/UnifiedPortfolioInput.md | 16 +- docs/UnifiedPortfolioOutput.md | 10 +- docs/UnifiedRiskUnits.md | 6 +- docs/UnifiedSettings.md | 8 +- docs/UnifiedTransferable.md | 4 +- docs/UserLtvInfo.md | 16 +- docs/UserSub.md | 8 +- docs/UserSubRelation.md | 2 +- docs/UserTotalAmount.md | 6 +- docs/WalletApi.md | 360 +++---- docs/WithdrawStatus.md | 24 +- docs/WithdrawalApi.md | 28 +- docs/WithdrawalRecord.md | 24 +- gate_api/__init__.py | 4 +- gate_api/api/account_api.py | 86 +- gate_api/api/collateral_loan_api.py | 126 +-- gate_api/api/delivery_api.py | 474 ++++----- gate_api/api/earn_api.py | 82 +- gate_api/api/earn_uni_api.py | 114 +- gate_api/api/flash_swap_api.py | 62 +- gate_api/api/futures_api.py | 806 +++++++------- gate_api/api/margin_api.py | 150 +-- gate_api/api/margin_uni_api.py | 106 +- gate_api/api/multi_collateral_loan_api.py | 138 +-- gate_api/api/options_api.py | 298 +++--- gate_api/api/rebate_api.py | 222 ++-- gate_api/api/spot_api.py | 458 ++++---- gate_api/api/sub_account_api.py | 98 +- gate_api/api/unified_api.py | 232 ++-- gate_api/api/wallet_api.py | 294 +++--- gate_api/api/withdrawal_api.py | 22 +- gate_api/api_client.py | 4 +- gate_api/configuration.py | 10 +- gate_api/exceptions.py | 2 +- gate_api/models/__init__.py | 2 +- gate_api/models/account_balance.py | 14 +- gate_api/models/account_detail.py | 22 +- gate_api/models/account_detail_key.py | 6 +- gate_api/models/account_rate_limit.py | 14 +- gate_api/models/agency_commission.py | 26 +- gate_api/models/agency_commission_history.py | 14 +- gate_api/models/agency_transaction.py | 38 +- gate_api/models/agency_transaction_history.py | 14 +- gate_api/models/auto_repay_setting.py | 6 +- gate_api/models/batch_amend_item.py | 26 +- gate_api/models/batch_amend_order_req.py | 22 +- gate_api/models/batch_futures_order.py | 94 +- gate_api/models/batch_order.py | 122 +-- gate_api/models/borrow_currency_info.py | 22 +- gate_api/models/broker_commission.py | 10 +- gate_api/models/broker_commission1.py | 42 +- .../broker_commission_sub_broker_info.py | 18 +- gate_api/models/broker_transaction.py | 10 +- gate_api/models/broker_transaction1.py | 38 +- gate_api/models/cancel_batch_order.py | 6 +- gate_api/models/cancel_order_result.py | 30 +- gate_api/models/collateral_adjust.py | 14 +- gate_api/models/collateral_adjust_res.py | 10 +- gate_api/models/collateral_align.py | 18 +- gate_api/models/collateral_currency.py | 10 +- gate_api/models/collateral_currency_info.py | 18 +- gate_api/models/collateral_currency_res.py | 22 +- gate_api/models/collateral_current_rate.py | 10 +- gate_api/models/collateral_fix_rate.py | 18 +- gate_api/models/collateral_loan_currency.py | 10 +- gate_api/models/collateral_ltv.py | 14 +- gate_api/models/collateral_order.py | 58 +- gate_api/models/collateral_record.py | 42 +- gate_api/models/contract.py | 150 +-- gate_api/models/contract_stat.py | 54 +- gate_api/models/convert_small_balance.py | 10 +- .../countdown_cancel_all_futures_task.py | 6 +- .../countdown_cancel_all_options_task.py | 10 +- .../models/countdown_cancel_all_spot_task.py | 6 +- gate_api/models/create_collateral_order.py | 18 +- .../models/create_multi_collateral_order.py | 38 +- gate_api/models/create_uni_lend.py | 18 +- gate_api/models/create_uni_loan.py | 22 +- gate_api/models/cross_margin_balance.py | 18 +- gate_api/models/cross_margin_loan.py | 38 +- gate_api/models/cross_margin_repayment.py | 26 +- gate_api/models/currency.py | 38 +- gate_api/models/currency_chain.py | 30 +- gate_api/models/currency_pair.py | 78 +- gate_api/models/currency_quota.py | 22 +- gate_api/models/debit_fee.py | 6 +- gate_api/models/delivery_candlestick.py | 26 +- gate_api/models/delivery_contract.py | 154 +-- gate_api/models/delivery_settlement.py | 38 +- gate_api/models/delivery_ticker.py | 90 +- gate_api/models/deposit_address.py | 10 +- gate_api/models/deposit_record.py | 34 +- gate_api/models/dual_get_orders.py | 70 +- gate_api/models/dual_get_plans.py | 54 +- gate_api/models/eth2_rate_list.py | 14 +- gate_api/models/eth2_swap.py | 10 +- gate_api/models/find_coin.py | 10 +- gate_api/models/flash_swap_currency_pair.py | 30 +- gate_api/models/flash_swap_order.py | 34 +- gate_api/models/flash_swap_order_preview.py | 18 +- gate_api/models/flash_swap_order_request.py | 14 +- gate_api/models/flash_swap_preview_request.py | 10 +- gate_api/models/funding_account.py | 22 +- gate_api/models/funding_rate_record.py | 10 +- gate_api/models/future_cancel_order_result.py | 18 +- gate_api/models/futures_account.py | 94 +- gate_api/models/futures_account_book.py | 30 +- gate_api/models/futures_account_history.py | 42 +- gate_api/models/futures_auto_deleverage.py | 42 +- .../futures_batch_amend_order_request.py | 22 +- gate_api/models/futures_candlestick.py | 30 +- gate_api/models/futures_fee.py | 10 +- gate_api/models/futures_index_constituents.py | 10 +- gate_api/models/futures_initial_order.py | 30 +- gate_api/models/futures_limit_risk_tiers.py | 30 +- gate_api/models/futures_liq_order.py | 30 +- gate_api/models/futures_liquidate.py | 50 +- gate_api/models/futures_order.py | 94 +- gate_api/models/futures_order_amendment.py | 10 +- gate_api/models/futures_order_book.py | 18 +- gate_api/models/futures_order_book_item.py | 10 +- .../models/futures_position_cross_mode.py | 10 +- gate_api/models/futures_premium_index.py | 22 +- gate_api/models/futures_price_trigger.py | 22 +- .../models/futures_price_triggered_order.py | 42 +- gate_api/models/futures_risk_limit_tier.py | 26 +- gate_api/models/futures_ticker.py | 82 +- gate_api/models/futures_trade.py | 30 +- gate_api/models/index_constituent.py | 10 +- gate_api/models/inline_object.py | 10 +- gate_api/models/inline_response200.py | 2 +- gate_api/models/inline_response2001.py | 6 +- gate_api/models/insurance_record.py | 10 +- gate_api/models/ledger_record.py | 50 +- gate_api/models/liquidate_order.py | 22 +- gate_api/models/margin_account.py | 22 +- gate_api/models/margin_account_book.py | 30 +- gate_api/models/margin_account_currency.py | 22 +- gate_api/models/margin_leverage_tier.py | 14 +- gate_api/models/margin_market_leverage.py | 10 +- gate_api/models/margin_tiers.py | 22 +- gate_api/models/margin_transferable.py | 14 +- gate_api/models/max_uni_borrowable.py | 14 +- gate_api/models/mock_futures_order.py | 14 +- gate_api/models/mock_futures_position.py | 10 +- gate_api/models/mock_margin_result.py | 26 +- gate_api/models/mock_options_order.py | 14 +- gate_api/models/mock_options_position.py | 10 +- gate_api/models/mock_risk_unit.py | 38 +- gate_api/models/mock_spot_balance.py | 10 +- gate_api/models/mock_spot_order.py | 22 +- gate_api/models/multi_chain_address_item.py | 18 +- gate_api/models/multi_collateral_currency.py | 10 +- gate_api/models/multi_collateral_item.py | 14 +- gate_api/models/multi_collateral_order.py | 54 +- gate_api/models/multi_collateral_record.py | 30 +- .../multi_collateral_record_currency.py | 26 +- gate_api/models/multi_loan_item.py | 10 +- gate_api/models/multi_loan_repay_item.py | 14 +- gate_api/models/multi_repay_record.py | 50 +- gate_api/models/multi_repay_resp.py | 10 +- gate_api/models/my_futures_trade.py | 46 +- .../models/my_futures_trade_time_range.py | 46 +- gate_api/models/open_orders.py | 10 +- gate_api/models/options_account.py | 66 +- gate_api/models/options_account_book.py | 18 +- gate_api/models/options_candlestick.py | 22 +- gate_api/models/options_contract.py | 102 +- gate_api/models/options_mmp.py | 26 +- gate_api/models/options_mmp_reset.py | 26 +- gate_api/models/options_my_settlements.py | 38 +- gate_api/models/options_my_trade.py | 34 +- gate_api/models/options_order.py | 98 +- gate_api/models/options_position.py | 62 +- gate_api/models/options_position_close.py | 26 +- .../models/options_position_close_order.py | 14 +- gate_api/models/options_settlement.py | 26 +- gate_api/models/options_ticker.py | 74 +- gate_api/models/options_underlying.py | 10 +- gate_api/models/options_underlying_ticker.py | 14 +- gate_api/models/order.py | 114 +- gate_api/models/order_book.py | 18 +- gate_api/models/order_cancel.py | 126 +-- gate_api/models/order_patch.py | 22 +- gate_api/models/order_resp.py | 6 +- gate_api/models/partner_commission_history.py | 10 +- gate_api/models/partner_sub.py | 14 +- gate_api/models/partner_sub_list.py | 10 +- .../models/partner_transaction_history.py | 10 +- gate_api/models/patch_uni_lend.py | 10 +- .../models/place_dual_investment_order.py | 14 +- gate_api/models/position.py | 114 +- gate_api/models/position_close.py | 54 +- gate_api/models/position_close_order.py | 14 +- gate_api/models/profit_loss_range.py | 14 +- gate_api/models/rebate_user_info.py | 6 +- gate_api/models/repay_currency_res.py | 26 +- gate_api/models/repay_loan.py | 10 +- gate_api/models/repay_multi_loan.py | 10 +- gate_api/models/repay_record.py | 54 +- gate_api/models/repay_record_currency.py | 26 +- gate_api/models/repay_record_left_interest.py | 26 +- .../models/repay_record_repaid_currency.py | 26 +- .../models/repay_record_total_interest.py | 18 +- gate_api/models/repay_resp.py | 10 +- gate_api/models/risk_units.py | 34 +- gate_api/models/saved_address.py | 26 +- gate_api/models/small_balance.py | 18 +- gate_api/models/small_balance_history.py | 22 +- gate_api/models/spot_account.py | 18 +- gate_api/models/spot_account_book.py | 30 +- gate_api/models/spot_currency_chain.py | 22 +- gate_api/models/spot_fee.py | 34 +- gate_api/models/spot_insurance_history.py | 14 +- gate_api/models/spot_price_put_order.py | 26 +- gate_api/models/spot_price_trigger.py | 14 +- gate_api/models/spot_price_triggered_order.py | 34 +- gate_api/models/stp_group.py | 18 +- gate_api/models/stp_group_user.py | 14 +- gate_api/models/structured_buy.py | 10 +- .../models/structured_get_project_list.py | 46 +- gate_api/models/structured_order_list.py | 26 +- gate_api/models/sub_account.py | 30 +- gate_api/models/sub_account_balance.py | 10 +- .../sub_account_cross_margin_balance.py | 6 +- .../models/sub_account_futures_balance.py | 10 +- gate_api/models/sub_account_key.py | 38 +- gate_api/models/sub_account_key_perms.py | 10 +- gate_api/models/sub_account_margin_balance.py | 10 +- gate_api/models/sub_account_to_sub_account.py | 30 +- gate_api/models/sub_account_transfer.py | 26 +- .../sub_account_transfer_record_item.py | 42 +- gate_api/models/sub_cross_margin_account.py | 54 +- gate_api/models/sub_user_mode.py | 14 +- gate_api/models/swap_coin.py | 18 +- gate_api/models/swap_coin_struct.py | 54 +- gate_api/models/system_time.py | 6 +- gate_api/models/ticker.py | 70 +- gate_api/models/total_balance.py | 6 +- gate_api/models/trade.py | 66 +- gate_api/models/trade_fee.py | 46 +- gate_api/models/transaction_id.py | 6 +- gate_api/models/transfer.py | 26 +- gate_api/models/transfer_order_status.py | 10 +- gate_api/models/transferables_result.py | 10 +- gate_api/models/trigger_order_response.py | 6 +- gate_api/models/trigger_time.py | 6 +- gate_api/models/uid_push_order.py | 38 +- gate_api/models/uid_push_withdrawal.py | 14 +- gate_api/models/uid_push_withdrawal_resp.py | 6 +- gate_api/models/uni_currency.py | 22 +- gate_api/models/uni_currency_interest.py | 6 +- gate_api/models/uni_currency_pair.py | 18 +- gate_api/models/uni_interest_record.py | 22 +- gate_api/models/uni_lend.py | 38 +- gate_api/models/uni_lend_interest.py | 10 +- gate_api/models/uni_lend_record.py | 30 +- gate_api/models/uni_loan.py | 26 +- gate_api/models/uni_loan_interest_record.py | 30 +- gate_api/models/uni_loan_record.py | 22 +- gate_api/models/unified_account.py | 46 +- gate_api/models/unified_balance.py | 42 +- gate_api/models/unified_borrowable.py | 10 +- gate_api/models/unified_borrowable1.py | 10 +- gate_api/models/unified_collateral_req.py | 14 +- gate_api/models/unified_collateral_res.py | 6 +- gate_api/models/unified_currency.py | 26 +- gate_api/models/unified_discount.py | 10 +- gate_api/models/unified_discount_tiers.py | 22 +- gate_api/models/unified_history_loan_rate.py | 18 +- .../models/unified_history_loan_rate_rates.py | 10 +- gate_api/models/unified_leverage_config.py | 30 +- gate_api/models/unified_leverage_setting.py | 10 +- gate_api/models/unified_loan.py | 22 +- gate_api/models/unified_loan_record.py | 34 +- gate_api/models/unified_loan_result.py | 6 +- gate_api/models/unified_margin_tiers.py | 10 +- gate_api/models/unified_mode_set.py | 6 +- gate_api/models/unified_portfolio_input.py | 30 +- gate_api/models/unified_portfolio_output.py | 18 +- gate_api/models/unified_risk_units.py | 14 +- gate_api/models/unified_settings.py | 18 +- gate_api/models/unified_transferable.py | 10 +- gate_api/models/user_ltv_info.py | 30 +- gate_api/models/user_sub.py | 18 +- gate_api/models/user_sub_relation.py | 6 +- gate_api/models/user_total_amount.py | 10 +- gate_api/models/withdraw_status.py | 50 +- gate_api/models/withdrawal_record.py | 50 +- gate_api/rest.py | 2 +- setup.py | 4 +- 549 files changed, 9712 insertions(+), 9713 deletions(-) diff --git a/README.md b/README.md index 217d9b9..b276beb 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ # gate-api Welcome to Gate API - APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces -for implementing API-based automated trading. +APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v4.103.0 -- Package version: 6.103.0 +- API version: v4.104.3 +- Package version: 6.104.3 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) @@ -88,7 +87,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnUniApi(api_client) try: - # List currencies for lending. + # Query lending currency list api_response = api_instance.list_uni_currencies() print(api_response) except GateApiException as ex: @@ -106,288 +105,288 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending. -*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending. -*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders. -*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem. -*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order. -*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending. -*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency. -*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records. -*EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status. -*EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart. -*EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate. -*MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets. -*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market. -*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate. -*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans. -*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay. -*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records. -*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records. -*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable. -*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts. -*SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account. -*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account. -*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account. -*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account. -*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account. -*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account. -*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account. -*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account. -*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account. -*SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode. -*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information. -*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account. -*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account. -*UnifiedApi* | [**get_unified_transferables**](docs/UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. -*UnifiedApi* | [**get_unified_borrowable_list**](docs/UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum. -*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans. -*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay. -*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records. -*UnifiedApi* | [**list_unified_loan_interest_records**](docs/UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records. -*UnifiedApi* | [**get_unified_risk_units**](docs/UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details. -*UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account. -*UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account. -*UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate. -*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers. -*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers. -*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator. -*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency. -*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage. -*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account. -*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates. -*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency. -*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail. -*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information. -*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups. -*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group. -*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group. -*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group. -*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group. -*AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. -*AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. -*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders. -*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order. -*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order. -*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment. -*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history. -*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records. -*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral. -*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user. -*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio. -*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies. -*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts. -*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract. -*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book. -*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history. -*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks. -*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers. -*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history. -*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account. -*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book. -*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user. -*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position. -*DeliveryApi* | [**update_delivery_position_margin**](docs/DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin. -*DeliveryApi* | [**update_delivery_position_leverage**](docs/DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage. -*DeliveryApi* | [**update_delivery_position_risk_limit**](docs/DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit. -*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders. -*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order. -*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched. -*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order. -*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order. -*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history. -*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history. -*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history. -*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history. -*DeliveryApi* | [**list_delivery_risk_limit_tiers**](docs/DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers. -*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders. -*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order. -*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders. -*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order. -*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order. -*EarnApi* | [**swap_eth2**](docs/EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap. -*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query. -*EarnApi* | [**list_dual_investment_plans**](docs/EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list. -*EarnApi* | [**list_dual_orders**](docs/EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list. -*EarnApi* | [**place_dual_order**](docs/EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order. -*EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List. -*EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List. -*EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order. -*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins. -*EarnApi* | [**swap_staking_coin**](docs/EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins. -*FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap. -*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders. -*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order. -*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail. -*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview. -*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts. -*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract. -*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book. -*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history. -*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks. -*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line. -*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers. -*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history. -*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history. -*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats. -*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents. -*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history. -*FuturesApi* | [**list_futures_risk_limit_tiers**](docs/FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers. -*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account. -*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book. -*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user. -*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position. -*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin. -*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage. -*FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode. -*FuturesApi* | [**update_dual_comp_position_cross_mode**](docs/FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | 双仓模式下切换全逐仓模式 -*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit. -*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode. -*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode. -*FuturesApi* | [**update_dual_mode_position_margin**](docs/FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode. -*FuturesApi* | [**update_dual_mode_position_leverage**](docs/FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode. -*FuturesApi* | [**update_dual_mode_position_risk_limit**](docs/FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode. -*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders. -*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order. -*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched. -*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range. -*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders. -*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order. -*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order. -*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order. -*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history. -*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range. -*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history. -*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history. -*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History. -*FuturesApi* | [**countdown_cancel_all_futures**](docs/FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders. -*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates. -*FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list. -*FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs. -*FuturesApi* | [**get_futures_risk_limit_table**](docs/FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id. -*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders. -*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order. -*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders. -*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order. -*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order. -*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list. -*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history. -*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list. -*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting. -*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting. -*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency. -*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market. -*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient. -*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple. -*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list. -*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated). -*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated). -*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders. -*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order. -*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail. -*MultiCollateralLoanApi* | [**list_multi_repay_records**](docs/MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records. -*MultiCollateralLoanApi* | [**repay_multi_collateral_loan**](docs/MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan. -*MultiCollateralLoanApi* | [**list_multi_collateral_records**](docs/MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records. -*MultiCollateralLoanApi* | [**operate_multi_collateral**](docs/MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral. -*MultiCollateralLoanApi* | [**list_user_currency_quota**](docs/MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota. -*MultiCollateralLoanApi* | [**list_multi_collateral_currencies**](docs/MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral. -*MultiCollateralLoanApi* | [**get_multi_collateral_ltv**](docs/MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio. -*MultiCollateralLoanApi* | [**get_multi_collateral_fix_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days. -*MultiCollateralLoanApi* | [**get_multi_collateral_current_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency. -*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings. -*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times. -*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time. -*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail. -*OptionsApi* | [**list_options_settlements**](docs/OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history. -*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement. -*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements. -*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book. -*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts. -*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker. -*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks. -*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying. -*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history. -*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account. -*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history. -*OptionsApi* | [**list_options_positions**](docs/OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying. -*OptionsApi* | [**get_options_position**](docs/OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position. -*OptionsApi* | [**list_options_position_close**](docs/OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying. -*OptionsApi* | [**list_options_orders**](docs/OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders. -*OptionsApi* | [**create_options_order**](docs/OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order. -*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched. -*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order. -*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order. -*OptionsApi* | [**countdown_cancel_all_options**](docs/OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders. -*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history. +*EarnUniApi* | [**list_uni_currencies**](docs/EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | Query lending currency list +*EarnUniApi* | [**get_uni_currency**](docs/EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Query single lending currency details +*EarnUniApi* | [**list_user_uni_lends**](docs/EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | Query user's lending order list +*EarnUniApi* | [**create_uni_lend**](docs/EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Create lending or redemption +*EarnUniApi* | [**change_uni_lend**](docs/EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend user lending information +*EarnUniApi* | [**list_uni_lend_records**](docs/EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | Query lending transaction records +*EarnUniApi* | [**get_uni_interest**](docs/EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Query user's total interest income for specified currency +*EarnUniApi* | [**list_uni_interest_records**](docs/EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | Query user dividend records +*EarnUniApi* | [**get_uni_interest_status**](docs/EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | Query currency interest compounding status +*EarnUniApi* | [**list_uni_chart**](docs/EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart +*EarnUniApi* | [**list_uni_rate**](docs/EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimated annualized interest rate +*MarginUniApi* | [**list_uni_currency_pairs**](docs/MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets +*MarginUniApi* | [**get_uni_currency_pair**](docs/MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get lending market details +*MarginUniApi* | [**get_margin_uni_estimate_rate**](docs/MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest rate for isolated margin currencies +*MarginUniApi* | [**list_uni_loans**](docs/MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | Query loans +*MarginUniApi* | [**create_uni_loan**](docs/MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay +*MarginUniApi* | [**list_uni_loan_records**](docs/MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Query loan records +*MarginUniApi* | [**list_uni_loan_interest_records**](docs/MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | Query interest deduction records +*MarginUniApi* | [**get_uni_borrowable**](docs/MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Query maximum borrowable amount by currency +*SubAccountApi* | [**list_sub_accounts**](docs/SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts +*SubAccountApi* | [**create_sub_accounts**](docs/SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account +*SubAccountApi* | [**get_sub_account**](docs/SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get sub-account +*SubAccountApi* | [**list_sub_account_keys**](docs/SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API key pairs of the sub-account +*SubAccountApi* | [**create_sub_account_keys**](docs/SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create new sub-account API key pair +*SubAccountApi* | [**get_sub_account_key**](docs/SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get specific API key pair of the sub-account +*SubAccountApi* | [**update_sub_account_keys**](docs/SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update sub-account API key pair +*SubAccountApi* | [**delete_sub_account_keys**](docs/SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete sub-account API key pair +*SubAccountApi* | [**lock_sub_account**](docs/SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock sub-account +*SubAccountApi* | [**unlock_sub_account**](docs/SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock sub-account +*SubAccountApi* | [**list_unified_mode**](docs/SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode +*UnifiedApi* | [**list_unified_accounts**](docs/UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information +*UnifiedApi* | [**get_unified_borrowable**](docs/UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query maximum borrowable amount for unified account +*UnifiedApi* | [**get_unified_transferable**](docs/UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query maximum transferable amount for unified account +*UnifiedApi* | [**get_unified_transferables**](docs/UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change +*UnifiedApi* | [**get_unified_borrowable_list**](docs/UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account maximum borrowable amount +*UnifiedApi* | [**list_unified_loans**](docs/UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | Query loans +*UnifiedApi* | [**create_unified_loan**](docs/UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay +*UnifiedApi* | [**list_unified_loan_records**](docs/UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Query loan records +*UnifiedApi* | [**list_unified_loan_interest_records**](docs/UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | Query interest deduction records +*UnifiedApi* | [**get_unified_risk_units**](docs/UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details +*UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account +*UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set unified account mode +*UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Query unified account estimated interest rate +*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered discount +*UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin +*UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +*UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set +*UnifiedApi* | [**get_user_leverage_currency_setting**](docs/UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get user currency leverage +*UnifiedApi* | [**set_user_leverage_currency_setting**](docs/UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set loan currency leverage +*UnifiedApi* | [**list_unified_currencies**](docs/UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account +*UnifiedApi* | [**get_history_loan_rate**](docs/UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | Get historical lending rates +*UnifiedApi* | [**set_unified_collateral**](docs/UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set collateral currency +*AccountApi* | [**get_account_detail**](docs/AccountApi.md#get_account_detail) | **GET** /account/detail | Retrieve user account information +*AccountApi* | [**get_account_rate_limit**](docs/AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information +*AccountApi* | [**list_stp_groups**](docs/AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | Query STP user groups created by the user +*AccountApi* | [**create_stp_group**](docs/AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP user group +*AccountApi* | [**list_stp_groups_users**](docs/AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | Query users in the STP user group +*AccountApi* | [**add_stp_group_users**](docs/AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP user group +*AccountApi* | [**delete_stp_group_users**](docs/AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete users from the STP user group +*AccountApi* | [**get_debit_fee**](docs/AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT fee deduction configuration +*AccountApi* | [**set_debit_fee**](docs/AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Configure GT fee deduction +*CollateralLoanApi* | [**list_collateral_loan_orders**](docs/CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | Query collateral loan order list +*CollateralLoanApi* | [**create_collateral_loan**](docs/CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place collateral loan order +*CollateralLoanApi* | [**get_collateral_loan_order_detail**](docs/CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Query single order details +*CollateralLoanApi* | [**repay_collateral_loan**](docs/CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Collateral loan repayment +*CollateralLoanApi* | [**list_repay_records**](docs/CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Query collateral loan repayment records +*CollateralLoanApi* | [**list_collateral_records**](docs/CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records +*CollateralLoanApi* | [**operate_collateral**](docs/CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral +*CollateralLoanApi* | [**get_user_total_amount**](docs/CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query user's total borrowing and collateral amount +*CollateralLoanApi* | [**get_user_ltv_info**](docs/CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio and remaining borrowable currencies +*CollateralLoanApi* | [**list_collateral_currencies**](docs/CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies +*DeliveryApi* | [**list_delivery_contracts**](docs/DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | Query all futures contracts +*DeliveryApi* | [**get_delivery_contract**](docs/DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Query single contract information +*DeliveryApi* | [**list_delivery_order_book**](docs/DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Query futures market depth information +*DeliveryApi* | [**list_delivery_trades**](docs/DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures market transaction records +*DeliveryApi* | [**list_delivery_candlesticks**](docs/DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Futures market K-line chart +*DeliveryApi* | [**list_delivery_tickers**](docs/DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | Get all futures trading statistics +*DeliveryApi* | [**list_delivery_insurance_ledger**](docs/DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures market insurance fund history +*DeliveryApi* | [**list_delivery_accounts**](docs/DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Get futures account +*DeliveryApi* | [**list_delivery_account_book**](docs/DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query futures account change history +*DeliveryApi* | [**list_delivery_positions**](docs/DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | Get user position list +*DeliveryApi* | [**get_delivery_position**](docs/DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position information +*DeliveryApi* | [**update_delivery_position_margin**](docs/DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin +*DeliveryApi* | [**update_delivery_position_leverage**](docs/DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage +*DeliveryApi* | [**update_delivery_position_risk_limit**](docs/DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit +*DeliveryApi* | [**list_delivery_orders**](docs/DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | Query futures order list +*DeliveryApi* | [**create_delivery_order**](docs/DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Place futures order +*DeliveryApi* | [**cancel_delivery_orders**](docs/DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all orders with 'open' status +*DeliveryApi* | [**get_delivery_order**](docs/DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Query single order details +*DeliveryApi* | [**cancel_delivery_order**](docs/DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel single order +*DeliveryApi* | [**get_my_delivery_trades**](docs/DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | Query personal trading records +*DeliveryApi* | [**list_delivery_position_close**](docs/DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | Query position close history +*DeliveryApi* | [**list_delivery_liquidates**](docs/DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | Query liquidation history +*DeliveryApi* | [**list_delivery_settlements**](docs/DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | Query settlement records +*DeliveryApi* | [**list_delivery_risk_limit_tiers**](docs/DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | Query risk limit tiers +*DeliveryApi* | [**list_price_triggered_delivery_orders**](docs/DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | Query auto order list +*DeliveryApi* | [**create_price_triggered_delivery_order**](docs/DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create price-triggered order +*DeliveryApi* | [**cancel_price_triggered_delivery_order_list**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel all auto orders +*DeliveryApi* | [**get_price_triggered_delivery_order**](docs/DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Query single auto order details +*DeliveryApi* | [**cancel_price_triggered_delivery_order**](docs/DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | Cancel single auto order +*EarnApi* | [**swap_eth2**](docs/EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap +*EarnApi* | [**rate_list_eth2**](docs/EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical return rate query +*EarnApi* | [**list_dual_investment_plans**](docs/EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list +*EarnApi* | [**list_dual_orders**](docs/EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list +*EarnApi* | [**place_dual_order**](docs/EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order +*EarnApi* | [**list_structured_products**](docs/EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List +*EarnApi* | [**list_structured_orders**](docs/EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List +*EarnApi* | [**place_structured_order**](docs/EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order +*EarnApi* | [**find_coin**](docs/EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking coins +*EarnApi* | [**swap_staking_coin**](docs/EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain token swap for earned coins +*FlashSwapApi* | [**list_flash_swap_currency_pair**](docs/FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap +*FlashSwapApi* | [**list_flash_swap_orders**](docs/FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | Query flash swap order list +*FlashSwapApi* | [**create_flash_swap_order**](docs/FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order +*FlashSwapApi* | [**get_flash_swap_order**](docs/FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Query single flash swap order +*FlashSwapApi* | [**preview_flash_swap_order**](docs/FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Flash swap order preview +*FuturesApi* | [**list_futures_contracts**](docs/FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | Query all futures contracts +*FuturesApi* | [**get_futures_contract**](docs/FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Query single contract information +*FuturesApi* | [**list_futures_order_book**](docs/FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Query futures market depth information +*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures market transaction records +*FuturesApi* | [**list_futures_candlesticks**](docs/FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Futures market K-line chart +*FuturesApi* | [**list_futures_premium_index**](docs/FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-line chart +*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | Get all futures trading statistics +*FuturesApi* | [**list_futures_funding_rate_history**](docs/FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Futures market historical funding rate +*FuturesApi* | [**list_futures_insurance_ledger**](docs/FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures market insurance fund history +*FuturesApi* | [**list_contract_stats**](docs/FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures statistics +*FuturesApi* | [**get_index_constituents**](docs/FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Query index constituents +*FuturesApi* | [**list_liquidated_orders**](docs/FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Query liquidation order history +*FuturesApi* | [**list_futures_risk_limit_tiers**](docs/FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | Query risk limit tiers +*FuturesApi* | [**list_futures_accounts**](docs/FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Get futures account +*FuturesApi* | [**list_futures_account_book**](docs/FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query futures account change history +*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | Get user position list +*FuturesApi* | [**get_position**](docs/FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position information +*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin +*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage +*FuturesApi* | [**update_position_cross_mode**](docs/FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch Position Margin Mode +*FuturesApi* | [**update_dual_comp_position_cross_mode**](docs/FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | Switch Between Cross and Isolated Margin Modes Under Hedge Mode +*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit +*FuturesApi* | [**set_dual_mode**](docs/FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Set position mode +*FuturesApi* | [**get_dual_mode_position**](docs/FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Get position information in dual mode +*FuturesApi* | [**update_dual_mode_position_margin**](docs/FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode +*FuturesApi* | [**update_dual_mode_position_leverage**](docs/FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode +*FuturesApi* | [**update_dual_mode_position_risk_limit**](docs/FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode +*FuturesApi* | [**list_futures_orders**](docs/FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | Query futures order list +*FuturesApi* | [**create_futures_order**](docs/FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Place futures order +*FuturesApi* | [**cancel_futures_orders**](docs/FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all orders with 'open' status +*FuturesApi* | [**get_orders_with_time_range**](docs/FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | Query futures order list by time range +*FuturesApi* | [**create_batch_futures_order**](docs/FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Place batch futures orders +*FuturesApi* | [**get_futures_order**](docs/FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Query single order details +*FuturesApi* | [**amend_futures_order**](docs/FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend single order +*FuturesApi* | [**cancel_futures_order**](docs/FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel single order +*FuturesApi* | [**get_my_trades**](docs/FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | Query personal trading records +*FuturesApi* | [**get_my_trades_with_time_range**](docs/FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | Query personal trading records by time range +*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | Query position close history +*FuturesApi* | [**list_liquidates**](docs/FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | Query liquidation history +*FuturesApi* | [**list_auto_deleverages**](docs/FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | Query ADL auto-deleveraging order information +*FuturesApi* | [**countdown_cancel_all_futures**](docs/FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders +*FuturesApi* | [**get_futures_fee**](docs/FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query futures market trading fee rates +*FuturesApi* | [**cancel_batch_future_orders**](docs/FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel batch orders by specified ID list +*FuturesApi* | [**amend_batch_future_orders**](docs/FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders by specified IDs +*FuturesApi* | [**get_futures_risk_limit_table**](docs/FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id +*FuturesApi* | [**list_price_triggered_orders**](docs/FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | Query auto order list +*FuturesApi* | [**create_price_triggered_order**](docs/FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create price-triggered order +*FuturesApi* | [**cancel_price_triggered_order_list**](docs/FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel all auto orders +*FuturesApi* | [**get_price_triggered_order**](docs/FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Query single auto order details +*FuturesApi* | [**cancel_price_triggered_order**](docs/FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | Cancel single auto order +*MarginApi* | [**list_margin_accounts**](docs/MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list +*MarginApi* | [**list_margin_account_book**](docs/MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | Query margin account balance change history +*MarginApi* | [**list_funding_accounts**](docs/MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list +*MarginApi* | [**get_auto_repay_status**](docs/MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Query user auto repayment settings +*MarginApi* | [**set_auto_repay**](docs/MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user auto repayment settings +*MarginApi* | [**get_margin_transferable**](docs/MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get maximum transferable amount for isolated margin +*MarginApi* | [**get_user_margin_tier**](docs/MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Query user's own leverage lending tiers in current market +*MarginApi* | [**get_market_margin_tier**](docs/MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query current market leverage lending tiers +*MarginApi* | [**set_user_market_leverage**](docs/MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set user market leverage multiplier +*MarginApi* | [**list_margin_user_account**](docs/MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query user's isolated margin account list +*MarginApi* | [**list_cross_margin_loans**](docs/MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | Query cross margin borrow history (deprecated) +*MarginApi* | [**list_cross_margin_repayments**](docs/MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) +*MultiCollateralLoanApi* | [**list_multi_collateral_orders**](docs/MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | Query multi-currency collateral order list +*MultiCollateralLoanApi* | [**create_multi_collateral**](docs/MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Place multi-currency collateral order +*MultiCollateralLoanApi* | [**get_multi_collateral_order_detail**](docs/MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Query order details +*MultiCollateralLoanApi* | [**list_multi_repay_records**](docs/MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | Query multi-currency collateral repayment records +*MultiCollateralLoanApi* | [**repay_multi_collateral_loan**](docs/MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Multi-currency collateral repayment +*MultiCollateralLoanApi* | [**list_multi_collateral_records**](docs/MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records +*MultiCollateralLoanApi* | [**operate_multi_collateral**](docs/MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Add or withdraw collateral +*MultiCollateralLoanApi* | [**list_user_currency_quota**](docs/MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | Query user's collateral and borrowing currency quota information +*MultiCollateralLoanApi* | [**list_multi_collateral_currencies**](docs/MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies for multi-currency collateral +*MultiCollateralLoanApi* | [**get_multi_collateral_ltv**](docs/MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Query collateralization ratio information +*MultiCollateralLoanApi* | [**get_multi_collateral_fix_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query currency's 7-day and 30-day fixed interest rates +*MultiCollateralLoanApi* | [**get_multi_collateral_current_rate**](docs/MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query currency's current interest rate +*OptionsApi* | [**list_options_underlyings**](docs/OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlying assets +*OptionsApi* | [**list_options_expirations**](docs/OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration dates +*OptionsApi* | [**list_options_contracts**](docs/OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all contracts for specified underlying and expiration date +*OptionsApi* | [**get_options_contract**](docs/OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract details +*OptionsApi* | [**list_options_settlements**](docs/OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history +*OptionsApi* | [**get_options_settlement**](docs/OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract settlement information +*OptionsApi* | [**list_my_options_settlements**](docs/OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | Query personal settlement records +*OptionsApi* | [**list_options_order_book**](docs/OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Query options contract order book +*OptionsApi* | [**list_options_tickers**](docs/OptionsApi.md#list_options_tickers) | **GET** /options/tickers | Query options market ticker information +*OptionsApi* | [**list_options_underlying_tickers**](docs/OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Query underlying ticker information +*OptionsApi* | [**list_options_candlesticks**](docs/OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Options contract market candlestick chart +*OptionsApi* | [**list_options_underlying_candlesticks**](docs/OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Underlying index price candlestick chart +*OptionsApi* | [**list_options_trades**](docs/OptionsApi.md#list_options_trades) | **GET** /options/trades | Market trade records +*OptionsApi* | [**list_options_account**](docs/OptionsApi.md#list_options_account) | **GET** /options/accounts | Query account information +*OptionsApi* | [**list_options_account_book**](docs/OptionsApi.md#list_options_account_book) | **GET** /options/account_book | Query account change history +*OptionsApi* | [**list_options_positions**](docs/OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying +*OptionsApi* | [**get_options_position**](docs/OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position +*OptionsApi* | [**list_options_position_close**](docs/OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying +*OptionsApi* | [**list_options_orders**](docs/OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders +*OptionsApi* | [**create_options_order**](docs/OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order +*OptionsApi* | [**cancel_options_orders**](docs/OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all orders with 'open' status +*OptionsApi* | [**get_options_order**](docs/OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Query single order details +*OptionsApi* | [**cancel_options_order**](docs/OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel single order +*OptionsApi* | [**countdown_cancel_all_options**](docs/OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders +*OptionsApi* | [**list_my_options_trades**](docs/OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | Query personal trading records *OptionsApi* | [**get_options_mmp**](docs/OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query. *OptionsApi* | [**set_options_mmp**](docs/OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings *OptionsApi* | [**reset_options_mmp**](docs/OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset -*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user. -*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user. -*RebateApi* | [**partner_transaction_history**](docs/RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users. -*RebateApi* | [**partner_commissions_history**](docs/RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users. -*RebateApi* | [**partner_sub_list**](docs/RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list. -*RebateApi* | [**rebate_broker_commission_history**](docs/RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records. -*RebateApi* | [**rebate_broker_transaction_history**](docs/RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history. -*RebateApi* | [**rebate_user_info**](docs/RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information. -*RebateApi* | [**user_sub_relation**](docs/RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship. -*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details. -*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency. -*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported. -*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair. -*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information. -*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book. -*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades. -*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks. -*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates. -*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates. -*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts. -*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book. -*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders. -*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* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair. -*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list. -*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order. -*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order. -*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order. -*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history. -*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time. -*SpotApi* | [**countdown_cancel_all_spot**](docs/SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders. -*SpotApi* | [**amend_batch_orders**](docs/SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders. -*SpotApi* | [**get_spot_insurance_history**](docs/SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data. -*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list. -*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order. -*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders. -*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order. -*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order. -*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency. -*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address. -*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. -*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. -*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts. -*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts. -*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts. -*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account. -*WalletApi* | [**get_transfer_order_status**](docs/WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query. -*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status. -*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances. -*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances. -*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances. -*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info. -*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address. -*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee. -*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances. -*WalletApi* | [**list_small_balance**](docs/WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance. -*WalletApi* | [**convert_small_balance**](docs/WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance. -*WalletApi* | [**list_small_balance_history**](docs/WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history. -*WalletApi* | [**list_push_orders**](docs/WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history. -*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw. -*WithdrawalApi* | [**withdraw_push_order**](docs/WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer. -*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID. +*RebateApi* | [**agency_transaction_history**](docs/RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | Broker obtains transaction history of recommended users +*RebateApi* | [**agency_commissions_history**](docs/RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | Broker obtains rebate history of recommended users +*RebateApi* | [**partner_transaction_history**](docs/RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction history of recommended users +*RebateApi* | [**partner_commissions_history**](docs/RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains rebate records of recommended users +*RebateApi* | [**partner_sub_list**](docs/RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list +*RebateApi* | [**rebate_broker_commission_history**](docs/RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | Broker obtains user's rebate records +*RebateApi* | [**rebate_broker_transaction_history**](docs/RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | Broker obtains user's trading history +*RebateApi* | [**rebate_user_info**](docs/RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User obtains rebate information +*RebateApi* | [**user_sub_relation**](docs/RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User subordinate relationship +*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | Query all currency information +*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Query single currency information +*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | Query all supported currency pairs +*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Query single currency pair details +*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Get currency pair ticker information +*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Get market depth information +*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Query market transaction records +*SpotApi* | [**list_candlesticks**](docs/SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market K-line chart +*SpotApi* | [**get_fee**](docs/SpotApi.md#get_fee) | **GET** /spot/fee | Query account fee rates +*SpotApi* | [**get_batch_spot_fee**](docs/SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Batch query account fee rates +*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot trading accounts +*SpotApi* | [**list_spot_account_book**](docs/SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query spot account transaction history +*SpotApi* | [**create_batch_orders**](docs/SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Batch place orders +*SpotApi* | [**list_all_open_orders**](docs/SpotApi.md#list_all_open_orders) | **GET** /spot/open_orders | List all open orders +*SpotApi* | [**create_cross_liquidate_order**](docs/SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | Close position when cross-currency is disabled +*SpotApi* | [**list_orders**](docs/SpotApi.md#list_orders) | **GET** /spot/orders | List orders +*SpotApi* | [**create_order**](docs/SpotApi.md#create_order) | **POST** /spot/orders | Create an order +*SpotApi* | [**cancel_orders**](docs/SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair +*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel batch orders by specified ID list +*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Query single order details +*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel single order +*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend single order +*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | Query personal trading records +*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time +*SpotApi* | [**countdown_cancel_all_spot**](docs/SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders +*SpotApi* | [**amend_batch_orders**](docs/SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders +*SpotApi* | [**get_spot_insurance_history**](docs/SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data +*SpotApi* | [**list_spot_price_triggered_orders**](docs/SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Query running auto order list +*SpotApi* | [**create_spot_price_triggered_order**](docs/SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create price-triggered order +*SpotApi* | [**cancel_spot_price_triggered_order_list**](docs/SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel all auto orders +*SpotApi* | [**get_spot_price_triggered_order**](docs/SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Query single auto order details +*SpotApi* | [**cancel_spot_price_triggered_order**](docs/SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | Cancel single auto order +*WalletApi* | [**list_currency_chains**](docs/WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | Query chains supported for specified currency +*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address +*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Get withdrawal records +*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Get deposit records +*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts +*WalletApi* | [**list_sub_account_transfers**](docs/WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Get transfer records between main and sub accounts +*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts +*WalletApi* | [**sub_account_to_sub_account**](docs/WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Transfer between sub-accounts +*WalletApi* | [**get_transfer_order_status**](docs/WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query +*WalletApi* | [**list_withdraw_status**](docs/WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Query withdrawal status +*WalletApi* | [**list_sub_account_balances**](docs/WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Query sub-account balance information +*WalletApi* | [**list_sub_account_margin_balances**](docs/WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub-account isolated margin account balance information +*WalletApi* | [**list_sub_account_futures_balances**](docs/WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub-account perpetual futures account balance information +*WalletApi* | [**list_sub_account_cross_margin_balances**](docs/WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query sub-account cross margin account balance information +*WalletApi* | [**list_saved_address**](docs/WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query withdrawal address whitelist +*WalletApi* | [**get_trade_fee**](docs/WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Query personal trading fees +*WalletApi* | [**get_total_balance**](docs/WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Query personal account totals +*WalletApi* | [**list_small_balance**](docs/WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | Get list of convertible small balance currencies +*WalletApi* | [**convert_small_balance**](docs/WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance currency +*WalletApi* | [**list_small_balance_history**](docs/WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | Get convertible small balance currency history +*WalletApi* | [**list_push_orders**](docs/WalletApi.md#list_push_orders) | **GET** /wallet/push | Get UID transfer history +*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw +*WithdrawalApi* | [**withdraw_push_order**](docs/WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer +*WithdrawalApi* | [**cancel_withdrawal**](docs/WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID ## Documentation For Models diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 597c4d5..855675f 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -4,21 +4,21 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Get account detail. -[**get_account_rate_limit**](AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information. -[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | List STP Groups. -[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP Group. -[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group. -[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group. -[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group. -[**get_debit_fee**](AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT deduction configuration. -[**set_debit_fee**](AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Set GT deduction. +[**get_account_detail**](AccountApi.md#get_account_detail) | **GET** /account/detail | Retrieve user account information +[**get_account_rate_limit**](AccountApi.md#get_account_rate_limit) | **GET** /account/rate_limit | Get user transaction rate limit information +[**list_stp_groups**](AccountApi.md#list_stp_groups) | **GET** /account/stp_groups | Query STP user groups created by the user +[**create_stp_group**](AccountApi.md#create_stp_group) | **POST** /account/stp_groups | Create STP user group +[**list_stp_groups_users**](AccountApi.md#list_stp_groups_users) | **GET** /account/stp_groups/{stp_id}/users | Query users in the STP user group +[**add_stp_group_users**](AccountApi.md#add_stp_group_users) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP user group +[**delete_stp_group_users**](AccountApi.md#delete_stp_group_users) | **DELETE** /account/stp_groups/{stp_id}/users | Delete users from the STP user group +[**get_debit_fee**](AccountApi.md#get_debit_fee) | **GET** /account/debit_fee | Query GT fee deduction configuration +[**set_debit_fee**](AccountApi.md#set_debit_fee) | **POST** /account/debit_fee | Configure GT fee deduction # **get_account_detail** > AccountDetail get_account_detail() -Get account detail. +Retrieve user account information ### Example @@ -46,7 +46,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.AccountApi(api_client) try: - # Get account detail. + # Retrieve user account information api_response = api_instance.get_account_detail() print(api_response) except GateApiException as ex: @@ -74,14 +74,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_account_rate_limit** > list[AccountRateLimit] get_account_rate_limit() -Get user transaction rate limit information. +Get user transaction rate limit information ### Example @@ -109,7 +109,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.AccountApi(api_client) try: - # Get user transaction rate limit information. + # Get user transaction rate limit information api_response = api_instance.get_account_rate_limit() print(api_response) except GateApiException as ex: @@ -137,16 +137,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_stp_groups** > list[StpGroup] list_stp_groups(name=name) -List STP Groups. +Query STP user groups created by the user -Retrieve the list of STP groups created by the main account user only. +Only query STP user groups created by the current main account ### Example @@ -172,10 +172,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -name = 'group' # str | Perform a fuzzy search based on the name. (optional) +name = 'group' # str | Fuzzy search by name (optional) try: - # List STP Groups. + # Query STP user groups created by the user api_response = api_instance.list_stp_groups(name=name) print(api_response) except GateApiException as ex: @@ -188,7 +188,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Perform a fuzzy search based on the name. | [optional] + **name** | **str**| Fuzzy search by name | [optional] ### Return type @@ -206,16 +206,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_stp_group** > StpGroup create_stp_group(stp_group) -Create STP Group. +Create STP user group -Only the main account is allowed to create a new STP user group. +Only the main account is allowed to create a new STP user group ### Example @@ -244,7 +244,7 @@ api_instance = gate_api.AccountApi(api_client) stp_group = gate_api.StpGroup() # StpGroup | try: - # Create STP Group. + # Create STP user group api_response = api_instance.create_stp_group(stp_group) print(api_response) except GateApiException as ex: @@ -275,16 +275,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | User added successfully. Returning the current users within the STP group. | - | +**200** | User added successfully, returning current users in the STP group | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_stp_groups_users** > list[StpGroupUser] list_stp_groups_users(stp_id) -List users of the STP group. +Query users in the STP user group -Only the main account that created this STP group can query the account. +Only the main account that created this STP group can query the account ID list in the current STP group ### Example @@ -310,10 +310,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID. +stp_id = 1 # int | STP Group ID try: - # List users of the STP group. + # Query users in the STP user group api_response = api_instance.list_stp_groups_users(stp_id) print(api_response) except GateApiException as ex: @@ -326,7 +326,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID. | + **stp_id** | **int**| STP Group ID | ### Return type @@ -344,16 +344,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **add_stp_group_users** > list[StpGroupUser] add_stp_group_users(stp_id, request_body) -Add users to the STP group. +Add users to the STP user group -- Only the master account that created the STP user group is allowed to add users group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted +- Only the main account that created this STP group can add users to the STP user group - Only accounts under the current main account are allowed, cross-main account is not permitted ### Example @@ -379,11 +379,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID. -request_body = [[1,2,3]] # list[int] | User ID. +stp_id = 1 # int | STP Group ID +request_body = [[1,2,3]] # list[int] | User ID try: - # Add users to the STP group. + # Add users to the STP user group api_response = api_instance.add_stp_group_users(stp_id, request_body) print(api_response) except GateApiException as ex: @@ -396,8 +396,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID. | - **request_body** | [**list[int]**](int.md)| User ID. | + **stp_id** | **int**| STP Group ID | + **request_body** | [**list[int]**](int.md)| User ID | ### Return type @@ -415,14 +415,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | User added successfully. Returning the current users within the STP group. | - | +**200** | User added successfully, returning current users in the STP group | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_stp_group_users** > list[StpGroupUser] delete_stp_group_users(stp_id, user_id) -Delete the user in the STP group. +Delete users from the STP user group - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted @@ -450,11 +450,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.AccountApi(api_client) -stp_id = 1 # int | STP Group ID. -user_id = 1 # int | STP user ID, multiple can be separated by commas. +stp_id = 1 # int | STP Group ID +user_id = 1 # int | STP user IDs, multiple IDs can be separated by commas try: - # Delete the user in the STP group. + # Delete users from the STP user group api_response = api_instance.delete_stp_group_users(stp_id, user_id) print(api_response) except GateApiException as ex: @@ -467,8 +467,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **stp_id** | **int**| STP Group ID. | - **user_id** | **int**| STP user ID, multiple can be separated by commas. | + **stp_id** | **int**| STP Group ID | + **user_id** | **int**| STP user IDs, multiple IDs can be separated by commas | ### Return type @@ -486,16 +486,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Users deleted successfully, returns current users in the STP group | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_debit_fee** > DebitFee get_debit_fee() -Query GT deduction configuration. +Query GT fee deduction configuration -Query the current GT deduction configuration for the account. +Query the GT fee deduction configuration for the current account ### Example @@ -523,7 +523,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.AccountApi(api_client) try: - # Query GT deduction configuration. + # Query GT fee deduction configuration api_response = api_instance.get_debit_fee() print(api_response) except GateApiException as ex: @@ -551,16 +551,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_debit_fee** > set_debit_fee(debit_fee) -Set GT deduction. +Configure GT fee deduction -Enable or disable GT deduction for the current account. +Enable or disable GT fee deduction for the current account ### Example @@ -589,7 +589,7 @@ api_instance = gate_api.AccountApi(api_client) debit_fee = gate_api.DebitFee() # DebitFee | try: - # Set GT deduction. + # Configure GT fee deduction api_instance.set_debit_fee(debit_fee) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -619,7 +619,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/AccountBalance.md b/docs/AccountBalance.md index ccf42f5..7941688 100644 --- a/docs/AccountBalance.md +++ b/docs/AccountBalance.md @@ -1,13 +1,13 @@ # AccountBalance -Total balances calculated with specified currency unit. +Total balances calculated with specified currency unit ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**amount** | **str** | Account total balance amount. | [optional] -**currency** | **str** | Currency. | [optional] +**amount** | **str** | Account total balance amount | [optional] +**currency** | **str** | Currency | [optional] **unrealised_pnl** | **str** | Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts | [optional] -**borrowed** | **str** | Borrowed,this field will only appear in margin and cross_margin accounts. | [optional] +**borrowed** | **str** | Total borrowed amount, this field will only appear in margin and cross_margin accounts | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md index 16a25d9..8e01703 100644 --- a/docs/AccountDetail.md +++ b/docs/AccountDetail.md @@ -1,15 +1,15 @@ # AccountDetail -Account detail. +Account details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ip_whitelist** | **list[str]** | IP whitelist. | [optional] -**currency_pairs** | **list[str]** | CurrencyPair whitelisting. | [optional] -**user_id** | **int** | User ID. | [optional] -**tier** | **int** | User VIP level. | [optional] +**ip_whitelist** | **list[str]** | IP Whitelist | [optional] +**currency_pairs** | **list[str]** | Trading pair whitelist | [optional] +**user_id** | **int** | User ID | [optional] +**tier** | **int** | User VIP level | [optional] **key** | [**AccountDetailKey**](AccountDetailKey.md) | | [optional] -**copy_trading_role** | **int** | User role: 0 - Normal user, 1 - Copy trading leader, follower, 3 - Both leader and follower | [optional] +**copy_trading_role** | **int** | User role: 0 - Normal user, 1 - Copy trading leader, 2 - Follower, 3 - Both leader and follower | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountDetailKey.md b/docs/AccountDetailKey.md index bdb74c8..363513d 100644 --- a/docs/AccountDetailKey.md +++ b/docs/AccountDetailKey.md @@ -1,10 +1,10 @@ # AccountDetailKey -API Key detail. +API Key details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **int** | mode: 1 - classic account 2 - portfolio margin account. | [optional] +**mode** | **int** | Mode: 1 - Classic mode, 2 - Legacy unified mode | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountRateLimit.md b/docs/AccountRateLimit.md index a4275da..b91882b 100644 --- a/docs/AccountRateLimit.md +++ b/docs/AccountRateLimit.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tier** | **str** | Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) | [optional] -**ratio** | **str** | Transaction rate. | [optional] -**main_ratio** | **str** | Total transaction ratio of main account. | [optional] -**updated_at** | **str** | Update time. | [optional] +**ratio** | **str** | Fill rate | [optional] +**main_ratio** | **str** | Total fill ratio of main account | [optional] +**updated_at** | **str** | Update time | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyCommission.md b/docs/AgencyCommission.md index a378726..1151423 100644 --- a/docs/AgencyCommission.md +++ b/docs/AgencyCommission.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commission_time** | **int** | Commission Time. (unix timestamp). | [optional] -**user_id** | **int** | User ID. | [optional] -**group_name** | **str** | Group name. | [optional] -**commission_amount** | **str** | Commission Amount. | [optional] -**commission_asset** | **str** | Commission Asset. | [optional] -**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. | [optional] +**commission_time** | **int** | Commission time (Unix timestamp in seconds) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**commission_amount** | **str** | Transaction amount | [optional] +**commission_asset** | **str** | Commission Asset | [optional] +**source** | **str** | Commission source: SPOT - Spot commission, FUTURES - Futures commission | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyCommissionHistory.md b/docs/AgencyCommissionHistory.md index e343af0..195a454 100644 --- a/docs/AgencyCommissionHistory.md +++ b/docs/AgencyCommissionHistory.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair. | [optional] -**total** | **int** | Total. | [optional] -**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history. | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of commission history | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyTransaction.md b/docs/AgencyTransaction.md index 4a60c7c..930d2b7 100644 --- a/docs/AgencyTransaction.md +++ b/docs/AgencyTransaction.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction_time** | **int** | Transaction Time. (unix timestamp). | [optional] -**user_id** | **int** | User ID. | [optional] -**group_name** | **str** | Group name. | [optional] -**fee** | **str** | Fee. | [optional] -**fee_asset** | **str** | Fee currency. | [optional] -**currency_pair** | **str** | Currency pair. | [optional] -**amount** | **str** | Commission Amount. | [optional] -**amount_asset** | **str** | Commission Asset. | [optional] -**source** | **str** | Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. | [optional] +**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**fee** | **str** | Fee | [optional] +**fee_asset** | **str** | Fee currency | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**amount** | **str** | Transaction amount | [optional] +**amount_asset** | **str** | Commission Asset | [optional] +**source** | **str** | Commission source: SPOT - Spot commission, FUTURES - Futures commission | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgencyTransactionHistory.md b/docs/AgencyTransactionHistory.md index c98aed3..a79d13c 100644 --- a/docs/AgencyTransactionHistory.md +++ b/docs/AgencyTransactionHistory.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair. | [optional] -**total** | **int** | Total. | [optional] -**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history. | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AutoRepaySetting.md b/docs/AutoRepaySetting.md index e17f633..d71d92d 100644 --- a/docs/AutoRepaySetting.md +++ b/docs/AutoRepaySetting.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | Auto repayment status. `on` - enabled, `off` - disabled. | [optional] +**status** | **str** | Auto repayment status: `on` - enabled, `off` - disabled | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchAmendItem.md b/docs/BatchAmendItem.md index cdbf4ee..62bc971 100644 --- a/docs/BatchAmendItem.md +++ b/docs/BatchAmendItem.md @@ -1,15 +1,15 @@ # BatchAmendItem -Order information that needs to be modified. +Order information that needs to be modified ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **str** | The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). | -**currency_pair** | **str** | Currency pair. | -**account** | **str** | Default spot, unified account and warehouse-by-store leverage account. | [optional] -**amount** | **str** | Trading Quantity. Only one of amountor pricecan be specified. | [optional] -**price** | **str** | Trading Price. Only one of amountor pricecan be specified. | [optional] -**amend_text** | **str** | Custom info during amending order. | [optional] +**order_id** | **str** | The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field) | +**currency_pair** | **str** | Currency pair | +**account** | **str** | Default spot, unified account and warehouse-by-store leverage account | [optional] +**amount** | **str** | Trading Quantity. Only one of `amount` or `price` can be specified | [optional] +**price** | **str** | Trading Price. Only one of `amount` or `price` can be specified | [optional] +**amend_text** | **str** | Custom info during order amendment | [optional] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchAmendOrderReq.md b/docs/BatchAmendOrderReq.md index 47e64a9..41df706 100644 --- a/docs/BatchAmendOrderReq.md +++ b/docs/BatchAmendOrderReq.md @@ -1,14 +1,14 @@ # BatchAmendOrderReq -Modify contract order parameters. +Modify contract order parameters ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order id, order_id and text must contain at least one. | [optional] -**text** | **str** | User-defined order text, at least one of order_id and text must be passed. | [optional] -**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] -**price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending order. | [optional] +**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] +**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] +**size** | **int** | New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. | [optional] +**price** | **str** | New order price | [optional] +**amend_text** | **str** | Custom info during order amendment | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchFuturesOrder.md b/docs/BatchFuturesOrder.md index a51e2eb..c7599b6 100644 --- a/docs/BatchFuturesOrder.md +++ b/docs/BatchFuturesOrder.md @@ -1,36 +1,36 @@ # BatchFuturesOrder -Futures order details. +Futures order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**succeeded** | **bool** | Whether the batch of orders succeeded. | [optional] -**label** | **str** | Error label, only exists if execution fails. | [optional] +**succeeded** | **bool** | Request execution result | [optional] +**label** | **str** | Error label, only exists if execution fails | [optional] **detail** | **str** | Error detail, only present if execution failed and details need to be given | [optional] -**id** | **int** | Futures order ID. | [optional] [readonly] -**user** | **int** | User ID. | [optional] [readonly] -**create_time** | **float** | Creation time of order. | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open. | [optional] [readonly] -**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] -**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Futures contract. | [optional] -**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | [optional] -**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc`. | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0. | [optional] [default to False] -**is_close** | **bool** | Is the order to close position. | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order. | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation. | [optional] [readonly] +**id** | **int** | Futures order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Creation time of order | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] +**finish_as** | **str** | How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] +**status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] +**size** | **int** | Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. | [optional] +**iceberg** | **int** | Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. | [optional] +**price** | **str** | Order price. Price of 0 with `tif` set to `ioc` represents a market order. | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] +**is_close** | **bool** | Is the order to close position | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] **tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded. | [optional] [readonly] -**fill_price** | **str** | Fill price of the order. | [optional] [readonly] +**left** | **int** | Unfilled quantity | [optional] [readonly] +**fill_price** | **str** | Fill price | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] -**tkfr** | **str** | Taker fee. | [optional] [readonly] -**mkfr** | **str** | Maker fee. | [optional] [readonly] -**refu** | **int** | Reference user ID. | [optional] [readonly] +**tkfr** | **str** | Taker fee | [optional] [readonly] +**mkfr** | **str** | Maker fee | [optional] [readonly] +**refu** | **int** | Referrer user ID | [optional] [readonly] **auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] -**stp_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] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled | [optional] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BatchOrder.md b/docs/BatchOrder.md index 9734f45..7840bc6 100644 --- a/docs/BatchOrder.md +++ b/docs/BatchOrder.md @@ -1,43 +1,43 @@ # BatchOrder -Batch order details. +Batch order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID. | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**succeeded** | **bool** | Whether the batch of orders succeeded. | [optional] -**label** | **str** | Error label, if any, otherwise an empty string. | [optional] -**message** | **str** | Detailed error message, if any, otherwise an empty string. | [optional] -**id** | **str** | Order ID. | [optional] [readonly] -**create_time** | **str** | Creation time of order. | [optional] [readonly] -**update_time** | **str** | Last modification time of order. | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds). | [optional] [readonly] +**order_id** | **str** | Order ID | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] +**text** | **str** | Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) | [optional] +**succeeded** | **bool** | Request execution result | [optional] +**label** | **str** | Error label, if any, otherwise an empty string | [optional] +**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] +**id** | **str** | Order ID | [optional] [readonly] +**create_time** | **str** | Creation time of order | [optional] [readonly] +**update_time** | **str** | Last modification time of order | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair. | [optional] +**currency_pair** | **str** | Currency pair | [optional] **type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Buy or sell order. | [optional] -**amount** | **str** | Trade amount. | [optional] -**price** | **str** | Order price. | [optional] +**side** | **str** | Buy or sell order | [optional] +**amount** | **str** | Trade amount | [optional] +**price** | **str** | Order price | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] -**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] -**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill. | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill. | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total`. | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency. | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price. | [optional] [readonly] -**fee** | **str** | Fee deducted. | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit. | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee. | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee. | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used. | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee. | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit. | [optional] [readonly] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported | [optional] +**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough | [optional] +**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order | [optional] +**left** | **str** | Amount left to fill | [optional] [readonly] +**filled_amount** | **str** | Amount filled | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price | [optional] [readonly] +**fee** | **str** | Fee deducted | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee deduction is enabled | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] **stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] **finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] diff --git a/docs/BorrowCurrencyInfo.md b/docs/BorrowCurrencyInfo.md index f9b6c0a..64ca722 100644 --- a/docs/BorrowCurrencyInfo.md +++ b/docs/BorrowCurrencyInfo.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**left_repay_principal** | **str** | outstanding principal. | [optional] -**left_repay_interest** | **str** | outstanding interest. | [optional] -**left_repay_usdt** | **str** | Value of left total repayments amount in USDT. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**left_repay_principal** | **str** | Outstanding principal | [optional] +**left_repay_interest** | **str** | Outstanding interest | [optional] +**left_repay_usdt** | **str** | Remaining total outstanding value converted to USDT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerCommission.md b/docs/BrokerCommission.md index dcdf074..0cbfd46 100644 --- a/docs/BrokerCommission.md +++ b/docs/BrokerCommission.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total. | [optional] -**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of comission history. | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[BrokerCommission1]**](BrokerCommission1.md) | List of commission history | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerCommission1.md b/docs/BrokerCommission1.md index b411106..0382e9c 100644 --- a/docs/BrokerCommission1.md +++ b/docs/BrokerCommission1.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commission_time** | **int** | Commission Time. (unix timestamp). | [optional] -**user_id** | **int** | User ID. | [optional] -**group_name** | **str** | Group name. | [optional] -**amount** | **str** | The amount of commission rebates. | [optional] -**fee** | **str** | Fee. | [optional] -**fee_asset** | **str** | Fee currency. | [optional] -**rebate_fee** | **str** | The income from rebates, converted to USDT. | [optional] -**source** | **str** | Rebate Type: Spot、Futures、Options.、Alpha | [optional] -**currency_pair** | **str** | Currency pair. | [optional] +**commission_time** | **int** | Commission time (Unix timestamp in seconds) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**amount** | **str** | The amount of commission rebates | [optional] +**fee** | **str** | Fee | [optional] +**fee_asset** | **str** | Fee currency | [optional] +**rebate_fee** | **str** | The income from rebates, converted to USDT | [optional] +**source** | **str** | Commission transaction type: Spot, Futures, Options, Alpha | [optional] +**currency_pair** | **str** | Currency pair | [optional] **sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.md) | | [optional] -**alpha_contract_addr** | **str** | Alpha token address | [optional] +**alpha_contract_addr** | **str** | Alpha contract address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerCommissionSubBrokerInfo.md b/docs/BrokerCommissionSubBrokerInfo.md index 262352f..d6a0912 100644 --- a/docs/BrokerCommissionSubBrokerInfo.md +++ b/docs/BrokerCommissionSubBrokerInfo.md @@ -1,13 +1,13 @@ # BrokerCommissionSubBrokerInfo -The sub broker info. +Sub-broker information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | The sub broker user ID. | [optional] -**original_commission_rate** | **str** | The sub broker original commission rate. | [optional] -**relative_commission_rate** | **str** | The sub broker relative commission rate. | [optional] -**commission_rate** | **str** | The sub broker actual commission rate. | [optional] +**user_id** | **int** | Sub-broker user ID | [optional] +**original_commission_rate** | **str** | Sub-broker original commission rate | [optional] +**relative_commission_rate** | **str** | Sub-broker relative commission rate | [optional] +**commission_rate** | **str** | Sub-broker actual commission rate | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerTransaction.md b/docs/BrokerTransaction.md index e974fdf..c450894 100644 --- a/docs/BrokerTransaction.md +++ b/docs/BrokerTransaction.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total. | [optional] -**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history. | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[BrokerTransaction1]**](BrokerTransaction1.md) | List of transaction history | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrokerTransaction1.md b/docs/BrokerTransaction1.md index a28ac63..07833a8 100644 --- a/docs/BrokerTransaction1.md +++ b/docs/BrokerTransaction1.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction_time** | **int** | Transaction Time. (unix timestamp). | [optional] -**user_id** | **int** | User ID. | [optional] -**group_name** | **str** | Group name. | [optional] -**fee** | **str** | fee (usdt). | [optional] -**currency_pair** | **str** | Currency pair. | [optional] -**amount** | **str** | Commission Amount. | [optional] -**fee_asset** | **str** | Fee currency. | [optional] -**source** | **str** | Rebate Type: Spot、Futures、Options.、Alpha | [optional] +**transaction_time** | **int** | Transaction Time. (unix timestamp) | [optional] +**user_id** | **int** | User ID | [optional] +**group_name** | **str** | Group name | [optional] +**fee** | **str** | Fee amount (USDT) | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**amount** | **str** | Transaction amount | [optional] +**fee_asset** | **str** | Fee currency | [optional] +**source** | **str** | Commission transaction type: Spot, Futures, Options, Alpha | [optional] **sub_broker_info** | [**BrokerCommissionSubBrokerInfo**](BrokerCommissionSubBrokerInfo.md) | | [optional] -**alpha_contract_addr** | **str** | Alpha token address | [optional] +**alpha_contract_addr** | **str** | Alpha contract address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CancelBatchOrder.md b/docs/CancelBatchOrder.md index 4cfa42a..4d2953b 100644 --- a/docs/CancelBatchOrder.md +++ b/docs/CancelBatchOrder.md @@ -1,10 +1,10 @@ # CancelBatchOrder -Info of order to be cancelled. +Info of order to be cancelled ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Order currency pair. | +**currency_pair** | **str** | Order currency pair | **id** | **str** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation | **account** | **str** | If the canceled order is a unified account apikey, this field must be specified and set to `unified` | [optional] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] diff --git a/docs/CancelOrderResult.md b/docs/CancelOrderResult.md index 6316135..8aa2f77 100644 --- a/docs/CancelOrderResult.md +++ b/docs/CancelOrderResult.md @@ -1,16 +1,16 @@ # CancelOrderResult -Order cancellation result. +Order cancellation result ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Order currency pair. | [optional] -**id** | **str** | Order ID. | [optional] -**text** | **str** | Custom order information. | [optional] -**succeeded** | **bool** | Whether cancellation succeeded. | [optional] -**label** | **str** | Error label when failed to cancel the order; emtpy if succeeded. | [optional] -**message** | **str** | Error message when failed to cancel the order; empty if succeeded. | [optional] -**account** | **str** | Default is empty (deprecated). | [optional] +**currency_pair** | **str** | Order currency pair | [optional] +**id** | **str** | Order ID | [optional] +**text** | **str** | Custom order information | [optional] +**succeeded** | **bool** | Whether cancellation succeeded | [optional] +**label** | **str** | Error label when failed to cancel the order; emtpy if succeeded | [optional] +**message** | **str** | Error description when cancellation fails, empty if successful | [optional] +**account** | **str** | Default is empty (deprecated) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralAdjust.md b/docs/CollateralAdjust.md index d070fcd..945eda4 100644 --- a/docs/CollateralAdjust.md +++ b/docs/CollateralAdjust.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | -**type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | -**collaterals** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral Currency List. | [optional] +**order_id** | **int** | Order ID | +**type** | **str** | Operation type: append - add collateral, redeem - withdraw collateral | +**collaterals** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency list | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralAdjustRes.md b/docs/CollateralAdjustRes.md index 777c60a..d116036 100644 --- a/docs/CollateralAdjustRes.md +++ b/docs/CollateralAdjustRes.md @@ -1,11 +1,11 @@ # CollateralAdjustRes -Result of multi-collateral adjustment. +Multi-collateral adjustment result ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] -**collateral_currencies** | [**list[CollateralCurrencyRes]**](CollateralCurrencyRes.md) | Collateral Currency Information. | [optional] +**order_id** | **int** | Order ID | [optional] +**collateral_currencies** | [**list[CollateralCurrencyRes]**](CollateralCurrencyRes.md) | Collateral currency information | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralAlign.md b/docs/CollateralAlign.md index b758aae..4b14840 100644 --- a/docs/CollateralAlign.md +++ b/docs/CollateralAlign.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | -**collateral_currency** | **str** | Collateral. | -**collateral_amount** | **str** | Collateral amount. | -**type** | **str** | Operation types: append - for adding collateral, redeem - for withdrawing collateral | +**order_id** | **int** | Order ID | +**collateral_currency** | **str** | Collateral currency | +**collateral_amount** | **str** | Collateral amount | +**type** | **str** | Operation type: append - add collateral, redeem - withdraw collateral | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrency.md b/docs/CollateralCurrency.md index 330e7f3..016d704 100644 --- a/docs/CollateralCurrency.md +++ b/docs/CollateralCurrency.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**amount** | **str** | Size. | [optional] +**currency** | **str** | Currency | [optional] +**amount** | **str** | Size | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrencyInfo.md b/docs/CollateralCurrencyInfo.md index 1401846..0b1e1f4 100644 --- a/docs/CollateralCurrencyInfo.md +++ b/docs/CollateralCurrencyInfo.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**left_collateral** | **str** | Left Collateral Amount. | [optional] -**left_collateral_usdt** | **str** | Value of left collateral amount in USDT. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**left_collateral** | **str** | Remaining collateral amount | [optional] +**left_collateral_usdt** | **str** | Remaining collateral value converted to USDT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrencyRes.md b/docs/CollateralCurrencyRes.md index 5b53bf7..1a64fff 100644 --- a/docs/CollateralCurrencyRes.md +++ b/docs/CollateralCurrencyRes.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**succeeded** | **bool** | Update success status. | [optional] -**label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] -**message** | **str** | Error description in case of operation failure; empty when successful. | [optional] -**currency** | **str** | Currency. | [optional] -**amount** | **str** | Quantity of successful collateral operation; 0 if the operation fails. | [optional] +**succeeded** | **bool** | Update success status | [optional] +**label** | **str** | Error identifier for failed operations; empty when successful | [optional] +**message** | **str** | Error description for failed operations; empty when successful | [optional] +**currency** | **str** | Currency | [optional] +**amount** | **str** | Successfully operated collateral quantity; 0 if operation fails | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralCurrentRate.md b/docs/CollateralCurrentRate.md index c41614e..f9a94d0 100644 --- a/docs/CollateralCurrentRate.md +++ b/docs/CollateralCurrentRate.md @@ -1,11 +1,11 @@ # CollateralCurrentRate -Multi-currency pledge current interest rate. +Multi-collateral current interest rate ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**current_rate** | **str** | Currency current interest rate. | [optional] +**currency** | **str** | Currency | [optional] +**current_rate** | **str** | Currency current interest rate | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralFixRate.md b/docs/CollateralFixRate.md index e97f9aa..2f3f84f 100644 --- a/docs/CollateralFixRate.md +++ b/docs/CollateralFixRate.md @@ -1,13 +1,13 @@ # CollateralFixRate -Multi-collateral fixed interest rate. +Multi-collateral fixed interest rate ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**rate_7d** | **str** | Fixed interest rate for a lending period of 7 days. | [optional] -**rate_30d** | **str** | Fixed interest rate for a lending period of 30 days. | [optional] -**update_time** | **int** | Update time, timestamp, unit in seconds. | [optional] +**currency** | **str** | Currency | [optional] +**rate_7d** | **str** | Fixed interest rate for 7-day lending period | [optional] +**rate_30d** | **str** | Fixed interest rate for 30-day lending period | [optional] +**update_time** | **int** | Update time, timestamp in seconds | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralLoanApi.md b/docs/CollateralLoanApi.md index f120c03..bfd5ed6 100644 --- a/docs/CollateralLoanApi.md +++ b/docs/CollateralLoanApi.md @@ -4,22 +4,22 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | List Orders. -[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place order. -[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Get a single order. -[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Repayment. -[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Repayment history. -[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records. -[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral. -[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query the total borrowing and collateral amount for the user. -[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio. -[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies. +[**list_collateral_loan_orders**](CollateralLoanApi.md#list_collateral_loan_orders) | **GET** /loan/collateral/orders | Query collateral loan order list +[**create_collateral_loan**](CollateralLoanApi.md#create_collateral_loan) | **POST** /loan/collateral/orders | Place collateral loan order +[**get_collateral_loan_order_detail**](CollateralLoanApi.md#get_collateral_loan_order_detail) | **GET** /loan/collateral/orders/{order_id} | Query single order details +[**repay_collateral_loan**](CollateralLoanApi.md#repay_collateral_loan) | **POST** /loan/collateral/repay | Collateral loan repayment +[**list_repay_records**](CollateralLoanApi.md#list_repay_records) | **GET** /loan/collateral/repay_records | Query collateral loan repayment records +[**list_collateral_records**](CollateralLoanApi.md#list_collateral_records) | **GET** /loan/collateral/collaterals | Query collateral adjustment records +[**operate_collateral**](CollateralLoanApi.md#operate_collateral) | **POST** /loan/collateral/collaterals | Increase or redeem collateral +[**get_user_total_amount**](CollateralLoanApi.md#get_user_total_amount) | **GET** /loan/collateral/total_amount | Query user's total borrowing and collateral amount +[**get_user_ltv_info**](CollateralLoanApi.md#get_user_ltv_info) | **GET** /loan/collateral/ltv | Query user's collateralization ratio and remaining borrowable currencies +[**list_collateral_currencies**](CollateralLoanApi.md#list_collateral_currencies) | **GET** /loan/collateral/currencies | Query supported borrowing and collateral currencies # **list_collateral_loan_orders** > list[CollateralOrder] list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) -List Orders. +Query collateral loan order list ### Example @@ -45,13 +45,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -collateral_currency = 'BTC' # str | Collateral. (optional) -borrow_currency = 'USDT' # str | Borrowed currency. (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +collateral_currency = 'BTC' # str | Collateral currency (optional) +borrow_currency = 'USDT' # str | Borrowed currency (optional) try: - # List Orders. + # Query collateral loan order list api_response = api_instance.list_collateral_loan_orders(page=page, limit=limit, collateral_currency=collateral_currency, borrow_currency=borrow_currency) print(api_response) except GateApiException as ex: @@ -64,10 +64,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **collateral_currency** | **str**| Collateral. | [optional] - **borrow_currency** | **str**| Borrowed currency. | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **collateral_currency** | **str**| Collateral currency | [optional] + **borrow_currency** | **str**| Borrowed currency | [optional] ### Return type @@ -85,14 +85,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_collateral_loan** > OrderResp create_collateral_loan(create_collateral_order) -Place order. +Place collateral loan order ### Example @@ -121,7 +121,7 @@ api_instance = gate_api.CollateralLoanApi(api_client) create_collateral_order = gate_api.CreateCollateralOrder() # CreateCollateralOrder | try: - # Place order. + # Place collateral loan order api_response = api_instance.create_collateral_loan(create_collateral_order) print(api_response) except GateApiException as ex: @@ -152,14 +152,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Order placed successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_collateral_loan_order_detail** > CollateralOrder get_collateral_loan_order_detail(order_id) -Get a single order. +Query single order details ### Example @@ -185,10 +185,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -order_id = 100001 # int | Order ID returned on successful order creation. +order_id = 100001 # int | Order ID returned when order is successfully created try: - # Get a single order. + # Query single order details api_response = api_instance.get_collateral_loan_order_detail(order_id) print(api_response) except GateApiException as ex: @@ -201,7 +201,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation. | + **order_id** | **int**| Order ID returned when order is successfully created | ### Return type @@ -219,14 +219,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Order details queried successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repay_collateral_loan** > RepayResp repay_collateral_loan(repay_loan) -Repayment. +Collateral loan repayment ### Example @@ -255,7 +255,7 @@ api_instance = gate_api.CollateralLoanApi(api_client) repay_loan = gate_api.RepayLoan() # RepayLoan | try: - # Repayment. + # Collateral loan repayment api_response = api_instance.repay_collateral_loan(repay_loan) print(api_response) except GateApiException as ex: @@ -286,14 +286,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully. | - | +**200** | Operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_repay_records** > list[RepayRecord] list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) -Repayment history. +Query collateral loan repayment records ### Example @@ -319,16 +319,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -source = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation. -borrow_currency = 'USDT' # str | Borrowed currency. (optional) -collateral_currency = 'BTC' # str | Collateral. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -_from = 1609459200 # int | Start timestamp of the query. (optional) -to = 1609459200 # int | Time range ending, default to current time. (optional) +source = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation +borrow_currency = 'USDT' # str | Borrowed currency (optional) +collateral_currency = 'BTC' # str | Collateral currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +_from = 1609459200 # int | Start timestamp for the query (optional) +to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional) try: - # Repayment history. + # Query collateral loan repayment records api_response = api_instance.list_repay_records(source, borrow_currency=borrow_currency, collateral_currency=collateral_currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -341,13 +341,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **source** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation. | - **borrow_currency** | **str**| Borrowed currency. | [optional] - **collateral_currency** | **str**| Collateral. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] + **source** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | + **borrow_currency** | **str**| Borrowed currency | [optional] + **collateral_currency** | **str**| Collateral currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] ### Return type @@ -365,14 +365,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_collateral_records** > list[CollateralRecord] list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) -Query collateral adjustment records. +Query collateral adjustment records ### Example @@ -398,15 +398,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -_from = 1609459200 # int | Start timestamp of the query. (optional) -to = 1609459200 # int | Time range ending, default to current time. (optional) -borrow_currency = 'USDT' # str | Borrowed currency. (optional) -collateral_currency = 'BTC' # str | Collateral. (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +_from = 1609459200 # int | Start timestamp for the query (optional) +to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional) +borrow_currency = 'USDT' # str | Borrowed currency (optional) +collateral_currency = 'BTC' # str | Collateral currency (optional) try: - # Query collateral adjustment records. + # Query collateral adjustment records api_response = api_instance.list_collateral_records(page=page, limit=limit, _from=_from, to=to, borrow_currency=borrow_currency, collateral_currency=collateral_currency) print(api_response) except GateApiException as ex: @@ -419,12 +419,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **borrow_currency** | **str**| Borrowed currency. | [optional] - **collateral_currency** | **str**| Collateral. | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **borrow_currency** | **str**| Borrowed currency | [optional] + **collateral_currency** | **str**| Collateral currency | [optional] ### Return type @@ -442,14 +442,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **operate_collateral** > operate_collateral(collateral_align) -Increase or redeem collateral. +Increase or redeem collateral ### Example @@ -478,7 +478,7 @@ api_instance = gate_api.CollateralLoanApi(api_client) collateral_align = gate_api.CollateralAlign() # CollateralAlign | try: - # Increase or redeem collateral. + # Increase or redeem collateral api_instance.operate_collateral(collateral_align) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -508,14 +508,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully. | - | +**204** | Operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_total_amount** > UserTotalAmount get_user_total_amount() -Query the total borrowing and collateral amount for the user. +Query user's total borrowing and collateral amount ### Example @@ -543,7 +543,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.CollateralLoanApi(api_client) try: - # Query the total borrowing and collateral amount for the user. + # Query user's total borrowing and collateral amount api_response = api_instance.get_user_total_amount() print(api_response) except GateApiException as ex: @@ -571,14 +571,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_ltv_info** > UserLtvInfo get_user_ltv_info(collateral_currency, borrow_currency) -Query user's collateralization ratio. +Query user's collateralization ratio and remaining borrowable currencies ### Example @@ -604,11 +604,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -collateral_currency = 'BTC' # str | Collateral. -borrow_currency = 'USDT' # str | Borrowed currency. +collateral_currency = 'BTC' # str | Collateral currency +borrow_currency = 'USDT' # str | Borrowed currency try: - # Query user's collateralization ratio. + # Query user's collateralization ratio and remaining borrowable currencies api_response = api_instance.get_user_ltv_info(collateral_currency, borrow_currency) print(api_response) except GateApiException as ex: @@ -621,8 +621,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collateral_currency** | **str**| Collateral. | - **borrow_currency** | **str**| Borrowed currency. | + **collateral_currency** | **str**| Collateral currency | + **borrow_currency** | **str**| Borrowed currency | ### Return type @@ -640,14 +640,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_collateral_currencies** > list[CollateralLoanCurrency] list_collateral_currencies(loan_currency=loan_currency) -Query supported borrowing and collateral currencies. +Query supported borrowing and collateral currencies ### Example @@ -664,10 +664,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.CollateralLoanApi(api_client) -loan_currency = 'BTC' # str | The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. (optional) +loan_currency = 'BTC' # str | Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency (optional) try: - # Query supported borrowing and collateral currencies. + # Query supported borrowing and collateral currencies api_response = api_instance.list_collateral_currencies(loan_currency=loan_currency) print(api_response) except GateApiException as ex: @@ -680,7 +680,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loan_currency** | **str**| The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. | [optional] + **loan_currency** | **str**| Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency | [optional] ### Return type @@ -698,7 +698,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/CollateralLoanCurrency.md b/docs/CollateralLoanCurrency.md index baa61a8..fc4151a 100644 --- a/docs/CollateralLoanCurrency.md +++ b/docs/CollateralLoanCurrency.md @@ -1,11 +1,11 @@ # CollateralLoanCurrency -Supported borrowing and collateral currencies. +Supported borrowing and collateral currencies ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**loan_currency** | **str** | Borrowed currency. | [optional] -**collateral_currency** | **list[str]** | List of supported collateral currencies. | [optional] +**loan_currency** | **str** | Borrowed currency | [optional] +**collateral_currency** | **list[str]** | List of supported collateral currencies | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralLtv.md b/docs/CollateralLtv.md index d9e0504..5bd7f58 100644 --- a/docs/CollateralLtv.md +++ b/docs/CollateralLtv.md @@ -1,12 +1,12 @@ # CollateralLtv -Collateral Ratio. +Multi-collateral ratio ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**init_ltv** | **str** | The initial collateralization rate. | [optional] -**alert_ltv** | **str** | Warning collateralization ratio. | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate. | [optional] +**init_ltv** | **str** | Initial collateralization rate | [optional] +**alert_ltv** | **str** | Warning collateralization rate | [optional] +**liquidate_ltv** | **str** | Liquidation collateralization rate | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralOrder.md b/docs/CollateralOrder.md index 4596948..b83a7fb 100644 --- a/docs/CollateralOrder.md +++ b/docs/CollateralOrder.md @@ -1,25 +1,25 @@ # CollateralOrder -Collateral Order. +Collateral order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] -**collateral_currency** | **str** | Collateral. | [optional] -**collateral_amount** | **str** | Collateral amount. | [optional] -**borrow_currency** | **str** | Borrowed currency. | [optional] -**borrow_amount** | **str** | Borrowing amount. | [optional] -**repaid_amount** | **str** | Repaid amount. | [optional] -**repaid_principal** | **str** | Repaid principal. | [optional] -**repaid_interest** | **str** | Repaid interest. | [optional] -**init_ltv** | **str** | The initial collateralization rate. | [optional] -**current_ltv** | **str** | The current collateralization rate. | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate. | [optional] +**order_id** | **int** | Order ID | [optional] +**collateral_currency** | **str** | Collateral currency | [optional] +**collateral_amount** | **str** | Collateral amount | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**borrow_amount** | **str** | Borrowed amount | [optional] +**repaid_amount** | **str** | Repaid amount | [optional] +**repaid_principal** | **str** | Repaid principal | [optional] +**repaid_interest** | **str** | Repaid interest | [optional] +**init_ltv** | **str** | Initial collateralization rate | [optional] +**current_ltv** | **str** | Current collateralization rate | [optional] +**liquidate_ltv** | **str** | Liquidation collateralization rate | [optional] **status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] **left_repay_total** | **str** | Outstanding principal and interest (outstanding principal + outstanding interest) | [optional] -**left_repay_principal** | **str** | outstanding principal. | [optional] -**left_repay_interest** | **str** | outstanding interest. | [optional] +**left_repay_principal** | **str** | Outstanding principal | [optional] +**left_repay_interest** | **str** | Outstanding interest | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollateralRecord.md b/docs/CollateralRecord.md index c083f74..f2fbfa7 100644 --- a/docs/CollateralRecord.md +++ b/docs/CollateralRecord.md @@ -1,19 +1,19 @@ # CollateralRecord -Collateral record. +Collateral record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] -**record_id** | **int** | Collateral record ID. | [optional] -**borrow_currency** | **str** | Borrowed currency. | [optional] -**borrow_amount** | **str** | Borrowing amount. | [optional] -**collateral_currency** | **str** | Collateral. | [optional] -**before_collateral** | **str** | The collateral amount before adjustment. | [optional] -**after_collateral** | **str** | The collateral amount after adjustment. | [optional] -**before_ltv** | **str** | The collateral ratio before adjustment. | [optional] -**after_ltv** | **str** | The collateral ratio after adjustment. | [optional] -**operate_time** | **int** | Timestamp of the operation, in seconds. | [optional] +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Collateral record ID | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**borrow_amount** | **str** | Borrowed amount | [optional] +**collateral_currency** | **str** | Collateral currency | [optional] +**before_collateral** | **str** | Collateral amount before adjustment | [optional] +**after_collateral** | **str** | Collateral amount after adjustment | [optional] +**before_ltv** | **str** | Collateral ratio before adjustment | [optional] +**after_ltv** | **str** | Collateral ratio after adjustment | [optional] +**operate_time** | **int** | Operation time, timestamp in seconds | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Contract.md b/docs/Contract.md index aa2cf9b..55d18e6 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -1,47 +1,47 @@ # Contract -Futures contract details. +Futures contract details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Futures contract. | [optional] -**type** | **str** | Futures contract type. | [optional] -**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency. | [optional] -**leverage_min** | **str** | Minimum leverage. | [optional] -**leverage_max** | **str** | Maximum leverage. | [optional] -**maintenance_rate** | **str** | Maintenance rate of margin. | [optional] -**mark_type** | **str** | Mark price type, internal - based on internal trading, external index price | [optional] -**mark_price** | **str** | Current mark price. | [optional] -**index_price** | **str** | Current index price. | [optional] -**last_price** | **str** | Last trading price. | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate. | [optional] -**taker_fee_rate** | **str** | Taker fee rate. | [optional] -**order_price_round** | **str** | Minimum order price increment. | [optional] -**mark_price_round** | **str** | Minimum mark price increment. | [optional] -**funding_rate** | **str** | Current funding rate. | [optional] -**funding_interval** | **int** | Funding application interval, unit in seconds. | [optional] -**funding_next_apply** | **float** | Next funding time. | [optional] -**risk_limit_base** | **str** | Risk limit base,deprecated. | [optional] -**risk_limit_step** | **str** | Step of adjusting risk limit,deprecated. | [optional] -**risk_limit_max** | **str** | Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed. | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed. | [optional] -**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount. | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate. | [optional] -**orderbook_id** | **int** | Current orderbook ID. | [optional] -**trade_id** | **int** | Current trade ID. | [optional] -**trade_size** | **int** | Historical accumulated trade size. | [optional] -**position_size** | **int** | Current total long position size. | [optional] -**config_change_time** | **float** | Last changed time of configuration. | [optional] -**in_delisting** | **bool** | `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` contract is offline | [optional] -**orders_limit** | **int** | Maximum number of open orders. | [optional] -**enable_bonus** | **bool** | Whether bouns is enabled. | [optional] -**enable_credit** | **bool** | Whether portfolio margin account is enabled. | [optional] -**create_time** | **float** | Created time of the contract. | [optional] +**name** | **str** | Futures contract | [optional] +**type** | **str** | Contract type: inverse - inverse contract, direct - direct contract | [optional] +**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] +**leverage_min** | **str** | Minimum leverage | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**maintenance_rate** | **str** | Maintenance rate of margin | [optional] +**mark_type** | **str** | Mark price type: internal - internal trading price, index - external index price | [optional] +**mark_price** | **str** | Current mark price | [optional] +**index_price** | **str** | Current index price | [optional] +**last_price** | **str** | Last trading price | [optional] +**maker_fee_rate** | **str** | Maker fee rate, negative values indicate rebates | [optional] +**taker_fee_rate** | **str** | Taker fee rate | [optional] +**order_price_round** | **str** | Minimum order price increment | [optional] +**mark_price_round** | **str** | Minimum mark price increment | [optional] +**funding_rate** | **str** | Current funding rate | [optional] +**funding_interval** | **int** | Funding application interval, unit in seconds | [optional] +**funding_next_apply** | **float** | Next funding time | [optional] +**risk_limit_base** | **str** | Base risk limit (deprecated) | [optional] +**risk_limit_step** | **str** | Risk limit adjustment step (deprecated) | [optional] +**risk_limit_max** | **str** | Maximum risk limit allowed by the contract (deprecated). It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits | [optional] +**order_size_min** | **int** | Minimum order size allowed by the contract | [optional] +**order_size_max** | **int** | Maximum order size allowed by the contract | [optional] +**order_price_deviate** | **str** | Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] +**ref_discount_rate** | **str** | Trading fee discount for referred users | [optional] +**ref_rebate_rate** | **str** | Commission rate for referrers | [optional] +**orderbook_id** | **int** | Orderbook update ID | [optional] +**trade_id** | **int** | Current trade ID | [optional] +**trade_size** | **int** | Historical cumulative trading volume | [optional] +**position_size** | **int** | Current total long position size | [optional] +**config_change_time** | **float** | Last configuration update time | [optional] +**in_delisting** | **bool** | `in_delisting=true` and position_size>0 indicates the contract is in delisting transition period `in_delisting=true` and position_size=0 indicates the contract is delisted | [optional] +**orders_limit** | **int** | Maximum number of pending orders | [optional] +**enable_bonus** | **bool** | Whether bonus is enabled | [optional] +**enable_credit** | **bool** | Whether portfolio margin account is enabled | [optional] +**create_time** | **float** | Created time of the contract | [optional] **funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional] -**status** | **str** | Contract Status Types include: prelaunch, trading, delisting, delisted. | [optional] -**launch_time** | **int** | Contract expiry timestamp. | [optional] +**status** | **str** | Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted) | [optional] +**launch_time** | **int** | Contract expiry timestamp | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContractStat.md b/docs/ContractStat.md index 17b9038..162ca4f 100644 --- a/docs/ContractStat.md +++ b/docs/ContractStat.md @@ -3,19 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Stat timestamp. | [optional] -**lsr_taker** | **float** | Long/short account number ratio. | [optional] -**lsr_account** | **float** | Long/short taker size ratio. | [optional] -**long_liq_size** | **int** | Long liquidation size. | [optional] -**long_liq_amount** | **float** | Long liquidation amount(base currency). | [optional] -**long_liq_usd** | **float** | Long liquidation volume(quote currency). | [optional] -**short_liq_size** | **int** | Short liquidation size. | [optional] -**short_liq_amount** | **float** | Short liquidation amount(base currency). | [optional] -**short_liq_usd** | **float** | Short liquidation volume(quote currency). | [optional] -**open_interest** | **int** | Open interest size. | [optional] -**open_interest_usd** | **float** | Open interest volume(quote currency). | [optional] -**top_lsr_account** | **float** | Top trader long/short account ratio. | [optional] -**top_lsr_size** | **float** | Top trader long/short position ratio. | [optional] +**time** | **int** | Stat timestamp | [optional] +**lsr_taker** | **float** | Long/short taker ratio | [optional] +**lsr_account** | **float** | Long/short position user ratio | [optional] +**long_liq_size** | **int** | Long liquidation size (contracts) | [optional] +**long_liq_amount** | **float** | Long liquidation amount (base currency) | [optional] +**long_liq_usd** | **float** | Long liquidation volume (quote currency) | [optional] +**short_liq_size** | **int** | Short liquidation size (contracts) | [optional] +**short_liq_amount** | **float** | Short liquidation amount (base currency) | [optional] +**short_liq_usd** | **float** | Short liquidation volume (quote currency) | [optional] +**open_interest** | **int** | Total open interest size (contracts) | [optional] +**open_interest_usd** | **float** | Total open interest volume (quote currency) | [optional] +**top_lsr_account** | **float** | Top trader long/short account ratio | [optional] +**top_lsr_size** | **float** | Top trader long/short position ratio | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConvertSmallBalance.md b/docs/ConvertSmallBalance.md index 19f275b..e412efb 100644 --- a/docs/ConvertSmallBalance.md +++ b/docs/ConvertSmallBalance.md @@ -1,11 +1,11 @@ # ConvertSmallBalance -Convert Small Balance. +Small Balance Conversion ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **list[str]** | Currency. | [optional] -**is_all** | **bool** | Whether to exchange all. | [optional] +**currency** | **list[str]** | Currency to be converted | [optional] +**is_all** | **bool** | Whether to convert all | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllFuturesTask.md b/docs/CountdownCancelAllFuturesTask.md index 5bd65b3..5cf1cd3 100644 --- a/docs/CountdownCancelAllFuturesTask.md +++ b/docs/CountdownCancelAllFuturesTask.md @@ -1,11 +1,11 @@ # CountdownCancelAllFuturesTask -Countdown cancel task detail. +Countdown cancel task details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | -**contract** | **str** | Futures contract. | [optional] +**contract** | **str** | Futures contract | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllOptionsTask.md b/docs/CountdownCancelAllOptionsTask.md index 79811ac..0f50bb0 100644 --- a/docs/CountdownCancelAllOptionsTask.md +++ b/docs/CountdownCancelAllOptionsTask.md @@ -1,12 +1,12 @@ # CountdownCancelAllOptionsTask -Countdown cancel task detail. +Countdown cancel task details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | -**contract** | **str** | Options contract name. | [optional] -**underlying** | **str** | Underlying. | [optional] +**contract** | **str** | Options contract name | [optional] +**underlying** | **str** | Underlying | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CountdownCancelAllSpotTask.md b/docs/CountdownCancelAllSpotTask.md index a5d3d52..49c09a8 100644 --- a/docs/CountdownCancelAllSpotTask.md +++ b/docs/CountdownCancelAllSpotTask.md @@ -1,11 +1,11 @@ # CountdownCancelAllSpotTask -Countdown cancel task detail. +Countdown cancel task details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timeout** | **int** | Countdown time in seconds At least 5 seconds, 0 means cancel countdown | -**currency_pair** | **str** | Currency pair. | [optional] +**currency_pair** | **str** | Currency pair | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCollateralOrder.md b/docs/CreateCollateralOrder.md index 9c83f9f..41db4cc 100644 --- a/docs/CreateCollateralOrder.md +++ b/docs/CreateCollateralOrder.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collateral_amount** | **str** | Collateral amount. | -**collateral_currency** | **str** | Collateral. | -**borrow_amount** | **str** | Borrowing amount. | -**borrow_currency** | **str** | Borrowed currency. | +**collateral_amount** | **str** | Collateral amount | +**collateral_currency** | **str** | Collateral currency | +**borrow_amount** | **str** | Borrowed amount | +**borrow_currency** | **str** | Borrowed currency | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateMultiCollateralOrder.md b/docs/CreateMultiCollateralOrder.md index 81b82ab..72aa727 100644 --- a/docs/CreateMultiCollateralOrder.md +++ b/docs/CreateMultiCollateralOrder.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID. | [optional] -**order_type** | **str** | current - current, fixed - fixed, if not specified, default to current. | [optional] -**fixed_type** | **str** | Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed | [optional] -**fixed_rate** | **str** | Fixed interest rate, must be specified for fixed. | [optional] -**auto_renew** | **bool** | Fixed interest rate, automatic renewal. | [optional] -**auto_repay** | **bool** | Fixed interest rate, automatic repayment. | [optional] -**borrow_currency** | **str** | Borrowed currency. | -**borrow_amount** | **str** | Borrowing amount. | -**collateral_currencies** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency and amount. | [optional] +**order_id** | **str** | Order ID | [optional] +**order_type** | **str** | current - current rate, fixed - fixed rate, defaults to current if not specified | [optional] +**fixed_type** | **str** | Fixed interest rate lending period: 7d - 7 days, 30d - 30 days. Required for fixed rate | [optional] +**fixed_rate** | **str** | Fixed interest rate, required for fixed rate | [optional] +**auto_renew** | **bool** | Fixed interest rate, auto-renewal | [optional] +**auto_repay** | **bool** | Fixed interest rate, auto-repayment | [optional] +**borrow_currency** | **str** | Borrowed currency | +**borrow_amount** | **str** | Borrowed amount | +**collateral_currencies** | [**list[CollateralCurrency]**](CollateralCurrency.md) | Collateral currency and amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUniLend.md b/docs/CreateUniLend.md index 61b2db6..8c9af5a 100644 --- a/docs/CreateUniLend.md +++ b/docs/CreateUniLend.md @@ -1,13 +1,13 @@ # CreateUniLend -Lend or redeem. +Create lending or redemption ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | -**amount** | **str** | The amount of currency could be lent. | -**type** | **str** | type: lend - lend, redeem - redeem. | -**min_rate** | **str** | The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. | [optional] +**currency** | **str** | Currency name | +**amount** | **str** | Amount to deposit into lending pool | +**type** | **str** | Operation type: lend - Lend, redeem - Redeem | +**min_rate** | **str** | Minimum interest rate. If set too high, lending may fail and no interest will be earned. Required for lending operations. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUniLoan.md b/docs/CreateUniLoan.md index 56dc03f..22ad9da 100644 --- a/docs/CreateUniLoan.md +++ b/docs/CreateUniLoan.md @@ -1,14 +1,14 @@ # CreateUniLoan -Borrow or repay. +Borrow or repay ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | -**type** | **str** | type: borrow - borrow, repay - repay. | -**amount** | **str** | The amount of lending or repaying. | -**repaid_all** | **bool** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and repaid in full. | [optional] -**currency_pair** | **str** | Currency pair. | +**currency** | **str** | Currency | +**type** | **str** | Type: `borrow` - borrow, `repay` - repay | +**amount** | **str** | Borrow or repayment amount | +**repaid_all** | **bool** | Full repayment. For repayment operations only. When `true`, overrides `amount` and repays the full amount | [optional] +**currency_pair** | **str** | Currency pair | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossMarginBalance.md b/docs/CrossMarginBalance.md index d2f7b95..f4ccc54 100644 --- a/docs/CrossMarginBalance.md +++ b/docs/CrossMarginBalance.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**available** | **str** | Available amount. | [optional] -**freeze** | **str** | Locked amount. | [optional] -**borrowed** | **str** | Borrowed amount. | [optional] -**interest** | **str** | Unpaid interests. | [optional] +**available** | **str** | Available balance | [optional] +**freeze** | **str** | Locked balance | [optional] +**borrowed** | **str** | Borrowed balance | [optional] +**interest** | **str** | Unpaid interest | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossMarginLoan.md b/docs/CrossMarginLoan.md index 9cdba3e..662a94c 100644 --- a/docs/CrossMarginLoan.md +++ b/docs/CrossMarginLoan.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Loan record ID. | [optional] [readonly] -**create_time** | **int** | Creation timestamp, in milliseconds. | [optional] [readonly] -**update_time** | **int** | Update timestamp, in milliseconds. | [optional] [readonly] -**currency** | **str** | Currency name. | -**amount** | **str** | Borrowed amount. | -**text** | **str** | User defined custom ID. | [optional] +**id** | **str** | Loan record ID | [optional] [readonly] +**create_time** | **int** | Creation timestamp, in milliseconds | [optional] [readonly] +**update_time** | **int** | Update timestamp, in milliseconds | [optional] [readonly] +**currency** | **str** | Currency name | +**amount** | **str** | Borrowed amount | +**text** | **str** | User defined custom ID | [optional] **status** | **int** | Deprecated. Currently, all statuses have been set to 2. Borrow loan status, which includes: - 1: failed to borrow - 2: borrowed but not repaid - 3: repayment complete | [optional] [readonly] -**repaid** | **str** | Repaid amount. | [optional] [readonly] -**repaid_interest** | **str** | Repaid interest. | [optional] [readonly] -**unpaid_interest** | **str** | Outstanding interest yet to be paid. | [optional] [readonly] +**repaid** | **str** | Repaid amount | [optional] [readonly] +**repaid_interest** | **str** | Repaid interest | [optional] [readonly] +**unpaid_interest** | **str** | Unpaid interest | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CrossMarginRepayment.md b/docs/CrossMarginRepayment.md index f0a7fea..3997879 100644 --- a/docs/CrossMarginRepayment.md +++ b/docs/CrossMarginRepayment.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Loan record ID. | [optional] -**create_time** | **int** | Repayment time. | [optional] -**loan_id** | **str** | Loan record ID. | [optional] -**currency** | **str** | Currency name. | [optional] -**principal** | **str** | Repaid principal. | [optional] -**interest** | **str** | Repaid interest. | [optional] +**id** | **str** | Loan record ID | [optional] +**create_time** | **int** | Repayment time | [optional] +**loan_id** | **str** | Loan record ID | [optional] +**currency** | **str** | Currency name | [optional] +**principal** | **str** | Repaid principal | [optional] +**interest** | **str** | Repaid interest | [optional] **repayment_type** | **str** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment after cancellation | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Currency.md b/docs/Currency.md index fd491f8..27e0400 100644 --- a/docs/Currency.md +++ b/docs/Currency.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency symbol. | [optional] -**name** | **str** | Currency name. | [optional] -**delisted** | **bool** | Whether currency is de-listed. | [optional] -**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled (deprecated). | [optional] -**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed (deprecated). | [optional] -**deposit_disabled** | **bool** | Whether currency's deposit is disabled (deprecated). | [optional] -**trade_disabled** | **bool** | Whether currency's trading is disabled. | [optional] +**currency** | **str** | Currency symbol | [optional] +**name** | **str** | Currency name | [optional] +**delisted** | **bool** | Whether currency is de-listed | [optional] +**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled (deprecated) | [optional] +**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed (deprecated) | [optional] +**deposit_disabled** | **bool** | Whether currency's deposit is disabled (deprecated) | [optional] +**trade_disabled** | **bool** | Whether currency's trading is disabled | [optional] **fixed_rate** | **str** | Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies | [optional] -**chain** | **str** | The main chain corresponding to the coin. | [optional] -**chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins. | [optional] +**chain** | **str** | The main chain corresponding to the coin | [optional] +**chains** | [**list[SpotCurrencyChain]**](SpotCurrencyChain.md) | All links corresponding to coins | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CurrencyChain.md b/docs/CurrencyChain.md index 369f3d3..90a4984 100644 --- a/docs/CurrencyChain.md +++ b/docs/CurrencyChain.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**chain** | **str** | Chain name. | [optional] -**name_cn** | **str** | Chain name in Chinese. | [optional] -**name_en** | **str** | Chain name in English. | [optional] +**chain** | **str** | Chain name | [optional] +**name_cn** | **str** | Chain name in Chinese | [optional] +**name_en** | **str** | Chain name in English | [optional] **contract_address** | **str** | Smart contract address for the currency; if no address is available, it will be an empty string | [optional] -**is_disabled** | **int** | If it is disabled. 0 means NOT being disabled. | [optional] -**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not. | [optional] -**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not. | [optional] -**decimal** | **str** | Withdrawal precision. | [optional] +**is_disabled** | **int** | If it is disabled. 0 means NOT being disabled | [optional] +**is_deposit_disabled** | **int** | Is deposit disabled. 0 means not disabled | [optional] +**is_withdraw_disabled** | **int** | Is withdrawal disabled. 0 means not disabled | [optional] +**decimal** | **str** | Withdrawal precision | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md index 065967e..3f5f39f 100644 --- a/docs/CurrencyPair.md +++ b/docs/CurrencyPair.md @@ -1,28 +1,28 @@ # CurrencyPair -Spot currency pair. +Spot currency pair ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Currency pair. | [optional] -**base** | **str** | Base currency. | [optional] -**base_name** | **str** | Transaction currency name. | [optional] -**quote** | **str** | Quote currency. | [optional] -**quote_name** | **str** | Name of the denominated currency. | [optional] -**fee** | **str** | Trading fee. | [optional] -**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit. | [optional] -**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit. | [optional] -**max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit. | [optional] -**max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit. | [optional] -**amount_precision** | **int** | Amount scale. | [optional] -**precision** | **int** | Price scale. | [optional] -**trade_status** | **str** | How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: sold | [optional] -**sell_start** | **int** | Sell start unix timestamp in seconds. | [optional] -**buy_start** | **int** | Buy start unix timestamp in seconds. | [optional] -**delisting_time** | **int** | Expected time to remove the shelves, Unix timestamp in seconds. | [optional] -**type** | **str** | Trading pair type, normal: normal, premarket: pre-market. | [optional] -**trade_url** | **str** | Transaction link. | [optional] -**st_tag** | **bool** | Whether the trading pair is in ST risk assessment, false - No, true - Yes. | [optional] +**id** | **str** | Currency pair | [optional] +**base** | **str** | Base currency | [optional] +**base_name** | **str** | Base currency name | [optional] +**quote** | **str** | Quote currency | [optional] +**quote_name** | **str** | Quote currency name | [optional] +**fee** | **str** | Trading fee rate | [optional] +**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit | [optional] +**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit | [optional] +**max_base_amount** | **str** | Maximum amount of base currency to trade, `null` means no limit | [optional] +**max_quote_amount** | **str** | Maximum amount of quote currency to trade, `null` means no limit | [optional] +**amount_precision** | **int** | Amount scale | [optional] +**precision** | **int** | Price scale | [optional] +**trade_status** | **str** | Trading status - untradable: cannot be traded - buyable: can be bought - sellable: can be sold - tradable: can be bought and sold | [optional] +**sell_start** | **int** | Sell start unix timestamp in seconds | [optional] +**buy_start** | **int** | Buy start unix timestamp in seconds | [optional] +**delisting_time** | **int** | Expected time to remove the shelves, Unix timestamp in seconds | [optional] +**type** | **str** | Trading pair type, normal: normal, premarket: pre-market | [optional] +**trade_url** | **str** | Transaction link | [optional] +**st_tag** | **bool** | Whether the trading pair is in ST risk assessment, false - No, true - Yes | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CurrencyQuota.md b/docs/CurrencyQuota.md index 57a33eb..656a6a8 100644 --- a/docs/CurrencyQuota.md +++ b/docs/CurrencyQuota.md @@ -1,14 +1,14 @@ # CurrencyQuota -Currency Quota. +Currency Quota ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**min_quota** | **str** | Minimum borrowing/collateral quota for the currency. | [optional] -**left_quota** | **str** | Remaining borrowing/collateral limit for the currency. | [optional] -**left_quote_usdt** | **str** | Remaining currency limit converted to USDT. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**min_quota** | **str** | Minimum borrowing/collateral limit for the currency | [optional] +**left_quota** | **str** | Remaining borrowing/collateral quota for the currency | [optional] +**left_quote_usdt** | **str** | Remaining currency limit converted to USDT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DebitFee.md b/docs/DebitFee.md index d04d9bc..98d0744 100644 --- a/docs/DebitFee.md +++ b/docs/DebitFee.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | Whether GT fee discount is used. | +**enabled** | **bool** | Whether GT fee deduction is enabled | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md index 0ed5f6b..5c4e4c5 100644 --- a/docs/DeliveryApi.md +++ b/docs/DeliveryApi.md @@ -4,41 +4,41 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | List all futures contracts. -[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract. -[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Futures order book. -[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures trading history. -[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Get futures candlesticks. -[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | List futures tickers. -[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures insurance balance history. -[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Query futures account. -[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query account book. -[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | List all positions of a user. -[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position. -[**update_delivery_position_margin**](DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin. -[**update_delivery_position_leverage**](DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage. -[**update_delivery_position_risk_limit**](DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit. -[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | List futures orders. -[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Create a futures order. -[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all `open` orders matched. -[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Get a single order. -[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel a single order. -[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | List personal trading history. -[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | List position close history. -[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | List liquidation history. -[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | List settlement history. -[**list_delivery_risk_limit_tiers**](DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | List risk limit tiers. -[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | List All Price-triggered Orders. -[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create a price-triggered order. -[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel All Price-triggered Orders. -[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order. -[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order. +[**list_delivery_contracts**](DeliveryApi.md#list_delivery_contracts) | **GET** /delivery/{settle}/contracts | Query all futures contracts +[**get_delivery_contract**](DeliveryApi.md#get_delivery_contract) | **GET** /delivery/{settle}/contracts/{contract} | Query single contract information +[**list_delivery_order_book**](DeliveryApi.md#list_delivery_order_book) | **GET** /delivery/{settle}/order_book | Query futures market depth information +[**list_delivery_trades**](DeliveryApi.md#list_delivery_trades) | **GET** /delivery/{settle}/trades | Futures market transaction records +[**list_delivery_candlesticks**](DeliveryApi.md#list_delivery_candlesticks) | **GET** /delivery/{settle}/candlesticks | Futures market K-line chart +[**list_delivery_tickers**](DeliveryApi.md#list_delivery_tickers) | **GET** /delivery/{settle}/tickers | Get all futures trading statistics +[**list_delivery_insurance_ledger**](DeliveryApi.md#list_delivery_insurance_ledger) | **GET** /delivery/{settle}/insurance | Futures market insurance fund history +[**list_delivery_accounts**](DeliveryApi.md#list_delivery_accounts) | **GET** /delivery/{settle}/accounts | Get futures account +[**list_delivery_account_book**](DeliveryApi.md#list_delivery_account_book) | **GET** /delivery/{settle}/account_book | Query futures account change history +[**list_delivery_positions**](DeliveryApi.md#list_delivery_positions) | **GET** /delivery/{settle}/positions | Get user position list +[**get_delivery_position**](DeliveryApi.md#get_delivery_position) | **GET** /delivery/{settle}/positions/{contract} | Get single position information +[**update_delivery_position_margin**](DeliveryApi.md#update_delivery_position_margin) | **POST** /delivery/{settle}/positions/{contract}/margin | Update position margin +[**update_delivery_position_leverage**](DeliveryApi.md#update_delivery_position_leverage) | **POST** /delivery/{settle}/positions/{contract}/leverage | Update position leverage +[**update_delivery_position_risk_limit**](DeliveryApi.md#update_delivery_position_risk_limit) | **POST** /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit +[**list_delivery_orders**](DeliveryApi.md#list_delivery_orders) | **GET** /delivery/{settle}/orders | Query futures order list +[**create_delivery_order**](DeliveryApi.md#create_delivery_order) | **POST** /delivery/{settle}/orders | Place futures order +[**cancel_delivery_orders**](DeliveryApi.md#cancel_delivery_orders) | **DELETE** /delivery/{settle}/orders | Cancel all orders with 'open' status +[**get_delivery_order**](DeliveryApi.md#get_delivery_order) | **GET** /delivery/{settle}/orders/{order_id} | Query single order details +[**cancel_delivery_order**](DeliveryApi.md#cancel_delivery_order) | **DELETE** /delivery/{settle}/orders/{order_id} | Cancel single order +[**get_my_delivery_trades**](DeliveryApi.md#get_my_delivery_trades) | **GET** /delivery/{settle}/my_trades | Query personal trading records +[**list_delivery_position_close**](DeliveryApi.md#list_delivery_position_close) | **GET** /delivery/{settle}/position_close | Query position close history +[**list_delivery_liquidates**](DeliveryApi.md#list_delivery_liquidates) | **GET** /delivery/{settle}/liquidates | Query liquidation history +[**list_delivery_settlements**](DeliveryApi.md#list_delivery_settlements) | **GET** /delivery/{settle}/settlements | Query settlement records +[**list_delivery_risk_limit_tiers**](DeliveryApi.md#list_delivery_risk_limit_tiers) | **GET** /delivery/{settle}/risk_limit_tiers | Query risk limit tiers +[**list_price_triggered_delivery_orders**](DeliveryApi.md#list_price_triggered_delivery_orders) | **GET** /delivery/{settle}/price_orders | Query auto order list +[**create_price_triggered_delivery_order**](DeliveryApi.md#create_price_triggered_delivery_order) | **POST** /delivery/{settle}/price_orders | Create price-triggered order +[**cancel_price_triggered_delivery_order_list**](DeliveryApi.md#cancel_price_triggered_delivery_order_list) | **DELETE** /delivery/{settle}/price_orders | Cancel all auto orders +[**get_price_triggered_delivery_order**](DeliveryApi.md#get_price_triggered_delivery_order) | **GET** /delivery/{settle}/price_orders/{order_id} | Query single auto order details +[**cancel_price_triggered_delivery_order**](DeliveryApi.md#cancel_price_triggered_delivery_order) | **DELETE** /delivery/{settle}/price_orders/{order_id} | Cancel single auto order # **list_delivery_contracts** > list[DeliveryContract] list_delivery_contracts(settle) -List all futures contracts. +Query all futures contracts ### Example @@ -55,10 +55,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. +settle = 'usdt' # str | Settle currency try: - # List all futures contracts. + # Query all futures contracts api_response = api_instance.list_delivery_contracts(settle) print(api_response) except GateApiException as ex: @@ -71,7 +71,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | ### Return type @@ -89,14 +89,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_delivery_contract** > DeliveryContract get_delivery_contract(settle, contract) -Get a single contract. +Query single contract information ### Example @@ -113,11 +113,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract try: - # Get a single contract. + # Query single contract information api_response = api_instance.get_delivery_contract(settle, contract) print(api_response) except GateApiException as ex: @@ -130,8 +130,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | ### Return type @@ -149,16 +149,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Contract information. | - | +**200** | Contract information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_order_book** > FuturesOrderBook list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) -Futures order book. +Query futures market depth information -Bids will be sorted by price from high to low, while asks sorted reversely. +Bids will be sorted by price from high to low, while asks sorted reversely ### Example @@ -175,14 +175,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) -with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0') +limit = 10 # int | Number of depth levels (optional) (default to 10) +with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time depth changes (optional) (default to False) try: - # Futures order book. + # Query futures market depth information api_response = api_instance.list_delivery_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -195,11 +195,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] - **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0'] + **limit** | **int**| Number of depth levels | [optional] [default to 10] + **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time depth changes | [optional] [default to False] ### Return type @@ -217,14 +217,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Depth query successful. | - | +**200** | Depth query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_trades** > list[FuturesTrade] list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) -Futures trading history. +Futures market transaction records ### Example @@ -241,15 +241,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) last_id = '12345' # str | 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 (optional) _from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) to = 1546935600 # int | Specify end time in Unix seconds, default to current time. (optional) try: - # Futures trading history. + # Futures market transaction records api_response = api_instance.list_delivery_trades(settle, contract, limit=limit, last_id=last_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -262,9 +262,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **last_id** | **str**| 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 | [optional] **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] **to** | **int**| Specify end time in Unix seconds, default to current time. | [optional] @@ -285,14 +285,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_candlesticks** > list[DeliveryCandlestick] list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) -Get futures candlesticks. +Futures market K-line chart Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` @@ -311,15 +311,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time (optional) (default to '5m') +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional) +limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time (optional) (default to '5m') try: - # Get futures candlesticks. + # Futures market K-line chart api_response = api_instance.list_delivery_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) print(api_response) except GateApiException as ex: @@ -332,12 +332,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time | [optional] [default to '5m'] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional] + **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time | [optional] [default to '5m'] ### Return type @@ -355,14 +355,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_tickers** > list[DeliveryTicker] list_delivery_tickers(settle, contract=contract) -List futures tickers. +Get all futures trading statistics ### Example @@ -379,11 +379,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) try: - # List futures tickers. + # Get all futures trading statistics api_response = api_instance.list_delivery_tickers(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -396,8 +396,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] ### Return type @@ -415,14 +415,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_insurance_ledger** > list[InsuranceRecord] list_delivery_insurance_ledger(settle, limit=limit) -Futures insurance balance history. +Futures market insurance fund history ### Example @@ -439,11 +439,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +settle = 'usdt' # str | Settle currency +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # Futures insurance balance history. + # Futures market insurance fund history api_response = api_instance.list_delivery_insurance_ledger(settle, limit=limit) print(api_response) except GateApiException as ex: @@ -456,8 +456,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **settle** | **str**| Settle currency | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -475,14 +475,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_accounts** > FuturesAccount list_delivery_accounts(settle) -Query futures account. +Get futures account ### Example @@ -508,10 +508,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. +settle = 'usdt' # str | Settle currency try: - # Query futures account. + # Get futures account api_response = api_instance.list_delivery_accounts(settle) print(api_response) except GateApiException as ex: @@ -524,7 +524,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | ### Return type @@ -542,14 +542,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_account_book** > list[FuturesAccountBook] list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) -Query account book. +Query futures account change history ### Example @@ -575,14 +575,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +settle = 'usdt' # str | Settle currency +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional) try: - # Query account book. + # Query futures account change history api_response = api_instance.list_delivery_account_book(settle, limit=limit, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -595,8 +595,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **settle** | **str**| Settle currency | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] @@ -617,14 +617,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_positions** > list[Position] list_delivery_positions(settle) -List all positions of a user. +Get user position list ### Example @@ -650,10 +650,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. +settle = 'usdt' # str | Settle currency try: - # List all positions of a user. + # Get user position list api_response = api_instance.list_delivery_positions(settle) print(api_response) except GateApiException as ex: @@ -666,7 +666,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | ### Return type @@ -684,14 +684,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_delivery_position** > Position get_delivery_position(settle, contract) -Get single position. +Get single position information ### Example @@ -717,11 +717,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract try: - # Get single position. + # Get single position information api_response = api_instance.get_delivery_position(settle, contract) print(api_response) except GateApiException as ex: @@ -734,8 +734,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | ### Return type @@ -753,14 +753,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_delivery_position_margin** > Position update_delivery_position_margin(settle, contract, change) -Update position margin. +Update position margin ### Example @@ -786,12 +786,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. -change = '0.01' # str | Margin change amount, positive number increases, negative number. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +change = '0.01' # str | Margin change amount, positive number increases, negative number decreases try: - # Update position margin. + # Update position margin api_response = api_instance.update_delivery_position_margin(settle, contract, change) print(api_response) except GateApiException as ex: @@ -804,9 +804,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **change** | **str**| Margin change amount, positive number increases, negative number. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **change** | **str**| Margin change amount, positive number increases, negative number decreases | ### Return type @@ -824,14 +824,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_delivery_position_leverage** > Position update_delivery_position_leverage(settle, contract, leverage) -Update position leverage. +Update position leverage ### Example @@ -857,12 +857,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. -leverage = '10' # str | New position leverage. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +leverage = '10' # str | New position leverage try: - # Update position leverage. + # Update position leverage api_response = api_instance.update_delivery_position_leverage(settle, contract, leverage) print(api_response) except GateApiException as ex: @@ -875,9 +875,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **leverage** | **str**| New position leverage. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **leverage** | **str**| New position leverage | ### Return type @@ -895,14 +895,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_delivery_position_risk_limit** > Position update_delivery_position_risk_limit(settle, contract, risk_limit) -Update position risk limit. +Update position risk limit ### Example @@ -928,12 +928,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. -risk_limit = '10' # str | New position risk limit. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +risk_limit = '10' # str | New position risk limit try: - # Update position risk limit. + # Update position risk limit api_response = api_instance.update_delivery_position_risk_limit(settle, contract, risk_limit) print(api_response) except GateApiException as ex: @@ -946,9 +946,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **risk_limit** | **str**| New position risk limit. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **risk_limit** | **str**| New position risk limit | ### Return type @@ -966,16 +966,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_orders** > list[FuturesOrder] list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) -List futures orders. +Query futures order list -Zero-filled order cannot be retrieved 10 minutes after order cancellation. +Zero-fill orders cannot be retrieved 10 minutes after order cancellation ### Example @@ -1001,16 +1001,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -status = 'open' # str | Only list the orders with this status. -contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) -count_total = 0 # int | Whether to return total number matched. Default to 0(no return). (optional) (default to 0) +settle = 'usdt' # str | Settle currency +status = 'open' # str | Query order list based on status +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) +count_total = 0 # int | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0) try: - # List futures orders. + # Query futures order list api_response = api_instance.list_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id, count_total=count_total) print(api_response) except GateApiException as ex: @@ -1023,13 +1023,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **status** | **str**| Only list the orders with this status. | - **contract** | **str**| Futures contract. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] - **count_total** | **int**| Whether to return total number matched. Default to 0(no return). | [optional] [default to 0] + **settle** | **str**| Settle currency | + **status** | **str**| Query order list based on status | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] + **count_total** | **int**| Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0] ### Return type @@ -1047,16 +1047,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1.
| +**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
* X-Pagination-Total - Total number matched, only returned if `count_total` is set to 1
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_delivery_order** > FuturesOrder create_delivery_order(settle, futures_order) -Create a futures order. +Place futures order -Zero-filled order cannot be retrieved 10 minutes after order cancellation. +Zero-fill orders cannot be retrieved 10 minutes after order cancellation ### Example @@ -1082,11 +1082,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. +settle = 'usdt' # str | Settle currency futures_order = gate_api.FuturesOrder() # FuturesOrder | try: - # Create a futures order. + # Place futures order api_response = api_instance.create_delivery_order(settle, futures_order) print(api_response) except GateApiException as ex: @@ -1099,7 +1099,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | ### Return type @@ -1118,16 +1118,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order details. | - | +**201** | Order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_delivery_orders** > list[FuturesOrder] cancel_delivery_orders(settle, contract, side=side) -Cancel all `open` orders matched. +Cancel all orders with 'open' status -Zero-filled order cannot be retrieved 10 minutes after order cancellation. +Zero-fill orders cannot be retrieved 10 minutes after order cancellation ### Example @@ -1153,12 +1153,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. -side = 'ask' # str | All bids or asks. Both included if not specified. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract +side = 'ask' # str | Specify all bids or all asks, both included if not specified (optional) try: - # Cancel all `open` orders matched. + # Cancel all orders with 'open' status api_response = api_instance.cancel_delivery_orders(settle, contract, side=side) print(api_response) except GateApiException as ex: @@ -1171,9 +1171,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **side** | **str**| All bids or asks. Both included if not specified. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **side** | **str**| Specify all bids or all asks, both included if not specified | [optional] ### Return type @@ -1191,16 +1191,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All orders matched cancelled. | - | +**200** | Batch cancellation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_delivery_order** > FuturesOrder get_delivery_order(settle, order_id) -Get a single order. +Query single order details -Zero-filled order cannot be retrieved 10 minutes after order cancellation. +Zero-fill orders cannot be retrieved 10 minutes after order cancellation ### Example @@ -1226,11 +1226,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -order_id = '12345' # str | Retrieve the data of the order with the specified ID. +settle = 'usdt' # str | Settle currency +order_id = '12345' # str | ID returned when order is successfully created try: - # Get a single order. + # Query single order details api_response = api_instance.get_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -1243,8 +1243,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **settle** | **str**| Settle currency | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -1262,14 +1262,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details. | - | +**200** | Order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_delivery_order** > FuturesOrder cancel_delivery_order(settle, order_id) -Cancel a single order. +Cancel single order ### Example @@ -1295,11 +1295,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -order_id = '12345' # str | Retrieve the data of the order with the specified ID. +settle = 'usdt' # str | Settle currency +order_id = '12345' # str | ID returned when order is successfully created try: - # Cancel a single order. + # Cancel single order api_response = api_instance.cancel_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -1312,8 +1312,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **settle** | **str**| Settle currency | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -1331,14 +1331,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details. | - | +**200** | Order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_my_delivery_trades** > list[MyFuturesTrade] get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) -List personal trading history. +Query personal trading records ### Example @@ -1364,16 +1364,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) -order = 12345 # int | Futures order ID, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) -count_total = 0 # int | Whether to return total number matched. Default to 0(no return). (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +order = 12345 # int | Futures order ID, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) +count_total = 0 # int | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0) try: - # List personal trading history. + # Query personal trading records api_response = api_instance.get_my_delivery_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total) print(api_response) except GateApiException as ex: @@ -1386,13 +1386,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | [optional] - **order** | **int**| Futures order ID, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] - **count_total** | **int**| Whether to return total number matched. Default to 0(no return). | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **order** | **int**| Futures order ID, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] + **count_total** | **int**| Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0] ### Return type @@ -1410,14 +1410,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
* X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1.
| +**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
* X-Pagination-Total - Total number matched, only returned if `count_total` is set to 1
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_position_close** > list[PositionClose] list_delivery_position_close(settle, contract=contract, limit=limit) -List position close history. +Query position close history ### Example @@ -1443,12 +1443,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # List position close history. + # Query position close history api_response = api_instance.list_delivery_position_close(settle, contract=contract, limit=limit) print(api_response) except GateApiException as ex: @@ -1461,9 +1461,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -1481,14 +1481,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_liquidates** > list[FuturesLiquidate] list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) -List liquidation history. +Query liquidation history ### Example @@ -1514,13 +1514,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -at = 0 # int | Specify a liquidation timestamp. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +at = 0 # int | Specify liquidation timestamp (optional) (default to 0) try: - # List liquidation history. + # Query liquidation history api_response = api_instance.list_delivery_liquidates(settle, contract=contract, limit=limit, at=at) print(api_response) except GateApiException as ex: @@ -1533,10 +1533,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **at** | **int**| Specify a liquidation timestamp. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **at** | **int**| Specify liquidation timestamp | [optional] [default to 0] ### Return type @@ -1554,14 +1554,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_settlements** > list[DeliverySettlement] list_delivery_settlements(settle, contract=contract, limit=limit, at=at) -List settlement history. +Query settlement records ### Example @@ -1587,13 +1587,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -at = 0 # int | Specify a settlement timestamp. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +at = 0 # int | Specify settlement timestamp (optional) (default to 0) try: - # List settlement history. + # Query settlement records api_response = api_instance.list_delivery_settlements(settle, contract=contract, limit=limit, at=at) print(api_response) except GateApiException as ex: @@ -1606,10 +1606,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **at** | **int**| Specify a settlement timestamp. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **at** | **int**| Specify settlement timestamp | [optional] [default to 0] ### Return type @@ -1627,14 +1627,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_delivery_risk_limit_tiers** > list[FuturesLimitRiskTiers] list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) -List risk limit tiers. +Query risk limit tiers When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. @@ -1653,13 +1653,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT_20200814' # str | Futures contract. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT_20200814' # str | Futures contract (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # List risk limit tiers. + # Query risk limit tiers api_response = api_instance.list_delivery_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1672,10 +1672,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -1693,14 +1693,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_price_triggered_delivery_orders** > list[FuturesPriceTriggeredOrder] list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) -List All Price-triggered Orders. +Query auto order list ### Example @@ -1726,14 +1726,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -status = 'status_example' # str | Only list the orders with this status. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +status = 'status_example' # str | Query order list based on status +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # List All Price-triggered Orders. + # Query auto order list api_response = api_instance.list_price_triggered_delivery_orders(settle, status, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1746,11 +1746,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **status** | **str**| Only list the orders with this status. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **status** | **str**| Query order list based on status | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -1768,14 +1768,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_price_triggered_delivery_order** > TriggerOrderResponse create_price_triggered_delivery_order(settle, futures_price_triggered_order) -Create a price-triggered order. +Create price-triggered order ### Example @@ -1801,11 +1801,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. +settle = 'usdt' # str | Settle currency futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | try: - # Create a price-triggered order. + # Create price-triggered order api_response = api_instance.create_price_triggered_delivery_order(settle, futures_price_triggered_order) print(api_response) except GateApiException as ex: @@ -1818,7 +1818,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | ### Return type @@ -1837,14 +1837,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order created. | - | +**201** | Order created successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_delivery_order_list** > list[FuturesPriceTriggeredOrder] cancel_price_triggered_delivery_order_list(settle, contract) -Cancel All Price-triggered Orders. +Cancel all auto orders ### Example @@ -1870,11 +1870,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract try: - # Cancel All Price-triggered Orders. + # Cancel all auto orders api_response = api_instance.cancel_price_triggered_delivery_order_list(settle, contract) print(api_response) except GateApiException as ex: @@ -1887,8 +1887,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | ### Return type @@ -1906,14 +1906,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders. | - | +**200** | Batch cancellation request accepted and processed, success determined by order list | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_price_triggered_delivery_order** > FuturesPriceTriggeredOrder get_price_triggered_delivery_order(settle, order_id) -Get a price-triggered order. +Query single auto order details ### Example @@ -1939,11 +1939,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. +settle = 'usdt' # str | Settle currency +order_id = 'order_id_example' # str | ID returned when order is successfully created try: - # Get a price-triggered order. + # Query single auto order details api_response = api_instance.get_price_triggered_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -1956,8 +1956,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **settle** | **str**| Settle currency | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -1975,14 +1975,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail. | - | +**200** | Auto order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_delivery_order** > FuturesPriceTriggeredOrder cancel_price_triggered_delivery_order(settle, order_id) -cancel a price-triggered order. +Cancel single auto order ### Example @@ -2008,11 +2008,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.DeliveryApi(api_client) -settle = 'usdt' # str | Settle currency. -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. +settle = 'usdt' # str | Settle currency +order_id = 'order_id_example' # str | ID returned when order is successfully created try: - # cancel a price-triggered order. + # Cancel single auto order api_response = api_instance.cancel_price_triggered_delivery_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -2025,8 +2025,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **settle** | **str**| Settle currency | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -2044,7 +2044,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail. | - | +**200** | Auto order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DeliveryCandlestick.md b/docs/DeliveryCandlestick.md index bc74e96..16cbd49 100644 --- a/docs/DeliveryCandlestick.md +++ b/docs/DeliveryCandlestick.md @@ -1,15 +1,15 @@ # DeliveryCandlestick -data point in every timestamp. +data point in every timestamp ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds. | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed. | [optional] -**c** | **str** | Close price (quote currency). | [optional] -**h** | **str** | Highest price (quote currency). | [optional] -**l** | **str** | Lowest price (quote currency). | [optional] -**o** | **str** | Open price (quote currency). | [optional] +**t** | **float** | Unix timestamp in seconds | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] +**c** | **str** | Close price (quote currency) | [optional] +**h** | **str** | Highest price (quote currency) | [optional] +**l** | **str** | Lowest price (quote currency) | [optional] +**o** | **str** | Open price (quote currency) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryContract.md b/docs/DeliveryContract.md index f7b45cf..9675b71 100644 --- a/docs/DeliveryContract.md +++ b/docs/DeliveryContract.md @@ -1,47 +1,47 @@ # DeliveryContract -Futures contract details. +Futures contract details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Futures contract. | [optional] -**underlying** | **str** | Underlying. | [optional] -**cycle** | **str** | Cycle type, e.g. WEEKLY, QUARTERLY. | [optional] -**type** | **str** | Futures contract type. | [optional] -**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency. | [optional] -**leverage_min** | **str** | Minimum leverage. | [optional] -**leverage_max** | **str** | Maximum leverage. | [optional] -**maintenance_rate** | **str** | Maintenance rate of margin. | [optional] -**mark_type** | **str** | Mark price type, internal - based on internal trading, external index price | [optional] -**mark_price** | **str** | Current mark price. | [optional] -**index_price** | **str** | Current index price. | [optional] -**last_price** | **str** | Last trading price. | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate. | [optional] -**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] -**basis_rate** | **str** | Fair basis rate. | [optional] -**basis_value** | **str** | Fair basis value. | [optional] -**basis_impact_value** | **str** | Funding used for calculating impact bid, ask price. | [optional] -**settle_price** | **str** | Settle price. | [optional] -**settle_price_interval** | **int** | Settle price update interval. | [optional] -**settle_price_duration** | **int** | Settle price update duration in seconds. | [optional] -**expire_time** | **int** | Contract expiry timestamp. | [optional] -**risk_limit_base** | **str** | Risk limit base. | [optional] -**risk_limit_step** | **str** | Step of adjusting risk limit. | [optional] -**risk_limit_max** | **str** | Maximum risk limit the contract allowed. | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed. | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed. | [optional] -**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount. | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate. | [optional] -**orderbook_id** | **int** | Current orderbook ID. | [optional] -**trade_id** | **int** | Current trade ID. | [optional] -**trade_size** | **int** | Historical accumulated trade size. | [optional] -**position_size** | **int** | Current total long position size. | [optional] -**config_change_time** | **float** | Last changed time of configuration. | [optional] -**in_delisting** | **bool** | Contract is delisting. | [optional] -**orders_limit** | **int** | Maximum number of open orders. | [optional] +**name** | **str** | Futures contract | [optional] +**underlying** | **str** | Underlying | [optional] +**cycle** | **str** | Cycle type, e.g. WEEKLY, QUARTERLY | [optional] +**type** | **str** | Contract type: inverse - inverse contract, direct - direct contract | [optional] +**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] +**leverage_min** | **str** | Minimum leverage | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**maintenance_rate** | **str** | Maintenance rate of margin | [optional] +**mark_type** | **str** | Mark price type: internal - internal trading price, index - external index price | [optional] +**mark_price** | **str** | Current mark price | [optional] +**index_price** | **str** | Current index price | [optional] +**last_price** | **str** | Last trading price | [optional] +**maker_fee_rate** | **str** | Maker fee rate, negative values indicate rebates | [optional] +**taker_fee_rate** | **str** | Taker fee rate | [optional] +**order_price_round** | **str** | Minimum order price increment | [optional] +**mark_price_round** | **str** | Minimum mark price increment | [optional] +**basis_rate** | **str** | Fair basis rate | [optional] +**basis_value** | **str** | Fair basis value | [optional] +**basis_impact_value** | **str** | Funding used for calculating impact bid, ask price | [optional] +**settle_price** | **str** | Settle price | [optional] +**settle_price_interval** | **int** | Settle price update interval | [optional] +**settle_price_duration** | **int** | Settle price update duration in seconds | [optional] +**expire_time** | **int** | Contract expiry timestamp | [optional] +**risk_limit_base** | **str** | Risk limit base | [optional] +**risk_limit_step** | **str** | Step of adjusting risk limit | [optional] +**risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional] +**order_size_min** | **int** | Minimum order size allowed by the contract | [optional] +**order_size_max** | **int** | Maximum order size allowed by the contract | [optional] +**order_price_deviate** | **str** | Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional] +**ref_discount_rate** | **str** | Trading fee discount for referred users | [optional] +**ref_rebate_rate** | **str** | Commission rate for referrers | [optional] +**orderbook_id** | **int** | Orderbook update ID | [optional] +**trade_id** | **int** | Current trade ID | [optional] +**trade_size** | **int** | Historical cumulative trading volume | [optional] +**position_size** | **int** | Current total long position size | [optional] +**config_change_time** | **float** | Last configuration update time | [optional] +**in_delisting** | **bool** | Contract is delisting | [optional] +**orders_limit** | **int** | Maximum number of pending orders | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliverySettlement.md b/docs/DeliverySettlement.md index 6fb01e0..06a479a 100644 --- a/docs/DeliverySettlement.md +++ b/docs/DeliverySettlement.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time. | [optional] [readonly] -**contract** | **str** | Futures contract. | [optional] [readonly] -**leverage** | **str** | Position leverage. | [optional] [readonly] -**size** | **int** | Position size. | [optional] [readonly] -**margin** | **str** | Position margin. | [optional] [readonly] -**entry_price** | **str** | Average entry price. | [optional] [readonly] -**settle_price** | **str** | Settled price. | [optional] [readonly] -**profit** | **str** | Profit. | [optional] [readonly] -**fee** | **str** | Fee deducted. | [optional] [readonly] +**time** | **int** | Liquidation time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**leverage** | **str** | Position leverage | [optional] [readonly] +**size** | **int** | Position size | [optional] [readonly] +**margin** | **str** | Position margin | [optional] [readonly] +**entry_price** | **str** | Average entry price | [optional] [readonly] +**settle_price** | **str** | Settled price | [optional] [readonly] +**profit** | **str** | Profit | [optional] [readonly] +**fee** | **str** | Fee deducted | [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/DeliveryTicker.md b/docs/DeliveryTicker.md index 5f09c1b..b8de016 100644 --- a/docs/DeliveryTicker.md +++ b/docs/DeliveryTicker.md @@ -3,29 +3,29 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract. | [optional] -**last** | **str** | Last trading price. | [optional] -**change_percentage** | **str** | Change percentage. | [optional] -**total_size** | **str** | Contract total size. | [optional] -**low_24h** | **str** | Lowest trading price in recent 24h. | [optional] -**high_24h** | **str** | Highest trading price in recent 24h. | [optional] -**volume_24h** | **str** | Trade size in recent 24h. | [optional] -**volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency. | [optional] -**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency. | [optional] -**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency. | [optional] -**mark_price** | **str** | Recent mark price. | [optional] -**funding_rate** | **str** | Funding rate. | [optional] -**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`). | [optional] -**index_price** | **str** | Index price. | [optional] +**contract** | **str** | Futures contract | [optional] +**last** | **str** | Last trading price | [optional] +**change_percentage** | **str** | Price change percentage. Negative values indicate price decrease, e.g. -7.45 | [optional] +**total_size** | **str** | Contract total size | [optional] +**low_24h** | **str** | 24-hour lowest price | [optional] +**high_24h** | **str** | 24-hour highest price | [optional] +**volume_24h** | **str** | 24-hour trading volume | [optional] +**volume_24h_btc** | **str** | 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_usd** | **str** | 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_base** | **str** | 24-hour trading volume in base currency | [optional] +**volume_24h_quote** | **str** | 24-hour trading volume in quote currency | [optional] +**volume_24h_settle** | **str** | 24-hour trading volume in settle currency | [optional] +**mark_price** | **str** | Recent mark price | [optional] +**funding_rate** | **str** | Funding rate | [optional] +**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] +**index_price** | **str** | Index price | [optional] **quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] -**basis_rate** | **str** | Basis rate. | [optional] -**basis_value** | **str** | Basis value. | [optional] -**lowest_ask** | **str** | Recent lowest ask. | [optional] -**lowest_size** | **str** | The latest seller's lowest price order quantity. | [optional] -**highest_bid** | **str** | Recent highest bid. | [optional] -**highest_size** | **str** | The latest buyer's highest price order volume. | [optional] +**basis_rate** | **str** | Basis rate | [optional] +**basis_value** | **str** | Basis value | [optional] +**lowest_ask** | **str** | Recent lowest ask | [optional] +**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] +**highest_bid** | **str** | Recent highest bid | [optional] +**highest_size** | **str** | The latest buyer's highest price order volume | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DepositAddress.md b/docs/DepositAddress.md index 2d624ac..b28d7ec 100644 --- a/docs/DepositAddress.md +++ b/docs/DepositAddress.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail. | -**address** | **str** | Deposit address. | +**currency** | **str** | Currency detail | +**address** | **str** | Deposit address | **multichain_addresses** | [**list[MultiChainAddressItem]**](MultiChainAddressItem.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/DepositRecord.md b/docs/DepositRecord.md index 020bc4c..e5fa3b5 100644 --- a/docs/DepositRecord.md +++ b/docs/DepositRecord.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Record ID. | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal. | [optional] [readonly] +**id** | **str** | Record ID | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] **withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**timestamp** | **str** | Operation time. | [optional] [readonly] -**amount** | **str** | Currency amount. | -**currency** | **str** | Currency name. | -**address** | **str** | Withdrawal address. Required for withdrawals. | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal. | [optional] +**timestamp** | **str** | Operation time | [optional] [readonly] +**amount** | **str** | Token amount | +**currency** | **str** | Currency name | +**address** | **str** | Withdrawal address. Required for withdrawals | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] **status** | **str** | Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals. | +**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 cb08085..91f79de 100644 --- a/docs/DualGetOrders.md +++ b/docs/DualGetOrders.md @@ -3,23 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID. | [optional] -**plan_id** | **int** | Plan ID. | [optional] -**copies** | **str** | Copies. | [optional] -**invest_amount** | **str** | Investment Amount. | [optional] -**settlement_amount** | **str** | Settlement Amount. | [optional] -**create_time** | **int** | Creation time. | [optional] -**complete_time** | **int** | Completion Time. | [optional] -**status** | **str** | Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed | [optional] -**invest_currency** | **str** | Investment Currency. | [optional] -**exercise_currency** | **str** | Strike Currency. | [optional] -**exercise_price** | **str** | Strike price. | [optional] -**settlement_price** | **str** | settlement price. | [optional] -**settlement_currency** | **str** | Settle currency. | [optional] -**apy_display** | **str** | APY. | [optional] -**apy_settlement** | **str** | Settlement APY. | [optional] -**delivery_time** | **int** | Settlement time. | [optional] -**text** | **str** | Custom order information. | [optional] +**id** | **int** | Order ID | [optional] +**plan_id** | **int** | Product ID | [optional] +**copies** | **str** | Units | [optional] +**invest_amount** | **str** | Investment Quantity | [optional] +**settlement_amount** | **str** | Settlement Quantity | [optional] +**create_time** | **int** | Created time | [optional] +**complete_time** | **int** | Completed Time | [optional] +**status** | **str** | Status: `INIT`-Created `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-Settlement Processing `CANCELED`-Canceled `FAILED`-Failed | [optional] +**invest_currency** | **str** | Investment Token | [optional] +**exercise_currency** | **str** | Strike Token | [optional] +**exercise_price** | **str** | Strike price | [optional] +**settlement_price** | **str** | Settlement price | [optional] +**settlement_currency** | **str** | Settlement currency | [optional] +**apy_display** | **str** | Annual Yield | [optional] +**apy_settlement** | **str** | Settlement Annual Yield | [optional] +**delivery_time** | **int** | Settlement time | [optional] +**text** | **str** | Custom order information | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DualGetPlans.md b/docs/DualGetPlans.md index 1f893b6..53b3a58 100644 --- a/docs/DualGetPlans.md +++ b/docs/DualGetPlans.md @@ -3,19 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Plan ID. | [optional] -**instrument_name** | **str** | Instrument Name. | [optional] -**invest_currency** | **str** | Investment Currency. | [optional] -**exercise_currency** | **str** | Strike Currency. | [optional] -**exercise_price** | **float** | Strike price. | [optional] -**delivery_time** | **int** | Settlement time. | [optional] -**min_copies** | **int** | Minimum Copies. | [optional] -**max_copies** | **int** | Maximum Copies. | [optional] -**per_value** | **str** | Per Unit Value. | [optional] -**apy_display** | **str** | APY. | [optional] -**start_time** | **int** | start time. | [optional] -**end_time** | **int** | Finished time. | [optional] -**status** | **str** | Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-ended | [optional] +**id** | **int** | Product ID | [optional] +**instrument_name** | **str** | Product Name | [optional] +**invest_currency** | **str** | Investment Token | [optional] +**exercise_currency** | **str** | Strike Token | [optional] +**exercise_price** | **float** | Strike price | [optional] +**delivery_time** | **int** | Settlement time | [optional] +**min_copies** | **int** | Minimum Units | [optional] +**max_copies** | **int** | Maximum Units | [optional] +**per_value** | **str** | Value Per Unit | [optional] +**apy_display** | **str** | Annual Yield | [optional] +**start_time** | **int** | Start Time | [optional] +**end_time** | **int** | End time | [optional] +**status** | **str** | Status: `NOTSTARTED`-Not Started `ONGOING`-In Progress `ENDED`-Ended | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EarnApi.md b/docs/EarnApi.md index ae6b0c1..66e0d67 100644 --- a/docs/EarnApi.md +++ b/docs/EarnApi.md @@ -4,22 +4,22 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap. -[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query. -[**list_dual_investment_plans**](EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list. -[**list_dual_orders**](EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list. -[**place_dual_order**](EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order. -[**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List. -[**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List. -[**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order. -[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking Coins. -[**swap_staking_coin**](EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain Token Swap for Earned Coins. +[**swap_eth2**](EarnApi.md#swap_eth2) | **POST** /earn/staking/eth2/swap | ETH2 swap +[**rate_list_eth2**](EarnApi.md#rate_list_eth2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical return rate query +[**list_dual_investment_plans**](EarnApi.md#list_dual_investment_plans) | **GET** /earn/dual/investment_plan | Dual Investment product list +[**list_dual_orders**](EarnApi.md#list_dual_orders) | **GET** /earn/dual/orders | Dual Investment order list +[**place_dual_order**](EarnApi.md#place_dual_order) | **POST** /earn/dual/orders | Place Dual Investment order +[**list_structured_products**](EarnApi.md#list_structured_products) | **GET** /earn/structured/products | Structured Product List +[**list_structured_orders**](EarnApi.md#list_structured_orders) | **GET** /earn/structured/orders | Structured Product Order List +[**place_structured_order**](EarnApi.md#place_structured_order) | **POST** /earn/structured/orders | Place Structured Product Order +[**find_coin**](EarnApi.md#find_coin) | **GET** /earn/staking/coins | Staking coins +[**swap_staking_coin**](EarnApi.md#swap_staking_coin) | **POST** /earn/staking/swap | On-chain token swap for earned coins # **swap_eth2** > swap_eth2(eth2_swap) -ETH2 swap. +ETH2 swap ### Example @@ -48,7 +48,7 @@ api_instance = gate_api.EarnApi(api_client) eth2_swap = gate_api.Eth2Swap() # Eth2Swap | try: - # ETH2 swap. + # ETH2 swap api_instance.swap_eth2(eth2_swap) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -78,16 +78,16 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | swap success. | - | +**200** | Swap successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **rate_list_eth2** > list[Eth2RateList] rate_list_eth2() -ETH2 historical rate of return query. +ETH2 historical return rate query -Check the ETH earnings rate record for the last 31 days. +Query ETH earnings rate records for the last 31 days ### Example @@ -115,7 +115,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnApi(api_client) try: - # ETH2 historical rate of return query. + # ETH2 historical return rate query api_response = api_instance.rate_list_eth2() print(api_response) except GateApiException as ex: @@ -143,14 +143,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_dual_investment_plans** > list[DualGetPlans] list_dual_investment_plans(plan_id=plan_id) -Dual Investment product list. +Dual Investment product list ### Example @@ -167,10 +167,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -plan_id = 1 # int | Financial project id. (optional) +plan_id = 1 # int | Financial project ID (optional) try: - # Dual Investment product list. + # Dual Investment product list api_response = api_instance.list_dual_investment_plans(plan_id=plan_id) print(api_response) except GateApiException as ex: @@ -183,7 +183,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **plan_id** | **int**| Financial project id. | [optional] + **plan_id** | **int**| Financial project ID | [optional] ### Return type @@ -201,14 +201,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_dual_orders** > list[DualGetOrders] list_dual_orders(_from=_from, to=to, page=page, limit=limit) -Dual Investment order list. +Dual Investment order list ### Example @@ -234,13 +234,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnApi(api_client) -_from = 1740727000 # int | Start checkout time. (optional) -to = 1740729000 # int | End settlement time. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +_from = 1740727000 # int | Start settlement time (optional) +to = 1740729000 # int | End settlement time (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # Dual Investment order list. + # Dual Investment order list api_response = api_instance.list_dual_orders(_from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -253,10 +253,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start checkout time. | [optional] - **to** | **int**| End settlement time. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **_from** | **int**| Start settlement time | [optional] + **to** | **int**| End settlement time | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -274,14 +274,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **place_dual_order** > place_dual_order(place_dual_investment_order) -Place Dual Investment order. +Place Dual Investment order ### Example @@ -310,7 +310,7 @@ api_instance = gate_api.EarnApi(api_client) place_dual_investment_order = gate_api.PlaceDualInvestmentOrder() # PlaceDualInvestmentOrder | try: - # Place Dual Investment order. + # Place Dual Investment order api_instance.place_dual_order(place_dual_investment_order) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -340,14 +340,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Order placed successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_structured_products** > list[StructuredGetProjectList] list_structured_products(status, type=type, page=page, limit=limit) -Structured Product List. +Structured Product List ### Example @@ -366,11 +366,11 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnApi(api_client) status = 'in_process' # str | Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed type = 'BullishSharkFin' # str | Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # Structured Product List. + # Structured Product List api_response = api_instance.list_structured_products(status, type=type, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -385,8 +385,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **status** | **str**| Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed | **type** | **str**| Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -404,14 +404,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_structured_orders** > list[StructuredOrderList] list_structured_orders(_from=_from, to=to, page=page, limit=limit) -Structured Product Order List. +Structured Product Order List ### Example @@ -439,11 +439,11 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnApi(api_client) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # Structured Product Order List. + # Structured Product Order List api_response = api_instance.list_structured_orders(_from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -458,8 +458,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -477,14 +477,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **place_structured_order** > place_structured_order(structured_buy) -Place Structured Product Order. +Place Structured Product Order ### Example @@ -513,7 +513,7 @@ api_instance = gate_api.EarnApi(api_client) structured_buy = gate_api.StructuredBuy() # StructuredBuy | try: - # Place Structured Product Order. + # Place Structured Product Order api_instance.place_structured_order(structured_buy) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -543,14 +543,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Order placed successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **find_coin** > list[str] find_coin(find_coin) -Staking Coins. +Staking coins ### Example @@ -579,7 +579,7 @@ api_instance = gate_api.EarnApi(api_client) find_coin = gate_api.FindCoin() # FindCoin | try: - # Staking Coins. + # Staking coins api_response = api_instance.find_coin(find_coin) print(api_response) except GateApiException as ex: @@ -610,14 +610,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **swap_staking_coin** > SwapCoinStruct swap_staking_coin(swap_coin) -On-chain Token Swap for Earned Coins. +On-chain token swap for earned coins ### Example @@ -646,7 +646,7 @@ api_instance = gate_api.EarnApi(api_client) swap_coin = gate_api.SwapCoin() # SwapCoin | try: - # On-chain Token Swap for Earned Coins. + # On-chain token swap for earned coins api_response = api_instance.swap_staking_coin(swap_coin) print(api_response) except GateApiException as ex: @@ -677,7 +677,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | swap success. | - | +**200** | Swap successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md index 5dfa439..5128e5d 100644 --- a/docs/EarnUniApi.md +++ b/docs/EarnUniApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | List currencies for lending. -[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending. -[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | List user's lending orders. -[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Lend or redeem. -[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend lending order. -[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | List records of lending. -[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Get the user's total interest income of specified currency. -[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | List interest records. -[**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status. -[**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart. -[**list_uni_rate**](EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimate annualized interest rate. +[**list_uni_currencies**](EarnUniApi.md#list_uni_currencies) | **GET** /earn/uni/currencies | Query lending currency list +[**get_uni_currency**](EarnUniApi.md#get_uni_currency) | **GET** /earn/uni/currencies/{currency} | Query single lending currency details +[**list_user_uni_lends**](EarnUniApi.md#list_user_uni_lends) | **GET** /earn/uni/lends | Query user's lending order list +[**create_uni_lend**](EarnUniApi.md#create_uni_lend) | **POST** /earn/uni/lends | Create lending or redemption +[**change_uni_lend**](EarnUniApi.md#change_uni_lend) | **PATCH** /earn/uni/lends | Amend user lending information +[**list_uni_lend_records**](EarnUniApi.md#list_uni_lend_records) | **GET** /earn/uni/lend_records | Query lending transaction records +[**get_uni_interest**](EarnUniApi.md#get_uni_interest) | **GET** /earn/uni/interests/{currency} | Query user's total interest income for specified currency +[**list_uni_interest_records**](EarnUniApi.md#list_uni_interest_records) | **GET** /earn/uni/interest_records | Query user dividend records +[**get_uni_interest_status**](EarnUniApi.md#get_uni_interest_status) | **GET** /earn/uni/interest_status/{currency} | Query currency interest compounding status +[**list_uni_chart**](EarnUniApi.md#list_uni_chart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart +[**list_uni_rate**](EarnUniApi.md#list_uni_rate) | **GET** /earn/uni/rate | Currency estimated annualized interest rate # **list_uni_currencies** > list[UniCurrency] list_uni_currencies() -List currencies for lending. +Query lending currency list ### Example @@ -39,7 +39,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnUniApi(api_client) try: - # List currencies for lending. + # Query lending currency list api_response = api_instance.list_uni_currencies() print(api_response) except GateApiException as ex: @@ -67,14 +67,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_currency** > UniCurrency get_uni_currency(currency) -Get currency detail for lending. +Query single lending currency details ### Example @@ -91,10 +91,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency. +currency = 'btc' # str | Currency try: - # Get currency detail for lending. + # Query single lending currency details api_response = api_instance.get_uni_currency(currency) print(api_response) except GateApiException as ex: @@ -107,7 +107,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | + **currency** | **str**| Currency | ### Return type @@ -125,14 +125,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_user_uni_lends** > list[UniLend] list_user_uni_lends(currency=currency, page=page, limit=limit) -List user's lending orders. +Query user's lending order list ### Example @@ -158,12 +158,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) try: - # List user's lending orders. + # Query user's lending order list api_response = api_instance.list_user_uni_lends(currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -176,9 +176,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] ### Return type @@ -196,14 +196,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_uni_lend** > create_uni_lend(create_uni_lend) -Lend or redeem. +Create lending or redemption Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. @@ -234,7 +234,7 @@ api_instance = gate_api.EarnUniApi(api_client) create_uni_lend = gate_api.CreateUniLend() # CreateUniLend | try: - # Lend or redeem. + # Create lending or redemption api_instance.create_uni_lend(create_uni_lend) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -264,16 +264,16 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully. | - | +**204** | Operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **change_uni_lend** > change_uni_lend(patch_uni_lend) -Amend lending order. +Amend user lending information -Currently only supports amending the minimum interest rate (hour). +Currently only supports amending minimum interest rate (hourly) ### Example @@ -302,7 +302,7 @@ api_instance = gate_api.EarnUniApi(api_client) patch_uni_lend = gate_api.PatchUniLend() # PatchUniLend | try: - # Amend lending order. + # Amend user lending information api_instance.change_uni_lend(patch_uni_lend) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -332,14 +332,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Updated. | - | +**204** | Updated successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_lend_records** > list[UniLendRecord] list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) -List records of lending. +Query lending transaction records ### Example @@ -365,15 +365,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -type = 'lend' # str | type: lend - lend, redeem - redeem. (optional) +type = 'lend' # str | Operation type: lend - Lend, redeem - Redeem (optional) try: - # List records of lending. + # Query lending transaction records api_response = api_instance.list_uni_lend_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -386,12 +386,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **type** | **str**| type: lend - lend, redeem - redeem. | [optional] + **type** | **str**| Operation type: lend - Lend, redeem - Redeem | [optional] ### Return type @@ -409,14 +409,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_interest** > UniLendInterest get_uni_interest(currency) -Get the user's total interest income of specified currency. +Query user's total interest income for specified currency ### Example @@ -442,10 +442,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency. +currency = 'btc' # str | Currency try: - # Get the user's total interest income of specified currency. + # Query user's total interest income for specified currency api_response = api_instance.get_uni_interest(currency) print(api_response) except GateApiException as ex: @@ -458,7 +458,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | + **currency** | **str**| Currency | ### Return type @@ -476,14 +476,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_interest_records** > list[UniInterestRecord] list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) -List interest records. +Query user dividend records ### Example @@ -509,14 +509,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List interest records. + # Query user dividend records api_response = api_instance.list_uni_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -529,9 +529,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -551,14 +551,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_interest_status** > UniCurrencyInterest get_uni_interest_status(currency) -query currency interest compounding status. +Query currency interest compounding status ### Example @@ -584,10 +584,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -currency = 'btc' # str | Currency. +currency = 'btc' # str | Currency try: - # query currency interest compounding status. + # Query currency interest compounding status api_response = api_instance.get_uni_interest_status(currency) print(api_response) except GateApiException as ex: @@ -600,7 +600,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | + **currency** | **str**| Currency | ### Return type @@ -618,14 +618,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_chart** > list[InlineResponse200] list_uni_chart(_from, to, asset) -UniLoan currency annualized trend chart. +UniLoan currency annualized trend chart Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 @@ -653,12 +653,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.EarnUniApi(api_client) -_from = 1719763200 # int | Start timestamp, unit s, maximum span of 30 days. -to = 1722441600 # int | End timestamp, unit s, maximum span of 30 days. -asset = 'BTC' # str | Currency name. +_from = 1719763200 # int | Start timestamp in seconds, maximum span 30 days +to = 1722441600 # int | End timestamp in seconds, maximum span 30 days +asset = 'BTC' # str | Currency name try: - # UniLoan currency annualized trend chart. + # UniLoan currency annualized trend chart api_response = api_instance.list_uni_chart(_from, to, asset) print(api_response) except GateApiException as ex: @@ -671,9 +671,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_from** | **int**| Start timestamp, unit s, maximum span of 30 days. | - **to** | **int**| End timestamp, unit s, maximum span of 30 days. | - **asset** | **str**| Currency name. | + **_from** | **int**| Start timestamp in seconds, maximum span 30 days | + **to** | **int**| End timestamp in seconds, maximum span 30 days | + **asset** | **str**| Currency name | ### Return type @@ -698,7 +698,7 @@ Name | Type | Description | Notes # **list_uni_rate** > list[InlineResponse2001] list_uni_rate() -Currency estimate annualized interest rate. +Currency estimated annualized interest rate Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 @@ -728,7 +728,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.EarnUniApi(api_client) try: - # Currency estimate annualized interest rate. + # Currency estimated annualized interest rate api_response = api_instance.list_uni_rate() print(api_response) except GateApiException as ex: diff --git a/docs/Eth2RateList.md b/docs/Eth2RateList.md index 9cf6772..574d27a 100644 --- a/docs/Eth2RateList.md +++ b/docs/Eth2RateList.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date_time** | **int** | Date and Time Stamp. | [optional] -**date** | **str** | Date. | [optional] -**rate** | **str** | percentage. | [optional] +**date_time** | **int** | Date Timestamp | [optional] +**date** | **str** | Date | [optional] +**rate** | **str** | Percentage Rate | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Eth2Swap.md b/docs/Eth2Swap.md index a7eb910..31c2116 100644 --- a/docs/Eth2Swap.md +++ b/docs/Eth2Swap.md @@ -1,11 +1,11 @@ # Eth2Swap -ETH2 Staking. +ETH2 Mining ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**side** | **str** | 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH). | -**amount** | **str** | amount. | +**side** | **str** | 1-Forward Swap (ETH -> ETH2), 2-Reverse Swap (ETH2 -> ETH) | +**amount** | **str** | Swap Amount | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FindCoin.md b/docs/FindCoin.md index 3aa2fdf..6895a4d 100644 --- a/docs/FindCoin.md +++ b/docs/FindCoin.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**coin** | **str** | Currency. | [optional] -**cointype** | **str** | Coin Type swap-Voucher lock-Locked. | [optional] +**coin** | **str** | Currency | [optional] +**cointype** | **str** | Token Type: swap-Voucher, lock-Locked | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapApi.md b/docs/FlashSwapApi.md index 93ee6f6..39fd84a 100644 --- a/docs/FlashSwapApi.md +++ b/docs/FlashSwapApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_flash_swap_currency_pair**](FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap. -[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | List all flash swap orders. -[**create_flash_swap_order**](FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order. -[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Get a single flash swap order's detail. -[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Initiate a flash swap order preview. +[**list_flash_swap_currency_pair**](FlashSwapApi.md#list_flash_swap_currency_pair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap +[**list_flash_swap_orders**](FlashSwapApi.md#list_flash_swap_orders) | **GET** /flash_swap/orders | Query flash swap order list +[**create_flash_swap_order**](FlashSwapApi.md#create_flash_swap_order) | **POST** /flash_swap/orders | Create a flash swap order +[**get_flash_swap_order**](FlashSwapApi.md#get_flash_swap_order) | **GET** /flash_swap/orders/{order_id} | Query single flash swap order +[**preview_flash_swap_order**](FlashSwapApi.md#preview_flash_swap_order) | **POST** /flash_swap/orders/preview | Flash swap order preview # **list_flash_swap_currency_pair** > list[FlashSwapCurrencyPair] list_flash_swap_currency_pair(currency=currency, page=page, limit=limit) -List All Supported Currency Pairs In Flash Swap. +List All Supported Currency Pairs In Flash Swap `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. @@ -33,12 +33,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FlashSwapApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 1000 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 1000. (optional) (default to 1000) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 1000 # int | Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000 (optional) (default to 1000) try: - # List All Supported Currency Pairs In Flash Swap. + # List All Supported Currency Pairs In Flash Swap api_response = api_instance.list_flash_swap_currency_pair(currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -51,9 +51,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 1000. | [optional] [default to 1000] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000 | [optional] [default to 1000] ### Return type @@ -71,14 +71,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_flash_swap_orders** > list[FlashSwapOrder] list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) -List all flash swap orders. +Query flash swap order list ### Example @@ -104,15 +104,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FlashSwapApi(api_client) -status = 1 # int | Flash swap order status `1` - success `2` - failure (optional) -sell_currency = 'BTC' # str | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) -buy_currency = 'BTC' # str | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` (optional) -reverse = true # bool | If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -page = 1 # int | Page number. (optional) (default to 1) +status = 1 # int | Flash swap order status `1` - success `2` - failed (optional) +sell_currency = 'BTC' # str | Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies (optional) +buy_currency = 'BTC' # str | Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies (optional) +reverse = true # bool | Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first) (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) try: - # List all flash swap orders. + # Query flash swap order list api_response = api_instance.list_flash_swap_orders(status=status, sell_currency=sell_currency, buy_currency=buy_currency, reverse=reverse, limit=limit, page=page) print(api_response) except GateApiException as ex: @@ -125,12 +125,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **int**| Flash swap order status `1` - success `2` - failure | [optional] - **sell_currency** | **str**| Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] - **buy_currency** | **str**| Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [optional] - **reverse** | **bool**| If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **page** | **int**| Page number. | [optional] [default to 1] + **status** | **int**| Flash swap order status `1` - success `2` - failed | [optional] + **sell_currency** | **str**| Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies | [optional] + **buy_currency** | **str**| Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies | [optional] + **reverse** | **bool**| Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first) | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] ### Return type @@ -148,14 +148,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_flash_swap_order** > FlashSwapOrder create_flash_swap_order(flash_swap_order_request) -Create a flash swap order. +Create a flash swap order Initiate a flash swap preview in advance because order creation requires a preview result @@ -186,7 +186,7 @@ api_instance = gate_api.FlashSwapApi(api_client) flash_swap_order_request = gate_api.FlashSwapOrderRequest() # FlashSwapOrderRequest | try: - # Create a flash swap order. + # Create a flash swap order api_response = api_instance.create_flash_swap_order(flash_swap_order_request) print(api_response) except GateApiException as ex: @@ -217,14 +217,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | The flash swap order is created successfully. | - | +**201** | Flash swap order created successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_flash_swap_order** > FlashSwapOrder get_flash_swap_order(order_id) -Get a single flash swap order's detail. +Query single flash swap order ### Example @@ -250,10 +250,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FlashSwapApi(api_client) -order_id = 1 # int | Flash swap order ID. +order_id = 1 # int | Flash swap order ID try: - # Get a single flash swap order's detail. + # Query single flash swap order api_response = api_instance.get_flash_swap_order(order_id) print(api_response) except GateApiException as ex: @@ -266,7 +266,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Flash swap order ID. | + **order_id** | **int**| Flash swap order ID | ### Return type @@ -284,14 +284,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **preview_flash_swap_order** > FlashSwapOrderPreview preview_flash_swap_order(flash_swap_preview_request) -Initiate a flash swap order preview. +Flash swap order preview ### Example @@ -320,7 +320,7 @@ api_instance = gate_api.FlashSwapApi(api_client) flash_swap_preview_request = gate_api.FlashSwapPreviewRequest() # FlashSwapPreviewRequest | try: - # Initiate a flash swap order preview. + # Flash swap order preview api_response = api_instance.preview_flash_swap_order(flash_swap_preview_request) print(api_response) except GateApiException as ex: @@ -351,7 +351,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The flash swap order successfully previewed. | - | +**200** | Flash swap order preview successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/FlashSwapCurrencyPair.md b/docs/FlashSwapCurrencyPair.md index 8b9ad7a..28eacbc 100644 --- a/docs/FlashSwapCurrencyPair.md +++ b/docs/FlashSwapCurrencyPair.md @@ -1,16 +1,16 @@ # FlashSwapCurrencyPair -List all supported currencies in flash swap. +List all supported currencies in flash swap ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). | [optional] [readonly] -**sell_currency** | **str** | The currency to be sold. | [optional] [readonly] -**buy_currency** | **str** | The currency to be bought. | [optional] [readonly] -**sell_min_amount** | **str** | The minimum quantity required for selling. | [optional] [readonly] -**sell_max_amount** | **str** | The maximum quantity allowed for selling. | [optional] [readonly] -**buy_min_amount** | **str** | The minimum quantity required for buying. | [optional] [readonly] -**buy_max_amount** | **str** | The maximum quantity allowed for buying. | [optional] [readonly] +**currency_pair** | **str** | Currency pair, `BTC_USDT` represents selling `BTC` and buying `USDT` | [optional] [readonly] +**sell_currency** | **str** | Currency to sell | [optional] [readonly] +**buy_currency** | **str** | Currency to buy | [optional] [readonly] +**sell_min_amount** | **str** | Minimum sell quantity | [optional] [readonly] +**sell_max_amount** | **str** | Maximum sell quantity | [optional] [readonly] +**buy_min_amount** | **str** | Minimum buy quantity | [optional] [readonly] +**buy_max_amount** | **str** | Maximum buy quantity | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapOrder.md b/docs/FlashSwapOrder.md index 1de23b8..bde41a4 100644 --- a/docs/FlashSwapOrder.md +++ b/docs/FlashSwapOrder.md @@ -1,17 +1,17 @@ # FlashSwapOrder -Flash swap order. +Flash swap order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Flash swap order ID. | [optional] [readonly] -**create_time** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] -**user_id** | **int** | User ID. | [optional] [readonly] -**sell_currency** | **str** | Currency to sell. | [optional] [readonly] -**sell_amount** | **str** | Amount to sell. | [optional] [readonly] -**buy_currency** | **str** | Currency to buy. | [optional] [readonly] -**buy_amount** | **str** | Amount to buy. | [optional] [readonly] -**price** | **str** | Price. | [optional] [readonly] +**id** | **int** | Flash swap order ID | [optional] [readonly] +**create_time** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**user_id** | **int** | User ID | [optional] [readonly] +**sell_currency** | **str** | Currency to sell | [optional] [readonly] +**sell_amount** | **str** | Amount to sell | [optional] [readonly] +**buy_currency** | **str** | Currency to buy | [optional] [readonly] +**buy_amount** | **str** | Amount to buy | [optional] [readonly] +**price** | **str** | Price | [optional] [readonly] **status** | **int** | Flash swap order status `1` - success `2` - failure | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapOrderPreview.md b/docs/FlashSwapOrderPreview.md index e501402..4ee4133 100644 --- a/docs/FlashSwapOrderPreview.md +++ b/docs/FlashSwapOrderPreview.md @@ -1,15 +1,15 @@ # FlashSwapOrderPreview -Initiate a flash swap order preview. +Flash swap order preview ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**preview_id** | **str** | Preview result ID. | [optional] +**preview_id** | **str** | Preview result ID | [optional] **sell_currency** | **str** | Name of the sold asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional] -**sell_amount** | **str** | Amount to sell. | [optional] +**sell_amount** | **str** | Amount to sell | [optional] **buy_currency** | **str** | Name of the purchased asset, Refer to the interface Query the list of currencies supported for flash swap GET /flash_swap/currenciesto obtain | [optional] -**buy_amount** | **str** | Amount to buy. | [optional] -**price** | **str** | Price. | [optional] +**buy_amount** | **str** | Amount to buy | [optional] +**price** | **str** | 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/FlashSwapOrderRequest.md b/docs/FlashSwapOrderRequest.md index 44ea215..aea0466 100644 --- a/docs/FlashSwapOrderRequest.md +++ b/docs/FlashSwapOrderRequest.md @@ -1,14 +1,14 @@ # FlashSwapOrderRequest -Parameters of flash swap order creation. +Parameters of flash swap order creation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**preview_id** | **str** | Preview result ID. | +**preview_id** | **str** | Preview result ID | **sell_currency** | **str** | Name of the asset to be sold, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap | -**sell_amount** | **str** | Amount to sell (based on the preview result). | +**sell_amount** | **str** | Amount to sell (based on the preview result) | **buy_currency** | **str** | Name of the asset to be bought, obtained from the interface GET /flash_swap/currency_pairs: Query the list of all trading pairs supporting flash swap | -**buy_amount** | **str** | Amount to buy (based on the preview result). | +**buy_amount** | **str** | Amount to buy (based on the preview result) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlashSwapPreviewRequest.md b/docs/FlashSwapPreviewRequest.md index 47d59e6..3a45a36 100644 --- a/docs/FlashSwapPreviewRequest.md +++ b/docs/FlashSwapPreviewRequest.md @@ -1,12 +1,12 @@ # FlashSwapPreviewRequest -Parameters of flash swap order creation. +Parameters of flash swap order creation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. | +**sell_currency** | **str** | The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs | **sell_amount** | **str** | Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] -**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. | +**buy_currency** | **str** | The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs | **buy_amount** | **str** | Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FundingAccount.md b/docs/FundingAccount.md index a1a4e84..f84f8fe 100644 --- a/docs/FundingAccount.md +++ b/docs/FundingAccount.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] -**available** | **str** | Available assets to lend, which is identical to spot account `available`. | [optional] -**locked** | **str** | Locked amount. i.e. amount in `open` loans. | [optional] -**lent** | **str** | Outstanding loan amount yet to be repaid. | [optional] -**total_lent** | **str** | Amount used for lending. total_lent = lent + locked. | [optional] +**currency** | **str** | Currency name | [optional] +**available** | **str** | Available assets to lend, which is identical to spot account `available` | [optional] +**locked** | **str** | Locked amount. i.e. amount in `open` loans | [optional] +**lent** | **str** | Outstanding loan amount yet to be repaid | [optional] +**total_lent** | **str** | Amount used for lending. total_lent = lent + locked | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FundingRateRecord.md b/docs/FundingRateRecord.md index 19961eb..add60cd 100644 --- a/docs/FundingRateRecord.md +++ b/docs/FundingRateRecord.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **int** | Unix timestamp in seconds. | [optional] -**r** | **str** | Funding rate. | [optional] +**t** | **int** | Unix timestamp in seconds | [optional] +**r** | **str** | Funding 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/FutureCancelOrderResult.md b/docs/FutureCancelOrderResult.md index b4b0be4..865d529 100644 --- a/docs/FutureCancelOrderResult.md +++ b/docs/FutureCancelOrderResult.md @@ -1,13 +1,13 @@ # FutureCancelOrderResult -Order cancellation result. +Order cancellation result ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID. | [optional] -**user_id** | **int** | User ID. | [optional] -**succeeded** | **bool** | Whether cancellation succeeded. | [optional] -**message** | **str** | Error message when failed to cancel the order; empty if succeeded. | [optional] +**id** | **str** | Order ID | [optional] +**user_id** | **int** | User ID | [optional] +**succeeded** | **bool** | Whether cancellation succeeded | [optional] +**message** | **str** | Error description when cancellation fails, empty if successful | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md index c8851c7..c99c403 100644 --- a/docs/FuturesAccount.md +++ b/docs/FuturesAccount.md @@ -4,30 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | **str** | total is the balance after the user's accumulated deposit, withdraw, profit and loss (including realized profit and loss, fund, fee and referral rebate), excluding unrealized profit and loss. total = SUM(history_dnw, history_pnl, history_fee, history_refr, history_fund) | [optional] -**unrealised_pnl** | **str** | Unrealized PNL. | [optional] -**position_margin** | **str** | Position margin. | [optional] -**order_margin** | **str** | Order margin of unfinished orders. | [optional] -**available** | **str** | The available balance for transferring or trading(including bonus. Bonus can't be withdrawn. The transfer amount needs to deduct the bonus) | [optional] -**point** | **str** | POINT amount. | [optional] -**currency** | **str** | Settle currency. | [optional] -**in_dual_mode** | **bool** | Whether dual mode is enabled. | [optional] -**enable_credit** | **bool** | Whether portfolio margin account mode is enabled. | [optional] -**position_initial_margin** | **str** | Initial margin position, applicable to the portfolio margin account model. | [optional] -**maintenance_margin** | **str** | The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model | [optional] -**bonus** | **str** | Perpetual Contract Bonus. | [optional] -**enable_evolved_classic** | **bool** | Classic account margin mode, true-new mode, false-old mode. | [optional] -**cross_order_margin** | **str** | Full -warehouse hanging order deposit, suitable for the new classic account margin model | [optional] -**cross_initial_margin** | **str** | The initial security deposit of the full warehouse is suitable for the new classic account margin model | [optional] -**cross_maintenance_margin** | **str** | Maintain deposit in full warehouse, suitable for new classic account margin models | [optional] -**cross_unrealised_pnl** | **str** | The full warehouse does not achieve profit and loss, suitable for the new classic account margin model | [optional] -**cross_available** | **str** | Full warehouse available amount, suitable for the new classic account margin model | [optional] -**cross_margin_balance** | **str** | Full margin balance, suitable for the new classic account margin model. | [optional] -**cross_mmr** | **str** | Maintain margin ratio for the full position, suitable for the new classic account margin model | [optional] -**cross_imr** | **str** | The initial margin rate of the full position is suitable for the new classic account margin model | [optional] -**isolated_position_margin** | **str** | Ware -position margin, suitable for the new classic account margin model. | [optional] -**enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode. | [optional] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] +**position_margin** | **str** | Position margin | [optional] +**order_margin** | **str** | Order margin of unfinished orders | [optional] +**available** | **str** | Available balance for transferring or trading (including bonus. Bonus cannot be withdrawn, so transfer amount needs to deduct bonus) | [optional] +**point** | **str** | Point card amount | [optional] +**currency** | **str** | Settlement currency | [optional] +**in_dual_mode** | **bool** | Whether dual mode is enabled | [optional] +**enable_credit** | **bool** | Whether portfolio margin account mode is enabled | [optional] +**position_initial_margin** | **str** | Initial margin occupied by positions, applicable to unified account mode | [optional] +**maintenance_margin** | **str** | Maintenance margin occupied by positions, applicable to new classic account margin mode and unified account mode | [optional] +**bonus** | **str** | Bonus | [optional] +**enable_evolved_classic** | **bool** | Classic account margin mode, true-new mode, false-old mode | [optional] +**cross_order_margin** | **str** | Cross margin order margin, applicable to new classic account margin mode | [optional] +**cross_initial_margin** | **str** | Cross margin initial margin, applicable to new classic account margin mode | [optional] +**cross_maintenance_margin** | **str** | Cross margin maintenance margin, applicable to new classic account margin mode | [optional] +**cross_unrealised_pnl** | **str** | Cross margin unrealized P&L, applicable to new classic account margin mode | [optional] +**cross_available** | **str** | Cross margin available balance, applicable to new classic account margin mode | [optional] +**cross_margin_balance** | **str** | Cross margin balance, applicable to new classic account margin mode | [optional] +**cross_mmr** | **str** | Cross margin maintenance margin rate, applicable to new classic account margin mode | [optional] +**cross_imr** | **str** | Cross margin initial margin rate, applicable to new classic account margin mode | [optional] +**isolated_position_margin** | **str** | Isolated position margin, applicable to new classic account margin mode | [optional] +**enable_new_dual_mode** | **bool** | Whether to open a new two-way position mode | [optional] **margin_mode** | **int** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional] -**enable_tiered_mm** | **bool** | Whether to enable tiered maintenance margin calculation. | [optional] +**enable_tiered_mm** | **bool** | Whether to enable tiered maintenance margin calculation | [optional] **history** | [**FuturesAccountHistory**](FuturesAccountHistory.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccountBook.md b/docs/FuturesAccountBook.md index 3ee9fc8..1c1f738 100644 --- a/docs/FuturesAccountBook.md +++ b/docs/FuturesAccountBook.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Change time. | [optional] -**change** | **str** | Change amount. | [optional] -**balance** | **str** | Balance after change. | [optional] +**time** | **float** | Change time | [optional] +**change** | **str** | Change amount | [optional] +**balance** | **str** | Balance after change | [optional] **type** | **str** | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] -**text** | **str** | Comment. | [optional] -**contract** | **str** | Futures contract, the field is only available for data after 2023-10-30. | [optional] -**trade_id** | **str** | trade id. | [optional] -**id** | **str** | Account change record ID. | [optional] +**text** | **str** | Comment | [optional] +**contract** | **str** | Futures contract, the field is only available for data after 2023-10-30 | [optional] +**trade_id** | **str** | trade id | [optional] +**id** | **str** | Account change record ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccountHistory.md b/docs/FuturesAccountHistory.md index 04e343f..202fdc6 100644 --- a/docs/FuturesAccountHistory.md +++ b/docs/FuturesAccountHistory.md @@ -1,19 +1,19 @@ # FuturesAccountHistory -Statistical data. +Statistical data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dnw** | **str** | total amount of deposit and withdraw. | [optional] -**pnl** | **str** | total amount of trading profit and loss. | [optional] -**fee** | **str** | total amount of fee. | [optional] -**refr** | **str** | total amount of referrer rebates. | [optional] -**fund** | **str** | total amount of funding costs. | [optional] -**point_dnw** | **str** | total amount of point deposit and withdraw. | [optional] -**point_fee** | **str** | total amount of point fee. | [optional] -**point_refr** | **str** | total amount of referrer rebates of point fee. | [optional] -**bonus_dnw** | **str** | total amount of perpetual contract bonus transfer. | [optional] -**bonus_offset** | **str** | total amount of perpetual contract bonus deduction. | [optional] +**dnw** | **str** | total amount of deposit and withdraw | [optional] +**pnl** | **str** | total amount of trading profit and loss | [optional] +**fee** | **str** | total amount of fee | [optional] +**refr** | **str** | total amount of referrer rebates | [optional] +**fund** | **str** | total amount of funding costs | [optional] +**point_dnw** | **str** | total amount of point deposit and withdraw | [optional] +**point_fee** | **str** | total amount of point fee | [optional] +**point_refr** | **str** | total amount of referrer rebates of point fee | [optional] +**bonus_dnw** | **str** | total amount of perpetual contract bonus transfer | [optional] +**bonus_offset** | **str** | total amount of perpetual contract bonus deduction | [optional] [[Back to Model list]](../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 8b7359b..5756618 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -4,62 +4,62 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | List all futures contracts. -[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Get a single contract. -[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Futures order book. -[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures trading history. -[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Get futures candlesticks. -[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-Line. -[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | List futures tickers. -[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Funding rate history. -[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures insurance balance history. -[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures stats. -[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Get index constituents. -[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Retrieve liquidation history. -[**list_futures_risk_limit_tiers**](FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | List risk limit tiers. -[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Query futures account. -[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query account book. -[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | List all positions of a user. -[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position. -[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin. -[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage. -[**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode. -[**update_dual_comp_position_cross_mode**](FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | 双仓模式下切换全逐仓模式 -[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit. -[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode. -[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode. -[**update_dual_mode_position_margin**](FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode. -[**update_dual_mode_position_leverage**](FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode. -[**update_dual_mode_position_risk_limit**](FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode. -[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | List futures orders. -[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Create a futures order. -[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all `open` orders matched. -[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | List Futures Orders By Time Range. -[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Create a batch of futures orders. -[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Get a single order. -[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend an order. -[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel a single order. -[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | List personal trading history. -[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | List personal trading history by time range. -[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | List position close history. -[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | List liquidation history. -[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | List Auto-Deleveraging History. -[**countdown_cancel_all_futures**](FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders. -[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query user trading fee rates. -[**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list. -[**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs. -[**get_futures_risk_limit_table**](FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id. -[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | List All Price-triggered Orders. -[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create a price-triggered order. -[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel All Price-triggered Orders. -[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order. -[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order. +[**list_futures_contracts**](FuturesApi.md#list_futures_contracts) | **GET** /futures/{settle}/contracts | Query all futures contracts +[**get_futures_contract**](FuturesApi.md#get_futures_contract) | **GET** /futures/{settle}/contracts/{contract} | Query single contract information +[**list_futures_order_book**](FuturesApi.md#list_futures_order_book) | **GET** /futures/{settle}/order_book | Query futures market depth information +[**list_futures_trades**](FuturesApi.md#list_futures_trades) | **GET** /futures/{settle}/trades | Futures market transaction records +[**list_futures_candlesticks**](FuturesApi.md#list_futures_candlesticks) | **GET** /futures/{settle}/candlesticks | Futures market K-line chart +[**list_futures_premium_index**](FuturesApi.md#list_futures_premium_index) | **GET** /futures/{settle}/premium_index | Premium Index K-line chart +[**list_futures_tickers**](FuturesApi.md#list_futures_tickers) | **GET** /futures/{settle}/tickers | Get all futures trading statistics +[**list_futures_funding_rate_history**](FuturesApi.md#list_futures_funding_rate_history) | **GET** /futures/{settle}/funding_rate | Futures market historical funding rate +[**list_futures_insurance_ledger**](FuturesApi.md#list_futures_insurance_ledger) | **GET** /futures/{settle}/insurance | Futures market insurance fund history +[**list_contract_stats**](FuturesApi.md#list_contract_stats) | **GET** /futures/{settle}/contract_stats | Futures statistics +[**get_index_constituents**](FuturesApi.md#get_index_constituents) | **GET** /futures/{settle}/index_constituents/{index} | Query index constituents +[**list_liquidated_orders**](FuturesApi.md#list_liquidated_orders) | **GET** /futures/{settle}/liq_orders | Query liquidation order history +[**list_futures_risk_limit_tiers**](FuturesApi.md#list_futures_risk_limit_tiers) | **GET** /futures/{settle}/risk_limit_tiers | Query risk limit tiers +[**list_futures_accounts**](FuturesApi.md#list_futures_accounts) | **GET** /futures/{settle}/accounts | Get futures account +[**list_futures_account_book**](FuturesApi.md#list_futures_account_book) | **GET** /futures/{settle}/account_book | Query futures account change history +[**list_positions**](FuturesApi.md#list_positions) | **GET** /futures/{settle}/positions | Get user position list +[**get_position**](FuturesApi.md#get_position) | **GET** /futures/{settle}/positions/{contract} | Get single position information +[**update_position_margin**](FuturesApi.md#update_position_margin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin +[**update_position_leverage**](FuturesApi.md#update_position_leverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage +[**update_position_cross_mode**](FuturesApi.md#update_position_cross_mode) | **POST** /futures/{settle}/positions/cross_mode | Switch Position Margin Mode +[**update_dual_comp_position_cross_mode**](FuturesApi.md#update_dual_comp_position_cross_mode) | **POST** /futures/{settle}/dual_comp/positions/cross_mode | Switch Between Cross and Isolated Margin Modes Under Hedge Mode +[**update_position_risk_limit**](FuturesApi.md#update_position_risk_limit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit +[**set_dual_mode**](FuturesApi.md#set_dual_mode) | **POST** /futures/{settle}/dual_mode | Set position mode +[**get_dual_mode_position**](FuturesApi.md#get_dual_mode_position) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Get position information in dual mode +[**update_dual_mode_position_margin**](FuturesApi.md#update_dual_mode_position_margin) | **POST** /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in dual mode +[**update_dual_mode_position_leverage**](FuturesApi.md#update_dual_mode_position_leverage) | **POST** /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in dual mode +[**update_dual_mode_position_risk_limit**](FuturesApi.md#update_dual_mode_position_risk_limit) | **POST** /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in dual mode +[**list_futures_orders**](FuturesApi.md#list_futures_orders) | **GET** /futures/{settle}/orders | Query futures order list +[**create_futures_order**](FuturesApi.md#create_futures_order) | **POST** /futures/{settle}/orders | Place futures order +[**cancel_futures_orders**](FuturesApi.md#cancel_futures_orders) | **DELETE** /futures/{settle}/orders | Cancel all orders with 'open' status +[**get_orders_with_time_range**](FuturesApi.md#get_orders_with_time_range) | **GET** /futures/{settle}/orders_timerange | Query futures order list by time range +[**create_batch_futures_order**](FuturesApi.md#create_batch_futures_order) | **POST** /futures/{settle}/batch_orders | Place batch futures orders +[**get_futures_order**](FuturesApi.md#get_futures_order) | **GET** /futures/{settle}/orders/{order_id} | Query single order details +[**amend_futures_order**](FuturesApi.md#amend_futures_order) | **PUT** /futures/{settle}/orders/{order_id} | Amend single order +[**cancel_futures_order**](FuturesApi.md#cancel_futures_order) | **DELETE** /futures/{settle}/orders/{order_id} | Cancel single order +[**get_my_trades**](FuturesApi.md#get_my_trades) | **GET** /futures/{settle}/my_trades | Query personal trading records +[**get_my_trades_with_time_range**](FuturesApi.md#get_my_trades_with_time_range) | **GET** /futures/{settle}/my_trades_timerange | Query personal trading records by time range +[**list_position_close**](FuturesApi.md#list_position_close) | **GET** /futures/{settle}/position_close | Query position close history +[**list_liquidates**](FuturesApi.md#list_liquidates) | **GET** /futures/{settle}/liquidates | Query liquidation history +[**list_auto_deleverages**](FuturesApi.md#list_auto_deleverages) | **GET** /futures/{settle}/auto_deleverages | Query ADL auto-deleveraging order information +[**countdown_cancel_all_futures**](FuturesApi.md#countdown_cancel_all_futures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders +[**get_futures_fee**](FuturesApi.md#get_futures_fee) | **GET** /futures/{settle}/fee | Query futures market trading fee rates +[**cancel_batch_future_orders**](FuturesApi.md#cancel_batch_future_orders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel batch orders by specified ID list +[**amend_batch_future_orders**](FuturesApi.md#amend_batch_future_orders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders by specified IDs +[**get_futures_risk_limit_table**](FuturesApi.md#get_futures_risk_limit_table) | **GET** /futures/{settle}/risk_limit_table | Query risk limit table by table_id +[**list_price_triggered_orders**](FuturesApi.md#list_price_triggered_orders) | **GET** /futures/{settle}/price_orders | Query auto order list +[**create_price_triggered_order**](FuturesApi.md#create_price_triggered_order) | **POST** /futures/{settle}/price_orders | Create price-triggered order +[**cancel_price_triggered_order_list**](FuturesApi.md#cancel_price_triggered_order_list) | **DELETE** /futures/{settle}/price_orders | Cancel all auto orders +[**get_price_triggered_order**](FuturesApi.md#get_price_triggered_order) | **GET** /futures/{settle}/price_orders/{order_id} | Query single auto order details +[**cancel_price_triggered_order**](FuturesApi.md#cancel_price_triggered_order) | **DELETE** /futures/{settle}/price_orders/{order_id} | Cancel single auto order # **list_futures_contracts** > list[Contract] list_futures_contracts(settle, limit=limit, offset=offset) -List all futures contracts. +Query all futures contracts ### Example @@ -76,12 +76,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # List all futures contracts. + # Query all futures contracts api_response = api_instance.list_futures_contracts(settle, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -94,9 +94,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **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 @@ -114,14 +114,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_contract** > Contract get_futures_contract(settle, contract) -Get a single contract. +Query single contract information ### Example @@ -138,11 +138,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract try: - # Get a single contract. + # Query single contract information api_response = api_instance.get_futures_contract(settle, contract) print(api_response) except GateApiException as ex: @@ -155,8 +155,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | ### Return type @@ -174,16 +174,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Contract information. | - | +**200** | Contract information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_order_book** > FuturesOrderBook list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) -Futures order book. +Query futures market depth information -Bids will be sorted by price from high to low, while asks sorted reversely. +Bids will be sorted by price from high to low, while asks sorted reversely ### Example @@ -200,14 +200,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) -with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0') +limit = 10 # int | Number of depth levels (optional) (default to 10) +with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time depth changes (optional) (default to False) try: - # Futures order book. + # Query futures market depth information api_response = api_instance.list_futures_order_book(settle, contract, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -220,11 +220,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] - **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0'] + **limit** | **int**| Number of depth levels | [optional] [default to 10] + **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time depth changes | [optional] [default to False] ### Return type @@ -242,14 +242,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Depth query successful. | - | +**200** | Depth query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_trades** > list[FuturesTrade] list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) -Futures trading history. +Futures market transaction records ### Example @@ -266,16 +266,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (optional) _from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) to = 1546935600 # int | Specify end time in Unix seconds, default to current time. (optional) try: - # Futures trading history. + # Futures market transaction records api_response = api_instance.list_futures_trades(settle, contract, limit=limit, offset=offset, last_id=last_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -288,10 +288,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [optional] **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] **to** | **int**| Specify end time in Unix seconds, default to current time. | [optional] @@ -312,14 +312,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_candlesticks** > list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) -Get futures candlesticks. +Futures market K-line chart Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` @@ -338,15 +338,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days (optional) (default to '5m') +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional) +limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +interval = '5m' # str | Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days (optional) (default to '5m') try: - # Get futures candlesticks. + # Futures market K-line chart api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) print(api_response) except GateApiException as ex: @@ -359,12 +359,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days | [optional] [default to '5m'] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional] + **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **interval** | **str**| Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days | [optional] [default to '5m'] ### Return type @@ -382,14 +382,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_premium_index** > list[FuturesPremiumIndex] list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) -Premium Index K-Line. +Premium Index K-line chart Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval @@ -408,15 +408,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Interval time between data points. (optional) (default to '5m') +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional) +limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +interval = '5m' # str | Time interval between data points (optional) (default to '5m') try: - # Premium Index K-Line. + # Premium Index K-line chart api_response = api_instance.list_futures_premium_index(settle, contract, _from=_from, to=to, limit=limit, interval=interval) print(api_response) except GateApiException as ex: @@ -429,12 +429,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Interval time between data points. | [optional] [default to '5m'] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional] + **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **interval** | **str**| Time interval between data points | [optional] [default to '5m'] ### Return type @@ -452,14 +452,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_tickers** > list[FuturesTicker] list_futures_tickers(settle, contract=contract) -List futures tickers. +Get all futures trading statistics ### Example @@ -476,11 +476,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) try: - # List futures tickers. + # Get all futures trading statistics api_response = api_instance.list_futures_tickers(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -493,8 +493,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] ### Return type @@ -512,14 +512,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_funding_rate_history** > list[FundingRateRecord] list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) -Funding rate history. +Futures market historical funding rate ### Example @@ -536,14 +536,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # Funding rate history. + # Futures market historical funding rate api_response = api_instance.list_futures_funding_rate_history(settle, contract, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -556,9 +556,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -578,14 +578,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | History retrieved. | - | +**200** | History query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_insurance_ledger** > list[InsuranceRecord] list_futures_insurance_ledger(settle, limit=limit) -Futures insurance balance history. +Futures market insurance fund history ### Example @@ -602,11 +602,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +settle = 'usdt' # str | Settle currency +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # Futures insurance balance history. + # Futures market insurance fund history api_response = api_instance.list_futures_insurance_ledger(settle, limit=limit) print(api_response) except GateApiException as ex: @@ -619,8 +619,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **settle** | **str**| Settle currency | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -638,14 +638,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_contract_stats** > list[ContractStat] list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit) -Futures stats. +Futures statistics ### Example @@ -662,14 +662,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -_from = 1604561000 # int | Start timestamp. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +_from = 1604561000 # int | Start timestamp (optional) interval = '5m' # str | (optional) (default to '5m') limit = 30 # int | (optional) (default to 30) try: - # Futures stats. + # Futures statistics api_response = api_instance.list_contract_stats(settle, contract, _from=_from, interval=interval, limit=limit) print(api_response) except GateApiException as ex: @@ -682,9 +682,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **_from** | **int**| Start timestamp. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **_from** | **int**| Start timestamp | [optional] **interval** | **str**| | [optional] [default to '5m'] **limit** | **int**| | [optional] [default to 30] @@ -704,14 +704,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_index_constituents** > FuturesIndexConstituents get_index_constituents(settle, index) -Get index constituents. +Query index constituents ### Example @@ -728,11 +728,11 @@ configuration = gate_api.Configuration( 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. -index = 'BTC_USDT' # str | Index name. +settle = 'usdt' # str | Settle currency +index = 'BTC_USDT' # str | Index name try: - # Get index constituents. + # Query index constituents api_response = api_instance.get_index_constituents(settle, index) print(api_response) except GateApiException as ex: @@ -745,8 +745,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **index** | **str**| Index name. | + **settle** | **str**| Settle currency | + **index** | **str**| Index name | ### Return type @@ -764,16 +764,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_liquidated_orders** > list[FuturesLiqOrder] list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit) -Retrieve liquidation history. +Query liquidation order history -The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details +The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for detailsThe time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details ### Example @@ -790,14 +790,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # Retrieve liquidation history. + # Query liquidation order history api_response = api_instance.list_liquidated_orders(settle, contract=contract, _from=_from, to=to, limit=limit) print(api_response) except GateApiException as ex: @@ -810,11 +810,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -832,14 +832,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_risk_limit_tiers** > list[FuturesLimitRiskTiers] list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) -List risk limit tiers. +Query risk limit tiers When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. @@ -858,13 +858,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # List risk limit tiers. + # Query risk limit tiers api_response = api_instance.list_futures_risk_limit_tiers(settle, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -877,10 +877,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -898,14 +898,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_accounts** > FuturesAccount list_futures_accounts(settle) -Query futures account. +Get futures account ### Example @@ -931,10 +931,10 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency try: - # Query futures account. + # Get futures account api_response = api_instance.list_futures_accounts(settle) print(api_response) except GateApiException as ex: @@ -947,7 +947,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | ### Return type @@ -965,16 +965,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_account_book** > list[FuturesAccountBook] list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) -Query account book. +Query futures account change history -If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered. +If the contract field is passed, only records containing this field after 2023-10-30 can be filtered. ### Example @@ -1000,16 +1000,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction (optional) try: - # Query account book. + # Query futures account change history api_response = api_instance.list_futures_account_book(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -1022,10 +1022,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] @@ -1046,14 +1046,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_positions** > list[Position] list_positions(settle, holding=holding, limit=limit, offset=offset) -List all positions of a user. +Get user position list ### Example @@ -1079,13 +1079,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -holding = true # bool | Return only real positions - true, return all - false. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +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) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # List all positions of a user. + # Get user position list api_response = api_instance.list_positions(settle, holding=holding, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1098,10 +1098,10 @@ except ApiException as e: 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 to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **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] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -1119,14 +1119,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_position** > Position get_position(settle, contract) -Get single position. +Get single position information ### Example @@ -1152,11 +1152,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract try: - # Get single position. + # Get single position information api_response = api_instance.get_position(settle, contract) print(api_response) except GateApiException as ex: @@ -1169,8 +1169,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | ### Return type @@ -1188,14 +1188,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_margin** > Position update_position_margin(settle, contract, change) -Update position margin. +Update position margin ### Example @@ -1221,12 +1221,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -change = '0.01' # str | Margin change amount, positive number increases, negative number. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +change = '0.01' # str | Margin change amount, positive number increases, negative number decreases try: - # Update position margin. + # Update position margin api_response = api_instance.update_position_margin(settle, contract, change) print(api_response) except GateApiException as ex: @@ -1239,9 +1239,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **change** | **str**| Margin change amount, positive number increases, negative number. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **change** | **str**| Margin change amount, positive number increases, negative number decreases | ### Return type @@ -1259,14 +1259,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_leverage** > Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) -Update position leverage. +Update position leverage ### Example @@ -1292,13 +1292,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -leverage = '10' # str | New position leverage. -cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0). (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +leverage = '10' # str | New position leverage +cross_leverage_limit = '10' # str | Cross margin leverage (valid only when `leverage` is 0) (optional) try: - # Update position leverage. + # Update position leverage api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) print(api_response) except GateApiException as ex: @@ -1311,10 +1311,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **leverage** | **str**| New position leverage. | - **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0). | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **leverage** | **str**| New position leverage | + **cross_leverage_limit** | **str**| Cross margin leverage (valid only when `leverage` is 0) | [optional] ### Return type @@ -1332,14 +1332,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_cross_mode** > Position update_position_cross_mode(settle, futures_position_cross_mode) -Switch to the full position-by-store mode. +Switch Position Margin Mode ### Example @@ -1365,11 +1365,11 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency futures_position_cross_mode = gate_api.FuturesPositionCrossMode() # FuturesPositionCrossMode | try: - # Switch to the full position-by-store mode. + # Switch Position Margin Mode api_response = api_instance.update_position_cross_mode(settle, futures_position_cross_mode) print(api_response) except GateApiException as ex: @@ -1382,7 +1382,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **futures_position_cross_mode** | [**FuturesPositionCrossMode**](FuturesPositionCrossMode.md)| | ### Return type @@ -1401,14 +1401,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dual_comp_position_cross_mode** > list[Position] update_dual_comp_position_cross_mode(settle, inline_object) -双仓模式下切换全逐仓模式 +Switch Between Cross and Isolated Margin Modes Under Hedge Mode ### Example @@ -1434,11 +1434,11 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency inline_object = gate_api.InlineObject() # InlineObject | try: - # 双仓模式下切换全逐仓模式 + # Switch Between Cross and Isolated Margin Modes Under Hedge Mode api_response = api_instance.update_dual_comp_position_cross_mode(settle, inline_object) print(api_response) except GateApiException as ex: @@ -1451,7 +1451,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **inline_object** | [**InlineObject**](InlineObject.md)| | ### Return type @@ -1470,14 +1470,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_risk_limit** > Position update_position_risk_limit(settle, contract, risk_limit) -Update position risk limit. +Update position risk limit ### Example @@ -1503,12 +1503,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -risk_limit = '1000000' # str | New Risk Limit Value. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +risk_limit = '1000000' # str | New risk limit value try: - # Update position risk limit. + # Update position risk limit api_response = api_instance.update_position_risk_limit(settle, contract, risk_limit) print(api_response) except GateApiException as ex: @@ -1521,9 +1521,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **risk_limit** | **str**| New Risk Limit Value. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **risk_limit** | **str**| New risk limit value | ### Return type @@ -1541,16 +1541,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Position information. | - | +**200** | Position information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_dual_mode** > FuturesAccount set_dual_mode(settle, dual_mode) -Enable or disable dual mode. +Set position mode -The prerequisite for changing mode is that all positions have no holdings. +The prerequisite for changing mode is that all positions have no holdings and no pending orders ### Example @@ -1576,11 +1576,11 @@ configuration = gate_api.Configuration( 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. -dual_mode = true # bool | Whether to enable dual mode. +settle = 'usdt' # str | Settle currency +dual_mode = true # bool | Whether to enable dual mode try: - # Enable or disable dual mode. + # Set position mode api_response = api_instance.set_dual_mode(settle, dual_mode) print(api_response) except GateApiException as ex: @@ -1593,8 +1593,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **dual_mode** | **bool**| Whether to enable dual mode. | + **settle** | **str**| Settle currency | + **dual_mode** | **bool**| Whether to enable dual mode | ### Return type @@ -1612,14 +1612,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Updated. | - | +**200** | Updated successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_dual_mode_position** > list[Position] get_dual_mode_position(settle, contract) -Retrieve position detail in dual mode. +Get position information in dual mode ### Example @@ -1645,11 +1645,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract try: - # Retrieve position detail in dual mode. + # Get position information in dual mode api_response = api_instance.get_dual_mode_position(settle, contract) print(api_response) except GateApiException as ex: @@ -1662,8 +1662,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | ### Return type @@ -1681,14 +1681,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dual_mode_position_margin** > list[Position] update_dual_mode_position_margin(settle, contract, change, dual_side) -Update position margin in dual mode. +Update position margin in dual mode ### Example @@ -1714,13 +1714,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -change = '0.01' # str | Margin change amount, positive number increases, negative number. -dual_side = 'dual_long' # str | Long or short position. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +change = '0.01' # str | Margin change amount, positive number increases, negative number decreases +dual_side = 'dual_long' # str | Long or short position try: - # Update position margin in dual mode. + # Update position margin in dual mode api_response = api_instance.update_dual_mode_position_margin(settle, contract, change, dual_side) print(api_response) except GateApiException as ex: @@ -1733,10 +1733,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **change** | **str**| Margin change amount, positive number increases, negative number. | - **dual_side** | **str**| Long or short position. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **change** | **str**| Margin change amount, positive number increases, negative number decreases | + **dual_side** | **str**| Long or short position | ### Return type @@ -1754,14 +1754,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dual_mode_position_leverage** > list[Position] update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) -Update position leverage in dual mode. +Update position leverage in dual mode ### Example @@ -1787,13 +1787,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -leverage = '10' # str | New position leverage. -cross_leverage_limit = '10' # str | Cross margin leverage(valid only when `leverage` is 0). (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +leverage = '10' # str | New position leverage +cross_leverage_limit = '10' # str | Cross margin leverage (valid only when `leverage` is 0) (optional) try: - # Update position leverage in dual mode. + # Update position leverage in dual mode api_response = api_instance.update_dual_mode_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) print(api_response) except GateApiException as ex: @@ -1806,10 +1806,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **leverage** | **str**| New position leverage. | - **cross_leverage_limit** | **str**| Cross margin leverage(valid only when `leverage` is 0). | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **leverage** | **str**| New position leverage | + **cross_leverage_limit** | **str**| Cross margin leverage (valid only when `leverage` is 0) | [optional] ### Return type @@ -1827,14 +1827,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dual_mode_position_risk_limit** > list[Position] update_dual_mode_position_risk_limit(settle, contract, risk_limit) -Update position risk limit in dual mode. +Update position risk limit in dual mode ### Example @@ -1860,12 +1860,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. -risk_limit = '1000000' # str | New Risk Limit Value. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract +risk_limit = '1000000' # str | New risk limit value try: - # Update position risk limit in dual mode. + # Update position risk limit in dual mode api_response = api_instance.update_dual_mode_position_risk_limit(settle, contract, risk_limit) print(api_response) except GateApiException as ex: @@ -1878,9 +1878,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | - **risk_limit** | **str**| New Risk Limit Value. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | + **risk_limit** | **str**| New risk limit value | ### Return type @@ -1898,14 +1898,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_orders** > list[FuturesOrder] list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) -List futures orders. +Query futures order list - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. @@ -1933,15 +1933,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -status = 'open' # str | Only list the orders with this status. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) +settle = 'usdt' # str | Settle currency +status = 'open' # str | Query order list based on status +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) try: - # List futures orders. + # Query futures order list api_response = api_instance.list_futures_orders(settle, status, contract=contract, limit=limit, offset=offset, last_id=last_id) print(api_response) except GateApiException as ex: @@ -1954,12 +1954,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **status** | **str**| Only list the orders with this status. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] + **settle** | **str**| Settle currency | + **status** | **str**| Query order list based on status | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] ### Return type @@ -1977,14 +1977,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| +**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_futures_order** > FuturesOrder create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) -Create a futures order. +Place futures order - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` @@ -2012,12 +2012,12 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency futures_order = gate_api.FuturesOrder() # FuturesOrder | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Create a futures order. + # Place futures order api_response = api_instance.create_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2030,7 +2030,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **futures_order** | [**FuturesOrder**](FuturesOrder.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -2050,16 +2050,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order details. | - | +**201** | Order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_futures_orders** > list[FuturesOrder] cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side) -Cancel all `open` orders matched. +Cancel all orders with 'open' status -Zero-filled order cannot be retrieved 10 minutes after order cancellation. +Zero-fill orders cannot be retrieved 10 minutes after order cancellation ### Example @@ -2085,13 +2085,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract. +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) side = 'ask' # str | Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders (optional) try: - # Cancel all `open` orders matched. + # Cancel all orders with 'open' status api_response = api_instance.cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side) print(api_response) except GateApiException as ex: @@ -2104,8 +2104,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract. | + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] **side** | **str**| Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders | [optional] @@ -2125,14 +2125,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All orders matched cancelled. | - | +**200** | Batch cancellation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_orders_with_time_range** > list[FuturesOrder] get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) -List Futures Orders By Time Range. +Query futures order list by time range ### Example @@ -2158,15 +2158,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # List Futures Orders By Time Range. + # Query futures order list by time range api_response = api_instance.get_orders_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -2179,12 +2179,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **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 @@ -2202,14 +2202,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| +**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_batch_futures_order** > list[BatchFuturesOrder] create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) -Create a batch of futures orders. +Place batch futures orders - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually @@ -2237,12 +2237,12 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency futures_order = [gate_api.FuturesOrder()] # list[FuturesOrder] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Create a batch of futures orders. + # Place batch futures orders api_response = api_instance.create_batch_futures_order(settle, futures_order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2255,7 +2255,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **futures_order** | [**list[FuturesOrder]**](FuturesOrder.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -2275,14 +2275,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is completed. | - | +**200** | Request execution completed | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_order** > FuturesOrder get_futures_order(settle, order_id) -Get a single order. +Query single order details - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. @@ -2310,11 +2310,11 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. try: - # Get a single order. + # Query single order details api_response = api_instance.get_futures_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -2327,7 +2327,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | ### Return type @@ -2346,14 +2346,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details. | - | +**200** | Order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **amend_futures_order** > FuturesOrder amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) -Amend an order. +Amend single order ### Example @@ -2379,13 +2379,13 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. futures_order_amendment = gate_api.FuturesOrderAmendment() # FuturesOrderAmendment | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Amend an order. + # Amend single order api_response = api_instance.amend_futures_order(settle, order_id, futures_order_amendment, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2398,7 +2398,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | **futures_order_amendment** | [**FuturesOrderAmendment**](FuturesOrderAmendment.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -2419,14 +2419,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details. | - | +**200** | Order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_futures_order** > FuturesOrder cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) -Cancel a single order. +Cancel single order ### Example @@ -2452,12 +2452,12 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency order_id = '12345' # str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a single order. + # Cancel single order api_response = api_instance.cancel_futures_order(settle, order_id, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -2470,7 +2470,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. | **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] @@ -2490,14 +2490,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order details. | - | +**200** | Order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_my_trades** > list[MyFuturesTrade] get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) -List personal trading history. +Query personal trading records By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. @@ -2525,15 +2525,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -order = 12345 # int | Futures order ID, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +order = 12345 # int | Futures order ID, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) last_id = '12345' # str | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. (optional) try: - # List personal trading history. + # Query personal trading records api_response = api_instance.get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id) print(api_response) except GateApiException as ex: @@ -2546,11 +2546,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **order** | **int**| Futures order ID, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **order** | **int**| Futures order ID, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **last_id** | **str**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. | [optional] ### Return type @@ -2569,14 +2569,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| +**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_my_trades_with_time_range** > list[MyFuturesTradeTimeRange] get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) -List personal trading history by time range. +Query personal trading records by time range ### Example @@ -2602,16 +2602,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) -role = 'maker' # str | Query role, maker or taker. (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +role = 'maker' # str | Query role, maker or taker (optional) try: - # List personal trading history by time range. + # Query personal trading records by time range api_response = api_instance.get_my_trades_with_time_range(settle, contract=contract, _from=_from, to=to, limit=limit, offset=offset, role=role) print(api_response) except GateApiException as ex: @@ -2624,13 +2624,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] - **role** | **str**| Query role, maker or taker. | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **role** | **str**| Query role, maker or taker | [optional] ### Return type @@ -2648,14 +2648,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | * X-Pagination-Limit - Request limit specified.
* X-Pagination-Offset - Request offset specified.
| +**200** | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination
* X-Pagination-Offset - Offset specified for pagination
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_position_close** > list[PositionClose] list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) -List position close history. +Query position close history ### Example @@ -2681,17 +2681,17 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -side = 'short' # str | Query side. long or shot. (optional) -pnl = 'profit' # str | Query profit or loss. (optional) +side = 'short' # str | Query side. long or shot (optional) +pnl = 'profit' # str | Query profit or loss (optional) try: - # List position close history. + # Query position close history api_response = api_instance.list_position_close(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, side=side, pnl=pnl) print(api_response) except GateApiException as ex: @@ -2704,14 +2704,14 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **side** | **str**| Query side. long or shot. | [optional] - **pnl** | **str**| Query profit or loss. | [optional] + **side** | **str**| Query side. long or shot | [optional] + **pnl** | **str**| Query profit or loss | [optional] ### Return type @@ -2729,14 +2729,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_liquidates** > list[FuturesLiquidate] list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) -List liquidation history. +Query liquidation history ### Example @@ -2762,16 +2762,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -at = 0 # int | Specify a liquidation timestamp. (optional) (default to 0) +at = 0 # int | Specify liquidation timestamp (optional) (default to 0) try: - # List liquidation history. + # Query liquidation history api_response = api_instance.list_liquidates(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) print(api_response) except GateApiException as ex: @@ -2784,13 +2784,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **at** | **int**| Specify a liquidation timestamp. | [optional] [default to 0] + **at** | **int**| Specify liquidation timestamp | [optional] [default to 0] ### Return type @@ -2808,14 +2808,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_auto_deleverages** > list[FuturesAutoDeleverage] list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) -List Auto-Deleveraging History. +Query ADL auto-deleveraging order information ### Example @@ -2841,16 +2841,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -at = 0 # int | Specify an auto-deleveraging timestamp. (optional) (default to 0) +at = 0 # int | Specify auto-deleveraging timestamp (optional) (default to 0) try: - # List Auto-Deleveraging History. + # Query ADL auto-deleveraging order information api_response = api_instance.list_auto_deleverages(settle, contract=contract, limit=limit, offset=offset, _from=_from, to=to, at=at) print(api_response) except GateApiException as ex: @@ -2863,13 +2863,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **at** | **int**| Specify an auto-deleveraging timestamp. | [optional] [default to 0] + **at** | **int**| Specify auto-deleveraging timestamp | [optional] [default to 0] ### Return type @@ -2887,14 +2887,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **countdown_cancel_all_futures** > TriggerTime countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) -Countdown cancel orders. +Countdown cancel orders Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. @@ -2922,11 +2922,11 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency countdown_cancel_all_futures_task = gate_api.CountdownCancelAllFuturesTask() # CountdownCancelAllFuturesTask | try: - # Countdown cancel orders. + # Countdown cancel orders api_response = api_instance.countdown_cancel_all_futures(settle, countdown_cancel_all_futures_task) print(api_response) except GateApiException as ex: @@ -2939,7 +2939,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **countdown_cancel_all_futures_task** | [**CountdownCancelAllFuturesTask**](CountdownCancelAllFuturesTask.md)| | ### Return type @@ -2958,14 +2958,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Set countdown successfully. | - | +**200** | Countdown set successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_fee** > dict(str, FuturesFee) get_futures_fee(settle, contract=contract) -Query user trading fee rates. +Query futures market trading fee rates ### Example @@ -2991,11 +2991,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) try: - # Query user trading fee rates. + # Query futures market trading fee rates api_response = api_instance.get_futures_fee(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -3008,8 +3008,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] ### Return type @@ -3027,16 +3027,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_batch_future_orders** > list[FutureCancelOrderResult] cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) -Cancel a batch of orders with an ID list. +Cancel batch orders by specified ID list -Multiple different order IDs can be specified. A maximum of 20 records. +Multiple different order IDs can be specified, maximum 20 records per request ### Example @@ -3062,12 +3062,12 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency request_body = ['request_body_example'] # list[str] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a batch of orders with an ID list. + # Cancel batch orders by specified ID list api_response = api_instance.cancel_batch_future_orders(settle, request_body, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -3080,7 +3080,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **request_body** | [**list[str]**](str.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -3100,16 +3100,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order cancellation operation completed. | - | +**200** | Order cancellation operation completed | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **amend_batch_future_orders** > list[BatchFuturesOrder] amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) -Batch modify orders with specified IDs. +Batch modify orders by specified IDs -Multiple different order IDs can be specified. A maximum of 10 orders can. +Multiple different order IDs can be specified, maximum 10 orders per request ### Example @@ -3135,12 +3135,12 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency batch_amend_order_req = [gate_api.BatchAmendOrderReq()] # list[BatchAmendOrderReq] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Batch modify orders with specified IDs. + # Batch modify orders by specified IDs api_response = api_instance.amend_batch_future_orders(settle, batch_amend_order_req, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -3153,7 +3153,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **batch_amend_order_req** | [**list[BatchAmendOrderReq]**](BatchAmendOrderReq.md)| | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] @@ -3173,16 +3173,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is completed. | - | +**200** | Request execution completed | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_futures_risk_limit_table** > list[FuturesRiskLimitTier] get_futures_risk_limit_table(settle, table_id) -Query risk limit table by table_id. +Query risk limit table by table_id -Just pass table_id. +Just pass table_id ### Example @@ -3199,11 +3199,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -table_id = 'CYBER_USDT_20241122' # str | Risk limit table ID. +settle = 'usdt' # str | Settle currency +table_id = 'CYBER_USDT_20241122' # str | Risk limit table ID try: - # Query risk limit table by table_id. + # Query risk limit table by table_id api_response = api_instance.get_futures_risk_limit_table(settle, table_id) print(api_response) except GateApiException as ex: @@ -3216,8 +3216,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **table_id** | **str**| Risk limit table ID. | + **settle** | **str**| Settle currency | + **table_id** | **str**| Risk limit table ID | ### Return type @@ -3235,14 +3235,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_price_triggered_orders** > list[FuturesPriceTriggeredOrder] list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) -List All Price-triggered Orders. +Query auto order list ### Example @@ -3268,14 +3268,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -status = 'status_example' # str | Only list the orders with this status. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +settle = 'usdt' # str | Settle currency +status = 'status_example' # str | Query order list based on status +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # List All Price-triggered Orders. + # Query auto order list api_response = api_instance.list_price_triggered_orders(settle, status, contract=contract, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -3288,11 +3288,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **status** | **str**| Only list the orders with this status. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **settle** | **str**| Settle currency | + **status** | **str**| Query order list based on status | + **contract** | **str**| Futures contract, return related data only if specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -3310,14 +3310,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_price_triggered_order** > TriggerOrderResponse create_price_triggered_order(settle, futures_price_triggered_order) -Create a price-triggered order. +Create price-triggered order ### Example @@ -3343,11 +3343,11 @@ configuration = gate_api.Configuration( 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. +settle = 'usdt' # str | Settle currency futures_price_triggered_order = gate_api.FuturesPriceTriggeredOrder() # FuturesPriceTriggeredOrder | try: - # Create a price-triggered order. + # Create price-triggered order api_response = api_instance.create_price_triggered_order(settle, futures_price_triggered_order) print(api_response) except GateApiException as ex: @@ -3360,7 +3360,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | + **settle** | **str**| Settle currency | **futures_price_triggered_order** | [**FuturesPriceTriggeredOrder**](FuturesPriceTriggeredOrder.md)| | ### Return type @@ -3379,14 +3379,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order created. | - | +**201** | Order created successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_order_list** > list[FuturesPriceTriggeredOrder] cancel_price_triggered_order_list(settle, contract=contract) -Cancel All Price-triggered Orders. +Cancel all auto orders ### Example @@ -3412,11 +3412,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -contract = 'BTC_USDT' # str | Futures contract, return related data only if specified. (optional) +settle = 'usdt' # str | Settle currency +contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) try: - # Cancel All Price-triggered Orders. + # Cancel all auto orders api_response = api_instance.cancel_price_triggered_order_list(settle, contract=contract) print(api_response) except GateApiException as ex: @@ -3429,8 +3429,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **contract** | **str**| Futures contract, return related data only if specified. | [optional] + **settle** | **str**| Settle currency | + **contract** | **str**| Futures contract, return related data only if specified | [optional] ### Return type @@ -3448,14 +3448,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders. | - | +**200** | Batch cancellation request accepted and processed, success determined by order list | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_price_triggered_order** > FuturesPriceTriggeredOrder get_price_triggered_order(settle, order_id) -Get a price-triggered order. +Query single auto order details ### Example @@ -3481,11 +3481,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. +settle = 'usdt' # str | Settle currency +order_id = 'order_id_example' # str | ID returned when order is successfully created try: - # Get a price-triggered order. + # Query single auto order details api_response = api_instance.get_price_triggered_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -3498,8 +3498,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **settle** | **str**| Settle currency | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -3517,14 +3517,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail. | - | +**200** | Auto order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_price_triggered_order** > FuturesPriceTriggeredOrder cancel_price_triggered_order(settle, order_id) -cancel a price-triggered order. +Cancel single auto order ### Example @@ -3550,11 +3550,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.FuturesApi(api_client) -settle = 'usdt' # str | Settle currency. -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. +settle = 'usdt' # str | Settle currency +order_id = 'order_id_example' # str | ID returned when order is successfully created try: - # cancel a price-triggered order. + # Cancel single auto order api_response = api_instance.cancel_price_triggered_order(settle, order_id) print(api_response) except GateApiException as ex: @@ -3567,8 +3567,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **settle** | **str**| Settle currency. | - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **settle** | **str**| Settle currency | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -3586,7 +3586,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail. | - | +**200** | Auto order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/FuturesAutoDeleverage.md b/docs/FuturesAutoDeleverage.md index 50b659f..1f2d674 100644 --- a/docs/FuturesAutoDeleverage.md +++ b/docs/FuturesAutoDeleverage.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Automatic deleveraging time. | [optional] [readonly] -**user** | **int** | User ID. | [optional] [readonly] -**order_id** | **int** | Order ID. Order IDs before 2023-02-20 are null. | [optional] [readonly] -**contract** | **str** | Futures contract. | [optional] [readonly] -**leverage** | **str** | Position leverage. | [optional] [readonly] -**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0). | [optional] [readonly] -**entry_price** | **str** | Average entry price. | [optional] [readonly] -**fill_price** | **str** | Average fill price. | [optional] [readonly] -**trade_size** | **int** | Trading size. | [optional] [readonly] -**position_size** | **int** | Positions after auto-deleveraging. | [optional] [readonly] +**time** | **int** | Automatic deleveraging time | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**order_id** | **int** | Order ID. Order IDs before 2023-02-20 are null | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**leverage** | **str** | Position leverage | [optional] [readonly] +**cross_leverage_limit** | **str** | Cross margin leverage (valid only when `leverage` is 0) | [optional] [readonly] +**entry_price** | **str** | Average entry price | [optional] [readonly] +**fill_price** | **str** | Average fill price | [optional] [readonly] +**trade_size** | **int** | Trading size | [optional] [readonly] +**position_size** | **int** | Positions after auto-deleveraging | [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/FuturesBatchAmendOrderRequest.md b/docs/FuturesBatchAmendOrderRequest.md index 0507bb0..b8a8467 100644 --- a/docs/FuturesBatchAmendOrderRequest.md +++ b/docs/FuturesBatchAmendOrderRequest.md @@ -1,14 +1,14 @@ # FuturesBatchAmendOrderRequest -Modify contract order parameters. +Modify contract order parameters ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order id, order_id and text must contain at least one. | [optional] -**text** | **str** | User-defined order text, at least one of order_id and text must be passed. | [optional] -**size** | **int** | The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. | [optional] -**price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending order. | [optional] +**order_id** | **int** | Order id, order_id and text must contain at least one | [optional] +**text** | **str** | User-defined order text, at least one of order_id and text must be passed | [optional] +**size** | **int** | New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. | [optional] +**price** | **str** | New order price | [optional] +**amend_text** | **str** | Custom info during order amendment | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesCandlestick.md b/docs/FuturesCandlestick.md index 974b990..202685d 100644 --- a/docs/FuturesCandlestick.md +++ b/docs/FuturesCandlestick.md @@ -1,16 +1,16 @@ # FuturesCandlestick -data point in every timestamp. +data point in every timestamp ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds. | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed. | [optional] -**c** | **str** | Close price (quote currency). | [optional] -**h** | **str** | Highest price (quote currency). | [optional] -**l** | **str** | Lowest price (quote currency). | [optional] -**o** | **str** | Open price (quote currency). | [optional] -**sum** | **str** | Trading volume (unit: Quote currency). | [optional] +**t** | **float** | Unix timestamp in seconds | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] +**c** | **str** | Close price (quote currency) | [optional] +**h** | **str** | Highest price (quote currency) | [optional] +**l** | **str** | Lowest price (quote currency) | [optional] +**o** | **str** | Open price (quote currency) | [optional] +**sum** | **str** | Trading volume (unit: Quote currency) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesFee.md b/docs/FuturesFee.md index aeb73a3..5b3c0df 100644 --- a/docs/FuturesFee.md +++ b/docs/FuturesFee.md @@ -1,11 +1,11 @@ # FuturesFee -The returned result is a map type, where the key represents the market and taker and maker fee rates. +The returned result is a map type, where the key represents the market and taker and maker fee rates ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taker_fee** | **str** | Taker fee. | [optional] [readonly] -**maker_fee** | **str** | maker fee. | [optional] [readonly] +**taker_fee** | **str** | Taker fee | [optional] [readonly] +**maker_fee** | **str** | maker fee | [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/FuturesIndexConstituents.md b/docs/FuturesIndexConstituents.md index 9bb2f84..7564bbe 100644 --- a/docs/FuturesIndexConstituents.md +++ b/docs/FuturesIndexConstituents.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**index** | **str** | Index name. | [optional] [readonly] -**constituents** | [**list[IndexConstituent]**](IndexConstituent.md) | Constituents. | [optional] [readonly] +**index** | **str** | Index name | [optional] [readonly] +**constituents** | [**list[IndexConstituent]**](IndexConstituent.md) | Constituents | [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/FuturesInitialOrder.md b/docs/FuturesInitialOrder.md index 3bc08fc..6c6dd28 100644 --- a/docs/FuturesInitialOrder.md +++ b/docs/FuturesInitialOrder.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract. | +**contract** | **str** | Futures contract | **size** | **int** | Represents the number of contracts that need to be closed, full closing: size=0 Partial closing: plan-close-short-position size>0 Partial closing: plan-close-long-position size<0 | [optional] -**price** | **str** | Order price. Set to 0 to use market price. | +**price** | **str** | Order price. Set to 0 to use market price | **close** | **bool** | When all positions are closed in a single position mode, it must be set to true to perform the closing operation When partially closed positions in single-store mode/double-store mode, you can not set close, or close=false | [optional] [default to False] -**tif** | **str** | Time in force strategy, default is gtc, market order currently only supports ioc mode mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc'] -**text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] +**tif** | **str** | Time in force strategy, default is gtc, market orders currently only support ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled | [optional] [default to 'gtc'] +**text** | **str** | The source of the order, including: - web: Web - api: API call - app: Mobile app | [optional] **reduce_only** | **bool** | When set to true, perform automatic position reduction operation. Set to true to ensure that the order will not open a new position, and is only used to close or reduce positions | [optional] [default to False] -**auto_size** | **str** | Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size | [optional] -**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] -**is_close** | **bool** | Is the order to close position. | [optional] [readonly] +**auto_size** | **str** | Single position mode: auto_size is not required Dual position mode full closing (size=0): auto_size must be set, close_long for closing long positions, close_short for closing short positions Dual position mode partial closing (size≠0): auto_size is not required | [optional] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_close** | **bool** | Is the order to close position | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesLimitRiskTiers.md b/docs/FuturesLimitRiskTiers.md index caeec4f..704f833 100644 --- a/docs/FuturesLimitRiskTiers.md +++ b/docs/FuturesLimitRiskTiers.md @@ -1,16 +1,16 @@ # FuturesLimitRiskTiers -Retrieve risk limit configurations for different tiers under a specified contract. +Retrieve risk limit configurations for different tiers under a specified contract ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **int** | Tier. | [optional] -**risk_limit** | **str** | Position risk limit. | [optional] -**initial_rate** | **str** | Initial margin rate. | [optional] -**maintenance_rate** | **str** | Maintenance margin rate. | [optional] -**leverage_max** | **str** | Maximum leverage. | [optional] -**contract** | **str** | Markets, visible only during market pagination requests. | [optional] -**deduction** | **str** | Maintenance margin quick calculation deduction. | [optional] +**tier** | **int** | Tier | [optional] +**risk_limit** | **str** | Position risk limit | [optional] +**initial_rate** | **str** | Initial margin rate | [optional] +**maintenance_rate** | **str** | Maintenance margin rate | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**contract** | **str** | Market, only visible when market pagination is requested | [optional] +**deduction** | **str** | Maintenance margin quick calculation deduction amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesLiqOrder.md b/docs/FuturesLiqOrder.md index 950f29b..daf3c5e 100644 --- a/docs/FuturesLiqOrder.md +++ b/docs/FuturesLiqOrder.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time. | [optional] [readonly] -**contract** | **str** | Futures contract. | [optional] [readonly] -**size** | **int** | User position size. | [optional] [readonly] -**order_size** | **int** | Number of forced liquidation orders. | [optional] [readonly] -**order_price** | **str** | Liquidation order price. | [optional] [readonly] -**fill_price** | **str** | Liquidation order average taker price. | [optional] [readonly] -**left** | **int** | System liquidation order maker size. | [optional] [readonly] +**time** | **int** | Liquidation time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**size** | **int** | User position size | [optional] [readonly] +**order_size** | **int** | Number of forced liquidation orders | [optional] [readonly] +**order_price** | **str** | Liquidation order price | [optional] [readonly] +**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] +**left** | **int** | System liquidation order maker size | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesLiquidate.md b/docs/FuturesLiquidate.md index d6a7f7d..78b62b2 100644 --- a/docs/FuturesLiquidate.md +++ b/docs/FuturesLiquidate.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | Liquidation time. | [optional] [readonly] -**contract** | **str** | Futures contract. | [optional] [readonly] -**leverage** | **str** | Position leverage. Not returned in public endpoints. | [optional] [readonly] -**size** | **int** | Position size. | [optional] [readonly] -**margin** | **str** | Position margin. Not returned in public endpoints. | [optional] [readonly] -**entry_price** | **str** | Average entry price. Not returned in public endpoints. | [optional] [readonly] -**liq_price** | **str** | Liquidation price. Not returned in public endpoints. | [optional] [readonly] -**mark_price** | **str** | Mark price. Not returned in public endpoints. | [optional] [readonly] -**order_id** | **int** | Liquidation order ID. Not returned in public endpoints. | [optional] [readonly] -**order_price** | **str** | Liquidation order price. | [optional] [readonly] -**fill_price** | **str** | Liquidation order average taker price. | [optional] [readonly] -**left** | **int** | Liquidation order maker size. | [optional] [readonly] +**time** | **int** | Liquidation time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**leverage** | **str** | Position leverage. Not returned in public endpoints | [optional] [readonly] +**size** | **int** | Position size | [optional] [readonly] +**margin** | **str** | Position margin. Not returned in public endpoints | [optional] [readonly] +**entry_price** | **str** | Average entry price. Not returned in public endpoints | [optional] [readonly] +**liq_price** | **str** | Liquidation price. Not returned in public endpoints | [optional] [readonly] +**mark_price** | **str** | Mark price. Not returned in public endpoints | [optional] [readonly] +**order_id** | **int** | Liquidation order ID. Not returned in public endpoints | [optional] [readonly] +**order_price** | **str** | Liquidation order price | [optional] [readonly] +**fill_price** | **str** | Liquidation order average taker price | [optional] [readonly] +**left** | **int** | Liquidation order maker size | [optional] [readonly] [[Back to Model list]](../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 c8c7294..89c6a9d 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -1,35 +1,35 @@ # FuturesOrder -Futures order details. +Futures order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Futures order ID. | [optional] [readonly] -**user** | **int** | User ID. | [optional] [readonly] -**create_time** | **float** | Creation time of order. | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open. | [optional] [readonly] -**finish_as** | **str** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] -**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Futures contract. | -**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | -**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc`. | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0. | [optional] [default to False] -**is_close** | **bool** | Is the order to close position. | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order. | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation. | [optional] [readonly] +**id** | **int** | Futures order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Creation time of order | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] +**finish_as** | **str** | How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] +**status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly] +**contract** | **str** | Futures contract | +**size** | **int** | Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. | +**iceberg** | **int** | Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. | [optional] +**price** | **str** | Order price. Price of 0 with `tif` set to `ioc` represents a market order. | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] +**is_close** | **bool** | Is the order to close position | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] **tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded. | [optional] [readonly] -**fill_price** | **str** | Fill price of the order. | [optional] [readonly] -**text** | **str** | Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-x: new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-x: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance | [optional] -**tkfr** | **str** | Taker fee. | [optional] [readonly] -**mkfr** | **str** | Maker fee. | [optional] [readonly] -**refu** | **int** | Reference user ID. | [optional] [readonly] +**left** | **int** | Unfilled quantity | [optional] [readonly] +**fill_price** | **str** | Fill price | [optional] [readonly] +**text** | **str** | Custom order information. If not empty, must follow the rules below: 1. Prefixed with `t-` 2. No longer than 28 bytes without `t-` prefix 3. Can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) In addition to user-defined information, the following are internal reserved fields that identify the order source: - web: Web - api: API call - app: Mobile app - auto_deleveraging: Automatic deleveraging - liquidation: Forced liquidation of positions under the old classic mode - liq-xxx: a. Forced liquidation of positions under the new classic mode, including isolated margin, one-way cross margin, and non-hedged positions under two-way cross margin. b. Forced liquidation of isolated positions under the unified account single-currency margin mode - hedge-liq-xxx: Forced liquidation of hedged positions under the new classic mode two-way cross margin, i.e., simultaneously closing long and short positions - pm_liquidate: Forced liquidation under unified account multi-currency margin mode - comb_margin_liquidate: Forced liquidation under unified account portfolio margin mode - scm_liquidate: Forced liquidation of positions under unified account single-currency margin mode - insurance: Insurance | [optional] +**tkfr** | **str** | Taker fee | [optional] [readonly] +**mkfr** | **str** | Maker fee | [optional] [readonly] +**refu** | **int** | Referrer user ID | [optional] [readonly] **auto_size** | **str** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] [readonly] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] [[Back to Model list]](../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 cb338e2..0cc8dd7 100644 --- a/docs/FuturesOrderAmendment.md +++ b/docs/FuturesOrderAmendment.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **size** | **int** | New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. | [optional] -**price** | **str** | New order price. | [optional] -**amend_text** | **str** | Custom info during amending order. | [optional] +**price** | **str** | New order price | [optional] +**amend_text** | **str** | Custom info during order amendment | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesOrderBook.md b/docs/FuturesOrderBook.md index 400b6d3..392c531 100644 --- a/docs/FuturesOrderBook.md +++ b/docs/FuturesOrderBook.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response | [optional] -**current** | **float** | Response data generation timestamp. | [optional] -**update** | **float** | Order book changed timestamp. | [optional] -**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Asks order depth. | -**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bids order depth. | +**current** | **float** | Response data generation timestamp | [optional] +**update** | **float** | Order book changed timestamp | [optional] +**asks** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Ask Depth | +**bids** | [**list[FuturesOrderBookItem]**](FuturesOrderBookItem.md) | Bid Depth | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesOrderBookItem.md b/docs/FuturesOrderBookItem.md index 40ed9e4..9f3356e 100644 --- a/docs/FuturesOrderBookItem.md +++ b/docs/FuturesOrderBookItem.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**p** | **str** | Price (quote currency). | [optional] -**s** | **int** | Size. | [optional] +**p** | **str** | Price (quote currency) | [optional] +**s** | **int** | Size | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesPositionCrossMode.md b/docs/FuturesPositionCrossMode.md index 4496195..65b0f1d 100644 --- a/docs/FuturesPositionCrossMode.md +++ b/docs/FuturesPositionCrossMode.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **str** | Full position-by-position model, ISOLATED-by-position, CROSS-full position. | -**contract** | **str** | Contract Market. | +**mode** | **str** | Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode | +**contract** | **str** | Futures market | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesPremiumIndex.md b/docs/FuturesPremiumIndex.md index 6adb80f..91041ef 100644 --- a/docs/FuturesPremiumIndex.md +++ b/docs/FuturesPremiumIndex.md @@ -1,14 +1,14 @@ # FuturesPremiumIndex -data point in every timestamp. +data point in every timestamp ## Properties 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] -**o** | **str** | Open price. | [optional] +**t** | **float** | Unix timestamp in seconds | [optional] +**c** | **str** | Close price | [optional] +**h** | **str** | Highest price | [optional] +**l** | **str** | Lowest price | [optional] +**o** | **str** | Open price | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesPriceTrigger.md b/docs/FuturesPriceTrigger.md index 7fd21de..5fd4eeb 100644 --- a/docs/FuturesPriceTrigger.md +++ b/docs/FuturesPriceTrigger.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**strategy_type** | **int** | Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price | [optional] -**price_type** | **int** | Price type. 0 - latest deal price, 1 - mark price, 2 - index price. | [optional] -**price** | **str** | Value of price on price triggered, or price gap on price gap triggered. | [optional] -**rule** | **int** | Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price | [optional] -**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. | [optional] +**strategy_type** | **int** | Trigger Strategy - 0: Price trigger, triggered when price meets conditions - 1: Price spread trigger, i.e. the difference between the latest price specified in `price_type` and the second-last price Currently only supports 0 (latest transaction price) | [optional] +**price_type** | **int** | Reference price type. 0 - Latest trade price, 1 - Mark price, 2 - Index price | [optional] +**price** | **str** | Price value for price trigger, or spread value for spread trigger | [optional] +**rule** | **int** | Price Condition Type - 1: Trigger when the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price`, while Trigger.Price must > last_price - 2: Trigger when the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price`, and Trigger.Price must < last_price | [optional] +**expiration** | **int** | Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesPriceTriggeredOrder.md b/docs/FuturesPriceTriggeredOrder.md index e210f9d..d28e980 100644 --- a/docs/FuturesPriceTriggeredOrder.md +++ b/docs/FuturesPriceTriggeredOrder.md @@ -1,21 +1,21 @@ # FuturesPriceTriggeredOrder -Futures order details. +Futures price-triggered order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **initial** | [**FuturesInitialOrder**](FuturesInitialOrder.md) | | **trigger** | [**FuturesPriceTrigger**](FuturesPriceTrigger.md) | | -**id** | **int** | Auto order ID. | [optional] [readonly] -**user** | **int** | User ID. | [optional] [readonly] -**create_time** | **float** | Creation time. | [optional] [readonly] -**finish_time** | **float** | Finished time. | [optional] [readonly] -**trade_id** | **int** | ID of the newly created order on condition triggered. | [optional] [readonly] -**status** | **str** | Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is close-short-order | [optional] [readonly] -**finish_as** | **str** | How order is finished. | [optional] [readonly] -**reason** | **str** | Additional remarks on how the order was finished. | [optional] [readonly] -**order_type** | **str** | Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests | [optional] -**me_order_id** | **int** | Corresponding order ID of order take-profit/stop-loss. | [optional] [readonly] +**id** | **int** | Auto order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Created time | [optional] [readonly] +**finish_time** | **float** | End time | [optional] [readonly] +**trade_id** | **int** | ID of the order created after trigger | [optional] [readonly] +**status** | **str** | Order status - `open`: Active - `finished`: Finished - `inactive`: Inactive, only applies to order take-profit/stop-loss - `invalid`: Invalid, only applies to order take-profit/stop-loss | [optional] [readonly] +**finish_as** | **str** | Finish status: cancelled - Cancelled; succeeded - Succeeded; failed - Failed; expired - Expired | [optional] [readonly] +**reason** | **str** | Additional description of how the order was completed | [optional] [readonly] +**order_type** | **str** | Types of take-profit and stop-loss orders, including: - `close-long-order`: Order take-profit/stop-loss, close long position - `close-short-order`: Order take-profit/stop-loss, close short position - `close-long-position`: Position take-profit/stop-loss, used to close all long positions - `close-short-position`: Position take-profit/stop-loss, used to close all short positions - `plan-close-long-position`: Position plan take-profit/stop-loss, used to close all or partial long positions - `plan-close-short-position`: Position plan take-profit/stop-loss, used to close all or partial short positions The two types of order take-profit/stop-loss are read-only and cannot be passed in requests | [optional] +**me_order_id** | **int** | Corresponding order ID for order take-profit/stop-loss orders | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesRiskLimitTier.md b/docs/FuturesRiskLimitTier.md index cdae523..10b759a 100644 --- a/docs/FuturesRiskLimitTier.md +++ b/docs/FuturesRiskLimitTier.md @@ -1,15 +1,15 @@ # FuturesRiskLimitTier -Information for each tier of the risk limit ladder. +Information for each tier of the gradient risk limit table ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **int** | Tier. | [optional] -**risk_limit** | **str** | Position risk limit. | [optional] -**initial_rate** | **str** | Initial margin rate. | [optional] -**maintenance_rate** | **str** | Maintenance margin rate. | [optional] -**leverage_max** | **str** | Maximum leverage. | [optional] -**deduction** | **str** | Maintenance margin quick calculation deduction. | [optional] +**tier** | **int** | Tier | [optional] +**risk_limit** | **str** | Position risk limit | [optional] +**initial_rate** | **str** | Initial margin rate | [optional] +**maintenance_rate** | **str** | Maintenance margin rate | [optional] +**leverage_max** | **str** | Maximum leverage | [optional] +**deduction** | **str** | Maintenance margin quick calculation deduction amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesTicker.md b/docs/FuturesTicker.md index 9cd349b..2c9ba71 100644 --- a/docs/FuturesTicker.md +++ b/docs/FuturesTicker.md @@ -3,27 +3,27 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures contract. | [optional] -**last** | **str** | Last trading price. | [optional] -**change_percentage** | **str** | Change percentage. | [optional] -**total_size** | **str** | Contract total size. | [optional] -**low_24h** | **str** | Lowest trading price in recent 24h. | [optional] -**high_24h** | **str** | Highest trading price in recent 24h. | [optional] -**volume_24h** | **str** | Trade size in recent 24h. | [optional] -**volume_24h_btc** | **str** | Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_usd** | **str** | Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] -**volume_24h_base** | **str** | Trade volume in recent 24h, in base currency. | [optional] -**volume_24h_quote** | **str** | Trade volume in recent 24h, in quote currency. | [optional] -**volume_24h_settle** | **str** | Trade volume in recent 24h, in settle currency. | [optional] -**mark_price** | **str** | Recent mark price. | [optional] -**funding_rate** | **str** | Funding rate. | [optional] -**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`). | [optional] -**index_price** | **str** | Index price. | [optional] +**contract** | **str** | Futures contract | [optional] +**last** | **str** | Last trading price | [optional] +**change_percentage** | **str** | Price change percentage. Negative values indicate price decrease, e.g. -7.45 | [optional] +**total_size** | **str** | Contract total size | [optional] +**low_24h** | **str** | 24-hour lowest price | [optional] +**high_24h** | **str** | 24-hour highest price | [optional] +**volume_24h** | **str** | 24-hour trading volume | [optional] +**volume_24h_btc** | **str** | 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_usd** | **str** | 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) | [optional] +**volume_24h_base** | **str** | 24-hour trading volume in base currency | [optional] +**volume_24h_quote** | **str** | 24-hour trading volume in quote currency | [optional] +**volume_24h_settle** | **str** | 24-hour trading volume in settle currency | [optional] +**mark_price** | **str** | Recent mark price | [optional] +**funding_rate** | **str** | Funding rate | [optional] +**funding_rate_indicative** | **str** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] +**index_price** | **str** | Index price | [optional] **quanto_base_rate** | **str** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] -**lowest_ask** | **str** | Recent lowest ask. | [optional] -**lowest_size** | **str** | The latest seller's lowest price order quantity. | [optional] -**highest_bid** | **str** | Recent highest bid. | [optional] -**highest_size** | **str** | The latest buyer's highest price order volume. | [optional] +**lowest_ask** | **str** | Recent lowest ask | [optional] +**lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] +**highest_bid** | **str** | Recent highest bid | [optional] +**highest_size** | **str** | The latest buyer's highest price order volume | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesTrade.md b/docs/FuturesTrade.md index 6b6970a..af3b9fe 100644 --- a/docs/FuturesTrade.md +++ b/docs/FuturesTrade.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Trade ID. | [optional] -**create_time** | **float** | Trading time. | [optional] -**create_time_ms** | **float** | Trading time, with milliseconds set to 3 decimal places. | [optional] -**contract** | **str** | Futures contract. | [optional] -**size** | **int** | Trading size. | [optional] -**price** | **str** | Trading price (quote currency). | [optional] -**is_internal** | **bool** | Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. an internal trade, this field will not be returned. | [optional] +**id** | **int** | Fill ID | [optional] +**create_time** | **float** | Fill Time | [optional] +**create_time_ms** | **float** | Trade time, with millisecond precision to 3 decimal places | [optional] +**contract** | **str** | Futures contract | [optional] +**size** | **int** | Trading size | [optional] +**price** | **str** | Trade price (quote currency) | [optional] +**is_internal** | **bool** | Whether it is an internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the trade price may deviate from the market, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IndexConstituent.md b/docs/IndexConstituent.md index 1caf740..a80703f 100644 --- a/docs/IndexConstituent.md +++ b/docs/IndexConstituent.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**exchange** | **str** | Exchange. | [optional] -**symbols** | **list[str]** | Symbol list. | [optional] +**exchange** | **str** | Exchange | [optional] +**symbols** | **list[str]** | 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/InlineObject.md b/docs/InlineObject.md index 93fb3c4..dccf5f1 100644 --- a/docs/InlineObject.md +++ b/docs/InlineObject.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **str** | Full position-by-position model, ISOLATED-by-position, CROSS-full position. | -**contract** | **str** | Contract Market. | +**mode** | **str** | Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode | +**contract** | **str** | Futures market | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md index 67b01b4..31a5f58 100644 --- a/docs/InlineResponse2001.md +++ b/docs/InlineResponse2001.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **str** | | [optional] -**est_rate** | **str** | Unconverted percentage. | [optional] +**est_rate** | **str** | Unconverted percentage | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InsuranceRecord.md b/docs/InsuranceRecord.md index 3527179..cc34afc 100644 --- a/docs/InsuranceRecord.md +++ b/docs/InsuranceRecord.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **int** | Unix timestamp in seconds. | [optional] -**b** | **str** | Insurance balance. | [optional] +**t** | **int** | Unix timestamp in seconds | [optional] +**b** | **str** | Insurance 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/LedgerRecord.md b/docs/LedgerRecord.md index 8c6c629..869f179 100644 --- a/docs/LedgerRecord.md +++ b/docs/LedgerRecord.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Record ID. | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal. | [optional] [readonly] -**withdraw_order_id** | **str** | User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] -**timestamp** | **str** | Operation time. | [optional] [readonly] -**amount** | **str** | Currency amount. | -**currency** | **str** | Currency name. | -**address** | **str** | Withdrawal address. Required for withdrawals. | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal. | [optional] -**withdraw_id** | **str** | The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time | [optional] -**asset_class** | **str** | The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] -**status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - REVIEW: Under review | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals. | +**id** | **str** | Record ID | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] +**withdraw_order_id** | **str** | User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] +**timestamp** | **str** | Operation time | [optional] [readonly] +**amount** | **str** | Token amount | +**currency** | **str** | Currency name | +**address** | **str** | Withdrawal address. Required for withdrawals | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] +**withdraw_id** | **str** | Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled | [optional] +**asset_class** | **str** | Withdrawal record currency type, empty by default. Supports users to query withdrawal records in main area and innovation area on demand. Valid values: SPOT, PILOT SPOT: Main area PILOT: Innovation area | [optional] +**status** | **str** | Transaction status - DONE: Completed - CANCEL: Cancelled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: GateCode operation - EXTPEND: Sent, waiting for confirmation - FAIL: Failed on chain, waiting for confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: Pending manual review - REVIEW: Under review | [optional] [readonly] +**chain** | **str** | Name of the chain used in withdrawals | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiquidateOrder.md b/docs/LiquidateOrder.md index 34893a0..df396e0 100644 --- a/docs/LiquidateOrder.md +++ b/docs/LiquidateOrder.md @@ -1,14 +1,14 @@ # LiquidateOrder -Liquidate Order detail. +Spot liquidation order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**currency_pair** | **str** | Currency pair. | -**amount** | **str** | Trade amount. | -**price** | **str** | Order price. | -**action_mode** | **str** | Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] +**text** | **str** | Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) | [optional] +**currency_pair** | **str** | Currency pair | +**amount** | **str** | Trade amount | +**price** | **str** | Order price | +**action_mode** | **str** | Processing mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request and is not included in the response `ACK`: Asynchronous mode, only returns key order fields `RESULT`: No liquidation information `FULL`: Full mode (default) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginAccount.md b/docs/MarginAccount.md index f35da74..265656e 100644 --- a/docs/MarginAccount.md +++ b/docs/MarginAccount.md @@ -1,14 +1,14 @@ # MarginAccount -Margin account detail. `base` refers to base currency, while `quotes to quote currency +Margin account information for a trading pair. `base` corresponds to base currency account information, `quote` corresponds to quote currency account information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair. | [optional] -**account_type** | **str** | Account type, risk - risk rate account, mmr - maintenance margin market not activated | [optional] -**leverage** | **str** | User current market leverage multiple. | [optional] -**locked** | **bool** | Whether account is locked. | [optional] -**risk** | **str** | Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**account_type** | **str** | Account type: risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated | [optional] +**leverage** | **str** | User's current market leverage multiplier | [optional] +**locked** | **bool** | Whether the account is locked | [optional] +**risk** | **str** | Current risk rate of the margin account (returned when the account is a risk rate account) | [optional] **mmr** | **str** | Leveraged Account Current Maintenance Margin Rate (returned when the Account is Account) | [optional] **base** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional] **quote** | [**MarginAccountCurrency**](MarginAccountCurrency.md) | | [optional] diff --git a/docs/MarginAccountBook.md b/docs/MarginAccountBook.md index afc8922..f5f8c61 100644 --- a/docs/MarginAccountBook.md +++ b/docs/MarginAccountBook.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID. | [optional] -**time** | **str** | Balance changed timestamp. | [optional] -**time_ms** | **int** | The timestamp of the change (in milliseconds). | [optional] -**currency** | **str** | Currency changed. | [optional] -**currency_pair** | **str** | Account currency pair. | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out. | [optional] -**balance** | **str** | Balance after change. | [optional] +**id** | **str** | Balance change record ID | [optional] +**time** | **str** | Account change timestamp | [optional] +**time_ms** | **int** | The timestamp of the change (in milliseconds) | [optional] +**currency** | **str** | Currency changed | [optional] +**currency_pair** | **str** | Account trading pair | [optional] +**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] +**balance** | **str** | Balance after change | [optional] **type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginAccountCurrency.md b/docs/MarginAccountCurrency.md index c821455..edb06b6 100644 --- a/docs/MarginAccountCurrency.md +++ b/docs/MarginAccountCurrency.md @@ -1,14 +1,14 @@ # MarginAccountCurrency -Account currency details. +Currency account information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] -**available** | **str** | Amount suitable for margin trading. | [optional] -**locked** | **str** | Locked amount, used in margin trading. | [optional] -**borrowed** | **str** | Borrowed amount. | [optional] -**interest** | **str** | Unpaid interests. | [optional] +**currency** | **str** | Currency name | [optional] +**available** | **str** | Amount available for margin trading, available = margin + borrowed | [optional] +**locked** | **str** | Frozen funds, such as amounts already placed in margin market for order trading | [optional] +**borrowed** | **str** | Borrowed funds | [optional] +**interest** | **str** | Unpaid interest | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginApi.md b/docs/MarginApi.md index 2f92726..935da57 100644 --- a/docs/MarginApi.md +++ b/docs/MarginApi.md @@ -4,24 +4,24 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list. -[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | List margin account balance change history. -[**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list. -[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Retrieve user auto repayment setting. -[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user's auto repayment setting. -[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency. -[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Check the user's own leverage lending gradient in the current market. -[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient. -[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple. -[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query the user's leverage account list. -[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated). -[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated). +[**list_margin_accounts**](MarginApi.md#list_margin_accounts) | **GET** /margin/accounts | Margin account list +[**list_margin_account_book**](MarginApi.md#list_margin_account_book) | **GET** /margin/account_book | Query margin account balance change history +[**list_funding_accounts**](MarginApi.md#list_funding_accounts) | **GET** /margin/funding_accounts | Funding account list +[**get_auto_repay_status**](MarginApi.md#get_auto_repay_status) | **GET** /margin/auto_repay | Query user auto repayment settings +[**set_auto_repay**](MarginApi.md#set_auto_repay) | **POST** /margin/auto_repay | Update user auto repayment settings +[**get_margin_transferable**](MarginApi.md#get_margin_transferable) | **GET** /margin/transferable | Get maximum transferable amount for isolated margin +[**get_user_margin_tier**](MarginApi.md#get_user_margin_tier) | **GET** /margin/user/loan_margin_tiers | Query user's own leverage lending tiers in current market +[**get_market_margin_tier**](MarginApi.md#get_market_margin_tier) | **GET** /margin/loan_margin_tiers | Query current market leverage lending tiers +[**set_user_market_leverage**](MarginApi.md#set_user_market_leverage) | **POST** /margin/leverage/user_market_setting | Set user market leverage multiplier +[**list_margin_user_account**](MarginApi.md#list_margin_user_account) | **GET** /margin/user/account | Query user's isolated margin account list +[**list_cross_margin_loans**](MarginApi.md#list_cross_margin_loans) | **GET** /margin/cross/loans | Query cross margin borrow history (deprecated) +[**list_cross_margin_repayments**](MarginApi.md#list_cross_margin_repayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) # **list_margin_accounts** > list[MarginAccount] list_margin_accounts(currency_pair=currency_pair) -Margin account list. +Margin account list ### Example @@ -47,10 +47,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) try: - # Margin account list. + # Margin account list api_response = api_instance.list_margin_accounts(currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -63,7 +63,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | [optional] + **currency_pair** | **str**| Currency pair | [optional] ### Return type @@ -81,16 +81,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_margin_account_book** > list[MarginAccountBook] list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) -List margin account balance change history. +Query margin account balance change history -Only transferals from and to margin account are provided for now. Time range allows 30 days at most +Currently only provides transfer history to and from margin accounts. Query time range cannot exceed 30 days ### Example @@ -116,16 +116,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'currency_example' # str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional) -currency_pair = 'currency_pair_example' # str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional) -type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) -_from = 1627706330 # int | Start timestamp of the query. (optional) -to = 1635329650 # int | Time range ending, default to current time. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +currency = 'currency_example' # str | Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified. (optional) +currency_pair = 'currency_pair_example' # str | Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified (optional) +type = 'lend' # str | Query by specified account change type. If not specified, all change types will be included. (optional) +_from = 1627706330 # int | Start timestamp for the query (optional) +to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) try: - # List margin account balance change history. + # Query margin account balance change history api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, type=type, _from=_from, to=to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -138,13 +138,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] - **currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **currency** | **str**| Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified. | [optional] + **currency_pair** | **str**| Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified | [optional] + **type** | **str**| Query by specified account change type. If not specified, all change types will be included. | [optional] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] ### Return type @@ -162,14 +162,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_funding_accounts** > list[FundingAccount] list_funding_accounts(currency=currency) -Funding account list. +Funding account list ### Example @@ -195,10 +195,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +currency = 'BTC' # str | Query by specified currency name (optional) try: - # Funding account list. + # Funding account list api_response = api_instance.list_funding_accounts(currency=currency) print(api_response) except GateApiException as ex: @@ -211,7 +211,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] + **currency** | **str**| Query by specified currency name | [optional] ### Return type @@ -229,14 +229,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_auto_repay_status** > AutoRepaySetting get_auto_repay_status() -Retrieve user auto repayment setting. +Query user auto repayment settings ### Example @@ -264,7 +264,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MarginApi(api_client) try: - # Retrieve user auto repayment setting. + # Query user auto repayment settings api_response = api_instance.get_auto_repay_status() print(api_response) except GateApiException as ex: @@ -292,14 +292,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting. | - | +**200** | User's current auto repayment settings | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_auto_repay** > AutoRepaySetting set_auto_repay(status) -Update user's auto repayment setting. +Update user auto repayment settings ### Example @@ -325,10 +325,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -status = 'on' # str | New auto repayment status. `on` - enabled, `off` - disabled. +status = 'on' # str | Whether to enable auto repayment: `on` - enabled, `off` - disabled try: - # Update user's auto repayment setting. + # Update user auto repayment settings api_response = api_instance.set_auto_repay(status) print(api_response) except GateApiException as ex: @@ -341,7 +341,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| New auto repayment status. `on` - enabled, `off` - disabled. | + **status** | **str**| Whether to enable auto repayment: `on` - enabled, `off` - disabled | ### Return type @@ -359,14 +359,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Current auto repayment setting. | - | +**200** | User's current auto repayment settings | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_margin_transferable** > MarginTransferable get_margin_transferable(currency, currency_pair=currency_pair) -Get the max transferable amount for a specific margin currency. +Get maximum transferable amount for isolated margin ### Example @@ -392,11 +392,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +currency = 'BTC' # str | Query by specified currency name +currency_pair = 'BTC_USDT' # str | Currency pair (optional) try: - # Get the max transferable amount for a specific margin currency. + # Get maximum transferable amount for isolated margin api_response = api_instance.get_margin_transferable(currency, currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -409,8 +409,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | - **currency_pair** | **str**| Currency pair. | [optional] + **currency** | **str**| Query by specified currency name | + **currency_pair** | **str**| Currency pair | [optional] ### Return type @@ -428,14 +428,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_margin_tier** > list[MarginLeverageTier] get_user_margin_tier(currency_pair) -Check the user's own leverage lending gradient in the current market. +Query user's own leverage lending tiers in current market ### Example @@ -461,10 +461,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. +currency_pair = 'BTC_USDT' # str | Currency pair try: - # Check the user's own leverage lending gradient in the current market. + # Query user's own leverage lending tiers in current market api_response = api_instance.get_user_margin_tier(currency_pair) print(api_response) except GateApiException as ex: @@ -477,7 +477,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | + **currency_pair** | **str**| Currency pair | ### Return type @@ -495,14 +495,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_market_margin_tier** > list[MarginLeverageTier] get_market_margin_tier(currency_pair) -Query the current market leverage lending gradient. +Query current market leverage lending tiers ### Example @@ -519,10 +519,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. +currency_pair = 'BTC_USDT' # str | Currency pair try: - # Query the current market leverage lending gradient. + # Query current market leverage lending tiers api_response = api_instance.get_market_margin_tier(currency_pair) print(api_response) except GateApiException as ex: @@ -535,7 +535,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | + **currency_pair** | **str**| Currency pair | ### Return type @@ -553,14 +553,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_user_market_leverage** > set_user_market_leverage(margin_market_leverage) -Set the user market leverage multiple. +Set user market leverage multiplier ### Example @@ -589,7 +589,7 @@ api_instance = gate_api.MarginApi(api_client) margin_market_leverage = gate_api.MarginMarketLeverage() # MarginMarketLeverage | try: - # Set the user market leverage multiple. + # Set user market leverage multiplier api_instance.set_user_market_leverage(margin_market_leverage) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -619,16 +619,16 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Success. | - | +**204** | Set successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_margin_user_account** > list[MarginAccount] list_margin_user_account(currency_pair=currency_pair) -Query the user's leverage account list. +Query user's isolated margin account list -Support querying risk rate per position account and margin rate per position account +Supports querying risk ratio isolated accounts and margin ratio isolated accounts ### Example @@ -654,10 +654,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) try: - # Query the user's leverage account list. + # Query user's isolated margin account list api_response = api_instance.list_margin_user_account(currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -670,7 +670,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | [optional] + **currency_pair** | **str**| Currency pair | [optional] ### Return type @@ -688,16 +688,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_cross_margin_loans** > list[CrossMarginLoan] list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) -List cross margin borrow history. (deprecated). +Query cross margin borrow history (deprecated) -Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. +Sorted by creation time in descending order by default. Set `reverse=false` for ascending order ### Example @@ -723,14 +723,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginApi(api_client) -status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.). -currency = 'currency_example' # str | Filter by currency. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +status = 56 # int | Filter by status. Supported values are 2 and 3. (deprecated.) +currency = 'currency_example' # str | Query by specified currency, includes all currencies if not specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) try: - # List cross margin borrow history. (deprecated). + # Query cross margin borrow history (deprecated) api_response = api_instance.list_cross_margin_loans(status, currency=currency, limit=limit, offset=offset, reverse=reverse) print(api_response) except GateApiException as ex: @@ -743,10 +743,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.). | - **currency** | **str**| Filter by currency. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **status** | **int**| Filter by status. Supported values are 2 and 3. (deprecated.) | + **currency** | **str**| Query by specified currency, includes all currencies if not specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] ### Return type @@ -765,16 +765,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_cross_margin_repayments** > list[CrossMarginRepayment] list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) -Retrieve cross margin repayments. (deprecated). +Retrieve cross margin repayments. (deprecated) -Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. +Sorted by creation time in descending order by default. Set `reverse=false` for ascending order ### Example @@ -802,12 +802,12 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MarginApi(api_client) currency = 'BTC' # str | (optional) loan_id = '12345' # str | (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) reverse = True # bool | Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results (optional) (default to True) try: - # Retrieve cross margin repayments. (deprecated). + # Retrieve cross margin repayments. (deprecated) api_response = api_instance.list_cross_margin_repayments(currency=currency, loan_id=loan_id, limit=limit, offset=offset, reverse=reverse) print(api_response) except GateApiException as ex: @@ -822,8 +822,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency** | **str**| | [optional] **loan_id** | **str**| | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **reverse** | **bool**| Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results | [optional] [default to True] ### Return type @@ -842,7 +842,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/MarginLeverageTier.md b/docs/MarginLeverageTier.md index c2fa771..0a36030 100644 --- a/docs/MarginLeverageTier.md +++ b/docs/MarginLeverageTier.md @@ -1,12 +1,12 @@ # MarginLeverageTier -Market gradient information. +Market gradient information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**upper_limit** | **str** | Maximum loan limit. | [optional] -**mmr** | **str** | Maintenance margin rate. | [optional] -**leverage** | **str** | Maximum leverage multiple. | [optional] +**upper_limit** | **str** | Maximum loan limit | [optional] +**mmr** | **str** | Maintenance margin rate | [optional] +**leverage** | **str** | Maximum leverage multiple | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginMarketLeverage.md b/docs/MarginMarketLeverage.md index d4f0707..63ce686 100644 --- a/docs/MarginMarketLeverage.md +++ b/docs/MarginMarketLeverage.md @@ -1,11 +1,11 @@ # MarginMarketLeverage -Market leverage settings. +Market leverage settings ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair. | [optional] -**leverage** | **str** | Position leverage. | +**currency_pair** | **str** | Market | [optional] +**leverage** | **str** | Position leverage | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginTiers.md b/docs/MarginTiers.md index 7a07dd4..455092c 100644 --- a/docs/MarginTiers.md +++ b/docs/MarginTiers.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **str** | Tier. | [optional] -**margin_rate** | **str** | Discount. | [optional] -**lower_limit** | **str** | Lower limit. | [optional] -**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier). | [optional] -**leverage** | **str** | Position leverage. | [optional] +**tier** | **str** | Tier | [optional] +**margin_rate** | **str** | Discount | [optional] +**lower_limit** | **str** | Lower limit | [optional] +**upper_limit** | **str** | Upper limit, \"\" indicates greater than (the last tier) | [optional] +**leverage** | **str** | Position leverage | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginTransferable.md b/docs/MarginTransferable.md index 6a34651..af64207 100644 --- a/docs/MarginTransferable.md +++ b/docs/MarginTransferable.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail. | [optional] -**currency_pair** | **str** | Currency pair. | [optional] -**amount** | **str** | Max transferable amount. | [optional] +**currency** | **str** | Currency detail | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**amount** | **str** | Max transferable amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md index 98768b1..02afa4e 100644 --- a/docs/MarginUniApi.md +++ b/docs/MarginUniApi.md @@ -4,20 +4,20 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets. -[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market. -[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate. -[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | List loans. -[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay. -[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Get load records. -[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | List interest records. -[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable. +[**list_uni_currency_pairs**](MarginUniApi.md#list_uni_currency_pairs) | **GET** /margin/uni/currency_pairs | List lending markets +[**get_uni_currency_pair**](MarginUniApi.md#get_uni_currency_pair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get lending market details +[**get_margin_uni_estimate_rate**](MarginUniApi.md#get_margin_uni_estimate_rate) | **GET** /margin/uni/estimate_rate | Estimate interest rate for isolated margin currencies +[**list_uni_loans**](MarginUniApi.md#list_uni_loans) | **GET** /margin/uni/loans | Query loans +[**create_uni_loan**](MarginUniApi.md#create_uni_loan) | **POST** /margin/uni/loans | Borrow or repay +[**list_uni_loan_records**](MarginUniApi.md#list_uni_loan_records) | **GET** /margin/uni/loan_records | Query loan records +[**list_uni_loan_interest_records**](MarginUniApi.md#list_uni_loan_interest_records) | **GET** /margin/uni/interest_records | Query interest deduction records +[**get_uni_borrowable**](MarginUniApi.md#get_uni_borrowable) | **GET** /margin/uni/borrowable | Query maximum borrowable amount by currency # **list_uni_currency_pairs** > list[UniCurrencyPair] list_uni_currency_pairs() -List lending markets. +List lending markets ### Example @@ -36,7 +36,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MarginUniApi(api_client) try: - # List lending markets. + # List lending markets api_response = api_instance.list_uni_currency_pairs() print(api_response) except GateApiException as ex: @@ -64,14 +64,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_currency_pair** > UniCurrencyPair get_uni_currency_pair(currency_pair) -Get detail of lending market. +Get lending market details ### Example @@ -88,10 +88,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'AE_USDT' # str | Currency pair. +currency_pair = 'AE_USDT' # str | Currency pair try: - # Get detail of lending market. + # Get lending market details api_response = api_instance.get_uni_currency_pair(currency_pair) print(api_response) except GateApiException as ex: @@ -104,7 +104,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | + **currency_pair** | **str**| Currency pair | ### Return type @@ -122,16 +122,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_margin_uni_estimate_rate** > dict(str, str) get_margin_uni_estimate_rate(currencies) -Estimate interest Rate. +Estimate interest rate for isolated margin currencies -Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. +Interest rates change hourly based on lending depth, so completely accurate rates cannot be provided. ### Example @@ -157,10 +157,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | An array of up to 10 specifying the currency name. +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Array of currency names to query, maximum 10 try: - # Estimate interest Rate. + # Estimate interest rate for isolated margin currencies api_response = api_instance.get_margin_uni_estimate_rate(currencies) print(api_response) except GateApiException as ex: @@ -173,7 +173,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| An array of up to 10 specifying the currency name. | + **currencies** | [**list[str]**](str.md)| Array of currency names to query, maximum 10 | ### Return type @@ -191,14 +191,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_loans** > list[UniLoan] list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) -List loans. +Query loans ### Example @@ -224,13 +224,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) try: - # List loans. + # Query loans api_response = api_instance.list_uni_loans(currency_pair=currency_pair, currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -243,10 +243,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | [optional] - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] ### Return type @@ -264,14 +264,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_uni_loan** > create_uni_loan(create_uni_loan) -Borrow or repay. +Borrow or repay ### Example @@ -300,7 +300,7 @@ api_instance = gate_api.MarginUniApi(api_client) create_uni_loan = gate_api.CreateUniLoan() # CreateUniLoan | try: - # Borrow or repay. + # Borrow or repay api_instance.create_uni_loan(create_uni_loan) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -330,14 +330,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Operated successfully. | - | +**204** | Operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_loan_records** > list[UniLoanRecord] list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) -Get load records. +Query loan records ### Example @@ -363,14 +363,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -type = 'type_example' # str | type: borrow - borrow, repay - repay. (optional) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +type = 'type_example' # str | Type: `borrow` - borrow, `repay` - repay (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) try: - # Get load records. + # Query loan records api_response = api_instance.list_uni_loan_records(type=type, currency=currency, currency_pair=currency_pair, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -383,11 +383,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| type: borrow - borrow, repay - repay. | [optional] - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **currency_pair** | **str**| Currency pair. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **type** | **str**| Type: `borrow` - borrow, `repay` - repay | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **currency_pair** | **str**| Currency pair | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] ### Return type @@ -405,14 +405,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_uni_loan_interest_records** > list[UniLoanInterestRecord] list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) -List interest records. +Query interest deduction records ### Example @@ -438,15 +438,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List interest records. + # Query interest deduction records api_response = api_instance.list_uni_loan_interest_records(currency_pair=currency_pair, currency=currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -459,10 +459,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | [optional] - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **currency_pair** | **str**| Currency pair | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -482,14 +482,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_uni_borrowable** > MaxUniBorrowable get_uni_borrowable(currency, currency_pair) -Get maximum borrowable. +Query maximum borrowable amount by currency ### Example @@ -515,11 +515,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MarginUniApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. -currency_pair = 'BTC_USDT' # str | Currency pair. +currency = 'BTC' # str | Query by specified currency name +currency_pair = 'BTC_USDT' # str | Currency pair try: - # Get maximum borrowable. + # Query maximum borrowable amount by currency api_response = api_instance.get_uni_borrowable(currency, currency_pair) print(api_response) except GateApiException as ex: @@ -532,8 +532,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | - **currency_pair** | **str**| Currency pair. | + **currency** | **str**| Query by specified currency name | + **currency_pair** | **str**| Currency pair | ### Return type @@ -551,7 +551,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/MaxUniBorrowable.md b/docs/MaxUniBorrowable.md index 99c0a5a..107dbab 100644 --- a/docs/MaxUniBorrowable.md +++ b/docs/MaxUniBorrowable.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [readonly] -**currency_pair** | **str** | Currency pair. | [optional] [readonly] -**borrowable** | **str** | Maximum borrowable. | [readonly] +**currency** | **str** | Currency | [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**borrowable** | **str** | Maximum borrowable | [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/MockFuturesOrder.md b/docs/MockFuturesOrder.md index b0ab054..0d03d06 100644 --- a/docs/MockFuturesOrder.md +++ b/docs/MockFuturesOrder.md @@ -1,12 +1,12 @@ # MockFuturesOrder -Futures order. +Futures order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | -**size** | **str** | Futures quantity, representing the initial order quantity, not involved in actual settlement. | -**left** | **str** | Unfilled contract quantity, involved in actual calculation. | +**contract** | **str** | Futures name, currently only supports USDT perpetual contracts for BTC and ETH | +**size** | **str** | Contract quantity, representing the initial order quantity, not involved in actual settlement | +**left** | **str** | Unfilled contract quantity, involved in actual calculation | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockFuturesPosition.md b/docs/MockFuturesPosition.md index 9563213..f6eccc7 100644 --- a/docs/MockFuturesPosition.md +++ b/docs/MockFuturesPosition.md @@ -1,11 +1,11 @@ # MockFuturesPosition -Futures positions. +Futures positions ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **str** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | -**size** | **str** | Position size, measured in contract units. | +**contract** | **str** | Futures name, currently only supports USDT perpetual contracts for BTC and ETH | +**size** | **str** | Position size, measured in contract quantity | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockMarginResult.md b/docs/MockMarginResult.md index 76b8d2a..0ea3b20 100644 --- a/docs/MockMarginResult.md +++ b/docs/MockMarginResult.md @@ -1,16 +1,16 @@ # MockMarginResult -Margin result. +Margin result ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` position | [optional] -**profit_loss_ranges** | [**list[ProfitLossRange]**](ProfitLossRange.md) | The results of 3 pressure scenarios for MR1. | [optional] +**type** | **str** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position | [optional] +**profit_loss_ranges** | [**list[ProfitLossRange]**](ProfitLossRange.md) | Results of 33 stress scenarios for MR1 | [optional] **max_loss** | [**ProfitLossRange**](.md) | 最大损失 | [optional] -**mr1** | **str** | Stress testing. | [optional] -**mr2** | **str** | Basis spread risk. | [optional] -**mr3** | **str** | Volatility spread risk. | [optional] -**mr4** | **str** | Option short risk. | [optional] +**mr1** | **str** | Stress testing | [optional] +**mr2** | **str** | Basis spread risk | [optional] +**mr3** | **str** | Volatility spread risk | [optional] +**mr4** | **str** | Option short risk | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockOptionsOrder.md b/docs/MockOptionsOrder.md index 819b975..054d3f4 100644 --- a/docs/MockOptionsOrder.md +++ b/docs/MockOptionsOrder.md @@ -1,12 +1,12 @@ # MockOptionsOrder -Option orders. +Option orders ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**options_name** | **str** | Option name, currently only supports options for BTC and ETH with USDT. | -**size** | **str** | Initial order quantity, not involved in actual calculation. | -**left** | **str** | Unfilled contract quantity, involved in actual calculation. | +**options_name** | **str** | Option name, currently only supports USDT options for BTC and ETH | +**size** | **str** | Initial order quantity, not involved in actual calculation | +**left** | **str** | Unfilled contract quantity, involved in actual calculation | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockOptionsPosition.md b/docs/MockOptionsPosition.md index 61310f3..f7c0e53 100644 --- a/docs/MockOptionsPosition.md +++ b/docs/MockOptionsPosition.md @@ -1,11 +1,11 @@ # MockOptionsPosition -Options positions. +Options positions ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**options_name** | **str** | Option name, currently only supports options for BTC and ETH with USDT. | -**size** | **str** | Position size, measured in contract units. | +**options_name** | **str** | Option name, currently only supports USDT options for BTC and ETH | +**size** | **str** | Position size, measured in contract quantity | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockRiskUnit.md b/docs/MockRiskUnit.md index 84e2a86..cf6f234 100644 --- a/docs/MockRiskUnit.md +++ b/docs/MockRiskUnit.md @@ -1,18 +1,18 @@ # MockRiskUnit -Risk unit. +Risk unit ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**symbol** | **str** | Risk unit name. | [optional] -**spot_in_use** | **str** | Spot usage. | [optional] -**maintain_margin** | **str** | Maintenance margin. | [optional] -**initial_margin** | **str** | Initial margin. | [optional] -**margin_result** | [**list[MockMarginResult]**](MockMarginResult.md) | Margin result. | [optional] -**delta** | **str** | Total Delta of risk unit. | [optional] -**gamma** | **str** | Total Gamma of risk unit. | [optional] -**theta** | **str** | Total Theta of risk unit. | [optional] -**vega** | **str** | Total Vega of risk unit. | [optional] +**symbol** | **str** | Risk unit name | [optional] +**spot_in_use** | **str** | Spot hedge usage | [optional] +**maintain_margin** | **str** | Maintenance margin | [optional] +**initial_margin** | **str** | Initial margin | [optional] +**margin_result** | [**list[MockMarginResult]**](MockMarginResult.md) | Margin result | [optional] +**delta** | **str** | Total Delta of risk unit | [optional] +**gamma** | **str** | Total Gamma of risk unit | [optional] +**theta** | **str** | Total Theta of risk unit | [optional] +**vega** | **str** | Total Vega of risk unit | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockSpotBalance.md b/docs/MockSpotBalance.md index bf1f10a..54bb762 100644 --- a/docs/MockSpotBalance.md +++ b/docs/MockSpotBalance.md @@ -1,11 +1,11 @@ # MockSpotBalance -Spot. +Spot ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | -**equity** | **str** | Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. | +**currency** | **str** | Currency name | +**equity** | **str** | Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports BTC and ETH | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MockSpotOrder.md b/docs/MockSpotOrder.md index 5ce7657..3b3d340 100644 --- a/docs/MockSpotOrder.md +++ b/docs/MockSpotOrder.md @@ -1,14 +1,14 @@ # MockSpotOrder -Spot orders. +Spot orders ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pairs** | **str** | Currency pair. | -**order_price** | **str** | Price. | -**count** | **str** | Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. | [optional] -**left** | **str** | Unfilled quantity, involved in actual calculation. | -**type** | **str** | Order type, sell - sell order, buy - buy order. | +**currency_pairs** | **str** | Market | +**order_price** | **str** | Price | +**count** | **str** | Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports BTC and ETH Currently only supports three currencies: BTC, ETH | [optional] +**left** | **str** | Unfilled quantity, involved in actual calculation | +**type** | **str** | Order type, sell - sell order, buy - buy order | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiChainAddressItem.md b/docs/MultiChainAddressItem.md index d7d5f88..5309ff3 100644 --- a/docs/MultiChainAddressItem.md +++ b/docs/MultiChainAddressItem.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**chain** | **str** | Name of the chain. | [optional] -**address** | **str** | Deposit address. | [optional] -**payment_id** | **str** | Notes that some currencies required(e.g., Tag, Memo) when depositing. | [optional] -**payment_name** | **str** | Note type, `Tag` or `Memo`. | [optional] +**chain** | **str** | Name of the chain | [optional] +**address** | **str** | Deposit address | [optional] +**payment_id** | **str** | Notes that some currencies required(e.g., Tag, Memo) when depositing | [optional] +**payment_name** | **str** | Note type, `Tag` or `Memo` | [optional] **obtain_failed** | **int** | The obtain failed status- 0: address successfully obtained- 1: failed to obtain address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralCurrency.md b/docs/MultiCollateralCurrency.md index 68958c2..f309656 100644 --- a/docs/MultiCollateralCurrency.md +++ b/docs/MultiCollateralCurrency.md @@ -1,11 +1,11 @@ # MultiCollateralCurrency -Borrowing and collateral currencies supported for Multi-Collateral. +Borrowing and collateral currencies supported for Multi-Collateral ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**loan_currencies** | [**list[MultiLoanItem]**](MultiLoanItem.md) | List of supported borrowing currencies. | [optional] -**collateral_currencies** | [**list[MultiCollateralItem]**](MultiCollateralItem.md) | List of supported collateral currencies. | [optional] +**loan_currencies** | [**list[MultiLoanItem]**](MultiLoanItem.md) | List of supported borrowing currencies | [optional] +**collateral_currencies** | [**list[MultiCollateralItem]**](MultiCollateralItem.md) | List of supported collateral currencies | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralItem.md b/docs/MultiCollateralItem.md index 57a7909..3e9ba07 100644 --- a/docs/MultiCollateralItem.md +++ b/docs/MultiCollateralItem.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**discount** | **str** | Discount. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**discount** | **str** | Discount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md index abecee3..8cc3516 100644 --- a/docs/MultiCollateralLoanApi.md +++ b/docs/MultiCollateralLoanApi.md @@ -4,24 +4,24 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_multi_collateral_orders**](MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | List Multi-Collateral Orders. -[**create_multi_collateral**](MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Create Multi-Collateral Order. -[**get_multi_collateral_order_detail**](MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail. -[**list_multi_repay_records**](MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | List Multi-Collateral Repay Records. -[**repay_multi_collateral_loan**](MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Repay Multi-Collateral Loan. -[**list_multi_collateral_records**](MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records. -[**operate_multi_collateral**](MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Operate Multi-Collateral. -[**list_user_currency_quota**](MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | List User Currency Quota. -[**list_multi_collateral_currencies**](MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral. -[**get_multi_collateral_ltv**](MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio. -[**get_multi_collateral_fix_rate**](MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days. -[**get_multi_collateral_current_rate**](MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency. +[**list_multi_collateral_orders**](MultiCollateralLoanApi.md#list_multi_collateral_orders) | **GET** /loan/multi_collateral/orders | Query multi-currency collateral order list +[**create_multi_collateral**](MultiCollateralLoanApi.md#create_multi_collateral) | **POST** /loan/multi_collateral/orders | Place multi-currency collateral order +[**get_multi_collateral_order_detail**](MultiCollateralLoanApi.md#get_multi_collateral_order_detail) | **GET** /loan/multi_collateral/orders/{order_id} | Query order details +[**list_multi_repay_records**](MultiCollateralLoanApi.md#list_multi_repay_records) | **GET** /loan/multi_collateral/repay | Query multi-currency collateral repayment records +[**repay_multi_collateral_loan**](MultiCollateralLoanApi.md#repay_multi_collateral_loan) | **POST** /loan/multi_collateral/repay | Multi-currency collateral repayment +[**list_multi_collateral_records**](MultiCollateralLoanApi.md#list_multi_collateral_records) | **GET** /loan/multi_collateral/mortgage | Query collateral adjustment records +[**operate_multi_collateral**](MultiCollateralLoanApi.md#operate_multi_collateral) | **POST** /loan/multi_collateral/mortgage | Add or withdraw collateral +[**list_user_currency_quota**](MultiCollateralLoanApi.md#list_user_currency_quota) | **GET** /loan/multi_collateral/currency_quota | Query user's collateral and borrowing currency quota information +[**list_multi_collateral_currencies**](MultiCollateralLoanApi.md#list_multi_collateral_currencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies for multi-currency collateral +[**get_multi_collateral_ltv**](MultiCollateralLoanApi.md#get_multi_collateral_ltv) | **GET** /loan/multi_collateral/ltv | Query collateralization ratio information +[**get_multi_collateral_fix_rate**](MultiCollateralLoanApi.md#get_multi_collateral_fix_rate) | **GET** /loan/multi_collateral/fixed_rate | Query currency's 7-day and 30-day fixed interest rates +[**get_multi_collateral_current_rate**](MultiCollateralLoanApi.md#get_multi_collateral_current_rate) | **GET** /loan/multi_collateral/current_rate | Query currency's current interest rate # **list_multi_collateral_orders** > list[MultiCollateralOrder] list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) -List Multi-Collateral Orders. +Query multi-currency collateral order list ### Example @@ -47,13 +47,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -page = 1 # int | Page number. (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list. (optional) (default to 10) -sort = 'ltv_asc' # str | Query the current interest rate of the currency in the previous hour. (optional) -order_type = 'current' # str | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 10 # int | Maximum number of records returned in a single list (optional) (default to 10) +sort = 'ltv_asc' # str | Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. (optional) +order_type = 'current' # str | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified (optional) try: - # List Multi-Collateral Orders. + # Query multi-currency collateral order list api_response = api_instance.list_multi_collateral_orders(page=page, limit=limit, sort=sort, order_type=order_type) print(api_response) except GateApiException as ex: @@ -66,10 +66,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 10] - **sort** | **str**| Query the current interest rate of the currency in the previous hour. | [optional] - **order_type** | **str**| Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 10] + **sort** | **str**| Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. | [optional] + **order_type** | **str**| Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional] ### Return type @@ -87,14 +87,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_multi_collateral** > OrderResp create_multi_collateral(create_multi_collateral_order) -Create Multi-Collateral Order. +Place multi-currency collateral order ### Example @@ -123,7 +123,7 @@ api_instance = gate_api.MultiCollateralLoanApi(api_client) create_multi_collateral_order = gate_api.CreateMultiCollateralOrder() # CreateMultiCollateralOrder | try: - # Create Multi-Collateral Order. + # Place multi-currency collateral order api_response = api_instance.create_multi_collateral(create_multi_collateral_order) print(api_response) except GateApiException as ex: @@ -154,14 +154,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Order placed successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_multi_collateral_order_detail** > MultiCollateralOrder get_multi_collateral_order_detail(order_id) -Get Multi-Collateral Order Detail. +Query order details ### Example @@ -187,10 +187,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -order_id = '12345' # str | Order ID returned on successful order creation. +order_id = '12345' # str | Order ID returned when order is successfully created try: - # Get Multi-Collateral Order Detail. + # Query order details api_response = api_instance.get_multi_collateral_order_detail(order_id) print(api_response) except GateApiException as ex: @@ -203,7 +203,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Order ID returned on successful order creation. | + **order_id** | **str**| Order ID returned when order is successfully created | ### Return type @@ -221,14 +221,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Order details queried successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_multi_repay_records** > list[MultiRepayRecord] list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) -List Multi-Collateral Repay Records. +Query multi-currency collateral repayment records ### Example @@ -254,15 +254,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -type = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation. -borrow_currency = 'USDT' # str | Borrowed currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list. (optional) (default to 10) -_from = 1609459200 # int | Start timestamp of the query. (optional) -to = 1609459200 # int | Time range ending, default to current time. (optional) +type = 'repay' # str | Operation type: repay - Regular repayment, liquidate - Liquidation +borrow_currency = 'USDT' # str | Borrowed currency (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 10 # int | Maximum number of records returned in a single list (optional) (default to 10) +_from = 1609459200 # int | Start timestamp for the query (optional) +to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional) try: - # List Multi-Collateral Repay Records. + # Query multi-currency collateral repayment records api_response = api_instance.list_multi_repay_records(type, borrow_currency=borrow_currency, page=page, limit=limit, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -275,12 +275,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation. | - **borrow_currency** | **str**| Borrowed currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 10] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] + **type** | **str**| Operation type: repay - Regular repayment, liquidate - Liquidation | + **borrow_currency** | **str**| Borrowed currency | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 10] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] ### Return type @@ -298,14 +298,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repay_multi_collateral_loan** > MultiRepayResp repay_multi_collateral_loan(repay_multi_loan) -Repay Multi-Collateral Loan. +Multi-currency collateral repayment ### Example @@ -334,7 +334,7 @@ api_instance = gate_api.MultiCollateralLoanApi(api_client) repay_multi_loan = gate_api.RepayMultiLoan() # RepayMultiLoan | try: - # Repay Multi-Collateral Loan. + # Multi-currency collateral repayment api_response = api_instance.repay_multi_collateral_loan(repay_multi_loan) print(api_response) except GateApiException as ex: @@ -365,14 +365,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully. | - | +**200** | Operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_multi_collateral_records** > list[MultiCollateralRecord] list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) -Query collateral adjustment records. +Query collateral adjustment records ### Example @@ -398,14 +398,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -page = 1 # int | Page number. (optional) (default to 1) -limit = 10 # int | Maximum number of records to be returned in a single list. (optional) (default to 10) -_from = 1609459200 # int | Start timestamp of the query. (optional) -to = 1609459200 # int | Time range ending, default to current time. (optional) -collateral_currency = 'BTC' # str | Collateral. (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 10 # int | Maximum number of records returned in a single list (optional) (default to 10) +_from = 1609459200 # int | Start timestamp for the query (optional) +to = 1609459200 # int | End timestamp for the query, defaults to current time if not specified (optional) +collateral_currency = 'BTC' # str | Collateral currency (optional) try: - # Query collateral adjustment records. + # Query collateral adjustment records api_response = api_instance.list_multi_collateral_records(page=page, limit=limit, _from=_from, to=to, collateral_currency=collateral_currency) print(api_response) except GateApiException as ex: @@ -418,11 +418,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 10] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **collateral_currency** | **str**| Collateral. | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 10] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **collateral_currency** | **str**| Collateral currency | [optional] ### Return type @@ -440,14 +440,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **operate_multi_collateral** > CollateralAdjustRes operate_multi_collateral(collateral_adjust) -Operate Multi-Collateral. +Add or withdraw collateral ### Example @@ -476,7 +476,7 @@ api_instance = gate_api.MultiCollateralLoanApi(api_client) collateral_adjust = gate_api.CollateralAdjust() # CollateralAdjust | try: - # Operate Multi-Collateral. + # Add or withdraw collateral api_response = api_instance.operate_multi_collateral(collateral_adjust) print(api_response) except GateApiException as ex: @@ -507,14 +507,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully. | - | +**200** | Operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_user_currency_quota** > list[CurrencyQuota] list_user_currency_quota(type, currency) -List User Currency Quota. +Query user's collateral and borrowing currency quota information ### Example @@ -540,11 +540,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -type = 'collateral' # str | Currency type: collateral - Collateral currency, borrow - Borrowing. -currency = 'BTC' # str | When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed +type = 'collateral' # str | Currency type: collateral - Collateral currency, borrow - Borrowing currency +currency = 'BTC' # str | When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. try: - # List User Currency Quota. + # Query user's collateral and borrowing currency quota information api_response = api_instance.list_user_currency_quota(type, currency) print(api_response) except GateApiException as ex: @@ -557,8 +557,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| Currency type: collateral - Collateral currency, borrow - Borrowing. | - **currency** | **str**| When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed | + **type** | **str**| Currency type: collateral - Collateral currency, borrow - Borrowing currency | + **currency** | **str**| When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. | ### Return type @@ -576,14 +576,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_multi_collateral_currencies** > MultiCollateralCurrency list_multi_collateral_currencies() -Query supported borrowing and collateral currencies in Multi-Collateral. +Query supported borrowing and collateral currencies for multi-currency collateral ### Example @@ -602,7 +602,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MultiCollateralLoanApi(api_client) try: - # Query supported borrowing and collateral currencies in Multi-Collateral. + # Query supported borrowing and collateral currencies for multi-currency collateral api_response = api_instance.list_multi_collateral_currencies() print(api_response) except GateApiException as ex: @@ -630,16 +630,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_multi_collateral_ltv** > CollateralLtv get_multi_collateral_ltv() -Get Multi-Collateral ratio. +Query collateralization ratio information -The Multi-Collateral ratio is fixed, irrespective of the currency. +Multi-currency collateral ratio is fixed, independent of currency ### Example @@ -658,7 +658,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MultiCollateralLoanApi(api_client) try: - # Get Multi-Collateral ratio. + # Query collateralization ratio information api_response = api_instance.get_multi_collateral_ltv() print(api_response) except GateApiException as ex: @@ -686,14 +686,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_multi_collateral_fix_rate** > list[CollateralFixRate] get_multi_collateral_fix_rate() -Query fixed interest rates for the currency for 7 days and 30 days. +Query currency's 7-day and 30-day fixed interest rates ### Example @@ -712,7 +712,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.MultiCollateralLoanApi(api_client) try: - # Query fixed interest rates for the currency for 7 days and 30 days. + # Query currency's 7-day and 30-day fixed interest rates api_response = api_instance.get_multi_collateral_fix_rate() print(api_response) except GateApiException as ex: @@ -740,16 +740,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_multi_collateral_current_rate** > list[CollateralCurrentRate] get_multi_collateral_current_rate(currencies, vip_level=vip_level) -Query the current interest rate of the currency. +Query currency's current interest rate -Query the current interest rate of the currency in the previous hour. +Query currency's current interest rate for the previous hour, current interest rate updates hourly ### Example @@ -766,11 +766,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.MultiCollateralLoanApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency name query array, separated by commas, maximum 100items. -vip_level = '0' # str | VIP level, defaults to 0 if not transferred. (optional) (default to '0') +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency name query array, separated by commas, maximum 100 items +vip_level = '0' # str | VIP level, defaults to 0 if not specified (optional) (default to '0') try: - # Query the current interest rate of the currency. + # Query currency's current interest rate api_response = api_instance.get_multi_collateral_current_rate(currencies, vip_level=vip_level) print(api_response) except GateApiException as ex: @@ -783,8 +783,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| Specify currency name query array, separated by commas, maximum 100items. | - **vip_level** | **str**| VIP level, defaults to 0 if not transferred. | [optional] [default to '0'] + **currencies** | [**list[str]**](str.md)| Specify currency name query array, separated by commas, maximum 100 items | + **vip_level** | **str**| VIP level, defaults to 0 if not specified | [optional] [default to '0'] ### Return type @@ -802,7 +802,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralOrder.md b/docs/MultiCollateralOrder.md index 8c4672c..3162049 100644 --- a/docs/MultiCollateralOrder.md +++ b/docs/MultiCollateralOrder.md @@ -1,23 +1,23 @@ # MultiCollateralOrder -Multi-Collateral Order. +Multi-Collateral Order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **str** | Order ID. | [optional] -**order_type** | **str** | current - current, fixed - fixed. | [optional] -**fixed_type** | **str** | Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. | [optional] -**fixed_rate** | **str** | Fixed interest rate. | [optional] -**expire_time** | **int** | Expiration time, timestamp, unit in seconds. | [optional] -**auto_renew** | **bool** | Fixed interest rate, automatic renewal. | [optional] -**auto_repay** | **bool** | Fixed interest rate, automatic repayment. | [optional] -**current_ltv** | **str** | The current collateralization rate. | [optional] +**order_id** | **str** | Order ID | [optional] +**order_type** | **str** | current - current, fixed - fixed | [optional] +**fixed_type** | **str** | Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days | [optional] +**fixed_rate** | **str** | Fixed interest rate | [optional] +**expire_time** | **int** | Expiration time, timestamp, unit in seconds | [optional] +**auto_renew** | **bool** | Fixed interest rate, auto-renewal | [optional] +**auto_repay** | **bool** | Fixed interest rate, auto-repayment | [optional] +**current_ltv** | **str** | Current collateralization rate | [optional] **status** | **str** | Order status: - initial: Initial state after placing the order - collateral_deducted: Collateral deduction successful - collateral_returning: Loan failed - Collateral return pending - lent: Loan successful - repaying: Repayment in progress - liquidating: Liquidation in progress - finished: Order completed - closed_liquidated: Liquidation and repayment completed | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] -**total_left_repay_usdt** | **str** | Value of Left repay amount converted in USDT. | [optional] -**total_left_collateral_usdt** | **str** | Value of Collateral amount in USDT. | [optional] -**borrow_currencies** | [**list[BorrowCurrencyInfo]**](BorrowCurrencyInfo.md) | Borrowing Currency List. | [optional] -**collateral_currencies** | [**list[CollateralCurrencyInfo]**](CollateralCurrencyInfo.md) | Collateral Currency List. | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] +**total_left_repay_usdt** | **str** | Total outstanding value converted to USDT | [optional] +**total_left_collateral_usdt** | **str** | Total collateral value converted to USDT | [optional] +**borrow_currencies** | [**list[BorrowCurrencyInfo]**](BorrowCurrencyInfo.md) | Borrowing Currency List | [optional] +**collateral_currencies** | [**list[CollateralCurrencyInfo]**](CollateralCurrencyInfo.md) | Collateral Currency List | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralRecord.md b/docs/MultiCollateralRecord.md index 9a56b77..5f48cd6 100644 --- a/docs/MultiCollateralRecord.md +++ b/docs/MultiCollateralRecord.md @@ -1,16 +1,16 @@ # MultiCollateralRecord -Multi-Collateral adjustment record. +Multi-Collateral adjustment record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] -**record_id** | **int** | Collateral record ID. | [optional] -**before_ltv** | **str** | The collateral ratio before adjustment. | [optional] -**after_ltv** | **str** | The collateral ratio before adjustment. | [optional] -**operate_time** | **int** | Operation time, timestamp in seconds. | [optional] -**borrow_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Borrowing Currency List. | [optional] -**collateral_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Collateral Currency List. | [optional] +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Collateral record ID | [optional] +**before_ltv** | **str** | Collateral ratio before adjustment | [optional] +**after_ltv** | **str** | Collateral ratio before adjustment | [optional] +**operate_time** | **int** | Operation time, timestamp in seconds | [optional] +**borrow_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Borrowing Currency List | [optional] +**collateral_currencies** | [**list[MultiCollateralRecordCurrency]**](MultiCollateralRecordCurrency.md) | Collateral Currency List | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralRecordCurrency.md b/docs/MultiCollateralRecordCurrency.md index babf82e..9e3f5e1 100644 --- a/docs/MultiCollateralRecordCurrency.md +++ b/docs/MultiCollateralRecordCurrency.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**before_amount** | **str** | Amount before the operation. | [optional] -**before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] -**after_amount** | **str** | Amount after the operation. | [optional] -**after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**before_amount** | **str** | Amount before the operation | [optional] +**before_amount_usdt** | **str** | USDT Amount before the operation | [optional] +**after_amount** | **str** | Amount after the operation | [optional] +**after_amount_usdt** | **str** | USDT Amount after the operation | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiLoanItem.md b/docs/MultiLoanItem.md index 78e58e5..3c45fc2 100644 --- a/docs/MultiLoanItem.md +++ b/docs/MultiLoanItem.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**price** | **str** | Latest price of the currency. | [optional] +**currency** | **str** | Currency | [optional] +**price** | **str** | Latest price of the currency | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiLoanRepayItem.md b/docs/MultiLoanRepayItem.md index 97bdfd1..d8ab1d1 100644 --- a/docs/MultiLoanRepayItem.md +++ b/docs/MultiLoanRepayItem.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency. | [optional] -**amount** | **str** | Size. | [optional] -**repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial repayment. | [optional] +**currency** | **str** | Repayment currency | [optional] +**amount** | **str** | Size | [optional] +**repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial repayment | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiRepayRecord.md b/docs/MultiRepayRecord.md index 1c1e6b6..93e37d8 100644 --- a/docs/MultiRepayRecord.md +++ b/docs/MultiRepayRecord.md @@ -1,21 +1,21 @@ # MultiRepayRecord -Mult Repay Record. +Multi-Collateral Repayment Record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] -**record_id** | **int** | Repayment record ID. | [optional] -**init_ltv** | **str** | The initial collateralization rate. | [optional] -**before_ltv** | **str** | Ltv before the operation. | [optional] -**after_ltv** | **str** | Ltv after the operation. | [optional] -**borrow_time** | **int** | Borrowing time, timestamp in seconds. | [optional] -**repay_time** | **int** | Repayment time, timestamp in seconds. | [optional] -**borrow_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of borrowing information. | [optional] -**collateral_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of collateral information. | [optional] -**repaid_currencies** | [**list[RepayRecordRepaidCurrency]**](RepayRecordRepaidCurrency.md) | Repay Currency List. | [optional] -**total_interest_list** | [**list[RepayRecordTotalInterest]**](RepayRecordTotalInterest.md) | Total Interest List. | [optional] -**left_repay_interest_list** | [**list[RepayRecordLeftInterest]**](RepayRecordLeftInterest.md) | List of left repay interest. | [optional] +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Repayment record ID | [optional] +**init_ltv** | **str** | Initial collateralization rate | [optional] +**before_ltv** | **str** | Ltv before the operation | [optional] +**after_ltv** | **str** | Ltv after the operation | [optional] +**borrow_time** | **int** | Borrowing time, timestamp in seconds | [optional] +**repay_time** | **int** | Repayment time, timestamp in seconds | [optional] +**borrow_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of borrowing information | [optional] +**collateral_currencies** | [**list[RepayRecordCurrency]**](RepayRecordCurrency.md) | List of collateral information | [optional] +**repaid_currencies** | [**list[RepayRecordRepaidCurrency]**](RepayRecordRepaidCurrency.md) | Repay Currency List | [optional] +**total_interest_list** | [**list[RepayRecordTotalInterest]**](RepayRecordTotalInterest.md) | Total Interest List | [optional] +**left_repay_interest_list** | [**list[RepayRecordLeftInterest]**](RepayRecordLeftInterest.md) | List of remaining interest to be repaid | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiRepayResp.md b/docs/MultiRepayResp.md index 406a64a..2d7ebe0 100644 --- a/docs/MultiRepayResp.md +++ b/docs/MultiRepayResp.md @@ -1,11 +1,11 @@ # MultiRepayResp -Repay Multi-Collateral Loan. +Multi-currency collateral repayment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] -**repaid_currencies** | [**list[RepayCurrencyRes]**](RepayCurrencyRes.md) | Repay Currency List. | [optional] +**order_id** | **int** | Order ID | [optional] +**repaid_currencies** | [**list[RepayCurrencyRes]**](RepayCurrencyRes.md) | Repay Currency List | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MyFuturesTrade.md b/docs/MyFuturesTrade.md index 3e4b2a7..34cc347 100644 --- a/docs/MyFuturesTrade.md +++ b/docs/MyFuturesTrade.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Trade ID. | [optional] -**create_time** | **float** | Trading time. | [optional] -**contract** | **str** | Futures contract. | [optional] -**order_id** | **str** | Order ID related. | [optional] -**size** | **int** | Trading size. | [optional] -**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] -**price** | **str** | Trading price. | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker`. | [optional] -**text** | **str** | User defined information. | [optional] -**fee** | **str** | Fee deducted. | [optional] -**point_fee** | **str** | Points used to deduct fee. | [optional] +**id** | **int** | Fill ID | [optional] +**create_time** | **float** | Fill Time | [optional] +**contract** | **str** | Futures contract | [optional] +**order_id** | **str** | Related order ID | [optional] +**size** | **int** | Trading size | [optional] +**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] +**price** | **str** | Fill Price | [optional] +**role** | **str** | Trade role. taker - taker, maker - maker | [optional] +**text** | **str** | Order custom information | [optional] +**fee** | **str** | Trade fee | [optional] +**point_fee** | **str** | Points used to deduct trade fee | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MyFuturesTradeTimeRange.md b/docs/MyFuturesTradeTimeRange.md index a4fdb38..ff9e786 100644 --- a/docs/MyFuturesTradeTimeRange.md +++ b/docs/MyFuturesTradeTimeRange.md @@ -3,17 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trade_id** | **str** | Trade ID. | [optional] -**create_time** | **float** | Trading time. | [optional] -**contract** | **str** | Futures contract. | [optional] -**order_id** | **str** | Order ID related. | [optional] -**size** | **int** | Trading size. | [optional] -**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] -**price** | **str** | Trading price. | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker`. | [optional] -**text** | **str** | User defined information. | [optional] -**fee** | **str** | Fee deducted. | [optional] -**point_fee** | **str** | Points used to deduct fee. | [optional] +**trade_id** | **str** | Fill ID | [optional] +**create_time** | **float** | Fill Time | [optional] +**contract** | **str** | Futures contract | [optional] +**order_id** | **str** | Related order ID | [optional] +**size** | **int** | Trading size | [optional] +**close_size** | **int** | Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position | [optional] +**price** | **str** | Fill Price | [optional] +**role** | **str** | Trade role. taker - taker, maker - maker | [optional] +**text** | **str** | Order custom information | [optional] +**fee** | **str** | Trade fee | [optional] +**point_fee** | **str** | Points used to deduct trade fee | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OpenOrders.md b/docs/OpenOrders.md index 985e3d6..ec395b5 100644 --- a/docs/OpenOrders.md +++ b/docs/OpenOrders.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair. | [optional] -**total** | **int** | The total number of pending orders for this trading pair on the current page | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**total** | **int** | Total number of open orders for this trading pair on the current page | [optional] **orders** | [**list[Order]**](Order.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsAccount.md b/docs/OptionsAccount.md index 6c830c2..d9a6eec 100644 --- a/docs/OptionsAccount.md +++ b/docs/OptionsAccount.md @@ -3,24 +3,24 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | **int** | User ID. | [optional] -**total** | **str** | Account balance. | [optional] +**user** | **int** | User ID | [optional] +**total** | **str** | Account Balance | [optional] **position_value** | **str** | Position value, long position value is positive, short position value is negative | [optional] -**equity** | **str** | Account equity, the sum of account balance and position value. | [optional] -**short_enabled** | **bool** | If the account is allowed to short. | [optional] -**mmp_enabled** | **bool** | Whether to enable MMP. | [optional] -**liq_triggered** | **bool** | Whether to trigger position liquidation. | [optional] +**equity** | **str** | Account equity, the sum of account balance and position value | [optional] +**short_enabled** | **bool** | If the account is allowed to short | [optional] +**mmp_enabled** | **bool** | Whether to enable MMP | [optional] +**liq_triggered** | **bool** | Whether to trigger position liquidation | [optional] **margin_mode** | **int** | | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 | [optional] -**unrealised_pnl** | **str** | Unrealized PNL. | [optional] -**init_margin** | **str** | Initial position margin. | [optional] -**maint_margin** | **str** | Position maintenance margin. | [optional] -**order_margin** | **str** | Order margin of unfinished orders. | [optional] -**ask_order_margin** | **str** | Margin for outstanding sell orders. | [optional] -**bid_order_margin** | **str** | Margin for outstanding buy orders. | [optional] -**available** | **str** | Available balance to transfer out or trade. | [optional] -**point** | **str** | POINT amount. | [optional] -**currency** | **str** | Settle currency. | [optional] -**orders_limit** | **int** | Maximum number of outstanding orders. | [optional] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] +**init_margin** | **str** | Initial position margin | [optional] +**maint_margin** | **str** | Position maintenance margin | [optional] +**order_margin** | **str** | Order margin of unfinished orders | [optional] +**ask_order_margin** | **str** | Margin for outstanding sell orders | [optional] +**bid_order_margin** | **str** | Margin for outstanding buy orders | [optional] +**available** | **str** | Available balance to transfer out or trade | [optional] +**point** | **str** | Point card amount | [optional] +**currency** | **str** | Settlement currency | [optional] +**orders_limit** | **int** | Maximum number of outstanding orders | [optional] **position_notional_limit** | **int** | Notional value upper limit, including the nominal value of positions and outstanding orders | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsAccountBook.md b/docs/OptionsAccountBook.md index 4e9ac46..8ae81ce 100644 --- a/docs/OptionsAccountBook.md +++ b/docs/OptionsAccountBook.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Change time. | [optional] -**change** | **str** | Amount changed (USDT). | [optional] -**balance** | **str** | Account total balance after change (USDT). | [optional] +**time** | **float** | Change time | [optional] +**change** | **str** | Amount changed (USDT) | [optional] +**balance** | **str** | Account total balance after change (USDT) | [optional] **type** | **str** | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] -**text** | **str** | custom text. | [optional] +**text** | **str** | Remark | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md index 543bd2a..de8bf8b 100644 --- a/docs/OptionsApi.md +++ b/docs/OptionsApi.md @@ -4,31 +4,31 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlyings. -[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration times. -[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time. -[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract detail. -[**list_options_settlements**](OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history. -[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract's settlement. -[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | List my options settlements. -[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Options order book. -[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | List tickers of options contracts. -[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Get underlying ticker. -[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Get options candlesticks. -[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Mark price candlesticks of an underlying. -[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Options trade history. -[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | List options account. -[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | List account changing history. -[**list_options_positions**](OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying. -[**get_options_position**](OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position. -[**list_options_position_close**](OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying. -[**list_options_orders**](OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders. -[**create_options_order**](OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order. -[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all `open` orders matched. -[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Get a single order. -[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel a single order. -[**countdown_cancel_all_options**](OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders. -[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | List personal trading history. +[**list_options_underlyings**](OptionsApi.md#list_options_underlyings) | **GET** /options/underlyings | List all underlying assets +[**list_options_expirations**](OptionsApi.md#list_options_expirations) | **GET** /options/expirations | List all expiration dates +[**list_options_contracts**](OptionsApi.md#list_options_contracts) | **GET** /options/contracts | List all contracts for specified underlying and expiration date +[**get_options_contract**](OptionsApi.md#get_options_contract) | **GET** /options/contracts/{contract} | Query specified contract details +[**list_options_settlements**](OptionsApi.md#list_options_settlements) | **GET** /options/settlements | List settlement history +[**get_options_settlement**](OptionsApi.md#get_options_settlement) | **GET** /options/settlements/{contract} | Get specified contract settlement information +[**list_my_options_settlements**](OptionsApi.md#list_my_options_settlements) | **GET** /options/my_settlements | Query personal settlement records +[**list_options_order_book**](OptionsApi.md#list_options_order_book) | **GET** /options/order_book | Query options contract order book +[**list_options_tickers**](OptionsApi.md#list_options_tickers) | **GET** /options/tickers | Query options market ticker information +[**list_options_underlying_tickers**](OptionsApi.md#list_options_underlying_tickers) | **GET** /options/underlying/tickers/{underlying} | Query underlying ticker information +[**list_options_candlesticks**](OptionsApi.md#list_options_candlesticks) | **GET** /options/candlesticks | Options contract market candlestick chart +[**list_options_underlying_candlesticks**](OptionsApi.md#list_options_underlying_candlesticks) | **GET** /options/underlying/candlesticks | Underlying index price candlestick chart +[**list_options_trades**](OptionsApi.md#list_options_trades) | **GET** /options/trades | Market trade records +[**list_options_account**](OptionsApi.md#list_options_account) | **GET** /options/accounts | Query account information +[**list_options_account_book**](OptionsApi.md#list_options_account_book) | **GET** /options/account_book | Query account change history +[**list_options_positions**](OptionsApi.md#list_options_positions) | **GET** /options/positions | List user's positions of specified underlying +[**get_options_position**](OptionsApi.md#get_options_position) | **GET** /options/positions/{contract} | Get specified contract position +[**list_options_position_close**](OptionsApi.md#list_options_position_close) | **GET** /options/position_close | List user's liquidation history of specified underlying +[**list_options_orders**](OptionsApi.md#list_options_orders) | **GET** /options/orders | List options orders +[**create_options_order**](OptionsApi.md#create_options_order) | **POST** /options/orders | Create an options order +[**cancel_options_orders**](OptionsApi.md#cancel_options_orders) | **DELETE** /options/orders | Cancel all orders with 'open' status +[**get_options_order**](OptionsApi.md#get_options_order) | **GET** /options/orders/{order_id} | Query single order details +[**cancel_options_order**](OptionsApi.md#cancel_options_order) | **DELETE** /options/orders/{order_id} | Cancel single order +[**countdown_cancel_all_options**](OptionsApi.md#countdown_cancel_all_options) | **POST** /options/countdown_cancel_all | Countdown cancel orders +[**list_my_options_trades**](OptionsApi.md#list_my_options_trades) | **GET** /options/my_trades | Query personal trading records [**get_options_mmp**](OptionsApi.md#get_options_mmp) | **GET** /options/mmp | MMP Query. [**set_options_mmp**](OptionsApi.md#set_options_mmp) | **POST** /options/mmp | MMP Settings [**reset_options_mmp**](OptionsApi.md#reset_options_mmp) | **POST** /options/mmp/reset | MMP Reset @@ -37,7 +37,7 @@ Method | HTTP request | Description # **list_options_underlyings** > list[OptionsUnderlying] list_options_underlyings() -List all underlyings. +List all underlying assets ### Example @@ -56,7 +56,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OptionsApi(api_client) try: - # List all underlyings. + # List all underlying assets api_response = api_instance.list_options_underlyings() print(api_response) except GateApiException as ex: @@ -84,14 +84,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_expirations** > list[int] list_options_expirations(underlying) -List all expiration times. +List all expiration dates ### Example @@ -108,10 +108,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) try: - # List all expiration times. + # List all expiration dates api_response = api_instance.list_options_expirations(underlying) print(api_response) except GateApiException as ex: @@ -124,7 +124,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | ### Return type @@ -142,14 +142,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List expiration times of specified underlying. | - | +**200** | List expiration dates for specified underlying | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_contracts** > list[OptionsContract] list_options_contracts(underlying, expiration=expiration) -List all the contracts with specified underlying and expiration time. +List all contracts for specified underlying and expiration date ### Example @@ -166,11 +166,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). -expiration = 1636588800 # int | Unix timestamp of the expiration time. (optional) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +expiration = 1636588800 # int | Unix timestamp of expiration date (optional) try: - # List all the contracts with specified underlying and expiration time. + # List all contracts for specified underlying and expiration date api_response = api_instance.list_options_contracts(underlying, expiration=expiration) print(api_response) except GateApiException as ex: @@ -183,8 +183,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | - **expiration** | **int**| Unix timestamp of the expiration time. | [optional] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **expiration** | **int**| Unix timestamp of expiration date | [optional] ### Return type @@ -202,14 +202,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_contract** > OptionsContract get_options_contract(contract) -Query specified contract detail. +Query specified contract details ### Example @@ -229,7 +229,7 @@ api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20211130-65000-C' # str | try: - # Query specified contract detail. + # Query specified contract details api_response = api_instance.get_options_contract(contract) print(api_response) except GateApiException as ex: @@ -260,14 +260,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_settlements** > list[OptionsSettlement] list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) -List settlement history. +List settlement history ### Example @@ -284,14 +284,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List settlement history. + # List settlement history api_response = api_instance.list_options_settlements(underlying, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -304,9 +304,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -326,14 +326,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_settlement** > OptionsSettlement get_options_settlement(contract, underlying, at) -Get specified contract's settlement. +Get specified contract settlement information ### Example @@ -351,11 +351,11 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20211130-65000-C' # str | -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) at = 56 # int | try: - # Get specified contract's settlement. + # Get specified contract settlement information api_response = api_instance.get_options_settlement(contract, underlying, at) print(api_response) except GateApiException as ex: @@ -369,7 +369,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contract** | **str**| | - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | **at** | **int**| | ### Return type @@ -388,14 +388,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_my_options_settlements** > list[OptionsMySettlements] list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) -List my options settlements. +Query personal settlement records ### Example @@ -421,15 +421,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List my options settlements. + # Query personal settlement records api_response = api_instance.list_my_options_settlements(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -442,10 +442,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | - **contract** | **str**| Options contract name. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **contract** | **str**| Options contract name | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -465,16 +465,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_order_book** > FuturesOrderBook list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) -Options order book. +Query options contract order book -Bids will be sorted by price from high to low, while asks sorted reversely. +Bids will be sorted by price from high to low, while asks sorted reversely ### Example @@ -491,13 +491,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) -with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time. (optional) (default to False) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name +interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0') +limit = 10 # int | Number of depth levels (optional) (default to 10) +with_id = False # bool | Whether to return depth update ID. This ID increments by 1 each time depth changes (optional) (default to False) try: - # Options order book. + # Query options contract order book api_response = api_instance.list_options_order_book(contract, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -510,10 +510,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name. | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] - **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time. | [optional] [default to False] + **contract** | **str**| Options contract name | + **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0'] + **limit** | **int**| Number of depth levels | [optional] [default to 10] + **with_id** | **bool**| Whether to return depth update ID. This ID increments by 1 each time depth changes | [optional] [default to False] ### Return type @@ -531,14 +531,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Depth query successful. | - | +**200** | Depth query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_tickers** > list[OptionsTicker] list_options_tickers(underlying) -List tickers of options contracts. +Query options market ticker information ### Example @@ -555,10 +555,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) try: - # List tickers of options contracts. + # Query options market ticker information api_response = api_instance.list_options_tickers(underlying) print(api_response) except GateApiException as ex: @@ -571,7 +571,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | ### Return type @@ -589,14 +589,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_underlying_tickers** > OptionsUnderlyingTicker list_options_underlying_tickers(underlying) -Get underlying ticker. +Query underlying ticker information ### Example @@ -613,10 +613,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying. +underlying = 'BTC_USDT' # str | Underlying try: - # Get underlying ticker. + # Query underlying ticker information api_response = api_instance.list_options_underlying_tickers(underlying) print(api_response) except GateApiException as ex: @@ -629,7 +629,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying. | + **underlying** | **str**| Underlying | ### Return type @@ -647,14 +647,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_candlesticks** > list[OptionsCandlestick] list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) -Get options candlesticks. +Options contract market candlestick chart ### Example @@ -671,14 +671,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -interval = '5m' # str | Interval time between data points. (optional) (default to '5m') +interval = '5m' # str | Time interval between data points (optional) (default to '5m') try: - # Get options candlesticks. + # Options contract market candlestick chart api_response = api_instance.list_options_candlesticks(contract, limit=limit, _from=_from, to=to, interval=interval) print(api_response) except GateApiException as ex: @@ -691,11 +691,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name. | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **contract** | **str**| Options contract name | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **interval** | **str**| Interval time between data points. | [optional] [default to '5m'] + **interval** | **str**| Time interval between data points | [optional] [default to '5m'] ### Return type @@ -713,14 +713,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_underlying_candlesticks** > list[FuturesCandlestick] list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) -Mark price candlesticks of an underlying. +Underlying index price candlestick chart ### Example @@ -737,14 +737,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -interval = '5m' # str | Interval time between data points. (optional) (default to '5m') +interval = '5m' # str | Time interval between data points (optional) (default to '5m') try: - # Mark price candlesticks of an underlying. + # Underlying index price candlestick chart api_response = api_instance.list_options_underlying_candlesticks(underlying, limit=limit, _from=_from, to=to, interval=interval) print(api_response) except GateApiException as ex: @@ -757,11 +757,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **interval** | **str**| Interval time between data points. | [optional] [default to '5m'] + **interval** | **str**| Time interval between data points | [optional] [default to '5m'] ### Return type @@ -779,14 +779,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_trades** > list[FuturesTrade] list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) -Options trade history. +Market trade records ### Example @@ -803,15 +803,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) -type = '1546935600' # str | `C` is call, while `P` is put. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +type = '1546935600' # str | `C` for call, `P` for put (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # Options trade history. + # Market trade records api_response = api_instance.list_options_trades(contract=contract, type=type, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -824,10 +824,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name. | [optional] - **type** | **str**| `C` is call, while `P` is put. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **contract** | **str**| Options contract name | [optional] + **type** | **str**| `C` for call, `P` for put | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -847,14 +847,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_account** > OptionsAccount list_options_account() -List options account. +Query account information ### Example @@ -882,7 +882,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.OptionsApi(api_client) try: - # List options account. + # Query account information api_response = api_instance.list_options_account() print(api_response) except GateApiException as ex: @@ -910,14 +910,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_account_book** > list[OptionsAccountBook] list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) -List account changing history. +Query account change history ### Example @@ -943,14 +943,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL (optional) +type = 'dnw' # str | Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L (optional) try: - # List account changing history. + # Query account change history api_response = api_instance.list_options_account_book(limit=limit, offset=offset, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -963,11 +963,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL | [optional] + **type** | **str**| Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L | [optional] ### Return type @@ -985,14 +985,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_positions** > list[OptionsPosition] list_options_positions(underlying=underlying) -List user's positions of specified underlying. +List user's positions of specified underlying ### Example @@ -1018,10 +1018,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying. (optional) +underlying = 'BTC_USDT' # str | Underlying (optional) try: - # List user's positions of specified underlying. + # List user's positions of specified underlying api_response = api_instance.list_options_positions(underlying=underlying) print(api_response) except GateApiException as ex: @@ -1034,7 +1034,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying. | [optional] + **underlying** | **str**| Underlying | [optional] ### Return type @@ -1052,14 +1052,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_position** > OptionsPosition get_options_position(contract) -Get specified contract position. +Get specified contract position ### Example @@ -1088,7 +1088,7 @@ api_instance = gate_api.OptionsApi(api_client) contract = 'BTC_USDT-20211130-65000-C' # str | try: - # Get specified contract position. + # Get specified contract position api_response = api_instance.get_options_position(contract) print(api_response) except GateApiException as ex: @@ -1119,14 +1119,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_position_close** > list[OptionsPositionClose] list_options_position_close(underlying, contract=contract) -List user's liquidation history of specified underlying. +List user's liquidation history of specified underlying ### Example @@ -1152,11 +1152,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) try: - # List user's liquidation history of specified underlying. + # List user's liquidation history of specified underlying api_response = api_instance.list_options_position_close(underlying, contract=contract) print(api_response) except GateApiException as ex: @@ -1169,8 +1169,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | - **contract** | **str**| Options contract name. | [optional] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **contract** | **str**| Options contract name | [optional] ### Return type @@ -1188,14 +1188,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_options_orders** > list[OptionsOrder] list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) -List options orders. +List options orders ### Example @@ -1221,16 +1221,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -status = 'open' # str | Only list the orders with this status. -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) -underlying = 'BTC_USDT' # str | Underlying. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +status = 'open' # str | Query order list based on status +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +underlying = 'BTC_USDT' # str | Underlying (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List options orders. + # List options orders api_response = api_instance.list_options_orders(status, contract=contract, underlying=underlying, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -1243,11 +1243,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| Only list the orders with this status. | - **contract** | **str**| Options contract name. | [optional] - **underlying** | **str**| Underlying. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **status** | **str**| Query order list based on status | + **contract** | **str**| Options contract name | [optional] + **underlying** | **str**| Underlying | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -1267,14 +1267,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_options_order** > OptionsOrder create_options_order(options_order) -Create an options order. +Create an options order ### Example @@ -1303,7 +1303,7 @@ api_instance = gate_api.OptionsApi(api_client) options_order = gate_api.OptionsOrder() # OptionsOrder | try: - # Create an options order. + # Create an options order api_response = api_instance.create_options_order(options_order) print(api_response) except GateApiException as ex: @@ -1334,14 +1334,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order detail. | - | +**201** | Order detail | - | [[Back to top]](#) [[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_options_orders** > list[OptionsOrder] cancel_options_orders(contract=contract, underlying=underlying, side=side) -Cancel all `open` orders matched. +Cancel all orders with 'open' status ### Example @@ -1367,12 +1367,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) -underlying = 'BTC_USDT' # str | Underlying. (optional) -side = 'ask' # str | All bids or asks. Both included if not specified. (optional) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +underlying = 'BTC_USDT' # str | Underlying (optional) +side = 'ask' # str | Specify all bids or all asks, both included if not specified (optional) try: - # Cancel all `open` orders matched. + # Cancel all orders with 'open' status api_response = api_instance.cancel_options_orders(contract=contract, underlying=underlying, side=side) print(api_response) except GateApiException as ex: @@ -1385,9 +1385,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **contract** | **str**| Options contract name. | [optional] - **underlying** | **str**| Underlying. | [optional] - **side** | **str**| All bids or asks. Both included if not specified. | [optional] + **contract** | **str**| Options contract name | [optional] + **underlying** | **str**| Underlying | [optional] + **side** | **str**| Specify all bids or all asks, both included if not specified | [optional] ### Return type @@ -1405,14 +1405,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All orders matched cancelled. | - | +**200** | Batch cancellation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_options_order** > OptionsOrder get_options_order(order_id) -Get a single order. +Query single order details ### Example @@ -1438,10 +1438,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -order_id = 12345 # int | Order ID returned on successful order creation. +order_id = 12345 # int | Order ID returned when order is successfully created try: - # Get a single order. + # Query single order details api_response = api_instance.get_options_order(order_id) print(api_response) except GateApiException as ex: @@ -1454,7 +1454,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation. | + **order_id** | **int**| Order ID returned when order is successfully created | ### Return type @@ -1472,14 +1472,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order detail. | - | +**200** | Order detail | - | [[Back to top]](#) [[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_options_order** > OptionsOrder cancel_options_order(order_id) -Cancel a single order. +Cancel single order ### Example @@ -1505,10 +1505,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -order_id = 12345 # int | Order ID returned on successful order creation. +order_id = 12345 # int | Order ID returned when order is successfully created try: - # Cancel a single order. + # Cancel single order api_response = api_instance.cancel_options_order(order_id) print(api_response) except GateApiException as ex: @@ -1521,7 +1521,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| Order ID returned on successful order creation. | + **order_id** | **int**| Order ID returned when order is successfully created | ### Return type @@ -1539,14 +1539,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order detail. | - | +**200** | Order detail | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **countdown_cancel_all_options** > TriggerTime countdown_cancel_all_options(countdown_cancel_all_options_task) -Countdown cancel orders. +Countdown cancel orders Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. @@ -1577,7 +1577,7 @@ api_instance = gate_api.OptionsApi(api_client) countdown_cancel_all_options_task = gate_api.CountdownCancelAllOptionsTask() # CountdownCancelAllOptionsTask | try: - # Countdown cancel orders. + # Countdown cancel orders api_response = api_instance.countdown_cancel_all_options(countdown_cancel_all_options_task) print(api_response) except GateApiException as ex: @@ -1608,14 +1608,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Set countdown successfully. | - | +**200** | Countdown set successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_my_options_trades** > list[OptionsMyTrade] list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) -List personal trading history. +Query personal trading records ### Example @@ -1641,15 +1641,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint). -contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +underlying = 'BTC_USDT' # str | Underlying (Obtained by listing underlying endpoint) +contract = 'BTC_USDT-20210916-5000-C' # str | Options contract name (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) try: - # List personal trading history. + # Query personal trading records api_response = api_instance.list_my_options_trades(underlying, contract=contract, limit=limit, offset=offset, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -1662,10 +1662,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying (Obtained by listing underlying endpoint). | - **contract** | **str**| Options contract name. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **underlying** | **str**| Underlying (Obtained by listing underlying endpoint) | + **contract** | **str**| Options contract name | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] @@ -1685,7 +1685,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1718,7 +1718,7 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.OptionsApi(api_client) -underlying = 'BTC_USDT' # str | Underlying. (optional) +underlying = 'BTC_USDT' # str | Underlying (optional) try: # MMP Query. @@ -1734,7 +1734,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **underlying** | **str**| Underlying. | [optional] + **underlying** | **str**| Underlying | [optional] ### Return type @@ -1752,7 +1752,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1819,7 +1819,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | MMP Information. | - | +**200** | MMP Information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1886,7 +1886,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | MMP Information. | - | +**200** | MMP Information | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/OptionsCandlestick.md b/docs/OptionsCandlestick.md index 3b0d385..963ccda 100644 --- a/docs/OptionsCandlestick.md +++ b/docs/OptionsCandlestick.md @@ -1,15 +1,15 @@ # OptionsCandlestick -data point in every timestamp. +data point in every timestamp ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**t** | **float** | Unix timestamp in seconds. | [optional] -**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed. | [optional] -**c** | **str** | Close price (quote currency, unit: underlying corresponding option price). | [optional] +**t** | **float** | Unix timestamp in seconds | [optional] +**v** | **int** | size volume (contract size). Only returned if `contract` is not prefixed | [optional] +**c** | **str** | Close price (quote currency, unit: underlying corresponding option price) | [optional] **h** | **str** | Highest price (quote currency, unit: underlying corresponding option price) | [optional] -**l** | **str** | Lowest price (quote currency, unit: underlying corresponding option price). | [optional] -**o** | **str** | Open price (quote currency, unit: underlying corresponding option price). | [optional] +**l** | **str** | Lowest price (quote currency, unit: underlying corresponding option price) | [optional] +**o** | **str** | Open price (quote currency, unit: underlying corresponding option 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/OptionsContract.md b/docs/OptionsContract.md index 42dcd06..ea9845a 100644 --- a/docs/OptionsContract.md +++ b/docs/OptionsContract.md @@ -1,34 +1,34 @@ # OptionsContract -Options contract detail. +Options contract details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Options contract name. | [optional] -**tag** | **str** | tag. | [optional] -**create_time** | **float** | Creation time. | [optional] -**expiration_time** | **float** | Expiration time. | [optional] -**is_call** | **bool** | `true` means call options, while `false` is put options. | [optional] -**multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency. | [optional] -**underlying** | **str** | Underlying. | [optional] -**underlying_price** | **str** | Underlying price (quote currency). | [optional] -**last_price** | **str** | Last trading price. | [optional] -**mark_price** | **str** | Current mark price (quote currency). | [optional] -**index_price** | **str** | Current index price (quote currency). | [optional] -**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate. | [optional] -**taker_fee_rate** | **str** | Taker fee rate. | [optional] -**order_price_round** | **str** | Minimum order price increment. | [optional] -**mark_price_round** | **str** | Minimum mark price increment. | [optional] -**order_size_min** | **int** | Minimum order size the contract allowed. | [optional] -**order_size_max** | **int** | Maximum order size the contract allowed. | [optional] -**order_price_deviate** | **str** | The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders | [optional] -**ref_discount_rate** | **str** | Referral fee rate discount. | [optional] -**ref_rebate_rate** | **str** | Referrer commission rate. | [optional] -**orderbook_id** | **int** | Current orderbook ID. | [optional] -**trade_id** | **int** | Current trade ID. | [optional] -**trade_size** | **int** | Historical accumulated trade size. | [optional] -**position_size** | **int** | Current total long position size. | [optional] -**orders_limit** | **int** | Maximum number of open orders. | [optional] +**name** | **str** | Options contract name | [optional] +**tag** | **str** | Tag | [optional] +**create_time** | **float** | Created time | [optional] +**expiration_time** | **float** | Expiration time | [optional] +**is_call** | **bool** | `true` means call options, `false` means put options | [optional] +**multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency | [optional] +**underlying** | **str** | Underlying | [optional] +**underlying_price** | **str** | Underlying price (quote currency) | [optional] +**last_price** | **str** | Last trading price | [optional] +**mark_price** | **str** | Current mark price (quote currency) | [optional] +**index_price** | **str** | Current index price (quote currency) | [optional] +**maker_fee_rate** | **str** | Maker fee rate, negative values indicate rebates | [optional] +**taker_fee_rate** | **str** | Taker fee rate | [optional] +**order_price_round** | **str** | Minimum order price increment | [optional] +**mark_price_round** | **str** | Minimum mark price increment | [optional] +**order_size_min** | **int** | Minimum order size allowed by the contract | [optional] +**order_size_max** | **int** | Maximum order size allowed by the contract | [optional] +**order_price_deviate** | **str** | The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders | [optional] +**ref_discount_rate** | **str** | Trading fee discount for referred users | [optional] +**ref_rebate_rate** | **str** | Commission rate for referrers | [optional] +**orderbook_id** | **int** | Orderbook update ID | [optional] +**trade_id** | **int** | Current trade ID | [optional] +**trade_size** | **int** | Historical cumulative trading volume | [optional] +**position_size** | **int** | Current total long position size | [optional] +**orders_limit** | **int** | Maximum number of pending orders | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMMP.md b/docs/OptionsMMP.md index 0a24089..2e8b73f 100644 --- a/docs/OptionsMMP.md +++ b/docs/OptionsMMP.md @@ -4,13 +4,13 @@ MMP Settings ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**underlying** | **str** | Underlying. | -**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP. | +**underlying** | **str** | Underlying | +**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disable MMP | **frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | -**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places). | -**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places). | -**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered. | [optional] [readonly] -**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] +**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | +**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | +**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] +**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMMPReset.md b/docs/OptionsMMPReset.md index 4e26ae9..1244357 100644 --- a/docs/OptionsMMPReset.md +++ b/docs/OptionsMMPReset.md @@ -4,13 +4,13 @@ MMP Reset ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**underlying** | **str** | Underlying. | -**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disabling MMP. | [optional] [readonly] +**underlying** | **str** | Underlying | +**window** | **int** | Time window (milliseconds), between 1-5000, 0 means disable MMP | [optional] [readonly] **frozen_period** | **int** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | [optional] [readonly] -**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places). | [optional] [readonly] -**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places). | [optional] [readonly] -**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered. | [optional] [readonly] -**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] +**qty_limit** | **str** | Trading volume upper limit (positive number, up to 2 decimal places) | [optional] [readonly] +**delta_limit** | **str** | Upper limit of net delta value (positive number, up to 2 decimal places) | [optional] [readonly] +**trigger_time_ms** | **int** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] +**frozen_until_ms** | **int** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMySettlements.md b/docs/OptionsMySettlements.md index 004e0ac..c6df4a3 100644 --- a/docs/OptionsMySettlements.md +++ b/docs/OptionsMySettlements.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Settlement time. | [optional] -**underlying** | **str** | Underlying. | [optional] -**contract** | **str** | Options contract name. | [optional] -**strike_price** | **str** | Strike price (quote currency). | [optional] -**settle_price** | **str** | Settlement price (quote currency). | [optional] -**size** | **int** | Size. | [optional] -**settle_profit** | **str** | Settlement profit (quote currency). | [optional] -**fee** | **str** | Fee (quote currency). | [optional] -**realised_pnl** | **str** | The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) | [optional] +**time** | **float** | Settlement time | [optional] +**underlying** | **str** | Underlying | [optional] +**contract** | **str** | Options contract name | [optional] +**strike_price** | **str** | Strike price (quote currency) | [optional] +**settle_price** | **str** | Settlement price (quote currency) | [optional] +**size** | **int** | Settlement size | [optional] +**settle_profit** | **str** | Settlement profit (quote currency) | [optional] +**fee** | **str** | Settlement fee (quote currency) | [optional] +**realised_pnl** | **str** | Accumulated profit and loss from opening positions, including premium, fees, settlement profit, etc. (quote currency) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsMyTrade.md b/docs/OptionsMyTrade.md index d072076..115f8ca 100644 --- a/docs/OptionsMyTrade.md +++ b/docs/OptionsMyTrade.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Trade ID. | [optional] -**create_time** | **float** | Trading time. | [optional] -**contract** | **str** | Options contract name. | [optional] -**order_id** | **int** | Order ID related. | [optional] -**size** | **int** | Trading size. | [optional] -**price** | **str** | Trading price (quote currency). | [optional] -**underlying_price** | **str** | Underlying price (quote currency). | [optional] -**role** | **str** | Trade role. Available values are `taker` and `maker`. | [optional] +**id** | **int** | Fill ID | [optional] +**create_time** | **float** | Fill Time | [optional] +**contract** | **str** | Options contract name | [optional] +**order_id** | **int** | Related order ID | [optional] +**size** | **int** | Trading size | [optional] +**price** | **str** | Trade price (quote currency) | [optional] +**underlying_price** | **str** | Underlying price (quote currency) | [optional] +**role** | **str** | Trade role. taker - taker, maker - maker | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsOrder.md b/docs/OptionsOrder.md index d6a2c18..484b6e0 100644 --- a/docs/OptionsOrder.md +++ b/docs/OptionsOrder.md @@ -1,34 +1,34 @@ # OptionsOrder -Options order detail. +Options order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Options order ID. | [optional] [readonly] -**user** | **int** | User ID. | [optional] [readonly] -**create_time** | **float** | Creation time of order. | [optional] [readonly] -**finish_time** | **float** | Order finished time. Not returned if order is open. | [optional] [readonly] -**finish_as** | **str** | Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled | [optional] [readonly] -**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] -**contract** | **str** | Contract name. | -**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | -**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size | [optional] -**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` (USDT). | [optional] -**close** | **bool** | Set as `true` to close the position, with `size` set to 0. | [optional] [default to False] -**is_close** | **bool** | Is the order to close position. | [optional] [readonly] -**reduce_only** | **bool** | Set as `true` to be reduce-only order. | [optional] [default to False] -**is_reduce_only** | **bool** | Is the order reduce-only. | [optional] [readonly] -**is_liq** | **bool** | Is the order for liquidation. | [optional] [readonly] -**mmp** | **bool** | When set to true, delegate to MMP. | [optional] [default to False] -**is_mmp** | **bool** | Whether it is MMP delegation. Corresponds to `mmp` in the request. | [optional] [readonly] -**tif** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc'] -**left** | **int** | Size left to be traded. | [optional] [readonly] -**fill_price** | **str** | Fill price of the order. | [optional] [readonly] +**id** | **int** | Options order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**create_time** | **float** | Creation time of order | [optional] [readonly] +**finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] +**finish_as** | **str** | Order finish reason: - filled: Fully filled - cancelled: User cancelled - liquidated: Cancelled due to liquidation - ioc: Not immediately fully filled due to IOC time-in-force setting - auto_deleveraged: Cancelled due to auto-deleveraging - reduce_only: Cancelled due to position increase while reduce-only is set - position_closed: Cancelled because the position was closed - reduce_out: Only reduce positions by excluding hard-to-fill orders - mmp_cancelled: Cancelled by MMP | [optional] [readonly] +**status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly] +**contract** | **str** | Options identifier | +**size** | **int** | Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. | +**iceberg** | **int** | Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. | [optional] +**price** | **str** | Order price. Price of 0 with `tif` set as `ioc` represents market order (quote currency) | [optional] +**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False] +**is_close** | **bool** | Is the order to close position | [optional] [readonly] +**reduce_only** | **bool** | Set as `true` to be reduce-only order | [optional] [default to False] +**is_reduce_only** | **bool** | Is the order reduce-only | [optional] [readonly] +**is_liq** | **bool** | Is the order for liquidation | [optional] [readonly] +**mmp** | **bool** | When set to true, it is an MMP order | [optional] [default to False] +**is_mmp** | **bool** | Whether it is an MMP order. Corresponds to `mmp` in the request | [optional] [readonly] +**tif** | **str** | Time in force strategy. Market orders currently only support IOC mode - gtc: Good Till Cancelled - ioc: Immediate Or Cancelled, execute immediately or cancel, taker only - poc: Pending Or Cancelled, passive order, maker only | [optional] [default to 'gtc'] +**left** | **int** | Unfilled quantity | [optional] [readonly] +**fill_price** | **str** | Fill price | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance | [optional] -**tkfr** | **str** | Taker fee. | [optional] [readonly] -**mkfr** | **str** | Maker fee. | [optional] [readonly] -**refu** | **int** | Reference user ID. | [optional] [readonly] -**refr** | **str** | Referrer rebate. | [optional] [readonly] +**tkfr** | **str** | Taker fee | [optional] [readonly] +**mkfr** | **str** | Maker fee | [optional] [readonly] +**refu** | **int** | Referrer user ID | [optional] [readonly] +**refr** | **str** | Referrer rebate | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsPosition.md b/docs/OptionsPosition.md index ca2b9e8..b6dbefe 100644 --- a/docs/OptionsPosition.md +++ b/docs/OptionsPosition.md @@ -1,25 +1,25 @@ # OptionsPosition -Options position information. +Options contract position details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | **int** | User ID. | [optional] [readonly] -**underlying** | **str** | Underlying. | [optional] [readonly] -**underlying_price** | **str** | Underlying price (quote currency). | [optional] [readonly] -**contract** | **str** | Options contract name. | [optional] [readonly] -**size** | **int** | Position size (contract size). | [optional] [readonly] -**entry_price** | **str** | Entry size (quote currency). | [optional] [readonly] -**mark_price** | **str** | Current mark price (quote currency). | [optional] [readonly] -**mark_iv** | **str** | Implied volatility. | [optional] [readonly] -**realised_pnl** | **str** | Realized PNL. | [optional] [readonly] -**unrealised_pnl** | **str** | Unrealized PNL. | [optional] [readonly] -**pending_orders** | **int** | Current open orders. | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**underlying** | **str** | Underlying | [optional] [readonly] +**underlying_price** | **str** | Underlying price (quote currency) | [optional] [readonly] +**contract** | **str** | Options contract name | [optional] [readonly] +**size** | **int** | Position size (contract quantity) | [optional] [readonly] +**entry_price** | **str** | Entry size (quote currency) | [optional] [readonly] +**mark_price** | **str** | Current mark price (quote currency) | [optional] [readonly] +**mark_iv** | **str** | Implied volatility | [optional] [readonly] +**realised_pnl** | **str** | Realized PnL | [optional] [readonly] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] +**pending_orders** | **int** | Current pending order quantity | [optional] [readonly] **close_order** | [**OptionsPositionCloseOrder**](OptionsPositionCloseOrder.md) | | [optional] -**delta** | **str** | Delta. | [optional] [readonly] -**gamma** | **str** | Gamma. | [optional] [readonly] -**vega** | **str** | Vega. | [optional] [readonly] -**theta** | **str** | Theta. | [optional] [readonly] +**delta** | **str** | Greek letter delta | [optional] [readonly] +**gamma** | **str** | Greek letter gamma | [optional] [readonly] +**vega** | **str** | Greek letter vega | [optional] [readonly] +**theta** | **str** | Greek letter theta | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsPositionClose.md b/docs/OptionsPositionClose.md index 66fed5b..ea97971 100644 --- a/docs/OptionsPositionClose.md +++ b/docs/OptionsPositionClose.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Position close time. | [optional] [readonly] -**contract** | **str** | Options contract name. | [optional] [readonly] -**side** | **str** | Position side, long or short. | [optional] [readonly] -**pnl** | **str** | PNL. | [optional] [readonly] -**text** | **str** | Text of close order. | [optional] [readonly] -**settle_size** | **str** | settlement size. | [optional] [readonly] +**time** | **float** | Position close time | [optional] [readonly] +**contract** | **str** | Options contract name | [optional] [readonly] +**side** | **str** | Position side - `long`: Long position - `short`: Short position | [optional] [readonly] +**pnl** | **str** | PnL | [optional] [readonly] +**text** | **str** | Source of close order. See `order.text` field for specific values | [optional] [readonly] +**settle_size** | **str** | Settlement size | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsPositionCloseOrder.md b/docs/OptionsPositionCloseOrder.md index 8701bc4..77d345c 100644 --- a/docs/OptionsPositionCloseOrder.md +++ b/docs/OptionsPositionCloseOrder.md @@ -1,12 +1,12 @@ # OptionsPositionCloseOrder -Current close order if any, or `null`. +Current close order information, or `null` if no close order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Close order ID. | [optional] -**price** | **str** | Close order price (quote currency). | [optional] -**is_liq** | **bool** | Is the close order from liquidation. | [optional] +**id** | **int** | Order ID | [optional] +**price** | **str** | Order price (quote currency) | [optional] +**is_liq** | **bool** | Whether the close order is from liquidation | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsSettlement.md b/docs/OptionsSettlement.md index 6a1bddf..651d917 100644 --- a/docs/OptionsSettlement.md +++ b/docs/OptionsSettlement.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Last changed time of configuration. | [optional] -**contract** | **str** | Options contract name. | [optional] -**profit** | **str** | Settlement profit per size (quote currency). | [optional] -**fee** | **str** | Settlement fee per size (quote currency). | [optional] -**strike_price** | **str** | Strike price (quote currency). | [optional] -**settle_price** | **str** | Settlement price (quote currency). | [optional] +**time** | **float** | Last configuration update time | [optional] +**contract** | **str** | Options contract name | [optional] +**profit** | **str** | Settlement profit per contract (quote currency) | [optional] +**fee** | **str** | Settlement fee per contract (quote currency) | [optional] +**strike_price** | **str** | Strike price (quote currency) | [optional] +**settle_price** | **str** | Settlement price (quote currency) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsTicker.md b/docs/OptionsTicker.md index e7426c4..1fef6d8 100644 --- a/docs/OptionsTicker.md +++ b/docs/OptionsTicker.md @@ -1,27 +1,27 @@ # OptionsTicker -Options contract detail. +Options contract details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Options contract name. | [optional] -**last_price** | **str** | Last trading price (quote currency). | [optional] -**mark_price** | **str** | Current mark price (quote currency). | [optional] -**index_price** | **str** | Current index price (quote currency). | [optional] -**ask1_size** | **int** | Best ask size. | [optional] -**ask1_price** | **str** | Best ask price. | [optional] -**bid1_size** | **int** | Best bid size. | [optional] -**bid1_price** | **str** | Best bid price. | [optional] -**position_size** | **int** | Current total long position size. | [optional] -**mark_iv** | **str** | Implied volatility. | [optional] -**bid_iv** | **str** | Bid side implied volatility. | [optional] -**ask_iv** | **str** | Ask side implied volatility. | [optional] -**leverage** | **str** | Current leverage. Formula: underlying_price / mark_price * delta. | [optional] -**delta** | **str** | Delta. | [optional] -**gamma** | **str** | Gamma. | [optional] -**vega** | **str** | Vega. | [optional] -**theta** | **str** | Theta. | [optional] -**rho** | **str** | Rho. | [optional] +**name** | **str** | Options contract name | [optional] +**last_price** | **str** | Last trade price (quote currency) | [optional] +**mark_price** | **str** | Current mark price (quote currency) | [optional] +**index_price** | **str** | Current index price (quote currency) | [optional] +**ask1_size** | **int** | Best ask size | [optional] +**ask1_price** | **str** | Best ask price | [optional] +**bid1_size** | **int** | Best bid size | [optional] +**bid1_price** | **str** | Best bid price | [optional] +**position_size** | **int** | Current total long position size | [optional] +**mark_iv** | **str** | Implied volatility | [optional] +**bid_iv** | **str** | Bid side implied volatility | [optional] +**ask_iv** | **str** | Ask side implied volatility | [optional] +**leverage** | **str** | Current leverage. Formula: underlying_price / mark_price * delta | [optional] +**delta** | **str** | Greek letter delta | [optional] +**gamma** | **str** | Greek letter gamma | [optional] +**vega** | **str** | Greek letter vega | [optional] +**theta** | **str** | Greek letter theta | [optional] +**rho** | **str** | Rho | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsUnderlying.md b/docs/OptionsUnderlying.md index 4a1de9e..30897a6 100644 --- a/docs/OptionsUnderlying.md +++ b/docs/OptionsUnderlying.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Underlying name. | [optional] -**index_price** | **str** | Spot index price (quote currency). | [optional] +**name** | **str** | Underlying name | [optional] +**index_price** | **str** | Spot index price (quote currency) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptionsUnderlyingTicker.md b/docs/OptionsUnderlyingTicker.md index f86f6ad..07be739 100644 --- a/docs/OptionsUnderlyingTicker.md +++ b/docs/OptionsUnderlyingTicker.md @@ -1,12 +1,12 @@ # OptionsUnderlyingTicker -Options underlying detail. +Options underlying detail ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trade_put** | **int** | Total put options trades amount in last 24h. | [optional] -**trade_call** | **int** | Total call options trades amount in last 24h. | [optional] -**index_price** | **str** | Index price (quote currency). | [optional] +**trade_put** | **int** | Total put options trades amount in last 24h | [optional] +**trade_call** | **int** | Total call options trades amount in last 24h | [optional] +**index_price** | **str** | Index price (quote currency) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Order.md b/docs/Order.md index d88100b..7eb5f0a 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -1,43 +1,43 @@ # Order -Spot order details. +Spot order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID. | [optional] [readonly] +**id** | **str** | Order ID | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] [readonly] -**create_time** | **str** | Creation time of order. | [optional] [readonly] -**update_time** | **str** | Last modification time of order. | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds). | [optional] [readonly] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] +**create_time** | **str** | Creation time of order | [optional] [readonly] +**update_time** | **str** | Last modification time of order | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair. | +**currency_pair** | **str** | Currency pair | **type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Buy or sell order. | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**price** | **str** | Price can't be empty when `type`= `limit`. | [optional] +**side** | **str** | Buy or sell order | +**amount** | **str** | Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` | +**price** | **str** | Trading price, required when `type`=`limit` | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] -**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] -**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill. | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill. | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total`. | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency. | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price. | [optional] [readonly] -**fee** | **str** | Fee deducted. | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit. | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee. | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee. | [optional] [readonly] -**gt_maker_fee** | **str** | GT used to deduct maker fee. | [optional] [readonly] -**gt_taker_fee** | **str** | GT used to deduct taker fee. | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used. | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee. | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit. | [optional] [readonly] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported | [optional] +**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough | [optional] +**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order | [optional] +**left** | **str** | Amount left to fill | [optional] [readonly] +**filled_amount** | **str** | Amount filled | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price | [optional] [readonly] +**fee** | **str** | Fee deducted | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] +**gt_maker_fee** | **str** | GT amount used to deduct maker fee | [optional] [readonly] +**gt_taker_fee** | **str** | GT amount used to deduct taker fee | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee deduction is enabled | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled | [optional] **finish_as** | **str** | Order completion statuses include: - open: Awaiting processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled due to liquidation - small: Order quantity too small - depth_not_enough: Cancelled due to insufficient market depth - trader_not_enough: Cancelled due to insufficient counterparty - ioc: Not immediately filled because tif is set to ioc - poc: Not met the order poc - fok: Not fully filled immediately because tif is set to fok - stp: Cancelled due to self-trade prevention - unknown: Unknown | [optional] [readonly] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] diff --git a/docs/OrderBook.md b/docs/OrderBook.md index 6050a17..2bfae72 100644 --- a/docs/OrderBook.md +++ b/docs/OrderBook.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` | [optional] -**current** | **int** | The timestamp of the response data being generated (in milliseconds). | [optional] -**update** | **int** | The timestamp of when the orderbook last changed (in milliseconds). | [optional] -**asks** | **list[list[str]]** | Asks order depth. | -**bids** | **list[list[str]]** | Bids order depth. | +**current** | **int** | The timestamp of the response data being generated (in milliseconds) | [optional] +**update** | **int** | The timestamp of when the orderbook last changed (in milliseconds) | [optional] +**asks** | **list[list[str]]** | Ask Depth | +**bids** | **list[list[str]]** | Bid Depth | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderCancel.md b/docs/OrderCancel.md index 3a86e21..0a14fe2 100644 --- a/docs/OrderCancel.md +++ b/docs/OrderCancel.md @@ -1,46 +1,46 @@ # OrderCancel -Spot order details. +Spot order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID. | [optional] [readonly] +**id** | **str** | Order ID | [optional] [readonly] **text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] [readonly] -**succeeded** | **bool** | Whether the batch of orders succeeded. | [optional] -**label** | **str** | Error label, if any, otherwise an empty string. | [optional] -**message** | **str** | Detailed error message, if any, otherwise an empty string. | [optional] -**create_time** | **str** | Creation time of order. | [optional] [readonly] -**update_time** | **str** | Last modification time of order. | [optional] [readonly] -**create_time_ms** | **int** | Creation time of order (in milliseconds). | [optional] [readonly] -**update_time_ms** | **int** | Last modification time of order (in milliseconds). | [optional] [readonly] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] +**succeeded** | **bool** | Request execution result | [optional] +**label** | **str** | Error label, if any, otherwise an empty string | [optional] +**message** | **str** | Detailed error message, if any, otherwise an empty string | [optional] +**create_time** | **str** | Creation time of order | [optional] [readonly] +**update_time** | **str** | Last modification time of order | [optional] [readonly] +**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional] [readonly] +**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional] [readonly] **status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional] [readonly] -**currency_pair** | **str** | Currency pair. | +**currency_pair** | **str** | Currency pair | **type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **account** | **str** | Account type, spot - spot account, margin - leveraged account, unified - unified account | [optional] [default to 'spot'] -**side** | **str** | Buy or sell order. | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**price** | **str** | Price can't be empty when `type`= `limit`. | [optional] +**side** | **str** | Buy or sell order | +**amount** | **str** | Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` | +**price** | **str** | Trading price, required when `type`=`limit` | [optional] **time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none Only `ioc` and `fok` are supported when `type`=`market` | [optional] [default to 'gtc'] -**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. | [optional] -**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. | [optional] -**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. | [optional] -**left** | **str** | Amount left to fill. | [optional] [readonly] -**filled_amount** | **str** | Amount traded to fill. | [optional] [readonly] -**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total`. | [optional] [readonly] -**filled_total** | **str** | Total filled in quote currency. | [optional] [readonly] -**avg_deal_price** | **str** | Average fill price. | [optional] [readonly] -**fee** | **str** | Fee deducted. | [optional] [readonly] -**fee_currency** | **str** | Fee currency unit. | [optional] [readonly] -**point_fee** | **str** | Points used to deduct fee. | [optional] [readonly] -**gt_fee** | **str** | GT used to deduct fee. | [optional] [readonly] -**gt_maker_fee** | **str** | GT used to deduct maker fee. | [optional] [readonly] -**gt_taker_fee** | **str** | GT used to deduct taker fee. | [optional] [readonly] -**gt_discount** | **bool** | Whether GT fee discount is used. | [optional] [readonly] -**rebated_fee** | **str** | Rebated fee. | [optional] [readonly] -**rebated_fee_currency** | **str** | Rebated fee currency unit. | [optional] [readonly] +**iceberg** | **str** | Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported | [optional] +**auto_borrow** | **bool** | Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough | [optional] +**auto_repay** | **bool** | Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order | [optional] +**left** | **str** | Amount left to fill | [optional] [readonly] +**filled_amount** | **str** | Amount filled | [optional] [readonly] +**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional] [readonly] +**filled_total** | **str** | Total filled in quote currency | [optional] [readonly] +**avg_deal_price** | **str** | Average fill price | [optional] [readonly] +**fee** | **str** | Fee deducted | [optional] [readonly] +**fee_currency** | **str** | Fee currency unit | [optional] [readonly] +**point_fee** | **str** | Points used to deduct fee | [optional] [readonly] +**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly] +**gt_maker_fee** | **str** | GT amount used to deduct maker fee | [optional] [readonly] +**gt_taker_fee** | **str** | GT amount used to deduct taker fee | [optional] [readonly] +**gt_discount** | **bool** | Whether GT fee deduction is enabled | [optional] [readonly] +**rebated_fee** | **str** | Rebated fee | [optional] [readonly] +**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly] **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] -**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] +**stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled | [optional] **finish_as** | **str** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md index 26c176b..f5c838e 100644 --- a/docs/OrderPatch.md +++ b/docs/OrderPatch.md @@ -1,14 +1,14 @@ # OrderPatch -Spot order details. +Spot order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair. | [optional] -**account** | **str** | Specify query account. | [optional] -**amount** | **str** | Trading Quantity. Either amountor pricemust be specified. | [optional] -**price** | **str** | Trading Price. Either amountor pricemust be specified. | [optional] -**amend_text** | **str** | Custom info during amending order. | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**account** | **str** | Specify query account | [optional] +**amount** | **str** | Trading quantity. Either `amount` or `price` must be specified | [optional] +**price** | **str** | Trading price. Either `amount` or `price` must be specified | [optional] +**amend_text** | **str** | Custom info during order amendment | [optional] **action_mode** | **str** | Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResp.md b/docs/OrderResp.md index 749f53e..c89354c 100644 --- a/docs/OrderResp.md +++ b/docs/OrderResp.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] +**order_id** | **int** | Order ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerCommissionHistory.md b/docs/PartnerCommissionHistory.md index 2a2f590..057575b 100644 --- a/docs/PartnerCommissionHistory.md +++ b/docs/PartnerCommissionHistory.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total. | [optional] -**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of comission history. | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[AgencyCommission]**](AgencyCommission.md) | List of commission history | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerSub.md b/docs/PartnerSub.md index e7a0989..9337d3a 100644 --- a/docs/PartnerSub.md +++ b/docs/PartnerSub.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] -**user_join_time** | **int** | The time when the user joined the system, in seconds Unix timestamp. | [optional] -**type** | **int** | Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer). | [optional] +**user_id** | **int** | User ID | [optional] +**user_join_time** | **int** | Time when user joined the system, Unix timestamp in seconds | [optional] +**type** | **int** | Type (1-Sub-agent 2-Indirect direct customer 3-Direct direct customer) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerSubList.md b/docs/PartnerSubList.md index 37085a9..c77bc6f 100644 --- a/docs/PartnerSubList.md +++ b/docs/PartnerSubList.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total. | [optional] -**list** | [**list[PartnerSub]**](PartnerSub.md) | Subordinate list. | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[PartnerSub]**](PartnerSub.md) | Subordinate list | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartnerTransactionHistory.md b/docs/PartnerTransactionHistory.md index 7df8289..707f40b 100644 --- a/docs/PartnerTransactionHistory.md +++ b/docs/PartnerTransactionHistory.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int** | Total. | [optional] -**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history. | [optional] +**total** | **int** | Total | [optional] +**list** | [**list[AgencyTransaction]**](AgencyTransaction.md) | List of transaction history | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchUniLend.md b/docs/PatchUniLend.md index 5aeda0f..b622196 100644 --- a/docs/PatchUniLend.md +++ b/docs/PatchUniLend.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] -**min_rate** | **str** | Minimum interest rate. | [optional] +**currency** | **str** | Currency name | [optional] +**min_rate** | **str** | Minimum interest rate | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlaceDualInvestmentOrder.md b/docs/PlaceDualInvestmentOrder.md index 78ac28d..f957b47 100644 --- a/docs/PlaceDualInvestmentOrder.md +++ b/docs/PlaceDualInvestmentOrder.md @@ -1,12 +1,12 @@ # PlaceDualInvestmentOrder -Dual Investment order. +Dual Investment Order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**plan_id** | **str** | Plan ID. | -**amount** | **str** | Subscription amount, mutually exclusive with the copies field. | -**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] +**plan_id** | **str** | Product ID | +**amount** | **str** | Subscription amount, mutually exclusive with copies field | +**text** | **str** | Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Position.md b/docs/Position.md index 36fcc5d..642582b 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -1,42 +1,42 @@ # Position -Futures position details. +Futures position details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | **int** | User ID. | [optional] [readonly] -**contract** | **str** | Futures contract. | [optional] [readonly] -**size** | **int** | Position size. | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**size** | **int** | Position size | [optional] [readonly] **leverage** | **str** | Position leverage. 0 means cross margin; positive number means isolated margin | [optional] -**risk_limit** | **str** | Position risk limit. | [optional] -**leverage_max** | **str** | Maximum leverage under current risk limit. | [optional] [readonly] -**maintenance_rate** | **str** | Maintenance rate under current risk limit. | [optional] [readonly] -**value** | **str** | Position value calculated in settlement currency. | [optional] [readonly] -**margin** | **str** | Position margin. | [optional] -**entry_price** | **str** | Entry price. | [optional] [readonly] -**liq_price** | **str** | Liquidation price. | [optional] [readonly] -**mark_price** | **str** | Current mark price. | [optional] [readonly] +**risk_limit** | **str** | Position risk limit | [optional] +**leverage_max** | **str** | Maximum leverage under current risk limit | [optional] [readonly] +**maintenance_rate** | **str** | Maintenance rate under current risk limit | [optional] [readonly] +**value** | **str** | Position value calculated in settlement currency | [optional] [readonly] +**margin** | **str** | Position margin | [optional] +**entry_price** | **str** | Entry price | [optional] [readonly] +**liq_price** | **str** | Liquidation price | [optional] [readonly] +**mark_price** | **str** | Current mark price | [optional] [readonly] **initial_margin** | **str** | The initial margin occupied by the position, applicable to the portfolio margin account | [optional] [readonly] **maintenance_margin** | **str** | Maintenance margin required for the position, applicable to portfolio margin account | [optional] [readonly] -**unrealised_pnl** | **str** | Unrealized PNL. | [optional] [readonly] -**realised_pnl** | **str** | Realized PNL. | [optional] [readonly] -**pnl_pnl** | **str** | Realized PNL - Position P/L. | [optional] [readonly] -**pnl_fund** | **str** | Realized PNL - Funding Fees. | [optional] [readonly] -**pnl_fee** | **str** | Realized PNL - Transaction Fees. | [optional] [readonly] -**history_pnl** | **str** | History realized PNL. | [optional] [readonly] -**last_close_pnl** | **str** | PNL of last position close. | [optional] [readonly] -**realised_point** | **str** | Realized POINT PNL. | [optional] [readonly] -**history_point** | **str** | History realized POINT PNL. | [optional] [readonly] +**unrealised_pnl** | **str** | Unrealized PNL | [optional] [readonly] +**realised_pnl** | **str** | Realized PnL | [optional] [readonly] +**pnl_pnl** | **str** | Realized PNL - Position P/L | [optional] [readonly] +**pnl_fund** | **str** | Realized PNL - Funding Fees | [optional] [readonly] +**pnl_fee** | **str** | Realized PNL - Transaction Fees | [optional] [readonly] +**history_pnl** | **str** | Total realized PnL from closed positions | [optional] [readonly] +**last_close_pnl** | **str** | PNL of last position close | [optional] [readonly] +**realised_point** | **str** | Realized POINT PNL | [optional] [readonly] +**history_point** | **str** | History realized POINT PNL | [optional] [readonly] **adl_ranking** | **int** | Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation | [optional] [readonly] -**pending_orders** | **int** | Current open orders. | [optional] [readonly] +**pending_orders** | **int** | Current pending order quantity | [optional] [readonly] **close_order** | [**PositionCloseOrder**](PositionCloseOrder.md) | | [optional] -**mode** | **str** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: mode | [optional] -**cross_leverage_limit** | **str** | Cross margin leverage(valid only when `leverage` is 0). | [optional] -**update_time** | **int** | Last update time. | [optional] [readonly] -**update_id** | **int** | Update id. Each time the position is updated, the value will be +1. | [optional] [readonly] -**open_time** | **int** | First Open Time. | [optional] -**risk_limit_table** | **str** | Risk limit table ID. | [optional] [readonly] -**average_maintenance_rate** | **str** | Average maintenance margin rate. | [optional] [readonly] +**mode** | **str** | Position mode, including: - `single`: Single position mode - `dual_long`: Long position in dual position mode - `dual_short`: Short position in dual position mode | [optional] +**cross_leverage_limit** | **str** | Cross margin leverage (valid only when `leverage` is 0) | [optional] +**update_time** | **int** | Last update time | [optional] [readonly] +**update_id** | **int** | Update ID. The value increments by 1 each time the position is updated | [optional] [readonly] +**open_time** | **int** | First Open Time | [optional] +**risk_limit_table** | **str** | Risk limit table ID | [optional] [readonly] +**average_maintenance_rate** | **str** | Average maintenance margin rate | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PositionClose.md b/docs/PositionClose.md index 775029c..93bf9cf 100644 --- a/docs/PositionClose.md +++ b/docs/PositionClose.md @@ -3,19 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **float** | Position close time. | [optional] [readonly] -**contract** | **str** | Futures contract. | [optional] [readonly] -**side** | **str** | Position side, long or short. | [optional] [readonly] -**pnl** | **str** | PNL. | [optional] [readonly] -**pnl_pnl** | **str** | PNL - Position P/L. | [optional] [readonly] -**pnl_fund** | **str** | PNL - Funding Fees. | [optional] [readonly] -**pnl_fee** | **str** | PNL - Transaction Fees. | [optional] [readonly] -**text** | **str** | Text of close order. | [optional] [readonly] -**max_size** | **str** | Max Trade Size. | [optional] [readonly] -**accum_size** | **str** | Cumulative closed position volume. | [optional] [readonly] -**first_open_time** | **int** | First Open Time. | [optional] [readonly] -**long_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when closing average price. | [optional] [readonly] -**short_price** | **str** | When 'side' is 'long,' it indicates the opening average price; when closing average price | [optional] [readonly] +**time** | **float** | Position close time | [optional] [readonly] +**contract** | **str** | Futures contract | [optional] [readonly] +**side** | **str** | Position side - `long`: Long position - `short`: Short position | [optional] [readonly] +**pnl** | **str** | PnL | [optional] [readonly] +**pnl_pnl** | **str** | PNL - Position P/L | [optional] [readonly] +**pnl_fund** | **str** | PNL - Funding Fees | [optional] [readonly] +**pnl_fee** | **str** | PNL - Transaction Fees | [optional] [readonly] +**text** | **str** | Source of close order. See `order.text` field for specific values | [optional] [readonly] +**max_size** | **str** | Max Trade Size | [optional] [readonly] +**accum_size** | **str** | Cumulative closed position volume | [optional] [readonly] +**first_open_time** | **int** | First Open Time | [optional] [readonly] +**long_price** | **str** | When side is 'long', it indicates the opening average price; when side is 'short', it indicates the closing average price | [optional] [readonly] +**short_price** | **str** | When side is 'long', it indicates the closing average price; when side is 'short', it indicates the opening average price | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PositionCloseOrder.md b/docs/PositionCloseOrder.md index 6366d4f..20d1088 100644 --- a/docs/PositionCloseOrder.md +++ b/docs/PositionCloseOrder.md @@ -1,12 +1,12 @@ # PositionCloseOrder -Current close order if any, or `null`. +Current close order information, or `null` if no close order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Close order ID. | [optional] -**price** | **str** | Close order price. | [optional] -**is_liq** | **bool** | Is the close order from liquidation. | [optional] +**id** | **int** | Order ID | [optional] +**price** | **str** | Order price | [optional] +**is_liq** | **bool** | Whether the close order is from liquidation | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProfitLossRange.md b/docs/ProfitLossRange.md index f05d06d..963c54a 100644 --- a/docs/ProfitLossRange.md +++ b/docs/ProfitLossRange.md @@ -1,12 +1,12 @@ # ProfitLossRange -Profit and loss range. +Profit and loss range ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**price_percentage** | **str** | Percentage change in price. | [optional] -**implied_volatility_percentage** | **str** | Percentage change in implied volatility. | [optional] -**profit_loss** | **str** | PNL. | [optional] +**price_percentage** | **str** | Percentage change in price | [optional] +**implied_volatility_percentage** | **str** | Percentage change in implied volatility | [optional] +**profit_loss** | **str** | PnL | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RebateApi.md b/docs/RebateApi.md index 8f98e45..45593ba 100644 --- a/docs/RebateApi.md +++ b/docs/RebateApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user. -[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user. -[**partner_transaction_history**](RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users. -[**partner_commissions_history**](RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users. -[**partner_sub_list**](RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list. -[**rebate_broker_commission_history**](RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | The broker obtains the user's commission rebate records. -[**rebate_broker_transaction_history**](RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | The broker obtains the user's trading history. -[**rebate_user_info**](RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User retrieves rebate information. -[**user_sub_relation**](RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User-subordinate relationship. +[**agency_transaction_history**](RebateApi.md#agency_transaction_history) | **GET** /rebate/agency/transaction_history | Broker obtains transaction history of recommended users +[**agency_commissions_history**](RebateApi.md#agency_commissions_history) | **GET** /rebate/agency/commission_history | Broker obtains rebate history of recommended users +[**partner_transaction_history**](RebateApi.md#partner_transaction_history) | **GET** /rebate/partner/transaction_history | Partner obtains transaction history of recommended users +[**partner_commissions_history**](RebateApi.md#partner_commissions_history) | **GET** /rebate/partner/commission_history | Partner obtains rebate records of recommended users +[**partner_sub_list**](RebateApi.md#partner_sub_list) | **GET** /rebate/partner/sub_list | Partner subordinate list +[**rebate_broker_commission_history**](RebateApi.md#rebate_broker_commission_history) | **GET** /rebate/broker/commission_history | Broker obtains user's rebate records +[**rebate_broker_transaction_history**](RebateApi.md#rebate_broker_transaction_history) | **GET** /rebate/broker/transaction_history | Broker obtains user's trading history +[**rebate_user_info**](RebateApi.md#rebate_user_info) | **GET** /rebate/user/info | User obtains rebate information +[**user_sub_relation**](RebateApi.md#user_sub_relation) | **GET** /rebate/user/sub_relation | User subordinate relationship # **agency_transaction_history** > list[AgencyTransactionHistory] agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -The agency obtains the transaction history of the recommended user. +Broker obtains transaction history of recommended users -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -46,15 +46,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs. (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) -to = 1602123600 # int | Time range ending, default to current time. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +currency_pair = 'BTC_USDT' # str | Specify the trading pair. If not specified, returns all trading pairs (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) +to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # The agency obtains the transaction history of the recommended user. + # Broker obtains transaction history of recommended users api_response = api_instance.agency_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -67,12 +67,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs. | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **currency_pair** | **str**| Specify the trading pair. If not specified, returns all trading pairs | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -90,16 +90,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **agency_commissions_history** > list[AgencyCommissionHistory] agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -The agency obtains the commission history of the recommended user. +Broker obtains rebate history of recommended users -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -125,15 +125,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) -to = 1602123600 # int | Time range ending, default to current time. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) +to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # The agency obtains the commission history of the recommended user. + # Broker obtains rebate history of recommended users api_response = api_instance.agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -146,12 +146,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -169,16 +169,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **partner_transaction_history** > PartnerTransactionHistory partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -Partner obtains transaction records of recommended users. +Partner obtains transaction history of recommended users -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -204,15 +204,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify the currency pair, if not specified, return all currency pairs. (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) -to = 1602123600 # int | Time range ending, default to current time. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +currency_pair = 'BTC_USDT' # str | Specify the trading pair. If not specified, returns all trading pairs (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) +to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # Partner obtains transaction records of recommended users. + # Partner obtains transaction history of recommended users api_response = api_instance.partner_transaction_history(currency_pair=currency_pair, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -225,12 +225,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify the currency pair, if not specified, return all currency pairs. | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **currency_pair** | **str**| Specify the trading pair. If not specified, returns all trading pairs | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -248,16 +248,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **partner_commissions_history** > PartnerCommissionHistory partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) -Partner obtains commission records of recommended users. +Partner obtains rebate records of recommended users -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -283,15 +283,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) -user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) -to = 1602123600 # int | Time range ending, default to current time. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) +to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # Partner obtains commission records of recommended users. + # Partner obtains rebate records of recommended users api_response = api_instance.partner_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -304,12 +304,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] - **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -327,16 +327,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **partner_sub_list** > PartnerSubList partner_sub_list(user_id=user_id, limit=limit, offset=offset) -Partner subordinate list. +Partner subordinate list -Including sub-agents, direct customers, indirect customers. +Including sub-agents, direct customers, and indirect customers ### Example @@ -362,12 +362,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # Partner subordinate list. + # Partner subordinate list api_response = api_instance.partner_sub_list(user_id=user_id, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -380,9 +380,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **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 @@ -400,16 +400,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **rebate_broker_commission_history** > list[BrokerCommission] rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) -The broker obtains the user's commission rebate records. +Broker obtains user's rebate records -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -435,14 +435,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) -user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) -_from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) -to = 1714521600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1711929600 # int | Start time of the query record. If not specified, defaults to 30 days before the current time (optional) +to = 1714521600 # int | End timestamp for the query, defaults to current time if not specified (optional) try: - # The broker obtains the user's commission rebate records. + # Broker obtains user's rebate records api_response = api_instance.rebate_broker_commission_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -455,11 +455,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] - **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] - **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Start time of the query record. If not specified, defaults to 30 days before the current time | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] ### Return type @@ -477,16 +477,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **rebate_broker_transaction_history** > list[BrokerTransaction] rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) -The broker obtains the user's trading history. +Broker obtains user's trading history -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -512,14 +512,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) -user_id = 10003 # int | User ID. If not specified, all user records will be returned. (optional) -_from = 1711929600 # int | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. (optional) -to = 1714521600 # int | Time range ending, default to current time. (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) +_from = 1711929600 # int | Start time of the query record. If not specified, defaults to 30 days before the current time (optional) +to = 1714521600 # int | End timestamp for the query, defaults to current time if not specified (optional) try: - # The broker obtains the user's trading history. + # Broker obtains user's trading history api_response = api_instance.rebate_broker_transaction_history(limit=limit, offset=offset, user_id=user_id, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -532,11 +532,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] - **user_id** | **int**| User ID. If not specified, all user records will be returned. | [optional] - **_from** | **int**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] + **_from** | **int**| Start time of the query record. If not specified, defaults to 30 days before the current time | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] ### Return type @@ -554,14 +554,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **rebate_user_info** > list[RebateUserInfo] rebate_user_info() -User retrieves rebate information. +User obtains rebate information ### Example @@ -589,7 +589,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.RebateApi(api_client) try: - # User retrieves rebate information. + # User obtains rebate information api_response = api_instance.rebate_user_info() print(api_response) except GateApiException as ex: @@ -617,16 +617,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_sub_relation** > UserSubRelation user_sub_relation(user_id_list) -User-subordinate relationship. +User subordinate relationship -Query whether the specified user is in the system. +Query whether the specified user is within the system ### Example @@ -652,10 +652,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) -user_id_list = '1, 2, 3' # str | Query the user's ID list, split by,, if there are more than 100, take 100. +user_id_list = '1, 2, 3' # str | Query user ID list, separated by commas. If more than 100, only 100 will be returned try: - # User-subordinate relationship. + # User subordinate relationship api_response = api_instance.user_sub_relation(user_id_list) print(api_response) except GateApiException as ex: @@ -668,7 +668,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id_list** | **str**| Query the user's ID list, split by,, if there are more than 100, take 100. | + **user_id_list** | **str**| Query user ID list, separated by commas. If more than 100, only 100 will be returned | ### Return type @@ -686,7 +686,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/RebateUserInfo.md b/docs/RebateUserInfo.md index 1e721c4..0f97b11 100644 --- a/docs/RebateUserInfo.md +++ b/docs/RebateUserInfo.md @@ -1,10 +1,10 @@ # RebateUserInfo -Retrieve user rebate information. +Retrieve user rebate information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**invite_uid** | **int** | My inviter's UID. | [optional] +**invite_uid** | **int** | My inviter's UID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayCurrencyRes.md b/docs/RepayCurrencyRes.md index d190f4b..9715d48 100644 --- a/docs/RepayCurrencyRes.md +++ b/docs/RepayCurrencyRes.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**succeeded** | **bool** | Has the repayment been successful. | [optional] -**label** | **str** | Error identifier for unsuccessful operations; empty for successful. | [optional] -**message** | **str** | Error description in case of operation failure; empty when successful. | [optional] -**currency** | **str** | Repayment currency. | [optional] -**repaid_principal** | **str** | Principal. | [optional] -**repaid_interest** | **str** | Principal. | [optional] +**succeeded** | **bool** | Whether the repayment was successful | [optional] +**label** | **str** | Error identifier for failed operations; empty when successful | [optional] +**message** | **str** | Error description for failed operations; empty when successful | [optional] +**currency** | **str** | Repayment currency | [optional] +**repaid_principal** | **str** | Principal | [optional] +**repaid_interest** | **str** | Principal | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayLoan.md b/docs/RepayLoan.md index fd8388f..92c8463 100644 --- a/docs/RepayLoan.md +++ b/docs/RepayLoan.md @@ -1,11 +1,11 @@ # RepayLoan -Repay. +Repay ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | -**repay_amount** | **str** | Repayment amount, it is mandatory when making partial repayments. | +**order_id** | **int** | Order ID | +**repay_amount** | **str** | Repayment amount, it is mandatory when making partial repayments | **repaid_all** | **bool** | Repayment method, set to `true` for full repayment, and `false` for partial repayment; When partial repayment, the repay_amount parameter cannot be greater than the remaining amount to be repaid by the user. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayMultiLoan.md b/docs/RepayMultiLoan.md index 9cf08c2..eb1c0ab 100644 --- a/docs/RepayMultiLoan.md +++ b/docs/RepayMultiLoan.md @@ -1,11 +1,11 @@ # RepayMultiLoan -Repay Multi-Collateral Loan. +Multi-currency collateral repayment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | -**repay_items** | [**list[MultiLoanRepayItem]**](MultiLoanRepayItem.md) | Repay Currency Item. | +**order_id** | **int** | Order ID | +**repay_items** | [**list[MultiLoanRepayItem]**](MultiLoanRepayItem.md) | Repay Currency Item | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecord.md b/docs/RepayRecord.md index a583be6..a9cf6cf 100644 --- a/docs/RepayRecord.md +++ b/docs/RepayRecord.md @@ -1,22 +1,22 @@ # RepayRecord -Repayment record. +Repayment record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**order_id** | **int** | Order ID. | [optional] -**record_id** | **int** | Repayment record ID. | [optional] -**repaid_amount** | **str** | Repayment amount. | [optional] -**borrow_currency** | **str** | Borrowed currency. | [optional] -**collateral_currency** | **str** | Collateral. | [optional] -**init_ltv** | **str** | The initial collateralization rate. | [optional] -**borrow_time** | **int** | Borrowing time, timestamp. | [optional] -**repay_time** | **int** | Repayment time, timestamp. | [optional] -**total_interest** | **str** | Total interest. | [optional] -**before_left_principal** | **str** | Principal to be repaid before repayment. | [optional] -**after_left_principal** | **str** | Principal to be repaid after repayment. | [optional] -**before_left_collateral** | **str** | Collateral quantity before repayment. | [optional] -**after_left_collateral** | **str** | Collateral quantity after repayment. | [optional] +**order_id** | **int** | Order ID | [optional] +**record_id** | **int** | Repayment record ID | [optional] +**repaid_amount** | **str** | Repayment amount | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**collateral_currency** | **str** | Collateral currency | [optional] +**init_ltv** | **str** | Initial collateralization rate | [optional] +**borrow_time** | **int** | Borrowing time, timestamp | [optional] +**repay_time** | **int** | Repayment time, timestamp | [optional] +**total_interest** | **str** | Total interest | [optional] +**before_left_principal** | **str** | Principal to be repaid before repayment | [optional] +**after_left_principal** | **str** | Principal to be repaid after repayment | [optional] +**before_left_collateral** | **str** | Collateral amount before repayment | [optional] +**after_left_collateral** | **str** | Collateral amount after repayment | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecordCurrency.md b/docs/RepayRecordCurrency.md index 514d3c3..d8a1c90 100644 --- a/docs/RepayRecordCurrency.md +++ b/docs/RepayRecordCurrency.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**before_amount** | **str** | Amount before the operation. | [optional] -**before_amount_usdt** | **str** | USDT Amount before the operation. | [optional] -**after_amount** | **str** | Amount after the operation. | [optional] -**after_amount_usdt** | **str** | USDT Amount after the operation. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**before_amount** | **str** | Amount before the operation | [optional] +**before_amount_usdt** | **str** | USDT Amount before the operation | [optional] +**after_amount** | **str** | Amount after the operation | [optional] +**after_amount_usdt** | **str** | USDT Amount after the operation | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecordLeftInterest.md b/docs/RepayRecordLeftInterest.md index 9bde226..79ca1d9 100644 --- a/docs/RepayRecordLeftInterest.md +++ b/docs/RepayRecordLeftInterest.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**before_amount** | **str** | Interest amount before repayment. | [optional] -**before_amount_usdt** | **str** | Converted value of interest before repayment in USDT. | [optional] -**after_amount** | **str** | Interest amount after repayment. | [optional] -**after_amount_usdt** | **str** | Converted value of interest after repayment in USDT. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**before_amount** | **str** | Interest amount before repayment | [optional] +**before_amount_usdt** | **str** | Converted value of interest before repayment in USDT | [optional] +**after_amount** | **str** | Interest amount after repayment | [optional] +**after_amount_usdt** | **str** | Converted value of interest after repayment in USDT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecordRepaidCurrency.md b/docs/RepayRecordRepaidCurrency.md index 36b657a..b49320d 100644 --- a/docs/RepayRecordRepaidCurrency.md +++ b/docs/RepayRecordRepaidCurrency.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Repayment currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**repaid_amount** | **str** | Repayment amount. | [optional] -**repaid_principal** | **str** | Principal. | [optional] -**repaid_interest** | **str** | Interest. | [optional] -**repaid_amount_usdt** | **str** | Value of the repayment amount in USDT. | [optional] +**currency** | **str** | Repayment currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**repaid_amount** | **str** | Repayment amount | [optional] +**repaid_principal** | **str** | Principal | [optional] +**repaid_interest** | **str** | Interest | [optional] +**repaid_amount_usdt** | **str** | Repayment amount converted to USDT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayRecordTotalInterest.md b/docs/RepayRecordTotalInterest.md index e7d143d..8c7a2cc 100644 --- a/docs/RepayRecordTotalInterest.md +++ b/docs/RepayRecordTotalInterest.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**index_price** | **str** | Currency Index Price. | [optional] -**amount** | **str** | Interest Amount. | [optional] -**amount_usdt** | **str** | Interest amount converted to USDT. | [optional] +**currency** | **str** | Currency | [optional] +**index_price** | **str** | Currency Index Price | [optional] +**amount** | **str** | Interest Amount | [optional] +**amount_usdt** | **str** | Interest amount converted to USDT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepayResp.md b/docs/RepayResp.md index f3a2776..f7124e3 100644 --- a/docs/RepayResp.md +++ b/docs/RepayResp.md @@ -1,11 +1,11 @@ # RepayResp -Repay. +Repay ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**repaid_principal** | **str** | Principal. | [optional] -**repaid_interest** | **str** | Interest. | [optional] +**repaid_principal** | **str** | Principal | [optional] +**repaid_interest** | **str** | Interest | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RiskUnits.md b/docs/RiskUnits.md index ddef59b..dcff46e 100644 --- a/docs/RiskUnits.md +++ b/docs/RiskUnits.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**symbol** | **str** | Risk unit flag. | [optional] -**spot_in_use** | **str** | Spot hedging utilization. | [optional] -**maintain_margin** | **str** | Maintenance margin for risk unit. | [optional] -**initial_margin** | **str** | Initial margin for risk unit. | [optional] -**delta** | **str** | Total Delta of risk unit. | [optional] -**gamma** | **str** | Total Gamma of risk unit. | [optional] -**theta** | **str** | Total Theta of risk unit. | [optional] -**vega** | **str** | Total Vega of risk unit. | [optional] +**symbol** | **str** | Risk unit flag | [optional] +**spot_in_use** | **str** | Spot hedging occupied amount | [optional] +**maintain_margin** | **str** | Maintenance margin for risk unit | [optional] +**initial_margin** | **str** | Initial margin for risk unit | [optional] +**delta** | **str** | Total Delta of risk unit | [optional] +**gamma** | **str** | Total Gamma of risk unit | [optional] +**theta** | **str** | Total Theta of risk unit | [optional] +**vega** | **str** | Total Vega of risk unit | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SavedAddress.md b/docs/SavedAddress.md index 77d7657..117d52d 100644 --- a/docs/SavedAddress.md +++ b/docs/SavedAddress.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**chain** | **str** | Chain name. | [optional] -**address** | **str** | Address. | [optional] -**name** | **str** | Name. | [optional] -**tag** | **str** | Tag. | [optional] -**verified** | **str** | Whether to pass the verification 0-unverified, 1-verified. | [optional] +**currency** | **str** | Currency | [optional] +**chain** | **str** | Chain name | [optional] +**address** | **str** | Address | [optional] +**name** | **str** | Name | [optional] +**tag** | **str** | Tag | [optional] +**verified** | **str** | Whether to pass the verification 0-unverified, 1-verified | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SmallBalance.md b/docs/SmallBalance.md index 945735a..7302d38 100644 --- a/docs/SmallBalance.md +++ b/docs/SmallBalance.md @@ -1,13 +1,13 @@ # SmallBalance -Convert Small Balance. +Small Balance Conversion ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**available_balance** | **str** | Available balance. | [optional] -**estimated_as_btc** | **str** | Estimated as BTC. | [optional] -**convertible_to_gt** | **str** | Estimated conversion to GT. | [optional] +**currency** | **str** | Currency | [optional] +**available_balance** | **str** | Available balance | [optional] +**estimated_as_btc** | **str** | Estimated as BTC | [optional] +**convertible_to_gt** | **str** | Estimated conversion to GT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SmallBalanceHistory.md b/docs/SmallBalanceHistory.md index 4e094c3..5a5f5b0 100644 --- a/docs/SmallBalanceHistory.md +++ b/docs/SmallBalanceHistory.md @@ -1,14 +1,14 @@ # SmallBalanceHistory -Convert Small Balance. +Small Balance Conversion ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Order ID. | [optional] [readonly] -**currency** | **str** | Currency. | [optional] [readonly] -**amount** | **str** | amount. | [optional] [readonly] -**gt_amount** | **str** | GT amount. | [optional] [readonly] -**create_time** | **int** | Exchange time (in seconds). | [optional] [readonly] +**id** | **str** | Order ID | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**amount** | **str** | Swap Amount | [optional] [readonly] +**gt_amount** | **str** | GT amount | [optional] [readonly] +**create_time** | **int** | Exchange time (in seconds) | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md index 9ce8e92..6bb761e 100644 --- a/docs/SpotAccount.md +++ b/docs/SpotAccount.md @@ -3,10 +3,10 @@ ## 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] +**currency** | **str** | Currency detail | [optional] +**available** | **str** | Available amount | [optional] +**locked** | **str** | Locked amount, used in trading | [optional] +**update_id** | **int** | Version number | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotAccountBook.md b/docs/SpotAccountBook.md index 9d79d3e..80d34cb 100644 --- a/docs/SpotAccountBook.md +++ b/docs/SpotAccountBook.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Balance change record ID. | [optional] -**time** | **int** | The timestamp of the change (in milliseconds). | [optional] -**currency** | **str** | Currency changed. | [optional] -**change** | **str** | Amount changed. Positive value means transferring in, while negative out. | [optional] -**balance** | **str** | Balance after change. | [optional] +**id** | **str** | Balance change record ID | [optional] +**time** | **int** | The timestamp of the change (in milliseconds) | [optional] +**currency** | **str** | Currency changed | [optional] +**change** | **str** | Amount changed. Positive value means transferring in, while negative out | [optional] +**balance** | **str** | Balance after change | [optional] **type** | **str** | Account book type. Please refer to [account book type](#accountbook-type) for more detail | [optional] -**code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code). | [optional] -**text** | **str** | Additional information. | [optional] +**code** | **str** | Account change code, see [Asset Record Code] (Asset Record Code) | [optional] +**text** | **str** | Additional information | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotApi.md b/docs/SpotApi.md index 15709cf..b9dad8b 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -4,46 +4,46 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details. -[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency. -[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported. -[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair. -[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information. -[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book. -[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades. -[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market candlesticks. -[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query user trading fee rates. -[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Query a batch of user trading fee rates. -[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts. -[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query account book. -[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Create a batch of orders. -[**list_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. -[**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair. -[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list. -[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order. -[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order. -[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order. -[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history. -[**get_system_time**](SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time. -[**countdown_cancel_all_spot**](SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders. -[**amend_batch_orders**](SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders. -[**get_spot_insurance_history**](SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data. -[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Retrieve running auto order list. -[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create a price-triggered order. -[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel All Price-triggered Orders. -[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Get a price-triggered order. -[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | cancel a price-triggered order. +[**list_currencies**](SpotApi.md#list_currencies) | **GET** /spot/currencies | Query all currency information +[**get_currency**](SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Query single currency information +[**list_currency_pairs**](SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | Query all supported currency pairs +[**get_currency_pair**](SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Query single currency pair details +[**list_tickers**](SpotApi.md#list_tickers) | **GET** /spot/tickers | Get currency pair ticker information +[**list_order_book**](SpotApi.md#list_order_book) | **GET** /spot/order_book | Get market depth information +[**list_trades**](SpotApi.md#list_trades) | **GET** /spot/trades | Query market transaction records +[**list_candlesticks**](SpotApi.md#list_candlesticks) | **GET** /spot/candlesticks | Market K-line chart +[**get_fee**](SpotApi.md#get_fee) | **GET** /spot/fee | Query account fee rates +[**get_batch_spot_fee**](SpotApi.md#get_batch_spot_fee) | **GET** /spot/batch_fee | Batch query account fee rates +[**list_spot_accounts**](SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot trading accounts +[**list_spot_account_book**](SpotApi.md#list_spot_account_book) | **GET** /spot/account_book | Query spot account transaction history +[**create_batch_orders**](SpotApi.md#create_batch_orders) | **POST** /spot/batch_orders | Batch place orders +[**list_all_open_orders**](SpotApi.md#list_all_open_orders) | **GET** /spot/open_orders | List all open orders +[**create_cross_liquidate_order**](SpotApi.md#create_cross_liquidate_order) | **POST** /spot/cross_liquidate_orders | Close position when cross-currency is disabled +[**list_orders**](SpotApi.md#list_orders) | **GET** /spot/orders | List orders +[**create_order**](SpotApi.md#create_order) | **POST** /spot/orders | Create an order +[**cancel_orders**](SpotApi.md#cancel_orders) | **DELETE** /spot/orders | Cancel all `open` orders in specified currency pair +[**cancel_batch_orders**](SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel batch orders by specified ID list +[**get_order**](SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Query single order details +[**cancel_order**](SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel single order +[**amend_order**](SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend single order +[**list_my_trades**](SpotApi.md#list_my_trades) | **GET** /spot/my_trades | Query personal trading records +[**get_system_time**](SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time +[**countdown_cancel_all_spot**](SpotApi.md#countdown_cancel_all_spot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders +[**amend_batch_orders**](SpotApi.md#amend_batch_orders) | **POST** /spot/amend_batch_orders | Batch modification of orders +[**get_spot_insurance_history**](SpotApi.md#get_spot_insurance_history) | **GET** /spot/insurance_history | Query spot insurance fund historical data +[**list_spot_price_triggered_orders**](SpotApi.md#list_spot_price_triggered_orders) | **GET** /spot/price_orders | Query running auto order list +[**create_spot_price_triggered_order**](SpotApi.md#create_spot_price_triggered_order) | **POST** /spot/price_orders | Create price-triggered order +[**cancel_spot_price_triggered_order_list**](SpotApi.md#cancel_spot_price_triggered_order_list) | **DELETE** /spot/price_orders | Cancel all auto orders +[**get_spot_price_triggered_order**](SpotApi.md#get_spot_price_triggered_order) | **GET** /spot/price_orders/{order_id} | Query single auto order details +[**cancel_spot_price_triggered_order**](SpotApi.md#cancel_spot_price_triggered_order) | **DELETE** /spot/price_orders/{order_id} | Cancel single auto order # **list_currencies** > list[Currency] list_currencies() -List all currencies' details. +Query all currency information -When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. +When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain ### Example @@ -62,7 +62,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) try: - # List all currencies' details. + # Query all currency information api_response = api_instance.list_currencies() print(api_response) except GateApiException as ex: @@ -90,14 +90,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_currency** > Currency get_currency(currency) -Get details of a specific currency. +Query single currency information ### Example @@ -114,10 +114,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency = 'GT' # str | Currency name. +currency = 'GT' # str | Currency name try: - # Get details of a specific currency. + # Query single currency information api_response = api_instance.get_currency(currency) print(api_response) except GateApiException as ex: @@ -130,7 +130,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name. | + **currency** | **str**| Currency name | ### Return type @@ -148,14 +148,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_currency_pairs** > list[CurrencyPair] list_currency_pairs() -List all currency pairs supported. +Query all supported currency pairs ### Example @@ -174,7 +174,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) try: - # List all currency pairs supported. + # Query all supported currency pairs api_response = api_instance.list_currency_pairs() print(api_response) except GateApiException as ex: @@ -202,14 +202,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | All currency pairs retrieved. | - | +**200** | All currency pairs retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_currency_pair** > CurrencyPair get_currency_pair(currency_pair) -Get details of a specifc currency pair. +Query single currency pair details ### Example @@ -226,10 +226,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'ETH_BTC' # str | Currency pair. +currency_pair = 'ETH_BTC' # str | Currency pair try: - # Get details of a specifc currency pair. + # Query single currency pair details api_response = api_instance.get_currency_pair(currency_pair) print(api_response) except GateApiException as ex: @@ -242,7 +242,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | + **currency_pair** | **str**| Currency pair | ### Return type @@ -260,16 +260,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_tickers** > list[Ticker] list_tickers(currency_pair=currency_pair, timezone=timezone) -Retrieve ticker information. +Get currency pair ticker information -Return only related data if `currency_pair` is specified; otherwise return all of them +If `currency_pair` is specified, only query that currency pair; otherwise return all information ### Example @@ -286,11 +286,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) -timezone = 'utc0' # str | Timezone. (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +timezone = 'utc0' # str | Timezone (optional) try: - # Retrieve ticker information. + # Get currency pair ticker information api_response = api_instance.list_tickers(currency_pair=currency_pair, timezone=timezone) print(api_response) except GateApiException as ex: @@ -303,8 +303,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | [optional] - **timezone** | **str**| Timezone. | [optional] + **currency_pair** | **str**| Currency pair | [optional] + **timezone** | **str**| Timezone | [optional] ### Return type @@ -322,16 +322,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_order_book** > OrderBook list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id) -Retrieve order book. +Get market depth information -Market depth buy orders are sorted by price from high to low, sell orders are reversed +Market depth buy orders are sorted by price from high to low, sell orders are sorted from low to high ### Example @@ -348,13 +348,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. -interval = '0' # str | Order depth. 0 means no aggregation is applied. default to 0. (optional) (default to '0') -limit = 10 # int | Maximum number of order depth data in asks or bids. (optional) (default to 10) -with_id = False # bool | Return order book ID. (optional) (default to False) +currency_pair = 'BTC_USDT' # str | Currency pair +interval = '0' # str | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to '0') +limit = 10 # int | Number of depth levels (optional) (default to 10) +with_id = False # bool | Return order book update ID (optional) (default to False) try: - # Retrieve order book. + # Get market depth information api_response = api_instance.list_order_book(currency_pair, interval=interval, limit=limit, with_id=with_id) print(api_response) except GateApiException as ex: @@ -367,10 +367,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | - **interval** | **str**| Order depth. 0 means no aggregation is applied. default to 0. | [optional] [default to '0'] - **limit** | **int**| Maximum number of order depth data in asks or bids. | [optional] [default to 10] - **with_id** | **bool**| Return order book ID. | [optional] [default to False] + **currency_pair** | **str**| Currency pair | + **interval** | **str**| Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to '0'] + **limit** | **int**| Number of depth levels | [optional] [default to 10] + **with_id** | **bool**| Return order book update ID | [optional] [default to False] ### Return type @@ -388,16 +388,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_trades** > list[Trade] list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) -Retrieve market trades. +Query market transaction records -Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. +Supports querying by time range using `from` and `to` parameters or pagination based on `last_id`. By default, queries the last 30 days. Pagination based on `last_id` is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. ### Example @@ -414,16 +414,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. -limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (optional) -reverse = False # bool | Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. (optional) (default to False) -_from = 1627706330 # int | Start timestamp of the query. (optional) -to = 1635329650 # int | Time range ending, default to current time. (optional) -page = 1 # int | Page number. (optional) (default to 1) +currency_pair = 'BTC_USDT' # str | Currency pair +limit = 100 # int | Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 (optional) (default to 100) +last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) +reverse = False # bool | Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. (optional) (default to False) +_from = 1627706330 # int | Start timestamp for the query (optional) +to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional) +page = 1 # int | Page number (optional) (default to 1) try: - # Retrieve market trades. + # Query market transaction records api_response = api_instance.list_trades(currency_pair, limit=limit, last_id=last_id, reverse=reverse, _from=_from, to=to, page=page) print(api_response) except GateApiException as ex: @@ -436,13 +436,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | - **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | [optional] - **reverse** | **bool**| Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. | [optional] [default to False] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] + **currency_pair** | **str**| Currency pair | + **limit** | **int**| Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 | [optional] [default to 100] + **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] + **reverse** | **bool**| Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. | [optional] [default to False] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **page** | **int**| Page number | [optional] [default to 1] ### Return type @@ -460,14 +460,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_candlesticks** > list[list[str]] list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) -Market candlesticks. +Market K-line chart Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval @@ -486,14 +486,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. -limit = 100 # int | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) +currency_pair = 'BTC_USDT' # str | Currency pair +limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) -to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified (optional) -interval = '30m' # str | Interval time between data points. Note that `30d` means 1 natual month, not 30 days (optional) (default to '30m') +to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional) +interval = '30m' # str | Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days (optional) (default to '30m') try: - # Market candlesticks. + # Market K-line chart api_response = api_instance.list_candlesticks(currency_pair, limit=limit, _from=_from, to=to, interval=interval) print(api_response) except GateApiException as ex: @@ -506,11 +506,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | - **limit** | **int**| Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] + **currency_pair** | **str**| Currency pair | + **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] - **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified | [optional] - **interval** | **str**| Interval time between data points. Note that `30d` means 1 natual month, not 30 days | [optional] [default to '30m'] + **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional] + **interval** | **str**| Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days | [optional] [default to '30m'] ### Return type @@ -528,16 +528,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_fee** > SpotFee get_fee(currency_pair=currency_pair) -Query user trading fee rates. +Query account fee rates -This API is deprecated in favour of new fee retrieving API `/wallet/fee`. +This API is deprecated. The new fee query API is `/wallet/fee` ### Example @@ -563,10 +563,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional) +currency_pair = 'BTC_USDT' # str | Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. (optional) try: - # Query user trading fee rates. + # Query account fee rates api_response = api_instance.get_fee(currency_pair=currency_pair) print(api_response) except GateApiException as ex: @@ -579,7 +579,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional] + **currency_pair** | **str**| Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. | [optional] ### Return type @@ -597,14 +597,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_batch_spot_fee** > dict(str, SpotFee) get_batch_spot_fee(currency_pairs) -Query a batch of user trading fee rates. +Batch query account fee rates ### Example @@ -630,10 +630,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pairs = 'BTC_USDT,ETH_USDT' # str | A request can only query up to 50 currency pairs. +currency_pairs = 'BTC_USDT,ETH_USDT' # str | Maximum 50 currency pairs per request try: - # Query a batch of user trading fee rates. + # Batch query account fee rates api_response = api_instance.get_batch_spot_fee(currency_pairs) print(api_response) except GateApiException as ex: @@ -646,7 +646,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pairs** | **str**| A request can only query up to 50 currency pairs. | + **currency_pairs** | **str**| Maximum 50 currency pairs per request | ### Return type @@ -664,14 +664,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_spot_accounts** > list[SpotAccount] list_spot_accounts(currency=currency) -List spot accounts. +List spot trading accounts ### Example @@ -697,10 +697,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +currency = 'BTC' # str | Query by specified currency name (optional) try: - # List spot accounts. + # List spot trading accounts api_response = api_instance.list_spot_accounts(currency=currency) print(api_response) except GateApiException as ex: @@ -713,7 +713,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] + **currency** | **str**| Query by specified currency name | [optional] ### Return type @@ -731,16 +731,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_spot_account_book** > list[SpotAccountBook] list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=code) -Query account book. +Query spot account transaction history -Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. +Record query time range cannot exceed 30 days. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. ### Example @@ -766,16 +766,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -_from = 1627706330 # int | Start timestamp of the query. (optional) -to = 1635329650 # int | Time range ending, default to current time. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -type = 'lend' # str | Only retrieve changes of the specified type. All types will be returned if not specified. (optional) -code = 'code_example' # str | Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +_from = 1627706330 # int | Start timestamp for the query (optional) +to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +type = 'lend' # str | Query by specified account change type. If not specified, all change types will be included. (optional) +code = 'code_example' # str | Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type` (optional) try: - # Query account book. + # Query spot account transaction history api_response = api_instance.list_spot_account_book(currency=currency, _from=_from, to=to, page=page, limit=limit, type=type, code=code) print(api_response) except GateApiException as ex: @@ -788,13 +788,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **type** | **str**| Only retrieve changes of the specified type. All types will be returned if not specified. | [optional] - **code** | **str**| Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **type** | **str**| Query by specified account change type. If not specified, all change types will be included. | [optional] + **code** | **str**| Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type` | [optional] ### Return type @@ -812,16 +812,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_batch_orders** > list[BatchOrder] create_batch_orders(order, x_gate_exptime=x_gate_exptime) -Create a batch of orders. +Batch place orders -Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders +Batch order requirements: 1. Custom order field `text` must be specified 2. Up to 4 currency pairs per request, with up to 10 orders per currency pair 3. Spot orders and margin orders cannot be mixed; all `account` fields in the same request must be identical ### Example @@ -851,7 +851,7 @@ order = [gate_api.Order()] # list[Order] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Create a batch of orders. + # Batch place orders api_response = api_instance.create_batch_orders(order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -883,14 +883,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is completed. | - | +**200** | Request execution completed | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_all_open_orders** > list[OpenOrders] list_all_open_orders(page=page, limit=limit, account=account) -List all open orders. +List all open orders Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. @@ -918,12 +918,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum number of records returned in one page in each currency pair. (optional) (default to 100) -account = 'spot' # str | Specify query account. (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of records returned in one page in each currency pair (optional) (default to 100) +account = 'spot' # str | Specify query account (optional) try: - # List all open orders. + # List all open orders api_response = api_instance.list_all_open_orders(page=page, limit=limit, account=account) print(api_response) except GateApiException as ex: @@ -936,9 +936,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum number of records returned in one page in each currency pair. | [optional] [default to 100] - **account** | **str**| Specify query account. | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of records returned in one page in each currency pair | [optional] [default to 100] + **account** | **str**| Specify query account | [optional] ### Return type @@ -956,16 +956,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_cross_liquidate_order** > Order create_cross_liquidate_order(liquidate_order) -close position when cross-currency is disabled. +Close position when cross-currency is disabled -Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 +Currently, only cross-margin accounts are supported to place buy orders for disabled currencies. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in pending orders) / 0.998 ### Example @@ -994,7 +994,7 @@ api_instance = gate_api.SpotApi(api_client) liquidate_order = gate_api.LiquidateOrder() # LiquidateOrder | try: - # close position when cross-currency is disabled. + # Close position when cross-currency is disabled api_response = api_instance.create_cross_liquidate_order(liquidate_order) print(api_response) except GateApiException as ex: @@ -1025,16 +1025,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | order created. | - | +**201** | Order created successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_orders** > list[Order] list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, side=side) -List orders. +List orders -Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. +Note that query results default to spot order lists for spot, unified account, and isolated margin accounts. When `status` is set to `open` (i.e., when querying pending order lists), only `page` and `limit` pagination controls are supported. `limit` can only be set to a maximum of 100. The `side` parameter and time range query parameters `from` and `to` are not supported. When `status` is set to `finished` (i.e., when querying historical orders), in addition to pagination queries, `from` and `to` time range queries are also supported. Additionally, the `side` parameter can be set to filter one-sided history. Time range filter parameters are processed according to the order end time. ### Example @@ -1060,17 +1060,17 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. +currency_pair = 'BTC_USDT' # str | Query by specified currency pair. Required for open orders, optional for filled orders status = 'open' # str | List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled -page = 1 # int | Page number. (optional) (default to 1) +page = 1 # int | Page number (optional) (default to 1) limit = 100 # int | Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 (optional) (default to 100) -account = 'spot' # str | Specify query account. (optional) -_from = 1627706330 # int | Start timestamp of the query. (optional) -to = 1635329650 # int | Time range ending, default to current time. (optional) -side = 'sell' # str | All bids or asks. Both included if not specified. (optional) +account = 'spot' # str | Specify query account (optional) +_from = 1627706330 # int | Start timestamp for the query (optional) +to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional) +side = 'sell' # str | Specify all bids or all asks, both included if not specified (optional) try: - # List orders. + # List orders api_response = api_instance.list_orders(currency_pair, status, page=page, limit=limit, account=account, _from=_from, to=to, side=side) print(api_response) except GateApiException as ex: @@ -1083,14 +1083,14 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. | + **currency_pair** | **str**| Query by specified currency pair. Required for open orders, optional for filled orders | **status** | **str**| List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled | - **page** | **int**| Page number. | [optional] [default to 1] + **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 | [optional] [default to 100] - **account** | **str**| Specify query account. | [optional] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **side** | **str**| All bids or asks. Both included if not specified. | [optional] + **account** | **str**| Specify query account | [optional] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **side** | **str**| Specify all bids or all asks, both included if not specified | [optional] ### Return type @@ -1108,16 +1108,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_order** > Order create_order(order, x_gate_exptime=x_gate_exptime) -Create an order. +Create an order -Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions +Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use ### Example @@ -1147,7 +1147,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 an order api_response = api_instance.create_order(order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1179,16 +1179,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order created. | - | +**201** | Order created | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_orders** > list[OrderCancel] cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) -Cancel all `open` orders in specified currency pair. +Cancel all `open` orders in specified currency pair -When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account +When the `account` parameter is not specified, all pending orders including spot, unified account, and isolated margin will be cancelled. When `currency_pair` is not specified, all trading pair pending orders will be cancelled. You can specify a particular account to cancel all pending orders under that account ### Example @@ -1214,14 +1214,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) -side = 'sell' # str | All bids or asks. Both included if not specified. (optional) -account = 'spot' # str | Specify account type Classic account: All are included if not specified Unified account: Specify unified (optional) -action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +side = 'sell' # str | Specify all bids or all asks, both included if not specified (optional) +account = 'spot' # str | Specify account type Classic account: All are included if not specified Unified account: Specify `unified` (optional) +action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) (optional) x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel all `open` orders in specified currency pair. + # Cancel all `open` orders in specified currency pair api_response = api_instance.cancel_orders(currency_pair=currency_pair, side=side, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1234,10 +1234,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Currency pair. | [optional] - **side** | **str**| All bids or asks. Both included if not specified. | [optional] - **account** | **str**| Specify account type Classic account: All are included if not specified Unified account: Specify unified | [optional] - **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] + **currency_pair** | **str**| Currency pair | [optional] + **side** | **str**| Specify all bids or all asks, both included if not specified | [optional] + **account** | **str**| Specify account type Classic account: All are included if not specified Unified account: Specify `unified` | [optional] + **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) | [optional] **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] ### Return type @@ -1256,14 +1256,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders. | - | +**200** | Batch cancellation request accepted and processed, success determined by order list | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_batch_orders** > list[CancelOrderResult] cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) -Cancel a batch of orders with an ID list. +Cancel batch orders by specified ID list Multiple currency pairs can be specified, but maximum 20 orders are allowed per request @@ -1295,7 +1295,7 @@ cancel_batch_order = [gate_api.CancelBatchOrder()] # list[CancelBatchOrder] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a batch of orders with an ID list. + # Cancel batch orders by specified ID list api_response = api_instance.cancel_batch_orders(cancel_batch_order, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1327,16 +1327,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation completed. | - | +**200** | Batch cancellation completed | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_order** > Order get_order(order_id, currency_pair, account=account) -Get a single order. +Query single order details -By default, orders for spot, unified account and warehouse-by-site leverage account are checked. +By default, queries orders for spot, unified account, and isolated margin accounts. ### Example @@ -1363,11 +1363,11 @@ 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) -currency_pair = 'BTC_USDT' # str | Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. -account = 'spot' # str | Specify query account. (optional) +currency_pair = 'BTC_USDT' # str | Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records. +account = 'spot' # str | Specify query account (optional) try: - # Get a single order. + # Query single order details api_response = api_instance.get_order(order_id, currency_pair, account=account) print(api_response) except GateApiException as ex: @@ -1381,8 +1381,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | - **currency_pair** | **str**| Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. | - **account** | **str**| Specify query account. | [optional] + **currency_pair** | **str**| Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records. | + **account** | **str**| Specify query account | [optional] ### Return type @@ -1400,14 +1400,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Detail retrieved. | - | +**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_order** > Order cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) -Cancel a single order. +Cancel single order By default, orders for spot, unified accounts and leveraged accounts are revoked. @@ -1436,13 +1436,13 @@ 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 when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) -currency_pair = 'BTC_USDT' # str | Currency pair. -account = 'spot' # str | Specify query account. (optional) -action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) (optional) +currency_pair = 'BTC_USDT' # str | Currency pair +account = 'spot' # str | Specify query account (optional) +action_mode = 'ACK' # str | Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) (optional) x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Cancel a single order. + # Cancel single order api_response = api_instance.cancel_order(order_id, currency_pair, account=account, action_mode=action_mode, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1456,9 +1456,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | - **currency_pair** | **str**| Currency pair. | - **account** | **str**| Specify query account. | [optional] - **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) | [optional] + **currency_pair** | **str**| Currency pair | + **account** | **str**| Specify query account | [optional] + **action_mode** | **str**| Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) | [optional] **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] ### Return type @@ -1477,14 +1477,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order cancelled. | - | +**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) # **amend_order** > Order amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) -Amend an order. +Amend single order Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. @@ -1514,12 +1514,12 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) order_id = '12345' # str | The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) order_patch = gate_api.OrderPatch() # OrderPatch | -currency_pair = 'BTC_USDT' # str | Currency pair. (optional) -account = 'spot' # str | Specify query account. (optional) +currency_pair = 'BTC_USDT' # str | Currency pair (optional) +account = 'spot' # str | Specify query account (optional) x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Amend an order. + # Amend single order api_response = api_instance.amend_order(order_id, order_patch, currency_pair=currency_pair, account=account, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1534,8 +1534,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_id** | **str**| The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) | **order_patch** | [**OrderPatch**](OrderPatch.md)| | - **currency_pair** | **str**| Currency pair. | [optional] - **account** | **str**| Specify query account. | [optional] + **currency_pair** | **str**| Currency pair | [optional] + **account** | **str**| Specify query account | [optional] **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] ### Return type @@ -1554,14 +1554,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Updated. | - | +**200** | Updated successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_my_trades** > list[Trade] list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) -List personal trading history. +Query personal trading records By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. @@ -1589,16 +1589,16 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 (optional) (default to 100) -page = 1 # int | Page number. (optional) (default to 1) +currency_pair = 'BTC_USDT' # str | Retrieve results with specified currency pair (optional) +limit = 100 # int | Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 (optional) (default to 100) +page = 1 # int | Page number (optional) (default to 1) order_id = '12345' # str | Filter trades with specified order ID. `currency_pair` is also required if this field is present (optional) -account = 'spot' # str | Specify query account. (optional) -_from = 1627706330 # int | Start timestamp of the query. (optional) -to = 1635329650 # int | Time range ending, default to current time. (optional) +account = 'spot' # str | Specify query account (optional) +_from = 1627706330 # int | Start timestamp for the query (optional) +to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional) try: - # List personal trading history. + # Query personal trading records api_response = api_instance.list_my_trades(currency_pair=currency_pair, limit=limit, page=page, order_id=order_id, account=account, _from=_from, to=to) print(api_response) except GateApiException as ex: @@ -1611,13 +1611,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Retrieve results with specified currency pair. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 | [optional] [default to 100] - **page** | **int**| Page number. | [optional] [default to 1] + **currency_pair** | **str**| Retrieve results with specified currency pair | [optional] + **limit** | **int**| Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 | [optional] [default to 100] + **page** | **int**| Page number | [optional] [default to 1] **order_id** | **str**| Filter trades with specified order ID. `currency_pair` is also required if this field is present | [optional] - **account** | **str**| Specify query account. | [optional] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] + **account** | **str**| Specify query account | [optional] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] ### Return type @@ -1635,14 +1635,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_system_time** > SystemTime get_system_time() -Get server current time. +Get server current time ### Example @@ -1661,7 +1661,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) try: - # Get server current time. + # Get server current time api_response = api_instance.get_system_time() print(api_response) except GateApiException as ex: @@ -1689,14 +1689,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **countdown_cancel_all_spot** > TriggerTime countdown_cancel_all_spot(countdown_cancel_all_spot_task) -Countdown cancel orders. +Countdown cancel orders Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. @@ -1727,7 +1727,7 @@ api_instance = gate_api.SpotApi(api_client) countdown_cancel_all_spot_task = gate_api.CountdownCancelAllSpotTask() # CountdownCancelAllSpotTask | try: - # Countdown cancel orders. + # Countdown cancel orders api_response = api_instance.countdown_cancel_all_spot(countdown_cancel_all_spot_task) print(api_response) except GateApiException as ex: @@ -1758,16 +1758,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Set countdown successfully. | - | +**200** | Countdown set successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **amend_batch_orders** > list[BatchOrder] amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) -Batch modification of orders. +Batch modification of orders -Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return is consistent with the order list order. +Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. ### Example @@ -1797,7 +1797,7 @@ batch_amend_item = [gate_api.BatchAmendItem()] # list[BatchAmendItem] | x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) try: - # Batch modification of orders. + # Batch modification of orders api_response = api_instance.amend_batch_orders(batch_amend_item, x_gate_exptime=x_gate_exptime) print(api_response) except GateApiException as ex: @@ -1829,14 +1829,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Order modification executed successfully. | - | +**200** | Order modification executed successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_spot_insurance_history** > list[SpotInsuranceHistory] get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) -Query spot insurance fund historical data. +Query spot insurance fund historical data ### Example @@ -1854,14 +1854,14 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) business = 'margin' # str | Leverage business, margin - position by position; unified - unified account -currency = 'BTC' # str | Currency. -_from = 1547706332 # int | Start timestamp, seconds. -to = 1547706332 # int | End timestamp, in seconds. -page = 1 # int | Page number. (optional) (default to 1) -limit = 30 # int | The maximum number of items returned in the list, the default value is 30. (optional) (default to 30) +currency = 'BTC' # str | Currency +_from = 1547706332 # int | Start timestamp in seconds +to = 1547706332 # int | End timestamp in seconds +page = 1 # int | Page number (optional) (default to 1) +limit = 30 # int | The maximum number of items returned in the list, the default value is 30 (optional) (default to 30) try: - # Query spot insurance fund historical data. + # Query spot insurance fund historical data api_response = api_instance.get_spot_insurance_history(business, currency, _from, to, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -1875,11 +1875,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **business** | **str**| Leverage business, margin - position by position; unified - unified account | - **currency** | **str**| Currency. | - **_from** | **int**| Start timestamp, seconds. | - **to** | **int**| End timestamp, in seconds. | - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| The maximum number of items returned in the list, the default value is 30. | [optional] [default to 30] + **currency** | **str**| Currency | + **_from** | **int**| Start timestamp in seconds | + **to** | **int**| End timestamp in seconds | + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| The maximum number of items returned in the list, the default value is 30 | [optional] [default to 30] ### Return type @@ -1897,14 +1897,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_spot_price_triggered_orders** > list[SpotPriceTriggeredOrder] list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) -Retrieve running auto order list. +Query running auto order list ### Example @@ -1930,14 +1930,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -status = 'status_example' # str | Only list the orders with this status. -market = 'BTC_USDT' # str | Currency pair. (optional) -account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified`. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +status = 'status_example' # str | Query order list based on status +market = 'BTC_USDT' # str | Trading market (optional) +account = 'account_example' # str | Trading account type. Unified account must be set to `unified` (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # Retrieve running auto order list. + # Query running auto order list api_response = api_instance.list_spot_price_triggered_orders(status, market=market, account=account, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -1950,11 +1950,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| Only list the orders with this status. | - **market** | **str**| Currency pair. | [optional] - **account** | **str**| Trading account type. Portfolio margin account must set to `unified`. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **status** | **str**| Query order list based on status | + **market** | **str**| Trading market | [optional] + **account** | **str**| Trading account type. Unified account must be set to `unified` | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -1972,14 +1972,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_spot_price_triggered_order** > TriggerOrderResponse create_spot_price_triggered_order(spot_price_triggered_order) -Create a price-triggered order. +Create price-triggered order ### Example @@ -2008,7 +2008,7 @@ api_instance = gate_api.SpotApi(api_client) spot_price_triggered_order = gate_api.SpotPriceTriggeredOrder() # SpotPriceTriggeredOrder | try: - # Create a price-triggered order. + # Create price-triggered order api_response = api_instance.create_spot_price_triggered_order(spot_price_triggered_order) print(api_response) except GateApiException as ex: @@ -2039,14 +2039,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Order created. | - | +**201** | Order created successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_spot_price_triggered_order_list** > list[SpotPriceTriggeredOrder] cancel_spot_price_triggered_order_list(market=market, account=account) -Cancel All Price-triggered Orders. +Cancel all auto orders ### Example @@ -2072,11 +2072,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -market = 'BTC_USDT' # str | Currency pair. (optional) -account = 'account_example' # str | Trading account type. Portfolio margin account must set to `unified`. (optional) +market = 'BTC_USDT' # str | Trading market (optional) +account = 'account_example' # str | Trading account type. Unified account must be set to `unified` (optional) try: - # Cancel All Price-triggered Orders. + # Cancel all auto orders api_response = api_instance.cancel_spot_price_triggered_order_list(market=market, account=account) print(api_response) except GateApiException as ex: @@ -2089,8 +2089,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **market** | **str**| Currency pair. | [optional] - **account** | **str**| Trading account type. Portfolio margin account must set to `unified`. | [optional] + **market** | **str**| Trading market | [optional] + **account** | **str**| Trading account type. Unified account must be set to `unified` | [optional] ### Return type @@ -2108,14 +2108,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Batch cancellation request accepted. Query order status by listing orders. | - | +**200** | Batch cancellation request accepted and processed, success determined by order list | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_spot_price_triggered_order** > SpotPriceTriggeredOrder get_spot_price_triggered_order(order_id) -Get a price-triggered order. +Query single auto order details ### Example @@ -2141,10 +2141,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. +order_id = 'order_id_example' # str | ID returned when order is successfully created try: - # Get a price-triggered order. + # Query single auto order details api_response = api_instance.get_spot_price_triggered_order(order_id) print(api_response) except GateApiException as ex: @@ -2157,7 +2157,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -2175,14 +2175,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail. | - | +**200** | Auto order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_spot_price_triggered_order** > SpotPriceTriggeredOrder cancel_spot_price_triggered_order(order_id) -cancel a price-triggered order. +Cancel single auto order ### Example @@ -2208,10 +2208,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SpotApi(api_client) -order_id = 'order_id_example' # str | Retrieve the data of the order with the specified ID. +order_id = 'order_id_example' # str | ID returned when order is successfully created try: - # cancel a price-triggered order. + # Cancel single auto order api_response = api_instance.cancel_spot_price_triggered_order(order_id) print(api_response) except GateApiException as ex: @@ -2224,7 +2224,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **str**| Retrieve the data of the order with the specified ID. | + **order_id** | **str**| ID returned when order is successfully created | ### Return type @@ -2242,7 +2242,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Auto order detail. | - | +**200** | Auto order details | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SpotCurrencyChain.md b/docs/SpotCurrencyChain.md index ad873a8..d461e15 100644 --- a/docs/SpotCurrencyChain.md +++ b/docs/SpotCurrencyChain.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Chain name. | [optional] -**addr** | **str** | token address. | [optional] -**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled. | [optional] -**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed. | [optional] -**deposit_disabled** | **bool** | Whether currency's deposit is disabled. | [optional] +**name** | **str** | Blockchain name | [optional] +**addr** | **str** | token address | [optional] +**withdraw_disabled** | **bool** | Whether currency's withdrawal is disabled | [optional] +**withdraw_delayed** | **bool** | Whether currency's withdrawal is delayed | [optional] +**deposit_disabled** | **bool** | Whether currency's deposit is disabled | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotFee.md b/docs/SpotFee.md index 675c25c..e007cf0 100644 --- a/docs/SpotFee.md +++ b/docs/SpotFee.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] -**taker_fee** | **str** | taker fee rate. | [optional] -**maker_fee** | **str** | maker fee rate. | [optional] -**gt_discount** | **bool** | If GT deduction is enabled. | [optional] +**user_id** | **int** | User ID | [optional] +**taker_fee** | **str** | taker fee rate | [optional] +**maker_fee** | **str** | maker fee rate | [optional] +**gt_discount** | **bool** | Whether GT deduction discount is enabled | [optional] **gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**loan_fee** | **str** | Loan fee rate of margin lending. | [optional] -**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009. | [optional] -**currency_pair** | **str** | Currency pair. | [optional] +**gt_maker_fee** | **str** | Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled | [optional] +**loan_fee** | **str** | Loan fee rate of margin lending | [optional] +**point_type** | **str** | Point card type: 0 - Original version, 1 - New version since 202009 | [optional] +**currency_pair** | **str** | Currency pair | [optional] **debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotInsuranceHistory.md b/docs/SpotInsuranceHistory.md index fccc107..3d1f006 100644 --- a/docs/SpotInsuranceHistory.md +++ b/docs/SpotInsuranceHistory.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**balance** | **str** | balance. | [optional] -**time** | **int** | Creation time, timestamp, milliseconds. | [optional] +**currency** | **str** | Currency | [optional] +**balance** | **str** | Balance | [optional] +**time** | **int** | Creation time, timestamp, milliseconds | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotPricePutOrder.md b/docs/SpotPricePutOrder.md index 1e27338..899f6d7 100644 --- a/docs/SpotPricePutOrder.md +++ b/docs/SpotPricePutOrder.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Order type,default to `limit` - limit : Limit Order - market : Market Order | [optional] [default to 'limit'] **side** | **str** | Order side - buy: buy side - sell: sell side | -**price** | **str** | Order price. | -**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` | -**account** | **str** | Trading account type. Portfolio margin account must set to `unified` -normal: spot trading - margin: margin trading - unified: unified trading | [default to 'normal'] +**price** | **str** | Order price | +**amount** | **str** | Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` | +**account** | **str** | Trading account type. Unified account must be set to `unified` - normal: spot trading - margin: margin trading - unified: unified account | [default to 'normal'] **time_in_force** | **str** | time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only | [optional] [default to 'gtc'] -**auto_borrow** | **bool** | Whether to borrow coins automatically. | [optional] [default to False] -**auto_repay** | **bool** | Whether to repay the loan automatically. | [optional] [default to False] -**text** | **str** | The source of the order, including: - web: web - api: api - app: app | [optional] +**auto_borrow** | **bool** | Whether to borrow coins automatically | [optional] [default to False] +**auto_repay** | **bool** | Whether to repay the loan automatically | [optional] [default to False] +**text** | **str** | The source of the order, including: - web: Web - api: API call - app: Mobile app | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotPriceTrigger.md b/docs/SpotPriceTrigger.md index 3c1f2bd..0208586 100644 --- a/docs/SpotPriceTrigger.md +++ b/docs/SpotPriceTrigger.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**price** | **str** | Trigger price. | -**rule** | **str** | Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: or equal to `price` field | -**expiration** | **int** | How long (in seconds) to wait for the condition to be triggered before cancelling the order. | +**price** | **str** | Trigger price | +**rule** | **str** | Price trigger condition - `>=`: triggered when market price is greater than or equal to `price` - `<=`: triggered when market price is less than or equal to `price` | +**expiration** | **int** | Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SpotPriceTriggeredOrder.md b/docs/SpotPriceTriggeredOrder.md index c9faff4..5c524ae 100644 --- a/docs/SpotPriceTriggeredOrder.md +++ b/docs/SpotPriceTriggeredOrder.md @@ -1,19 +1,19 @@ # SpotPriceTriggeredOrder -Spot order detail. +Spot price order details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **trigger** | [**SpotPriceTrigger**](SpotPriceTrigger.md) | | **put** | [**SpotPricePutOrder**](SpotPricePutOrder.md) | | -**id** | **int** | Auto order ID. | [optional] [readonly] -**user** | **int** | User ID. | [optional] [readonly] -**market** | **str** | Currency pair. | -**ctime** | **int** | Creation time. | [optional] [readonly] -**ftime** | **int** | Finished time. | [optional] [readonly] -**fired_order_id** | **int** | ID of the newly created order on condition triggered. | [optional] [readonly] -**status** | **str** | Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired | [optional] [readonly] -**reason** | **str** | Additional remarks on how the order was finished. | [optional] [readonly] +**id** | **int** | Auto order ID | [optional] [readonly] +**user** | **int** | User ID | [optional] [readonly] +**market** | **str** | Market | +**ctime** | **int** | Created time | [optional] [readonly] +**ftime** | **int** | End time | [optional] [readonly] +**fired_order_id** | **int** | ID of the order created after trigger | [optional] [readonly] +**status** | **str** | Status - open: Running - cancelled: Manually cancelled - finish: Successfully completed - failed: Failed to execute - expired: Expired | [optional] [readonly] +**reason** | **str** | Additional description of how the order was completed | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StpGroup.md b/docs/StpGroup.md index 4098086..8a02186 100644 --- a/docs/StpGroup.md +++ b/docs/StpGroup.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | STP Group ID. | [optional] -**name** | **str** | STP Group name. | -**creator_id** | **int** | Creator ID. | [optional] -**create_time** | **int** | Creation time. | [optional] +**id** | **int** | STP Group ID | [optional] +**name** | **str** | STP Group name | +**creator_id** | **int** | Creator ID | [optional] +**create_time** | **int** | Created time | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StpGroupUser.md b/docs/StpGroupUser.md index 1eb88f0..2e05e1a 100644 --- a/docs/StpGroupUser.md +++ b/docs/StpGroupUser.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] -**stp_id** | **int** | STP Group ID. | [optional] -**create_time** | **int** | Creation time. | [optional] +**user_id** | **int** | User ID | [optional] +**stp_id** | **int** | STP Group ID | [optional] +**create_time** | **int** | Created time | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StructuredBuy.md b/docs/StructuredBuy.md index 5252d47..2c5428f 100644 --- a/docs/StructuredBuy.md +++ b/docs/StructuredBuy.md @@ -1,11 +1,11 @@ # StructuredBuy -Dual Investment Purchase. +Dual Investment Buy ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pid** | **str** | Plan ID. | [optional] -**amount** | **str** | Purchase Amount. | [optional] +**pid** | **str** | Product ID | [optional] +**amount** | **str** | Buy Quantity | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StructuredGetProjectList.md b/docs/StructuredGetProjectList.md index 1aa9d35..a98f1a4 100644 --- a/docs/StructuredGetProjectList.md +++ b/docs/StructuredGetProjectList.md @@ -1,20 +1,20 @@ # StructuredGetProjectList -Structured Products. +Structured Investment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Plan ID. | [optional] -**type** | **str** | product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball | [optional] -**name_en** | **str** | name. | [optional] -**investment_coin** | **str** | Investment Currency. | [optional] -**investment_period** | **str** | Investment term. | [optional] -**min_annual_rate** | **str** | Minimum annual rate. | [optional] -**mid_annual_rate** | **str** | Intermediate annual rate. | [optional] -**max_annual_rate** | **str** | Maximum annual rate. | [optional] -**watch_market** | **str** | Watch market. | [optional] -**start_time** | **int** | start time. | [optional] -**end_time** | **int** | Finished time. | [optional] +**id** | **int** | Product ID | [optional] +**type** | **str** | Product Type: `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball | [optional] +**name_en** | **str** | Product Name | [optional] +**investment_coin** | **str** | Investment Token | [optional] +**investment_period** | **str** | Investment Period | [optional] +**min_annual_rate** | **str** | Minimum Annual Rate | [optional] +**mid_annual_rate** | **str** | Intermediate Annual Rate | [optional] +**max_annual_rate** | **str** | Maximum Annual Rate | [optional] +**watch_market** | **str** | Underlying Market | [optional] +**start_time** | **int** | Start Time | [optional] +**end_time** | **int** | End time | [optional] **status** | **str** | Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StructuredOrderList.md b/docs/StructuredOrderList.md index 27f4742..3f52c75 100644 --- a/docs/StructuredOrderList.md +++ b/docs/StructuredOrderList.md @@ -1,16 +1,16 @@ # StructuredOrderList -Structured order. +Structured order ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID. | [optional] -**pid** | **str** | Plan ID. | [optional] -**lock_coin** | **str** | Locked coin. | [optional] -**amount** | **str** | Locked amount. | [optional] +**id** | **int** | Order ID | [optional] +**pid** | **str** | Product ID | [optional] +**lock_coin** | **str** | Locked coin | [optional] +**amount** | **str** | Locked amount | [optional] **status** | **str** | Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE | [optional] -**income** | **str** | Income. | [optional] -**create_time** | **int** | Created time. | [optional] +**income** | **str** | Income | [optional] +**create_time** | **int** | Created time | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccount.md b/docs/SubAccount.md index 837077f..5a26c92 100644 --- a/docs/SubAccount.md +++ b/docs/SubAccount.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**remark** | **str** | custom text. | [optional] -**login_name** | **str** | Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters | -**password** | **str** | The sub-account's password. (Default: the same as main account's password). | [optional] +**remark** | **str** | Remark | [optional] +**login_name** | **str** | 子账户登陆名:仅支持字母、数字、下划线,不可包含其他非法字符。 | +**password** | **str** | The sub-account's password. (Default: the same as main account's password) | [optional] **email** | **str** | The sub-account's email address. (Default: the same as main account's email address) | [optional] -**state** | **int** | State: 1-normal, 2-locked\". | [optional] [readonly] -**type** | **int** | \"Sub-account type: 1 - sub-account, 3 - cross margin account. | [optional] [readonly] -**user_id** | **int** | The user id of the sub-account. | [optional] [readonly] -**create_time** | **int** | Created time. | [optional] [readonly] +**state** | **int** | Sub-account status: 1-normal, 2-locked | [optional] [readonly] +**type** | **int** | Sub-account type: 1-Regular sub-account, 3-Cross margin sub-account | [optional] [readonly] +**user_id** | **int** | Sub-account user ID | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountApi.md b/docs/SubAccountApi.md index 5f61557..dfae02b 100644 --- a/docs/SubAccountApi.md +++ b/docs/SubAccountApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_sub_accounts**](SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts. -[**create_sub_accounts**](SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account. -[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get the sub-account. -[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API Key of the sub-account. -[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create API Key of the sub-account. -[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get the API Key of the sub-account. -[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update API key of the sub-account. -[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account. -[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account. -[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account. -[**list_unified_mode**](SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode. +[**list_sub_accounts**](SubAccountApi.md#list_sub_accounts) | **GET** /sub_accounts | List sub-accounts +[**create_sub_accounts**](SubAccountApi.md#create_sub_accounts) | **POST** /sub_accounts | Create a new sub-account +[**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /sub_accounts/{user_id} | Get sub-account +[**list_sub_account_keys**](SubAccountApi.md#list_sub_account_keys) | **GET** /sub_accounts/{user_id}/keys | List all API key pairs of the sub-account +[**create_sub_account_keys**](SubAccountApi.md#create_sub_account_keys) | **POST** /sub_accounts/{user_id}/keys | Create new sub-account API key pair +[**get_sub_account_key**](SubAccountApi.md#get_sub_account_key) | **GET** /sub_accounts/{user_id}/keys/{key} | Get specific API key pair of the sub-account +[**update_sub_account_keys**](SubAccountApi.md#update_sub_account_keys) | **PUT** /sub_accounts/{user_id}/keys/{key} | Update sub-account API key pair +[**delete_sub_account_keys**](SubAccountApi.md#delete_sub_account_keys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete sub-account API key pair +[**lock_sub_account**](SubAccountApi.md#lock_sub_account) | **POST** /sub_accounts/{user_id}/lock | Lock sub-account +[**unlock_sub_account**](SubAccountApi.md#unlock_sub_account) | **POST** /sub_accounts/{user_id}/unlock | Unlock sub-account +[**list_unified_mode**](SubAccountApi.md#list_unified_mode) | **GET** /sub_accounts/unified_mode | Get sub-account mode # **list_sub_accounts** > list[SubAccount] list_sub_accounts(type=type) -List sub-accounts. +List sub-accounts ### Example @@ -46,10 +46,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -type = '0' # str | `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. (optional) +type = '0' # str | Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default. (optional) try: - # List sub-accounts. + # List sub-accounts api_response = api_instance.list_sub_accounts(type=type) print(api_response) except GateApiException as ex: @@ -62,7 +62,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. | [optional] + **type** | **str**| Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default. | [optional] ### Return type @@ -80,14 +80,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_sub_accounts** > SubAccount create_sub_accounts(sub_account) -Create a new sub-account. +Create a new sub-account ### Example @@ -116,7 +116,7 @@ api_instance = gate_api.SubAccountApi(api_client) sub_account = gate_api.SubAccount() # SubAccount | try: - # Create a new sub-account. + # Create a new sub-account api_response = api_instance.create_sub_accounts(sub_account) print(api_response) except GateApiException as ex: @@ -147,14 +147,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Created Successfully. | - | +**201** | Created successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_sub_account** > SubAccount get_sub_account(user_id) -Get the sub-account. +Get sub-account ### Example @@ -180,10 +180,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id. +user_id = 56 # int | Sub-account user ID try: - # Get the sub-account. + # Get sub-account api_response = api_instance.get_sub_account(user_id) print(api_response) except GateApiException as ex: @@ -196,7 +196,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id. | + **user_id** | **int**| Sub-account user ID | ### Return type @@ -214,14 +214,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_keys** > list[SubAccountKey] list_sub_account_keys(user_id) -List all API Key of the sub-account. +List all API key pairs of the sub-account ### Example @@ -247,10 +247,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id. +user_id = 56 # int | Sub-account user ID try: - # List all API Key of the sub-account. + # List all API key pairs of the sub-account api_response = api_instance.list_sub_account_keys(user_id) print(api_response) except GateApiException as ex: @@ -263,7 +263,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id. | + **user_id** | **int**| Sub-account user ID | ### Return type @@ -281,14 +281,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_sub_account_keys** > SubAccountKey create_sub_account_keys(user_id, sub_account_key) -Create API Key of the sub-account. +Create new sub-account API key pair ### Example @@ -314,11 +314,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id. +user_id = 56 # int | Sub-account user ID sub_account_key = gate_api.SubAccountKey() # SubAccountKey | try: - # Create API Key of the sub-account. + # Create new sub-account API key pair api_response = api_instance.create_sub_account_keys(user_id, sub_account_key) print(api_response) except GateApiException as ex: @@ -331,7 +331,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id. | + **user_id** | **int**| Sub-account user ID | **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | ### Return type @@ -350,14 +350,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Created Successfully. | - | +**200** | Created successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_sub_account_key** > SubAccountKey get_sub_account_key(user_id, key) -Get the API Key of the sub-account. +Get specific API key pair of the sub-account ### Example @@ -383,11 +383,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id. -key = 'key_example' # str | The API Key of the sub-account. +user_id = 56 # int | Sub-account user ID +key = 'key_example' # str | Sub-account API key try: - # Get the API Key of the sub-account. + # Get specific API key pair of the sub-account api_response = api_instance.get_sub_account_key(user_id, key) print(api_response) except GateApiException as ex: @@ -400,8 +400,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id. | - **key** | **str**| The API Key of the sub-account. | + **user_id** | **int**| Sub-account user ID | + **key** | **str**| Sub-account API key | ### Return type @@ -419,14 +419,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful. | - | +**200** | Successfully retrieved | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_sub_account_keys** > update_sub_account_keys(user_id, key, sub_account_key) -Update API key of the sub-account. +Update sub-account API key pair ### Example @@ -452,12 +452,12 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id. -key = 'key_example' # str | The API Key of the sub-account. +user_id = 56 # int | Sub-account user ID +key = 'key_example' # str | Sub-account API key sub_account_key = gate_api.SubAccountKey() # SubAccountKey | try: - # Update API key of the sub-account. + # Update sub-account API key pair api_instance.update_sub_account_keys(user_id, key, sub_account_key) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -469,8 +469,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id. | - **key** | **str**| The API Key of the sub-account. | + **user_id** | **int**| Sub-account user ID | + **key** | **str**| Sub-account API key | **sub_account_key** | [**SubAccountKey**](SubAccountKey.md)| | ### Return type @@ -489,14 +489,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Updated. | - | +**204** | Updated successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_sub_account_keys** > delete_sub_account_keys(user_id, key) -Delete API key of the sub-account. +Delete sub-account API key pair ### Example @@ -522,11 +522,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | Sub-account user id. -key = 'key_example' # str | The API Key of the sub-account. +user_id = 56 # int | Sub-account user ID +key = 'key_example' # str | Sub-account API key try: - # Delete API key of the sub-account. + # Delete sub-account API key pair api_instance.delete_sub_account_keys(user_id, key) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -538,8 +538,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| Sub-account user id. | - **key** | **str**| The API Key of the sub-account. | + **user_id** | **int**| Sub-account user ID | + **key** | **str**| Sub-account API key | ### Return type @@ -557,14 +557,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Delete successfully. | - | +**204** | Deleted successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **lock_sub_account** > lock_sub_account(user_id) -Lock the sub-account. +Lock sub-account ### Example @@ -590,10 +590,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | The user id of the sub-account. +user_id = 56 # int | Sub-account user ID try: - # Lock the sub-account. + # Lock sub-account api_instance.lock_sub_account(user_id) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -605,7 +605,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| The user id of the sub-account. | + **user_id** | **int**| Sub-account user ID | ### Return type @@ -623,14 +623,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Lock successfully. | - | +**204** | Locked successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **unlock_sub_account** > unlock_sub_account(user_id) -Unlock the sub-account. +Unlock sub-account ### Example @@ -656,10 +656,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.SubAccountApi(api_client) -user_id = 56 # int | The user id of the sub-account. +user_id = 56 # int | Sub-account user ID try: - # Unlock the sub-account. + # Unlock sub-account api_instance.unlock_sub_account(user_id) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -671,7 +671,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_id** | **int**| The user id of the sub-account. | + **user_id** | **int**| Sub-account user ID | ### Return type @@ -689,16 +689,16 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Unlock successfully. | - | +**204** | Unlocked successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_mode** > list[SubUserMode] list_unified_mode() -Get sub-account mode. +Get sub-account mode -Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode +Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode ### Example @@ -726,7 +726,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SubAccountApi(api_client) try: - # Get sub-account mode. + # Get sub-account mode api_response = api_instance.list_unified_mode() print(api_response) except GateApiException as ex: @@ -754,7 +754,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SubAccountBalance.md b/docs/SubAccountBalance.md index 5927e74..753d3dd 100644 --- a/docs/SubAccountBalance.md +++ b/docs/SubAccountBalance.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID. | [optional] -**available** | **dict(str, str)** | Available balances of currencies. | [optional] +**uid** | **str** | User ID | [optional] +**available** | **dict(str, str)** | Available balances of currencies | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountCrossMarginBalance.md b/docs/SubAccountCrossMarginBalance.md index 586ea60..ebb3791 100644 --- a/docs/SubAccountCrossMarginBalance.md +++ b/docs/SubAccountCrossMarginBalance.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID. | [optional] +**uid** | **str** | User ID | [optional] **available** | [**SubCrossMarginAccount**](.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/SubAccountFuturesBalance.md b/docs/SubAccountFuturesBalance.md index f3a9231..d5ddf25 100644 --- a/docs/SubAccountFuturesBalance.md +++ b/docs/SubAccountFuturesBalance.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID. | [optional] -**available** | [**dict(str, FuturesAccount)**](FuturesAccount.md) | Futures account balances. | [optional] +**uid** | **str** | User ID | [optional] +**available** | [**dict(str, FuturesAccount)**](FuturesAccount.md) | Futures account balances | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountKey.md b/docs/SubAccountKey.md index fdc7ff1..54fbdc5 100644 --- a/docs/SubAccountKey.md +++ b/docs/SubAccountKey.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] [readonly] -**mode** | **int** | Mode: 1 - classic 2 - portfolio account. | [optional] -**name** | **str** | API key name. | [optional] +**user_id** | **int** | User ID | [optional] [readonly] +**mode** | **int** | Mode: 1 - classic 2 - portfolio account | [optional] +**name** | **str** | API Key Name | [optional] **perms** | [**list[SubAccountKeyPerms]**](SubAccountKeyPerms.md) | | [optional] -**ip_whitelist** | **list[str]** | ip white list (list will be removed if no value is passed). | [optional] -**key** | **str** | API Key. | [optional] [readonly] -**state** | **int** | State 1 - normal 2 - locked 3 - frozen. | [optional] [readonly] -**created_at** | **int** | Creation time. | [optional] [readonly] -**updated_at** | **int** | Last update time. | [optional] [readonly] -**last_access** | **int** | Last access time. | [optional] [readonly] +**ip_whitelist** | **list[str]** | IP whitelist (list will be cleared if no value is passed) | [optional] +**key** | **str** | API Key | [optional] [readonly] +**state** | **int** | Status: 1-Normal 2-Frozen 3-Locked | [optional] [readonly] +**created_at** | **int** | Created time | [optional] [readonly] +**updated_at** | **int** | Last Update Time | [optional] [readonly] +**last_access** | **int** | Last Access Time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountKeyPerms.md b/docs/SubAccountKeyPerms.md index 0c8eb3e..1b978be 100644 --- a/docs/SubAccountKeyPerms.md +++ b/docs/SubAccountKeyPerms.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy | [optional] -**read_only** | **bool** | read only. | [optional] +**name** | **str** | Permission function name (no value will be cleared) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery contract - earn: earn - custody: custody - options: options - account: account information - loan: lending - margin: margin - unified: unified account - copy: copy trading | [optional] +**read_only** | **bool** | Read Only | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountMarginBalance.md b/docs/SubAccountMarginBalance.md index 7a648d5..817fd31 100644 --- a/docs/SubAccountMarginBalance.md +++ b/docs/SubAccountMarginBalance.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | User ID. | [optional] -**available** | [**list[MarginAccount]**](MarginAccount.md) | Margin account balances. | [optional] +**uid** | **str** | User ID | [optional] +**available** | [**list[MarginAccount]**](MarginAccount.md) | Margin account balances | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountToSubAccount.md b/docs/SubAccountToSubAccount.md index 0f201a8..ad18faf 100644 --- a/docs/SubAccountToSubAccount.md +++ b/docs/SubAccountToSubAccount.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Transfer currency name. | -**sub_account_type** | **str** | Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional] -**sub_account_from** | **str** | Transfer from the user id of the sub-account. | -**sub_account_from_type** | **str** | The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. | -**sub_account_to** | **str** | Transfer to the user id of the sub-account. | -**sub_account_to_type** | **str** | Transferred sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account | -**amount** | **str** | Transfer amount. | +**currency** | **str** | Transfer currency name | +**sub_account_type** | **str** | Transfer from account (deprecated, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional] +**sub_account_from** | **str** | Transfer from the user id of the sub-account | +**sub_account_from_type** | **str** | Source sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account | +**sub_account_to** | **str** | Transfer to the user id of the sub-account | +**sub_account_to_type** | **str** | Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account | +**amount** | **str** | Transfer amount | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md index 4724a8d..c591078 100644 --- a/docs/SubAccountTransfer.md +++ b/docs/SubAccountTransfer.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sub_account** | **str** | Sub account user ID. | -**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] -**currency** | **str** | Transfer currency name. | -**amount** | **str** | Transfer amount. | -**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | -**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] +**sub_account** | **str** | Sub account user ID | +**sub_account_type** | **str** | Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account | [optional] [default to 'spot'] +**currency** | **str** | Transfer currency name | +**amount** | **str** | Transfer amount | +**direction** | **str** | Transfer direction: to - transfer into sub-account, from - transfer out from sub-account | +**client_order_id** | **str** | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubAccountTransferRecordItem.md b/docs/SubAccountTransferRecordItem.md index a0c42d5..ebfe07e 100644 --- a/docs/SubAccountTransferRecordItem.md +++ b/docs/SubAccountTransferRecordItem.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timest** | **str** | Transfer timestamp. | [optional] [readonly] -**uid** | **str** | Main account user ID. | [optional] [readonly] -**sub_account** | **str** | Sub account user ID. | -**sub_account_type** | **str** | Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] -**currency** | **str** | Transfer currency name. | -**amount** | **str** | Transfer amount. | -**direction** | **str** | Transfer direction. to - transfer into sub account; from - transfer out from sub account | -**source** | **str** | Where the operation is initiated from. | [optional] [readonly] -**client_order_id** | **str** | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] -**status** | **str** | Sub-account transfer record status, currently only success. | [optional] +**timest** | **str** | Transfer timestamp | [optional] [readonly] +**uid** | **str** | Main account user ID | [optional] [readonly] +**sub_account** | **str** | Sub account user ID | +**sub_account_type** | **str** | Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account | [optional] [default to 'spot'] +**currency** | **str** | Transfer currency name | +**amount** | **str** | Transfer amount | +**direction** | **str** | Transfer direction: to - transfer into sub-account, from - transfer out from sub-account | +**source** | **str** | Source of the transfer operation | [optional] [readonly] +**client_order_id** | **str** | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters | [optional] +**status** | **str** | Sub-account transfer record status, currently only 'success' | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md index 8ee99f1..b3ab224 100644 --- a/docs/SubCrossMarginAccount.md +++ b/docs/SubCrossMarginAccount.md @@ -3,22 +3,22 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account | [optional] -**locked** | **bool** | Whether account is locked. | [optional] +**user_id** | **int** | Cross margin account user ID. 0 means this sub-account has not yet opened a cross margin account | [optional] +**locked** | **bool** | Whether the account is locked | [optional] **balances** | [**dict(str, CrossMarginBalance)**](CrossMarginBalance.md) | | [optional] **total** | **str** | Total account value in USDT, i.e., the sum of all currencies' `(available+freeze)*price*discount` | [optional] **borrowed** | **str** | Total borrowed value in USDT, i.e., the sum of all currencies' `borrowed*price*discount` | [optional] -**borrowed_net** | **str** | Total borrowed value in USDT * borrowed factor. | [optional] -**net** | **str** | Total net assets in USDT. | [optional] -**leverage** | **str** | Position leverage. | [optional] -**interest** | **str** | Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] -**risk** | **str** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] -**total_initial_margin** | **str** | Total initial margin. | [optional] -**total_margin_balance** | **str** | Total margin balance. | [optional] -**total_maintenance_margin** | **str** | Total maintenance margin. | [optional] -**total_initial_margin_rate** | **str** | Total initial margin rate. | [optional] -**total_maintenance_margin_rate** | **str** | Total maintenance margin rate. | [optional] -**total_available_margin** | **str** | Total available margin. | [optional] +**borrowed_net** | **str** | Total borrowed value in USDT * leverage factor | [optional] +**net** | **str** | Total net assets in USDT | [optional] +**leverage** | **str** | Position leverage | [optional] +**interest** | **str** | Total unpaid interest in USDT, i.e., the sum of all currencies' `interest*price*discount` | [optional] +**risk** | **str** | Risk rate. When it falls below 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] +**total_initial_margin** | **str** | Total initial margin | [optional] +**total_margin_balance** | **str** | Total margin balance | [optional] +**total_maintenance_margin** | **str** | Total maintenance margin | [optional] +**total_initial_margin_rate** | **str** | Total initial margin rate | [optional] +**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional] +**total_available_margin** | **str** | Total available margin | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubUserMode.md b/docs/SubUserMode.md index 7f2067a..a1d0c6d 100644 --- a/docs/SubUserMode.md +++ b/docs/SubUserMode.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] -**is_unified** | **bool** | Is it a unified account?. | [optional] -**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode | [optional] +**user_id** | **int** | User ID | [optional] +**is_unified** | **bool** | Whether it is a unified account | [optional] +**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SwapCoin.md b/docs/SwapCoin.md index ed922e4..3dc278b 100644 --- a/docs/SwapCoin.md +++ b/docs/SwapCoin.md @@ -1,13 +1,13 @@ # SwapCoin -Blockchain Mining. +Blockchain Mining ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**coin** | **str** | Currency. | -**side** | **str** | 0 - Stake 1 - Redeem. | -**amount** | **str** | Size. | -**pid** | **int** | DeFi-type Mining Protocol Identifier. | [optional] +**coin** | **str** | Currency | +**side** | **str** | 0 - Stake 1 - Redeem | +**amount** | **str** | Size | +**pid** | **int** | DeFi-type Mining Protocol Identifier | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SwapCoinStruct.md b/docs/SwapCoinStruct.md index 6085062..00ba132 100644 --- a/docs/SwapCoinStruct.md +++ b/docs/SwapCoinStruct.md @@ -3,21 +3,21 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID. | [optional] -**pid** | **int** | Plan ID. | [optional] -**uid** | **int** | User ID. | [optional] -**coin** | **str** | Currency. | [optional] -**type** | **int** | 类型 0-质押 1-赎回 | [optional] +**id** | **int** | Order ID | [optional] +**pid** | **int** | Product ID | [optional] +**uid** | **int** | User ID | [optional] +**coin** | **str** | Currency | [optional] +**type** | **int** | Type 0-Staking 1-Redemption | [optional] **subtype** | **str** | 子类型 | [optional] -**amount** | **str** | Amount. | [optional] -**exchange_rate** | **str** | Exchange Ratio. | [optional] -**exchange_amount** | **str** | 兑换金额 | [optional] +**amount** | **str** | Amount | [optional] +**exchange_rate** | **str** | Exchange ratio | [optional] +**exchange_amount** | **str** | Redemption Amount | [optional] **update_stamp** | **int** | 更新时间戳 | [optional] -**create_stamp** | **int** | Transaction timestamp. | [optional] -**status** | **int** | status 1-success. | [optional] -**protocol_type** | **int** | DEFI协议类型 | [optional] -**client_order_id** | **str** | 参考ID | [optional] -**source** | **str** | Order source. | [optional] +**create_stamp** | **int** | Transaction timestamp | [optional] +**status** | **int** | status 1-success | [optional] +**protocol_type** | **int** | DEFI Protocol Type | [optional] +**client_order_id** | **str** | Reference ID | [optional] +**source** | **str** | Order Origin | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SystemTime.md b/docs/SystemTime.md index c746f50..abcf889 100644 --- a/docs/SystemTime.md +++ b/docs/SystemTime.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**server_time** | **int** | Server current time(ms). | [optional] +**server_time** | **int** | Server current time(ms) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Ticker.md b/docs/Ticker.md index dde227e..8f0a410 100644 --- a/docs/Ticker.md +++ b/docs/Ticker.md @@ -3,23 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency_pair** | **str** | Currency pair. | [optional] -**last** | **str** | Last trading price. | [optional] -**lowest_ask** | **str** | Recent lowest ask. | [optional] -**lowest_size** | **str** | The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] -**highest_bid** | **str** | Recent highest bid. | [optional] -**highest_size** | **str** | The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data | [optional] -**change_percentage** | **str** | Change percentage in the last 24h. | [optional] -**change_utc0** | **str** | utc0 timezone, the percentage change in the last 24 hours. | [optional] -**change_utc8** | **str** | utc8 timezone, the percentage change in the last 24 hours. | [optional] -**base_volume** | **str** | Base currency trade volume in the last 24h. | [optional] -**quote_volume** | **str** | Quote currency trade volume in the last 24h. | [optional] -**high_24h** | **str** | Highest price in 24h. | [optional] -**low_24h** | **str** | Lowest price in 24h. | [optional] -**etf_net_value** | **str** | ETF net value. | [optional] -**etf_pre_net_value** | **str** | ETF previous net value at re-balancing time. | [optional] -**etf_pre_timestamp** | **int** | ETF previous re-balancing time. | [optional] -**etf_leverage** | **str** | ETF current leverage. | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**last** | **str** | Last trading price | [optional] +**lowest_ask** | **str** | Recent lowest ask | [optional] +**lowest_size** | **str** | Latest seller's lowest price quantity; not available for batch queries; available for single queries, empty if no data | [optional] +**highest_bid** | **str** | Recent highest bid | [optional] +**highest_size** | **str** | Latest buyer's highest price quantity; not available for batch queries; available for single queries, empty if no data | [optional] +**change_percentage** | **str** | 24h price change percentage (negative for decrease, e.g., -7.45) | [optional] +**change_utc0** | **str** | UTC+0 timezone, 24h price change percentage, negative for decline (e.g., -7.45) | [optional] +**change_utc8** | **str** | UTC+8 timezone, 24h price change percentage, negative for decline (e.g., -7.45) | [optional] +**base_volume** | **str** | Base currency trading volume in the last 24h | [optional] +**quote_volume** | **str** | Quote currency trading volume in the last 24h | [optional] +**high_24h** | **str** | 24h High | [optional] +**low_24h** | **str** | 24h Low | [optional] +**etf_net_value** | **str** | ETF net value | [optional] +**etf_pre_net_value** | **str** | ETF net value at previous rebalancing point | [optional] +**etf_pre_timestamp** | **int** | ETF previous rebalancing time | [optional] +**etf_leverage** | **str** | ETF current leverage | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TotalBalance.md b/docs/TotalBalance.md index e1a1269..bead2e3 100644 --- a/docs/TotalBalance.md +++ b/docs/TotalBalance.md @@ -1,11 +1,11 @@ # TotalBalance -User's balance in all accounts. +User's total balance information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | [**AccountBalance**](AccountBalance.md) | | [optional] -**details** | [**dict(str, AccountBalance)**](AccountBalance.md) | Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account | [optional] +**details** | [**dict(str, AccountBalance)**](AccountBalance.md) | Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: perpetual contract account - delivery: delivery contract account - warrant: warrant account - cbbc: CBBC account | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Trade.md b/docs/Trade.md index 6ccc74d..9fbf77f 100644 --- a/docs/Trade.md +++ b/docs/Trade.md @@ -3,22 +3,22 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Trade ID. | [optional] -**create_time** | **str** | Trading time. | [optional] -**create_time_ms** | **str** | Trading time, with millisecond precision. | [optional] -**currency_pair** | **str** | Currency pair. | [optional] -**side** | **str** | Buy or sell order. | [optional] -**role** | **str** | Trade role. No value in public endpoints. | [optional] -**amount** | **str** | Trade amount. | [optional] -**price** | **str** | Order price. | [optional] -**order_id** | **str** | Related order ID. No value in public endpoints. | [optional] -**fee** | **str** | Fee deducted. No value in public endpoints. | [optional] -**fee_currency** | **str** | Fee currency unit. No value in public endpoints. | [optional] -**point_fee** | **str** | Points used to deduct fee. No value in public endpoints. | [optional] -**gt_fee** | **str** | GT used to deduct fee. No value in public endpoints. | [optional] -**amend_text** | **str** | The custom data that the user remarked when amending the order. | [optional] -**sequence_id** | **str** | Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market | [optional] -**text** | **str** | User defined information. No value in public endpoints. | [optional] +**id** | **str** | Fill ID | [optional] +**create_time** | **str** | Fill Time | [optional] +**create_time_ms** | **str** | Trading time, with millisecond precision | [optional] +**currency_pair** | **str** | Currency pair | [optional] +**side** | **str** | Buy or sell order | [optional] +**role** | **str** | Trade role, not returned in public endpoints | [optional] +**amount** | **str** | Trade amount | [optional] +**price** | **str** | Order price | [optional] +**order_id** | **str** | Related order ID, not returned in public endpoints | [optional] +**fee** | **str** | Fee deducted, not returned in public endpoints | [optional] +**fee_currency** | **str** | Fee currency unit, not returned in public endpoints | [optional] +**point_fee** | **str** | Points used to deduct fee, not returned in public endpoints | [optional] +**gt_fee** | **str** | GT used to deduct fee, not returned in public endpoints | [optional] +**amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] +**sequence_id** | **str** | Consecutive trade ID within a single market. Used to track and identify trades in the specific market | [optional] +**text** | **str** | User-defined information, not returned in public endpoints | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TradeFee.md b/docs/TradeFee.md index f887e70..4914a3f 100644 --- a/docs/TradeFee.md +++ b/docs/TradeFee.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] -**taker_fee** | **str** | taker fee rate. | [optional] -**maker_fee** | **str** | maker fee rate. | [optional] -**gt_discount** | **bool** | If GT deduction is enabled. | [optional] +**user_id** | **int** | User ID | [optional] +**taker_fee** | **str** | taker fee rate | [optional] +**maker_fee** | **str** | maker fee rate | [optional] +**gt_discount** | **bool** | Whether GT deduction discount is enabled | [optional] **gt_taker_fee** | **str** | Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**gt_maker_fee** | **str** | Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled | [optional] -**loan_fee** | **str** | Loan fee rate of margin lending. | [optional] -**point_type** | **str** | Point type. 0 - Initial version. 1 - new version since 202009. | [optional] -**futures_taker_fee** | **str** | Futures trading taker fee. | [optional] -**futures_maker_fee** | **str** | Future trading maker fee. | [optional] -**delivery_taker_fee** | **str** | Delivery trading taker fee. | [optional] -**delivery_maker_fee** | **str** | Delivery trading maker fee. | [optional] +**gt_maker_fee** | **str** | Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled | [optional] +**loan_fee** | **str** | Loan fee rate of margin lending | [optional] +**point_type** | **str** | Point card type: 0 - Original version, 1 - New version since 202009 | [optional] +**futures_taker_fee** | **str** | Perpetual contract taker fee rate | [optional] +**futures_maker_fee** | **str** | Perpetual contract maker fee rate | [optional] +**delivery_taker_fee** | **str** | Delivery contract taker fee rate | [optional] +**delivery_maker_fee** | **str** | Delivery contract maker fee rate | [optional] **debit_fee** | **int** | Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransactionID.md b/docs/TransactionID.md index b8ea4fb..92a681e 100644 --- a/docs/TransactionID.md +++ b/docs/TransactionID.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tx_id** | **int** | Order id. | [optional] +**tx_id** | **int** | Order ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Transfer.md b/docs/Transfer.md index 5ab897e..bf9cac3 100644 --- a/docs/Transfer.md +++ b/docs/Transfer.md @@ -4,12 +4,12 @@ Accounts available to transfer: - `spot`: spot account - `margin`: margin accou ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency | -**_from** | **str** | Account to transfer from. | -**to** | **str** | Account to transfer to. | -**amount** | **str** | Transfer amount. | -**currency_pair** | **str** | Margin currency pair. Required if transfer from or to margin account. | [optional] -**settle** | **str** | Futures settle currency. Required if transferring from or to futures account | [optional] +**currency** | **str** | Transfer currency name. For contract accounts, `currency` can be set to `POINT` (points) or supported settlement currencies (e.g., `BTC`, `USDT`) | +**_from** | **str** | Account to transfer from | +**to** | **str** | Account to transfer to | +**amount** | **str** | Transfer amount | +**currency_pair** | **str** | Margin trading pair. Required when transferring to or from margin account | [optional] +**settle** | **str** | Contract settlement currency. Required when transferring to or from contract account | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransferOrderStatus.md b/docs/TransferOrderStatus.md index 1747331..ff17da4 100644 --- a/docs/TransferOrderStatus.md +++ b/docs/TransferOrderStatus.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tx_id** | **str** | Order id. | [optional] -**status** | **str** | Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) | [optional] +**tx_id** | **str** | Order ID | [optional] +**status** | **str** | Transfer status: PENDING - Processing, SUCCESS - Transfer successful, FAIL - Transfer failed, PARTIAL_SUCCESS - Partially successful (this status appears when transferring between sub-accounts) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransferablesResult.md b/docs/TransferablesResult.md index fb48a0a..87b8b07 100644 --- a/docs/TransferablesResult.md +++ b/docs/TransferablesResult.md @@ -1,11 +1,11 @@ # TransferablesResult -Batch query unified account can be transferred up to a maximum of results. +Batch query unified account maximum transferable results ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail. | [optional] -**amount** | **str** | The maximum amount that can be transferred out. | [optional] +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | Maximum transferable amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TriggerOrderResponse.md b/docs/TriggerOrderResponse.md index 6df39d4..6f44aa3 100644 --- a/docs/TriggerOrderResponse.md +++ b/docs/TriggerOrderResponse.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Auto order ID. | [optional] +**id** | **int** | Auto 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/TriggerTime.md b/docs/TriggerTime.md index abec3d8..a1e5d05 100644 --- a/docs/TriggerTime.md +++ b/docs/TriggerTime.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**trigger_time** | **int** | Timestamp of the end of the countdown, in milliseconds. | [optional] +**trigger_time** | **int** | Timestamp when countdown ends, in milliseconds | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UidPushOrder.md b/docs/UidPushOrder.md index 4b58560..25eb840 100644 --- a/docs/UidPushOrder.md +++ b/docs/UidPushOrder.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID. | [optional] -**push_uid** | **int** | Initiator User ID. | [optional] -**receive_uid** | **int** | Recipient User ID. | [optional] -**currency** | **str** | Currency name. | [optional] -**amount** | **str** | Transfer amount. | [optional] -**create_time** | **int** | Creation time. | [optional] -**status** | **str** | Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success | [optional] -**message** | **str** | PENDING Reason Tips. | [optional] -**transaction_type** | **str** | Order Type. | [optional] +**id** | **int** | Order ID | [optional] +**push_uid** | **int** | Initiator User ID | [optional] +**receive_uid** | **int** | Recipient User ID | [optional] +**currency** | **str** | Currency name | [optional] +**amount** | **str** | Transfer amount | [optional] +**create_time** | **int** | Created time | [optional] +**status** | **str** | Withdrawal status: - CREATING: Creating - PENDING: Waiting for recipient (Please contact the recipient to accept the transfer on Gate official website) - CANCELLING: Cancelling - CANCELLED: Cancelled - REFUSING: Refusing - REFUSED: Refused - RECEIVING: Receiving - RECEIVED: Success | [optional] +**message** | **str** | PENDING reason tips | [optional] +**transaction_type** | **str** | Order Type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UidPushWithdrawal.md b/docs/UidPushWithdrawal.md index 6b60d98..2510006 100644 --- a/docs/UidPushWithdrawal.md +++ b/docs/UidPushWithdrawal.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**receive_uid** | **int** | Recipient UID. | -**currency** | **str** | Currency name. | -**amount** | **str** | Transfer amount. | +**receive_uid** | **int** | Recipient UID | +**currency** | **str** | Currency name | +**amount** | **str** | Transfer amount | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UidPushWithdrawalResp.md b/docs/UidPushWithdrawalResp.md index ff67310..5363c0f 100644 --- a/docs/UidPushWithdrawalResp.md +++ b/docs/UidPushWithdrawalResp.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Order ID. | [optional] +**id** | **int** | Order ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniCurrency.md b/docs/UniCurrency.md index b292331..02ea971 100644 --- a/docs/UniCurrency.md +++ b/docs/UniCurrency.md @@ -1,14 +1,14 @@ # UniCurrency -Currency detail. +Currency detail ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] [readonly] -**min_lend_amount** | **str** | The minimum lending amount, in the unit of the currency. | [optional] [readonly] -**max_lend_amount** | **str** | The total maximum lending amount, in USDT. | [optional] [readonly] -**max_rate** | **str** | Maximum rate (Hourly). | [optional] [readonly] -**min_rate** | **str** | Minimum rate (Hourly). | [optional] [readonly] +**currency** | **str** | Currency name | [optional] [readonly] +**min_lend_amount** | **str** | The minimum lending amount, in the unit of the currency | [optional] [readonly] +**max_lend_amount** | **str** | The total maximum lending amount, in USDT | [optional] [readonly] +**max_rate** | **str** | Maximum rate (Hourly) | [optional] [readonly] +**min_rate** | **str** | Minimum rate (Hourly) | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniCurrencyInterest.md b/docs/UniCurrencyInterest.md index 9cdac87..96c01fc 100644 --- a/docs/UniCurrencyInterest.md +++ b/docs/UniCurrencyInterest.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] **interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniCurrencyPair.md b/docs/UniCurrencyPair.md index 1f9577a..4e0d0c6 100644 --- a/docs/UniCurrencyPair.md +++ b/docs/UniCurrencyPair.md @@ -1,13 +1,13 @@ # UniCurrencyPair -Currency pair of the loan. +Currency pair of the loan ## Properties 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] +**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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniInterestRecord.md b/docs/UniInterestRecord.md index 380e96f..9486ec0 100644 --- a/docs/UniInterestRecord.md +++ b/docs/UniInterestRecord.md @@ -1,15 +1,15 @@ # UniInterestRecord -Interest Record. +Interest Record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **int** | Status: 0 - fail, 1 - success. | [optional] [readonly] -**currency** | **str** | Currency. | [optional] [readonly] -**actual_rate** | **str** | Actual Rate. | [optional] [readonly] -**interest** | **str** | Interest. | [optional] [readonly] +**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**actual_rate** | **str** | Actual Rate | [optional] [readonly] +**interest** | **str** | Interest | [optional] [readonly] **interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly] -**create_time** | **int** | Created time. | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLend.md b/docs/UniLend.md index 71024a2..7080ac5 100644 --- a/docs/UniLend.md +++ b/docs/UniLend.md @@ -1,19 +1,19 @@ # UniLend -Loan record. +Loan record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] [readonly] -**current_amount** | **str** | Current amount. | [optional] [readonly] -**amount** | **str** | Total amount. | [optional] [readonly] -**lent_amount** | **str** | Lent amount. | [optional] [readonly] -**frozen_amount** | **str** | Frozen amount. | [optional] [readonly] -**min_rate** | **str** | Minimum interest rate. | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**current_amount** | **str** | Current amount | [optional] [readonly] +**amount** | **str** | Total Lending Amount | [optional] [readonly] +**lent_amount** | **str** | Lent Amount | [optional] [readonly] +**frozen_amount** | **str** | Pending Redemption Amount | [optional] [readonly] +**min_rate** | **str** | Minimum interest rate | [optional] [readonly] **interest_status** | **str** | Interest status: interest_dividend - Normal dividend, interest_reinvest - Interest reinvestment | [optional] [readonly] -**reinvest_left_amount** | **str** | Amount not reinvested. | [optional] [readonly] -**create_time** | **int** | Created time of the lending order. | [optional] [readonly] -**update_time** | **int** | Upated time of the lending order. | [optional] [readonly] +**reinvest_left_amount** | **str** | Non-reinvested Amount | [optional] [readonly] +**create_time** | **int** | Lending Order Creation Time | [optional] [readonly] +**update_time** | **int** | Lending Order Last Update Time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLendInterest.md b/docs/UniLendInterest.md index 552f3ed..899acfb 100644 --- a/docs/UniLendInterest.md +++ b/docs/UniLendInterest.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] [readonly] -**interest** | **str** | Interest. | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**interest** | **str** | Interest income | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLendRecord.md b/docs/UniLendRecord.md index 69046fe..39c187a 100644 --- a/docs/UniLendRecord.md +++ b/docs/UniLendRecord.md @@ -1,16 +1,16 @@ # UniLendRecord -Interest Record. +Lending Record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] [readonly] -**amount** | **str** | current amount. | [optional] [readonly] -**last_wallet_amount** | **str** | Last wallet amount. | [optional] [readonly] -**last_lent_amount** | **str** | Last lent amount. | [optional] [readonly] -**last_frozen_amount** | **str** | Last frozen amount. | [optional] [readonly] -**type** | **str** | Record type: lend - lend, redeem - redeem. | [optional] [readonly] -**create_time** | **int** | Created time. | [optional] [readonly] +**currency** | **str** | Currency name | [optional] [readonly] +**amount** | **str** | Current Amount | [optional] [readonly] +**last_wallet_amount** | **str** | Previous Available Amount | [optional] [readonly] +**last_lent_amount** | **str** | Previous Lent Amount | [optional] [readonly] +**last_frozen_amount** | **str** | Previous Frozen Amount | [optional] [readonly] +**type** | **str** | Record Type: lend - Lend, redeem - Redeem | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLoan.md b/docs/UniLoan.md index 5ba0c26..6293d5f 100644 --- a/docs/UniLoan.md +++ b/docs/UniLoan.md @@ -1,15 +1,15 @@ # UniLoan -Loan. +Borrowing ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] [readonly] -**currency_pair** | **str** | Currency pair. | [optional] [readonly] -**amount** | **str** | amount. | [optional] [readonly] -**type** | **str** | Loan type, platform - platform, margin - margin. | [optional] [readonly] -**create_time** | **int** | Created time. | [optional] [readonly] -**update_time** | **int** | Updated time. | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**amount** | **str** | Amount to Repay | [optional] [readonly] +**type** | **str** | Loan type: platform borrowing - platform, margin borrowing - margin | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] +**update_time** | **int** | Last Update Time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLoanInterestRecord.md b/docs/UniLoanInterestRecord.md index ba2d464..e93539b 100644 --- a/docs/UniLoanInterestRecord.md +++ b/docs/UniLoanInterestRecord.md @@ -1,16 +1,16 @@ # UniLoanInterestRecord -Interest record. +Interest Deduction Record ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] [readonly] -**currency_pair** | **str** | Currency pair. | [optional] [readonly] -**actual_rate** | **str** | Actual rate. | [optional] [readonly] -**interest** | **str** | Interest. | [optional] [readonly] -**status** | **int** | Status: 0 - fail, 1 - success. | [optional] [readonly] -**type** | **str** | Type, platform - platform,margin - margin. | [optional] [readonly] -**create_time** | **int** | Created time. | [optional] [readonly] +**currency** | **str** | Currency name | [optional] [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**actual_rate** | **str** | Actual Rate | [optional] [readonly] +**interest** | **str** | Interest | [optional] [readonly] +**status** | **int** | Status: 0 - fail, 1 - success | [optional] [readonly] +**type** | **str** | Type: platform - Platform borrowing, margin - Margin borrowing | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UniLoanRecord.md b/docs/UniLoanRecord.md index 4168177..b34be2c 100644 --- a/docs/UniLoanRecord.md +++ b/docs/UniLoanRecord.md @@ -1,14 +1,14 @@ # UniLoanRecord -Loan records. +Borrowing Records ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | type: borrow - borrow, repay - repay. | [optional] [readonly] -**currency_pair** | **str** | Currency pair. | [optional] [readonly] -**currency** | **str** | Currency. | [optional] [readonly] -**amount** | **str** | The amount of lending or repaying. | [optional] [readonly] -**create_time** | **int** | Created time. | [optional] [readonly] +**type** | **str** | Type: `borrow` - borrow, `repay` - repay | [optional] [readonly] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**amount** | **str** | Borrow or repayment amount | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md index c23f933..4d2d24b 100644 --- a/docs/UnifiedAccount.md +++ b/docs/UnifiedAccount.md @@ -3,26 +3,26 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] -**refresh_time** | **int** | Time of the most recent refresh. | [optional] +**user_id** | **int** | User ID | [optional] +**refresh_time** | **int** | Last refresh time | [optional] **locked** | **bool** | Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode | [optional] **balances** | [**dict(str, UnifiedBalance)**](UnifiedBalance.md) | | [optional] -**total** | **str** | Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) | [optional] -**borrowed** | **str** | The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. | [optional] +**total** | **str** | Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be removed, replaced by unified_account_total) | [optional] +**borrowed** | **str** | Total borrowed amount converted to USD, i.e. the sum of `borrowed * price` of all currencies (excluding point cards), valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **total_initial_margin** | **str** | Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **total_margin_balance** | **str** | Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **total_maintenance_margin** | **str** | Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional] **total_initial_margin_rate** | **str** | Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **total_maintenance_margin_rate** | **str** | Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **total_available_margin** | **str** | Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**unified_account_total** | **str** | Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode | [optional] -**unified_account_total_liab** | **str** | Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode | [optional] -**unified_account_total_equity** | **str** | Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode | [optional] -**leverage** | **str** | Actual leverage, valid in cross-currency margin/combined margin mode. | [optional] [readonly] +**unified_account_total** | **str** | Total unified account assets, valid in single currency margin/cross-currency margin/combined margin mode | [optional] +**unified_account_total_liab** | **str** | Total unified account borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**unified_account_total_equity** | **str** | Total unified account equity, valid in single currency margin/cross-currency margin/combined margin mode | [optional] +**leverage** | **str** | Actual leverage ratio, valid in cross-currency margin/combined margin mode | [optional] [readonly] **spot_order_loss** | **str** | Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] -**use_funding** | **bool** | Whether to use funds as margin. | [optional] -**is_all_collateral** | **bool** | Whether all currencies are used as margin, true - false - No | [optional] +**spot_hedge** | **bool** | Spot hedging status: true - enabled, false - disabled | [optional] +**use_funding** | **bool** | Whether to use Earn funds as margin | [optional] +**is_all_collateral** | **bool** | Whether all currencies are used as margin: true - all currencies as margin, false - no | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md index f6b4d58..1c46f6a 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -4,36 +4,36 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_unified_accounts**](UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information. -[**get_unified_borrowable**](UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account. -[**get_unified_transferable**](UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account. -[**get_unified_transferables**](UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. -[**get_unified_borrowable_list**](UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum. -[**list_unified_loans**](UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | List loans. -[**create_unified_loan**](UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay. -[**list_unified_loan_records**](UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Get load records. -[**list_unified_loan_interest_records**](UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | List interest records. -[**get_unified_risk_units**](UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details. -[**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account. -[**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set mode of the unified account. -[**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Get unified estimate rate. -[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers. -[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers. -[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator. -[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | 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 the leverage multiple of the user currency. -[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage. -[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account. -[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | get historical lending rates. -[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set Collateral Currency. +[**list_unified_accounts**](UnifiedApi.md#list_unified_accounts) | **GET** /unified/accounts | Get unified account information +[**get_unified_borrowable**](UnifiedApi.md#get_unified_borrowable) | **GET** /unified/borrowable | Query maximum borrowable amount for unified account +[**get_unified_transferable**](UnifiedApi.md#get_unified_transferable) | **GET** /unified/transferable | Query maximum transferable amount for unified account +[**get_unified_transferables**](UnifiedApi.md#get_unified_transferables) | **GET** /unified/transferables | Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change +[**get_unified_borrowable_list**](UnifiedApi.md#get_unified_borrowable_list) | **GET** /unified/batch_borrowable | Batch query unified account maximum borrowable amount +[**list_unified_loans**](UnifiedApi.md#list_unified_loans) | **GET** /unified/loans | Query loans +[**create_unified_loan**](UnifiedApi.md#create_unified_loan) | **POST** /unified/loans | Borrow or repay +[**list_unified_loan_records**](UnifiedApi.md#list_unified_loan_records) | **GET** /unified/loan_records | Query loan records +[**list_unified_loan_interest_records**](UnifiedApi.md#list_unified_loan_interest_records) | **GET** /unified/interest_records | Query interest deduction records +[**get_unified_risk_units**](UnifiedApi.md#get_unified_risk_units) | **GET** /unified/risk_units | Get user risk unit details +[**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account +[**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set unified account mode +[**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Query unified account estimated interest rate +[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered discount +[**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin +[**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +[**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set +[**get_user_leverage_currency_setting**](UnifiedApi.md#get_user_leverage_currency_setting) | **GET** /unified/leverage/user_currency_setting | Get user currency leverage +[**set_user_leverage_currency_setting**](UnifiedApi.md#set_user_leverage_currency_setting) | **POST** /unified/leverage/user_currency_setting | Set loan currency leverage +[**list_unified_currencies**](UnifiedApi.md#list_unified_currencies) | **GET** /unified/currencies | List of loan currencies supported by unified account +[**get_history_loan_rate**](UnifiedApi.md#get_history_loan_rate) | **GET** /unified/history_loan_rate | Get historical lending rates +[**set_unified_collateral**](UnifiedApi.md#set_unified_collateral) | **POST** /unified/collateral_currencies | Set collateral currency # **list_unified_accounts** > UnifiedAccount list_unified_accounts(currency=currency, sub_uid=sub_uid) -Get unified account information. +Get unified account information -The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation +The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. For specific formulas, please refer to [Margin Formula](#margin-formula) ### Example @@ -59,11 +59,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -sub_uid = '10001' # str | Sub account user ID. (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +sub_uid = '10001' # str | Sub account user ID (optional) try: - # Get unified account information. + # Get unified account information api_response = api_instance.list_unified_accounts(currency=currency, sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -76,8 +76,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **sub_uid** | **str**| Sub account user ID. | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **sub_uid** | **str**| Sub account user ID | [optional] ### Return type @@ -95,14 +95,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_borrowable** > UnifiedBorrowable get_unified_borrowable(currency) -Query about the maximum borrowing for the unified account. +Query maximum borrowable amount for unified account ### Example @@ -128,10 +128,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. +currency = 'BTC' # str | Query by specified currency name try: - # Query about the maximum borrowing for the unified account. + # Query maximum borrowable amount for unified account api_response = api_instance.get_unified_borrowable(currency) print(api_response) except GateApiException as ex: @@ -144,7 +144,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | + **currency** | **str**| Query by specified currency name | ### Return type @@ -162,14 +162,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_transferable** > UnifiedTransferable get_unified_transferable(currency) -Query about the maximum transferable for the unified account. +Query maximum transferable amount for unified account ### Example @@ -195,10 +195,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. +currency = 'BTC' # str | Query by specified currency name try: - # Query about the maximum transferable for the unified account. + # Query maximum transferable amount for unified account api_response = api_instance.get_unified_transferable(currency) print(api_response) except GateApiException as ex: @@ -211,7 +211,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | + **currency** | **str**| Query by specified currency name | ### Return type @@ -229,14 +229,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_transferables** > list[TransferablesResult] get_unified_transferables(currencies) -Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. +Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change ### Example @@ -262,10 +262,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currencies = 'BTC,ETH' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time. +currencies = 'BTC,ETH' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time try: - # Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. + # Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change api_response = api_instance.get_unified_transferables(currencies) print(api_response) except GateApiException as ex: @@ -278,7 +278,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time. | + **currencies** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | ### Return type @@ -296,14 +296,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_borrowable_list** > list[UnifiedBorrowable1] get_unified_borrowable_list(currencies) -Batch query unified account can be borrowed up to a maximum. +Batch query unified account maximum borrowable amount ### Example @@ -329,10 +329,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency names for querying in an array, separated by commas, maximum 10 currencies try: - # Batch query unified account can be borrowed up to a maximum. + # Batch query unified account maximum borrowable amount api_response = api_instance.get_unified_borrowable_list(currencies) print(api_response) except GateApiException as ex: @@ -345,7 +345,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. | + **currencies** | [**list[str]**](str.md)| Specify currency names for querying in an array, separated by commas, maximum 10 currencies | ### Return type @@ -363,14 +363,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_loans** > list[UniLoan] list_unified_loans(currency=currency, page=page, limit=limit, type=type) -List loans. +Query loans ### Example @@ -396,13 +396,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) -type = 'platform' # str | Loan type, platform - platform, margin - margin. (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) +type = 'platform' # str | Loan type: platform borrowing - platform, margin borrowing - margin (optional) try: - # List loans. + # Query loans api_response = api_instance.list_unified_loans(currency=currency, page=page, limit=limit, type=type) print(api_response) except GateApiException as ex: @@ -415,10 +415,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] - **type** | **str**| Loan type, platform - platform, margin - margin. | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] + **type** | **str**| Loan type: platform borrowing - platform, margin borrowing - margin | [optional] ### Return type @@ -436,16 +436,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_unified_loan** > UnifiedLoanResult create_unified_loan(unified_loan) -Borrow or repay. +Borrow or repay -When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the available by setting the parameter `repaid_all=true` +When borrowing, ensure the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and user. Loan interest will be automatically deducted from the account at regular intervals. Users are responsible for managing repayment of borrowed amounts. For repayment, use `repaid_all=true` to repay all available amounts ### Example @@ -474,7 +474,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_loan = gate_api.UnifiedLoan() # UnifiedLoan | try: - # Borrow or repay. + # Borrow or repay api_response = api_instance.create_unified_loan(unified_loan) print(api_response) except GateApiException as ex: @@ -505,14 +505,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Operated successfully. | - | +**200** | Operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_loan_records** > list[UnifiedLoanRecord] list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) -Get load records. +Query loan records ### Example @@ -538,13 +538,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -type = 'type_example' # str | The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds (optional) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +type = 'type_example' # str | Loan record type: borrow - borrowing, repay - repayment (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) try: - # Get load records. + # Query loan records api_response = api_instance.list_unified_loan_records(type=type, currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -557,10 +557,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **str**| The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds | [optional] - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **type** | **str**| Loan record type: borrow - borrowing, repay - repayment | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] ### Return type @@ -578,14 +578,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_loan_interest_records** > list[UniLoanInterestRecord] list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) -List interest records. +Query interest deduction records ### Example @@ -611,15 +611,15 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) -_from = 1627706330 # int | Start timestamp of the query. (optional) -to = 1635329650 # int | Time range ending, default to current time. (optional) -type = 'platform' # str | Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin (optional) +currency = 'BTC' # str | Query by specified currency name (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) +_from = 1627706330 # int | Start timestamp for the query (optional) +to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional) +type = 'platform' # str | Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified (optional) try: - # List interest records. + # Query interest deduction records api_response = api_instance.list_unified_loan_interest_records(currency=currency, page=page, limit=limit, _from=_from, to=to, type=type) print(api_response) except GateApiException as ex: @@ -632,12 +632,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] - **_from** | **int**| Start timestamp of the query. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **type** | **str**| Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin | [optional] + **currency** | **str**| Query by specified currency name | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] + **_from** | **int**| Start timestamp for the query | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **type** | **str**| Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified | [optional] ### Return type @@ -655,16 +655,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_risk_units** > UnifiedRiskUnits get_unified_risk_units() -Get user risk unit details. +Get user risk unit details -Retrieve user risk unit details, only valid in portfolio margin mode. +Get user risk unit details, only valid in portfolio margin mode ### Example @@ -692,7 +692,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # Get user risk unit details. + # Get user risk unit details api_response = api_instance.get_unified_risk_units() print(api_response) except GateApiException as ex: @@ -720,14 +720,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_mode** > UnifiedModeSet get_unified_mode() -Query mode of the unified account. +Query mode of the unified account Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode @@ -757,7 +757,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # Query mode of the unified account. + # Query mode of the unified account api_response = api_instance.get_unified_mode() print(api_response) except GateApiException as ex: @@ -785,14 +785,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_unified_mode** > set_unified_mode(unified_mode_set) -Set mode of the unified account. +Set unified account mode Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` @@ -823,7 +823,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_mode_set = gate_api.UnifiedModeSet() # UnifiedModeSet | try: - # Set mode of the unified account. + # Set unified account mode api_instance.set_unified_mode(unified_mode_set) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -853,16 +853,16 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Success. | - | +**204** | Set successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_unified_estimate_rate** > dict(str, str) get_unified_estimate_rate(currencies) -Get unified estimate rate. +Query unified account estimated interest rate -Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. +Interest rates fluctuate hourly based on lending depth, so exact rates cannot be provided. When a currency is not supported, the interest rate returned will be an empty string ### Example @@ -888,10 +888,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. +currencies = ['[\"BTC\",\"GT\"]'] # list[str] | Specify currency names for querying in an array, separated by commas, maximum 10 currencies try: - # Get unified estimate rate. + # Query unified account estimated interest rate api_response = api_instance.get_unified_estimate_rate(currencies) print(api_response) except GateApiException as ex: @@ -904,7 +904,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**list[str]**](str.md)| Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. | + **currencies** | [**list[str]**](str.md)| Specify currency names for querying in an array, separated by commas, maximum 10 currencies | ### Return type @@ -922,14 +922,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_currency_discount_tiers** > list[UnifiedDiscount] list_currency_discount_tiers() -List currency discount tiers. +Query unified account tiered discount ### Example @@ -948,7 +948,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # List currency discount tiers. + # Query unified account tiered discount api_response = api_instance.list_currency_discount_tiers() print(api_response) except GateApiException as ex: @@ -976,14 +976,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_loan_margin_tiers** > list[UnifiedMarginTiers] list_loan_margin_tiers() -List loan margin tiers. +Query unified account tiered loan margin ### Example @@ -1002,7 +1002,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # List loan margin tiers. + # Query unified account tiered loan margin api_response = api_instance.list_loan_margin_tiers() print(api_response) except GateApiException as ex: @@ -1030,16 +1030,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **calculate_portfolio_margin** > UnifiedPortfolioOutput calculate_portfolio_margin(unified_portfolio_input) -Portfolio margin calculator. +Portfolio margin calculator -Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. +Portfolio Margin Calculator When inputting simulated position portfolios, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. ### Example @@ -1059,7 +1059,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_portfolio_input = gate_api.UnifiedPortfolioInput() # UnifiedPortfolioInput | try: - # Portfolio margin calculator. + # Portfolio margin calculator api_response = api_instance.calculate_portfolio_margin(unified_portfolio_input) print(api_response) except GateApiException as ex: @@ -1090,14 +1090,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_leverage_currency_config** > UnifiedLeverageConfig get_user_leverage_currency_config(currency) -Minimum currency leverage that can be set. +Maximum and minimum currency leverage that can be set ### Example @@ -1123,10 +1123,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency. +currency = 'BTC' # str | Currency try: - # Minimum currency leverage that can be set. + # Maximum and minimum currency leverage that can be set api_response = api_instance.get_user_leverage_currency_config(currency) print(api_response) except GateApiException as ex: @@ -1139,7 +1139,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | + **currency** | **str**| Currency | ### Return type @@ -1157,16 +1157,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_leverage_currency_setting** -> UnifiedLeverageSetting get_user_leverage_currency_setting(currency=currency) +> list[UnifiedLeverageSetting] get_user_leverage_currency_setting(currency=currency) -Get the leverage multiple of the user currency. +Get user currency leverage -Get the user's currency leverage. If currency is not passed, query all currencies. +Get user currency leverage. If currency is not specified, query all currencies ### Example @@ -1192,10 +1192,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency. (optional) +currency = 'BTC' # str | Currency (optional) try: - # Get the leverage multiple of the user currency. + # Get user currency leverage api_response = api_instance.get_user_leverage_currency_setting(currency=currency) print(api_response) except GateApiException as ex: @@ -1208,11 +1208,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | [optional] + **currency** | **str**| Currency | [optional] ### Return type -[**UnifiedLeverageSetting**](UnifiedLeverageSetting.md) +[**list[UnifiedLeverageSetting]**](UnifiedLeverageSetting.md) ### Authorization @@ -1226,14 +1226,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_user_leverage_currency_setting** > set_user_leverage_currency_setting(unified_leverage_setting) -Set the loan currency leverage. +Set loan currency leverage ### Example @@ -1262,7 +1262,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_leverage_setting = gate_api.UnifiedLeverageSetting() # UnifiedLeverageSetting | try: - # Set the loan currency leverage. + # Set loan currency leverage api_instance.set_user_leverage_currency_setting(unified_leverage_setting) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1292,14 +1292,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Success. | - | +**204** | Set successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_unified_currencies** > list[UnifiedCurrency] list_unified_currencies(currency=currency) -List of loan currencies supported by unified account. +List of loan currencies supported by unified account ### Example @@ -1316,10 +1316,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'BTC' # str | Currency. (optional) +currency = 'BTC' # str | Currency (optional) try: - # List of loan currencies supported by unified account. + # List of loan currencies supported by unified account api_response = api_instance.list_unified_currencies(currency=currency) print(api_response) except GateApiException as ex: @@ -1332,7 +1332,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | [optional] + **currency** | **str**| Currency | [optional] ### Return type @@ -1350,14 +1350,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_history_loan_rate** > UnifiedHistoryLoanRate get_history_loan_rate(currency, tier=tier, page=page, limit=limit) -get historical lending rates. +Get historical lending rates ### Example @@ -1374,13 +1374,13 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.UnifiedApi(api_client) -currency = 'USDT' # str | Currency. -tier = '1' # str | The VIP level of the floating rate that needs to be queried. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +currency = 'USDT' # str | Currency +tier = '1' # str | VIP level for the floating rate to be queried (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) try: - # get historical lending rates. + # Get historical lending rates api_response = api_instance.get_history_loan_rate(currency, tier=tier, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -1393,10 +1393,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | - **tier** | **str**| The VIP level of the floating rate that needs to be queried. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **currency** | **str**| Currency | + **tier** | **str**| VIP level for the floating rate to be queried | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] ### Return type @@ -1414,14 +1414,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_unified_collateral** > UnifiedCollateralRes set_unified_collateral(unified_collateral_req) -Set Collateral Currency. +Set collateral currency ### Example @@ -1450,7 +1450,7 @@ api_instance = gate_api.UnifiedApi(api_client) unified_collateral_req = gate_api.UnifiedCollateralReq() # UnifiedCollateralReq | try: - # Set Collateral Currency. + # Set collateral currency api_response = api_instance.set_unified_collateral(unified_collateral_req) print(api_response) except GateApiException as ex: @@ -1481,7 +1481,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | UpdateSuccess. | - | +**200** | Updated successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md index 089024e..748cf98 100644 --- a/docs/UnifiedBalance.md +++ b/docs/UnifiedBalance.md @@ -3,26 +3,26 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**available** | **str** | Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes | [optional] -**freeze** | **str** | The locked amount is valid in single currency margin/cross-currency margin/combined margin mode | [optional] -**borrowed** | **str** | Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] -**negative_liab** | **str** | Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode | [optional] +**available** | **str** | Available balance, valid in single currency margin/cross-currency margin/combined margin mode, calculation varies by mode | [optional] +**freeze** | **str** | Locked balance, valid in single currency margin/cross-currency margin/combined margin mode | [optional] +**borrowed** | **str** | Borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**negative_liab** | **str** | Negative balance borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **futures_pos_liab** | **str** | Contract opening position borrowing currency (abandoned, to be offline field) | [optional] **equity** | **str** | Equity, valid in single currency margin/cross currency margin/combined margin mode | [optional] -**total_freeze** | **str** | Total occupancy (discarded, to be offline field). | [optional] -**total_liab** | **str** | Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] +**total_freeze** | **str** | Total frozen (deprecated, to be removed) | [optional] +**total_liab** | **str** | Total borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] **spot_in_use** | **str** | The amount of spot hedging is valid in the combined margin mode, and is 0 in other margin modes such as single currency and cross-currency margin modes | [optional] **funding** | **str** | Uniloan financial management amount, effective when turned on as a unified account margin switch | [optional] -**funding_version** | **str** | Funding version. | [optional] +**funding_version** | **str** | Funding version | [optional] **cross_balance** | **str** | Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode | [optional] **iso_balance** | **str** | Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] **im** | **str** | Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**mm** | **str** | The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. | [optional] +**mm** | **str** | Cross margin maintenance margin, valid in single-currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode | [optional] **imr** | **str** | Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] **mmr** | **str** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] **margin_balance** | **str** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional] -**available_margin** | **str** | Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] -**enabled_collateral** | **bool** | Currency enabled as margin: true - Enabled, false - Disabled. | [optional] +**available_margin** | **str** | Cross margin available balance, valid in single currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode | [optional] +**enabled_collateral** | **bool** | Currency enabled as margin: true - Enabled, false - Disabled | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedBorrowable.md b/docs/UnifiedBorrowable.md index 586ef0e..edd2c95 100644 --- a/docs/UnifiedBorrowable.md +++ b/docs/UnifiedBorrowable.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail. | [optional] -**amount** | **str** | Max borrowable amount. | [optional] +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | Max borrowable amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedBorrowable1.md b/docs/UnifiedBorrowable1.md index ef1e387..81b38b3 100644 --- a/docs/UnifiedBorrowable1.md +++ b/docs/UnifiedBorrowable1.md @@ -1,11 +1,11 @@ # UnifiedBorrowable1 -Batch query unified account can be borrowed up to a maximum of results. +Batch query unified account maximum borrowable results ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail. | [optional] -**amount** | **str** | The maximum amount to borrow. | [optional] +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | Maximum borrowable amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCollateralReq.md b/docs/UnifiedCollateralReq.md index b4b0d43..fc1976a 100644 --- a/docs/UnifiedCollateralReq.md +++ b/docs/UnifiedCollateralReq.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collateral_type** | **int** | User-set collateral mode0(all)-All currencies used as collateral, collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid | [optional] -**enable_list** | **list[str]** | Currency list, where collateral_type=1(custom) indicates the logic of addition | [optional] -**disable_list** | **list[str]** | Cancellation list, indicating the logic of cancellation. | [optional] +**collateral_type** | **int** | User-set collateral mode: 0(all)-All currencies as collateral, 1(custom)-Custom currencies as collateral. When collateral_type is 0(all), enable_list and disable_list parameters are invalid | [optional] +**enable_list** | **list[str]** | Currency list, where collateral_type=1(custom) indicates the addition logic | [optional] +**disable_list** | **list[str]** | Disable list, indicating the disable logic | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCollateralRes.md b/docs/UnifiedCollateralRes.md index 15a28a1..7432c38 100644 --- a/docs/UnifiedCollateralRes.md +++ b/docs/UnifiedCollateralRes.md @@ -1,10 +1,10 @@ # UnifiedCollateralRes -Return of unified account collateral mode settings. +Unified account collateral mode settings response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**is_success** | **bool** | Whether the setting was successful. | [optional] +**is_success** | **bool** | Whether the setting was successful | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedCurrency.md b/docs/UnifiedCurrency.md index cc9f22c..db33f77 100644 --- a/docs/UnifiedCurrency.md +++ b/docs/UnifiedCurrency.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Currency name. | [optional] -**prec** | **str** | Currency precision. | [optional] -**min_borrow_amount** | **str** | The minimum debit limit is the unit of currency. | [optional] -**user_max_borrow_amount** | **str** | The minimum debit limit is the unit of currency. | [optional] -**total_max_borrow_amount** | **str** | The maximum debit limit for the platform is USDT. | [optional] -**loan_status** | **str** | Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending | [optional] +**name** | **str** | Currency name | [optional] +**prec** | **str** | Currency precision | [optional] +**min_borrow_amount** | **str** | Minimum borrowable limit, in currency units | [optional] +**user_max_borrow_amount** | **str** | User's maximum borrowable limit, in USDT | [optional] +**total_max_borrow_amount** | **str** | Platform's maximum borrowable limit, in USDT | [optional] +**loan_status** | **str** | Lending status - `disable` : Lending prohibited - `enable` : Lending supported | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedDiscount.md b/docs/UnifiedDiscount.md index 635a46d..a242849 100644 --- a/docs/UnifiedDiscount.md +++ b/docs/UnifiedDiscount.md @@ -1,11 +1,11 @@ # UnifiedDiscount -Currency discount tiers. +Unified account tiered discount ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] -**discount_tiers** | [**list[UnifiedDiscountTiers]**](UnifiedDiscountTiers.md) | Tiered discount. | [optional] +**currency** | **str** | Currency name | [optional] +**discount_tiers** | [**list[UnifiedDiscountTiers]**](UnifiedDiscountTiers.md) | Tiered discount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedDiscountTiers.md b/docs/UnifiedDiscountTiers.md index 2cfb6e8..ba78cc7 100644 --- a/docs/UnifiedDiscountTiers.md +++ b/docs/UnifiedDiscountTiers.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **str** | Tier. | [optional] -**discount** | **str** | Discount. | [optional] -**lower_limit** | **str** | Lower limit. | [optional] -**upper_limit** | **str** | Upper limit,+ indicates positive infinity. | [optional] -**leverage** | **str** | Position leverage. | [optional] +**tier** | **str** | Tier | [optional] +**discount** | **str** | Discount | [optional] +**lower_limit** | **str** | Lower limit | [optional] +**upper_limit** | **str** | Upper limit, + indicates positive infinity | [optional] +**leverage** | **str** | Position leverage | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedHistoryLoanRate.md b/docs/UnifiedHistoryLoanRate.md index 78de5ce..4414cf5 100644 --- a/docs/UnifiedHistoryLoanRate.md +++ b/docs/UnifiedHistoryLoanRate.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] -**tier** | **str** | The VIP level of the floating rate required. | [optional] -**tier_up_rate** | **str** | VIP level corresponding floating rate. | [optional] -**rates** | [**list[UnifiedHistoryLoanRateRates]**](UnifiedHistoryLoanRateRates.md) | Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in time | [optional] +**currency** | **str** | Currency name | [optional] +**tier** | **str** | VIP level for the floating rate to be retrieved | [optional] +**tier_up_rate** | **str** | Floating rate corresponding to VIP level | [optional] +**rates** | [**list[UnifiedHistoryLoanRateRates]**](UnifiedHistoryLoanRateRates.md) | Historical interest rate information, one data point per hour, array size determined by page and limit parameters from the API request, sorted by time from recent to distant | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedHistoryLoanRateRates.md b/docs/UnifiedHistoryLoanRateRates.md index e14fa78..2cc9c85 100644 --- a/docs/UnifiedHistoryLoanRateRates.md +++ b/docs/UnifiedHistoryLoanRateRates.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | The hourly timestamp corresponding to the interest rate, in milliseconds. | [optional] -**rate** | **str** | Historical interest rates for this hour. | [optional] +**time** | **int** | Hourly timestamp corresponding to this interest rate, in milliseconds | [optional] +**rate** | **str** | Historical interest rate for this hour | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLeverageConfig.md b/docs/UnifiedLeverageConfig.md index 8f6e458..4f70f0d 100644 --- a/docs/UnifiedLeverageConfig.md +++ b/docs/UnifiedLeverageConfig.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**current_leverage** | **str** | Current leverage ratio. | [optional] -**min_leverage** | **str** | Minimum adjustable leverage ratio. | [optional] -**max_leverage** | **str** | Maximum adjustable leverage ratio. | [optional] -**debit** | **str** | Current liabilities. | [optional] -**available_margin** | **str** | Available Margin. | [optional] -**borrowable** | **str** | The current leverage you can choose is. | [optional] -**except_leverage_borrowable** | **str** | The maximum amount of margin that can be borrowed and the be borrowed, whichever is smaller | [optional] +**current_leverage** | **str** | Current leverage ratio | [optional] +**min_leverage** | **str** | Minimum adjustable leverage ratio | [optional] +**max_leverage** | **str** | Maximum adjustable leverage ratio | [optional] +**debit** | **str** | Current liabilities | [optional] +**available_margin** | **str** | Available Margin | [optional] +**borrowable** | **str** | Maximum borrowable amount at current leverage | [optional] +**except_leverage_borrowable** | **str** | Maximum borrowable from margin and maximum borrowable from Earn, whichever is smaller | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLeverageSetting.md b/docs/UnifiedLeverageSetting.md index b62d735..63a8b10 100644 --- a/docs/UnifiedLeverageSetting.md +++ b/docs/UnifiedLeverageSetting.md @@ -1,11 +1,11 @@ # UnifiedLeverageSetting -Loan currency leverage. +Leverage multiplier for borrowing currency ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | -**leverage** | **str** | multiple. | +**currency** | **str** | Currency name | +**leverage** | **str** | Multiplier | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLoan.md b/docs/UnifiedLoan.md index 93dc10c..0f950f3 100644 --- a/docs/UnifiedLoan.md +++ b/docs/UnifiedLoan.md @@ -1,14 +1,14 @@ # UnifiedLoan -Borrow or repay. +Borrow or repay ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | -**type** | **str** | type: borrow - borrow, repay - repay. | -**amount** | **str** | The amount of lending or repaying. | -**repaid_all** | **bool** | Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. | [optional] -**text** | **str** | User defined custom ID. | [optional] +**currency** | **str** | Currency | +**type** | **str** | Type: `borrow` - borrow, `repay` - repay | +**amount** | **str** | Borrow or repayment amount | +**repaid_all** | **bool** | Full repayment, only used for repayment operations. When set to `true`, overrides `amount` and directly repays the full amount | [optional] +**text** | **str** | User defined custom ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLoanRecord.md b/docs/UnifiedLoanRecord.md index cff2542..29d2159 100644 --- a/docs/UnifiedLoanRecord.md +++ b/docs/UnifiedLoanRecord.md @@ -1,17 +1,17 @@ # UnifiedLoanRecord -Loan records. +Borrowing Records ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | ID. | [optional] [readonly] -**type** | **str** | type: borrow - borrow, repay - repay. | [optional] [readonly] -**repayment_type** | **str** | Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment | [optional] [readonly] -**borrow_type** | **str** | Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment | [optional] -**currency_pair** | **str** | Currency pair. | [optional] [readonly] -**currency** | **str** | Currency. | [optional] [readonly] -**amount** | **str** | The amount of lending or repaying. | [optional] [readonly] -**create_time** | **int** | Created time. | [optional] [readonly] +**id** | **int** | ID | [optional] [readonly] +**type** | **str** | Type: `borrow` - borrow, `repay` - repay | [optional] [readonly] +**repayment_type** | **str** | Repayment type: none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after order cancellation, different_currencies_repayment - Cross-currency repayment | [optional] [readonly] +**borrow_type** | **str** | Borrowing type, returned when querying loan records: manual_borrow - Manual borrowing, auto_borrow - Automatic borrowing | [optional] +**currency_pair** | **str** | Currency pair | [optional] [readonly] +**currency** | **str** | Currency | [optional] [readonly] +**amount** | **str** | Borrow or repayment amount | [optional] [readonly] +**create_time** | **int** | Created time | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedLoanResult.md b/docs/UnifiedLoanResult.md index 3c8a6aa..8db1d72 100644 --- a/docs/UnifiedLoanResult.md +++ b/docs/UnifiedLoanResult.md @@ -1,10 +1,10 @@ # UnifiedLoanResult -Unified account loan and repayment response results. +Unified account borrowing and repayment response result ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tran_id** | **int** | Transaction id. | [optional] +**tran_id** | **int** | Transaction ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedMarginTiers.md b/docs/UnifiedMarginTiers.md index e9009f2..2f2cad9 100644 --- a/docs/UnifiedMarginTiers.md +++ b/docs/UnifiedMarginTiers.md @@ -1,11 +1,11 @@ # UnifiedMarginTiers -Unified margin tiers. +Unified account borrowing margin tiers ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency name. | [optional] -**margin_tiers** | [**list[MarginTiers]**](MarginTiers.md) | Margin tiers. | [optional] +**currency** | **str** | Currency name | [optional] +**margin_tiers** | [**list[MarginTiers]**](MarginTiers.md) | Tiered margin | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedModeSet.md b/docs/UnifiedModeSet.md index 7d564ce..bdfbaa0 100644 --- a/docs/UnifiedModeSet.md +++ b/docs/UnifiedModeSet.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model | +**mode** | **str** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode | **settings** | [**UnifiedSettings**](UnifiedSettings.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedPortfolioInput.md b/docs/UnifiedPortfolioInput.md index 6f32795..465188f 100644 --- a/docs/UnifiedPortfolioInput.md +++ b/docs/UnifiedPortfolioInput.md @@ -1,16 +1,16 @@ # UnifiedPortfolioInput -Input for the portfolio margin calculator. +Portfolio margin calculator input ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**spot_balances** | [**list[MockSpotBalance]**](MockSpotBalance.md) | Spot. | [optional] -**spot_orders** | [**list[MockSpotOrder]**](MockSpotOrder.md) | Spot orders. | [optional] -**futures_positions** | [**list[MockFuturesPosition]**](MockFuturesPosition.md) | Futures positions. | [optional] -**futures_orders** | [**list[MockFuturesOrder]**](MockFuturesOrder.md) | Futures order. | [optional] -**options_positions** | [**list[MockOptionsPosition]**](MockOptionsPosition.md) | Options positions. | [optional] -**options_orders** | [**list[MockOptionsOrder]**](MockOptionsOrder.md) | Option orders. | [optional] -**spot_hedge** | **bool** | Whether to enable spot hedging. | [optional] +**spot_balances** | [**list[MockSpotBalance]**](MockSpotBalance.md) | Spot | [optional] +**spot_orders** | [**list[MockSpotOrder]**](MockSpotOrder.md) | Spot orders | [optional] +**futures_positions** | [**list[MockFuturesPosition]**](MockFuturesPosition.md) | Futures positions | [optional] +**futures_orders** | [**list[MockFuturesOrder]**](MockFuturesOrder.md) | Futures order | [optional] +**options_positions** | [**list[MockOptionsPosition]**](MockOptionsPosition.md) | Options positions | [optional] +**options_orders** | [**list[MockOptionsOrder]**](MockOptionsOrder.md) | Option orders | [optional] +**spot_hedge** | **bool** | Whether to enable spot hedging | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedPortfolioOutput.md b/docs/UnifiedPortfolioOutput.md index e711905..08d671a 100644 --- a/docs/UnifiedPortfolioOutput.md +++ b/docs/UnifiedPortfolioOutput.md @@ -1,13 +1,13 @@ # UnifiedPortfolioOutput -The output of the portfolio margin calculator. +Portfolio margin calculator output ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**maintain_margin_total** | **str** | Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. | [optional] -**initial_margin_total** | **str** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, orders. | [optional] -**calculate_time** | **int** | Calculate time. | [optional] -**risk_unit** | [**list[MockRiskUnit]**](MockRiskUnit.md) | Risk unit. | [optional] +**maintain_margin_total** | **str** | Total maintenance margin, including only portfolio margin calculation results for positions in risk units, excluding borrowing margin. If borrowing exists, conventional borrowing margin requirements will still apply | [optional] +**initial_margin_total** | **str** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders | [optional] +**calculate_time** | **int** | Calculation time | [optional] +**risk_unit** | [**list[MockRiskUnit]**](MockRiskUnit.md) | Risk unit | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedRiskUnits.md b/docs/UnifiedRiskUnits.md index 06882fa..ef263da 100644 --- a/docs/UnifiedRiskUnits.md +++ b/docs/UnifiedRiskUnits.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_id** | **int** | User ID. | [optional] -**spot_hedge** | **bool** | Spot hedging status, true - enabled, false - not enabled. | [optional] -**risk_units** | [**list[RiskUnits]**](RiskUnits.md) | Risk unit. | [optional] +**user_id** | **int** | User ID | [optional] +**spot_hedge** | **bool** | Spot hedging status: true - enabled, false - disabled | [optional] +**risk_units** | [**list[RiskUnits]**](RiskUnits.md) | Risk unit | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedSettings.md b/docs/UnifiedSettings.md index 1375e15..96fe971 100644 --- a/docs/UnifiedSettings.md +++ b/docs/UnifiedSettings.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**usdt_futures** | **bool** | USDT contract switch. In cross-currency margin mode, it can only be turned on and not off | [optional] -**spot_hedge** | **bool** | Spot hedging switch. | [optional] -**use_funding** | **bool** | switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin | [optional] -**options** | **bool** | Option switch. In cross-currency margin mode, it can only be turned on and not off | [optional] +**usdt_futures** | **bool** | USDT futures switch. In cross-currency margin mode, can only be enabled and cannot be disabled | [optional] +**spot_hedge** | **bool** | Spot hedging switch | [optional] +**use_funding** | **bool** | Earn switch, when mode is cross-currency margin mode, whether to use Earn funds as margin | [optional] +**options** | **bool** | Options switch. In cross-currency margin mode, can only be enabled and cannot be disabled | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UnifiedTransferable.md b/docs/UnifiedTransferable.md index 4aaa663..1d07c53 100644 --- a/docs/UnifiedTransferable.md +++ b/docs/UnifiedTransferable.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency detail. | [optional] -**amount** | **str** | The maximum amount that can be transferred out. | [optional] +**currency** | **str** | Currency detail | [optional] +**amount** | **str** | Maximum transferable amount | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserLtvInfo.md b/docs/UserLtvInfo.md index 09e7c50..1483aff 100644 --- a/docs/UserLtvInfo.md +++ b/docs/UserLtvInfo.md @@ -1,16 +1,16 @@ # UserLtvInfo -User's currency statistics data. +User's currency statistics data ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collateral_currency** | **str** | Collateral. | [optional] -**borrow_currency** | **str** | Borrowed currency. | [optional] -**init_ltv** | **str** | The initial collateralization rate. | [optional] -**alert_ltv** | **str** | Warning collateralization ratio. | [optional] -**liquidate_ltv** | **str** | The liquidation collateralization rate. | [optional] -**min_borrow_amount** | **str** | Minimum borrowable amount for the loan currency. | [optional] -**left_borrowable_amount** | **str** | Remaining borrowable amount for the loan currency. | [optional] +**collateral_currency** | **str** | Collateral currency | [optional] +**borrow_currency** | **str** | Borrowed currency | [optional] +**init_ltv** | **str** | Initial collateralization rate | [optional] +**alert_ltv** | **str** | Warning collateralization rate | [optional] +**liquidate_ltv** | **str** | Liquidation collateralization rate | [optional] +**min_borrow_amount** | **str** | Minimum borrowable amount for the loan currency | [optional] +**left_borrowable_amount** | **str** | Remaining borrowable amount for the loan currency | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSub.md b/docs/UserSub.md index 9aefe18..c5432f0 100644 --- a/docs/UserSub.md +++ b/docs/UserSub.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **int** | User ID. | [optional] -**belong** | **str** | The system to which the user belongs (partner referral). If empty, it means not belonging to any system. | [optional] -**type** | **int** | Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct customer 4-indirect direct customer 5-ordinary user) | [optional] -**ref_uid** | **int** | Inviter user ID. | [optional] +**uid** | **int** | User ID | [optional] +**belong** | **str** | User's system affiliation (partner/referral). Empty means not belonging to any system | [optional] +**type** | **int** | Type (0-Not in system 1-Direct subordinate agent 2-Indirect subordinate agent 3-Direct direct customer 4-Indirect direct customer 5-Regular user) | [optional] +**ref_uid** | **int** | Inviter user ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSubRelation.md b/docs/UserSubRelation.md index 7eeaf25..912227c 100644 --- a/docs/UserSubRelation.md +++ b/docs/UserSubRelation.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**list** | [**list[UserSub]**](UserSub.md) | Subordinate relationship list. | [optional] +**list** | [**list[UserSub]**](UserSub.md) | Subordinate relationship list | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserTotalAmount.md b/docs/UserTotalAmount.md index 0582c8e..87460d1 100644 --- a/docs/UserTotalAmount.md +++ b/docs/UserTotalAmount.md @@ -1,11 +1,11 @@ # UserTotalAmount -Total borrowed amount and pledged collateral amount by the user. +User's total borrowing and collateral amount ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**borrow_amount** | **str** | Total borrowing amount, calculated in USDT. | [optional] -**collateral_amount** | **str** | Total collateral amount, calculated in USDT. | [optional] +**borrow_amount** | **str** | Total borrowing amount in USDT | [optional] +**collateral_amount** | **str** | Total collateral amount in USDT | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WalletApi.md b/docs/WalletApi.md index a3a6706..e137cb6 100644 --- a/docs/WalletApi.md +++ b/docs/WalletApi.md @@ -4,33 +4,33 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | List chains supported for specified currency. -[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address. -[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. -[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. -[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts. -[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts. -[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts. -[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account. -[**get_transfer_order_status**](WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query. -[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Retrieve withdrawal status. -[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances. -[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts' margin balances. -[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub accounts' futures account balances. -[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query subaccount's cross_margin account info. -[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query saved address. -[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Retrieve personal trading fee. -[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Retrieve user's total balances. -[**list_small_balance**](WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | List small balance. -[**convert_small_balance**](WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance. -[**list_small_balance_history**](WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | List small balance history. -[**list_push_orders**](WalletApi.md#list_push_orders) | **GET** /wallet/push | Retrieve the UID transfer history. +[**list_currency_chains**](WalletApi.md#list_currency_chains) | **GET** /wallet/currency_chains | Query chains supported for specified currency +[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address +[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Get withdrawal records +[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Get deposit records +[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between trading accounts +[**list_sub_account_transfers**](WalletApi.md#list_sub_account_transfers) | **GET** /wallet/sub_account_transfers | Get transfer records between main and sub accounts +[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts +[**sub_account_to_sub_account**](WalletApi.md#sub_account_to_sub_account) | **POST** /wallet/sub_account_to_sub_account | Transfer between sub-accounts +[**get_transfer_order_status**](WalletApi.md#get_transfer_order_status) | **GET** /wallet/order_status | Transfer status query +[**list_withdraw_status**](WalletApi.md#list_withdraw_status) | **GET** /wallet/withdraw_status | Query withdrawal status +[**list_sub_account_balances**](WalletApi.md#list_sub_account_balances) | **GET** /wallet/sub_account_balances | Query sub-account balance information +[**list_sub_account_margin_balances**](WalletApi.md#list_sub_account_margin_balances) | **GET** /wallet/sub_account_margin_balances | Query sub-account isolated margin account balance information +[**list_sub_account_futures_balances**](WalletApi.md#list_sub_account_futures_balances) | **GET** /wallet/sub_account_futures_balances | Query sub-account perpetual futures account balance information +[**list_sub_account_cross_margin_balances**](WalletApi.md#list_sub_account_cross_margin_balances) | **GET** /wallet/sub_account_cross_margin_balances | Query sub-account cross margin account balance information +[**list_saved_address**](WalletApi.md#list_saved_address) | **GET** /wallet/saved_address | Query withdrawal address whitelist +[**get_trade_fee**](WalletApi.md#get_trade_fee) | **GET** /wallet/fee | Query personal trading fees +[**get_total_balance**](WalletApi.md#get_total_balance) | **GET** /wallet/total_balance | Query personal account totals +[**list_small_balance**](WalletApi.md#list_small_balance) | **GET** /wallet/small_balance | Get list of convertible small balance currencies +[**convert_small_balance**](WalletApi.md#convert_small_balance) | **POST** /wallet/small_balance | Convert small balance currency +[**list_small_balance_history**](WalletApi.md#list_small_balance_history) | **GET** /wallet/small_balance_history | Get convertible small balance currency history +[**list_push_orders**](WalletApi.md#list_push_orders) | **GET** /wallet/push | Get UID transfer history # **list_currency_chains** > list[CurrencyChain] list_currency_chains(currency) -List chains supported for specified currency. +Query chains supported for specified currency ### Example @@ -47,10 +47,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'GT' # str | Currency name. +currency = 'GT' # str | Currency name try: - # List chains supported for specified currency. + # Query chains supported for specified currency api_response = api_instance.list_currency_chains(currency) print(api_response) except GateApiException as ex: @@ -63,7 +63,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name. | + **currency** | **str**| Currency name | ### Return type @@ -81,14 +81,14 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_deposit_address** > DepositAddress get_deposit_address(currency) -Generate currency deposit address. +Generate currency deposit address ### Example @@ -114,10 +114,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'USDT' # str | Currency name. +currency = 'USDT' # str | Currency name try: - # Generate currency deposit address. + # Generate currency deposit address api_response = api_instance.get_deposit_address(currency) print(api_response) except GateApiException as ex: @@ -130,7 +130,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency name. | + **currency** | **str**| Currency name | ### Return type @@ -148,16 +148,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Address successfully generated. | - | +**200** | Address successfully generated | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_withdrawals** > list[WithdrawalRecord] list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset) -Retrieve withdrawal records. +Get withdrawal records -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -183,17 +183,17 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) -withdraw_id = 'withdraw_id_example' # str | The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time (optional) -asset_class = 'asset_class_example' # str | The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone (optional) -withdraw_order_id = 'withdraw_order_id_example' # str | User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) -to = 1602123600 # int | Time range ending, default to current time. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional) +withdraw_id = 'withdraw_id_example' # str | Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled (optional) +asset_class = 'asset_class_example' # str | Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone (optional) +withdraw_order_id = 'withdraw_order_id_example' # str | User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried (optional) +_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) +to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # Retrieve withdrawal records. + # Get withdrawal records api_response = api_instance.list_withdrawals(currency=currency, withdraw_id=withdraw_id, asset_class=asset_class, withdraw_order_id=withdraw_order_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -206,14 +206,14 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] - **withdraw_id** | **str**| The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time | [optional] - **asset_class** | **str**| The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] - **withdraw_order_id** | **str**| User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional] + **withdraw_id** | **str**| Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled | [optional] + **asset_class** | **str**| Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] + **withdraw_order_id** | **str**| User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] + **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -231,16 +231,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_deposits** > list[DepositRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) -Retrieve deposit records. +Get deposit records -Record time range cannot exceed 30 days. +Record query time range cannot exceed 30 days ### Example @@ -266,14 +266,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Filter by currency. Return all currency records if not specified. (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) -to = 1602123600 # int | Time range ending, default to current time. (optional) -limit = 100 # int | The maximum number of entries returned in the list is limited to 500 transactions. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional) +_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) +to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) +limit = 100 # int | Maximum number of entries returned in the list, limited to 500 transactions (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # Retrieve deposit records. + # Get deposit records api_response = api_instance.list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -286,11 +286,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Filter by currency. Return all currency records if not specified. | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **limit** | **int**| The maximum number of entries returned in the list is limited to 500 transactions. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional] + **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **limit** | **int**| Maximum number of entries returned in the list, limited to 500 transactions | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -308,16 +308,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **transfer** > TransactionID transfer(transfer) -Transfer between trading accounts. +Transfer between trading accounts -Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. options +Balance transfers between personal trading accounts. Currently supports the following transfer operations: 1. Spot account - Margin account 2. Spot account - Perpetual futures account 3. Spot account - Delivery futures account 4. Spot account - Options account ### Example @@ -346,7 +346,7 @@ api_instance = gate_api.WalletApi(api_client) transfer = gate_api.Transfer() # Transfer | try: - # Transfer between trading accounts. + # Transfer between trading accounts api_response = api_instance.transfer(transfer) print(api_response) except GateApiException as ex: @@ -377,16 +377,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Balance transferred. | - | +**200** | Transfer operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_transfers** > list[SubAccountTransferRecordItem] list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) -Retrieve transfer records between main and sub accounts. +Get transfer records between main and sub accounts -Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved +Record query time range cannot exceed 30 days > Note: Only records after 2020-04-10 can be retrieved ### Example @@ -412,14 +412,14 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) -_from = 1602120000 # int | Time range beginning, default to 7 days before current time. (optional) -to = 1602123600 # int | Time range ending, default to current time. (optional) -limit = 100 # int | Maximum number of records to be returned in a single list. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) +sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional) +_from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) +to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) +limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: - # Retrieve transfer records between main and sub accounts. + # Get transfer records between main and sub accounts api_response = api_instance.list_sub_account_transfers(sub_uid=sub_uid, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: @@ -432,11 +432,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - **_from** | **int**| Time range beginning, default to 7 days before current time. | [optional] - **to** | **int**| Time range ending, default to current time. | [optional] - **limit** | **int**| Maximum number of records to be returned in a single list. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] + **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] + **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] + **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] + **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] ### Return type @@ -454,16 +454,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **transfer_with_sub_account** > TransactionID transfer_with_sub_account(sub_account_transfer) -Transfer between main and sub accounts. +Transfer between main and sub accounts -Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. +Supports transfers to/from sub-account's spot or futures accounts. Note that regardless of which sub-account is operated, only the main account's spot account is used ### Example @@ -492,7 +492,7 @@ api_instance = gate_api.WalletApi(api_client) sub_account_transfer = gate_api.SubAccountTransfer() # SubAccountTransfer | try: - # Transfer between main and sub accounts. + # Transfer between main and sub accounts api_response = api_instance.transfer_with_sub_account(sub_account_transfer) print(api_response) except GateApiException as ex: @@ -523,16 +523,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Balance transferred. | - | +**200** | Transfer operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **sub_account_to_sub_account** > TransactionID sub_account_to_sub_account(sub_account_to_sub_account) -Sub-account transfers to sub-account. +Transfer between sub-accounts -It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account sub-account to initiate the transfer. +Supports balance transfers between two sub-accounts under the same main account. You can use either the main account's API Key or the source sub-account's API Key to perform the operation ### Example @@ -561,7 +561,7 @@ api_instance = gate_api.WalletApi(api_client) sub_account_to_sub_account = gate_api.SubAccountToSubAccount() # SubAccountToSubAccount | try: - # Sub-account transfers to sub-account. + # Transfer between sub-accounts api_response = api_instance.sub_account_to_sub_account(sub_account_to_sub_account) print(api_response) except GateApiException as ex: @@ -592,16 +592,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Balance transferred. | - | +**200** | Transfer operation successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_transfer_order_status** > TransferOrderStatus get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) -Transfer status query. +Transfer status query -Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface +Supports querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface ### Example @@ -627,11 +627,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -client_order_id = 'da3ce7a088c8b0372b741419c7829033' # str | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. (optional) -tx_id = '59636381286' # str | The transfer operation number and client_order_id cannot be empty at the same time (optional) +client_order_id = 'da3ce7a088c8b0372b741419c7829033' # str | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters (optional) +tx_id = '59636381286' # str | Transfer operation number, cannot be empty at the same time as client_order_id (optional) try: - # Transfer status query. + # Transfer status query api_response = api_instance.get_transfer_order_status(client_order_id=client_order_id, tx_id=tx_id) print(api_response) except GateApiException as ex: @@ -644,8 +644,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **client_order_id** | **str**| The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. | [optional] - **tx_id** | **str**| The transfer operation number and client_order_id cannot be empty at the same time | [optional] + **client_order_id** | **str**| Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters | [optional] + **tx_id** | **str**| Transfer operation number, cannot be empty at the same time as client_order_id | [optional] ### Return type @@ -663,14 +663,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Transfer status obtained successfully. | - | +**200** | Transfer status retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_withdraw_status** > list[WithdrawStatus] list_withdraw_status(currency=currency) -Retrieve withdrawal status. +Query withdrawal status ### Example @@ -696,10 +696,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'BTC' # str | Retrieve data of the specified currency. (optional) +currency = 'BTC' # str | Query by specified currency name (optional) try: - # Retrieve withdrawal status. + # Query withdrawal status api_response = api_instance.list_withdraw_status(currency=currency) print(api_response) except GateApiException as ex: @@ -712,7 +712,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Retrieve data of the specified currency. | [optional] + **currency** | **str**| Query by specified currency name | [optional] ### Return type @@ -730,14 +730,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_balances** > list[SubAccountBalance] list_sub_account_balances(sub_uid=sub_uid) -Retrieve sub account balances. +Query sub-account balance information ### Example @@ -763,10 +763,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) +sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional) try: - # Retrieve sub account balances. + # Query sub-account balance information api_response = api_instance.list_sub_account_balances(sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -779,7 +779,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] ### Return type @@ -797,14 +797,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_margin_balances** > list[SubAccountMarginBalance] list_sub_account_margin_balances(sub_uid=sub_uid) -Query sub accounts' margin balances. +Query sub-account isolated margin account balance information ### Example @@ -830,10 +830,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) +sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional) try: - # Query sub accounts' margin balances. + # Query sub-account isolated margin account balance information api_response = api_instance.list_sub_account_margin_balances(sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -846,7 +846,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] ### Return type @@ -864,14 +864,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_futures_balances** > list[SubAccountFuturesBalance] list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) -Query sub accounts' futures account balances. +Query sub-account perpetual futures account balance information ### Example @@ -897,11 +897,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) -settle = 'usdt' # str | Query only balances of specified settle currency. (optional) +sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional) +settle = 'usdt' # str | Query balance of specified settlement currency (optional) try: - # Query sub accounts' futures account balances. + # Query sub-account perpetual futures account balance information api_response = api_instance.list_sub_account_futures_balances(sub_uid=sub_uid, settle=settle) print(api_response) except GateApiException as ex: @@ -914,8 +914,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] - **settle** | **str**| Query only balances of specified settle currency. | [optional] + **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] + **settle** | **str**| Query balance of specified settlement currency | [optional] ### Return type @@ -933,14 +933,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_sub_account_cross_margin_balances** > list[SubAccountCrossMarginBalance] list_sub_account_cross_margin_balances(sub_uid=sub_uid) -Query subaccount's cross_margin account info. +Query sub-account cross margin account balance information ### Example @@ -966,10 +966,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -sub_uid = '10003' # str | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts (optional) +sub_uid = '10003' # str | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts (optional) try: - # Query subaccount's cross_margin account info. + # Query sub-account cross margin account balance information api_response = api_instance.list_sub_account_cross_margin_balances(sub_uid=sub_uid) print(api_response) except GateApiException as ex: @@ -982,7 +982,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sub_uid** | **str**| User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts | [optional] + **sub_uid** | **str**| Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] ### Return type @@ -1000,14 +1000,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_saved_address** > list[SavedAddress] list_saved_address(currency, chain=chain, limit=limit, page=page) -Query saved address. +Query withdrawal address whitelist ### Example @@ -1033,13 +1033,13 @@ 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. -chain = '' # str | Chain name. (optional) (default to '') -limit = '50' # str | Maximum number returned, 100 at most. (optional) (default to '50') -page = 1 # int | Page number. (optional) (default to 1) +currency = 'USDT' # str | Currency +chain = '' # str | Chain name (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 saved address. + # Query withdrawal address whitelist api_response = api_instance.list_saved_address(currency, chain=chain, limit=limit, page=page) print(api_response) except GateApiException as ex: @@ -1052,10 +1052,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | - **chain** | **str**| Chain name. | [optional] [default to ''] - **limit** | **str**| Maximum number returned, 100 at most. | [optional] [default to '50'] - **page** | **int**| Page number. | [optional] [default to 1] + **currency** | **str**| Currency | + **chain** | **str**| Chain name | [optional] [default to ''] + **limit** | **str**| Maximum number returned, up to 100 | [optional] [default to '50'] + **page** | **int**| Page number | [optional] [default to 1] ### Return type @@ -1073,14 +1073,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List retrieved. | - | +**200** | List retrieved successfully | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_trade_fee** > TradeFee get_trade_fee(currency_pair=currency_pair, settle=settle) -Retrieve personal trading fee. +Query personal trading fees ### Example @@ -1106,11 +1106,11 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency_pair = 'BTC_USDT' # str | Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs (optional) -settle = 'BTC' # str | Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. (optional) +currency_pair = 'BTC_USDT' # str | Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. (optional) +settle = 'BTC' # str | Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same. (optional) try: - # Retrieve personal trading fee. + # Query personal trading fees api_response = api_instance.get_trade_fee(currency_pair=currency_pair, settle=settle) print(api_response) except GateApiException as ex: @@ -1123,8 +1123,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency_pair** | **str**| Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs | [optional] - **settle** | **str**| Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. | [optional] + **currency_pair** | **str**| Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. | [optional] + **settle** | **str**| Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same. | [optional] ### Return type @@ -1142,16 +1142,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved. | - | +**200** | Query successful | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_total_balance** > TotalBalance get_total_balance(currency=currency) -Retrieve user's total balances. +Query personal account totals -This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` /futures/{settle}/accounts` to query futures account balance +This query endpoint returns the total *estimated value* of all currencies in each account converted to the input currency. Exchange rates and related account balance information may be cached for up to 1 minute. It is not recommended to use this interface data for real-time calculations. For real-time calculations, query the corresponding balance interface based on account type, such as: - `GET /spot/accounts` to query spot account - `GET /margin/accounts` to query margin account - `GET /futures/{settle}/accounts` to query futures account ### Example @@ -1177,10 +1177,10 @@ configuration = gate_api.Configuration( api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.WalletApi(api_client) -currency = 'USDT' # str | Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. (optional) (default to 'USDT') +currency = 'USDT' # str | Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value (optional) (default to 'USDT') try: - # Retrieve user's total balances. + # Query personal account totals api_response = api_instance.get_total_balance(currency=currency) print(api_response) except GateApiException as ex: @@ -1193,7 +1193,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. | [optional] [default to 'USDT'] + **currency** | **str**| Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value | [optional] [default to 'USDT'] ### Return type @@ -1211,14 +1211,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Request is valid and is successfully responded. | - | +**200** | Request is valid and successfully returned | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_small_balance** > list[SmallBalance] list_small_balance() -List small balance. +Get list of convertible small balance currencies ### Example @@ -1246,7 +1246,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.WalletApi(api_client) try: - # List small balance. + # Get list of convertible small balance currencies api_response = api_instance.list_small_balance() print(api_response) except GateApiException as ex: @@ -1274,14 +1274,14 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **convert_small_balance** > convert_small_balance(convert_small_balance) -Convert small balance. +Convert small balance currency ### Example @@ -1310,7 +1310,7 @@ api_instance = gate_api.WalletApi(api_client) convert_small_balance = gate_api.ConvertSmallBalance() # ConvertSmallBalance | try: - # Convert small balance. + # Convert small balance currency api_instance.convert_small_balance(convert_small_balance) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1340,14 +1340,14 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_small_balance_history** > list[SmallBalanceHistory] list_small_balance_history(currency=currency, page=page, limit=limit) -List small balance history. +Get convertible small balance currency history ### Example @@ -1373,12 +1373,12 @@ 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 = 'currency_example' # str | Currency. (optional) -page = 1 # int | Page number. (optional) (default to 1) -limit = 100 # int | Maximum response items. Default: 100, minimum: 1, Maximum: 100. (optional) (default to 100) +currency = 'currency_example' # str | Currency to convert (optional) +page = 1 # int | Page number (optional) (default to 1) +limit = 100 # int | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 (optional) (default to 100) try: - # List small balance history. + # Get convertible small balance currency history api_response = api_instance.list_small_balance_history(currency=currency, page=page, limit=limit) print(api_response) except GateApiException as ex: @@ -1391,9 +1391,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **str**| Currency. | [optional] - **page** | **int**| Page number. | [optional] [default to 1] - **limit** | **int**| Maximum response items. Default: 100, minimum: 1, Maximum: 100. | [optional] [default to 100] + **currency** | **str**| Currency to convert | [optional] + **page** | **int**| Page number | [optional] [default to 1] + **limit** | **int**| Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] ### Return type @@ -1411,14 +1411,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_push_orders** > list[UidPushOrder] list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) -Retrieve the UID transfer history. +Get UID transfer history ### Example @@ -1444,15 +1444,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) -id = 56 # int | Order ID. (optional) -_from = 56 # int | The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp (optional) -to = 56 # int | The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. (optional) -limit = 100 # int | The maximum number of items returned in the list, the default value is 100. (optional) (default to 100) -offset = 0 # int | List offset, starting from 0. (optional) (default to 0) -transaction_type = 'withdraw' # str | The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. (optional) (default to 'withdraw') +id = 56 # int | Order ID (optional) +_from = 56 # int | Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds (optional) +to = 56 # int | End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds (optional) +limit = 100 # int | Maximum number of items returned in the list, default value is 100 (optional) (default to 100) +offset = 0 # int | List offset, starting from 0 (optional) (default to 0) +transaction_type = 'withdraw' # str | Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`. (optional) (default to 'withdraw') try: - # Retrieve the UID transfer history. + # Get UID transfer history api_response = api_instance.list_push_orders(id=id, _from=_from, to=to, limit=limit, offset=offset, transaction_type=transaction_type) print(api_response) except GateApiException as ex: @@ -1465,12 +1465,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| Order ID. | [optional] - **_from** | **int**| The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp | [optional] - **to** | **int**| The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. | [optional] - **limit** | **int**| The maximum number of items returned in the list, the default value is 100. | [optional] [default to 100] - **offset** | **int**| List offset, starting from 0. | [optional] [default to 0] - **transaction_type** | **str**| The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. | [optional] [default to 'withdraw'] + **id** | **int**| Order ID | [optional] + **_from** | **int**| Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds | [optional] + **to** | **int**| End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds | [optional] + **limit** | **int**| Maximum number of items returned in the list, default value is 100 | [optional] [default to 100] + **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] + **transaction_type** | **str**| Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`. | [optional] [default to 'withdraw'] ### Return type @@ -1488,7 +1488,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success. | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/WithdrawStatus.md b/docs/WithdrawStatus.md index 50ae2ab..38ade7b 100644 --- a/docs/WithdrawStatus.md +++ b/docs/WithdrawStatus.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currency** | **str** | Currency. | [optional] -**name** | **str** | Currency name. | [optional] -**name_cn** | **str** | Currency Chinese name. | [optional] -**deposit** | **str** | Deposits fee. | [optional] -**withdraw_percent** | **str** | Withdrawal fee rate percentage. | [optional] -**withdraw_fix** | **str** | Fixed withdrawal fee. | [optional] -**withdraw_day_limit** | **str** | Daily allowed withdrawal amount. | [optional] -**withdraw_amount_mini** | **str** | Minimum withdrawal amount. | [optional] -**withdraw_day_limit_remain** | **str** | Daily withdrawal amount left. | [optional] -**withdraw_eachtime_limit** | **str** | Maximum amount for each withdrawal. | [optional] -**withdraw_fix_on_chains** | **dict(str, str)** | Fixed withdrawal fee on multiple chains. | [optional] -**withdraw_percent_on_chains** | **dict(str, str)** | Percentage withdrawal fee on multiple chains. | [optional] +**currency** | **str** | Currency | [optional] +**name** | **str** | Currency name | [optional] +**name_cn** | **str** | Currency Chinese name | [optional] +**deposit** | **str** | Deposit fee | [optional] +**withdraw_percent** | **str** | Withdrawal fee rate percentage | [optional] +**withdraw_fix** | **str** | Fixed withdrawal fee | [optional] +**withdraw_day_limit** | **str** | Daily allowed withdrawal amount | [optional] +**withdraw_amount_mini** | **str** | Minimum withdrawal amount | [optional] +**withdraw_day_limit_remain** | **str** | Daily withdrawal amount left | [optional] +**withdraw_eachtime_limit** | **str** | Maximum amount for each withdrawal | [optional] +**withdraw_fix_on_chains** | **dict(str, str)** | Fixed withdrawal fee on multiple chains | [optional] +**withdraw_percent_on_chains** | **dict(str, str)** | Percentage withdrawal fee on multiple chains | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WithdrawalApi.md b/docs/WithdrawalApi.md index 33fb990..1c49178 100644 --- a/docs/WithdrawalApi.md +++ b/docs/WithdrawalApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw. -[**withdraw_push_order**](WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer. -[**cancel_withdrawal**](WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID. +[**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw +[**withdraw_push_order**](WithdrawalApi.md#withdraw_push_order) | **POST** /withdrawals/push | UID transfer +[**cancel_withdrawal**](WithdrawalApi.md#cancel_withdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID # **withdraw** > LedgerRecord withdraw(ledger_record) -Withdraw. +Withdraw -Withdrawals to Gate addresses do not incur transaction fees. +If the recipient's on-chain address is also Gate, no transaction fee will be charged ### Example @@ -43,7 +43,7 @@ api_instance = gate_api.WithdrawalApi(api_client) ledger_record = gate_api.LedgerRecord() # LedgerRecord | try: - # Withdraw. + # Withdraw api_response = api_instance.withdraw(ledger_record) print(api_response) except GateApiException as ex: @@ -74,16 +74,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Withdraw request is accepted. Refer to withdrawal records for status. | - | +**200** | Withdrawal request accepted. Check withdrawal record status for processing result | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **withdraw_push_order** > UidPushWithdrawalResp withdraw_push_order(uid_push_withdrawal) -UID transfer. +UID transfer -Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts +Transfers between main spot accounts. Both parties cannot be sub-accounts ### Example @@ -112,7 +112,7 @@ api_instance = gate_api.WithdrawalApi(api_client) uid_push_withdrawal = gate_api.UidPushWithdrawal() # UidPushWithdrawal | try: - # UID transfer. + # UID transfer api_response = api_instance.withdraw_push_order(uid_push_withdrawal) print(api_response) except GateApiException as ex: @@ -143,14 +143,14 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The request has been accepted. Check the withdrawal record status for the processing result. | - | +**200** | Request accepted. Check withdrawal record status for processing result | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **cancel_withdrawal** > LedgerRecord cancel_withdrawal(withdrawal_id) -Cancel withdrawal with specified ID. +Cancel withdrawal with specified ID ### Example @@ -179,7 +179,7 @@ api_instance = gate_api.WithdrawalApi(api_client) withdrawal_id = '210496' # str | try: - # Cancel withdrawal with specified ID. + # Cancel withdrawal with specified ID api_response = api_instance.cancel_withdrawal(withdrawal_id) print(api_response) except GateApiException as ex: @@ -210,7 +210,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**202** | Cancellation accepted. Refer to record status for the cancellation result. | - | +**202** | Cancellation request accepted. Check record status for cancellation result | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md index bb88a26..9cb30af 100644 --- a/docs/WithdrawalRecord.md +++ b/docs/WithdrawalRecord.md @@ -3,20 +3,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Record ID. | [optional] [readonly] -**txid** | **str** | Hash record of the withdrawal. | [optional] [readonly] -**block_number** | **str** | Block Number. | [optional] [readonly] +**id** | **str** | Record ID | [optional] [readonly] +**txid** | **str** | Hash record of the withdrawal | [optional] [readonly] +**block_number** | **str** | Block Number | [optional] [readonly] **withdraw_order_id** | **str** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] -**timestamp** | **str** | Operation time. | [optional] [readonly] -**amount** | **str** | Currency amount. | -**fee** | **str** | fee. | [optional] [readonly] -**currency** | **str** | Currency name. | -**address** | **str** | Withdrawal address. | [optional] -**fail_reason** | **str** | The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty | [optional] -**timestamp2** | **str** | The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the | [optional] -**memo** | **str** | Additional remarks with regards to the withdrawal. | [optional] +**timestamp** | **str** | Operation time | [optional] [readonly] +**amount** | **str** | Token amount | +**fee** | **str** | fee | [optional] [readonly] +**currency** | **str** | Currency name | +**address** | **str** | Withdrawal address | [optional] +**fail_reason** | **str** | Reason for withdrawal failure. Has a value when status = CANCEL, empty for all other statuses | [optional] +**timestamp2** | **str** | Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE and block_number > 0, it is the withdrawal success time | [optional] +**memo** | **str** | Additional remarks with regards to the withdrawal | [optional] **status** | **str** | Transaction status - DONE: Completed (block_number > 0 is considered to be truly completed) - CANCEL: Canceled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: Recharge code operation - EXTPEND: Sent awaiting confirmation - FAIL: Failure on the chain awaiting confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: pending manual review - REVIEW: Under review | [optional] [readonly] -**chain** | **str** | Name of the chain used in withdrawals. | +**chain** | **str** | Name of the chain used in withdrawals | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gate_api/__init__.py b/gate_api/__init__.py index da366ea..74a5f6b 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -5,7 +5,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.103.0" +__version__ = "6.104.3" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi diff --git a/gate_api/api/account_api.py b/gate_api/api/account_api.py index c6a5f87..5f381d6 100644 --- a/gate_api/api/account_api.py +++ b/gate_api/api/account_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def get_account_detail(self, **kwargs): # noqa: E501 - """Get account detail. # noqa: E501 + """Retrieve user account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def get_account_detail(self, **kwargs): # noqa: E501 return self.get_account_detail_with_http_info(**kwargs) # noqa: E501 def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 - """Get account detail. # noqa: E501 + """Retrieve user account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_account_rate_limit(self, **kwargs): # noqa: E501 - """Get user transaction rate limit information. # noqa: E501 + """Get user transaction rate limit information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -163,7 +163,7 @@ def get_account_rate_limit(self, **kwargs): # noqa: E501 return self.get_account_rate_limit_with_http_info(**kwargs) # noqa: E501 def get_account_rate_limit_with_http_info(self, **kwargs): # noqa: E501 - """Get user transaction rate limit information. # noqa: E501 + """Get user transaction rate limit information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -243,16 +243,16 @@ def get_account_rate_limit_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_stp_groups(self, **kwargs): # noqa: E501 - """List STP Groups. # noqa: E501 + """Query STP user groups created by the user # noqa: E501 - Retrieve the list of STP groups created by the main account user only. # noqa: E501 + Only query STP user groups created by the current main account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str name: Perform a fuzzy search based on the name. + :param str name: Fuzzy search by name :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -268,16 +268,16 @@ def list_stp_groups(self, **kwargs): # noqa: E501 return self.list_stp_groups_with_http_info(**kwargs) # noqa: E501 def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501 - """List STP Groups. # noqa: E501 + """Query STP user groups created by the user # noqa: E501 - Retrieve the list of STP groups created by the main account user only. # noqa: E501 + Only query STP user groups created by the current main account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str name: Perform a fuzzy search based on the name. + :param str name: Fuzzy search by name :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -353,9 +353,9 @@ def list_stp_groups_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_stp_group(self, stp_group, **kwargs): # noqa: E501 - """Create STP Group. # noqa: E501 + """Create STP user group # noqa: E501 - Only the main account is allowed to create a new STP user group. # noqa: E501 + Only the main account is allowed to create a new STP user group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_stp_group(stp_group, async_req=True) @@ -378,9 +378,9 @@ def create_stp_group(self, stp_group, **kwargs): # noqa: E501 return self.create_stp_group_with_http_info(stp_group, **kwargs) # noqa: E501 def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501 - """Create STP Group. # noqa: E501 + """Create STP user group # noqa: E501 - Only the main account is allowed to create a new STP user group. # noqa: E501 + Only the main account is allowed to create a new STP user group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_stp_group_with_http_info(stp_group, async_req=True) @@ -471,16 +471,16 @@ def create_stp_group_with_http_info(self, stp_group, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 - """List users of the STP group. # noqa: E501 + """Query users in the STP user group # noqa: E501 - Only the main account that created this STP group can query the account. # noqa: E501 + Only the main account that created this STP group can query the account ID list in the current STP group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_users(stp_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID. (required) + :param int stp_id: STP Group ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -496,16 +496,16 @@ def list_stp_groups_users(self, stp_id, **kwargs): # noqa: E501 return self.list_stp_groups_users_with_http_info(stp_id, **kwargs) # noqa: E501 def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501 - """List users of the STP group. # noqa: E501 + """Query users in the STP user group # noqa: E501 - Only the main account that created this STP group can query the account. # noqa: E501 + Only the main account that created this STP group can query the account ID list in the current STP group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stp_groups_users_with_http_info(stp_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID. (required) + :param int stp_id: STP Group 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 @@ -585,17 +585,17 @@ def list_stp_groups_users_with_http_info(self, stp_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501 - """Add users to the STP group. # noqa: E501 + """Add users to the STP user group # noqa: E501 - - Only the master account that created the STP user group is allowed to add users group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 + - Only the main account that created this STP group can add users to the STP user group - Only accounts under the current main account are allowed, cross-main account is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_stp_group_users(stp_id, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID. (required) - :param list[int] request_body: User ID. (required) + :param int stp_id: STP Group ID (required) + :param list[int] request_body: User ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -611,17 +611,17 @@ def add_stp_group_users(self, stp_id, request_body, **kwargs): # noqa: E501 return self.add_stp_group_users_with_http_info(stp_id, request_body, **kwargs) # noqa: E501 def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # noqa: E501 - """Add users to the STP group. # noqa: E501 + """Add users to the STP user group # noqa: E501 - - Only the master account that created the STP user group is allowed to add users group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted # noqa: E501 + - Only the main account that created this STP group can add users to the STP user group - Only accounts under the current main account are allowed, cross-main account is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_stp_group_users_with_http_info(stp_id, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID. (required) - :param list[int] request_body: User ID. (required) + :param int stp_id: STP Group ID (required) + :param list[int] request_body: User ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -712,7 +712,7 @@ def add_stp_group_users_with_http_info(self, stp_id, request_body, **kwargs): # collection_formats=collection_formats) def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 - """Delete the user in the STP group. # noqa: E501 + """Delete users from the STP user group # noqa: E501 - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -721,8 +721,8 @@ def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID. (required) - :param int user_id: STP user ID, multiple can be separated by commas. (required) + :param int stp_id: STP Group ID (required) + :param int user_id: STP user IDs, multiple IDs can be separated by commas (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -738,7 +738,7 @@ def delete_stp_group_users(self, stp_id, user_id, **kwargs): # noqa: E501 return self.delete_stp_group_users_with_http_info(stp_id, user_id, **kwargs) # noqa: E501 def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # noqa: E501 - """Delete the user in the STP group. # noqa: E501 + """Delete users from the STP user group # noqa: E501 - Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -747,8 +747,8 @@ def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int stp_id: STP Group ID. (required) - :param int user_id: STP user ID, multiple can be separated by commas. (required) + :param int stp_id: STP Group ID (required) + :param int user_id: STP user IDs, multiple IDs can be separated by commas (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -835,9 +835,9 @@ def delete_stp_group_users_with_http_info(self, stp_id, user_id, **kwargs): # n collection_formats=collection_formats) def get_debit_fee(self, **kwargs): # noqa: E501 - """Query GT deduction configuration. # noqa: E501 + """Query GT fee deduction configuration # noqa: E501 - Query the current GT deduction configuration for the account. # noqa: E501 + Query the GT fee deduction configuration for the current account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_debit_fee(async_req=True) @@ -859,9 +859,9 @@ def get_debit_fee(self, **kwargs): # noqa: E501 return self.get_debit_fee_with_http_info(**kwargs) # noqa: E501 def get_debit_fee_with_http_info(self, **kwargs): # noqa: E501 - """Query GT deduction configuration. # noqa: E501 + """Query GT fee deduction configuration # noqa: E501 - Query the current GT deduction configuration for the account. # noqa: E501 + Query the GT fee deduction configuration for the current account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_debit_fee_with_http_info(async_req=True) @@ -940,9 +940,9 @@ def get_debit_fee_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def set_debit_fee(self, debit_fee, **kwargs): # noqa: E501 - """Set GT deduction. # noqa: E501 + """Configure GT fee deduction # noqa: E501 - Enable or disable GT deduction for the current account. # noqa: E501 + Enable or disable GT fee deduction for the current account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_debit_fee(debit_fee, async_req=True) @@ -965,9 +965,9 @@ def set_debit_fee(self, debit_fee, **kwargs): # noqa: E501 return self.set_debit_fee_with_http_info(debit_fee, **kwargs) # noqa: E501 def set_debit_fee_with_http_info(self, debit_fee, **kwargs): # noqa: E501 - """Set GT deduction. # noqa: E501 + """Configure GT fee deduction # noqa: E501 - Enable or disable GT deduction for the current account. # noqa: E501 + Enable or disable GT fee deduction for the current account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_debit_fee_with_http_info(debit_fee, async_req=True) diff --git a/gate_api/api/collateral_loan_api.py b/gate_api/api/collateral_loan_api.py index 032f17b..a96b375 100644 --- a/gate_api/api/collateral_loan_api.py +++ b/gate_api/api/collateral_loan_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_collateral_loan_orders(self, **kwargs): # noqa: E501 - """List Orders. # noqa: E501 + """Query collateral loan order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,10 +45,10 @@ def list_collateral_loan_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param str collateral_currency: Collateral. - :param str borrow_currency: Borrowed currency. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param str collateral_currency: Collateral currency + :param str borrow_currency: Borrowed currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -64,7 +64,7 @@ def list_collateral_loan_orders(self, **kwargs): # noqa: E501 return self.list_collateral_loan_orders_with_http_info(**kwargs) # noqa: E501 def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 - """List Orders. # noqa: E501 + """Query collateral loan order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -72,10 +72,10 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param str collateral_currency: Collateral. - :param str borrow_currency: Borrowed currency. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param str collateral_currency: Collateral currency + :param str borrow_currency: Borrowed currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -166,7 +166,7 @@ def list_collateral_loan_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E501 - """Place order. # noqa: E501 + """Place collateral loan order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -190,7 +190,7 @@ def create_collateral_loan(self, create_collateral_order, **kwargs): # noqa: E5 return self.create_collateral_loan_with_http_info(create_collateral_order, **kwargs) # noqa: E501 def create_collateral_loan_with_http_info(self, create_collateral_order, **kwargs): # noqa: E501 - """Place order. # noqa: E501 + """Place collateral loan order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -282,7 +282,7 @@ def create_collateral_loan_with_http_info(self, create_collateral_order, **kwarg collection_formats=collection_formats) def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -290,7 +290,7 @@ def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation. (required) + :param int order_id: Order ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -306,7 +306,7 @@ def get_collateral_loan_order_detail(self, order_id, **kwargs): # noqa: E501 return self.get_collateral_loan_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -314,7 +314,7 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation. (required) + :param int order_id: Order ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -394,7 +394,7 @@ def get_collateral_loan_order_detail_with_http_info(self, order_id, **kwargs): collection_formats=collection_formats) def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501 - """Repayment. # noqa: E501 + """Collateral loan repayment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -418,7 +418,7 @@ def repay_collateral_loan(self, repay_loan, **kwargs): # noqa: E501 return self.repay_collateral_loan_with_http_info(repay_loan, **kwargs) # noqa: E501 def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E501 - """Repayment. # noqa: E501 + """Collateral loan repayment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -510,7 +510,7 @@ def repay_collateral_loan_with_http_info(self, repay_loan, **kwargs): # noqa: E collection_formats=collection_formats) def list_repay_records(self, source, **kwargs): # noqa: E501 - """Repayment history. # noqa: E501 + """Query collateral loan repayment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -518,13 +518,13 @@ def list_repay_records(self, source, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) - :param str borrow_currency: Borrowed currency. - :param str collateral_currency: Collateral. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. + :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral currency + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -540,7 +540,7 @@ def list_repay_records(self, source, **kwargs): # noqa: E501 return self.list_repay_records_with_http_info(source, **kwargs) # noqa: E501 def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 - """Repayment history. # noqa: E501 + """Query collateral loan repayment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -548,13 +548,13 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) - :param str borrow_currency: Borrowed currency. - :param str collateral_currency: Collateral. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. + :param str source: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral currency + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -658,7 +658,7 @@ def list_repay_records_with_http_info(self, source, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_collateral_records(self, **kwargs): # noqa: E501 - """Query collateral adjustment records. # noqa: E501 + """Query collateral adjustment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -666,12 +666,12 @@ def list_collateral_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str borrow_currency: Borrowed currency. - :param str collateral_currency: Collateral. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -687,7 +687,7 @@ def list_collateral_records(self, **kwargs): # noqa: E501 return self.list_collateral_records_with_http_info(**kwargs) # noqa: E501 def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 - """Query collateral adjustment records. # noqa: E501 + """Query collateral adjustment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -695,12 +695,12 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str borrow_currency: Borrowed currency. - :param str collateral_currency: Collateral. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str borrow_currency: Borrowed currency + :param str collateral_currency: Collateral currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -797,7 +797,7 @@ def list_collateral_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def operate_collateral(self, collateral_align, **kwargs): # noqa: E501 - """Increase or redeem collateral. # noqa: E501 + """Increase or redeem collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -821,7 +821,7 @@ def operate_collateral(self, collateral_align, **kwargs): # noqa: E501 return self.operate_collateral_with_http_info(collateral_align, **kwargs) # noqa: E501 def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa: E501 - """Increase or redeem collateral. # noqa: E501 + """Increase or redeem collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -909,7 +909,7 @@ def operate_collateral_with_http_info(self, collateral_align, **kwargs): # noqa collection_formats=collection_formats) def get_user_total_amount(self, **kwargs): # noqa: E501 - """Query the total borrowing and collateral amount for the user. # noqa: E501 + """Query user's total borrowing and collateral amount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -932,7 +932,7 @@ def get_user_total_amount(self, **kwargs): # noqa: E501 return self.get_user_total_amount_with_http_info(**kwargs) # noqa: E501 def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501 - """Query the total borrowing and collateral amount for the user. # noqa: E501 + """Query user's total borrowing and collateral amount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1012,7 +1012,7 @@ def get_user_total_amount_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 - """Query user's collateralization ratio. # noqa: E501 + """Query user's collateralization ratio and remaining borrowable currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1020,8 +1020,8 @@ def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str collateral_currency: Collateral. (required) - :param str borrow_currency: Borrowed currency. (required) + :param str collateral_currency: Collateral currency (required) + :param str borrow_currency: Borrowed currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1037,7 +1037,7 @@ def get_user_ltv_info(self, collateral_currency, borrow_currency, **kwargs): # return self.get_user_ltv_info_with_http_info(collateral_currency, borrow_currency, **kwargs) # noqa: E501 def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, **kwargs): # noqa: E501 - """Query user's collateralization ratio. # noqa: E501 + """Query user's collateralization ratio and remaining borrowable currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1045,8 +1045,8 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str collateral_currency: Collateral. (required) - :param str borrow_currency: Borrowed currency. (required) + :param str collateral_currency: Collateral currency (required) + :param str borrow_currency: Borrowed currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1133,7 +1133,7 @@ def get_user_ltv_info_with_http_info(self, collateral_currency, borrow_currency, collection_formats=collection_formats) def list_collateral_currencies(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies. # noqa: E501 + """Query supported borrowing and collateral currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1141,7 +1141,7 @@ def list_collateral_currencies(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. + :param str loan_currency: Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1157,7 +1157,7 @@ def list_collateral_currencies(self, **kwargs): # noqa: E501 return self.list_collateral_currencies_with_http_info(**kwargs) # noqa: E501 def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies. # noqa: E501 + """Query supported borrowing and collateral currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1165,7 +1165,7 @@ def list_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str loan_currency: The parameter loan_currency is used to specify the borrowing currency. If loan_currency is not provided, the API will return all supported borrowing currencies. + :param str loan_currency: Parameter loan_currency. If omitted, returns all supported borrowing currencies; if provided, returns the array of collateral currencies supported for that borrowing currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/delivery_api.py b/gate_api/api/delivery_api.py index 3ce1462..744e9e4 100644 --- a/gate_api/api/delivery_api.py +++ b/gate_api/api/delivery_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 - """List all futures contracts. # noqa: E501 + """Query all futures contracts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,7 +45,7 @@ def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -61,7 +61,7 @@ def list_delivery_contracts(self, settle, **kwargs): # noqa: E501 return self.list_delivery_contracts_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all futures contracts. # noqa: E501 + """Query all futures contracts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -69,7 +69,7 @@ def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -149,7 +149,7 @@ def list_delivery_contracts_with_http_info(self, settle, **kwargs): # noqa: E50 collection_formats=collection_formats) def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract. # noqa: E501 + """Query single contract information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -157,8 +157,8 @@ def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -174,7 +174,7 @@ def get_delivery_contract(self, settle, contract, **kwargs): # noqa: E501 return self.get_delivery_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract. # noqa: E501 + """Query single contract information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -182,8 +182,8 @@ def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -270,20 +270,20 @@ def get_delivery_contract_with_http_info(self, settle, contract, **kwargs): # n collection_formats=collection_formats) def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book. # noqa: E501 + """Query futures market depth information # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_order_book(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -299,20 +299,20 @@ def list_delivery_order_book(self, settle, contract, **kwargs): # noqa: E501 return self.list_delivery_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book. # noqa: E501 + """Query futures market depth information # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_order_book_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -412,7 +412,7 @@ def list_delivery_order_book_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history. # noqa: E501 + """Futures market transaction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -420,9 +420,9 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records returned in a single list :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time. @@ -441,7 +441,7 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 return self.list_delivery_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history. # noqa: E501 + """Futures market transaction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -449,9 +449,9 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records returned in a single list :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time. @@ -557,7 +557,7 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no collection_formats=collection_formats) def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks. # noqa: E501 + """Futures market K-line chart # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -566,12 +566,12 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -587,7 +587,7 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 return self.list_delivery_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks. # noqa: E501 + """Futures market K-line chart # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -596,12 +596,12 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -702,7 +702,7 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_delivery_tickers(self, settle, **kwargs): # noqa: E501 - """List futures tickers. # noqa: E501 + """Get all futures trading statistics # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -710,8 +710,8 @@ def list_delivery_tickers(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. + :param str settle: Settle currency (required) + :param str contract: Futures contract :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -727,7 +727,7 @@ def list_delivery_tickers(self, settle, **kwargs): # noqa: E501 return self.list_delivery_tickers_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List futures tickers. # noqa: E501 + """Get all futures trading statistics # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -735,8 +735,8 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. + :param str settle: Settle currency (required) + :param str contract: Futures contract :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -819,7 +819,7 @@ def list_delivery_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history. # noqa: E501 + """Futures market insurance fund history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -827,8 +827,8 @@ def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :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. @@ -844,7 +844,7 @@ def list_delivery_insurance_ledger(self, settle, **kwargs): # noqa: E501 return self.list_delivery_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history. # noqa: E501 + """Futures market insurance fund history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -852,8 +852,8 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :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 @@ -940,7 +940,7 @@ def list_delivery_insurance_ledger_with_http_info(self, settle, **kwargs): # no collection_formats=collection_formats) def list_delivery_accounts(self, settle, **kwargs): # noqa: E501 - """Query futures account. # noqa: E501 + """Get futures account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -948,7 +948,7 @@ def list_delivery_accounts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -964,7 +964,7 @@ def list_delivery_accounts(self, settle, **kwargs): # noqa: E501 return self.list_delivery_accounts_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query futures account. # noqa: E501 + """Get futures account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -972,7 +972,7 @@ def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1052,7 +1052,7 @@ def list_delivery_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 - """Query account book. # noqa: E501 + """Query futures account change history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1060,8 +1060,8 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate @@ -1080,7 +1080,7 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 return self.list_delivery_account_book_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query account book. # noqa: E501 + """Query futures account change history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1088,8 +1088,8 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate @@ -1188,7 +1188,7 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: collection_formats=collection_formats) def list_delivery_positions(self, settle, **kwargs): # noqa: E501 - """List all positions of a user. # noqa: E501 + """Get user position list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1196,7 +1196,7 @@ def list_delivery_positions(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1212,7 +1212,7 @@ def list_delivery_positions(self, settle, **kwargs): # noqa: E501 return self.list_delivery_positions_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all positions of a user. # noqa: E501 + """Get user position list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1220,7 +1220,7 @@ def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1300,7 +1300,7 @@ def list_delivery_positions_with_http_info(self, settle, **kwargs): # noqa: E50 collection_formats=collection_formats) def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 - """Get single position. # noqa: E501 + """Get single position information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1308,8 +1308,8 @@ def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1325,7 +1325,7 @@ def get_delivery_position(self, settle, contract, **kwargs): # noqa: E501 return self.get_delivery_position_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get single position. # noqa: E501 + """Get single position information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1333,8 +1333,8 @@ def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1421,7 +1421,7 @@ def get_delivery_position_with_http_info(self, settle, contract, **kwargs): # n collection_formats=collection_formats) def update_delivery_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin. # noqa: E501 + """Update position margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1429,9 +1429,9 @@ def update_delivery_position_margin(self, settle, contract, change, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str change: Margin change amount, positive number increases, negative number. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change amount, positive number increases, negative number decreases (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1447,7 +1447,7 @@ def update_delivery_position_margin(self, settle, contract, change, **kwargs): return self.update_delivery_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 def update_delivery_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin. # noqa: E501 + """Update position margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1455,9 +1455,9 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str change: Margin change amount, positive number increases, negative number. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change amount, positive number increases, negative number decreases (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1551,7 +1551,7 @@ def update_delivery_position_margin_with_http_info(self, settle, contract, chang collection_formats=collection_formats) def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage. # noqa: E501 + """Update position leverage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1559,9 +1559,9 @@ def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str leverage: New position leverage. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1577,7 +1577,7 @@ def update_delivery_position_leverage(self, settle, contract, leverage, **kwargs return self.update_delivery_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 def update_delivery_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage. # noqa: E501 + """Update position leverage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1585,9 +1585,9 @@ def update_delivery_position_leverage_with_http_info(self, settle, contract, lev >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str leverage: New position leverage. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1681,7 +1681,7 @@ def update_delivery_position_leverage_with_http_info(self, settle, contract, lev collection_formats=collection_formats) def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit. # noqa: E501 + """Update position risk limit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1689,9 +1689,9 @@ def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kw >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str risk_limit: New position risk limit. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New position risk limit (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1707,7 +1707,7 @@ def update_delivery_position_risk_limit(self, settle, contract, risk_limit, **kw return self.update_delivery_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 def update_delivery_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit. # noqa: E501 + """Update position risk limit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1715,9 +1715,9 @@ def update_delivery_position_risk_limit_with_http_info(self, settle, contract, r >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str risk_limit: New position risk limit. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New position risk limit (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1811,22 +1811,22 @@ def update_delivery_position_risk_limit_with_http_info(self, settle, contract, r collection_formats=collection_formats) def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 - """List futures orders. # noqa: E501 + """Query futures order list # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_orders(settle, status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return). + :param str settle: Settle currency (required) + :param str status: Query order list based on status (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1842,22 +1842,22 @@ def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 return self.list_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List futures orders. # noqa: E501 + """Query futures order list # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_orders_with_http_info(settle, status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return). + :param str settle: Settle currency (required) + :param str status: Query order list based on status (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1965,16 +1965,16 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa collection_formats=collection_formats) def create_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order. # noqa: E501 + """Place futures order # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_delivery_order(settle, futures_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param FuturesOrder futures_order: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1991,16 +1991,16 @@ def create_delivery_order(self, settle, futures_order, **kwargs): # noqa: E501 return self.create_delivery_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order. # noqa: E501 + """Place futures order # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_delivery_order_with_http_info(settle, futures_order, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param FuturesOrder futures_order: (required) :param _return_http_data_only: response data without head status code and headers @@ -2092,18 +2092,18 @@ def create_delivery_order_with_http_info(self, settle, futures_order, **kwargs): collection_formats=collection_formats) def cancel_delivery_orders(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched. # noqa: E501 + """Cancel all orders with 'open' status # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_delivery_orders(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str side: All bids or asks. Both included if not specified. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str side: Specify all bids or all asks, both included if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2119,18 +2119,18 @@ def cancel_delivery_orders(self, settle, contract, **kwargs): # noqa: E501 return self.cancel_delivery_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched. # noqa: E501 + """Cancel all orders with 'open' status # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_delivery_orders_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str side: All bids or asks. Both included if not specified. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str side: Specify all bids or all asks, both included if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2220,17 +2220,17 @@ def cancel_delivery_orders_with_http_info(self, settle, contract, **kwargs): # collection_formats=collection_formats) def get_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_delivery_order(settle, order_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2246,17 +2246,17 @@ def get_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 return self.get_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_delivery_order_with_http_info(settle, order_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2343,7 +2343,7 @@ def get_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa collection_formats=collection_formats) def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2351,8 +2351,8 @@ def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2368,7 +2368,7 @@ def cancel_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 return self.cancel_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2376,8 +2376,8 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2464,7 +2464,7 @@ def cancel_delivery_order_with_http_info(self, settle, order_id, **kwargs): # n collection_formats=collection_formats) def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2472,13 +2472,13 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int order: Futures order ID, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return). + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2494,7 +2494,7 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 return self.get_my_delivery_trades_with_http_info(settle, **kwargs) # noqa: E501 def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2502,13 +2502,13 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int order: Futures order ID, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param int count_total: Whether to return total number matched. Default to 0(no return). + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2612,7 +2612,7 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_delivery_position_close(self, settle, **kwargs): # noqa: E501 - """List position close history. # noqa: E501 + """Query position close history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2620,9 +2620,9 @@ def list_delivery_position_close(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :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. @@ -2638,7 +2638,7 @@ def list_delivery_position_close(self, settle, **kwargs): # noqa: E501 return self.list_delivery_position_close_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 - """List position close history. # noqa: E501 + """Query position close history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2646,9 +2646,9 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :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 @@ -2738,7 +2738,7 @@ def list_delivery_position_close_with_http_info(self, settle, **kwargs): # noqa collection_formats=collection_formats) def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501 - """List liquidation history. # noqa: E501 + """Query liquidation history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2746,10 +2746,10 @@ def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int at: Specify a liquidation timestamp. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int at: Specify liquidation timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2765,7 +2765,7 @@ def list_delivery_liquidates(self, settle, **kwargs): # noqa: E501 return self.list_delivery_liquidates_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 - """List liquidation history. # noqa: E501 + """Query liquidation history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2773,10 +2773,10 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int at: Specify a liquidation timestamp. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int at: Specify liquidation timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2869,7 +2869,7 @@ def list_delivery_liquidates_with_http_info(self, settle, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_delivery_settlements(self, settle, **kwargs): # noqa: E501 - """List settlement history. # noqa: E501 + """Query settlement records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2877,10 +2877,10 @@ def list_delivery_settlements(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int at: Specify a settlement timestamp. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int at: Specify settlement timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2896,7 +2896,7 @@ def list_delivery_settlements(self, settle, **kwargs): # noqa: E501 return self.list_delivery_settlements_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E501 - """List settlement history. # noqa: E501 + """Query settlement records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2904,10 +2904,10 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int at: Specify a settlement timestamp. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int at: Specify settlement timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3000,7 +3000,7 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E collection_formats=collection_formats) def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers. # noqa: E501 + """Query risk limit tiers # noqa: E501 When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3009,10 +3009,10 @@ def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3028,7 +3028,7 @@ def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 return self.list_delivery_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers. # noqa: E501 + """Query risk limit tiers # noqa: E501 When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3037,10 +3037,10 @@ def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3135,7 +3135,7 @@ def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # no collection_formats=collection_formats) def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders. # noqa: E501 + """Query auto order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3143,11 +3143,11 @@ def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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. @@ -3163,7 +3163,7 @@ def list_price_triggered_delivery_orders(self, settle, status, **kwargs): # noq return self.list_price_triggered_delivery_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_price_triggered_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders. # noqa: E501 + """Query auto order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3171,11 +3171,11 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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 @@ -3277,7 +3277,7 @@ def list_price_triggered_delivery_orders_with_http_info(self, settle, status, ** collection_formats=collection_formats) def create_price_triggered_delivery_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order. # noqa: E501 + """Create price-triggered order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3285,7 +3285,7 @@ def create_price_triggered_delivery_order(self, settle, futures_price_triggered_ >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :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 @@ -3302,7 +3302,7 @@ def create_price_triggered_delivery_order(self, settle, futures_price_triggered_ return self.create_price_triggered_delivery_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501 def create_price_triggered_delivery_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order. # noqa: E501 + """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 @@ -3310,7 +3310,7 @@ def create_price_triggered_delivery_order_with_http_info(self, settle, futures_p >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :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 @@ -3402,7 +3402,7 @@ def create_price_triggered_delivery_order_with_http_info(self, settle, futures_p collection_formats=collection_formats) def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders. # noqa: E501 + """Cancel all auto orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3410,8 +3410,8 @@ def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3427,7 +3427,7 @@ def cancel_price_triggered_delivery_order_list(self, settle, contract, **kwargs) return self.cancel_price_triggered_delivery_order_list_with_http_info(settle, contract, **kwargs) # noqa: E501 def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders. # noqa: E501 + """Cancel all auto orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3435,8 +3435,8 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3523,7 +3523,7 @@ def cancel_price_triggered_delivery_order_list_with_http_info(self, settle, cont collection_formats=collection_formats) def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order. # noqa: E501 + """Query single auto order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3531,8 +3531,8 @@ def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3548,7 +3548,7 @@ def get_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noq return self.get_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order. # noqa: E501 + """Query single auto order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3556,8 +3556,8 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3644,7 +3644,7 @@ def get_price_triggered_delivery_order_with_http_info(self, settle, order_id, ** collection_formats=collection_formats) def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order. # noqa: E501 + """Cancel single auto order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3652,8 +3652,8 @@ def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3669,7 +3669,7 @@ def cancel_price_triggered_delivery_order(self, settle, order_id, **kwargs): # return self.cancel_price_triggered_delivery_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order. # noqa: E501 + """Cancel single auto order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3677,8 +3677,8 @@ def cancel_price_triggered_delivery_order_with_http_info(self, settle, order_id, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index 1072c16..8f7b083 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 - """ETH2 swap. # noqa: E501 + """ETH2 swap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -61,7 +61,7 @@ def swap_eth2(self, eth2_swap, **kwargs): # noqa: E501 return self.swap_eth2_with_http_info(eth2_swap, **kwargs) # noqa: E501 def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 - """ETH2 swap. # noqa: E501 + """ETH2 swap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -149,9 +149,9 @@ def swap_eth2_with_http_info(self, eth2_swap, **kwargs): # noqa: E501 collection_formats=collection_formats) def rate_list_eth2(self, **kwargs): # noqa: E501 - """ETH2 historical rate of return query. # noqa: E501 + """ETH2 historical return rate query # noqa: E501 - Check the ETH earnings rate record for the last 31 days. # noqa: E501 + Query ETH earnings rate records for the last 31 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rate_list_eth2(async_req=True) @@ -173,9 +173,9 @@ def rate_list_eth2(self, **kwargs): # noqa: E501 return self.rate_list_eth2_with_http_info(**kwargs) # noqa: E501 def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 - """ETH2 historical rate of return query. # noqa: E501 + """ETH2 historical return rate query # noqa: E501 - Check the ETH earnings rate record for the last 31 days. # noqa: E501 + Query ETH earnings rate records for the last 31 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rate_list_eth2_with_http_info(async_req=True) @@ -254,7 +254,7 @@ def rate_list_eth2_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_dual_investment_plans(self, **kwargs): # noqa: E501 - """Dual Investment product list. # noqa: E501 + """Dual Investment product list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -262,7 +262,7 @@ def list_dual_investment_plans(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int plan_id: Financial project id. + :param int plan_id: Financial project ID :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -278,7 +278,7 @@ def list_dual_investment_plans(self, **kwargs): # noqa: E501 return self.list_dual_investment_plans_with_http_info(**kwargs) # noqa: E501 def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment product list. # noqa: E501 + """Dual Investment product list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -286,7 +286,7 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int plan_id: Financial project id. + :param int plan_id: Financial project ID :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -362,7 +362,7 @@ def list_dual_investment_plans_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_dual_orders(self, **kwargs): # noqa: E501 - """Dual Investment order list. # noqa: E501 + """Dual Investment order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -370,10 +370,10 @@ def list_dual_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start checkout time. - :param int to: End settlement time. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start settlement time + :param int to: End settlement time + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -389,7 +389,7 @@ def list_dual_orders(self, **kwargs): # noqa: E501 return self.list_dual_orders_with_http_info(**kwargs) # noqa: E501 def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 - """Dual Investment order list. # noqa: E501 + """Dual Investment order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -397,10 +397,10 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start checkout time. - :param int to: End settlement time. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param int _from: Start settlement time + :param int to: End settlement time + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -491,7 +491,7 @@ def list_dual_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def place_dual_order(self, place_dual_investment_order, **kwargs): # noqa: E501 - """Place Dual Investment order. # noqa: E501 + """Place Dual Investment order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -515,7 +515,7 @@ def place_dual_order(self, place_dual_investment_order, **kwargs): # noqa: E501 return self.place_dual_order_with_http_info(place_dual_investment_order, **kwargs) # noqa: E501 def place_dual_order_with_http_info(self, place_dual_investment_order, **kwargs): # noqa: E501 - """Place Dual Investment order. # noqa: E501 + """Place Dual Investment order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -603,7 +603,7 @@ def place_dual_order_with_http_info(self, place_dual_investment_order, **kwargs) collection_formats=collection_formats) def list_structured_products(self, status, **kwargs): # noqa: E501 - """Structured Product List. # noqa: E501 + """Structured Product List # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -613,8 +613,8 @@ def list_structured_products(self, status, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required) :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -630,7 +630,7 @@ def list_structured_products(self, status, **kwargs): # noqa: E501 return self.list_structured_products_with_http_info(status, **kwargs) # noqa: E501 def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E501 - """Structured Product List. # noqa: E501 + """Structured Product List # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -640,8 +640,8 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 :param bool async_req: execute request asynchronously :param str status: Status (Default empty to query all) `in_process`-In progress `will_begin`-Not started `wait_settlement`-Pending settlement `done`-Completed (required) :param str type: Product Type (Default empty to query all) `SharkFin2.0`-Shark Fin `BullishSharkFin`-Bullish Treasure `BearishSharkFin`-Bearish Treasure `DoubleNoTouch`-Volatility Treasure `RangeAccrual`-Range Smart Yield `SnowBall`-Snowball - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -736,7 +736,7 @@ def list_structured_products_with_http_info(self, status, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_structured_orders(self, **kwargs): # noqa: E501 - """Structured Product Order List. # noqa: E501 + """Structured Product Order List # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -746,8 +746,8 @@ def list_structured_orders(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -763,7 +763,7 @@ def list_structured_orders(self, **kwargs): # noqa: E501 return self.list_structured_orders_with_http_info(**kwargs) # noqa: E501 def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 - """Structured Product Order List. # noqa: E501 + """Structured Product Order List # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -773,8 +773,8 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -865,7 +865,7 @@ def list_structured_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order. # noqa: E501 + """Place Structured Product Order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -889,7 +889,7 @@ def place_structured_order(self, structured_buy, **kwargs): # noqa: E501 return self.place_structured_order_with_http_info(structured_buy, **kwargs) # noqa: E501 def place_structured_order_with_http_info(self, structured_buy, **kwargs): # noqa: E501 - """Place Structured Product Order. # noqa: E501 + """Place Structured Product Order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -977,7 +977,7 @@ def place_structured_order_with_http_info(self, structured_buy, **kwargs): # no collection_formats=collection_formats) def find_coin(self, find_coin, **kwargs): # noqa: E501 - """Staking Coins. # noqa: E501 + """Staking coins # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1001,7 +1001,7 @@ def find_coin(self, find_coin, **kwargs): # noqa: E501 return self.find_coin_with_http_info(find_coin, **kwargs) # noqa: E501 def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 - """Staking Coins. # noqa: E501 + """Staking coins # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1093,7 +1093,7 @@ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 collection_formats=collection_formats) def swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501 - """On-chain Token Swap for Earned Coins. # noqa: E501 + """On-chain token swap for earned coins # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1117,7 +1117,7 @@ def swap_staking_coin(self, swap_coin, **kwargs): # noqa: E501 return self.swap_staking_coin_with_http_info(swap_coin, **kwargs) # noqa: E501 def swap_staking_coin_with_http_info(self, swap_coin, **kwargs): # noqa: E501 - """On-chain Token Swap for Earned Coins. # noqa: E501 + """On-chain token swap for earned coins # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/earn_uni_api.py b/gate_api/api/earn_uni_api.py index 46acd1b..4d37fd4 100644 --- a/gate_api/api/earn_uni_api.py +++ b/gate_api/api/earn_uni_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_uni_currencies(self, **kwargs): # noqa: E501 - """List currencies for lending. # noqa: E501 + """Query lending currency list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def list_uni_currencies(self, **kwargs): # noqa: E501 return self.list_uni_currencies_with_http_info(**kwargs) # noqa: E501 def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List currencies for lending. # noqa: E501 + """Query lending currency list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def list_uni_currencies_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_currency(self, currency, **kwargs): # noqa: E501 - """Get currency detail for lending. # noqa: E501 + """Query single lending currency details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -148,7 +148,7 @@ def get_uni_currency(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -164,7 +164,7 @@ def get_uni_currency(self, currency, **kwargs): # noqa: E501 return self.get_uni_currency_with_http_info(currency, **kwargs) # noqa: E501 def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get currency detail for lending. # noqa: E501 + """Query single lending currency details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -172,7 +172,7 @@ def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -252,7 +252,7 @@ def get_uni_currency_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_user_uni_lends(self, **kwargs): # noqa: E501 - """List user's lending orders. # noqa: E501 + """Query user's lending order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -260,9 +260,9 @@ def list_user_uni_lends(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -278,7 +278,7 @@ def list_user_uni_lends(self, **kwargs): # noqa: E501 return self.list_user_uni_lends_with_http_info(**kwargs) # noqa: E501 def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 - """List user's lending orders. # noqa: E501 + """Query user's lending order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -286,9 +286,9 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -376,7 +376,7 @@ def list_user_uni_lends_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 - """Lend or redeem. # noqa: E501 + """Create lending or redemption # noqa: E501 Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -401,7 +401,7 @@ def create_uni_lend(self, create_uni_lend, **kwargs): # noqa: E501 return self.create_uni_lend_with_http_info(create_uni_lend, **kwargs) # noqa: E501 def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E501 - """Lend or redeem. # noqa: E501 + """Create lending or redemption # noqa: E501 Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -490,9 +490,9 @@ def create_uni_lend_with_http_info(self, create_uni_lend, **kwargs): # noqa: E5 collection_formats=collection_formats) def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501 - """Amend lending order. # noqa: E501 + """Amend user lending information # noqa: E501 - Currently only supports amending the minimum interest rate (hour). # noqa: E501 + Currently only supports amending minimum interest rate (hourly) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.change_uni_lend(patch_uni_lend, async_req=True) @@ -515,9 +515,9 @@ def change_uni_lend(self, patch_uni_lend, **kwargs): # noqa: E501 return self.change_uni_lend_with_http_info(patch_uni_lend, **kwargs) # noqa: E501 def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E501 - """Amend lending order. # noqa: E501 + """Amend user lending information # noqa: E501 - Currently only supports amending the minimum interest rate (hour). # noqa: E501 + Currently only supports amending minimum interest rate (hourly) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.change_uni_lend_with_http_info(patch_uni_lend, async_req=True) @@ -604,7 +604,7 @@ def change_uni_lend_with_http_info(self, patch_uni_lend, **kwargs): # noqa: E50 collection_formats=collection_formats) def list_uni_lend_records(self, **kwargs): # noqa: E501 - """List records of lending. # noqa: E501 + """Query lending transaction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -612,12 +612,12 @@ def list_uni_lend_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: type: lend - lend, redeem - redeem. + :param str type: Operation type: lend - Lend, redeem - Redeem :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -633,7 +633,7 @@ def list_uni_lend_records(self, **kwargs): # noqa: E501 return self.list_uni_lend_records_with_http_info(**kwargs) # noqa: E501 def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 - """List records of lending. # noqa: E501 + """Query lending transaction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -641,12 +641,12 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: type: lend - lend, redeem - redeem. + :param str type: Operation type: lend - Lend, redeem - Redeem :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -743,7 +743,7 @@ def list_uni_lend_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_interest(self, currency, **kwargs): # noqa: E501 - """Get the user's total interest income of specified currency. # noqa: E501 + """Query user's total interest income for specified currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -751,7 +751,7 @@ def get_uni_interest(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -767,7 +767,7 @@ def get_uni_interest(self, currency, **kwargs): # noqa: E501 return self.get_uni_interest_with_http_info(currency, **kwargs) # noqa: E501 def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the user's total interest income of specified currency. # noqa: E501 + """Query user's total interest income for specified currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -775,7 +775,7 @@ def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -855,7 +855,7 @@ def get_uni_interest_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_uni_interest_records(self, **kwargs): # noqa: E501 - """List interest records. # noqa: E501 + """Query user dividend records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -863,9 +863,9 @@ def list_uni_interest_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -883,7 +883,7 @@ def list_uni_interest_records(self, **kwargs): # noqa: E501 return self.list_uni_interest_records_with_http_info(**kwargs) # noqa: E501 def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records. # noqa: E501 + """Query user dividend records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -891,9 +891,9 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -989,7 +989,7 @@ def list_uni_interest_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 - """query currency interest compounding status. # noqa: E501 + """Query currency interest compounding status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -997,7 +997,7 @@ def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1013,7 +1013,7 @@ def get_uni_interest_status(self, currency, **kwargs): # noqa: E501 return self.get_uni_interest_status_with_http_info(currency, **kwargs) # noqa: E501 def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E501 - """query currency interest compounding status. # noqa: E501 + """Query currency interest compounding status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1021,7 +1021,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1101,7 +1101,7 @@ def get_uni_interest_status_with_http_info(self, currency, **kwargs): # noqa: E collection_formats=collection_formats) def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 - """UniLoan currency annualized trend chart. # noqa: E501 + """UniLoan currency annualized trend chart # noqa: E501 Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1110,9 +1110,9 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start timestamp, unit s, maximum span of 30 days. (required) - :param int to: End timestamp, unit s, maximum span of 30 days. (required) - :param str asset: Currency name. (required) + :param int _from: Start timestamp in seconds, maximum span 30 days (required) + :param int to: End timestamp in seconds, maximum span 30 days (required) + :param str asset: Currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1128,7 +1128,7 @@ def list_uni_chart(self, _from, to, asset, **kwargs): # noqa: E501 return self.list_uni_chart_with_http_info(_from, to, asset, **kwargs) # noqa: E501 def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E501 - """UniLoan currency annualized trend chart. # noqa: E501 + """UniLoan currency annualized trend chart # noqa: E501 Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1137,9 +1137,9 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int _from: Start timestamp, unit s, maximum span of 30 days. (required) - :param int to: End timestamp, unit s, maximum span of 30 days. (required) - :param str asset: Currency name. (required) + :param int _from: Start timestamp in seconds, maximum span 30 days (required) + :param int to: End timestamp in seconds, maximum span 30 days (required) + :param str asset: Currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1233,7 +1233,7 @@ def list_uni_chart_with_http_info(self, _from, to, asset, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_uni_rate(self, **kwargs): # noqa: E501 - """Currency estimate annualized interest rate. # noqa: E501 + """Currency estimated annualized interest rate # noqa: E501 Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1257,7 +1257,7 @@ def list_uni_rate(self, **kwargs): # noqa: E501 return self.list_uni_rate_with_http_info(**kwargs) # noqa: E501 def list_uni_rate_with_http_info(self, **kwargs): # noqa: E501 - """Currency estimate annualized interest rate. # noqa: E501 + """Currency estimated annualized interest rate # noqa: E501 Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME Language: en Language-Team: en Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 # noqa: E501 This method makes a synchronous HTTP request by default. To make an diff --git a/gate_api/api/flash_swap_api.py b/gate_api/api/flash_swap_api.py index 617f794..ffbba85 100644 --- a/gate_api/api/flash_swap_api.py +++ b/gate_api/api/flash_swap_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 - """List All Supported Currency Pairs In Flash Swap. # noqa: E501 + """List All Supported Currency Pairs In Flash Swap # noqa: E501 `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -46,9 +46,9 @@ def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -64,7 +64,7 @@ def list_flash_swap_currency_pair(self, **kwargs): # noqa: E501 return self.list_flash_swap_currency_pair_with_http_info(**kwargs) # noqa: E501 def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 - """List All Supported Currency Pairs In Flash Swap. # noqa: E501 + """List All Supported Currency Pairs In Flash Swap # noqa: E501 `BTC_GT` represents selling BTC and buying GT. The limits for each currency may vary across different currency pairs. It is not necessary that two currencies that can be swapped instantaneously can be exchanged with each other. For example, it is possible to sell BTC and buy GT, but it does not necessarily mean that GT can be sold to buy BTC. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -73,9 +73,9 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 1000. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 1000, minimum: 1, maximum: 1000 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -163,7 +163,7 @@ def list_flash_swap_currency_pair_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_flash_swap_orders(self, **kwargs): # noqa: E501 - """List all flash swap orders. # noqa: E501 + """Query flash swap order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -171,12 +171,12 @@ def list_flash_swap_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int status: Flash swap order status `1` - success `2` - failure - :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) - :param int limit: Maximum number of records to be returned in a single list. - :param int page: Page number. + :param int status: Flash swap order status `1` - success `2` - failed + :param str sell_currency: Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies + :param str buy_currency: Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies + :param bool reverse: Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first) + :param int limit: Maximum number of records returned in a single list + :param int page: Page number :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -192,7 +192,7 @@ def list_flash_swap_orders(self, **kwargs): # noqa: E501 return self.list_flash_swap_orders_with_http_info(**kwargs) # noqa: E501 def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 - """List all flash swap orders. # noqa: E501 + """Query flash swap order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -200,12 +200,12 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int status: Flash swap order status `1` - success `2` - failure - :param str sell_currency: Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param str buy_currency: Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` - :param bool reverse: If results are sorted by id in reverse order. Default to `true` - `true`: sort by id in descending order(recent first) - ascending order(oldest first) - :param int limit: Maximum number of records to be returned in a single list. - :param int page: Page number. + :param int status: Flash swap order status `1` - success `2` - failed + :param str sell_currency: Asset name to sell - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies + :param str buy_currency: Asset name to buy - Retrieved from API `GET /flash_swap/currencies` for supported flash swap currencies + :param bool reverse: Sort by ID in ascending or descending order, default `true` - `true`: ID descending order (most recent data first) - `false`: ID ascending order (oldest data first) + :param int limit: Maximum number of records returned in a single list + :param int page: Page number :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -302,7 +302,7 @@ def list_flash_swap_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_flash_swap_order(self, flash_swap_order_request, **kwargs): # noqa: E501 - """Create a flash swap order. # noqa: E501 + """Create a flash swap order # noqa: E501 Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -327,7 +327,7 @@ def create_flash_swap_order(self, flash_swap_order_request, **kwargs): # noqa: return self.create_flash_swap_order_with_http_info(flash_swap_order_request, **kwargs) # noqa: E501 def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwargs): # noqa: E501 - """Create a flash swap order. # noqa: E501 + """Create a flash swap order # noqa: E501 Initiate a flash swap preview in advance because order creation requires a preview result # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -420,7 +420,7 @@ def create_flash_swap_order_with_http_info(self, flash_swap_order_request, **kwa collection_formats=collection_formats) def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501 - """Get a single flash swap order's detail. # noqa: E501 + """Query single flash swap order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -428,7 +428,7 @@ def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Flash swap order ID. (required) + :param int order_id: Flash swap order ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -444,7 +444,7 @@ def get_flash_swap_order(self, order_id, **kwargs): # noqa: E501 return self.get_flash_swap_order_with_http_info(order_id, **kwargs) # noqa: E501 def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single flash swap order's detail. # noqa: E501 + """Query single flash swap order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -452,7 +452,7 @@ def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Flash swap order ID. (required) + :param int order_id: Flash swap 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 @@ -532,7 +532,7 @@ def get_flash_swap_order_with_http_info(self, order_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noqa: E501 - """Initiate a flash swap order preview. # noqa: E501 + """Flash swap order preview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -556,7 +556,7 @@ def preview_flash_swap_order(self, flash_swap_preview_request, **kwargs): # noq return self.preview_flash_swap_order_with_http_info(flash_swap_preview_request, **kwargs) # noqa: E501 def preview_flash_swap_order_with_http_info(self, flash_swap_preview_request, **kwargs): # noqa: E501 - """Initiate a flash swap order preview. # noqa: E501 + """Flash swap order preview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index 321bc01..94301a7 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_futures_contracts(self, settle, **kwargs): # noqa: E501 - """List all futures contracts. # noqa: E501 + """Query all futures contracts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,9 +45,9 @@ def list_futures_contracts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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. @@ -63,7 +63,7 @@ def list_futures_contracts(self, settle, **kwargs): # noqa: E501 return self.list_futures_contracts_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all futures contracts. # noqa: E501 + """Query all futures contracts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -71,9 +71,9 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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 @@ -165,7 +165,7 @@ def list_futures_contracts_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract. # noqa: E501 + """Query single contract information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -173,8 +173,8 @@ def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -190,7 +190,7 @@ def get_futures_contract(self, settle, contract, **kwargs): # noqa: E501 return self.get_futures_contract_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get a single contract. # noqa: E501 + """Query single contract information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -198,8 +198,8 @@ def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -286,20 +286,20 @@ def get_futures_contract_with_http_info(self, settle, contract, **kwargs): # no collection_formats=collection_formats) def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book. # noqa: E501 + """Query futures market depth information # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_order_book(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -315,20 +315,20 @@ def list_futures_order_book(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_order_book_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures order book. # noqa: E501 + """Query futures market depth information # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_order_book_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -428,7 +428,7 @@ def list_futures_order_book_with_http_info(self, settle, contract, **kwargs): # collection_formats=collection_formats) def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history. # noqa: E501 + """Futures market transaction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -436,10 +436,10 @@ def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time. @@ -458,7 +458,7 @@ def list_futures_trades(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_trades_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures trading history. # noqa: E501 + """Futures market transaction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -466,10 +466,10 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time. @@ -580,7 +580,7 @@ def list_futures_trades_with_http_info(self, settle, contract, **kwargs): # noq collection_formats=collection_formats) def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks. # noqa: E501 + """Futures market K-line chart # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -589,12 +589,12 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -610,7 +610,7 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_candlesticks_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get futures candlesticks. # noqa: E501 + """Futures market K-line chart # noqa: E501 Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -619,12 +619,12 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0. 1 natual month, not 30 days + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -725,7 +725,7 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 - """Premium Index K-Line. # noqa: E501 + """Premium Index K-line chart # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -734,12 +734,12 @@ def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Time interval between data points :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -755,7 +755,7 @@ def list_futures_premium_index(self, settle, contract, **kwargs): # noqa: E501 return self.list_futures_premium_index_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Premium Index K-Line. # noqa: E501 + """Premium Index K-line chart # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -764,12 +764,12 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Interval time between data points. + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str interval: Time interval between data points :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -870,7 +870,7 @@ def list_futures_premium_index_with_http_info(self, settle, contract, **kwargs): collection_formats=collection_formats) def list_futures_tickers(self, settle, **kwargs): # noqa: E501 - """List futures tickers. # noqa: E501 + """Get all futures trading statistics # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -878,8 +878,8 @@ def list_futures_tickers(self, settle, **kwargs): # noqa: E501 >>> 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 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. @@ -895,7 +895,7 @@ def list_futures_tickers(self, settle, **kwargs): # noqa: E501 return self.list_futures_tickers_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List futures tickers. # noqa: E501 + """Get all futures trading statistics # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -903,8 +903,8 @@ def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 >>> 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 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 @@ -987,7 +987,7 @@ def list_futures_tickers_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa: E501 - """Funding rate history. # noqa: E501 + """Futures market historical funding rate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -995,9 +995,9 @@ def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1015,7 +1015,7 @@ def list_futures_funding_rate_history(self, settle, contract, **kwargs): # noqa return self.list_futures_funding_rate_history_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_futures_funding_rate_history_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Funding rate history. # noqa: E501 + """Futures market historical funding rate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1023,9 +1023,9 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -1127,7 +1127,7 @@ def list_futures_funding_rate_history_with_http_info(self, settle, contract, **k collection_formats=collection_formats) def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history. # noqa: E501 + """Futures market insurance fund history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1135,8 +1135,8 @@ def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :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. @@ -1152,7 +1152,7 @@ def list_futures_insurance_ledger(self, settle, **kwargs): # noqa: E501 return self.list_futures_insurance_ledger_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noqa: E501 - """Futures insurance balance history. # noqa: E501 + """Futures market insurance fund history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1160,8 +1160,8 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str settle: Settle currency (required) + :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 @@ -1248,7 +1248,7 @@ def list_futures_insurance_ledger_with_http_info(self, settle, **kwargs): # noq collection_formats=collection_formats) def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501 - """Futures stats. # noqa: E501 + """Futures statistics # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1256,9 +1256,9 @@ def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int _from: Start timestamp. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start timestamp :param str interval: :param int limit: :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1276,7 +1276,7 @@ def list_contract_stats(self, settle, contract, **kwargs): # noqa: E501 return self.list_contract_stats_with_http_info(settle, contract, **kwargs) # noqa: E501 def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Futures stats. # noqa: E501 + """Futures statistics # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1284,9 +1284,9 @@ def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param int _from: Start timestamp. + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param int _from: Start timestamp :param str interval: :param int limit: :param _return_http_data_only: response data without head status code @@ -1388,7 +1388,7 @@ def list_contract_stats_with_http_info(self, settle, contract, **kwargs): # noq collection_formats=collection_formats) def get_index_constituents(self, settle, index, **kwargs): # noqa: E501 - """Get index constituents. # noqa: E501 + """Query index constituents # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1396,8 +1396,8 @@ def get_index_constituents(self, settle, index, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str index: Index name. (required) + :param str settle: Settle currency (required) + :param str index: Index name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1413,7 +1413,7 @@ def get_index_constituents(self, settle, index, **kwargs): # noqa: E501 return self.get_index_constituents_with_http_info(settle, index, **kwargs) # noqa: E501 def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noqa: E501 - """Get index constituents. # noqa: E501 + """Query index constituents # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1421,8 +1421,8 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str index: Index name. (required) + :param str settle: Settle currency (required) + :param str index: Index name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1509,20 +1509,20 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq collection_formats=collection_formats) def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 - """Retrieve liquidation history. # noqa: E501 + """Query liquidation order history # noqa: E501 - The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 + The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for detailsThe time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders(settle, async_req=True) >>> 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 str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list. + :param int limit: Maximum number of records returned in a single list :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1538,20 +1538,20 @@ def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 return self.list_liquidated_orders_with_http_info(settle, **kwargs) # noqa: E501 def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 - """Retrieve liquidation history. # noqa: E501 + """Query liquidation order history # noqa: E501 - The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 + The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for detailsThe time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders_with_http_info(settle, async_req=True) >>> 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 str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list. + :param int limit: Maximum number of records returned in a single list :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1647,7 +1647,7 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers. # noqa: E501 + """Query risk limit tiers # noqa: E501 When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1656,10 +1656,10 @@ def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1675,7 +1675,7 @@ def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 return self.list_futures_risk_limit_tiers_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 - """List risk limit tiers. # noqa: E501 + """Query risk limit tiers # noqa: E501 When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1684,10 +1684,10 @@ def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1782,7 +1782,7 @@ def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noq collection_formats=collection_formats) def list_futures_accounts(self, settle, **kwargs): # noqa: E501 - """Query futures account. # noqa: E501 + """Get futures account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1790,7 +1790,7 @@ def list_futures_accounts(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1806,7 +1806,7 @@ def list_futures_accounts(self, settle, **kwargs): # noqa: E501 return self.list_futures_accounts_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query futures account. # noqa: E501 + """Get futures account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1814,7 +1814,7 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1894,19 +1894,19 @@ def list_futures_accounts_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_futures_account_book(self, settle, **kwargs): # noqa: E501 - """Query account book. # noqa: E501 + """Query futures account change history # noqa: E501 - If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered. # noqa: E501 + If the contract field is passed, only records containing this field after 2023-10-30 can be filtered. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_account_book(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction @@ -1925,19 +1925,19 @@ def list_futures_account_book(self, settle, **kwargs): # noqa: E501 return self.list_futures_account_book_with_http_info(settle, **kwargs) # noqa: E501 def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query account book. # noqa: E501 + """Query futures account change history # noqa: E501 - If the contract field is passed, only records containing this field after 2023-10-30 can be filtered。 2023-10-30 can be filtered. # noqa: E501 + If the contract field is passed, only records containing this field after 2023-10-30 can be filtered. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_account_book_with_http_info(settle, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction @@ -2044,7 +2044,7 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E collection_formats=collection_formats) def list_positions(self, settle, **kwargs): # noqa: E501 - """List all positions of a user. # noqa: E501 + """Get user position list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2052,10 +2052,10 @@ def list_positions(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :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 to be returned in a single list. - :param int offset: List offset, starting from 0. + :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 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. @@ -2071,7 +2071,7 @@ def list_positions(self, settle, **kwargs): # noqa: E501 return self.list_positions_with_http_info(settle, **kwargs) # noqa: E501 def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 - """List all positions of a user. # noqa: E501 + """Get user position list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2079,10 +2079,10 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :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 to be returned in a single list. - :param int offset: List offset, starting from 0. + :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 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 @@ -2177,7 +2177,7 @@ def list_positions_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_position(self, settle, contract, **kwargs): # noqa: E501 - """Get single position. # noqa: E501 + """Get single position information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2185,8 +2185,8 @@ def get_position(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2202,7 +2202,7 @@ def get_position(self, settle, contract, **kwargs): # noqa: E501 return self.get_position_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Get single position. # noqa: E501 + """Get single position information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2210,8 +2210,8 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2298,7 +2298,7 @@ def get_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 collection_formats=collection_formats) def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin. # noqa: E501 + """Update position margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2306,9 +2306,9 @@ def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str change: Margin change amount, positive number increases, negative number. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change amount, positive number increases, negative number decreases (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2324,7 +2324,7 @@ def update_position_margin(self, settle, contract, change, **kwargs): # noqa: E return self.update_position_margin_with_http_info(settle, contract, change, **kwargs) # noqa: E501 def update_position_margin_with_http_info(self, settle, contract, change, **kwargs): # noqa: E501 - """Update position margin. # noqa: E501 + """Update position margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2332,9 +2332,9 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str change: Margin change amount, positive number increases, negative number. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change amount, positive number increases, negative number decreases (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2428,7 +2428,7 @@ def update_position_margin_with_http_info(self, settle, contract, change, **kwar collection_formats=collection_formats) def update_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage. # noqa: E501 + """Update position leverage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2436,10 +2436,10 @@ def update_position_leverage(self, settle, contract, leverage, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str leverage: New position leverage. (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2455,7 +2455,7 @@ def update_position_leverage(self, settle, contract, leverage, **kwargs): # noq return self.update_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 def update_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage. # noqa: E501 + """Update position leverage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2463,10 +2463,10 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str leverage: New position leverage. (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2563,7 +2563,7 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** collection_formats=collection_formats) def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501 - """Switch to the full position-by-store mode. # noqa: E501 + """Switch Position Margin Mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2571,7 +2571,7 @@ def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwar >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param FuturesPositionCrossMode futures_position_cross_mode: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2588,7 +2588,7 @@ def update_position_cross_mode(self, settle, futures_position_cross_mode, **kwar return self.update_position_cross_mode_with_http_info(settle, futures_position_cross_mode, **kwargs) # noqa: E501 def update_position_cross_mode_with_http_info(self, settle, futures_position_cross_mode, **kwargs): # noqa: E501 - """Switch to the full position-by-store mode. # noqa: E501 + """Switch Position Margin Mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2596,7 +2596,7 @@ def update_position_cross_mode_with_http_info(self, settle, futures_position_cro >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param FuturesPositionCrossMode futures_position_cross_mode: (required) :param _return_http_data_only: response data without head status code and headers @@ -2688,7 +2688,7 @@ def update_position_cross_mode_with_http_info(self, settle, futures_position_cro collection_formats=collection_formats) def update_dual_comp_position_cross_mode(self, settle, inline_object, **kwargs): # noqa: E501 - """双仓模式下切换全逐仓模式 # noqa: E501 + """Switch Between Cross and Isolated Margin Modes Under Hedge Mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2696,7 +2696,7 @@ def update_dual_comp_position_cross_mode(self, settle, inline_object, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param InlineObject inline_object: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2713,7 +2713,7 @@ def update_dual_comp_position_cross_mode(self, settle, inline_object, **kwargs): return self.update_dual_comp_position_cross_mode_with_http_info(settle, inline_object, **kwargs) # noqa: E501 def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_object, **kwargs): # noqa: E501 - """双仓模式下切换全逐仓模式 # noqa: E501 + """Switch Between Cross and Isolated Margin Modes Under Hedge Mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2721,7 +2721,7 @@ def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_obj >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param InlineObject inline_object: (required) :param _return_http_data_only: response data without head status code and headers @@ -2813,7 +2813,7 @@ def update_dual_comp_position_cross_mode_with_http_info(self, settle, inline_obj collection_formats=collection_formats) def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit. # noqa: E501 + """Update position risk limit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2821,9 +2821,9 @@ def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str risk_limit: New Risk Limit Value. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New risk limit value (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2839,7 +2839,7 @@ def update_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # return self.update_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit. # noqa: E501 + """Update position risk limit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2847,9 +2847,9 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str risk_limit: New Risk Limit Value. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New risk limit value (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2943,17 +2943,17 @@ def update_position_risk_limit_with_http_info(self, settle, contract, risk_limit collection_formats=collection_formats) def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 - """Enable or disable dual mode. # noqa: E501 + """Set position mode # noqa: E501 - The prerequisite for changing mode is that all positions have no holdings. # noqa: E501 + The prerequisite for changing mode is that all positions have no holdings and no pending orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_dual_mode(settle, dual_mode, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param bool dual_mode: Whether to enable dual mode. (required) + :param str settle: Settle currency (required) + :param bool dual_mode: Whether to enable dual mode (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2969,17 +2969,17 @@ def set_dual_mode(self, settle, dual_mode, **kwargs): # noqa: E501 return self.set_dual_mode_with_http_info(settle, dual_mode, **kwargs) # noqa: E501 def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E501 - """Enable or disable dual mode. # noqa: E501 + """Set position mode # noqa: E501 - The prerequisite for changing mode is that all positions have no holdings. # noqa: E501 + The prerequisite for changing mode is that all positions have no holdings and no pending orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_dual_mode_with_http_info(settle, dual_mode, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param bool dual_mode: Whether to enable dual mode. (required) + :param str settle: Settle currency (required) + :param bool dual_mode: Whether to enable dual mode (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3066,7 +3066,7 @@ def set_dual_mode_with_http_info(self, settle, dual_mode, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 - """Retrieve position detail in dual mode. # noqa: E501 + """Get position information in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3074,8 +3074,8 @@ def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3091,7 +3091,7 @@ def get_dual_mode_position(self, settle, contract, **kwargs): # noqa: E501 return self.get_dual_mode_position_with_http_info(settle, contract, **kwargs) # noqa: E501 def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Retrieve position detail in dual mode. # noqa: E501 + """Get position information in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3099,8 +3099,8 @@ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3187,7 +3187,7 @@ def get_dual_mode_position_with_http_info(self, settle, contract, **kwargs): # collection_formats=collection_formats) def update_dual_mode_position_margin(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 - """Update position margin in dual mode. # noqa: E501 + """Update position margin in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3195,10 +3195,10 @@ def update_dual_mode_position_margin(self, settle, contract, change, dual_side, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str change: Margin change amount, positive number increases, negative number. (required) - :param str dual_side: Long or short position. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change amount, positive number increases, negative number decreases (required) + :param str dual_side: Long or short position (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3214,7 +3214,7 @@ def update_dual_mode_position_margin(self, settle, contract, change, dual_side, return self.update_dual_mode_position_margin_with_http_info(settle, contract, change, dual_side, **kwargs) # noqa: E501 def update_dual_mode_position_margin_with_http_info(self, settle, contract, change, dual_side, **kwargs): # noqa: E501 - """Update position margin in dual mode. # noqa: E501 + """Update position margin in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3222,10 +3222,10 @@ def update_dual_mode_position_margin_with_http_info(self, settle, contract, chan >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str change: Margin change amount, positive number increases, negative number. (required) - :param str dual_side: Long or short position. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str change: Margin change amount, positive number increases, negative number decreases (required) + :param str dual_side: Long or short position (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3326,7 +3326,7 @@ def update_dual_mode_position_margin_with_http_info(self, settle, contract, chan collection_formats=collection_formats) def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage in dual mode. # noqa: E501 + """Update position leverage in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3334,10 +3334,10 @@ def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwarg >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str leverage: New position leverage. (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3353,7 +3353,7 @@ def update_dual_mode_position_leverage(self, settle, contract, leverage, **kwarg return self.update_dual_mode_position_leverage_with_http_info(settle, contract, leverage, **kwargs) # noqa: E501 def update_dual_mode_position_leverage_with_http_info(self, settle, contract, leverage, **kwargs): # noqa: E501 - """Update position leverage in dual mode. # noqa: E501 + """Update position leverage in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3361,10 +3361,10 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str leverage: New position leverage. (required) - :param str cross_leverage_limit: Cross margin leverage(valid only when `leverage` is 0). + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str leverage: New position leverage (required) + :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3461,7 +3461,7 @@ def update_dual_mode_position_leverage_with_http_info(self, settle, contract, le collection_formats=collection_formats) def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit in dual mode. # noqa: E501 + """Update position risk limit in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3469,9 +3469,9 @@ def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **k >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str risk_limit: New Risk Limit Value. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New risk limit value (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3487,7 +3487,7 @@ def update_dual_mode_position_risk_limit(self, settle, contract, risk_limit, **k return self.update_dual_mode_position_risk_limit_with_http_info(settle, contract, risk_limit, **kwargs) # noqa: E501 def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, risk_limit, **kwargs): # noqa: E501 - """Update position risk limit in dual mode. # noqa: E501 + """Update position risk limit in dual mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3495,9 +3495,9 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) - :param str risk_limit: New Risk Limit Value. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (required) + :param str risk_limit: New risk limit value (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3591,7 +3591,7 @@ def update_dual_mode_position_risk_limit_with_http_info(self, settle, contract, collection_formats=collection_formats) def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 - """List futures orders. # noqa: E501 + """Query futures order list # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3600,12 +3600,12 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. + :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 str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3621,7 +3621,7 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 return self.list_futures_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List futures orders. # noqa: E501 + """Query futures order list # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/orders_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3630,12 +3630,12 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. + :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 str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3740,7 +3740,7 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: collection_formats=collection_formats) def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order. # noqa: E501 + """Place futures order # noqa: E501 - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3749,7 +3749,7 @@ def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param FuturesOrder futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3767,7 +3767,7 @@ def create_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 return self.create_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a futures order. # noqa: E501 + """Place futures order # noqa: E501 - When placing an order, the number of contracts is specified `size`, not the number of coins. The number of coins corresponding to each contract is returned in the contract details interface `quanto_multiplier` - 0 The order that was completed cannot be obtained after 10 minutes of withdrawal, and the order will be mentioned that the order does not exist - Setting `reduce_only` to `true` can prevent the position from being penetrated when reducing the position - In single-position mode, if you need to close the position, you need to set `size` to 0 and `close` to `true` - In dual warehouse mode, - Reduce position: reduce_only=true, size is a positive number that indicates short position, negative number that indicates long position - Add number that indicates adding long positions, and negative numbers indicate adding short positions - Close position: size=0, set the direction of closing position according to auto_size, and set `reduce_only` to true at the same time - reduce_only: Make sure to only perform position reduction operations to prevent increased positions - Set `stp_act` to determine the use of a strategy that restricts user transactions. For detailed usage, refer to the body parameter `stp_act` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3776,7 +3776,7 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param FuturesOrder futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -3872,17 +3872,17 @@ def create_futures_order_with_http_info(self, settle, futures_order, **kwargs): collection_formats=collection_formats) def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched. # noqa: E501 + """Cancel all orders with 'open' status # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_futures_orders(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3900,17 +3900,17 @@ def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501 return self.cancel_futures_orders_with_http_info(settle, contract, **kwargs) # noqa: E501 def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # noqa: E501 - """Cancel all `open` orders matched. # noqa: E501 + """Cancel all orders with 'open' status # noqa: E501 - Zero-filled order cannot be retrieved 10 minutes after order cancellation. # noqa: E501 + Zero-fill orders cannot be retrieved 10 minutes after order cancellation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_futures_orders_with_http_info(settle, contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract. (required) + :param str settle: Settle currency (required) + :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders :param _return_http_data_only: response data without head status code @@ -4005,7 +4005,7 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n collection_formats=collection_formats) def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501 - """List Futures Orders By Time Range. # noqa: E501 + """Query futures order list by time range # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4013,12 +4013,12 @@ def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501 >>> 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 str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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. @@ -4034,7 +4034,7 @@ def get_orders_with_time_range(self, settle, **kwargs): # noqa: E501 return self.get_orders_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 - """List Futures Orders By Time Range. # noqa: E501 + """Query futures order list by time range # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4042,12 +4042,12 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: >>> 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 str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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 @@ -4148,7 +4148,7 @@ def get_orders_with_time_range_with_http_info(self, settle, **kwargs): # noqa: collection_formats=collection_formats) def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a batch of futures orders. # noqa: E501 + """Place batch futures orders # noqa: E501 - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4157,7 +4157,7 @@ def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param list[FuturesOrder] futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4175,7 +4175,7 @@ def create_batch_futures_order(self, settle, futures_order, **kwargs): # noqa: return self.create_batch_futures_order_with_http_info(settle, futures_order, **kwargs) # noqa: E501 def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwargs): # noqa: E501 - """Create a batch of futures orders. # noqa: E501 + """Place batch futures orders # noqa: E501 - Up to 10 orders per request - If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly - If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders - The returned result is in array format, and the order corresponds to the orders in the request body - In the returned result, the `succeeded` field of type bool indicates whether the execution was successful or not - If the execution is successful, the normal order content is included; if the execution fails, the `label` field is included to indicate the cause of the error - In the rate limiting, each order is counted individually # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4184,7 +4184,7 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param list[FuturesOrder] futures_order: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -4280,7 +4280,7 @@ def create_batch_futures_order_with_http_info(self, settle, futures_order, **kwa collection_formats=collection_formats) def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4289,7 +4289,7 @@ def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -4306,7 +4306,7 @@ def get_futures_order(self, settle, order_id, **kwargs): # noqa: E501 return self.get_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4315,7 +4315,7 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param _return_http_data_only: response data without head status code and headers @@ -4403,7 +4403,7 @@ def get_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: collection_formats=collection_formats) def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 - """Amend an order. # noqa: E501 + """Amend single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4411,7 +4411,7 @@ def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwarg >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param FuturesOrderAmendment futures_order_amendment: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected @@ -4430,7 +4430,7 @@ def amend_futures_order(self, settle, order_id, futures_order_amendment, **kwarg return self.amend_futures_order_with_http_info(settle, order_id, futures_order_amendment, **kwargs) # noqa: E501 def amend_futures_order_with_http_info(self, settle, order_id, futures_order_amendment, **kwargs): # noqa: E501 - """Amend an order. # noqa: E501 + """Amend single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4438,7 +4438,7 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param FuturesOrderAmendment futures_order_amendment: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected @@ -4542,7 +4542,7 @@ def amend_futures_order_with_http_info(self, settle, order_id, futures_order_ame collection_formats=collection_formats) def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4550,7 +4550,7 @@ def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4568,7 +4568,7 @@ def cancel_futures_order(self, settle, order_id, **kwargs): # noqa: E501 return self.cancel_futures_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4576,7 +4576,7 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param str order_id: Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. finished, it can be checked within 60 seconds after the end of the order. After that, only order ID is accepted. (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -4668,7 +4668,7 @@ def cancel_futures_order_with_http_info(self, settle, order_id, **kwargs): # no collection_formats=collection_formats) def get_my_trades(self, settle, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4677,11 +4677,11 @@ def get_my_trades(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int order: Futures order ID, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -4698,7 +4698,7 @@ def get_my_trades(self, settle, **kwargs): # noqa: E501 return self.get_my_trades_with_http_info(settle, **kwargs) # noqa: E501 def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use `GET /futures/{settle}/my_trades_timerange`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -4707,11 +4707,11 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int order: Futures order ID, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int order: Futures order ID, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param str last_id: Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using 'GET /futures/{settle}/my_trades_timerange'. :param _return_http_data_only: response data without head status code and headers @@ -4813,7 +4813,7 @@ def get_my_trades_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 - """List personal trading history by time range. # noqa: E501 + """Query personal trading records by time range # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4821,13 +4821,13 @@ def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 >>> 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 str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str role: Query role, maker or taker. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param str role: Query role, maker or taker :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -4843,7 +4843,7 @@ def get_my_trades_with_time_range(self, settle, **kwargs): # noqa: E501 return self.get_my_trades_with_time_range_with_http_info(settle, **kwargs) # noqa: E501 def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noqa: E501 - """List personal trading history by time range. # noqa: E501 + """Query personal trading records by time range # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4851,13 +4851,13 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq >>> 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 str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param str role: Query role, maker or taker. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param str role: Query role, maker or taker :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -4961,7 +4961,7 @@ def get_my_trades_with_time_range_with_http_info(self, settle, **kwargs): # noq collection_formats=collection_formats) def list_position_close(self, settle, **kwargs): # noqa: E501 - """List position close history. # noqa: E501 + """Query position close history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -4969,14 +4969,14 @@ def list_position_close(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str side: Query side. long or shot. - :param str pnl: Query profit or loss. + :param str side: Query side. long or shot + :param str pnl: Query profit or loss :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -4992,7 +4992,7 @@ def list_position_close(self, settle, **kwargs): # noqa: E501 return self.list_position_close_with_http_info(settle, **kwargs) # noqa: E501 def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 - """List position close history. # noqa: E501 + """Query position close history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5000,14 +5000,14 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str side: Query side. long or shot. - :param str pnl: Query profit or loss. + :param str side: Query side. long or shot + :param str pnl: Query profit or loss :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5114,7 +5114,7 @@ def list_position_close_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_liquidates(self, settle, **kwargs): # noqa: E501 - """List liquidation history. # noqa: E501 + """Query liquidation history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5122,13 +5122,13 @@ def list_liquidates(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int at: Specify a liquidation timestamp. + :param int at: Specify liquidation timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5144,7 +5144,7 @@ def list_liquidates(self, settle, **kwargs): # noqa: E501 return self.list_liquidates_with_http_info(settle, **kwargs) # noqa: E501 def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 - """List liquidation history. # noqa: E501 + """Query liquidation history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5152,13 +5152,13 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int at: Specify a liquidation timestamp. + :param int at: Specify liquidation timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5262,7 +5262,7 @@ def list_liquidates_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_auto_deleverages(self, settle, **kwargs): # noqa: E501 - """List Auto-Deleveraging History. # noqa: E501 + """Query ADL auto-deleveraging order information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5270,13 +5270,13 @@ def list_auto_deleverages(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int at: Specify an auto-deleveraging timestamp. + :param int at: Specify auto-deleveraging timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5292,7 +5292,7 @@ def list_auto_deleverages(self, settle, **kwargs): # noqa: E501 return self.list_auto_deleverages_with_http_info(settle, **kwargs) # noqa: E501 def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 - """List Auto-Deleveraging History. # noqa: E501 + """Query ADL auto-deleveraging order information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5300,13 +5300,13 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str settle: Settle currency (required) + :param str contract: Futures contract, return related data only if specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param int at: Specify an auto-deleveraging timestamp. + :param int at: Specify auto-deleveraging timestamp :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5410,7 +5410,7 @@ def list_auto_deleverages_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 - """Countdown cancel orders. # noqa: E501 + """Countdown cancel orders # noqa: E501 Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -5419,7 +5419,7 @@ def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -5436,7 +5436,7 @@ def countdown_cancel_all_futures(self, settle, countdown_cancel_all_futures_task return self.countdown_cancel_all_futures_with_http_info(settle, countdown_cancel_all_futures_task, **kwargs) # noqa: E501 def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_all_futures_task, **kwargs): # noqa: E501 - """Countdown cancel orders. # noqa: E501 + """Countdown cancel orders # noqa: E501 Heartbeat detection for contract orders: When the user-set `timeout` time is reached, if neither the existing countdown is canceled nor a new countdown is set, the relevant contract orders will be automatically canceled. This API can be called repeatedly to or cancel the countdown. Usage example: Repeatedly call this API at 30-second intervals, setting the `timeout` to 30 (seconds) each time. If this API is not called again within 30 seconds, all open orders on your specified `market` will be automatically canceled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will terminate, and the automatic order cancellation function will be disabled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -5445,7 +5445,7 @@ def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_a >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param CountdownCancelAllFuturesTask countdown_cancel_all_futures_task: (required) :param _return_http_data_only: response data without head status code and headers @@ -5537,7 +5537,7 @@ def countdown_cancel_all_futures_with_http_info(self, settle, countdown_cancel_a collection_formats=collection_formats) def get_futures_fee(self, settle, **kwargs): # noqa: E501 - """Query user trading fee rates. # noqa: E501 + """Query futures market trading fee rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5545,8 +5545,8 @@ def get_futures_fee(self, settle, **kwargs): # noqa: E501 >>> 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 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. @@ -5562,7 +5562,7 @@ def get_futures_fee(self, settle, **kwargs): # noqa: E501 return self.get_futures_fee_with_http_info(settle, **kwargs) # noqa: E501 def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 - """Query user trading fee rates. # noqa: E501 + """Query futures market trading fee rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -5570,8 +5570,8 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 >>> 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 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 @@ -5654,16 +5654,16 @@ def get_futures_fee_with_http_info(self, settle, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list. # noqa: E501 + """Cancel batch orders by specified ID list # noqa: E501 - Multiple different order IDs can be specified. A maximum of 20 records. # noqa: E501 + Multiple different order IDs can be specified, maximum 20 records per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_batch_future_orders(settle, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param list[str] request_body: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5681,16 +5681,16 @@ def cancel_batch_future_orders(self, settle, request_body, **kwargs): # noqa: E return self.cancel_batch_future_orders_with_http_info(settle, request_body, **kwargs) # noqa: E501 def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list. # noqa: E501 + """Cancel batch orders by specified ID list # noqa: E501 - Multiple different order IDs can be specified. A maximum of 20 records. # noqa: E501 + Multiple different order IDs can be specified, maximum 20 records per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_batch_future_orders_with_http_info(settle, request_body, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param list[str] request_body: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -5786,16 +5786,16 @@ def cancel_batch_future_orders_with_http_info(self, settle, request_body, **kwar collection_formats=collection_formats) def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 - """Batch modify orders with specified IDs. # noqa: E501 + """Batch modify orders by specified IDs # noqa: E501 - Multiple different order IDs can be specified. A maximum of 10 orders can. # noqa: E501 + Multiple different order IDs can be specified, maximum 10 orders per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_future_orders(settle, batch_amend_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param list[BatchAmendOrderReq] batch_amend_order_req: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -5813,16 +5813,16 @@ def amend_batch_future_orders(self, settle, batch_amend_order_req, **kwargs): # return self.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, **kwargs) # noqa: E501 def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req, **kwargs): # noqa: E501 - """Batch modify orders with specified IDs. # noqa: E501 + """Batch modify orders by specified IDs # noqa: E501 - Multiple different order IDs can be specified. A maximum of 10 orders can. # noqa: E501 + Multiple different order IDs can be specified, maximum 10 orders per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_future_orders_with_http_info(settle, batch_amend_order_req, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :param str settle: Settle currency (required) :param list[BatchAmendOrderReq] batch_amend_order_req: (required) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code @@ -5918,17 +5918,17 @@ def amend_batch_future_orders_with_http_info(self, settle, batch_amend_order_req collection_formats=collection_formats) def get_futures_risk_limit_table(self, settle, table_id, **kwargs): # noqa: E501 - """Query risk limit table by table_id. # noqa: E501 + """Query risk limit table by table_id # noqa: E501 - Just pass table_id. # noqa: E501 + Just pass table_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_futures_risk_limit_table(settle, table_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str table_id: Risk limit table ID. (required) + :param str settle: Settle currency (required) + :param str table_id: Risk limit table ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -5944,17 +5944,17 @@ def get_futures_risk_limit_table(self, settle, table_id, **kwargs): # noqa: E50 return self.get_futures_risk_limit_table_with_http_info(settle, table_id, **kwargs) # noqa: E501 def get_futures_risk_limit_table_with_http_info(self, settle, table_id, **kwargs): # noqa: E501 - """Query risk limit table by table_id. # noqa: E501 + """Query risk limit table by table_id # noqa: E501 - Just pass table_id. # noqa: E501 + Just pass table_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_futures_risk_limit_table_with_http_info(settle, table_id, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str table_id: Risk limit table ID. (required) + :param str settle: Settle currency (required) + :param str table_id: Risk limit table ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -6041,7 +6041,7 @@ def get_futures_risk_limit_table_with_http_info(self, settle, table_id, **kwargs collection_formats=collection_formats) def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders. # noqa: E501 + """Query auto order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6049,11 +6049,11 @@ def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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. @@ -6069,7 +6069,7 @@ def list_price_triggered_orders(self, settle, status, **kwargs): # noqa: E501 return self.list_price_triggered_orders_with_http_info(settle, status, **kwargs) # noqa: E501 def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): # noqa: E501 - """List All Price-triggered Orders. # noqa: E501 + """Query auto order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6077,11 +6077,11 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str status: Only list the orders with this status. (required) - :param str contract: Futures contract, return related data only if specified. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :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 @@ -6183,7 +6183,7 @@ def list_price_triggered_orders_with_http_info(self, settle, status, **kwargs): collection_formats=collection_formats) def create_price_triggered_order(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order. # noqa: E501 + """Create price-triggered order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6191,7 +6191,7 @@ def create_price_triggered_order(self, settle, futures_price_triggered_order, ** >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :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 @@ -6208,7 +6208,7 @@ def create_price_triggered_order(self, settle, futures_price_triggered_order, ** return self.create_price_triggered_order_with_http_info(settle, futures_price_triggered_order, **kwargs) # noqa: E501 def create_price_triggered_order_with_http_info(self, settle, futures_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order. # noqa: E501 + """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 @@ -6216,7 +6216,7 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) + :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 @@ -6308,7 +6308,7 @@ def create_price_triggered_order_with_http_info(self, settle, futures_price_trig collection_formats=collection_formats) def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders. # noqa: E501 + """Cancel all auto orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6316,8 +6316,8 @@ def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501 >>> 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 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. @@ -6333,7 +6333,7 @@ def cancel_price_triggered_order_list(self, settle, **kwargs): # noqa: E501 return self.cancel_price_triggered_order_list_with_http_info(settle, **kwargs) # noqa: E501 def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders. # noqa: E501 + """Cancel all auto orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6341,8 +6341,8 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # >>> 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 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 @@ -6425,7 +6425,7 @@ def cancel_price_triggered_order_list_with_http_info(self, settle, **kwargs): # collection_formats=collection_formats) def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order. # noqa: E501 + """Query single auto order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6433,8 +6433,8 @@ def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -6450,7 +6450,7 @@ def get_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 return self.get_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order. # noqa: E501 + """Query single auto order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6458,8 +6458,8 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -6546,7 +6546,7 @@ def get_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): collection_formats=collection_formats) def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order. # noqa: E501 + """Cancel single auto order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6554,8 +6554,8 @@ def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -6571,7 +6571,7 @@ def cancel_price_triggered_order(self, settle, order_id, **kwargs): # noqa: E50 return self.cancel_price_triggered_order_with_http_info(settle, order_id, **kwargs) # noqa: E501 def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order. # noqa: E501 + """Cancel single auto order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -6579,8 +6579,8 @@ def cancel_price_triggered_order_with_http_info(self, settle, order_id, **kwargs >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str settle: Settle currency. (required) - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str settle: Settle currency (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/margin_api.py b/gate_api/api/margin_api.py index d08dd1a..9464f10 100644 --- a/gate_api/api/margin_api.py +++ b/gate_api/api/margin_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_margin_accounts(self, **kwargs): # noqa: E501 - """Margin account list. # noqa: E501 + """Margin account list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,7 +45,7 @@ def list_margin_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. + :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. @@ -61,7 +61,7 @@ def list_margin_accounts(self, **kwargs): # noqa: E501 return self.list_margin_accounts_with_http_info(**kwargs) # noqa: E501 def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Margin account list. # noqa: E501 + """Margin account list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -69,7 +69,7 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. + :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 @@ -145,22 +145,22 @@ def list_margin_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_margin_account_book(self, **kwargs): # noqa: E501 - """List margin account balance change history. # noqa: E501 + """Query margin account balance change history # noqa: E501 - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 + Currently only provides transfer history to and from margin accounts. Query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_margin_account_book(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param str currency: Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified. + :param str currency_pair: Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified + :param str type: Query by specified account change type. If not specified, all change types will be included. + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param int page: Page number + :param int limit: Maximum number of records 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. @@ -176,22 +176,22 @@ def list_margin_account_book(self, **kwargs): # noqa: E501 return self.list_margin_account_book_with_http_info(**kwargs) # noqa: E501 def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List margin account balance change history. # noqa: E501 + """Query margin account balance change history # noqa: E501 - Only transferals from and to margin account are provided for now. Time range allows 30 days at most # noqa: E501 + Currently only provides transfer history to and from margin accounts. Query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_margin_account_book_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: List records related to specified currency only. If specified, `currency_pair` is also required. - :param str currency_pair: List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param str currency: Query history for specified currency. If `currency` is specified, `currency_pair` must also be specified. + :param str currency_pair: Specify margin account currency pair. Used in combination with `currency`. Ignored if `currency` is not specified + :param str type: Query by specified account change type. If not specified, all change types will be included. + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param int page: Page number + :param int limit: Maximum number of records 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 @@ -291,7 +291,7 @@ def list_margin_account_book_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_funding_accounts(self, **kwargs): # noqa: E501 - """Funding account list. # noqa: E501 + """Funding account list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -299,7 +299,7 @@ def list_funding_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. + :param str currency: Query by specified currency name :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -315,7 +315,7 @@ def list_funding_accounts(self, **kwargs): # noqa: E501 return self.list_funding_accounts_with_http_info(**kwargs) # noqa: E501 def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Funding account list. # noqa: E501 + """Funding account list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -323,7 +323,7 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. + :param str currency: Query by specified currency name :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -399,7 +399,7 @@ def list_funding_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_auto_repay_status(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting. # noqa: E501 + """Query user auto repayment settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -422,7 +422,7 @@ def get_auto_repay_status(self, **kwargs): # noqa: E501 return self.get_auto_repay_status_with_http_info(**kwargs) # noqa: E501 def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user auto repayment setting. # noqa: E501 + """Query user auto repayment settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -502,7 +502,7 @@ def get_auto_repay_status_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def set_auto_repay(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting. # noqa: E501 + """Update user auto repayment settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -510,7 +510,7 @@ def set_auto_repay(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled. (required) + :param str status: Whether to enable auto repayment: `on` - enabled, `off` - disabled (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -526,7 +526,7 @@ def set_auto_repay(self, status, **kwargs): # noqa: E501 return self.set_auto_repay_with_http_info(status, **kwargs) # noqa: E501 def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 - """Update user's auto repayment setting. # noqa: E501 + """Update user auto repayment settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -534,7 +534,7 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: New auto repayment status. `on` - enabled, `off` - disabled. (required) + :param str status: Whether to enable auto repayment: `on` - enabled, `off` - disabled (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -614,7 +614,7 @@ def set_auto_repay_with_http_info(self, status, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_margin_transferable(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency. # noqa: E501 + """Get maximum transferable amount for isolated margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -622,8 +622,8 @@ def get_margin_transferable(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) - :param str currency_pair: Currency pair. + :param str currency: Query by specified currency name (required) + :param str currency_pair: Currency pair :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -639,7 +639,7 @@ def get_margin_transferable(self, currency, **kwargs): # noqa: E501 return self.get_margin_transferable_with_http_info(currency, **kwargs) # noqa: E501 def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get the max transferable amount for a specific margin currency. # noqa: E501 + """Get maximum transferable amount for isolated margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -647,8 +647,8 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) - :param str currency_pair: Currency pair. + :param str currency: Query by specified currency name (required) + :param str currency_pair: Currency pair :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -731,7 +731,7 @@ def get_margin_transferable_with_http_info(self, currency, **kwargs): # noqa: E collection_formats=collection_formats) def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market. # noqa: E501 + """Query user's own leverage lending tiers in current market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -739,7 +739,7 @@ def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -755,7 +755,7 @@ def get_user_margin_tier(self, currency_pair, **kwargs): # noqa: E501 return self.get_user_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Check the user's own leverage lending gradient in the current market. # noqa: E501 + """Query user's own leverage lending tiers in current market # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -763,7 +763,7 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -843,7 +843,7 @@ def get_user_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: collection_formats=collection_formats) def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient. # noqa: E501 + """Query current market leverage lending tiers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -851,7 +851,7 @@ def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -867,7 +867,7 @@ def get_market_margin_tier(self, currency_pair, **kwargs): # noqa: E501 return self.get_market_margin_tier_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Query the current market leverage lending gradient. # noqa: E501 + """Query current market leverage lending tiers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -875,7 +875,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -955,7 +955,7 @@ def get_market_margin_tier_with_http_info(self, currency_pair, **kwargs): # noq collection_formats=collection_formats) def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple. # noqa: E501 + """Set user market leverage multiplier # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -979,7 +979,7 @@ def set_user_market_leverage(self, margin_market_leverage, **kwargs): # noqa: E return self.set_user_market_leverage_with_http_info(margin_market_leverage, **kwargs) # noqa: E501 def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwargs): # noqa: E501 - """Set the user market leverage multiple. # noqa: E501 + """Set user market leverage multiplier # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1067,16 +1067,16 @@ def set_user_market_leverage_with_http_info(self, margin_market_leverage, **kwar collection_formats=collection_formats) def list_margin_user_account(self, **kwargs): # noqa: E501 - """Query the user's leverage account list. # noqa: E501 + """Query user's isolated margin account list # noqa: E501 - Support querying risk rate per position account and margin rate per position account # noqa: E501 + Supports querying risk ratio isolated accounts and margin ratio isolated accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_margin_user_account(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. + :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. @@ -1092,16 +1092,16 @@ def list_margin_user_account(self, **kwargs): # noqa: E501 return self.list_margin_user_account_with_http_info(**kwargs) # noqa: E501 def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 - """Query the user's leverage account list. # noqa: E501 + """Query user's isolated margin account list # noqa: E501 - Support querying risk rate per position account and margin rate per position account # noqa: E501 + Supports querying risk ratio isolated accounts and margin ratio isolated accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_margin_user_account_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. + :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 @@ -1177,19 +1177,19 @@ def list_margin_user_account_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated). # noqa: E501 + """Query cross margin borrow history (deprecated) # noqa: E501 - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cross_margin_loans(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.). (required) - :param str currency: Filter by currency. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) + :param str currency: Query by specified currency, includes all currencies if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1206,19 +1206,19 @@ def list_cross_margin_loans(self, status, **kwargs): # noqa: E501 return self.list_cross_margin_loans_with_http_info(status, **kwargs) # noqa: E501 def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E501 - """List cross margin borrow history. (deprecated). # noqa: E501 + """Query cross margin borrow history (deprecated) # noqa: E501 - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cross_margin_loans_with_http_info(status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int status: Filter by status. Supported values are 2 and 3. (deprecated.). (required) - :param str currency: Filter by currency. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int status: Filter by status. Supported values are 2 and 3. (deprecated.) (required) + :param str currency: Query by specified currency, includes all currencies if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _return_http_data_only: response data without head status code and headers @@ -1317,9 +1317,9 @@ def list_cross_margin_loans_with_http_info(self, status, **kwargs): # noqa: E50 collection_formats=collection_formats) def list_cross_margin_repayments(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated). # noqa: E501 + """Retrieve cross margin repayments. (deprecated) # noqa: E501 - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cross_margin_repayments(async_req=True) @@ -1328,8 +1328,8 @@ def list_cross_margin_repayments(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency: :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1346,9 +1346,9 @@ def list_cross_margin_repayments(self, **kwargs): # noqa: E501 return self.list_cross_margin_repayments_with_http_info(**kwargs) # noqa: E501 def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve cross margin repayments. (deprecated). # noqa: E501 + """Retrieve cross margin repayments. (deprecated) # noqa: E501 - Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. # noqa: E501 + Sorted by creation time in descending order by default. Set `reverse=false` for ascending order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cross_margin_repayments_with_http_info(async_req=True) @@ -1357,8 +1357,8 @@ def list_cross_margin_repayments_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency: :param str loan_id: - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param bool reverse: Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results :param _return_http_data_only: response data without head status code and headers diff --git a/gate_api/api/margin_uni_api.py b/gate_api/api/margin_uni_api.py index 7f6f473..6ba4bde 100644 --- a/gate_api/api/margin_uni_api.py +++ b/gate_api/api/margin_uni_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_uni_currency_pairs(self, **kwargs): # noqa: E501 - """List lending markets. # noqa: E501 + """List lending markets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def list_uni_currency_pairs(self, **kwargs): # noqa: E501 return self.list_uni_currency_pairs_with_http_info(**kwargs) # noqa: E501 def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 - """List lending markets. # noqa: E501 + """List lending markets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def list_uni_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market. # noqa: E501 + """Get lending market details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -148,7 +148,7 @@ def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -164,7 +164,7 @@ def get_uni_currency_pair(self, currency_pair, **kwargs): # noqa: E501 return self.get_uni_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get detail of lending market. # noqa: E501 + """Get lending market details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -172,7 +172,7 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -252,16 +252,16 @@ def get_uni_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa collection_formats=collection_formats) def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate. # noqa: E501 + """Estimate interest rate for isolated margin currencies # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 + Interest rates change hourly based on lending depth, so completely accurate rates cannot be provided. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_margin_uni_estimate_rate(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name. (required) + :param list[str] currencies: Array of currency names to query, maximum 10 (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -277,16 +277,16 @@ def get_margin_uni_estimate_rate(self, currencies, **kwargs): # noqa: E501 return self.get_margin_uni_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Estimate interest Rate. # noqa: E501 + """Estimate interest rate for isolated margin currencies # noqa: E501 - Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate. # noqa: E501 + Interest rates change hourly based on lending depth, so completely accurate rates cannot be provided. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_margin_uni_estimate_rate_with_http_info(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: An array of up to 10 specifying the currency name. (required) + :param list[str] currencies: Array of currency names to query, maximum 10 (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -373,7 +373,7 @@ def get_margin_uni_estimate_rate_with_http_info(self, currencies, **kwargs): # collection_formats=collection_formats) def list_uni_loans(self, **kwargs): # noqa: E501 - """List loans. # noqa: E501 + """Query loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -381,10 +381,10 @@ def list_uni_loans(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency_pair: Currency pair + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -400,7 +400,7 @@ def list_uni_loans(self, **kwargs): # noqa: E501 return self.list_uni_loans_with_http_info(**kwargs) # noqa: E501 def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans. # noqa: E501 + """Query loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -408,10 +408,10 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency_pair: Currency pair + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -502,7 +502,7 @@ def list_uni_loans_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay. # noqa: E501 + """Borrow or repay # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -526,7 +526,7 @@ def create_uni_loan(self, create_uni_loan, **kwargs): # noqa: E501 return self.create_uni_loan_with_http_info(create_uni_loan, **kwargs) # noqa: E501 def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E501 - """Borrow or repay. # noqa: E501 + """Borrow or repay # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -614,7 +614,7 @@ def create_uni_loan_with_http_info(self, create_uni_loan, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_uni_loan_records(self, **kwargs): # noqa: E501 - """Get load records. # noqa: E501 + """Query loan records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -622,11 +622,11 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay. - :param str currency: Retrieve data of the specified currency. - :param str currency_pair: Currency pair. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str type: Type: `borrow` - borrow, `repay` - repay + :param str currency: Query by specified currency name + :param str currency_pair: Currency pair + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -642,7 +642,7 @@ def list_uni_loan_records(self, **kwargs): # noqa: E501 return self.list_uni_loan_records_with_http_info(**kwargs) # noqa: E501 def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records. # noqa: E501 + """Query loan records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -650,11 +650,11 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: type: borrow - borrow, repay - repay. - :param str currency: Retrieve data of the specified currency. - :param str currency_pair: Currency pair. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str type: Type: `borrow` - borrow, `repay` - repay + :param str currency: Query by specified currency name + :param str currency_pair: Currency pair + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -748,7 +748,7 @@ def list_uni_loan_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records. # noqa: E501 + """Query interest deduction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -756,10 +756,10 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param str currency_pair: Currency pair + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -777,7 +777,7 @@ def list_uni_loan_interest_records(self, **kwargs): # noqa: E501 return self.list_uni_loan_interest_records_with_http_info(**kwargs) # noqa: E501 def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records. # noqa: E501 + """Query interest deduction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -785,10 +785,10 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. + :param str currency_pair: Currency pair + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -887,7 +887,7 @@ def list_uni_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable. # noqa: E501 + """Query maximum borrowable amount by currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -895,8 +895,8 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) - :param str currency_pair: Currency pair. (required) + :param str currency: Query by specified currency name (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -912,7 +912,7 @@ def get_uni_borrowable(self, currency, currency_pair, **kwargs): # noqa: E501 return self.get_uni_borrowable_with_http_info(currency, currency_pair, **kwargs) # noqa: E501 def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): # noqa: E501 - """Get maximum borrowable. # noqa: E501 + """Query maximum borrowable amount by currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -920,8 +920,8 @@ def get_uni_borrowable_with_http_info(self, currency, currency_pair, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) - :param str currency_pair: Currency pair. (required) + :param str currency: Query by specified currency name (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index ac80d44..75a6582 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_multi_collateral_orders(self, **kwargs): # noqa: E501 - """List Multi-Collateral Orders. # noqa: E501 + """Query multi-currency collateral order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,10 +45,10 @@ def list_multi_collateral_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param str sort: Query the current interest rate of the currency in the previous hour. - :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param str sort: Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. + :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -64,7 +64,7 @@ def list_multi_collateral_orders(self, **kwargs): # noqa: E501 return self.list_multi_collateral_orders_with_http_info(**kwargs) # noqa: E501 def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 - """List Multi-Collateral Orders. # noqa: E501 + """Query multi-currency collateral order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -72,10 +72,10 @@ def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param str sort: Query the current interest rate of the currency in the previous hour. - :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param str sort: Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. + :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -166,7 +166,7 @@ def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_multi_collateral(self, create_multi_collateral_order, **kwargs): # noqa: E501 - """Create Multi-Collateral Order. # noqa: E501 + """Place multi-currency collateral order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -190,7 +190,7 @@ def create_multi_collateral(self, create_multi_collateral_order, **kwargs): # n return self.create_multi_collateral_with_http_info(create_multi_collateral_order, **kwargs) # noqa: E501 def create_multi_collateral_with_http_info(self, create_multi_collateral_order, **kwargs): # noqa: E501 - """Create Multi-Collateral Order. # noqa: E501 + """Place multi-currency collateral order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -282,7 +282,7 @@ def create_multi_collateral_with_http_info(self, create_multi_collateral_order, collection_formats=collection_formats) def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 - """Get Multi-Collateral Order Detail. # noqa: E501 + """Query order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -290,7 +290,7 @@ def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Order ID returned on successful order creation. (required) + :param str order_id: Order ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -306,7 +306,7 @@ def get_multi_collateral_order_detail(self, order_id, **kwargs): # noqa: E501 return self.get_multi_collateral_order_detail_with_http_info(order_id, **kwargs) # noqa: E501 def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get Multi-Collateral Order Detail. # noqa: E501 + """Query order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -314,7 +314,7 @@ def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Order ID returned on successful order creation. (required) + :param str order_id: Order ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -394,7 +394,7 @@ def get_multi_collateral_order_detail_with_http_info(self, order_id, **kwargs): collection_formats=collection_formats) def list_multi_repay_records(self, type, **kwargs): # noqa: E501 - """List Multi-Collateral Repay Records. # noqa: E501 + """Query multi-currency collateral repayment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -402,12 +402,12 @@ def list_multi_repay_records(self, type, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) - :param str borrow_currency: Borrowed currency. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. + :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -423,7 +423,7 @@ def list_multi_repay_records(self, type, **kwargs): # noqa: E501 return self.list_multi_repay_records_with_http_info(type, **kwargs) # noqa: E501 def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 - """List Multi-Collateral Repay Records. # noqa: E501 + """Query multi-currency collateral repayment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -431,12 +431,12 @@ def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation. (required) - :param str borrow_currency: Borrowed currency. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. + :param str type: Operation type: repay - Regular repayment, liquidate - Liquidation (required) + :param str borrow_currency: Borrowed currency + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -537,7 +537,7 @@ def list_multi_repay_records_with_http_info(self, type, **kwargs): # noqa: E501 collection_formats=collection_formats) def repay_multi_collateral_loan(self, repay_multi_loan, **kwargs): # noqa: E501 - """Repay Multi-Collateral Loan. # noqa: E501 + """Multi-currency collateral repayment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -561,7 +561,7 @@ def repay_multi_collateral_loan(self, repay_multi_loan, **kwargs): # noqa: E501 return self.repay_multi_collateral_loan_with_http_info(repay_multi_loan, **kwargs) # noqa: E501 def repay_multi_collateral_loan_with_http_info(self, repay_multi_loan, **kwargs): # noqa: E501 - """Repay Multi-Collateral Loan. # noqa: E501 + """Multi-currency collateral repayment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -653,7 +653,7 @@ def repay_multi_collateral_loan_with_http_info(self, repay_multi_loan, **kwargs) collection_formats=collection_formats) def list_multi_collateral_records(self, **kwargs): # noqa: E501 - """Query collateral adjustment records. # noqa: E501 + """Query collateral adjustment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -661,11 +661,11 @@ def list_multi_collateral_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str collateral_currency: Collateral. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str collateral_currency: Collateral currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -681,7 +681,7 @@ def list_multi_collateral_records(self, **kwargs): # noqa: E501 return self.list_multi_collateral_records_with_http_info(**kwargs) # noqa: E501 def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 - """Query collateral adjustment records. # noqa: E501 + """Query collateral adjustment records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -689,11 +689,11 @@ def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str collateral_currency: Collateral. + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str collateral_currency: Collateral currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -787,7 +787,7 @@ def list_multi_collateral_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def operate_multi_collateral(self, collateral_adjust, **kwargs): # noqa: E501 - """Operate Multi-Collateral. # noqa: E501 + """Add or withdraw collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -811,7 +811,7 @@ def operate_multi_collateral(self, collateral_adjust, **kwargs): # noqa: E501 return self.operate_multi_collateral_with_http_info(collateral_adjust, **kwargs) # noqa: E501 def operate_multi_collateral_with_http_info(self, collateral_adjust, **kwargs): # noqa: E501 - """Operate Multi-Collateral. # noqa: E501 + """Add or withdraw collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -903,7 +903,7 @@ def operate_multi_collateral_with_http_info(self, collateral_adjust, **kwargs): collection_formats=collection_formats) def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 - """List User Currency Quota. # noqa: E501 + """Query user's collateral and borrowing currency quota information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -911,8 +911,8 @@ def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing. (required) - :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed (required) + :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing currency (required) + :param str currency: When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -928,7 +928,7 @@ def list_user_currency_quota(self, type, currency, **kwargs): # noqa: E501 return self.list_user_currency_quota_with_http_info(type, currency, **kwargs) # noqa: E501 def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # noqa: E501 - """List User Currency Quota. # noqa: E501 + """Query user's collateral and borrowing currency quota information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -936,8 +936,8 @@ def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing. (required) - :param str currency: When it is a collateral currency, multiple currencies can be passed separated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one currency can be passedseparated by commas; when it is a borrowing currency, only one commas; when it is a borrowing currency, only one currency can be passed (required) + :param str type: Currency type: collateral - Collateral currency, borrow - Borrowing currency (required) + :param str currency: When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1024,7 +1024,7 @@ def list_user_currency_quota_with_http_info(self, type, currency, **kwargs): # collection_formats=collection_formats) def list_multi_collateral_currencies(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies in Multi-Collateral. # noqa: E501 + """Query supported borrowing and collateral currencies for multi-currency collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1047,7 +1047,7 @@ def list_multi_collateral_currencies(self, **kwargs): # noqa: E501 return self.list_multi_collateral_currencies_with_http_info(**kwargs) # noqa: E501 def list_multi_collateral_currencies_with_http_info(self, **kwargs): # noqa: E501 - """Query supported borrowing and collateral currencies in Multi-Collateral. # noqa: E501 + """Query supported borrowing and collateral currencies for multi-currency collateral # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1127,9 +1127,9 @@ def list_multi_collateral_currencies_with_http_info(self, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_multi_collateral_ltv(self, **kwargs): # noqa: E501 - """Get Multi-Collateral ratio. # noqa: E501 + """Query collateralization ratio information # noqa: E501 - The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 + Multi-currency collateral ratio is fixed, independent of currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_multi_collateral_ltv(async_req=True) @@ -1151,9 +1151,9 @@ def get_multi_collateral_ltv(self, **kwargs): # noqa: E501 return self.get_multi_collateral_ltv_with_http_info(**kwargs) # noqa: E501 def get_multi_collateral_ltv_with_http_info(self, **kwargs): # noqa: E501 - """Get Multi-Collateral ratio. # noqa: E501 + """Query collateralization ratio information # noqa: E501 - The Multi-Collateral ratio is fixed, irrespective of the currency. # noqa: E501 + Multi-currency collateral ratio is fixed, independent of currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_multi_collateral_ltv_with_http_info(async_req=True) @@ -1232,7 +1232,7 @@ def get_multi_collateral_ltv_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_multi_collateral_fix_rate(self, **kwargs): # noqa: E501 - """Query fixed interest rates for the currency for 7 days and 30 days. # noqa: E501 + """Query currency's 7-day and 30-day fixed interest rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1255,7 +1255,7 @@ def get_multi_collateral_fix_rate(self, **kwargs): # noqa: E501 return self.get_multi_collateral_fix_rate_with_http_info(**kwargs) # noqa: E501 def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501 - """Query fixed interest rates for the currency for 7 days and 30 days. # noqa: E501 + """Query currency's 7-day and 30-day fixed interest rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1335,17 +1335,17 @@ def get_multi_collateral_fix_rate_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 - """Query the current interest rate of the currency. # noqa: E501 + """Query currency's current interest rate # noqa: E501 - Query the current interest rate of the currency in the previous hour. # noqa: E501 + Query currency's current interest rate for the previous hour, current interest rate updates hourly # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_multi_collateral_current_rate(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100items. (required) - :param str vip_level: VIP level, defaults to 0 if not transferred. + :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100 items (required) + :param str vip_level: VIP level, defaults to 0 if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1361,17 +1361,17 @@ def get_multi_collateral_current_rate(self, currencies, **kwargs): # noqa: E501 return self.get_multi_collateral_current_rate_with_http_info(currencies, **kwargs) # noqa: E501 def get_multi_collateral_current_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Query the current interest rate of the currency. # noqa: E501 + """Query currency's current interest rate # noqa: E501 - Query the current interest rate of the currency in the previous hour. # noqa: E501 + Query currency's current interest rate for the previous hour, current interest rate updates hourly # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_multi_collateral_current_rate_with_http_info(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100items. (required) - :param str vip_level: VIP level, defaults to 0 if not transferred. + :param list[str] currencies: Specify currency name query array, separated by commas, maximum 100 items (required) + :param str vip_level: VIP level, defaults to 0 if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/options_api.py b/gate_api/api/options_api.py index 2ba2988..3c6fd4a 100644 --- a/gate_api/api/options_api.py +++ b/gate_api/api/options_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_options_underlyings(self, **kwargs): # noqa: E501 - """List all underlyings. # noqa: E501 + """List all underlying assets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -60,7 +60,7 @@ def list_options_underlyings(self, **kwargs): # noqa: E501 return self.list_options_underlyings_with_http_info(**kwargs) # noqa: E501 def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501 - """List all underlyings. # noqa: E501 + """List all underlying assets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -140,7 +140,7 @@ def list_options_underlyings_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_expirations(self, underlying, **kwargs): # noqa: E501 - """List all expiration times. # noqa: E501 + """List all expiration dates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -148,7 +148,7 @@ def list_options_expirations(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -164,7 +164,7 @@ def list_options_expirations(self, underlying, **kwargs): # noqa: E501 return self.list_options_expirations_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List all expiration times. # noqa: E501 + """List all expiration dates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -172,7 +172,7 @@ def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str underlying: Underlying (Obtained by listing underlying 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 @@ -252,7 +252,7 @@ def list_options_expirations_with_http_info(self, underlying, **kwargs): # noqa collection_formats=collection_formats) def list_options_contracts(self, underlying, **kwargs): # noqa: E501 - """List all the contracts with specified underlying and expiration time. # noqa: E501 + """List all contracts for specified underlying and expiration date # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -260,8 +260,8 @@ def list_options_contracts(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param int expiration: Unix timestamp of the expiration time. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int expiration: Unix timestamp of expiration date :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -277,7 +277,7 @@ def list_options_contracts(self, underlying, **kwargs): # noqa: E501 return self.list_options_contracts_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List all the contracts with specified underlying and expiration time. # noqa: E501 + """List all contracts for specified underlying and expiration date # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -285,8 +285,8 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param int expiration: Unix timestamp of the expiration time. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int expiration: Unix timestamp of expiration date :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -369,7 +369,7 @@ def list_options_contracts_with_http_info(self, underlying, **kwargs): # noqa: collection_formats=collection_formats) def get_options_contract(self, contract, **kwargs): # noqa: E501 - """Query specified contract detail. # noqa: E501 + """Query specified contract details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -393,7 +393,7 @@ def get_options_contract(self, contract, **kwargs): # noqa: E501 return self.get_options_contract_with_http_info(contract, **kwargs) # noqa: E501 def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501 - """Query specified contract detail. # noqa: E501 + """Query specified contract details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -481,7 +481,7 @@ def get_options_contract_with_http_info(self, contract, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_settlements(self, underlying, **kwargs): # noqa: E501 - """List settlement history. # noqa: E501 + """List settlement history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -489,9 +489,9 @@ def list_options_settlements(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -509,7 +509,7 @@ def list_options_settlements(self, underlying, **kwargs): # noqa: E501 return self.list_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List settlement history. # noqa: E501 + """List settlement history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -517,9 +517,9 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -619,7 +619,7 @@ def list_options_settlements_with_http_info(self, underlying, **kwargs): # noqa collection_formats=collection_formats) def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E501 - """Get specified contract's settlement. # noqa: E501 + """Get specified contract settlement information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -628,7 +628,7 @@ def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E :param bool async_req: execute request asynchronously :param str contract: (required) - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param int at: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -645,7 +645,7 @@ def get_options_settlement(self, contract, underlying, at, **kwargs): # noqa: E return self.get_options_settlement_with_http_info(contract, underlying, at, **kwargs) # noqa: E501 def get_options_settlement_with_http_info(self, contract, underlying, at, **kwargs): # noqa: E501 - """Get specified contract's settlement. # noqa: E501 + """Get specified contract settlement information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -654,7 +654,7 @@ def get_options_settlement_with_http_info(self, contract, underlying, at, **kwar :param bool async_req: execute request asynchronously :param str contract: (required) - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param int at: (required) :param _return_http_data_only: response data without head status code and headers @@ -749,7 +749,7 @@ def get_options_settlement_with_http_info(self, contract, underlying, at, **kwar collection_formats=collection_formats) def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 - """List my options settlements. # noqa: E501 + """Query personal settlement records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -757,10 +757,10 @@ def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param str contract: Options contract name. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -778,7 +778,7 @@ def list_my_options_settlements(self, underlying, **kwargs): # noqa: E501 return self.list_my_options_settlements_with_http_info(underlying, **kwargs) # noqa: E501 def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List my options settlements. # noqa: E501 + """Query personal settlement records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -786,10 +786,10 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param str contract: Options contract name. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -892,19 +892,19 @@ def list_my_options_settlements_with_http_info(self, underlying, **kwargs): # n collection_formats=collection_formats) def list_options_order_book(self, contract, **kwargs): # noqa: E501 - """Options order book. # noqa: E501 + """Query options contract order book # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_options_order_book(contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. + :param str contract: Options contract name (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -920,19 +920,19 @@ def list_options_order_book(self, contract, **kwargs): # noqa: E501 return self.list_options_order_book_with_http_info(contract, **kwargs) # noqa: E501 def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E501 - """Options order book. # noqa: E501 + """Query options contract order book # noqa: E501 - Bids will be sorted by price from high to low, while asks sorted reversely. # noqa: E501 + Bids will be sorted by price from high to low, while asks sorted reversely # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_options_order_book_with_http_info(contract, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time. + :param str contract: Options contract name (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Whether to return depth update ID. This ID increments by 1 each time depth changes :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1025,7 +1025,7 @@ def list_options_order_book_with_http_info(self, contract, **kwargs): # noqa: E collection_formats=collection_formats) def list_options_tickers(self, underlying, **kwargs): # noqa: E501 - """List tickers of options contracts. # noqa: E501 + """Query options market ticker information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1033,7 +1033,7 @@ def list_options_tickers(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1049,7 +1049,7 @@ def list_options_tickers(self, underlying, **kwargs): # noqa: E501 return self.list_options_tickers_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List tickers of options contracts. # noqa: E501 + """Query options market ticker information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1057,7 +1057,7 @@ def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) + :param str underlying: Underlying (Obtained by listing underlying 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 @@ -1137,7 +1137,7 @@ def list_options_tickers_with_http_info(self, underlying, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 - """Get underlying ticker. # noqa: E501 + """Query underlying ticker information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1145,7 +1145,7 @@ def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying. (required) + :param str underlying: Underlying (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1161,7 +1161,7 @@ def list_options_underlying_tickers(self, underlying, **kwargs): # noqa: E501 return self.list_options_underlying_tickers_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): # noqa: E501 - """Get underlying ticker. # noqa: E501 + """Query underlying ticker information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1169,7 +1169,7 @@ def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying. (required) + :param str underlying: Underlying (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1249,7 +1249,7 @@ def list_options_underlying_tickers_with_http_info(self, underlying, **kwargs): collection_formats=collection_formats) def list_options_candlesticks(self, contract, **kwargs): # noqa: E501 - """Get options candlesticks. # noqa: E501 + """Options contract market candlestick chart # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1257,11 +1257,11 @@ def list_options_candlesticks(self, contract, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str contract: Options contract name (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points. + :param str interval: Time interval between data points :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1277,7 +1277,7 @@ def list_options_candlesticks(self, contract, **kwargs): # noqa: E501 return self.list_options_candlesticks_with_http_info(contract, **kwargs) # noqa: E501 def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: E501 - """Get options candlesticks. # noqa: E501 + """Options contract market candlestick chart # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1285,11 +1285,11 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str contract: Options contract name (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points. + :param str interval: Time interval between data points :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1385,7 +1385,7 @@ def list_options_candlesticks_with_http_info(self, contract, **kwargs): # noqa: collection_formats=collection_formats) def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E501 - """Mark price candlesticks of an underlying. # noqa: E501 + """Underlying index price candlestick chart # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1393,11 +1393,11 @@ def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points. + :param str interval: Time interval between data points :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1413,7 +1413,7 @@ def list_options_underlying_candlesticks(self, underlying, **kwargs): # noqa: E return self.list_options_underlying_candlesticks_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwargs): # noqa: E501 - """Mark price candlesticks of an underlying. # noqa: E501 + """Underlying index price candlestick chart # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1421,11 +1421,11 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param int limit: Maximum number of records to be returned in a single list. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str interval: Interval time between data points. + :param str interval: Time interval between data points :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1521,7 +1521,7 @@ def list_options_underlying_candlesticks_with_http_info(self, underlying, **kwar collection_formats=collection_formats) def list_options_trades(self, **kwargs): # noqa: E501 - """Options trade history. # noqa: E501 + """Market trade records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1529,10 +1529,10 @@ def list_options_trades(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. - :param str type: `C` is call, while `P` is put. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str contract: Options contract name + :param str type: `C` for call, `P` for put + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1550,7 +1550,7 @@ def list_options_trades(self, **kwargs): # noqa: E501 return self.list_options_trades_with_http_info(**kwargs) # noqa: E501 def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 - """Options trade history. # noqa: E501 + """Market trade records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1558,10 +1558,10 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. - :param str type: `C` is call, while `P` is put. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str contract: Options contract name + :param str type: `C` for call, `P` for put + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -1660,7 +1660,7 @@ def list_options_trades_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_account(self, **kwargs): # noqa: E501 - """List options account. # noqa: E501 + """Query account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1683,7 +1683,7 @@ def list_options_account(self, **kwargs): # noqa: E501 return self.list_options_account_with_http_info(**kwargs) # noqa: E501 def list_options_account_with_http_info(self, **kwargs): # noqa: E501 - """List options account. # noqa: E501 + """Query account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1763,7 +1763,7 @@ def list_options_account_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_account_book(self, **kwargs): # noqa: E501 - """List account changing history. # noqa: E501 + """Query account change history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1771,11 +1771,11 @@ def list_options_account_book(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL + :param str type: Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1791,7 +1791,7 @@ def list_options_account_book(self, **kwargs): # noqa: E501 return self.list_options_account_book_with_http_info(**kwargs) # noqa: E501 def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 - """List account changing history. # noqa: E501 + """Query account change history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1799,11 +1799,11 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL + :param str type: Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1897,7 +1897,7 @@ def list_options_account_book_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_positions(self, **kwargs): # noqa: E501 - """List user's positions of specified underlying. # noqa: E501 + """List user's positions of specified underlying # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1905,7 +1905,7 @@ def list_options_positions(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying. + :param str underlying: Underlying :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1921,7 +1921,7 @@ def list_options_positions(self, **kwargs): # noqa: E501 return self.list_options_positions_with_http_info(**kwargs) # noqa: E501 def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 - """List user's positions of specified underlying. # noqa: E501 + """List user's positions of specified underlying # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1929,7 +1929,7 @@ def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying. + :param str underlying: Underlying :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2005,7 +2005,7 @@ def list_options_positions_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_options_position(self, contract, **kwargs): # noqa: E501 - """Get specified contract position. # noqa: E501 + """Get specified contract position # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2029,7 +2029,7 @@ def get_options_position(self, contract, **kwargs): # noqa: E501 return self.get_options_position_with_http_info(contract, **kwargs) # noqa: E501 def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501 - """Get specified contract position. # noqa: E501 + """Get specified contract position # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2117,7 +2117,7 @@ def get_options_position_with_http_info(self, contract, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_options_position_close(self, underlying, **kwargs): # noqa: E501 - """List user's liquidation history of specified underlying. # noqa: E501 + """List user's liquidation history of specified underlying # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2125,8 +2125,8 @@ def list_options_position_close(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param str contract: Options contract name. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2142,7 +2142,7 @@ def list_options_position_close(self, underlying, **kwargs): # noqa: E501 return self.list_options_position_close_with_http_info(underlying, **kwargs) # noqa: E501 def list_options_position_close_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List user's liquidation history of specified underlying. # noqa: E501 + """List user's liquidation history of specified underlying # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2150,8 +2150,8 @@ def list_options_position_close_with_http_info(self, underlying, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param str contract: Options contract name. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2234,7 +2234,7 @@ def list_options_position_close_with_http_info(self, underlying, **kwargs): # n collection_formats=collection_formats) def list_options_orders(self, status, **kwargs): # noqa: E501 - """List options orders. # noqa: E501 + """List options orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2242,11 +2242,11 @@ def list_options_orders(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status. (required) - :param str contract: Options contract name. - :param str underlying: Underlying. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str status: Query order list based on status (required) + :param str contract: Options contract name + :param str underlying: Underlying + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2264,7 +2264,7 @@ def list_options_orders(self, status, **kwargs): # noqa: E501 return self.list_options_orders_with_http_info(status, **kwargs) # noqa: E501 def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 - """List options orders. # noqa: E501 + """List options orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2272,11 +2272,11 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status. (required) - :param str contract: Options contract name. - :param str underlying: Underlying. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str status: Query order list based on status (required) + :param str contract: Options contract name + :param str underlying: Underlying + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -2382,7 +2382,7 @@ def list_options_orders_with_http_info(self, status, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_options_order(self, options_order, **kwargs): # noqa: E501 - """Create an options order. # noqa: E501 + """Create an options order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2406,7 +2406,7 @@ def create_options_order(self, options_order, **kwargs): # noqa: E501 return self.create_options_order_with_http_info(options_order, **kwargs) # noqa: E501 def create_options_order_with_http_info(self, options_order, **kwargs): # noqa: E501 - """Create an options order. # noqa: E501 + """Create an options order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2498,7 +2498,7 @@ def create_options_order_with_http_info(self, options_order, **kwargs): # noqa: collection_formats=collection_formats) def cancel_options_orders(self, **kwargs): # noqa: E501 - """Cancel all `open` orders matched. # noqa: E501 + """Cancel all orders with 'open' status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2506,9 +2506,9 @@ def cancel_options_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. - :param str underlying: Underlying. - :param str side: All bids or asks. Both included if not specified. + :param str contract: Options contract name + :param str underlying: Underlying + :param str side: Specify all bids or all asks, both included if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2524,7 +2524,7 @@ def cancel_options_orders(self, **kwargs): # noqa: E501 return self.cancel_options_orders_with_http_info(**kwargs) # noqa: E501 def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 - """Cancel all `open` orders matched. # noqa: E501 + """Cancel all orders with 'open' status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2532,9 +2532,9 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str contract: Options contract name. - :param str underlying: Underlying. - :param str side: All bids or asks. Both included if not specified. + :param str contract: Options contract name + :param str underlying: Underlying + :param str side: Specify all bids or all asks, both included if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2616,7 +2616,7 @@ def cancel_options_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_options_order(self, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2624,7 +2624,7 @@ def get_options_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation. (required) + :param int order_id: Order ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2640,7 +2640,7 @@ def get_options_order(self, order_id, **kwargs): # noqa: E501 return self.get_options_order_with_http_info(order_id, **kwargs) # noqa: E501 def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2648,7 +2648,7 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation. (required) + :param int order_id: Order ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2728,7 +2728,7 @@ def get_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_options_order(self, order_id, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2736,7 +2736,7 @@ def cancel_options_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation. (required) + :param int order_id: Order ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2752,7 +2752,7 @@ def cancel_options_order(self, order_id, **kwargs): # noqa: E501 return self.cancel_options_order_with_http_info(order_id, **kwargs) # noqa: E501 def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2760,7 +2760,7 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int order_id: Order ID returned on successful order creation. (required) + :param int order_id: Order ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2840,7 +2840,7 @@ def cancel_options_order_with_http_info(self, order_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def countdown_cancel_all_options(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 - """Countdown cancel orders. # noqa: E501 + """Countdown cancel orders # noqa: E501 Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2865,7 +2865,7 @@ def countdown_cancel_all_options(self, countdown_cancel_all_options_task, **kwar return self.countdown_cancel_all_options_with_http_info(countdown_cancel_all_options_task, **kwargs) # noqa: E501 def countdown_cancel_all_options_with_http_info(self, countdown_cancel_all_options_task, **kwargs): # noqa: E501 - """Countdown cancel orders. # noqa: E501 + """Countdown cancel orders # noqa: E501 Option order heartbeat detection, when the `timeout` time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related `option pending order` will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown `timeout` set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the `underlying` `contract` you specified will be automatically cancelled. If `underlying` `contract` is not specified, user will be automatically cancelled If `timeout` is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2958,7 +2958,7 @@ def countdown_cancel_all_options_with_http_info(self, countdown_cancel_all_optio collection_formats=collection_formats) def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2966,10 +2966,10 @@ def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param str contract: Options contract name. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2987,7 +2987,7 @@ def list_my_options_trades(self, underlying, **kwargs): # noqa: E501 return self.list_my_options_trades_with_http_info(underlying, **kwargs) # noqa: E501 def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2995,10 +2995,10 @@ def list_my_options_trades_with_http_info(self, underlying, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying (Obtained by listing underlying endpoint). (required) - :param str contract: Options contract name. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str underlying: Underlying (Obtained by listing underlying endpoint) (required) + :param str contract: Options contract name + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp :param _return_http_data_only: response data without head status code @@ -3109,7 +3109,7 @@ def get_options_mmp(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying. + :param str underlying: Underlying :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3133,7 +3133,7 @@ def get_options_mmp_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str underlying: Underlying. + :param str underlying: Underlying :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index aab8176..fda77e3 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,21 +37,21 @@ def __init__(self, api_client=None): self.api_client = api_client def agency_transaction_history(self, **kwargs): # noqa: E501 - """The agency obtains the transaction history of the recommended user. # noqa: E501 + """Broker obtains transaction history of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_transaction_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -67,21 +67,21 @@ def agency_transaction_history(self, **kwargs): # noqa: E501 return self.agency_transaction_history_with_http_info(**kwargs) # noqa: E501 def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """The agency obtains the transaction history of the recommended user. # noqa: E501 + """Broker obtains transaction history of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_transaction_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -178,21 +178,21 @@ def agency_transaction_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def agency_commissions_history(self, **kwargs): # noqa: E501 - """The agency obtains the commission history of the recommended user. # noqa: E501 + """Broker obtains rebate history of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_commissions_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -208,21 +208,21 @@ def agency_commissions_history(self, **kwargs): # noqa: E501 return self.agency_commissions_history_with_http_info(**kwargs) # noqa: E501 def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 - """The agency obtains the commission history of the recommended user. # noqa: E501 + """Broker obtains rebate history of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.agency_commissions_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -319,21 +319,21 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def partner_transaction_history(self, **kwargs): # noqa: E501 - """Partner obtains transaction records of recommended users. # noqa: E501 + """Partner obtains transaction history of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_transaction_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -349,21 +349,21 @@ def partner_transaction_history(self, **kwargs): # noqa: E501 return self.partner_transaction_history_with_http_info(**kwargs) # noqa: E501 def partner_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """Partner obtains transaction records of recommended users. # noqa: E501 + """Partner obtains transaction history of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_transaction_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify the currency pair, if not specified, return all currency pairs. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency_pair: Specify the trading pair. If not specified, returns all trading pairs + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -460,21 +460,21 @@ def partner_transaction_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def partner_commissions_history(self, **kwargs): # noqa: E501 - """Partner obtains commission records of recommended users. # noqa: E501 + """Partner obtains rebate records of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_commissions_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -490,21 +490,21 @@ def partner_commissions_history(self, **kwargs): # noqa: E501 return self.partner_commissions_history_with_http_info(**kwargs) # noqa: E501 def partner_commissions_history_with_http_info(self, **kwargs): # noqa: E501 - """Partner obtains commission records of recommended users. # noqa: E501 + """Partner obtains rebate records of recommended users # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_commissions_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -601,18 +601,18 @@ def partner_commissions_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def partner_sub_list(self, **kwargs): # noqa: E501 - """Partner subordinate list. # noqa: E501 + """Partner subordinate list # noqa: E501 - Including sub-agents, direct customers, indirect customers. # noqa: E501 + Including sub-agents, direct customers, and indirect customers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_sub_list(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: User ID. If not specified, all user records will be returned. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int user_id: User ID. If not specified, all user records will be returned + :param int 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. @@ -628,18 +628,18 @@ def partner_sub_list(self, **kwargs): # noqa: E501 return self.partner_sub_list_with_http_info(**kwargs) # noqa: E501 def partner_sub_list_with_http_info(self, **kwargs): # noqa: E501 - """Partner subordinate list. # noqa: E501 + """Partner subordinate list # noqa: E501 - Including sub-agents, direct customers, indirect customers. # noqa: E501 + Including sub-agents, direct customers, and indirect customers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.partner_sub_list_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: User ID. If not specified, all user records will be returned. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param int user_id: User ID. If not specified, all user records will be returned + :param int 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 @@ -727,20 +727,20 @@ def partner_sub_list_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def rebate_broker_commission_history(self, **kwargs): # noqa: E501 - """The broker obtains the user's commission rebate records. # noqa: E501 + """Broker obtains user's rebate records # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_commission_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time + :param int to: End timestamp for the query, defaults to current time if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -756,20 +756,20 @@ def rebate_broker_commission_history(self, **kwargs): # noqa: E501 return self.rebate_broker_commission_history_with_http_info(**kwargs) # noqa: E501 def rebate_broker_commission_history_with_http_info(self, **kwargs): # noqa: E501 - """The broker obtains the user's commission rebate records. # noqa: E501 + """Broker obtains user's rebate records # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_commission_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time + :param int to: End timestamp for the query, defaults to current time if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -863,20 +863,20 @@ def rebate_broker_commission_history_with_http_info(self, **kwargs): # noqa: E5 collection_formats=collection_formats) def rebate_broker_transaction_history(self, **kwargs): # noqa: E501 - """The broker obtains the user's trading history. # noqa: E501 + """Broker obtains user's trading history # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_transaction_history(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time + :param int to: End timestamp for the query, defaults to current time if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -892,20 +892,20 @@ def rebate_broker_transaction_history(self, **kwargs): # noqa: E501 return self.rebate_broker_transaction_history_with_http_info(**kwargs) # noqa: E501 def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E501 - """The broker obtains the user's trading history. # noqa: E501 + """Broker obtains user's trading history # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rebate_broker_transaction_history_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. - :param int user_id: User ID. If not specified, all user records will be returned. - :param int _from: The start time of the query record. If not specified, the default is to push forward 30 days from the current time. - :param int to: Time range ending, default to current time. + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 + :param int user_id: User ID. If not specified, all user records will be returned + :param int _from: Start time of the query record. If not specified, defaults to 30 days before the current time + :param int to: End timestamp for the query, defaults to current time if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -999,7 +999,7 @@ def rebate_broker_transaction_history_with_http_info(self, **kwargs): # noqa: E collection_formats=collection_formats) def rebate_user_info(self, **kwargs): # noqa: E501 - """User retrieves rebate information. # noqa: E501 + """User obtains rebate information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1022,7 +1022,7 @@ def rebate_user_info(self, **kwargs): # noqa: E501 return self.rebate_user_info_with_http_info(**kwargs) # noqa: E501 def rebate_user_info_with_http_info(self, **kwargs): # noqa: E501 - """User retrieves rebate information. # noqa: E501 + """User obtains rebate information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1102,16 +1102,16 @@ def rebate_user_info_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def user_sub_relation(self, user_id_list, **kwargs): # noqa: E501 - """User-subordinate relationship. # noqa: E501 + """User subordinate relationship # noqa: E501 - Query whether the specified user is in the system. # noqa: E501 + Query whether the specified user is within the system # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_sub_relation(user_id_list, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100. (required) + :param str user_id_list: Query user ID list, separated by commas. If more than 100, only 100 will be returned (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1127,16 +1127,16 @@ def user_sub_relation(self, user_id_list, **kwargs): # noqa: E501 return self.user_sub_relation_with_http_info(user_id_list, **kwargs) # noqa: E501 def user_sub_relation_with_http_info(self, user_id_list, **kwargs): # noqa: E501 - """User-subordinate relationship. # noqa: E501 + """User subordinate relationship # noqa: E501 - Query whether the specified user is in the system. # noqa: E501 + Query whether the specified user is within the system # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_sub_relation_with_http_info(user_id_list, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str user_id_list: Query the user's ID list, split by,, if there are more than 100, take 100. (required) + :param str user_id_list: Query user ID list, separated by commas. If more than 100, only 100 will be returned (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py index bce4696..eb9e8ef 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,9 +37,9 @@ def __init__(self, api_client=None): self.api_client = api_client def list_currencies(self, **kwargs): # noqa: E501 - """List all currencies' details. # noqa: E501 + """Query all currency information # noqa: E501 - When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 + When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_currencies(async_req=True) @@ -61,9 +61,9 @@ def list_currencies(self, **kwargs): # noqa: E501 return self.list_currencies_with_http_info(**kwargs) # noqa: E501 def list_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List all currencies' details. # noqa: E501 + """Query all currency information # noqa: E501 - When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain. # noqa: E501 + When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_currencies_with_http_info(async_req=True) @@ -142,7 +142,7 @@ def list_currencies_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_currency(self, currency, **kwargs): # noqa: E501 - """Get details of a specific currency. # noqa: E501 + """Query single currency information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -150,7 +150,7 @@ def get_currency(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name. (required) + :param str currency: Currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -166,7 +166,7 @@ def get_currency(self, currency, **kwargs): # noqa: E501 return self.get_currency_with_http_info(currency, **kwargs) # noqa: E501 def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 - """Get details of a specific currency. # noqa: E501 + """Query single currency information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -174,7 +174,7 @@ def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name. (required) + :param str currency: Currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -254,7 +254,7 @@ def get_currency_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_currency_pairs(self, **kwargs): # noqa: E501 - """List all currency pairs supported. # noqa: E501 + """Query all supported currency pairs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -277,7 +277,7 @@ def list_currency_pairs(self, **kwargs): # noqa: E501 return self.list_currency_pairs_with_http_info(**kwargs) # noqa: E501 def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 - """List all currency pairs supported. # noqa: E501 + """Query all supported currency pairs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -357,7 +357,7 @@ def list_currency_pairs_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501 - """Get details of a specifc currency pair. # noqa: E501 + """Query single currency pair details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -365,7 +365,7 @@ def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -381,7 +381,7 @@ def get_currency_pair(self, currency_pair, **kwargs): # noqa: E501 return self.get_currency_pair_with_http_info(currency_pair, **kwargs) # noqa: E501 def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Get details of a specifc currency pair. # noqa: E501 + """Query single currency pair details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -389,7 +389,7 @@ def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) + :param str currency_pair: Currency pair (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -469,17 +469,17 @@ def get_currency_pair_with_http_info(self, currency_pair, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_tickers(self, **kwargs): # noqa: E501 - """Retrieve ticker information. # noqa: E501 + """Get currency pair ticker information # noqa: E501 - Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 + If `currency_pair` is specified, only query that currency pair; otherwise return all information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_tickers(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str timezone: Timezone. + :param str currency_pair: Currency pair + :param str timezone: Timezone :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -495,17 +495,17 @@ def list_tickers(self, **kwargs): # noqa: E501 return self.list_tickers_with_http_info(**kwargs) # noqa: E501 def list_tickers_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve ticker information. # noqa: E501 + """Get currency pair ticker information # noqa: E501 - Return only related data if `currency_pair` is specified; otherwise return all of them # noqa: E501 + If `currency_pair` is specified, only query that currency pair; otherwise return all information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_tickers_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str timezone: Timezone. + :param str currency_pair: Currency pair + :param str timezone: Timezone :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -584,19 +584,19 @@ def list_tickers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_order_book(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve order book. # noqa: E501 + """Get market depth information # noqa: E501 - Market depth buy orders are sorted by price from high to low, sell orders are reversed # noqa: E501 + Market depth buy orders are sorted by price from high to low, sell orders are sorted from low to high # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_order_book(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Return order book ID. + :param str currency_pair: Currency pair (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Return order book update ID :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -612,19 +612,19 @@ def list_order_book(self, currency_pair, **kwargs): # noqa: E501 return self.list_order_book_with_http_info(currency_pair, **kwargs) # noqa: E501 def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve order book. # noqa: E501 + """Get market depth information # noqa: E501 - Market depth buy orders are sorted by price from high to low, sell orders are reversed # noqa: E501 + Market depth buy orders are sorted by price from high to low, sell orders are sorted from low to high # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_order_book_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) - :param str interval: Order depth. 0 means no aggregation is applied. default to 0. - :param int limit: Maximum number of order depth data in asks or bids. - :param bool with_id: Return order book ID. + :param str currency_pair: Currency pair (required) + :param str interval: Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified + :param int limit: Number of depth levels + :param bool with_id: Return order book update ID :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -715,22 +715,22 @@ def list_order_book_with_http_info(self, currency_pair, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_trades(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve market trades. # noqa: E501 + """Query market transaction records # noqa: E501 - Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 + Supports querying by time range using `from` and `to` parameters or pagination based on `last_id`. By default, queries the last 30 days. Pagination based on `last_id` is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_trades(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param int page: Page number. + :param str currency_pair: Currency pair (required) + :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param bool reverse: Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param int page: Page number :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -746,22 +746,22 @@ def list_trades(self, currency_pair, **kwargs): # noqa: E501 return self.list_trades_with_http_info(currency_pair, **kwargs) # noqa: E501 def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Retrieve market trades. # noqa: E501 + """Query market transaction records # noqa: E501 - Supports `from` and `to` by time range query or page-turn query based on `last_id`. By default, is the last 30 days. The query method based on `last_id` page turn is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 + Supports querying by time range using `from` and `to` parameters or pagination based on `last_id`. By default, queries the last 30 days. Pagination based on `last_id` is no longer recommended. If `last_id` is specified, the time range query parameters will be ignored. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_trades_with_http_info(currency_pair, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. - :param bool reverse: Whether the id of records to be retrieved should be less than the last_id specified. Default to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param int page: Page number. + :param str currency_pair: Currency pair (required) + :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 + :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param bool reverse: Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param int page: Page number :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -865,7 +865,7 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501 - """Market candlesticks. # noqa: E501 + """Market K-line chart # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -874,11 +874,11 @@ def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str currency_pair: Currency pair (required) + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param str interval: Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -894,7 +894,7 @@ def list_candlesticks(self, currency_pair, **kwargs): # noqa: E501 return self.list_candlesticks_with_http_info(currency_pair, **kwargs) # noqa: E501 def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E501 - """Market candlesticks. # noqa: E501 + """Market K-line chart # noqa: E501 Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -903,11 +903,11 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. (required) - :param int limit: Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. + :param str currency_pair: Currency pair (required) + :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified - :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision specified - :param str interval: Interval time between data points. Note that `30d` means 1 natual month, not 30 days + :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision + :param str interval: Time interval between data points. Note that `30d` represents a calendar month, not aligned to 30 days :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1001,16 +1001,16 @@ def list_candlesticks_with_http_info(self, currency_pair, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_fee(self, **kwargs): # noqa: E501 - """Query user trading fee rates. # noqa: E501 + """Query account fee rates # noqa: E501 - This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 + This API is deprecated. The new fee query API is `/wallet/fee` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_fee(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs + :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1026,16 +1026,16 @@ def get_fee(self, **kwargs): # noqa: E501 return self.get_fee_with_http_info(**kwargs) # noqa: E501 def get_fee_with_http_info(self, **kwargs): # noqa: E501 - """Query user trading fee rates. # noqa: E501 + """Query account fee rates # noqa: E501 - This API is deprecated in favour of new fee retrieving API `/wallet/fee`. # noqa: E501 + This API is deprecated. The new fee query API is `/wallet/fee` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_fee_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs + :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1111,7 +1111,7 @@ def get_fee_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 - """Query a batch of user trading fee rates. # noqa: E501 + """Batch query account fee rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1119,7 +1119,7 @@ def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pairs: A request can only query up to 50 currency pairs. (required) + :param str currency_pairs: Maximum 50 currency pairs per request (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1135,7 +1135,7 @@ def get_batch_spot_fee(self, currency_pairs, **kwargs): # noqa: E501 return self.get_batch_spot_fee_with_http_info(currency_pairs, **kwargs) # noqa: E501 def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: E501 - """Query a batch of user trading fee rates. # noqa: E501 + """Batch query account fee rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1143,7 +1143,7 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pairs: A request can only query up to 50 currency pairs. (required) + :param str currency_pairs: Maximum 50 currency pairs per request (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1223,7 +1223,7 @@ def get_batch_spot_fee_with_http_info(self, currency_pairs, **kwargs): # noqa: collection_formats=collection_formats) def list_spot_accounts(self, **kwargs): # noqa: E501 - """List spot accounts. # noqa: E501 + """List spot trading accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1231,7 +1231,7 @@ def list_spot_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. + :param str currency: Query by specified currency name :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1247,7 +1247,7 @@ def list_spot_accounts(self, **kwargs): # noqa: E501 return self.list_spot_accounts_with_http_info(**kwargs) # noqa: E501 def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501 - """List spot accounts. # noqa: E501 + """List spot trading accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1255,7 +1255,7 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. + :param str currency: Query by specified currency name :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1331,22 +1331,22 @@ def list_spot_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_spot_account_book(self, **kwargs): # noqa: E501 - """Query account book. # noqa: E501 + """Query spot account transaction history # noqa: E501 - Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 + Record query time range cannot exceed 30 days. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_spot_account_book(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` + :param str currency: Query by specified currency name + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param str type: Query by specified account change type. If not specified, all change types will be included. + :param str code: Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1362,22 +1362,22 @@ def list_spot_account_book(self, **kwargs): # noqa: E501 return self.list_spot_account_book_with_http_info(**kwargs) # noqa: E501 def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501 - """Query account book. # noqa: E501 + """Query spot account transaction history # noqa: E501 - Record query time range is not allowed to exceed 30 days. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 + Record query time range cannot exceed 30 days. When using limit&page pagination to retrieve data, the maximum number of pages is 100,000, that is, limit * (page - 1) <= 100,000. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_spot_account_book_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param int page: Page number. - :param int limit: Maximum number of records to be returned in a single list. - :param str type: Only retrieve changes of the specified type. All types will be returned if not specified. - :param str code: Specify account change code query, if not specified, all change types are included, and the priority is higher than `type` + :param str currency: Query by specified currency name + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param int page: Page number + :param int limit: Maximum number of records returned in a single list + :param str type: Query by specified account change type. If not specified, all change types will be included. + :param str code: Specify account change code for query. If not specified, all change types are included. This parameter has higher priority than `type` :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1477,9 +1477,9 @@ def list_spot_account_book_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_batch_orders(self, order, **kwargs): # noqa: E501 - """Create a batch of orders. # noqa: E501 + """Batch place orders # noqa: E501 - Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 + Batch order requirements: 1. Custom order field `text` must be specified 2. Up to 4 currency pairs per request, with up to 10 orders per currency pair 3. Spot orders and margin orders cannot be mixed; all `account` fields in the same request must be identical # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_batch_orders(order, async_req=True) @@ -1503,9 +1503,9 @@ def create_batch_orders(self, order, **kwargs): # noqa: E501 return self.create_batch_orders_with_http_info(order, **kwargs) # noqa: E501 def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501 - """Create a batch of orders. # noqa: E501 + """Batch place orders # noqa: E501 - Batch orders requirements: 1. custom order field `text` is required 2. At most 4 currency pairs, maximum 10 orders each, are allowed in one request 3. No mixture of spot orders and margin orders, i.e. `account` must be identical for all orders # noqa: E501 + Batch order requirements: 1. Custom order field `text` must be specified 2. Up to 4 currency pairs per request, with up to 10 orders per currency pair 3. Spot orders and margin orders cannot be mixed; all `account` fields in the same request must be identical # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_batch_orders_with_http_info(order, async_req=True) @@ -1600,7 +1600,7 @@ def create_batch_orders_with_http_info(self, order, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_all_open_orders(self, **kwargs): # noqa: E501 - """List all open orders. # noqa: E501 + """List all open orders # noqa: E501 Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1609,9 +1609,9 @@ def list_all_open_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records returned in one page in each currency pair. - :param str account: Specify query account. + :param int page: Page number + :param int limit: Maximum number of records returned in one page in each currency pair + :param str account: Specify query account :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1627,7 +1627,7 @@ def list_all_open_orders(self, **kwargs): # noqa: E501 return self.list_all_open_orders_with_http_info(**kwargs) # noqa: E501 def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501 - """List all open orders. # noqa: E501 + """List all open orders # noqa: E501 Query the current order list of all trading pairs. Please note that the paging parameter controls the number of pending orders in each trading pair. There is no paging control trading pairs. All trading pairs with pending orders will be returned. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1636,9 +1636,9 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int page: Page number. - :param int limit: Maximum number of records returned in one page in each currency pair. - :param str account: Specify query account. + :param int page: Page number + :param int limit: Maximum number of records returned in one page in each currency pair + :param str account: Specify query account :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1726,9 +1726,9 @@ def list_all_open_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501 - """close position when cross-currency is disabled. # noqa: E501 + """Close position when cross-currency is disabled # noqa: E501 - Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 + Currently, only cross-margin accounts are supported to place buy orders for disabled currencies. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in pending orders) / 0.998 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_cross_liquidate_order(liquidate_order, async_req=True) @@ -1751,9 +1751,9 @@ def create_cross_liquidate_order(self, liquidate_order, **kwargs): # noqa: E501 return self.create_cross_liquidate_order_with_http_info(liquidate_order, **kwargs) # noqa: E501 def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs): # noqa: E501 - """close position when cross-currency is disabled. # noqa: E501 + """Close position when cross-currency is disabled # noqa: E501 - Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998 # noqa: E501 + Currently, only cross-margin accounts are supported to place buy orders for disabled currencies. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in pending orders) / 0.998 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_cross_liquidate_order_with_http_info(liquidate_order, async_req=True) @@ -1844,23 +1844,23 @@ def create_cross_liquidate_order_with_http_info(self, liquidate_order, **kwargs) collection_formats=collection_formats) def list_orders(self, currency_pair, status, **kwargs): # noqa: E501 - """List orders. # noqa: E501 + """List orders # noqa: E501 - Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 + Note that query results default to spot order lists for spot, unified account, and isolated margin accounts. When `status` is set to `open` (i.e., when querying pending order lists), only `page` and `limit` pagination controls are supported. `limit` can only be set to a maximum of 100. The `side` parameter and time range query parameters `from` and `to` are not supported. When `status` is set to `finished` (i.e., when querying historical orders), in addition to pagination queries, `from` and `to` time range queries are also supported. Additionally, the `side` parameter can be set to filter one-sided history. Time range filter parameters are processed according to the order end time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_orders(currency_pair, status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) + :param str currency_pair: Query by specified currency pair. Required for open orders, optional for filled orders (required) :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) - :param int page: Page number. + :param int page: Page number :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 - :param str account: Specify query account. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str side: All bids or asks. Both included if not specified. + :param str account: Specify query account + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str side: Specify all bids or all asks, both included if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1876,23 +1876,23 @@ def list_orders(self, currency_pair, status, **kwargs): # noqa: E501 return self.list_orders_with_http_info(currency_pair, status, **kwargs) # noqa: E501 def list_orders_with_http_info(self, currency_pair, status, **kwargs): # noqa: E501 - """List orders. # noqa: E501 + """List orders # noqa: E501 - Note that the query results are spot order lists for spot, unified account and warehouse-by-site leverage accounts by default. `status` is set to `open`, that is, when querying the pending order list, only pagination control of `page` and `limit` is supported. `limit` Maximum setting is only allowed to 100 . The `side` and `from`, `to` parameters for time range query are not supported. `status` when querying historical delegations, in addition to pagination queries, `from` and `to` are also supported by time range queries. In addition, it supports setting the `side` parameter to filter one-side history. The parameters of the time range filtering are processed according to the order end time. # noqa: E501 + Note that query results default to spot order lists for spot, unified account, and isolated margin accounts. When `status` is set to `open` (i.e., when querying pending order lists), only `page` and `limit` pagination controls are supported. `limit` can only be set to a maximum of 100. The `side` parameter and time range query parameters `from` and `to` are not supported. When `status` is set to `finished` (i.e., when querying historical orders), in addition to pagination queries, `from` and `to` time range queries are also supported. Additionally, the `side` parameter can be set to filter one-sided history. Time range filter parameters are processed according to the order end time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_orders_with_http_info(currency_pair, status, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required) + :param str currency_pair: Query by specified currency pair. Required for open orders, optional for filled orders (required) :param str status: List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required) - :param int page: Page number. + :param int page: Page number :param int limit: Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 - :param str account: Specify query account. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str side: All bids or asks. Both included if not specified. + :param str account: Specify query account + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str side: Specify all bids or all asks, both included if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2003,9 +2003,9 @@ 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 an order # noqa: E501 - Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 + Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_order(order, async_req=True) @@ -2029,9 +2029,9 @@ 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 an order # noqa: E501 - Support spot, margin, leverage, and full-position leverage orders. Use different accounts through the `account` field, default is `spot`, that is, use the spot account to place an order if the user is `unified` account, default is to place an order with a unified account When using leveraged account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, In the case of insufficient account balance, the system will automatically execute the `POST /margin/uni/loans` to borrow the insufficient part. Whether the assets obtained after the leveraged order is automatically used to return the borrowing orders of the leveraged account in a position-by-store leverage account depends on the automatic repayment settings of the user's position-by-store leverage account**, The account automatic repayment settings can be queried and set through `/margin/auto_repay`. Use unified is set to `unified`, `auto_borrow` \" can also be enableTo realize the insufficient part of automatic borrowing, but unlike the leverage account, whether the entrustment of a unified account is automatically repayable depends on the when placing an order`auto_repay` setting, this setting is only effective for the current entrustment, that is, only the assets obtained after the entrustment transaction will be used to repay the borrowing orders of the full-position leverage account. Unified account ordering currently supports `auto_borrow` and `auto_repay` at the same time. Auto repayment will be triggered at the end of the order, i.e. `status` is `cancelled` or `closed` . **Delegation Status** The entrustment status in the pending order is `open`, which remains at `open` until all the quantity is traded. If it is eaten, the order ends and the status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of whether there are partial transactions, the status will become `cancelled` **Iceberg Entrustment** `iceberg` is used to set the number of iceberg delegations displayed, and does not support complete hiding. Note that when hidden part of the transaction is charged according to the taker's handling rate. **Restrict user transactions** Set `stp_act` to decide to use strategies that limit user transactions # noqa: E501 + Supports spot, margin, leverage, and cross-margin leverage orders. Use different accounts through the `account` field. Default is `spot`, which means using the spot account to place orders. If the user has a `unified` account, the default is to place orders with the unified account. When using leveraged account trading (i.e., when `account` is set to `margin`), you can set `auto_borrow` to `true`. In case of insufficient account balance, the system will automatically execute `POST /margin/uni/loans` to borrow the insufficient amount. Whether assets obtained after leveraged order execution are automatically used to repay borrowing orders of the isolated margin account depends on the automatic repayment settings of the user's isolated margin account. Account automatic repayment settings can be queried and set through `/margin/auto_repay`. When using unified account trading (i.e., when `account` is set to `unified`), `auto_borrow` can also be enabled to realize automatic borrowing of insufficient amounts. However, unlike the isolated margin account, whether unified account orders are automatically repaid depends on the `auto_repay` setting when placing the order. This setting only applies to the current order, meaning only assets obtained after order execution will be used to repay borrowing orders of the cross-margin account. Unified account ordering currently supports enabling both `auto_borrow` and `auto_repay` simultaneously. Auto repayment will be triggered when the order ends, i.e., when `status` is `cancelled` or `closed`. **Order Status** The order status in pending orders is `open`, which remains `open` until all quantity is filled. If fully filled, the order ends and status becomes `closed`. If the order is cancelled before all transactions are completed, regardless of partial fills, the status will become `cancelled`. **Iceberg Orders** `iceberg` is used to set the displayed quantity of iceberg orders and does not support complete hiding. Note that hidden portions are charged according to the taker's fee rate. **Self-Trade Prevention** Set `stp_act` to determine the self-trade prevention strategy to use # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_order_with_http_info(order, async_req=True) @@ -2126,19 +2126,19 @@ def create_order_with_http_info(self, order, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_orders(self, **kwargs): # noqa: E501 - """Cancel all `open` orders in specified currency pair. # noqa: E501 + """Cancel all `open` orders in specified currency pair # noqa: E501 - When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 + When the `account` parameter is not specified, all pending orders including spot, unified account, and isolated margin will be cancelled. When `currency_pair` is not specified, all trading pair pending orders will be cancelled. You can specify a particular account to cancel all pending orders under that account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_orders(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str side: All bids or asks. Both included if not specified. - :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify unified - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str currency_pair: Currency pair + :param str side: Specify all bids or all asks, both included if not specified + :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify `unified` + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2155,19 +2155,19 @@ def cancel_orders(self, **kwargs): # noqa: E501 return self.cancel_orders_with_http_info(**kwargs) # noqa: E501 def cancel_orders_with_http_info(self, **kwargs): # noqa: E501 - """Cancel all `open` orders in specified currency pair. # noqa: E501 + """Cancel all `open` orders in specified currency pair # noqa: E501 - When the `account` parameter is not specified, all pending orders including spot, unified account, and position-by-position leverage will be cancelled. When transaction pairs are revoked You can specify a certain account separately to cancel all orders under the specified account # noqa: E501 + When the `account` parameter is not specified, all pending orders including spot, unified account, and isolated margin will be cancelled. When `currency_pair` is not specified, all trading pair pending orders will be cancelled. You can specify a particular account to cancel all pending orders under that account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_orders_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Currency pair. - :param str side: All bids or asks. Both included if not specified. - :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify unified - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str currency_pair: Currency pair + :param str side: Specify all bids or all asks, both included if not specified + :param str account: Specify account type Classic account: All are included if not specified Unified account: Specify `unified` + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code and headers @@ -2256,7 +2256,7 @@ def cancel_orders_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list. # noqa: E501 + """Cancel batch orders by specified ID list # noqa: E501 Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2282,7 +2282,7 @@ def cancel_batch_orders(self, cancel_batch_order, **kwargs): # noqa: E501 return self.cancel_batch_orders_with_http_info(cancel_batch_order, **kwargs) # noqa: E501 def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # noqa: E501 - """Cancel a batch of orders with an ID list. # noqa: E501 + """Cancel batch orders by specified ID list # noqa: E501 Multiple currency pairs can be specified, but maximum 20 orders are allowed per request # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2379,9 +2379,9 @@ def cancel_batch_orders_with_http_info(self, cancel_batch_order, **kwargs): # n collection_formats=collection_formats) def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 - By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 + By default, queries orders for spot, unified account, and isolated margin accounts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_order(order_id, currency_pair, async_req=True) @@ -2389,8 +2389,8 @@ def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. (required) - :param str account: Specify query account. + :param str currency_pair: Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records. (required) + :param str account: Specify query account :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2406,9 +2406,9 @@ def get_order(self, order_id, currency_pair, **kwargs): # noqa: E501 return self.get_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Get a single order. # noqa: E501 + """Query single order details # noqa: E501 - By default, orders for spot, unified account and warehouse-by-site leverage account are checked. # noqa: E501 + By default, queries orders for spot, unified account, and isolated margin accounts. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_order_with_http_info(order_id, currency_pair, async_req=True) @@ -2416,8 +2416,8 @@ def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Specify the transaction pair to query. If you are querying pending order records, this field is traded records, this field can be left blank. (required) - :param str account: Specify query account. + :param str currency_pair: Specify the trading pair to query. This field is required when querying pending order records. This field can be omitted when querying filled order records. (required) + :param str account: Specify query account :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2507,7 +2507,7 @@ def get_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: collection_formats=collection_formats) def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2517,9 +2517,9 @@ def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Currency pair. (required) - :param str account: Specify query account. - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str currency_pair: Currency pair (required) + :param str account: Specify query account + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2536,7 +2536,7 @@ def cancel_order(self, order_id, currency_pair, **kwargs): # noqa: E501 return self.cancel_order_with_http_info(order_id, currency_pair, **kwargs) # noqa: E501 def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noqa: E501 - """Cancel a single order. # noqa: E501 + """Cancel single order # noqa: E501 By default, orders for spot, unified accounts and leveraged accounts are revoked. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2546,9 +2546,9 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) - :param str currency_pair: Currency pair. (required) - :param str account: Specify query account. - :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - ACK: Asynchronous mode, returns only key order fields - RESULT: No clearing information - FULL: Full mode (default) + :param str currency_pair: Currency pair (required) + :param str account: Specify query account + :param str action_mode: Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default) :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code and headers @@ -2645,7 +2645,7 @@ def cancel_order_with_http_info(self, order_id, currency_pair, **kwargs): # noq collection_formats=collection_formats) def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 - """Amend an order. # noqa: E501 + """Amend single order # noqa: E501 Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2656,8 +2656,8 @@ def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) :param OrderPatch order_patch: (required) - :param str currency_pair: Currency pair. - :param str account: Specify query account. + :param str currency_pair: Currency pair + :param str account: Specify query account :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2674,7 +2674,7 @@ def amend_order(self, order_id, order_patch, **kwargs): # noqa: E501 return self.amend_order_with_http_info(order_id, order_patch, **kwargs) # noqa: E501 def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: E501 - """Amend an order. # noqa: E501 + """Amend single order # noqa: E501 Modify orders in spot, unified account and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation and isolated margin account by default. Currently both request body and query support currency_pair and account parameters, but request body has higher priority. currency_pair must be filled in one of the request body or query parameters. About rate limit: Order modification and order creation share the same rate limit rules. About matching priority: Only reducing the quantity does not affect the matching priority. Modifying the price or increasing the quantity will adjust the priority to the end of the new price level. Note: Modifying the quantity to be less than the filled quantity will trigger a cancellation operation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2685,8 +2685,8 @@ def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: :param bool async_req: execute request asynchronously :param str order_id: The order ID returned when the order was successfully created or the custom ID specified by the user's creation (i.e. the `text` field). Operations based on custom IDs can only be checked in pending orders. Only order ID can be used after the order is finished (transaction/cancel) (required) :param OrderPatch order_patch: (required) - :param str currency_pair: Currency pair. - :param str account: Specify query account. + :param str currency_pair: Currency pair + :param str account: Specify query account :param str x_gate_exptime: Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected :param _return_http_data_only: response data without head status code and headers @@ -2787,7 +2787,7 @@ def amend_order_with_http_info(self, order_id, order_patch, **kwargs): # noqa: collection_formats=collection_formats) def list_my_trades(self, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2796,13 +2796,13 @@ def list_my_trades(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair. - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param int page: Page number. + :param str currency_pair: Retrieve results with specified currency pair + :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 + :param int page: Page number :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present - :param str account: Specify query account. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. + :param str account: Specify query account + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2818,7 +2818,7 @@ def list_my_trades(self, **kwargs): # noqa: E501 return self.list_my_trades_with_http_info(**kwargs) # noqa: E501 def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 - """List personal trading history. # noqa: E501 + """Query personal trading records # noqa: E501 By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts. The history within a specified time range can be queried by specifying `from` or (and) `to`. - If no time parameters are specified, only data for the last 7 days can be obtained. - If only any parameter of `from` or `to` is specified, only 7-day data from the start (or end) of the specified time is returned. - The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time. The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2827,13 +2827,13 @@ def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Retrieve results with specified currency pair. - :param int limit: Maximum number of records to be returned in a single list. Default: 100, Minimum: 1, Maximum: 1000 - :param int page: Page number. + :param str currency_pair: Retrieve results with specified currency pair + :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 + :param int page: Page number :param str order_id: Filter trades with specified order ID. `currency_pair` is also required if this field is present - :param str account: Specify query account. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. + :param str account: Specify query account + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2933,7 +2933,7 @@ def list_my_trades_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_system_time(self, **kwargs): # noqa: E501 - """Get server current time. # noqa: E501 + """Get server current time # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2956,7 +2956,7 @@ def get_system_time(self, **kwargs): # noqa: E501 return self.get_system_time_with_http_info(**kwargs) # noqa: E501 def get_system_time_with_http_info(self, **kwargs): # noqa: E501 - """Get server current time. # noqa: E501 + """Get server current time # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3036,7 +3036,7 @@ def get_system_time_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 - """Countdown cancel orders. # noqa: E501 + """Countdown cancel orders # noqa: E501 Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3061,7 +3061,7 @@ def countdown_cancel_all_spot(self, countdown_cancel_all_spot_task, **kwargs): return self.countdown_cancel_all_spot_with_http_info(countdown_cancel_all_spot_task, **kwargs) # noqa: E501 def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_task, **kwargs): # noqa: E501 - """Countdown cancel orders. # noqa: E501 + """Countdown cancel orders # noqa: E501 Spot order heartbeat detection. If there is no \"cancel existing countdown\" or \"set new countdown\" when the user-set `timeout` time is reached, the related `spot pending orders` will be automatically cancelled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at 30s intervals, setting the countdown `timeout` to `30 (seconds)` each time. If this interface is not called again within 30 seconds, all pending orders on the `market` you specified will be automatically cancelled. If no `market` is specified, all market cancelled. If the `timeout` is set to 0 within 30 seconds, the countdown timer will be terminated and the automatic order cancellation function will be cancelled. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -3154,9 +3154,9 @@ def countdown_cancel_all_spot_with_http_info(self, countdown_cancel_all_spot_tas collection_formats=collection_formats) def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 - """Batch modification of orders. # noqa: E501 + """Batch modification of orders # noqa: E501 - Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return is consistent with the order list order. # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_orders(batch_amend_item, async_req=True) @@ -3180,9 +3180,9 @@ def amend_batch_orders(self, batch_amend_item, **kwargs): # noqa: E501 return self.amend_batch_orders_with_http_info(batch_amend_item, **kwargs) # noqa: E501 def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa: E501 - """Batch modification of orders. # noqa: E501 + """Batch modification of orders # noqa: E501 - Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return is consistent with the order list order. # noqa: E501 + Modify orders in spot, unified account and isolated margin account by default. Modify uncompleted orders, up to 5 orders can be modified at a time. Request parameters should be passed in array format. If there are order modification failures during the batch modification process, the modification of the next order will continue to be executed, and the execution will return with the corresponding order failure information. The call order of batch modification orders is consistent with the order list order. The return content order of batch modification orders is consistent with the order list order. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.amend_batch_orders_with_http_info(batch_amend_item, async_req=True) @@ -3277,7 +3277,7 @@ def amend_batch_orders_with_http_info(self, batch_amend_item, **kwargs): # noqa collection_formats=collection_formats) def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): # noqa: E501 - """Query spot insurance fund historical data. # noqa: E501 + """Query spot insurance fund historical data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3286,11 +3286,11 @@ def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): :param bool async_req: execute request asynchronously :param str business: Leverage business, margin - position by position; unified - unified account (required) - :param str currency: Currency. (required) - :param int _from: Start timestamp, seconds. (required) - :param int to: End timestamp, in seconds. (required) - :param int page: Page number. - :param int limit: The maximum number of items returned in the list, the default value is 30. + :param str currency: Currency (required) + :param int _from: Start timestamp in seconds (required) + :param int to: End timestamp in seconds (required) + :param int page: Page number + :param int limit: The maximum number of items returned in the list, the default value is 30 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3306,7 +3306,7 @@ def get_spot_insurance_history(self, business, currency, _from, to, **kwargs): return self.get_spot_insurance_history_with_http_info(business, currency, _from, to, **kwargs) # noqa: E501 def get_spot_insurance_history_with_http_info(self, business, currency, _from, to, **kwargs): # noqa: E501 - """Query spot insurance fund historical data. # noqa: E501 + """Query spot insurance fund historical data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3315,11 +3315,11 @@ def get_spot_insurance_history_with_http_info(self, business, currency, _from, t :param bool async_req: execute request asynchronously :param str business: Leverage business, margin - position by position; unified - unified account (required) - :param str currency: Currency. (required) - :param int _from: Start timestamp, seconds. (required) - :param int to: End timestamp, in seconds. (required) - :param int page: Page number. - :param int limit: The maximum number of items returned in the list, the default value is 30. + :param str currency: Currency (required) + :param int _from: Start timestamp in seconds (required) + :param int to: End timestamp in seconds (required) + :param int page: Page number + :param int limit: The maximum number of items returned in the list, the default value is 30 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3432,7 +3432,7 @@ def get_spot_insurance_history_with_http_info(self, business, currency, _from, t collection_formats=collection_formats) def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 - """Retrieve running auto order list. # noqa: E501 + """Query running auto order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3440,11 +3440,11 @@ def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status. (required) - :param str market: Currency pair. - :param str account: Trading account type. Portfolio margin account must set to `unified`. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str status: Query order list based on status (required) + :param str market: Trading market + :param str account: Trading account type. Unified account must be set to `unified` + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3460,7 +3460,7 @@ def list_spot_price_triggered_orders(self, status, **kwargs): # noqa: E501 return self.list_spot_price_triggered_orders_with_http_info(status, **kwargs) # noqa: E501 def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # noqa: E501 - """Retrieve running auto order list. # noqa: E501 + """Query running auto order list # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3468,11 +3468,11 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str status: Only list the orders with this status. (required) - :param str market: Currency pair. - :param str account: Trading account type. Portfolio margin account must set to `unified`. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str status: Query order list based on status (required) + :param str market: Trading market + :param str account: Trading account type. Unified account must be set to `unified` + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3570,7 +3570,7 @@ def list_spot_price_triggered_orders_with_http_info(self, status, **kwargs): # collection_formats=collection_formats) def create_spot_price_triggered_order(self, spot_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order. # noqa: E501 + """Create price-triggered order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3594,7 +3594,7 @@ def create_spot_price_triggered_order(self, spot_price_triggered_order, **kwargs return self.create_spot_price_triggered_order_with_http_info(spot_price_triggered_order, **kwargs) # noqa: E501 def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_order, **kwargs): # noqa: E501 - """Create a price-triggered order. # noqa: E501 + """Create price-triggered order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3686,7 +3686,7 @@ def create_spot_price_triggered_order_with_http_info(self, spot_price_triggered_ collection_formats=collection_formats) def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders. # noqa: E501 + """Cancel all auto orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3694,8 +3694,8 @@ def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str market: Currency pair. - :param str account: Trading account type. Portfolio margin account must set to `unified`. + :param str market: Trading market + :param str account: Trading account type. Unified account must be set to `unified` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3711,7 +3711,7 @@ def cancel_spot_price_triggered_order_list(self, **kwargs): # noqa: E501 return self.cancel_spot_price_triggered_order_list_with_http_info(**kwargs) # noqa: E501 def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # noqa: E501 - """Cancel All Price-triggered Orders. # noqa: E501 + """Cancel all auto orders # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3719,8 +3719,8 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str market: Currency pair. - :param str account: Trading account type. Portfolio margin account must set to `unified`. + :param str market: Trading market + :param str account: Trading account type. Unified account must be set to `unified` :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3799,7 +3799,7 @@ def cancel_spot_price_triggered_order_list_with_http_info(self, **kwargs): # no collection_formats=collection_formats) def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order. # noqa: E501 + """Query single auto order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3807,7 +3807,7 @@ def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3823,7 +3823,7 @@ def get_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 return self.get_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """Get a price-triggered order. # noqa: E501 + """Query single auto order details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3831,7 +3831,7 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3911,7 +3911,7 @@ def get_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # collection_formats=collection_formats) def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order. # noqa: E501 + """Cancel single auto order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3919,7 +3919,7 @@ def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str order_id: ID returned when order is successfully created (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3935,7 +3935,7 @@ def cancel_spot_price_triggered_order(self, order_id, **kwargs): # noqa: E501 return self.cancel_spot_price_triggered_order_with_http_info(order_id, **kwargs) # noqa: E501 def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): # noqa: E501 - """cancel a price-triggered order. # noqa: E501 + """Cancel single auto order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -3943,7 +3943,7 @@ def cancel_spot_price_triggered_order_with_http_info(self, order_id, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str order_id: Retrieve the data of the order with the specified ID. (required) + :param str order_id: ID returned when order is successfully created (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/sub_account_api.py b/gate_api/api/sub_account_api.py index eb7fbbe..2c864c3 100644 --- a/gate_api/api/sub_account_api.py +++ b/gate_api/api/sub_account_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_sub_accounts(self, **kwargs): # noqa: E501 - """List sub-accounts. # noqa: E501 + """List sub-accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,7 +45,7 @@ def list_sub_accounts(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. + :param str type: Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -61,7 +61,7 @@ def list_sub_accounts(self, **kwargs): # noqa: E501 return self.list_sub_accounts_with_http_info(**kwargs) # noqa: E501 def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501 - """List sub-accounts. # noqa: E501 + """List sub-accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -69,7 +69,7 @@ def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. + :param str type: Enter `0` to list all types of sub-accounts (currently supporting cross-margin sub-accounts and regular sub-accounts). Enter `1` to query regular sub-accounts only. If no parameter is passed, only regular sub-accounts will be queried by default. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -145,7 +145,7 @@ def list_sub_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_sub_accounts(self, sub_account, **kwargs): # noqa: E501 - """Create a new sub-account. # noqa: E501 + """Create a new sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -169,7 +169,7 @@ def create_sub_accounts(self, sub_account, **kwargs): # noqa: E501 return self.create_sub_accounts_with_http_info(sub_account, **kwargs) # noqa: E501 def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E501 - """Create a new sub-account. # noqa: E501 + """Create a new sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -261,7 +261,7 @@ def create_sub_accounts_with_http_info(self, sub_account, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_sub_account(self, user_id, **kwargs): # noqa: E501 - """Get the sub-account. # noqa: E501 + """Get sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -269,7 +269,7 @@ def get_sub_account(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) + :param int user_id: Sub-account user ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -285,7 +285,7 @@ def get_sub_account(self, user_id, **kwargs): # noqa: E501 return self.get_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Get the sub-account. # noqa: E501 + """Get sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -293,7 +293,7 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) + :param int user_id: Sub-account user ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -373,7 +373,7 @@ def get_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501 - """List all API Key of the sub-account. # noqa: E501 + """List all API key pairs of the sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -381,7 +381,7 @@ def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) + :param int user_id: Sub-account user ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -397,7 +397,7 @@ def list_sub_account_keys(self, user_id, **kwargs): # noqa: E501 return self.list_sub_account_keys_with_http_info(user_id, **kwargs) # noqa: E501 def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 - """List all API Key of the sub-account. # noqa: E501 + """List all API key pairs of the sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -405,7 +405,7 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) + :param int user_id: Sub-account user ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -485,7 +485,7 @@ def list_sub_account_keys_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: E501 - """Create API Key of the sub-account. # noqa: E501 + """Create new sub-account API key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -493,7 +493,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) + :param int user_id: Sub-account user ID (required) :param SubAccountKey sub_account_key: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -510,7 +510,7 @@ def create_sub_account_keys(self, user_id, sub_account_key, **kwargs): # noqa: return self.create_sub_account_keys_with_http_info(user_id, sub_account_key, **kwargs) # noqa: E501 def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwargs): # noqa: E501 - """Create API Key of the sub-account. # noqa: E501 + """Create new sub-account API key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -518,7 +518,7 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) + :param int user_id: Sub-account user ID (required) :param SubAccountKey sub_account_key: (required) :param _return_http_data_only: response data without head status code and headers @@ -610,7 +610,7 @@ def create_sub_account_keys_with_http_info(self, user_id, sub_account_key, **kwa collection_formats=collection_formats) def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 - """Get the API Key of the sub-account. # noqa: E501 + """Get specific API key pair of the sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -618,8 +618,8 @@ def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) - :param str key: The API Key of the sub-account. (required) + :param int user_id: Sub-account user ID (required) + :param str key: Sub-account API key (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -635,7 +635,7 @@ def get_sub_account_key(self, user_id, key, **kwargs): # noqa: E501 return self.get_sub_account_key_with_http_info(user_id, key, **kwargs) # noqa: E501 def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E501 - """Get the API Key of the sub-account. # noqa: E501 + """Get specific API key pair of the sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -643,8 +643,8 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) - :param str key: The API Key of the sub-account. (required) + :param int user_id: Sub-account user ID (required) + :param str key: Sub-account API key (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -731,7 +731,7 @@ def get_sub_account_key_with_http_info(self, user_id, key, **kwargs): # noqa: E collection_formats=collection_formats) def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 - """Update API key of the sub-account. # noqa: E501 + """Update sub-account API key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -739,8 +739,8 @@ def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) - :param str key: The API Key of the sub-account. (required) + :param int user_id: Sub-account user ID (required) + :param str key: Sub-account API key (required) :param SubAccountKey sub_account_key: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -757,7 +757,7 @@ def update_sub_account_keys(self, user_id, key, sub_account_key, **kwargs): # n return self.update_sub_account_keys_with_http_info(user_id, key, sub_account_key, **kwargs) # noqa: E501 def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, **kwargs): # noqa: E501 - """Update API key of the sub-account. # noqa: E501 + """Update sub-account API key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -765,8 +765,8 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) - :param str key: The API Key of the sub-account. (required) + :param int user_id: Sub-account user ID (required) + :param str key: Sub-account API key (required) :param SubAccountKey sub_account_key: (required) :param _return_http_data_only: response data without head status code and headers @@ -861,7 +861,7 @@ def update_sub_account_keys_with_http_info(self, user_id, key, sub_account_key, collection_formats=collection_formats) def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 - """Delete API key of the sub-account. # noqa: E501 + """Delete sub-account API key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -869,8 +869,8 @@ def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) - :param str key: The API Key of the sub-account. (required) + :param int user_id: Sub-account user ID (required) + :param str key: Sub-account API key (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -886,7 +886,7 @@ def delete_sub_account_keys(self, user_id, key, **kwargs): # noqa: E501 return self.delete_sub_account_keys_with_http_info(user_id, key, **kwargs) # noqa: E501 def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noqa: E501 - """Delete API key of the sub-account. # noqa: E501 + """Delete sub-account API key pair # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -894,8 +894,8 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: Sub-account user id. (required) - :param str key: The API Key of the sub-account. (required) + :param int user_id: Sub-account user ID (required) + :param str key: Sub-account API key (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -978,7 +978,7 @@ def delete_sub_account_keys_with_http_info(self, user_id, key, **kwargs): # noq collection_formats=collection_formats) def lock_sub_account(self, user_id, **kwargs): # noqa: E501 - """Lock the sub-account. # noqa: E501 + """Lock sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -986,7 +986,7 @@ def lock_sub_account(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account. (required) + :param int user_id: Sub-account user ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1002,7 +1002,7 @@ def lock_sub_account(self, user_id, **kwargs): # noqa: E501 return self.lock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Lock the sub-account. # noqa: E501 + """Lock sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1010,7 +1010,7 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account. (required) + :param int user_id: Sub-account user ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1086,7 +1086,7 @@ def lock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 - """Unlock the sub-account. # noqa: E501 + """Unlock sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1094,7 +1094,7 @@ def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account. (required) + :param int user_id: Sub-account user ID (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1110,7 +1110,7 @@ def unlock_sub_account(self, user_id, **kwargs): # noqa: E501 return self.unlock_sub_account_with_http_info(user_id, **kwargs) # noqa: E501 def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Unlock the sub-account. # noqa: E501 + """Unlock sub-account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1118,7 +1118,7 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int user_id: The user id of the sub-account. (required) + :param int user_id: Sub-account user ID (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1194,9 +1194,9 @@ def unlock_sub_account_with_http_info(self, user_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_unified_mode(self, **kwargs): # noqa: E501 - """Get sub-account mode. # noqa: E501 + """Get sub-account mode # noqa: E501 - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_unified_mode(async_req=True) @@ -1218,9 +1218,9 @@ def list_unified_mode(self, **kwargs): # noqa: E501 return self.list_unified_mode_with_http_info(**kwargs) # noqa: E501 def list_unified_mode_with_http_info(self, **kwargs): # noqa: E501 - """Get sub-account mode. # noqa: E501 + """Get sub-account mode # noqa: E501 - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_unified_mode_with_http_info(async_req=True) diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index bba6f75..dee5225 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,17 +37,17 @@ def __init__(self, api_client=None): self.api_client = api_client def list_unified_accounts(self, **kwargs): # noqa: E501 - """Get unified account information. # noqa: E501 + """Get unified account information # noqa: E501 - The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 + The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. For specific formulas, please refer to [Margin Formula](#margin-formula) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_unified_accounts(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param str sub_uid: Sub account user ID. + :param str currency: Query by specified currency name + :param str sub_uid: Sub account user ID :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -63,17 +63,17 @@ def list_unified_accounts(self, **kwargs): # noqa: E501 return self.list_unified_accounts_with_http_info(**kwargs) # noqa: E501 def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501 - """Get unified account information. # noqa: E501 + """Get unified account information # noqa: E501 - The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation # noqa: E501 + The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. For specific formulas, please refer to [Margin Formula](#margin-formula) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_unified_accounts_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param str sub_uid: Sub account user ID. + :param str currency: Query by specified currency name + :param str sub_uid: Sub account user ID :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -152,7 +152,7 @@ def list_unified_accounts_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 - """Query about the maximum borrowing for the unified account. # noqa: E501 + """Query maximum borrowable amount for unified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -160,7 +160,7 @@ def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) + :param str currency: Query by specified currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -176,7 +176,7 @@ def get_unified_borrowable(self, currency, **kwargs): # noqa: E501 return self.get_unified_borrowable_with_http_info(currency, **kwargs) # noqa: E501 def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query about the maximum borrowing for the unified account. # noqa: E501 + """Query maximum borrowable amount for unified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -184,7 +184,7 @@ def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) + :param str currency: Query by specified currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -264,7 +264,7 @@ def get_unified_borrowable_with_http_info(self, currency, **kwargs): # noqa: E5 collection_formats=collection_formats) def get_unified_transferable(self, currency, **kwargs): # noqa: E501 - """Query about the maximum transferable for the unified account. # noqa: E501 + """Query maximum transferable amount for unified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -272,7 +272,7 @@ def get_unified_transferable(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) + :param str currency: Query by specified currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -288,7 +288,7 @@ def get_unified_transferable(self, currency, **kwargs): # noqa: E501 return self.get_unified_transferable_with_http_info(currency, **kwargs) # noqa: E501 def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query about the maximum transferable for the unified account. # noqa: E501 + """Query maximum transferable amount for unified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -296,7 +296,7 @@ def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. (required) + :param str currency: Query by specified currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -376,7 +376,7 @@ def get_unified_transferable_with_http_info(self, currency, **kwargs): # noqa: collection_formats=collection_formats) def get_unified_transferables(self, currencies, **kwargs): # noqa: E501 - """Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. # noqa: E501 + """Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -384,7 +384,7 @@ def get_unified_transferables(self, currencies, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (required) + :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -400,7 +400,7 @@ def get_unified_transferables(self, currencies, **kwargs): # noqa: E501 return self.get_unified_transferables_with_http_info(currencies, **kwargs) # noqa: E501 def get_unified_transferables_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed. # noqa: E501 + """Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -408,7 +408,7 @@ def get_unified_transferables_with_http_info(self, currencies, **kwargs): # noq >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time. (required) + :param str currencies: Specify the currency name to query in batches, and support up to 100 pass parameters at a time (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -488,7 +488,7 @@ def get_unified_transferables_with_http_info(self, currencies, **kwargs): # noq collection_formats=collection_formats) def get_unified_borrowable_list(self, currencies, **kwargs): # noqa: E501 - """Batch query unified account can be borrowed up to a maximum. # noqa: E501 + """Batch query unified account maximum borrowable amount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -496,7 +496,7 @@ def get_unified_borrowable_list(self, currencies, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -512,7 +512,7 @@ def get_unified_borrowable_list(self, currencies, **kwargs): # noqa: E501 return self.get_unified_borrowable_list_with_http_info(currencies, **kwargs) # noqa: E501 def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Batch query unified account can be borrowed up to a maximum. # noqa: E501 + """Batch query unified account maximum borrowable amount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -520,7 +520,7 @@ def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # n >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -607,7 +607,7 @@ def get_unified_borrowable_list_with_http_info(self, currencies, **kwargs): # n collection_formats=collection_formats) def list_unified_loans(self, **kwargs): # noqa: E501 - """List loans. # noqa: E501 + """Query loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -615,10 +615,10 @@ def list_unified_loans(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. - :param str type: Loan type, platform - platform, margin - margin. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 + :param str type: Loan type: platform borrowing - platform, margin borrowing - margin :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -634,7 +634,7 @@ def list_unified_loans(self, **kwargs): # noqa: E501 return self.list_unified_loans_with_http_info(**kwargs) # noqa: E501 def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 - """List loans. # noqa: E501 + """Query loans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -642,10 +642,10 @@ def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. - :param str type: Loan type, platform - platform, margin - margin. + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 + :param str type: Loan type: platform borrowing - platform, margin borrowing - margin :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -736,9 +736,9 @@ def list_unified_loans_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def create_unified_loan(self, unified_loan, **kwargs): # noqa: E501 - """Borrow or repay. # noqa: E501 + """Borrow or repay # noqa: E501 - When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the available by setting the parameter `repaid_all=true` # noqa: E501 + When borrowing, ensure the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and user. Loan interest will be automatically deducted from the account at regular intervals. Users are responsible for managing repayment of borrowed amounts. For repayment, use `repaid_all=true` to repay all available amounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_unified_loan(unified_loan, async_req=True) @@ -761,9 +761,9 @@ def create_unified_loan(self, unified_loan, **kwargs): # noqa: E501 return self.create_unified_loan_with_http_info(unified_loan, **kwargs) # noqa: E501 def create_unified_loan_with_http_info(self, unified_loan, **kwargs): # noqa: E501 - """Borrow or repay. # noqa: E501 + """Borrow or repay # noqa: E501 - When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user. The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount. For repayment, the option to repay the available by setting the parameter `repaid_all=true` # noqa: E501 + When borrowing, ensure the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and user. Loan interest will be automatically deducted from the account at regular intervals. Users are responsible for managing repayment of borrowed amounts. For repayment, use `repaid_all=true` to repay all available amounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_unified_loan_with_http_info(unified_loan, async_req=True) @@ -854,7 +854,7 @@ def create_unified_loan_with_http_info(self, unified_loan, **kwargs): # noqa: E collection_formats=collection_formats) def list_unified_loan_records(self, **kwargs): # noqa: E501 - """Get load records. # noqa: E501 + """Query loan records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -862,10 +862,10 @@ def list_unified_loan_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str type: Loan record type: borrow - borrowing, repay - repayment + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -881,7 +881,7 @@ def list_unified_loan_records(self, **kwargs): # noqa: E501 return self.list_unified_loan_records_with_http_info(**kwargs) # noqa: E501 def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 - """Get load records. # noqa: E501 + """Query loan records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -889,10 +889,10 @@ def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str type: The types of lending records, borrow - indicates the action of borrowing funds, repaying the borrowed funds - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str type: Loan record type: borrow - borrowing, repay - repayment + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -983,7 +983,7 @@ def list_unified_loan_records_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 - """List interest records. # noqa: E501 + """Query interest deduction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -991,12 +991,12 @@ def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str type: Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1012,7 +1012,7 @@ def list_unified_loan_interest_records(self, **kwargs): # noqa: E501 return self.list_unified_loan_interest_records_with_http_info(**kwargs) # noqa: E501 def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: E501 - """List interest records. # noqa: E501 + """Query interest deduction records # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1020,12 +1020,12 @@ def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. - :param int _from: Start timestamp of the query. - :param int to: Time range ending, default to current time. - :param str type: Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin + :param str currency: Query by specified currency name + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 + :param int _from: Start timestamp for the query + :param int to: End timestamp for the query, defaults to current time if not specified + :param str type: Loan type: platform borrowing - platform, margin borrowing - margin. Defaults to margin if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1122,9 +1122,9 @@ def list_unified_loan_interest_records_with_http_info(self, **kwargs): # noqa: collection_formats=collection_formats) def get_unified_risk_units(self, **kwargs): # noqa: E501 - """Get user risk unit details. # noqa: E501 + """Get user risk unit details # noqa: E501 - Retrieve user risk unit details, only valid in portfolio margin mode. # noqa: E501 + Get user risk unit details, only valid in portfolio margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unified_risk_units(async_req=True) @@ -1146,9 +1146,9 @@ def get_unified_risk_units(self, **kwargs): # noqa: E501 return self.get_unified_risk_units_with_http_info(**kwargs) # noqa: E501 def get_unified_risk_units_with_http_info(self, **kwargs): # noqa: E501 - """Get user risk unit details. # noqa: E501 + """Get user risk unit details # noqa: E501 - Retrieve user risk unit details, only valid in portfolio margin mode. # noqa: E501 + Get user risk unit details, only valid in portfolio margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unified_risk_units_with_http_info(async_req=True) @@ -1227,7 +1227,7 @@ def get_unified_risk_units_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_unified_mode(self, **kwargs): # noqa: E501 - """Query mode of the unified account. # noqa: E501 + """Query mode of the unified account # noqa: E501 Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1251,7 +1251,7 @@ def get_unified_mode(self, **kwargs): # noqa: E501 return self.get_unified_mode_with_http_info(**kwargs) # noqa: E501 def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 - """Query mode of the unified account. # noqa: E501 + """Query mode of the unified account # noqa: E501 Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1332,7 +1332,7 @@ def get_unified_mode_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 - """Set mode of the unified account. # noqa: E501 + """Set unified account mode # noqa: E501 Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1357,7 +1357,7 @@ def set_unified_mode(self, unified_mode_set, **kwargs): # noqa: E501 return self.set_unified_mode_with_http_info(unified_mode_set, **kwargs) # noqa: E501 def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: E501 - """Set mode of the unified account. # noqa: E501 + """Set unified account mode # noqa: E501 Each account mode switch only requires passing the corresponding account mode parameter, and also supports turning on or off the configuration switches under the corresponding account mode during the switch. - When enabling the classic account mode, mode=classic ``` PUT /unified/unified_mode { \"mode\": \"classic\" } ``` - When enabling the cross-currency margin \"multi_currency\", \"settings\": { \"usdt_futures\": true } } ``` - When enabling the portfolio margin mode, mode=portfolio ``` PUT /unified/unified_mode { \"mode\": \"portfolio\", \"settings\": { \"spot_hedge\": true } } ``` - When enabling the single-currency margin mode, mode=single_currency ``` PUT /unified/unified_mode { \"mode\": \"single_currency\" } ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1446,16 +1446,16 @@ def set_unified_mode_with_http_info(self, unified_mode_set, **kwargs): # noqa: collection_formats=collection_formats) def get_unified_estimate_rate(self, currencies, **kwargs): # noqa: E501 - """Get unified estimate rate. # noqa: E501 + """Query unified account estimated interest rate # noqa: E501 - Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 + Interest rates fluctuate hourly based on lending depth, so exact rates cannot be provided. When a currency is not supported, the interest rate returned will be an empty string # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unified_estimate_rate(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1471,16 +1471,16 @@ def get_unified_estimate_rate(self, currencies, **kwargs): # noqa: E501 return self.get_unified_estimate_rate_with_http_info(currencies, **kwargs) # noqa: E501 def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noqa: E501 - """Get unified estimate rate. # noqa: E501 + """Query unified account estimated interest rate # noqa: E501 - Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string. # noqa: E501 + Interest rates fluctuate hourly based on lending depth, so exact rates cannot be provided. When a currency is not supported, the interest rate returned will be an empty string # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unified_estimate_rate_with_http_info(currencies, async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param list[str] currencies: Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. (required) + :param list[str] currencies: Specify currency names for querying in an array, separated by commas, maximum 10 currencies (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1567,7 +1567,7 @@ def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noq collection_formats=collection_formats) def list_currency_discount_tiers(self, **kwargs): # noqa: E501 - """List currency discount tiers. # noqa: E501 + """Query unified account tiered discount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1590,7 +1590,7 @@ def list_currency_discount_tiers(self, **kwargs): # noqa: E501 return self.list_currency_discount_tiers_with_http_info(**kwargs) # noqa: E501 def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501 - """List currency discount tiers. # noqa: E501 + """Query unified account tiered discount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1670,7 +1670,7 @@ def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_loan_margin_tiers(self, **kwargs): # noqa: E501 - """List loan margin tiers. # noqa: E501 + """Query unified account tiered loan margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1693,7 +1693,7 @@ def list_loan_margin_tiers(self, **kwargs): # noqa: E501 return self.list_loan_margin_tiers_with_http_info(**kwargs) # noqa: E501 def list_loan_margin_tiers_with_http_info(self, **kwargs): # noqa: E501 - """List loan margin tiers. # noqa: E501 + """Query unified account tiered loan margin # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1773,9 +1773,9 @@ def list_loan_margin_tiers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def calculate_portfolio_margin(self, unified_portfolio_input, **kwargs): # noqa: E501 - """Portfolio margin calculator. # noqa: E501 + """Portfolio margin calculator # noqa: E501 - Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 + Portfolio Margin Calculator When inputting simulated position portfolios, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate_portfolio_margin(unified_portfolio_input, async_req=True) @@ -1798,9 +1798,9 @@ def calculate_portfolio_margin(self, unified_portfolio_input, **kwargs): # noqa return self.calculate_portfolio_margin_with_http_info(unified_portfolio_input, **kwargs) # noqa: E501 def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **kwargs): # noqa: E501 - """Portfolio margin calculator. # noqa: E501 + """Portfolio margin calculator # noqa: E501 - Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 + Portfolio Margin Calculator When inputting simulated position portfolios, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.calculate_portfolio_margin_with_http_info(unified_portfolio_input, async_req=True) @@ -1891,7 +1891,7 @@ def calculate_portfolio_margin_with_http_info(self, unified_portfolio_input, **k collection_formats=collection_formats) def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 - """Minimum currency leverage that can be set. # noqa: E501 + """Maximum and minimum currency leverage that can be set # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1899,7 +1899,7 @@ def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1915,7 +1915,7 @@ def get_user_leverage_currency_config(self, currency, **kwargs): # noqa: E501 return self.get_user_leverage_currency_config_with_http_info(currency, **kwargs) # noqa: E501 def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): # noqa: E501 - """Minimum currency leverage that can be set. # noqa: E501 + """Maximum and minimum currency leverage that can be set # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1923,7 +1923,7 @@ def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) + :param str currency: Currency (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2003,16 +2003,16 @@ def get_user_leverage_currency_config_with_http_info(self, currency, **kwargs): collection_formats=collection_formats) def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501 - """Get the leverage multiple of the user currency. # noqa: E501 + """Get user currency leverage # noqa: E501 - Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 + Get user currency leverage. If currency is not specified, query all currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_leverage_currency_setting(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. + :param str currency: Currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2020,7 +2020,7 @@ def get_user_leverage_currency_setting(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.UnifiedLeverageSetting + :rtype: list[gate_api.UnifiedLeverageSetting] :return: If the method is called asynchronously, returns the request thread. """ @@ -2028,16 +2028,16 @@ def get_user_leverage_currency_setting(self, **kwargs): # noqa: E501 return self.get_user_leverage_currency_setting_with_http_info(**kwargs) # noqa: E501 def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: E501 - """Get the leverage multiple of the user currency. # noqa: E501 + """Get user currency leverage # noqa: E501 - Get the user's currency leverage. If currency is not passed, query all currencies. # noqa: E501 + Get user currency leverage. If currency is not specified, query all currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_leverage_currency_setting_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. + :param str currency: Currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2047,7 +2047,7 @@ def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(gate_api.UnifiedLeverageSetting, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(list[gate_api.UnifiedLeverageSetting], status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -2104,7 +2104,7 @@ def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='UnifiedLeverageSetting', # noqa: E501 + response_type='list[UnifiedLeverageSetting]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -2113,7 +2113,7 @@ def get_user_leverage_currency_setting_with_http_info(self, **kwargs): # noqa: collection_formats=collection_formats) def set_user_leverage_currency_setting(self, unified_leverage_setting, **kwargs): # noqa: E501 - """Set the loan currency leverage. # noqa: E501 + """Set loan currency leverage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2137,7 +2137,7 @@ def set_user_leverage_currency_setting(self, unified_leverage_setting, **kwargs) return self.set_user_leverage_currency_setting_with_http_info(unified_leverage_setting, **kwargs) # noqa: E501 def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_setting, **kwargs): # noqa: E501 - """Set the loan currency leverage. # noqa: E501 + """Set loan currency leverage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2225,7 +2225,7 @@ def set_user_leverage_currency_setting_with_http_info(self, unified_leverage_set collection_formats=collection_formats) def list_unified_currencies(self, **kwargs): # noqa: E501 - """List of loan currencies supported by unified account. # noqa: E501 + """List of loan currencies supported by unified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2233,7 +2233,7 @@ def list_unified_currencies(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. + :param str currency: Currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2249,7 +2249,7 @@ def list_unified_currencies(self, **kwargs): # noqa: E501 return self.list_unified_currencies_with_http_info(**kwargs) # noqa: E501 def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 - """List of loan currencies supported by unified account. # noqa: E501 + """List of loan currencies supported by unified account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2257,7 +2257,7 @@ def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. + :param str currency: Currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2333,7 +2333,7 @@ def list_unified_currencies_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 - """get historical lending rates. # noqa: E501 + """Get historical lending rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2341,10 +2341,10 @@ def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) - :param str tier: The VIP level of the floating rate that needs to be queried. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Currency (required) + :param str tier: VIP level for the floating rate to be queried + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2360,7 +2360,7 @@ def get_history_loan_rate(self, currency, **kwargs): # noqa: E501 return self.get_history_loan_rate_with_http_info(currency, **kwargs) # noqa: E501 def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E501 - """get historical lending rates. # noqa: E501 + """Get historical lending rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2368,10 +2368,10 @@ def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E50 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) - :param str tier: The VIP level of the floating rate that needs to be queried. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Currency (required) + :param str tier: VIP level for the floating rate to be queried + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2466,7 +2466,7 @@ def get_history_loan_rate_with_http_info(self, currency, **kwargs): # noqa: E50 collection_formats=collection_formats) def set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E501 - """Set Collateral Currency. # noqa: E501 + """Set collateral currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2490,7 +2490,7 @@ def set_unified_collateral(self, unified_collateral_req, **kwargs): # noqa: E50 return self.set_unified_collateral_with_http_info(unified_collateral_req, **kwargs) # noqa: E501 def set_unified_collateral_with_http_info(self, unified_collateral_req, **kwargs): # noqa: E501 - """Set Collateral Currency. # noqa: E501 + """Set collateral currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api/wallet_api.py b/gate_api/api/wallet_api.py index 7466e47..0284850 100644 --- a/gate_api/api/wallet_api.py +++ b/gate_api/api/wallet_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client def list_currency_chains(self, currency, **kwargs): # noqa: E501 - """List chains supported for specified currency. # noqa: E501 + """Query chains supported for specified currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -45,7 +45,7 @@ def list_currency_chains(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name. (required) + :param str currency: Currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -61,7 +61,7 @@ def list_currency_chains(self, currency, **kwargs): # noqa: E501 return self.list_currency_chains_with_http_info(currency, **kwargs) # noqa: E501 def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 - """List chains supported for specified currency. # noqa: E501 + """Query chains supported for specified currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -69,7 +69,7 @@ def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name. (required) + :param str currency: Currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -149,7 +149,7 @@ def list_currency_chains_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_deposit_address(self, currency, **kwargs): # noqa: E501 - """Generate currency deposit address. # noqa: E501 + """Generate currency deposit address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -157,7 +157,7 @@ def get_deposit_address(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name. (required) + :param str currency: Currency name (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -173,7 +173,7 @@ def get_deposit_address(self, currency, **kwargs): # noqa: E501 return self.get_deposit_address_with_http_info(currency, **kwargs) # noqa: E501 def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 - """Generate currency deposit address. # noqa: E501 + """Generate currency deposit address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -181,7 +181,7 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency name. (required) + :param str currency: Currency name (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -261,23 +261,23 @@ def get_deposit_address_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_withdrawals(self, **kwargs): # noqa: E501 - """Retrieve withdrawal records. # noqa: E501 + """Get withdrawal records # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_withdrawals(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param str withdraw_id: The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time - :param str asset_class: The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone - :param str withdraw_order_id: User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param str withdraw_id: Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled + :param str asset_class: Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone + :param str withdraw_order_id: User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -293,23 +293,23 @@ def list_withdrawals(self, **kwargs): # noqa: E501 return self.list_withdrawals_with_http_info(**kwargs) # noqa: E501 def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve withdrawal records. # noqa: E501 + """Get withdrawal records # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_withdrawals_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param str withdraw_id: The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time - :param str asset_class: The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone - :param str withdraw_order_id: User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param str withdraw_id: Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled + :param str asset_class: Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone + :param str withdraw_order_id: User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -412,20 +412,20 @@ def list_withdrawals_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_deposits(self, **kwargs): # noqa: E501 - """Retrieve deposit records. # noqa: E501 + """Get deposit records # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_deposits(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of entries returned in the list, limited to 500 transactions + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -441,20 +441,20 @@ def list_deposits(self, **kwargs): # noqa: E501 return self.list_deposits_with_http_info(**kwargs) # noqa: E501 def list_deposits_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve deposit records. # noqa: E501 + """Get deposit records # noqa: E501 - Record time range cannot exceed 30 days. # noqa: E501 + Record query time range cannot exceed 30 days # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_deposits_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Filter by currency. Return all currency records if not specified. - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: The maximum number of entries returned in the list is limited to 500 transactions. - :param int offset: List offset, starting from 0. + :param str currency: Specify the currency. If not specified, returns all currencies + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of entries returned in the list, limited to 500 transactions + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -548,9 +548,9 @@ def list_deposits_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def transfer(self, transfer, **kwargs): # noqa: E501 - """Transfer between trading accounts. # noqa: E501 + """Transfer between trading accounts # noqa: E501 - Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. options # noqa: E501 + Balance transfers between personal trading accounts. Currently supports the following transfer operations: 1. Spot account - Margin account 2. Spot account - Perpetual futures account 3. Spot account - Delivery futures account 4. Spot account - Options account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.transfer(transfer, async_req=True) @@ -573,9 +573,9 @@ def transfer(self, transfer, **kwargs): # noqa: E501 return self.transfer_with_http_info(transfer, **kwargs) # noqa: E501 def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501 - """Transfer between trading accounts. # noqa: E501 + """Transfer between trading accounts # noqa: E501 - Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. options # noqa: E501 + Balance transfers between personal trading accounts. Currently supports the following transfer operations: 1. Spot account - Margin account 2. Spot account - Perpetual futures account 3. Spot account - Delivery futures account 4. Spot account - Options account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.transfer_with_http_info(transfer, async_req=True) @@ -666,20 +666,20 @@ def transfer_with_http_info(self, transfer, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_transfers(self, **kwargs): # noqa: E501 - """Retrieve transfer records between main and sub accounts. # noqa: E501 + """Get transfer records between main and sub accounts # noqa: E501 - Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved # noqa: E501 + Record query time range cannot exceed 30 days > Note: Only records after 2020-04-10 can be retrieved # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_sub_account_transfers(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -695,20 +695,20 @@ def list_sub_account_transfers(self, **kwargs): # noqa: E501 return self.list_sub_account_transfers_with_http_info(**kwargs) # noqa: E501 def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve transfer records between main and sub accounts. # noqa: E501 + """Get transfer records between main and sub accounts # noqa: E501 - Record time range cannot exceed 30 days > Note: only records after 20-04-10can be retrieved # noqa: E501 + Record query time range cannot exceed 30 days > Note: Only records after 2020-04-10 can be retrieved # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_sub_account_transfers_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param int _from: Time range beginning, default to 7 days before current time. - :param int to: Time range ending, default to current time. - :param int limit: Maximum number of records to be returned in a single list. - :param int offset: List offset, starting from 0. + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts + :param int _from: Start time for querying records, defaults to 7 days before current time if not specified + :param int to: End timestamp for the query, defaults to current time if not specified + :param int limit: Maximum number of records returned in a single list + :param int offset: List offset, starting from 0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -802,9 +802,9 @@ def list_sub_account_transfers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def transfer_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E501 - """Transfer between main and sub accounts. # noqa: E501 + """Transfer between main and sub accounts # noqa: E501 - Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 + Supports transfers to/from sub-account's spot or futures accounts. Note that regardless of which sub-account is operated, only the main account's spot account is used # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.transfer_with_sub_account(sub_account_transfer, async_req=True) @@ -827,9 +827,9 @@ def transfer_with_sub_account(self, sub_account_transfer, **kwargs): # noqa: E5 return self.transfer_with_sub_account_with_http_info(sub_account_transfer, **kwargs) # noqa: E501 def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwargs): # noqa: E501 - """Transfer between main and sub accounts. # noqa: E501 + """Transfer between main and sub accounts # noqa: E501 - Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated. # noqa: E501 + Supports transfers to/from sub-account's spot or futures accounts. Note that regardless of which sub-account is operated, only the main account's spot account is used # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.transfer_with_sub_account_with_http_info(sub_account_transfer, async_req=True) @@ -920,9 +920,9 @@ def transfer_with_sub_account_with_http_info(self, sub_account_transfer, **kwarg collection_formats=collection_formats) def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # noqa: E501 - """Sub-account transfers to sub-account. # noqa: E501 + """Transfer between sub-accounts # noqa: E501 - It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account sub-account to initiate the transfer. # noqa: E501 + Supports balance transfers between two sub-accounts under the same main account. You can use either the main account's API Key or the source sub-account's API Key to perform the operation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.sub_account_to_sub_account(sub_account_to_sub_account, async_req=True) @@ -945,9 +945,9 @@ def sub_account_to_sub_account(self, sub_account_to_sub_account, **kwargs): # n return self.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, **kwargs) # noqa: E501 def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account, **kwargs): # noqa: E501 - """Sub-account transfers to sub-account. # noqa: E501 + """Transfer between sub-accounts # noqa: E501 - It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account sub-account to initiate the transfer. # noqa: E501 + Supports balance transfers between two sub-accounts under the same main account. You can use either the main account's API Key or the source sub-account's API Key to perform the operation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.sub_account_to_sub_account_with_http_info(sub_account_to_sub_account, async_req=True) @@ -1038,17 +1038,17 @@ def sub_account_to_sub_account_with_http_info(self, sub_account_to_sub_account, collection_formats=collection_formats) def get_transfer_order_status(self, **kwargs): # noqa: E501 - """Transfer status query. # noqa: E501 + """Transfer status query # noqa: E501 - Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 + Supports querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_transfer_order_status(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str client_order_id: The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. - :param str tx_id: The transfer operation number and client_order_id cannot be empty at the same time + :param str client_order_id: Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters + :param str tx_id: Transfer operation number, cannot be empty at the same time as client_order_id :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1064,17 +1064,17 @@ def get_transfer_order_status(self, **kwargs): # noqa: E501 return self.get_transfer_order_status_with_http_info(**kwargs) # noqa: E501 def get_transfer_order_status_with_http_info(self, **kwargs): # noqa: E501 - """Transfer status query. # noqa: E501 + """Transfer status query # noqa: E501 - Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 + Supports querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_transfer_order_status_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str client_order_id: The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. - :param str tx_id: The transfer operation number and client_order_id cannot be empty at the same time + :param str client_order_id: Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters + :param str tx_id: Transfer operation number, cannot be empty at the same time as client_order_id :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1153,7 +1153,7 @@ def get_transfer_order_status_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_withdraw_status(self, **kwargs): # noqa: E501 - """Retrieve withdrawal status. # noqa: E501 + """Query withdrawal status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1161,7 +1161,7 @@ def list_withdraw_status(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. + :param str currency: Query by specified currency name :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1177,7 +1177,7 @@ def list_withdraw_status(self, **kwargs): # noqa: E501 return self.list_withdraw_status_with_http_info(**kwargs) # noqa: E501 def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve withdrawal status. # noqa: E501 + """Query withdrawal status # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1185,7 +1185,7 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Retrieve data of the specified currency. + :param str currency: Query by specified currency name :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1261,7 +1261,7 @@ def list_withdraw_status_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_balances(self, **kwargs): # noqa: E501 - """Retrieve sub account balances. # noqa: E501 + """Query sub-account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1269,7 +1269,7 @@ def list_sub_account_balances(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1285,7 +1285,7 @@ def list_sub_account_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve sub account balances. # noqa: E501 + """Query sub-account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1293,7 +1293,7 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1369,7 +1369,7 @@ def list_sub_account_balances_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_sub_account_margin_balances(self, **kwargs): # noqa: E501 - """Query sub accounts' margin balances. # noqa: E501 + """Query sub-account isolated margin account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1377,7 +1377,7 @@ def list_sub_account_margin_balances(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1393,7 +1393,7 @@ def list_sub_account_margin_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_margin_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query sub accounts' margin balances. # noqa: E501 + """Query sub-account isolated margin account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1401,7 +1401,7 @@ def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E5 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1477,7 +1477,7 @@ def list_sub_account_margin_balances_with_http_info(self, **kwargs): # noqa: E5 collection_formats=collection_formats) def list_sub_account_futures_balances(self, **kwargs): # noqa: E501 - """Query sub accounts' futures account balances. # noqa: E501 + """Query sub-account perpetual futures account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1485,8 +1485,8 @@ def list_sub_account_futures_balances(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param str settle: Query only balances of specified settle currency. + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts + :param str settle: Query balance of specified settlement currency :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1502,7 +1502,7 @@ def list_sub_account_futures_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_futures_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query sub accounts' futures account balances. # noqa: E501 + """Query sub-account perpetual futures account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1510,8 +1510,8 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts - :param str settle: Query only balances of specified settle currency. + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts + :param str settle: Query balance of specified settlement currency :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1590,7 +1590,7 @@ def list_sub_account_futures_balances_with_http_info(self, **kwargs): # noqa: E collection_formats=collection_formats) def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501 - """Query subaccount's cross_margin account info. # noqa: E501 + """Query sub-account cross margin account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1598,7 +1598,7 @@ def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1614,7 +1614,7 @@ def list_sub_account_cross_margin_balances(self, **kwargs): # noqa: E501 return self.list_sub_account_cross_margin_balances_with_http_info(**kwargs) # noqa: E501 def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # noqa: E501 - """Query subaccount's cross_margin account info. # noqa: E501 + """Query sub-account cross margin account balance information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1622,7 +1622,7 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str sub_uid: User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts + :param str sub_uid: Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1698,7 +1698,7 @@ def list_sub_account_cross_margin_balances_with_http_info(self, **kwargs): # no collection_formats=collection_formats) def list_saved_address(self, currency, **kwargs): # noqa: E501 - """Query saved address. # noqa: E501 + """Query withdrawal address whitelist # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1706,10 +1706,10 @@ def list_saved_address(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) - :param str chain: Chain name. - :param str limit: Maximum number returned, 100 at most. - :param int page: Page number. + :param str currency: Currency (required) + :param str chain: Chain name + :param str limit: Maximum number returned, up to 100 + :param int page: Page number :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1725,7 +1725,7 @@ def list_saved_address(self, currency, **kwargs): # noqa: E501 return self.list_saved_address_with_http_info(currency, **kwargs) # noqa: E501 def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 - """Query saved address. # noqa: E501 + """Query withdrawal address whitelist # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1733,10 +1733,10 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. (required) - :param str chain: Chain name. - :param str limit: Maximum number returned, 100 at most. - :param int page: Page number. + :param str currency: Currency (required) + :param str chain: Chain name + :param str limit: Maximum number returned, up to 100 + :param int page: Page number :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1827,7 +1827,7 @@ def list_saved_address_with_http_info(self, currency, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_trade_fee(self, **kwargs): # noqa: E501 - """Retrieve personal trading fee. # noqa: E501 + """Query personal trading fees # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1835,8 +1835,8 @@ def get_trade_fee(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs - :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. + :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. + :param str settle: Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1852,7 +1852,7 @@ def get_trade_fee(self, **kwargs): # noqa: E501 return self.get_trade_fee_with_http_info(**kwargs) # noqa: E501 def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve personal trading fee. # noqa: E501 + """Query personal trading fees # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1860,8 +1860,8 @@ def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency_pair: Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs - :param str settle: Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. + :param str currency_pair: Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. + :param str settle: Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1940,16 +1940,16 @@ def get_trade_fee_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_total_balance(self, **kwargs): # noqa: E501 - """Retrieve user's total balances. # noqa: E501 + """Query personal account totals # noqa: E501 - This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` /futures/{settle}/accounts` to query futures account balance # noqa: E501 + This query endpoint returns the total *estimated value* of all currencies in each account converted to the input currency. Exchange rates and related account balance information may be cached for up to 1 minute. It is not recommended to use this interface data for real-time calculations. For real-time calculations, query the corresponding balance interface based on account type, such as: - `GET /spot/accounts` to query spot account - `GET /margin/accounts` to query margin account - `GET /futures/{settle}/accounts` to query futures account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_total_balance(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. + :param str currency: Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1965,16 +1965,16 @@ def get_total_balance(self, **kwargs): # noqa: E501 return self.get_total_balance_with_http_info(**kwargs) # noqa: E501 def get_total_balance_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve user's total balances. # noqa: E501 + """Query personal account totals # noqa: E501 - This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` /futures/{settle}/accounts` to query futures account balance # noqa: E501 + This query endpoint returns the total *estimated value* of all currencies in each account converted to the input currency. Exchange rates and related account balance information may be cached for up to 1 minute. It is not recommended to use this interface data for real-time calculations. For real-time calculations, query the corresponding balance interface based on account type, such as: - `GET /spot/accounts` to query spot account - `GET /margin/accounts` to query margin account - `GET /futures/{settle}/accounts` to query futures account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_total_balance_with_http_info(async_req=True) >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. + :param str currency: Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2050,7 +2050,7 @@ def get_total_balance_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_small_balance(self, **kwargs): # noqa: E501 - """List small balance. # noqa: E501 + """Get list of convertible small balance currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2073,7 +2073,7 @@ def list_small_balance(self, **kwargs): # noqa: E501 return self.list_small_balance_with_http_info(**kwargs) # noqa: E501 def list_small_balance_with_http_info(self, **kwargs): # noqa: E501 - """List small balance. # noqa: E501 + """Get list of convertible small balance currencies # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2153,7 +2153,7 @@ def list_small_balance_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def convert_small_balance(self, convert_small_balance, **kwargs): # noqa: E501 - """Convert small balance. # noqa: E501 + """Convert small balance currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2177,7 +2177,7 @@ def convert_small_balance(self, convert_small_balance, **kwargs): # noqa: E501 return self.convert_small_balance_with_http_info(convert_small_balance, **kwargs) # noqa: E501 def convert_small_balance_with_http_info(self, convert_small_balance, **kwargs): # noqa: E501 - """Convert small balance. # noqa: E501 + """Convert small balance currency # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2265,7 +2265,7 @@ def convert_small_balance_with_http_info(self, convert_small_balance, **kwargs): collection_formats=collection_formats) def list_small_balance_history(self, **kwargs): # noqa: E501 - """List small balance history. # noqa: E501 + """Get convertible small balance currency history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2273,9 +2273,9 @@ def list_small_balance_history(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Currency to convert + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2291,7 +2291,7 @@ def list_small_balance_history(self, **kwargs): # noqa: E501 return self.list_small_balance_history_with_http_info(**kwargs) # noqa: E501 def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 - """List small balance history. # noqa: E501 + """Get convertible small balance currency history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2299,9 +2299,9 @@ def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param str currency: Currency. - :param int page: Page number. - :param int limit: Maximum response items. Default: 100, minimum: 1, Maximum: 100. + :param str currency: Currency to convert + :param int page: Page number + :param int limit: Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2389,7 +2389,7 @@ def list_small_balance_history_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_push_orders(self, **kwargs): # noqa: E501 - """Retrieve the UID transfer history. # noqa: E501 + """Get UID transfer history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2397,12 +2397,12 @@ def list_push_orders(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int id: Order ID. - :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp - :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. - :param int limit: The maximum number of items returned in the list, the default value is 100. - :param int offset: List offset, starting from 0. - :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. + :param int id: Order ID + :param int _from: Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds + :param int to: End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds + :param int limit: Maximum number of items returned in the list, default value is 100 + :param int offset: List offset, starting from 0 + :param str transaction_type: Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2418,7 +2418,7 @@ def list_push_orders(self, **kwargs): # noqa: E501 return self.list_push_orders_with_http_info(**kwargs) # noqa: E501 def list_push_orders_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve the UID transfer history. # noqa: E501 + """Get UID transfer history # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2426,12 +2426,12 @@ def list_push_orders_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param bool async_req: execute request asynchronously - :param int id: Order ID. - :param int _from: The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp - :param int to: The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. - :param int limit: The maximum number of items returned in the list, the default value is 100. - :param int offset: List offset, starting from 0. - :param str transaction_type: The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. + :param int id: Order ID + :param int _from: Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds + :param int to: End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds + :param int limit: Maximum number of items returned in the list, default value is 100 + :param int offset: List offset, starting from 0 + :param str transaction_type: Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/withdrawal_api.py b/gate_api/api/withdrawal_api.py index 1d5f282..7fb64dd 100644 --- a/gate_api/api/withdrawal_api.py +++ b/gate_api/api/withdrawal_api.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -37,9 +37,9 @@ def __init__(self, api_client=None): self.api_client = api_client def withdraw(self, ledger_record, **kwargs): # noqa: E501 - """Withdraw. # noqa: E501 + """Withdraw # noqa: E501 - Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 + If the recipient's on-chain address is also Gate, no transaction fee will be charged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.withdraw(ledger_record, async_req=True) @@ -62,9 +62,9 @@ def withdraw(self, ledger_record, **kwargs): # noqa: E501 return self.withdraw_with_http_info(ledger_record, **kwargs) # noqa: E501 def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501 - """Withdraw. # noqa: E501 + """Withdraw # noqa: E501 - Withdrawals to Gate addresses do not incur transaction fees. # noqa: E501 + If the recipient's on-chain address is also Gate, no transaction fee will be charged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.withdraw_with_http_info(ledger_record, async_req=True) @@ -155,9 +155,9 @@ def withdraw_with_http_info(self, ledger_record, **kwargs): # noqa: E501 collection_formats=collection_formats) def withdraw_push_order(self, uid_push_withdrawal, **kwargs): # noqa: E501 - """UID transfer. # noqa: E501 + """UID transfer # noqa: E501 - Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 + Transfers between main spot accounts. Both parties cannot be sub-accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.withdraw_push_order(uid_push_withdrawal, async_req=True) @@ -180,9 +180,9 @@ def withdraw_push_order(self, uid_push_withdrawal, **kwargs): # noqa: E501 return self.withdraw_push_order_with_http_info(uid_push_withdrawal, **kwargs) # noqa: E501 def withdraw_push_order_with_http_info(self, uid_push_withdrawal, **kwargs): # noqa: E501 - """UID transfer. # noqa: E501 + """UID transfer # noqa: E501 - Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts # noqa: E501 + Transfers between main spot accounts. Both parties cannot be sub-accounts # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.withdraw_push_order_with_http_info(uid_push_withdrawal, async_req=True) @@ -273,7 +273,7 @@ def withdraw_push_order_with_http_info(self, uid_push_withdrawal, **kwargs): # collection_formats=collection_formats) def cancel_withdrawal(self, withdrawal_id, **kwargs): # noqa: E501 - """Cancel withdrawal with specified ID. # noqa: E501 + """Cancel withdrawal with specified ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -297,7 +297,7 @@ def cancel_withdrawal(self, withdrawal_id, **kwargs): # noqa: E501 return self.cancel_withdrawal_with_http_info(withdrawal_id, **kwargs) # noqa: E501 def cancel_withdrawal_with_http_info(self, withdrawal_id, **kwargs): # noqa: E501 - """Cancel withdrawal with specified ID. # noqa: E501 + """Cancel withdrawal with specified ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 9c422c6..a285388 100644 --- a/gate_api/api_client.py +++ b/gate_api/api_client.py @@ -2,7 +2,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -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/6.103.0/python' + self.user_agent = 'OpenAPI-Generator/6.104.3/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index a3b7ff7..02d9420 100644 --- a/gate_api/configuration.py +++ b/gate_api/configuration.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -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.103.0\n"\ - "SDK Package Version: 6.103.0".\ + "Version of the API: v4.104.3\n"\ + "SDK Package Version: 6.104.3".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): @@ -325,11 +325,11 @@ def get_host_settings(self): return [ { 'url': "https://api.gateio.ws/api/v4", - 'description': "Real Trading.", + 'description': "Real trading", }, { 'url': "https://fx-api-testnet.gateio.ws/api/v4", - 'description': "TestNet Trading.", + 'description': "TestNet trading", } ] diff --git a/gate_api/exceptions.py b/gate_api/exceptions.py index 916a649..31ff2ea 100644 --- a/gate_api/exceptions.py +++ b/gate_api/exceptions.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/__init__.py b/gate_api/models/__init__.py index b1251eb..4976416 100644 --- a/gate_api/models/__init__.py +++ b/gate_api/models/__init__.py @@ -4,7 +4,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/account_balance.py b/gate_api/models/account_balance.py index 144d955..f213fb7 100644 --- a/gate_api/models/account_balance.py +++ b/gate_api/models/account_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, amount=None, currency=None, unrealised_pnl=None, borrowed=Non def amount(self): """Gets the amount of this AccountBalance. # noqa: E501 - Account total balance amount. # noqa: E501 + Account total balance amount # noqa: E501 :return: The amount of this AccountBalance. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this AccountBalance. - Account total balance amount. # noqa: E501 + Account total balance amount # noqa: E501 :param amount: The amount of this AccountBalance. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def amount(self, amount): def currency(self): """Gets the currency of this AccountBalance. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this AccountBalance. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this AccountBalance. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this AccountBalance. # noqa: E501 :type: str @@ -147,7 +147,7 @@ def unrealised_pnl(self, unrealised_pnl): def borrowed(self): """Gets the borrowed of this AccountBalance. # noqa: E501 - Borrowed,this field will only appear in margin and cross_margin accounts. # noqa: E501 + Total borrowed amount, this field will only appear in margin and cross_margin accounts # noqa: E501 :return: The borrowed of this AccountBalance. # noqa: E501 :rtype: str @@ -158,7 +158,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this AccountBalance. - Borrowed,this field will only appear in margin and cross_margin accounts. # noqa: E501 + Total borrowed amount, this field will only appear in margin and cross_margin accounts # noqa: E501 :param borrowed: The borrowed of this AccountBalance. # noqa: E501 :type: str diff --git a/gate_api/models/account_detail.py b/gate_api/models/account_detail.py index 8698af6..7854045 100644 --- a/gate_api/models/account_detail.py +++ b/gate_api/models/account_detail.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, ip_whitelist=None, currency_pairs=None, user_id=None, tier=No def ip_whitelist(self): """Gets the ip_whitelist of this AccountDetail. # noqa: E501 - IP whitelist. # noqa: E501 + IP Whitelist # noqa: E501 :return: The ip_whitelist of this AccountDetail. # noqa: E501 :rtype: list[str] @@ -93,7 +93,7 @@ def ip_whitelist(self): def ip_whitelist(self, ip_whitelist): """Sets the ip_whitelist of this AccountDetail. - IP whitelist. # noqa: E501 + IP Whitelist # noqa: E501 :param ip_whitelist: The ip_whitelist of this AccountDetail. # noqa: E501 :type: list[str] @@ -105,7 +105,7 @@ def ip_whitelist(self, ip_whitelist): def currency_pairs(self): """Gets the currency_pairs of this AccountDetail. # noqa: E501 - CurrencyPair whitelisting. # noqa: E501 + Trading pair whitelist # noqa: E501 :return: The currency_pairs of this AccountDetail. # noqa: E501 :rtype: list[str] @@ -116,7 +116,7 @@ def currency_pairs(self): def currency_pairs(self, currency_pairs): """Sets the currency_pairs of this AccountDetail. - CurrencyPair whitelisting. # noqa: E501 + Trading pair whitelist # noqa: E501 :param currency_pairs: The currency_pairs of this AccountDetail. # noqa: E501 :type: list[str] @@ -128,7 +128,7 @@ def currency_pairs(self, currency_pairs): def user_id(self): """Gets the user_id of this AccountDetail. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this AccountDetail. # noqa: E501 :rtype: int @@ -139,7 +139,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this AccountDetail. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this AccountDetail. # noqa: E501 :type: int @@ -151,7 +151,7 @@ def user_id(self, user_id): def tier(self): """Gets the tier of this AccountDetail. # noqa: E501 - User VIP level. # noqa: E501 + User VIP level # noqa: E501 :return: The tier of this AccountDetail. # noqa: E501 :rtype: int @@ -162,7 +162,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this AccountDetail. - User VIP level. # noqa: E501 + User VIP level # noqa: E501 :param tier: The tier of this AccountDetail. # noqa: E501 :type: int @@ -195,7 +195,7 @@ def key(self, key): def copy_trading_role(self): """Gets the copy_trading_role of this AccountDetail. # noqa: E501 - User role: 0 - Normal user, 1 - Copy trading leader, follower, 3 - Both leader and follower # noqa: E501 + User role: 0 - Normal user, 1 - Copy trading leader, 2 - Follower, 3 - Both leader and follower # noqa: E501 :return: The copy_trading_role of this AccountDetail. # noqa: E501 :rtype: int @@ -206,7 +206,7 @@ def copy_trading_role(self): def copy_trading_role(self, copy_trading_role): """Sets the copy_trading_role of this AccountDetail. - User role: 0 - Normal user, 1 - Copy trading leader, follower, 3 - Both leader and follower # noqa: E501 + User role: 0 - Normal user, 1 - Copy trading leader, 2 - Follower, 3 - Both leader and follower # noqa: E501 :param copy_trading_role: The copy_trading_role of this AccountDetail. # noqa: E501 :type: int diff --git a/gate_api/models/account_detail_key.py b/gate_api/models/account_detail_key.py index cc5b2d7..d9e3728 100644 --- a/gate_api/models/account_detail_key.py +++ b/gate_api/models/account_detail_key.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, mode=None, local_vars_configuration=None): # noqa: E501 def mode(self): """Gets the mode of this AccountDetailKey. # noqa: E501 - mode: 1 - classic account 2 - portfolio margin account. # noqa: E501 + Mode: 1 - Classic mode, 2 - Legacy unified mode # noqa: E501 :return: The mode of this AccountDetailKey. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this AccountDetailKey. - mode: 1 - classic account 2 - portfolio margin account. # noqa: E501 + Mode: 1 - Classic mode, 2 - Legacy unified mode # noqa: E501 :param mode: The mode of this AccountDetailKey. # noqa: E501 :type: int diff --git a/gate_api/models/account_rate_limit.py b/gate_api/models/account_rate_limit.py index bb34e7c..2fd7e27 100644 --- a/gate_api/models/account_rate_limit.py +++ b/gate_api/models/account_rate_limit.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -95,7 +95,7 @@ def tier(self, tier): def ratio(self): """Gets the ratio of this AccountRateLimit. # noqa: E501 - Transaction rate. # noqa: E501 + Fill rate # noqa: E501 :return: The ratio of this AccountRateLimit. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def ratio(self): def ratio(self, ratio): """Sets the ratio of this AccountRateLimit. - Transaction rate. # noqa: E501 + Fill rate # noqa: E501 :param ratio: The ratio of this AccountRateLimit. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def ratio(self, ratio): def main_ratio(self): """Gets the main_ratio of this AccountRateLimit. # noqa: E501 - Total transaction ratio of main account. # noqa: E501 + Total fill ratio of main account # noqa: E501 :return: The main_ratio of this AccountRateLimit. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def main_ratio(self): def main_ratio(self, main_ratio): """Sets the main_ratio of this AccountRateLimit. - Total transaction ratio of main account. # noqa: E501 + Total fill ratio of main account # noqa: E501 :param main_ratio: The main_ratio of this AccountRateLimit. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def main_ratio(self, main_ratio): def updated_at(self): """Gets the updated_at of this AccountRateLimit. # noqa: E501 - Update time. # noqa: E501 + Update time # noqa: E501 :return: The updated_at of this AccountRateLimit. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def updated_at(self): def updated_at(self, updated_at): """Sets the updated_at of this AccountRateLimit. - Update time. # noqa: E501 + Update time # noqa: E501 :param updated_at: The updated_at of this AccountRateLimit. # noqa: E501 :type: str diff --git a/gate_api/models/agency_commission.py b/gate_api/models/agency_commission.py index 7f50c74..d843953 100644 --- a/gate_api/models/agency_commission.py +++ b/gate_api/models/agency_commission.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, commissi def commission_time(self): """Gets the commission_time of this AgencyCommission. # noqa: E501 - Commission Time. (unix timestamp). # noqa: E501 + Commission time (Unix timestamp in seconds) # noqa: E501 :return: The commission_time of this AgencyCommission. # noqa: E501 :rtype: int @@ -93,7 +93,7 @@ def commission_time(self): def commission_time(self, commission_time): """Sets the commission_time of this AgencyCommission. - Commission Time. (unix timestamp). # noqa: E501 + Commission time (Unix timestamp in seconds) # noqa: E501 :param commission_time: The commission_time of this AgencyCommission. # noqa: E501 :type: int @@ -105,7 +105,7 @@ def commission_time(self, commission_time): def user_id(self): """Gets the user_id of this AgencyCommission. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this AgencyCommission. # noqa: E501 :rtype: int @@ -116,7 +116,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this AgencyCommission. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this AgencyCommission. # noqa: E501 :type: int @@ -128,7 +128,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this AgencyCommission. # noqa: E501 - Group name. # noqa: E501 + Group name # noqa: E501 :return: The group_name of this AgencyCommission. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this AgencyCommission. - Group name. # noqa: E501 + Group name # noqa: E501 :param group_name: The group_name of this AgencyCommission. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def group_name(self, group_name): def commission_amount(self): """Gets the commission_amount of this AgencyCommission. # noqa: E501 - Commission Amount. # noqa: E501 + Transaction amount # noqa: E501 :return: The commission_amount of this AgencyCommission. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def commission_amount(self): def commission_amount(self, commission_amount): """Sets the commission_amount of this AgencyCommission. - Commission Amount. # noqa: E501 + Transaction amount # noqa: E501 :param commission_amount: The commission_amount of this AgencyCommission. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def commission_amount(self, commission_amount): def commission_asset(self): """Gets the commission_asset of this AgencyCommission. # noqa: E501 - Commission Asset. # noqa: E501 + Commission Asset # noqa: E501 :return: The commission_asset of this AgencyCommission. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def commission_asset(self): def commission_asset(self, commission_asset): """Sets the commission_asset of this AgencyCommission. - Commission Asset. # noqa: E501 + Commission Asset # noqa: E501 :param commission_asset: The commission_asset of this AgencyCommission. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def commission_asset(self, commission_asset): def source(self): """Gets the source of this AgencyCommission. # noqa: E501 - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 + Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501 :return: The source of this AgencyCommission. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def source(self): def source(self, source): """Sets the source of this AgencyCommission. - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 + Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501 :param source: The source of this AgencyCommission. # noqa: E501 :type: str diff --git a/gate_api/models/agency_commission_history.py b/gate_api/models/agency_commission_history.py index 84ffc87..50fd672 100644 --- a/gate_api/models/agency_commission_history.py +++ b/gate_api/models/agency_commission_history.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, currency_pair=None, total=None, list=None, local_vars_configu def currency_pair(self): """Gets the currency_pair of this AgencyCommissionHistory. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this AgencyCommissionHistory. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this AgencyCommissionHistory. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this AgencyCommissionHistory. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency_pair(self, currency_pair): def total(self): """Gets the total of this AgencyCommissionHistory. # noqa: E501 - Total. # noqa: E501 + Total # noqa: E501 :return: The total of this AgencyCommissionHistory. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def total(self): def total(self, total): """Sets the total of this AgencyCommissionHistory. - Total. # noqa: E501 + Total # noqa: E501 :param total: The total of this AgencyCommissionHistory. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def total(self, total): def list(self): """Gets the list of this AgencyCommissionHistory. # noqa: E501 - List of comission history. # noqa: E501 + List of commission history # noqa: E501 :return: The list of this AgencyCommissionHistory. # noqa: E501 :rtype: list[AgencyCommission] @@ -124,7 +124,7 @@ def list(self): def list(self, list): """Sets the list of this AgencyCommissionHistory. - List of comission history. # noqa: E501 + List of commission history # noqa: E501 :param list: The list of this AgencyCommissionHistory. # noqa: E501 :type: list[AgencyCommission] diff --git a/gate_api/models/agency_transaction.py b/gate_api/models/agency_transaction.py index 7b863be..abdf119 100644 --- a/gate_api/models/agency_transaction.py +++ b/gate_api/models/agency_transaction.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -97,7 +97,7 @@ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=Non def transaction_time(self): """Gets the transaction_time of this AgencyTransaction. # noqa: E501 - Transaction Time. (unix timestamp). # noqa: E501 + Transaction Time. (unix timestamp) # noqa: E501 :return: The transaction_time of this AgencyTransaction. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def transaction_time(self): def transaction_time(self, transaction_time): """Sets the transaction_time of this AgencyTransaction. - Transaction Time. (unix timestamp). # noqa: E501 + Transaction Time. (unix timestamp) # noqa: E501 :param transaction_time: The transaction_time of this AgencyTransaction. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def transaction_time(self, transaction_time): def user_id(self): """Gets the user_id of this AgencyTransaction. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this AgencyTransaction. # noqa: E501 :rtype: int @@ -131,7 +131,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this AgencyTransaction. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this AgencyTransaction. # noqa: E501 :type: int @@ -143,7 +143,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this AgencyTransaction. # noqa: E501 - Group name. # noqa: E501 + Group name # noqa: E501 :return: The group_name of this AgencyTransaction. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this AgencyTransaction. - Group name. # noqa: E501 + Group name # noqa: E501 :param group_name: The group_name of this AgencyTransaction. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def group_name(self, group_name): def fee(self): """Gets the fee of this AgencyTransaction. # noqa: E501 - Fee. # noqa: E501 + Fee # noqa: E501 :return: The fee of this AgencyTransaction. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this AgencyTransaction. - Fee. # noqa: E501 + Fee # noqa: E501 :param fee: The fee of this AgencyTransaction. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def fee(self, fee): def fee_asset(self): """Gets the fee_asset of this AgencyTransaction. # noqa: E501 - Fee currency. # noqa: E501 + Fee currency # noqa: E501 :return: The fee_asset of this AgencyTransaction. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def fee_asset(self): def fee_asset(self, fee_asset): """Sets the fee_asset of this AgencyTransaction. - Fee currency. # noqa: E501 + Fee currency # noqa: E501 :param fee_asset: The fee_asset of this AgencyTransaction. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def fee_asset(self, fee_asset): def currency_pair(self): """Gets the currency_pair of this AgencyTransaction. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this AgencyTransaction. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this AgencyTransaction. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this AgencyTransaction. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this AgencyTransaction. # noqa: E501 - Commission Amount. # noqa: E501 + Transaction amount # noqa: E501 :return: The amount of this AgencyTransaction. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this AgencyTransaction. - Commission Amount. # noqa: E501 + Transaction amount # noqa: E501 :param amount: The amount of this AgencyTransaction. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def amount(self, amount): def amount_asset(self): """Gets the amount_asset of this AgencyTransaction. # noqa: E501 - Commission Asset. # noqa: E501 + Commission Asset # noqa: E501 :return: The amount_asset of this AgencyTransaction. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def amount_asset(self): def amount_asset(self, amount_asset): """Sets the amount_asset of this AgencyTransaction. - Commission Asset. # noqa: E501 + Commission Asset # noqa: E501 :param amount_asset: The amount_asset of this AgencyTransaction. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def amount_asset(self, amount_asset): def source(self): """Gets the source of this AgencyTransaction. # noqa: E501 - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 + Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501 :return: The source of this AgencyTransaction. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def source(self): def source(self, source): """Sets the source of this AgencyTransaction. - Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate. # noqa: E501 + Commission source: SPOT - Spot commission, FUTURES - Futures commission # noqa: E501 :param source: The source of this AgencyTransaction. # noqa: E501 :type: str diff --git a/gate_api/models/agency_transaction_history.py b/gate_api/models/agency_transaction_history.py index 4824fae..99dfdeb 100644 --- a/gate_api/models/agency_transaction_history.py +++ b/gate_api/models/agency_transaction_history.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, currency_pair=None, total=None, list=None, local_vars_configu def currency_pair(self): """Gets the currency_pair of this AgencyTransactionHistory. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this AgencyTransactionHistory. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this AgencyTransactionHistory. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this AgencyTransactionHistory. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency_pair(self, currency_pair): def total(self): """Gets the total of this AgencyTransactionHistory. # noqa: E501 - Total. # noqa: E501 + Total # noqa: E501 :return: The total of this AgencyTransactionHistory. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def total(self): def total(self, total): """Sets the total of this AgencyTransactionHistory. - Total. # noqa: E501 + Total # noqa: E501 :param total: The total of this AgencyTransactionHistory. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def total(self, total): def list(self): """Gets the list of this AgencyTransactionHistory. # noqa: E501 - List of transaction history. # noqa: E501 + List of transaction history # noqa: E501 :return: The list of this AgencyTransactionHistory. # noqa: E501 :rtype: list[AgencyTransaction] @@ -124,7 +124,7 @@ def list(self): def list(self, list): """Sets the list of this AgencyTransactionHistory. - List of transaction history. # noqa: E501 + List of transaction history # noqa: E501 :param list: The list of this AgencyTransactionHistory. # noqa: E501 :type: list[AgencyTransaction] diff --git a/gate_api/models/auto_repay_setting.py b/gate_api/models/auto_repay_setting.py index b4b8261..a3d0994 100644 --- a/gate_api/models/auto_repay_setting.py +++ b/gate_api/models/auto_repay_setting.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 def status(self): """Gets the status of this AutoRepaySetting. # noqa: E501 - Auto repayment status. `on` - enabled, `off` - disabled. # noqa: E501 + Auto repayment status: `on` - enabled, `off` - disabled # noqa: E501 :return: The status of this AutoRepaySetting. # noqa: E501 :rtype: str @@ -68,7 +68,7 @@ def status(self): def status(self, status): """Sets the status of this AutoRepaySetting. - Auto repayment status. `on` - enabled, `off` - disabled. # noqa: E501 + Auto repayment status: `on` - enabled, `off` - disabled # noqa: E501 :param status: The status of this AutoRepaySetting. # noqa: E501 :type: str diff --git a/gate_api/models/batch_amend_item.py b/gate_api/models/batch_amend_item.py index f71b418..7125ac0 100644 --- a/gate_api/models/batch_amend_item.py +++ b/gate_api/models/batch_amend_item.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -85,7 +85,7 @@ def __init__(self, order_id=None, currency_pair=None, account=None, amount=None, def order_id(self): """Gets the order_id of this BatchAmendItem. # noqa: E501 - The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). # noqa: E501 + The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field) # noqa: E501 :return: The order_id of this BatchAmendItem. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this BatchAmendItem. - The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field). # noqa: E501 + The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the 'text' field) # noqa: E501 :param order_id: The order_id of this BatchAmendItem. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def order_id(self, order_id): def currency_pair(self): """Gets the currency_pair of this BatchAmendItem. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this BatchAmendItem. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BatchAmendItem. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this BatchAmendItem. # noqa: E501 :type: str @@ -135,7 +135,7 @@ def currency_pair(self, currency_pair): def account(self): """Gets the account of this BatchAmendItem. # noqa: E501 - Default spot, unified account and warehouse-by-store leverage account. # noqa: E501 + Default spot, unified account and warehouse-by-store leverage account # noqa: E501 :return: The account of this BatchAmendItem. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def account(self): def account(self, account): """Sets the account of this BatchAmendItem. - Default spot, unified account and warehouse-by-store leverage account. # noqa: E501 + Default spot, unified account and warehouse-by-store leverage account # noqa: E501 :param account: The account of this BatchAmendItem. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def account(self, account): def amount(self): """Gets the amount of this BatchAmendItem. # noqa: E501 - Trading Quantity. Only one of amountor pricecan be specified. # noqa: E501 + Trading Quantity. Only one of `amount` or `price` can be specified # noqa: E501 :return: The amount of this BatchAmendItem. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BatchAmendItem. - Trading Quantity. Only one of amountor pricecan be specified. # noqa: E501 + Trading Quantity. Only one of `amount` or `price` can be specified # noqa: E501 :param amount: The amount of this BatchAmendItem. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def amount(self, amount): def price(self): """Gets the price of this BatchAmendItem. # noqa: E501 - Trading Price. Only one of amountor pricecan be specified. # noqa: E501 + Trading Price. Only one of `amount` or `price` can be specified # noqa: E501 :return: The price of this BatchAmendItem. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def price(self): def price(self, price): """Sets the price of this BatchAmendItem. - Trading Price. Only one of amountor pricecan be specified. # noqa: E501 + Trading Price. Only one of `amount` or `price` can be specified # noqa: E501 :param price: The price of this BatchAmendItem. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this BatchAmendItem. # noqa: E501 - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :return: The amend_text of this BatchAmendItem. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this BatchAmendItem. - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :param amend_text: The amend_text of this BatchAmendItem. # noqa: E501 :type: str diff --git a/gate_api/models/batch_amend_order_req.py b/gate_api/models/batch_amend_order_req.py index bd76cce..c357589 100644 --- a/gate_api/models/batch_amend_order_req.py +++ b/gate_api/models/batch_amend_order_req.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N def order_id(self): """Gets the order_id of this BatchAmendOrderReq. # noqa: E501 - Order id, order_id and text must contain at least one. # noqa: E501 + Order id, order_id and text must contain at least one # noqa: E501 :return: The order_id of this BatchAmendOrderReq. # noqa: E501 :rtype: int @@ -88,7 +88,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this BatchAmendOrderReq. - Order id, order_id and text must contain at least one. # noqa: E501 + Order id, order_id and text must contain at least one # noqa: E501 :param order_id: The order_id of this BatchAmendOrderReq. # noqa: E501 :type: int @@ -100,7 +100,7 @@ def order_id(self, order_id): def text(self): """Gets the text of this BatchAmendOrderReq. # noqa: E501 - User-defined order text, at least one of order_id and text must be passed. # noqa: E501 + User-defined order text, at least one of order_id and text must be passed # noqa: E501 :return: The text of this BatchAmendOrderReq. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def text(self): def text(self, text): """Sets the text of this BatchAmendOrderReq. - User-defined order text, at least one of order_id and text must be passed. # noqa: E501 + User-defined order text, at least one of order_id and text must be passed # noqa: E501 :param text: The text of this BatchAmendOrderReq. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def text(self, text): def size(self): """Gets the size of this BatchAmendOrderReq. # noqa: E501 - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501 :return: The size of this BatchAmendOrderReq. # noqa: E501 :rtype: int @@ -134,7 +134,7 @@ def size(self): def size(self, size): """Sets the size of this BatchAmendOrderReq. - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501 :param size: The size of this BatchAmendOrderReq. # noqa: E501 :type: int @@ -146,7 +146,7 @@ def size(self, size): def price(self): """Gets the price of this BatchAmendOrderReq. # noqa: E501 - New order price. # noqa: E501 + New order price # noqa: E501 :return: The price of this BatchAmendOrderReq. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def price(self): def price(self, price): """Sets the price of this BatchAmendOrderReq. - New order price. # noqa: E501 + New order price # noqa: E501 :param price: The price of this BatchAmendOrderReq. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this BatchAmendOrderReq. # noqa: E501 - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :return: The amend_text of this BatchAmendOrderReq. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this BatchAmendOrderReq. - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :param amend_text: The amend_text of this BatchAmendOrderReq. # noqa: E501 :type: str diff --git a/gate_api/models/batch_futures_order.py b/gate_api/models/batch_futures_order.py index a7dba9c..0448f1a 100644 --- a/gate_api/models/batch_futures_order.py +++ b/gate_api/models/batch_futures_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -192,7 +192,7 @@ def __init__(self, succeeded=None, label=None, detail=None, id=None, user=None, def succeeded(self): """Gets the succeeded of this BatchFuturesOrder. # noqa: E501 - Whether the batch of orders succeeded. # noqa: E501 + Request execution result # noqa: E501 :return: The succeeded of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -203,7 +203,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this BatchFuturesOrder. - Whether the batch of orders succeeded. # noqa: E501 + Request execution result # noqa: E501 :param succeeded: The succeeded of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -215,7 +215,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this BatchFuturesOrder. # noqa: E501 - Error label, only exists if execution fails. # noqa: E501 + Error label, only exists if execution fails # noqa: E501 :return: The label of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -226,7 +226,7 @@ def label(self): def label(self, label): """Sets the label of this BatchFuturesOrder. - Error label, only exists if execution fails. # noqa: E501 + Error label, only exists if execution fails # noqa: E501 :param label: The label of this BatchFuturesOrder. # noqa: E501 :type: str @@ -261,7 +261,7 @@ def detail(self, detail): def id(self): """Gets the id of this BatchFuturesOrder. # noqa: E501 - Futures order ID. # noqa: E501 + Futures order ID # noqa: E501 :return: The id of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -272,7 +272,7 @@ def id(self): def id(self, id): """Sets the id of this BatchFuturesOrder. - Futures order ID. # noqa: E501 + Futures order ID # noqa: E501 :param id: The id of this BatchFuturesOrder. # noqa: E501 :type: int @@ -284,7 +284,7 @@ def id(self, id): def user(self): """Gets the user of this BatchFuturesOrder. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -295,7 +295,7 @@ def user(self): def user(self, user): """Sets the user of this BatchFuturesOrder. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this BatchFuturesOrder. # noqa: E501 :type: int @@ -307,7 +307,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this BatchFuturesOrder. # noqa: E501 - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :return: The create_time of this BatchFuturesOrder. # noqa: E501 :rtype: float @@ -318,7 +318,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this BatchFuturesOrder. - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :param create_time: The create_time of this BatchFuturesOrder. # noqa: E501 :type: float @@ -330,7 +330,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this BatchFuturesOrder. # noqa: E501 - Order finished time. Not returned if order is open. # noqa: E501 + Order finished time. Not returned if order is open # noqa: E501 :return: The finish_time of this BatchFuturesOrder. # noqa: E501 :rtype: float @@ -341,7 +341,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this BatchFuturesOrder. - Order finished time. Not returned if order is open. # noqa: E501 + Order finished time. Not returned if order is open # noqa: E501 :param finish_time: The finish_time of this BatchFuturesOrder. # noqa: E501 :type: float @@ -353,7 +353,7 @@ def finish_time(self, finish_time): def finish_as(self): """Gets the finish_as of this BatchFuturesOrder. # noqa: E501 - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :return: The finish_as of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -364,7 +364,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this BatchFuturesOrder. - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :param finish_as: The finish_as of this BatchFuturesOrder. # noqa: E501 :type: str @@ -382,7 +382,7 @@ def finish_as(self, finish_as): def status(self): """Gets the status of this BatchFuturesOrder. # noqa: E501 - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + Order status - `open`: Pending - `finished`: Completed # noqa: E501 :return: The status of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -393,7 +393,7 @@ def status(self): def status(self, status): """Sets the status of this BatchFuturesOrder. - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + Order status - `open`: Pending - `finished`: Completed # noqa: E501 :param status: The status of this BatchFuturesOrder. # noqa: E501 :type: str @@ -411,7 +411,7 @@ def status(self, status): def contract(self): """Gets the contract of this BatchFuturesOrder. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -422,7 +422,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this BatchFuturesOrder. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this BatchFuturesOrder. # noqa: E501 :type: str @@ -434,7 +434,7 @@ def contract(self, contract): def size(self): """Gets the size of this BatchFuturesOrder. # noqa: E501 - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501 :return: The size of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -445,7 +445,7 @@ def size(self): def size(self, size): """Sets the size of this BatchFuturesOrder. - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501 :param size: The size of this BatchFuturesOrder. # noqa: E501 :type: int @@ -457,7 +457,7 @@ def size(self, size): def iceberg(self): """Gets the iceberg of this BatchFuturesOrder. # noqa: E501 - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501 :return: The iceberg of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -468,7 +468,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this BatchFuturesOrder. - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501 :param iceberg: The iceberg of this BatchFuturesOrder. # noqa: E501 :type: int @@ -480,7 +480,7 @@ def iceberg(self, iceberg): def price(self): """Gets the price of this BatchFuturesOrder. # noqa: E501 - Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 + Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501 :return: The price of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -491,7 +491,7 @@ def price(self): def price(self, price): """Sets the price of this BatchFuturesOrder. - Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 + Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501 :param price: The price of this BatchFuturesOrder. # noqa: E501 :type: str @@ -503,7 +503,7 @@ def price(self, price): def close(self): """Gets the close of this BatchFuturesOrder. # noqa: E501 - Set as `true` to close the position, with `size` set to 0. # noqa: E501 + Set as `true` to close the position, with `size` set to 0 # noqa: E501 :return: The close of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -514,7 +514,7 @@ def close(self): def close(self, close): """Sets the close of this BatchFuturesOrder. - Set as `true` to close the position, with `size` set to 0. # noqa: E501 + Set as `true` to close the position, with `size` set to 0 # noqa: E501 :param close: The close of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -526,7 +526,7 @@ def close(self, close): def is_close(self): """Gets the is_close of this BatchFuturesOrder. # noqa: E501 - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :return: The is_close of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -537,7 +537,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this BatchFuturesOrder. - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :param is_close: The is_close of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -549,7 +549,7 @@ def is_close(self, is_close): def reduce_only(self): """Gets the reduce_only of this BatchFuturesOrder. # noqa: E501 - Set as `true` to be reduce-only order. # noqa: E501 + Set as `true` to be reduce-only order # noqa: E501 :return: The reduce_only of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -560,7 +560,7 @@ def reduce_only(self): def reduce_only(self, reduce_only): """Sets the reduce_only of this BatchFuturesOrder. - Set as `true` to be reduce-only order. # noqa: E501 + Set as `true` to be reduce-only order # noqa: E501 :param reduce_only: The reduce_only of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -572,7 +572,7 @@ def reduce_only(self, reduce_only): def is_reduce_only(self): """Gets the is_reduce_only of this BatchFuturesOrder. # noqa: E501 - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :return: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -583,7 +583,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this BatchFuturesOrder. - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :param is_reduce_only: The is_reduce_only of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -595,7 +595,7 @@ def is_reduce_only(self, is_reduce_only): def is_liq(self): """Gets the is_liq of this BatchFuturesOrder. # noqa: E501 - Is the order for liquidation. # noqa: E501 + Is the order for liquidation # noqa: E501 :return: The is_liq of this BatchFuturesOrder. # noqa: E501 :rtype: bool @@ -606,7 +606,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this BatchFuturesOrder. - Is the order for liquidation. # noqa: E501 + Is the order for liquidation # noqa: E501 :param is_liq: The is_liq of this BatchFuturesOrder. # noqa: E501 :type: bool @@ -647,7 +647,7 @@ def tif(self, tif): def left(self): """Gets the left of this BatchFuturesOrder. # noqa: E501 - Size left to be traded. # noqa: E501 + Unfilled quantity # noqa: E501 :return: The left of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -658,7 +658,7 @@ def left(self): def left(self, left): """Sets the left of this BatchFuturesOrder. - Size left to be traded. # noqa: E501 + Unfilled quantity # noqa: E501 :param left: The left of this BatchFuturesOrder. # noqa: E501 :type: int @@ -670,7 +670,7 @@ def left(self, left): def fill_price(self): """Gets the fill_price of this BatchFuturesOrder. # noqa: E501 - Fill price of the order. # noqa: E501 + Fill price # noqa: E501 :return: The fill_price of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -681,7 +681,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this BatchFuturesOrder. - Fill price of the order. # noqa: E501 + Fill price # noqa: E501 :param fill_price: The fill_price of this BatchFuturesOrder. # noqa: E501 :type: str @@ -716,7 +716,7 @@ def text(self, text): def tkfr(self): """Gets the tkfr of this BatchFuturesOrder. # noqa: E501 - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :return: The tkfr of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -727,7 +727,7 @@ def tkfr(self): def tkfr(self, tkfr): """Sets the tkfr of this BatchFuturesOrder. - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :param tkfr: The tkfr of this BatchFuturesOrder. # noqa: E501 :type: str @@ -739,7 +739,7 @@ def tkfr(self, tkfr): def mkfr(self): """Gets the mkfr of this BatchFuturesOrder. # noqa: E501 - Maker fee. # noqa: E501 + Maker fee # noqa: E501 :return: The mkfr of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -750,7 +750,7 @@ def mkfr(self): def mkfr(self, mkfr): """Sets the mkfr of this BatchFuturesOrder. - Maker fee. # noqa: E501 + Maker fee # noqa: E501 :param mkfr: The mkfr of this BatchFuturesOrder. # noqa: E501 :type: str @@ -762,7 +762,7 @@ def mkfr(self, mkfr): def refu(self): """Gets the refu of this BatchFuturesOrder. # noqa: E501 - Reference user ID. # noqa: E501 + Referrer user ID # noqa: E501 :return: The refu of this BatchFuturesOrder. # noqa: E501 :rtype: int @@ -773,7 +773,7 @@ def refu(self): def refu(self, refu): """Sets the refu of this BatchFuturesOrder. - Reference user ID. # noqa: E501 + Referrer user ID # noqa: E501 :param refu: The refu of this BatchFuturesOrder. # noqa: E501 :type: int @@ -814,7 +814,7 @@ def auto_size(self, auto_size): def stp_act(self): """Gets the stp_act of this BatchFuturesOrder. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this BatchFuturesOrder. # noqa: E501 :rtype: str @@ -825,7 +825,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this BatchFuturesOrder. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this BatchFuturesOrder. # noqa: E501 :type: str diff --git a/gate_api/models/batch_order.py b/gate_api/models/batch_order.py index 3a6af81..12d30e9 100644 --- a/gate_api/models/batch_order.py +++ b/gate_api/models/batch_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -237,7 +237,7 @@ def __init__(self, order_id=None, amend_text=None, text=None, succeeded=None, la def order_id(self): """Gets the order_id of this BatchOrder. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this BatchOrder. # noqa: E501 :rtype: str @@ -248,7 +248,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this BatchOrder. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this BatchOrder. # noqa: E501 :type: str @@ -260,7 +260,7 @@ def order_id(self, order_id): def amend_text(self): """Gets the amend_text of this BatchOrder. # noqa: E501 - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :return: The amend_text of this BatchOrder. # noqa: E501 :rtype: str @@ -271,7 +271,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this BatchOrder. - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :param amend_text: The amend_text of this BatchOrder. # noqa: E501 :type: str @@ -283,7 +283,7 @@ def amend_text(self, amend_text): def text(self): """Gets the text of this BatchOrder. # noqa: E501 - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 :return: The text of this BatchOrder. # noqa: E501 :rtype: str @@ -294,7 +294,7 @@ def text(self): def text(self, text): """Sets the text of this BatchOrder. - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 :param text: The text of this BatchOrder. # noqa: E501 :type: str @@ -306,7 +306,7 @@ def text(self, text): def succeeded(self): """Gets the succeeded of this BatchOrder. # noqa: E501 - Whether the batch of orders succeeded. # noqa: E501 + Request execution result # noqa: E501 :return: The succeeded of this BatchOrder. # noqa: E501 :rtype: bool @@ -317,7 +317,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this BatchOrder. - Whether the batch of orders succeeded. # noqa: E501 + Request execution result # noqa: E501 :param succeeded: The succeeded of this BatchOrder. # noqa: E501 :type: bool @@ -329,7 +329,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this BatchOrder. # noqa: E501 - Error label, if any, otherwise an empty string. # noqa: E501 + Error label, if any, otherwise an empty string # noqa: E501 :return: The label of this BatchOrder. # noqa: E501 :rtype: str @@ -340,7 +340,7 @@ def label(self): def label(self, label): """Sets the label of this BatchOrder. - Error label, if any, otherwise an empty string. # noqa: E501 + Error label, if any, otherwise an empty string # noqa: E501 :param label: The label of this BatchOrder. # noqa: E501 :type: str @@ -352,7 +352,7 @@ def label(self, label): def message(self): """Gets the message of this BatchOrder. # noqa: E501 - Detailed error message, if any, otherwise an empty string. # noqa: E501 + Detailed error message, if any, otherwise an empty string # noqa: E501 :return: The message of this BatchOrder. # noqa: E501 :rtype: str @@ -363,7 +363,7 @@ def message(self): def message(self, message): """Sets the message of this BatchOrder. - Detailed error message, if any, otherwise an empty string. # noqa: E501 + Detailed error message, if any, otherwise an empty string # noqa: E501 :param message: The message of this BatchOrder. # noqa: E501 :type: str @@ -375,7 +375,7 @@ def message(self, message): def id(self): """Gets the id of this BatchOrder. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this BatchOrder. # noqa: E501 :rtype: str @@ -386,7 +386,7 @@ def id(self): def id(self, id): """Sets the id of this BatchOrder. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this BatchOrder. # noqa: E501 :type: str @@ -398,7 +398,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this BatchOrder. # noqa: E501 - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :return: The create_time of this BatchOrder. # noqa: E501 :rtype: str @@ -409,7 +409,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this BatchOrder. - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :param create_time: The create_time of this BatchOrder. # noqa: E501 :type: str @@ -421,7 +421,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this BatchOrder. # noqa: E501 - Last modification time of order. # noqa: E501 + Last modification time of order # noqa: E501 :return: The update_time of this BatchOrder. # noqa: E501 :rtype: str @@ -432,7 +432,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this BatchOrder. - Last modification time of order. # noqa: E501 + Last modification time of order # noqa: E501 :param update_time: The update_time of this BatchOrder. # noqa: E501 :type: str @@ -444,7 +444,7 @@ def update_time(self, update_time): def create_time_ms(self): """Gets the create_time_ms of this BatchOrder. # noqa: E501 - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :return: The create_time_ms of this BatchOrder. # noqa: E501 :rtype: int @@ -455,7 +455,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this BatchOrder. - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :param create_time_ms: The create_time_ms of this BatchOrder. # noqa: E501 :type: int @@ -467,7 +467,7 @@ def create_time_ms(self, create_time_ms): def update_time_ms(self): """Gets the update_time_ms of this BatchOrder. # noqa: E501 - Last modification time of order (in milliseconds). # noqa: E501 + Last modification time of order (in milliseconds) # noqa: E501 :return: The update_time_ms of this BatchOrder. # noqa: E501 :rtype: int @@ -478,7 +478,7 @@ def update_time_ms(self): def update_time_ms(self, update_time_ms): """Sets the update_time_ms of this BatchOrder. - Last modification time of order (in milliseconds). # noqa: E501 + Last modification time of order (in milliseconds) # noqa: E501 :param update_time_ms: The update_time_ms of this BatchOrder. # noqa: E501 :type: int @@ -519,7 +519,7 @@ def status(self, status): def currency_pair(self): """Gets the currency_pair of this BatchOrder. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this BatchOrder. # noqa: E501 :rtype: str @@ -530,7 +530,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BatchOrder. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this BatchOrder. # noqa: E501 :type: str @@ -600,7 +600,7 @@ def account(self, account): def side(self): """Gets the side of this BatchOrder. # noqa: E501 - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this BatchOrder. # noqa: E501 :rtype: str @@ -611,7 +611,7 @@ def side(self): def side(self, side): """Sets the side of this BatchOrder. - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this BatchOrder. # noqa: E501 :type: str @@ -629,7 +629,7 @@ def side(self, side): def amount(self): """Gets the amount of this BatchOrder. # noqa: E501 - Trade amount. # noqa: E501 + Trade amount # noqa: E501 :return: The amount of this BatchOrder. # noqa: E501 :rtype: str @@ -640,7 +640,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BatchOrder. - Trade amount. # noqa: E501 + Trade amount # noqa: E501 :param amount: The amount of this BatchOrder. # noqa: E501 :type: str @@ -652,7 +652,7 @@ def amount(self, amount): def price(self): """Gets the price of this BatchOrder. # noqa: E501 - Order price. # noqa: E501 + Order price # noqa: E501 :return: The price of this BatchOrder. # noqa: E501 :rtype: str @@ -663,7 +663,7 @@ def price(self): def price(self, price): """Sets the price of this BatchOrder. - Order price. # noqa: E501 + Order price # noqa: E501 :param price: The price of this BatchOrder. # noqa: E501 :type: str @@ -704,7 +704,7 @@ def time_in_force(self, time_in_force): def iceberg(self): """Gets the iceberg of this BatchOrder. # noqa: E501 - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501 :return: The iceberg of this BatchOrder. # noqa: E501 :rtype: str @@ -715,7 +715,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this BatchOrder. - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501 :param iceberg: The iceberg of this BatchOrder. # noqa: E501 :type: str @@ -727,7 +727,7 @@ def iceberg(self, iceberg): def auto_borrow(self): """Gets the auto_borrow of this BatchOrder. # noqa: E501 - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501 :return: The auto_borrow of this BatchOrder. # noqa: E501 :rtype: bool @@ -738,7 +738,7 @@ def auto_borrow(self): def auto_borrow(self, auto_borrow): """Sets the auto_borrow of this BatchOrder. - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501 :param auto_borrow: The auto_borrow of this BatchOrder. # noqa: E501 :type: bool @@ -750,7 +750,7 @@ def auto_borrow(self, auto_borrow): def auto_repay(self): """Gets the auto_repay of this BatchOrder. # noqa: E501 - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order # noqa: E501 :return: The auto_repay of this BatchOrder. # noqa: E501 :rtype: bool @@ -761,7 +761,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this BatchOrder. - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order # noqa: E501 :param auto_repay: The auto_repay of this BatchOrder. # noqa: E501 :type: bool @@ -773,7 +773,7 @@ def auto_repay(self, auto_repay): def left(self): """Gets the left of this BatchOrder. # noqa: E501 - Amount left to fill. # noqa: E501 + Amount left to fill # noqa: E501 :return: The left of this BatchOrder. # noqa: E501 :rtype: str @@ -784,7 +784,7 @@ def left(self): def left(self, left): """Sets the left of this BatchOrder. - Amount left to fill. # noqa: E501 + Amount left to fill # noqa: E501 :param left: The left of this BatchOrder. # noqa: E501 :type: str @@ -796,7 +796,7 @@ def left(self, left): def filled_amount(self): """Gets the filled_amount of this BatchOrder. # noqa: E501 - Amount traded to fill. # noqa: E501 + Amount filled # noqa: E501 :return: The filled_amount of this BatchOrder. # noqa: E501 :rtype: str @@ -807,7 +807,7 @@ def filled_amount(self): def filled_amount(self, filled_amount): """Sets the filled_amount of this BatchOrder. - Amount traded to fill. # noqa: E501 + Amount filled # noqa: E501 :param filled_amount: The filled_amount of this BatchOrder. # noqa: E501 :type: str @@ -819,7 +819,7 @@ def filled_amount(self, filled_amount): def fill_price(self): """Gets the fill_price of this BatchOrder. # noqa: E501 - Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 :return: The fill_price of this BatchOrder. # noqa: E501 :rtype: str @@ -830,7 +830,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this BatchOrder. - Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 :param fill_price: The fill_price of this BatchOrder. # noqa: E501 :type: str @@ -842,7 +842,7 @@ def fill_price(self, fill_price): def filled_total(self): """Gets the filled_total of this BatchOrder. # noqa: E501 - Total filled in quote currency. # noqa: E501 + Total filled in quote currency # noqa: E501 :return: The filled_total of this BatchOrder. # noqa: E501 :rtype: str @@ -853,7 +853,7 @@ def filled_total(self): def filled_total(self, filled_total): """Sets the filled_total of this BatchOrder. - Total filled in quote currency. # noqa: E501 + Total filled in quote currency # noqa: E501 :param filled_total: The filled_total of this BatchOrder. # noqa: E501 :type: str @@ -865,7 +865,7 @@ def filled_total(self, filled_total): def avg_deal_price(self): """Gets the avg_deal_price of this BatchOrder. # noqa: E501 - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :return: The avg_deal_price of this BatchOrder. # noqa: E501 :rtype: str @@ -876,7 +876,7 @@ def avg_deal_price(self): def avg_deal_price(self, avg_deal_price): """Sets the avg_deal_price of this BatchOrder. - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :param avg_deal_price: The avg_deal_price of this BatchOrder. # noqa: E501 :type: str @@ -888,7 +888,7 @@ def avg_deal_price(self, avg_deal_price): def fee(self): """Gets the fee of this BatchOrder. # noqa: E501 - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :return: The fee of this BatchOrder. # noqa: E501 :rtype: str @@ -899,7 +899,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this BatchOrder. - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :param fee: The fee of this BatchOrder. # noqa: E501 :type: str @@ -911,7 +911,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this BatchOrder. # noqa: E501 - Fee currency unit. # noqa: E501 + Fee currency unit # noqa: E501 :return: The fee_currency of this BatchOrder. # noqa: E501 :rtype: str @@ -922,7 +922,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this BatchOrder. - Fee currency unit. # noqa: E501 + Fee currency unit # noqa: E501 :param fee_currency: The fee_currency of this BatchOrder. # noqa: E501 :type: str @@ -934,7 +934,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this BatchOrder. # noqa: E501 - Points used to deduct fee. # noqa: E501 + Points used to deduct fee # noqa: E501 :return: The point_fee of this BatchOrder. # noqa: E501 :rtype: str @@ -945,7 +945,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this BatchOrder. - Points used to deduct fee. # noqa: E501 + Points used to deduct fee # noqa: E501 :param point_fee: The point_fee of this BatchOrder. # noqa: E501 :type: str @@ -957,7 +957,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this BatchOrder. # noqa: E501 - GT used to deduct fee. # noqa: E501 + GT used to deduct fee # noqa: E501 :return: The gt_fee of this BatchOrder. # noqa: E501 :rtype: str @@ -968,7 +968,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this BatchOrder. - GT used to deduct fee. # noqa: E501 + GT used to deduct fee # noqa: E501 :param gt_fee: The gt_fee of this BatchOrder. # noqa: E501 :type: str @@ -980,7 +980,7 @@ def gt_fee(self, gt_fee): def gt_discount(self): """Gets the gt_discount of this BatchOrder. # noqa: E501 - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :return: The gt_discount of this BatchOrder. # noqa: E501 :rtype: bool @@ -991,7 +991,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this BatchOrder. - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :param gt_discount: The gt_discount of this BatchOrder. # noqa: E501 :type: bool @@ -1003,7 +1003,7 @@ def gt_discount(self, gt_discount): def rebated_fee(self): """Gets the rebated_fee of this BatchOrder. # noqa: E501 - Rebated fee. # noqa: E501 + Rebated fee # noqa: E501 :return: The rebated_fee of this BatchOrder. # noqa: E501 :rtype: str @@ -1014,7 +1014,7 @@ def rebated_fee(self): def rebated_fee(self, rebated_fee): """Sets the rebated_fee of this BatchOrder. - Rebated fee. # noqa: E501 + Rebated fee # noqa: E501 :param rebated_fee: The rebated_fee of this BatchOrder. # noqa: E501 :type: str @@ -1026,7 +1026,7 @@ def rebated_fee(self, rebated_fee): def rebated_fee_currency(self): """Gets the rebated_fee_currency of this BatchOrder. # noqa: E501 - Rebated fee currency unit. # noqa: E501 + Rebated fee currency unit # noqa: E501 :return: The rebated_fee_currency of this BatchOrder. # noqa: E501 :rtype: str @@ -1037,7 +1037,7 @@ def rebated_fee_currency(self): def rebated_fee_currency(self, rebated_fee_currency): """Sets the rebated_fee_currency of this BatchOrder. - Rebated fee currency unit. # noqa: E501 + Rebated fee currency unit # noqa: E501 :param rebated_fee_currency: The rebated_fee_currency of this BatchOrder. # noqa: E501 :type: str diff --git a/gate_api/models/borrow_currency_info.py b/gate_api/models/borrow_currency_info.py index 8de8eeb..4c6b514 100644 --- a/gate_api/models/borrow_currency_info.py +++ b/gate_api/models/borrow_currency_info.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, currency=None, index_price=None, left_repay_principal=None, l def currency(self): """Gets the currency of this BorrowCurrencyInfo. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this BorrowCurrencyInfo. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this BorrowCurrencyInfo. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this BorrowCurrencyInfo. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def index_price(self, index_price): def left_repay_principal(self): """Gets the left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 - outstanding principal. # noqa: E501 + Outstanding principal # noqa: E501 :return: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def left_repay_principal(self): def left_repay_principal(self, left_repay_principal): """Sets the left_repay_principal of this BorrowCurrencyInfo. - outstanding principal. # noqa: E501 + Outstanding principal # noqa: E501 :param left_repay_principal: The left_repay_principal of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def left_repay_principal(self, left_repay_principal): def left_repay_interest(self): """Gets the left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 - outstanding interest. # noqa: E501 + Outstanding interest # noqa: E501 :return: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def left_repay_interest(self): def left_repay_interest(self, left_repay_interest): """Sets the left_repay_interest of this BorrowCurrencyInfo. - outstanding interest. # noqa: E501 + Outstanding interest # noqa: E501 :param left_repay_interest: The left_repay_interest of this BorrowCurrencyInfo. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def left_repay_interest(self, left_repay_interest): def left_repay_usdt(self): """Gets the left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 - Value of left total repayments amount in USDT. # noqa: E501 + Remaining total outstanding value converted to USDT # noqa: E501 :return: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def left_repay_usdt(self): def left_repay_usdt(self, left_repay_usdt): """Sets the left_repay_usdt of this BorrowCurrencyInfo. - Value of left total repayments amount in USDT. # noqa: E501 + Remaining total outstanding value converted to USDT # noqa: E501 :param left_repay_usdt: The left_repay_usdt of this BorrowCurrencyInfo. # noqa: E501 :type: str diff --git a/gate_api/models/broker_commission.py b/gate_api/models/broker_commission.py index db81209..cc6e70a 100644 --- a/gate_api/models/broker_commission.py +++ b/gate_api/models/broker_commission.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this BrokerCommission. # noqa: E501 - Total. # noqa: E501 + Total # noqa: E501 :return: The total of this BrokerCommission. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this BrokerCommission. - Total. # noqa: E501 + Total # noqa: E501 :param total: The total of this BrokerCommission. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this BrokerCommission. # noqa: E501 - List of comission history. # noqa: E501 + List of commission history # noqa: E501 :return: The list of this BrokerCommission. # noqa: E501 :rtype: list[BrokerCommission1] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this BrokerCommission. - List of comission history. # noqa: E501 + List of commission history # noqa: E501 :param list: The list of this BrokerCommission. # noqa: E501 :type: list[BrokerCommission1] diff --git a/gate_api/models/broker_commission1.py b/gate_api/models/broker_commission1.py index 88a08f3..71474fc 100644 --- a/gate_api/models/broker_commission1.py +++ b/gate_api/models/broker_commission1.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -107,7 +107,7 @@ def __init__(self, commission_time=None, user_id=None, group_name=None, amount=N def commission_time(self): """Gets the commission_time of this BrokerCommission1. # noqa: E501 - Commission Time. (unix timestamp). # noqa: E501 + Commission time (Unix timestamp in seconds) # noqa: E501 :return: The commission_time of this BrokerCommission1. # noqa: E501 :rtype: int @@ -118,7 +118,7 @@ def commission_time(self): def commission_time(self, commission_time): """Sets the commission_time of this BrokerCommission1. - Commission Time. (unix timestamp). # noqa: E501 + Commission time (Unix timestamp in seconds) # noqa: E501 :param commission_time: The commission_time of this BrokerCommission1. # noqa: E501 :type: int @@ -130,7 +130,7 @@ def commission_time(self, commission_time): def user_id(self): """Gets the user_id of this BrokerCommission1. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this BrokerCommission1. # noqa: E501 :rtype: int @@ -141,7 +141,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this BrokerCommission1. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this BrokerCommission1. # noqa: E501 :type: int @@ -153,7 +153,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this BrokerCommission1. # noqa: E501 - Group name. # noqa: E501 + Group name # noqa: E501 :return: The group_name of this BrokerCommission1. # noqa: E501 :rtype: str @@ -164,7 +164,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this BrokerCommission1. - Group name. # noqa: E501 + Group name # noqa: E501 :param group_name: The group_name of this BrokerCommission1. # noqa: E501 :type: str @@ -176,7 +176,7 @@ def group_name(self, group_name): def amount(self): """Gets the amount of this BrokerCommission1. # noqa: E501 - The amount of commission rebates. # noqa: E501 + The amount of commission rebates # noqa: E501 :return: The amount of this BrokerCommission1. # noqa: E501 :rtype: str @@ -187,7 +187,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BrokerCommission1. - The amount of commission rebates. # noqa: E501 + The amount of commission rebates # noqa: E501 :param amount: The amount of this BrokerCommission1. # noqa: E501 :type: str @@ -199,7 +199,7 @@ def amount(self, amount): def fee(self): """Gets the fee of this BrokerCommission1. # noqa: E501 - Fee. # noqa: E501 + Fee # noqa: E501 :return: The fee of this BrokerCommission1. # noqa: E501 :rtype: str @@ -210,7 +210,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this BrokerCommission1. - Fee. # noqa: E501 + Fee # noqa: E501 :param fee: The fee of this BrokerCommission1. # noqa: E501 :type: str @@ -222,7 +222,7 @@ def fee(self, fee): def fee_asset(self): """Gets the fee_asset of this BrokerCommission1. # noqa: E501 - Fee currency. # noqa: E501 + Fee currency # noqa: E501 :return: The fee_asset of this BrokerCommission1. # noqa: E501 :rtype: str @@ -233,7 +233,7 @@ def fee_asset(self): def fee_asset(self, fee_asset): """Sets the fee_asset of this BrokerCommission1. - Fee currency. # noqa: E501 + Fee currency # noqa: E501 :param fee_asset: The fee_asset of this BrokerCommission1. # noqa: E501 :type: str @@ -245,7 +245,7 @@ def fee_asset(self, fee_asset): def rebate_fee(self): """Gets the rebate_fee of this BrokerCommission1. # noqa: E501 - The income from rebates, converted to USDT. # noqa: E501 + The income from rebates, converted to USDT # noqa: E501 :return: The rebate_fee of this BrokerCommission1. # noqa: E501 :rtype: str @@ -256,7 +256,7 @@ def rebate_fee(self): def rebate_fee(self, rebate_fee): """Sets the rebate_fee of this BrokerCommission1. - The income from rebates, converted to USDT. # noqa: E501 + The income from rebates, converted to USDT # noqa: E501 :param rebate_fee: The rebate_fee of this BrokerCommission1. # noqa: E501 :type: str @@ -268,7 +268,7 @@ def rebate_fee(self, rebate_fee): def source(self): """Gets the source of this BrokerCommission1. # noqa: E501 - Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 + Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501 :return: The source of this BrokerCommission1. # noqa: E501 :rtype: str @@ -279,7 +279,7 @@ def source(self): def source(self, source): """Sets the source of this BrokerCommission1. - Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 + Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501 :param source: The source of this BrokerCommission1. # noqa: E501 :type: str @@ -291,7 +291,7 @@ def source(self, source): def currency_pair(self): """Gets the currency_pair of this BrokerCommission1. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this BrokerCommission1. # noqa: E501 :rtype: str @@ -302,7 +302,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BrokerCommission1. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this BrokerCommission1. # noqa: E501 :type: str @@ -335,7 +335,7 @@ def sub_broker_info(self, sub_broker_info): def alpha_contract_addr(self): """Gets the alpha_contract_addr of this BrokerCommission1. # noqa: E501 - Alpha token address # noqa: E501 + Alpha contract address # noqa: E501 :return: The alpha_contract_addr of this BrokerCommission1. # noqa: E501 :rtype: str @@ -346,7 +346,7 @@ def alpha_contract_addr(self): def alpha_contract_addr(self, alpha_contract_addr): """Sets the alpha_contract_addr of this BrokerCommission1. - Alpha token address # noqa: E501 + Alpha contract address # noqa: E501 :param alpha_contract_addr: The alpha_contract_addr of this BrokerCommission1. # noqa: E501 :type: str diff --git a/gate_api/models/broker_commission_sub_broker_info.py b/gate_api/models/broker_commission_sub_broker_info.py index f945318..220166c 100644 --- a/gate_api/models/broker_commission_sub_broker_info.py +++ b/gate_api/models/broker_commission_sub_broker_info.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, user_id=None, original_commission_rate=None, relative_commiss def user_id(self): """Gets the user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker user ID. # noqa: E501 + Sub-broker user ID # noqa: E501 :return: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: int @@ -83,7 +83,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this BrokerCommissionSubBrokerInfo. - The sub broker user ID. # noqa: E501 + Sub-broker user ID # noqa: E501 :param user_id: The user_id of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: int @@ -95,7 +95,7 @@ def user_id(self, user_id): def original_commission_rate(self): """Gets the original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker original commission rate. # noqa: E501 + Sub-broker original commission rate # noqa: E501 :return: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def original_commission_rate(self): def original_commission_rate(self, original_commission_rate): """Sets the original_commission_rate of this BrokerCommissionSubBrokerInfo. - The sub broker original commission rate. # noqa: E501 + Sub-broker original commission rate # noqa: E501 :param original_commission_rate: The original_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def original_commission_rate(self, original_commission_rate): def relative_commission_rate(self): """Gets the relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker relative commission rate. # noqa: E501 + Sub-broker relative commission rate # noqa: E501 :return: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def relative_commission_rate(self): def relative_commission_rate(self, relative_commission_rate): """Sets the relative_commission_rate of this BrokerCommissionSubBrokerInfo. - The sub broker relative commission rate. # noqa: E501 + Sub-broker relative commission rate # noqa: E501 :param relative_commission_rate: The relative_commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def relative_commission_rate(self, relative_commission_rate): def commission_rate(self): """Gets the commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 - The sub broker actual commission rate. # noqa: E501 + Sub-broker actual commission rate # noqa: E501 :return: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def commission_rate(self): def commission_rate(self, commission_rate): """Sets the commission_rate of this BrokerCommissionSubBrokerInfo. - The sub broker actual commission rate. # noqa: E501 + Sub-broker actual commission rate # noqa: E501 :param commission_rate: The commission_rate of this BrokerCommissionSubBrokerInfo. # noqa: E501 :type: str diff --git a/gate_api/models/broker_transaction.py b/gate_api/models/broker_transaction.py index fb67ecd..0a85977 100644 --- a/gate_api/models/broker_transaction.py +++ b/gate_api/models/broker_transaction.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this BrokerTransaction. # noqa: E501 - Total. # noqa: E501 + Total # noqa: E501 :return: The total of this BrokerTransaction. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this BrokerTransaction. - Total. # noqa: E501 + Total # noqa: E501 :param total: The total of this BrokerTransaction. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this BrokerTransaction. # noqa: E501 - List of transaction history. # noqa: E501 + List of transaction history # noqa: E501 :return: The list of this BrokerTransaction. # noqa: E501 :rtype: list[BrokerTransaction1] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this BrokerTransaction. - List of transaction history. # noqa: E501 + List of transaction history # noqa: E501 :param list: The list of this BrokerTransaction. # noqa: E501 :type: list[BrokerTransaction1] diff --git a/gate_api/models/broker_transaction1.py b/gate_api/models/broker_transaction1.py index fdbf97b..87a12d0 100644 --- a/gate_api/models/broker_transaction1.py +++ b/gate_api/models/broker_transaction1.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, transaction_time=None, user_id=None, group_name=None, fee=Non def transaction_time(self): """Gets the transaction_time of this BrokerTransaction1. # noqa: E501 - Transaction Time. (unix timestamp). # noqa: E501 + Transaction Time. (unix timestamp) # noqa: E501 :return: The transaction_time of this BrokerTransaction1. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def transaction_time(self): def transaction_time(self, transaction_time): """Sets the transaction_time of this BrokerTransaction1. - Transaction Time. (unix timestamp). # noqa: E501 + Transaction Time. (unix timestamp) # noqa: E501 :param transaction_time: The transaction_time of this BrokerTransaction1. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def transaction_time(self, transaction_time): def user_id(self): """Gets the user_id of this BrokerTransaction1. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this BrokerTransaction1. # noqa: E501 :rtype: int @@ -136,7 +136,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this BrokerTransaction1. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this BrokerTransaction1. # noqa: E501 :type: int @@ -148,7 +148,7 @@ def user_id(self, user_id): def group_name(self): """Gets the group_name of this BrokerTransaction1. # noqa: E501 - Group name. # noqa: E501 + Group name # noqa: E501 :return: The group_name of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def group_name(self): def group_name(self, group_name): """Sets the group_name of this BrokerTransaction1. - Group name. # noqa: E501 + Group name # noqa: E501 :param group_name: The group_name of this BrokerTransaction1. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def group_name(self, group_name): def fee(self): """Gets the fee of this BrokerTransaction1. # noqa: E501 - fee (usdt). # noqa: E501 + Fee amount (USDT) # noqa: E501 :return: The fee of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this BrokerTransaction1. - fee (usdt). # noqa: E501 + Fee amount (USDT) # noqa: E501 :param fee: The fee of this BrokerTransaction1. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def fee(self, fee): def currency_pair(self): """Gets the currency_pair of this BrokerTransaction1. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this BrokerTransaction1. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this BrokerTransaction1. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this BrokerTransaction1. # noqa: E501 - Commission Amount. # noqa: E501 + Transaction amount # noqa: E501 :return: The amount of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this BrokerTransaction1. - Commission Amount. # noqa: E501 + Transaction amount # noqa: E501 :param amount: The amount of this BrokerTransaction1. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def amount(self, amount): def fee_asset(self): """Gets the fee_asset of this BrokerTransaction1. # noqa: E501 - Fee currency. # noqa: E501 + Fee currency # noqa: E501 :return: The fee_asset of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def fee_asset(self): def fee_asset(self, fee_asset): """Sets the fee_asset of this BrokerTransaction1. - Fee currency. # noqa: E501 + Fee currency # noqa: E501 :param fee_asset: The fee_asset of this BrokerTransaction1. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def fee_asset(self, fee_asset): def source(self): """Gets the source of this BrokerTransaction1. # noqa: E501 - Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 + Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501 :return: The source of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def source(self): def source(self, source): """Sets the source of this BrokerTransaction1. - Rebate Type: Spot、Futures、Options.、Alpha # noqa: E501 + Commission transaction type: Spot, Futures, Options, Alpha # noqa: E501 :param source: The source of this BrokerTransaction1. # noqa: E501 :type: str @@ -307,7 +307,7 @@ def sub_broker_info(self, sub_broker_info): def alpha_contract_addr(self): """Gets the alpha_contract_addr of this BrokerTransaction1. # noqa: E501 - Alpha token address # noqa: E501 + Alpha contract address # noqa: E501 :return: The alpha_contract_addr of this BrokerTransaction1. # noqa: E501 :rtype: str @@ -318,7 +318,7 @@ def alpha_contract_addr(self): def alpha_contract_addr(self, alpha_contract_addr): """Sets the alpha_contract_addr of this BrokerTransaction1. - Alpha token address # noqa: E501 + Alpha contract address # noqa: E501 :param alpha_contract_addr: The alpha_contract_addr of this BrokerTransaction1. # noqa: E501 :type: str diff --git a/gate_api/models/cancel_batch_order.py b/gate_api/models/cancel_batch_order.py index 2894fe2..bfc7bd9 100644 --- a/gate_api/models/cancel_batch_order.py +++ b/gate_api/models/cancel_batch_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -70,7 +70,7 @@ def __init__(self, currency_pair=None, id=None, account=None, action_mode=None, def currency_pair(self): """Gets the currency_pair of this CancelBatchOrder. # noqa: E501 - Order currency pair. # noqa: E501 + Order currency pair # noqa: E501 :return: The currency_pair of this CancelBatchOrder. # noqa: E501 :rtype: str @@ -81,7 +81,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CancelBatchOrder. - Order currency pair. # noqa: E501 + Order currency pair # noqa: E501 :param currency_pair: The currency_pair of this CancelBatchOrder. # noqa: E501 :type: str diff --git a/gate_api/models/cancel_order_result.py b/gate_api/models/cancel_order_result.py index 1017b65..487486a 100644 --- a/gate_api/models/cancel_order_result.py +++ b/gate_api/models/cancel_order_result.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, currency_pair=None, id=None, text=None, succeeded=None, label def currency_pair(self): """Gets the currency_pair of this CancelOrderResult. # noqa: E501 - Order currency pair. # noqa: E501 + Order currency pair # noqa: E501 :return: The currency_pair of this CancelOrderResult. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CancelOrderResult. - Order currency pair. # noqa: E501 + Order currency pair # noqa: E501 :param currency_pair: The currency_pair of this CancelOrderResult. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def currency_pair(self, currency_pair): def id(self): """Gets the id of this CancelOrderResult. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this CancelOrderResult. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def id(self): def id(self, id): """Sets the id of this CancelOrderResult. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this CancelOrderResult. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def id(self, id): def text(self): """Gets the text of this CancelOrderResult. # noqa: E501 - Custom order information. # noqa: E501 + Custom order information # noqa: E501 :return: The text of this CancelOrderResult. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def text(self): def text(self, text): """Sets the text of this CancelOrderResult. - Custom order information. # noqa: E501 + Custom order information # noqa: E501 :param text: The text of this CancelOrderResult. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def text(self, text): def succeeded(self): """Gets the succeeded of this CancelOrderResult. # noqa: E501 - Whether cancellation succeeded. # noqa: E501 + Whether cancellation succeeded # noqa: E501 :return: The succeeded of this CancelOrderResult. # noqa: E501 :rtype: bool @@ -167,7 +167,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this CancelOrderResult. - Whether cancellation succeeded. # noqa: E501 + Whether cancellation succeeded # noqa: E501 :param succeeded: The succeeded of this CancelOrderResult. # noqa: E501 :type: bool @@ -179,7 +179,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this CancelOrderResult. # noqa: E501 - Error label when failed to cancel the order; emtpy if succeeded. # noqa: E501 + Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 :return: The label of this CancelOrderResult. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def label(self): def label(self, label): """Sets the label of this CancelOrderResult. - Error label when failed to cancel the order; emtpy if succeeded. # noqa: E501 + Error label when failed to cancel the order; emtpy if succeeded # noqa: E501 :param label: The label of this CancelOrderResult. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def label(self, label): def message(self): """Gets the message of this CancelOrderResult. # noqa: E501 - Error message when failed to cancel the order; empty if succeeded. # noqa: E501 + Error description when cancellation fails, empty if successful # noqa: E501 :return: The message of this CancelOrderResult. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def message(self): def message(self, message): """Sets the message of this CancelOrderResult. - Error message when failed to cancel the order; empty if succeeded. # noqa: E501 + Error description when cancellation fails, empty if successful # noqa: E501 :param message: The message of this CancelOrderResult. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def message(self, message): def account(self): """Gets the account of this CancelOrderResult. # noqa: E501 - Default is empty (deprecated). # noqa: E501 + Default is empty (deprecated) # noqa: E501 :return: The account of this CancelOrderResult. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def account(self): def account(self, account): """Sets the account of this CancelOrderResult. - Default is empty (deprecated). # noqa: E501 + Default is empty (deprecated) # noqa: E501 :param account: The account of this CancelOrderResult. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_adjust.py b/gate_api/models/collateral_adjust.py index b518256..919556a 100644 --- a/gate_api/models/collateral_adjust.py +++ b/gate_api/models/collateral_adjust.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -65,7 +65,7 @@ def __init__(self, order_id=None, type=None, collaterals=None, local_vars_config def order_id(self): """Gets the order_id of this CollateralAdjust. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this CollateralAdjust. # noqa: E501 :rtype: int @@ -76,7 +76,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralAdjust. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this CollateralAdjust. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def order_id(self, order_id): def type(self): """Gets the type of this CollateralAdjust. # noqa: E501 - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501 :return: The type of this CollateralAdjust. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def type(self): def type(self, type): """Sets the type of this CollateralAdjust. - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501 :param type: The type of this CollateralAdjust. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def type(self, type): def collaterals(self): """Gets the collaterals of this CollateralAdjust. # noqa: E501 - Collateral Currency List. # noqa: E501 + Collateral currency list # noqa: E501 :return: The collaterals of this CollateralAdjust. # noqa: E501 :rtype: list[CollateralCurrency] @@ -126,7 +126,7 @@ def collaterals(self): def collaterals(self, collaterals): """Sets the collaterals of this CollateralAdjust. - Collateral Currency List. # noqa: E501 + Collateral currency list # noqa: E501 :param collaterals: The collaterals of this CollateralAdjust. # noqa: E501 :type: list[CollateralCurrency] diff --git a/gate_api/models/collateral_adjust_res.py b/gate_api/models/collateral_adjust_res.py index ba3cdb6..7cc0044 100644 --- a/gate_api/models/collateral_adjust_res.py +++ b/gate_api/models/collateral_adjust_res.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, order_id=None, collateral_currencies=None, local_vars_configu def order_id(self): """Gets the order_id of this CollateralAdjustRes. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this CollateralAdjustRes. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralAdjustRes. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this CollateralAdjustRes. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def order_id(self, order_id): def collateral_currencies(self): """Gets the collateral_currencies of this CollateralAdjustRes. # noqa: E501 - Collateral Currency Information. # noqa: E501 + Collateral currency information # noqa: E501 :return: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 :rtype: list[CollateralCurrencyRes] @@ -96,7 +96,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this CollateralAdjustRes. - Collateral Currency Information. # noqa: E501 + Collateral currency information # noqa: E501 :param collateral_currencies: The collateral_currencies of this CollateralAdjustRes. # noqa: E501 :type: list[CollateralCurrencyRes] diff --git a/gate_api/models/collateral_align.py b/gate_api/models/collateral_align.py index 66e6d3e..3bc3192 100644 --- a/gate_api/models/collateral_align.py +++ b/gate_api/models/collateral_align.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -68,7 +68,7 @@ def __init__(self, order_id=None, collateral_currency=None, collateral_amount=No def order_id(self): """Gets the order_id of this CollateralAlign. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this CollateralAlign. # noqa: E501 :rtype: int @@ -79,7 +79,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralAlign. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this CollateralAlign. # noqa: E501 :type: int @@ -93,7 +93,7 @@ def order_id(self, order_id): def collateral_currency(self): """Gets the collateral_currency of this CollateralAlign. # noqa: E501 - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :return: The collateral_currency of this CollateralAlign. # noqa: E501 :rtype: str @@ -104,7 +104,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralAlign. - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralAlign. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def collateral_currency(self, collateral_currency): def collateral_amount(self): """Gets the collateral_amount of this CollateralAlign. # noqa: E501 - Collateral amount. # noqa: E501 + Collateral amount # noqa: E501 :return: The collateral_amount of this CollateralAlign. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this CollateralAlign. - Collateral amount. # noqa: E501 + Collateral amount # noqa: E501 :param collateral_amount: The collateral_amount of this CollateralAlign. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def collateral_amount(self, collateral_amount): def type(self): """Gets the type of this CollateralAlign. # noqa: E501 - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501 :return: The type of this CollateralAlign. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def type(self): def type(self, type): """Sets the type of this CollateralAlign. - Operation types: append - for adding collateral, redeem - for withdrawing collateral # noqa: E501 + Operation type: append - add collateral, redeem - withdraw collateral # noqa: E501 :param type: The type of this CollateralAlign. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_currency.py b/gate_api/models/collateral_currency.py index 860ad54..08c6811 100644 --- a/gate_api/models/collateral_currency.py +++ b/gate_api/models/collateral_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this CollateralCurrency. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this CollateralCurrency. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrency. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this CollateralCurrency. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this CollateralCurrency. # noqa: E501 - Size. # noqa: E501 + Size # noqa: E501 :return: The amount of this CollateralCurrency. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CollateralCurrency. - Size. # noqa: E501 + Size # noqa: E501 :param amount: The amount of this CollateralCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_currency_info.py b/gate_api/models/collateral_currency_info.py index da217c4..f555f62 100644 --- a/gate_api/models/collateral_currency_info.py +++ b/gate_api/models/collateral_currency_info.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, currency=None, index_price=None, left_collateral=None, left_c def currency(self): """Gets the currency of this CollateralCurrencyInfo. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrencyInfo. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this CollateralCurrencyInfo. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this CollateralCurrencyInfo. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this CollateralCurrencyInfo. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this CollateralCurrencyInfo. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def index_price(self, index_price): def left_collateral(self): """Gets the left_collateral of this CollateralCurrencyInfo. # noqa: E501 - Left Collateral Amount. # noqa: E501 + Remaining collateral amount # noqa: E501 :return: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def left_collateral(self): def left_collateral(self, left_collateral): """Sets the left_collateral of this CollateralCurrencyInfo. - Left Collateral Amount. # noqa: E501 + Remaining collateral amount # noqa: E501 :param left_collateral: The left_collateral of this CollateralCurrencyInfo. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def left_collateral(self, left_collateral): def left_collateral_usdt(self): """Gets the left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 - Value of left collateral amount in USDT. # noqa: E501 + Remaining collateral value converted to USDT # noqa: E501 :return: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def left_collateral_usdt(self): def left_collateral_usdt(self, left_collateral_usdt): """Sets the left_collateral_usdt of this CollateralCurrencyInfo. - Value of left collateral amount in USDT. # noqa: E501 + Remaining collateral value converted to USDT # noqa: E501 :param left_collateral_usdt: The left_collateral_usdt of this CollateralCurrencyInfo. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_currency_res.py b/gate_api/models/collateral_currency_res.py index 754a599..610a406 100644 --- a/gate_api/models/collateral_currency_res.py +++ b/gate_api/models/collateral_currency_res.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, succeeded=None, label=None, message=None, currency=None, amou def succeeded(self): """Gets the succeeded of this CollateralCurrencyRes. # noqa: E501 - Update success status. # noqa: E501 + Update success status # noqa: E501 :return: The succeeded of this CollateralCurrencyRes. # noqa: E501 :rtype: bool @@ -88,7 +88,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this CollateralCurrencyRes. - Update success status. # noqa: E501 + Update success status # noqa: E501 :param succeeded: The succeeded of this CollateralCurrencyRes. # noqa: E501 :type: bool @@ -100,7 +100,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this CollateralCurrencyRes. # noqa: E501 - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + Error identifier for failed operations; empty when successful # noqa: E501 :return: The label of this CollateralCurrencyRes. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def label(self): def label(self, label): """Sets the label of this CollateralCurrencyRes. - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + Error identifier for failed operations; empty when successful # noqa: E501 :param label: The label of this CollateralCurrencyRes. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def label(self, label): def message(self): """Gets the message of this CollateralCurrencyRes. # noqa: E501 - Error description in case of operation failure; empty when successful. # noqa: E501 + Error description for failed operations; empty when successful # noqa: E501 :return: The message of this CollateralCurrencyRes. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def message(self): def message(self, message): """Sets the message of this CollateralCurrencyRes. - Error description in case of operation failure; empty when successful. # noqa: E501 + Error description for failed operations; empty when successful # noqa: E501 :param message: The message of this CollateralCurrencyRes. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def message(self, message): def currency(self): """Gets the currency of this CollateralCurrencyRes. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this CollateralCurrencyRes. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrencyRes. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this CollateralCurrencyRes. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this CollateralCurrencyRes. # noqa: E501 - Quantity of successful collateral operation; 0 if the operation fails. # noqa: E501 + Successfully operated collateral quantity; 0 if operation fails # noqa: E501 :return: The amount of this CollateralCurrencyRes. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CollateralCurrencyRes. - Quantity of successful collateral operation; 0 if the operation fails. # noqa: E501 + Successfully operated collateral quantity; 0 if operation fails # noqa: E501 :param amount: The amount of this CollateralCurrencyRes. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_current_rate.py b/gate_api/models/collateral_current_rate.py index 1512865..5d00be0 100644 --- a/gate_api/models/collateral_current_rate.py +++ b/gate_api/models/collateral_current_rate.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, current_rate=None, local_vars_configuration=No def currency(self): """Gets the currency of this CollateralCurrentRate. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this CollateralCurrentRate. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralCurrentRate. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this CollateralCurrentRate. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def current_rate(self): """Gets the current_rate of this CollateralCurrentRate. # noqa: E501 - Currency current interest rate. # noqa: E501 + Currency current interest rate # noqa: E501 :return: The current_rate of this CollateralCurrentRate. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def current_rate(self): def current_rate(self, current_rate): """Sets the current_rate of this CollateralCurrentRate. - Currency current interest rate. # noqa: E501 + Currency current interest rate # noqa: E501 :param current_rate: The current_rate of this CollateralCurrentRate. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_fix_rate.py b/gate_api/models/collateral_fix_rate.py index 92be996..0bdfb45 100644 --- a/gate_api/models/collateral_fix_rate.py +++ b/gate_api/models/collateral_fix_rate.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, currency=None, rate_7d=None, rate_30d=None, update_time=None, def currency(self): """Gets the currency of this CollateralFixRate. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this CollateralFixRate. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CollateralFixRate. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this CollateralFixRate. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def rate_7d(self): """Gets the rate_7d of this CollateralFixRate. # noqa: E501 - Fixed interest rate for a lending period of 7 days. # noqa: E501 + Fixed interest rate for 7-day lending period # noqa: E501 :return: The rate_7d of this CollateralFixRate. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def rate_7d(self): def rate_7d(self, rate_7d): """Sets the rate_7d of this CollateralFixRate. - Fixed interest rate for a lending period of 7 days. # noqa: E501 + Fixed interest rate for 7-day lending period # noqa: E501 :param rate_7d: The rate_7d of this CollateralFixRate. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def rate_7d(self, rate_7d): def rate_30d(self): """Gets the rate_30d of this CollateralFixRate. # noqa: E501 - Fixed interest rate for a lending period of 30 days. # noqa: E501 + Fixed interest rate for 30-day lending period # noqa: E501 :return: The rate_30d of this CollateralFixRate. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def rate_30d(self): def rate_30d(self, rate_30d): """Sets the rate_30d of this CollateralFixRate. - Fixed interest rate for a lending period of 30 days. # noqa: E501 + Fixed interest rate for 30-day lending period # noqa: E501 :param rate_30d: The rate_30d of this CollateralFixRate. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def rate_30d(self, rate_30d): def update_time(self): """Gets the update_time of this CollateralFixRate. # noqa: E501 - Update time, timestamp, unit in seconds. # noqa: E501 + Update time, timestamp in seconds # noqa: E501 :return: The update_time of this CollateralFixRate. # noqa: E501 :rtype: int @@ -152,7 +152,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this CollateralFixRate. - Update time, timestamp, unit in seconds. # noqa: E501 + Update time, timestamp in seconds # noqa: E501 :param update_time: The update_time of this CollateralFixRate. # noqa: E501 :type: int diff --git a/gate_api/models/collateral_loan_currency.py b/gate_api/models/collateral_loan_currency.py index fb1c0f5..67b6713 100644 --- a/gate_api/models/collateral_loan_currency.py +++ b/gate_api/models/collateral_loan_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, loan_currency=None, collateral_currency=None, local_vars_conf def loan_currency(self): """Gets the loan_currency of this CollateralLoanCurrency. # noqa: E501 - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :return: The loan_currency of this CollateralLoanCurrency. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def loan_currency(self): def loan_currency(self, loan_currency): """Sets the loan_currency of this CollateralLoanCurrency. - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :param loan_currency: The loan_currency of this CollateralLoanCurrency. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def loan_currency(self, loan_currency): def collateral_currency(self): """Gets the collateral_currency of this CollateralLoanCurrency. # noqa: E501 - List of supported collateral currencies. # noqa: E501 + List of supported collateral currencies # noqa: E501 :return: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 :rtype: list[str] @@ -96,7 +96,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralLoanCurrency. - List of supported collateral currencies. # noqa: E501 + List of supported collateral currencies # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralLoanCurrency. # noqa: E501 :type: list[str] diff --git a/gate_api/models/collateral_ltv.py b/gate_api/models/collateral_ltv.py index c843fa2..34c8653 100644 --- a/gate_api/models/collateral_ltv.py +++ b/gate_api/models/collateral_ltv.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, init_ltv=None, alert_ltv=None, liquidate_ltv=None, local_vars def init_ltv(self): """Gets the init_ltv of this CollateralLtv. # noqa: E501 - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :return: The init_ltv of this CollateralLtv. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this CollateralLtv. - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :param init_ltv: The init_ltv of this CollateralLtv. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def init_ltv(self, init_ltv): def alert_ltv(self): """Gets the alert_ltv of this CollateralLtv. # noqa: E501 - Warning collateralization ratio. # noqa: E501 + Warning collateralization rate # noqa: E501 :return: The alert_ltv of this CollateralLtv. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def alert_ltv(self): def alert_ltv(self, alert_ltv): """Sets the alert_ltv of this CollateralLtv. - Warning collateralization ratio. # noqa: E501 + Warning collateralization rate # noqa: E501 :param alert_ltv: The alert_ltv of this CollateralLtv. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def alert_ltv(self, alert_ltv): def liquidate_ltv(self): """Gets the liquidate_ltv of this CollateralLtv. # noqa: E501 - The liquidation collateralization rate. # noqa: E501 + Liquidation collateralization rate # noqa: E501 :return: The liquidate_ltv of this CollateralLtv. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def liquidate_ltv(self): def liquidate_ltv(self, liquidate_ltv): """Sets the liquidate_ltv of this CollateralLtv. - The liquidation collateralization rate. # noqa: E501 + Liquidation collateralization rate # noqa: E501 :param liquidate_ltv: The liquidate_ltv of this CollateralLtv. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_order.py b/gate_api/models/collateral_order.py index fe1271a..f6cac73 100644 --- a/gate_api/models/collateral_order.py +++ b/gate_api/models/collateral_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -132,7 +132,7 @@ def __init__(self, order_id=None, collateral_currency=None, collateral_amount=No def order_id(self): """Gets the order_id of this CollateralOrder. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this CollateralOrder. # noqa: E501 :rtype: int @@ -143,7 +143,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralOrder. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this CollateralOrder. # noqa: E501 :type: int @@ -155,7 +155,7 @@ def order_id(self, order_id): def collateral_currency(self): """Gets the collateral_currency of this CollateralOrder. # noqa: E501 - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :return: The collateral_currency of this CollateralOrder. # noqa: E501 :rtype: str @@ -166,7 +166,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralOrder. - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralOrder. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def collateral_currency(self, collateral_currency): def collateral_amount(self): """Gets the collateral_amount of this CollateralOrder. # noqa: E501 - Collateral amount. # noqa: E501 + Collateral amount # noqa: E501 :return: The collateral_amount of this CollateralOrder. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this CollateralOrder. - Collateral amount. # noqa: E501 + Collateral amount # noqa: E501 :param collateral_amount: The collateral_amount of this CollateralOrder. # noqa: E501 :type: str @@ -201,7 +201,7 @@ def collateral_amount(self, collateral_amount): def borrow_currency(self): """Gets the borrow_currency of this CollateralOrder. # noqa: E501 - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :return: The borrow_currency of this CollateralOrder. # noqa: E501 :rtype: str @@ -212,7 +212,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CollateralOrder. - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :param borrow_currency: The borrow_currency of this CollateralOrder. # noqa: E501 :type: str @@ -224,7 +224,7 @@ def borrow_currency(self, borrow_currency): def borrow_amount(self): """Gets the borrow_amount of this CollateralOrder. # noqa: E501 - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :return: The borrow_amount of this CollateralOrder. # noqa: E501 :rtype: str @@ -235,7 +235,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CollateralOrder. - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :param borrow_amount: The borrow_amount of this CollateralOrder. # noqa: E501 :type: str @@ -247,7 +247,7 @@ def borrow_amount(self, borrow_amount): def repaid_amount(self): """Gets the repaid_amount of this CollateralOrder. # noqa: E501 - Repaid amount. # noqa: E501 + Repaid amount # noqa: E501 :return: The repaid_amount of this CollateralOrder. # noqa: E501 :rtype: str @@ -258,7 +258,7 @@ def repaid_amount(self): def repaid_amount(self, repaid_amount): """Sets the repaid_amount of this CollateralOrder. - Repaid amount. # noqa: E501 + Repaid amount # noqa: E501 :param repaid_amount: The repaid_amount of this CollateralOrder. # noqa: E501 :type: str @@ -270,7 +270,7 @@ def repaid_amount(self, repaid_amount): def repaid_principal(self): """Gets the repaid_principal of this CollateralOrder. # noqa: E501 - Repaid principal. # noqa: E501 + Repaid principal # noqa: E501 :return: The repaid_principal of this CollateralOrder. # noqa: E501 :rtype: str @@ -281,7 +281,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this CollateralOrder. - Repaid principal. # noqa: E501 + Repaid principal # noqa: E501 :param repaid_principal: The repaid_principal of this CollateralOrder. # noqa: E501 :type: str @@ -293,7 +293,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this CollateralOrder. # noqa: E501 - Repaid interest. # noqa: E501 + Repaid interest # noqa: E501 :return: The repaid_interest of this CollateralOrder. # noqa: E501 :rtype: str @@ -304,7 +304,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this CollateralOrder. - Repaid interest. # noqa: E501 + Repaid interest # noqa: E501 :param repaid_interest: The repaid_interest of this CollateralOrder. # noqa: E501 :type: str @@ -316,7 +316,7 @@ def repaid_interest(self, repaid_interest): def init_ltv(self): """Gets the init_ltv of this CollateralOrder. # noqa: E501 - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :return: The init_ltv of this CollateralOrder. # noqa: E501 :rtype: str @@ -327,7 +327,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this CollateralOrder. - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :param init_ltv: The init_ltv of this CollateralOrder. # noqa: E501 :type: str @@ -339,7 +339,7 @@ def init_ltv(self, init_ltv): def current_ltv(self): """Gets the current_ltv of this CollateralOrder. # noqa: E501 - The current collateralization rate. # noqa: E501 + Current collateralization rate # noqa: E501 :return: The current_ltv of this CollateralOrder. # noqa: E501 :rtype: str @@ -350,7 +350,7 @@ def current_ltv(self): def current_ltv(self, current_ltv): """Sets the current_ltv of this CollateralOrder. - The current collateralization rate. # noqa: E501 + Current collateralization rate # noqa: E501 :param current_ltv: The current_ltv of this CollateralOrder. # noqa: E501 :type: str @@ -362,7 +362,7 @@ def current_ltv(self, current_ltv): def liquidate_ltv(self): """Gets the liquidate_ltv of this CollateralOrder. # noqa: E501 - The liquidation collateralization rate. # noqa: E501 + Liquidation collateralization rate # noqa: E501 :return: The liquidate_ltv of this CollateralOrder. # noqa: E501 :rtype: str @@ -373,7 +373,7 @@ def liquidate_ltv(self): def liquidate_ltv(self, liquidate_ltv): """Sets the liquidate_ltv of this CollateralOrder. - The liquidation collateralization rate. # noqa: E501 + Liquidation collateralization rate # noqa: E501 :param liquidate_ltv: The liquidate_ltv of this CollateralOrder. # noqa: E501 :type: str @@ -408,7 +408,7 @@ def status(self, status): def borrow_time(self): """Gets the borrow_time of this CollateralOrder. # noqa: E501 - Borrowing time, timestamp in seconds. # noqa: E501 + Borrowing time, timestamp in seconds # noqa: E501 :return: The borrow_time of this CollateralOrder. # noqa: E501 :rtype: int @@ -419,7 +419,7 @@ def borrow_time(self): def borrow_time(self, borrow_time): """Sets the borrow_time of this CollateralOrder. - Borrowing time, timestamp in seconds. # noqa: E501 + Borrowing time, timestamp in seconds # noqa: E501 :param borrow_time: The borrow_time of this CollateralOrder. # noqa: E501 :type: int @@ -454,7 +454,7 @@ def left_repay_total(self, left_repay_total): def left_repay_principal(self): """Gets the left_repay_principal of this CollateralOrder. # noqa: E501 - outstanding principal. # noqa: E501 + Outstanding principal # noqa: E501 :return: The left_repay_principal of this CollateralOrder. # noqa: E501 :rtype: str @@ -465,7 +465,7 @@ def left_repay_principal(self): def left_repay_principal(self, left_repay_principal): """Sets the left_repay_principal of this CollateralOrder. - outstanding principal. # noqa: E501 + Outstanding principal # noqa: E501 :param left_repay_principal: The left_repay_principal of this CollateralOrder. # noqa: E501 :type: str @@ -477,7 +477,7 @@ def left_repay_principal(self, left_repay_principal): def left_repay_interest(self): """Gets the left_repay_interest of this CollateralOrder. # noqa: E501 - outstanding interest. # noqa: E501 + Outstanding interest # noqa: E501 :return: The left_repay_interest of this CollateralOrder. # noqa: E501 :rtype: str @@ -488,7 +488,7 @@ def left_repay_interest(self): def left_repay_interest(self, left_repay_interest): """Sets the left_repay_interest of this CollateralOrder. - outstanding interest. # noqa: E501 + Outstanding interest # noqa: E501 :param left_repay_interest: The left_repay_interest of this CollateralOrder. # noqa: E501 :type: str diff --git a/gate_api/models/collateral_record.py b/gate_api/models/collateral_record.py index 24074c2..b5eeb09 100644 --- a/gate_api/models/collateral_record.py +++ b/gate_api/models/collateral_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, order_id=None, record_id=None, borrow_currency=None, borrow_a def order_id(self): """Gets the order_id of this CollateralRecord. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this CollateralRecord. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CollateralRecord. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this CollateralRecord. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this CollateralRecord. # noqa: E501 - Collateral record ID. # noqa: E501 + Collateral record ID # noqa: E501 :return: The record_id of this CollateralRecord. # noqa: E501 :rtype: int @@ -136,7 +136,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this CollateralRecord. - Collateral record ID. # noqa: E501 + Collateral record ID # noqa: E501 :param record_id: The record_id of this CollateralRecord. # noqa: E501 :type: int @@ -148,7 +148,7 @@ def record_id(self, record_id): def borrow_currency(self): """Gets the borrow_currency of this CollateralRecord. # noqa: E501 - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :return: The borrow_currency of this CollateralRecord. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CollateralRecord. - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :param borrow_currency: The borrow_currency of this CollateralRecord. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def borrow_currency(self, borrow_currency): def borrow_amount(self): """Gets the borrow_amount of this CollateralRecord. # noqa: E501 - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :return: The borrow_amount of this CollateralRecord. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CollateralRecord. - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :param borrow_amount: The borrow_amount of this CollateralRecord. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def borrow_amount(self, borrow_amount): def collateral_currency(self): """Gets the collateral_currency of this CollateralRecord. # noqa: E501 - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :return: The collateral_currency of this CollateralRecord. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CollateralRecord. - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :param collateral_currency: The collateral_currency of this CollateralRecord. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def collateral_currency(self, collateral_currency): def before_collateral(self): """Gets the before_collateral of this CollateralRecord. # noqa: E501 - The collateral amount before adjustment. # noqa: E501 + Collateral amount before adjustment # noqa: E501 :return: The before_collateral of this CollateralRecord. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def before_collateral(self): def before_collateral(self, before_collateral): """Sets the before_collateral of this CollateralRecord. - The collateral amount before adjustment. # noqa: E501 + Collateral amount before adjustment # noqa: E501 :param before_collateral: The before_collateral of this CollateralRecord. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def before_collateral(self, before_collateral): def after_collateral(self): """Gets the after_collateral of this CollateralRecord. # noqa: E501 - The collateral amount after adjustment. # noqa: E501 + Collateral amount after adjustment # noqa: E501 :return: The after_collateral of this CollateralRecord. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def after_collateral(self): def after_collateral(self, after_collateral): """Sets the after_collateral of this CollateralRecord. - The collateral amount after adjustment. # noqa: E501 + Collateral amount after adjustment # noqa: E501 :param after_collateral: The after_collateral of this CollateralRecord. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def after_collateral(self, after_collateral): def before_ltv(self): """Gets the before_ltv of this CollateralRecord. # noqa: E501 - The collateral ratio before adjustment. # noqa: E501 + Collateral ratio before adjustment # noqa: E501 :return: The before_ltv of this CollateralRecord. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def before_ltv(self): def before_ltv(self, before_ltv): """Sets the before_ltv of this CollateralRecord. - The collateral ratio before adjustment. # noqa: E501 + Collateral ratio before adjustment # noqa: E501 :param before_ltv: The before_ltv of this CollateralRecord. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def before_ltv(self, before_ltv): def after_ltv(self): """Gets the after_ltv of this CollateralRecord. # noqa: E501 - The collateral ratio after adjustment. # noqa: E501 + Collateral ratio after adjustment # noqa: E501 :return: The after_ltv of this CollateralRecord. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def after_ltv(self): def after_ltv(self, after_ltv): """Sets the after_ltv of this CollateralRecord. - The collateral ratio after adjustment. # noqa: E501 + Collateral ratio after adjustment # noqa: E501 :param after_ltv: The after_ltv of this CollateralRecord. # noqa: E501 :type: str @@ -309,7 +309,7 @@ def after_ltv(self, after_ltv): def operate_time(self): """Gets the operate_time of this CollateralRecord. # noqa: E501 - Timestamp of the operation, in seconds. # noqa: E501 + Operation time, timestamp in seconds # noqa: E501 :return: The operate_time of this CollateralRecord. # noqa: E501 :rtype: int @@ -320,7 +320,7 @@ def operate_time(self): def operate_time(self, operate_time): """Sets the operate_time of this CollateralRecord. - Timestamp of the operation, in seconds. # noqa: E501 + Operation time, timestamp in seconds # noqa: E501 :param operate_time: The operate_time of this CollateralRecord. # noqa: E501 :type: int diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index 221a0c9..a69cde8 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -242,7 +242,7 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No def name(self): """Gets the name of this Contract. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The name of this Contract. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def name(self): def name(self, name): """Sets the name of this Contract. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param name: The name of this Contract. # noqa: E501 :type: str @@ -265,7 +265,7 @@ def name(self, name): def type(self): """Gets the type of this Contract. # noqa: E501 - Futures contract type. # noqa: E501 + Contract type: inverse - inverse contract, direct - direct contract # noqa: E501 :return: The type of this Contract. # noqa: E501 :rtype: str @@ -276,7 +276,7 @@ def type(self): def type(self, type): """Sets the type of this Contract. - Futures contract type. # noqa: E501 + Contract type: inverse - inverse contract, direct - direct contract # noqa: E501 :param type: The type of this Contract. # noqa: E501 :type: str @@ -294,7 +294,7 @@ def type(self, type): def quanto_multiplier(self): """Gets the quanto_multiplier of this Contract. # noqa: E501 - Multiplier used in converting from invoicing to settlement currency. # noqa: E501 + Multiplier used in converting from invoicing to settlement currency # noqa: E501 :return: The quanto_multiplier of this Contract. # noqa: E501 :rtype: str @@ -305,7 +305,7 @@ def quanto_multiplier(self): def quanto_multiplier(self, quanto_multiplier): """Sets the quanto_multiplier of this Contract. - Multiplier used in converting from invoicing to settlement currency. # noqa: E501 + Multiplier used in converting from invoicing to settlement currency # noqa: E501 :param quanto_multiplier: The quanto_multiplier of this Contract. # noqa: E501 :type: str @@ -317,7 +317,7 @@ def quanto_multiplier(self, quanto_multiplier): def leverage_min(self): """Gets the leverage_min of this Contract. # noqa: E501 - Minimum leverage. # noqa: E501 + Minimum leverage # noqa: E501 :return: The leverage_min of this Contract. # noqa: E501 :rtype: str @@ -328,7 +328,7 @@ def leverage_min(self): def leverage_min(self, leverage_min): """Sets the leverage_min of this Contract. - Minimum leverage. # noqa: E501 + Minimum leverage # noqa: E501 :param leverage_min: The leverage_min of this Contract. # noqa: E501 :type: str @@ -340,7 +340,7 @@ def leverage_min(self, leverage_min): def leverage_max(self): """Gets the leverage_max of this Contract. # noqa: E501 - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :return: The leverage_max of this Contract. # noqa: E501 :rtype: str @@ -351,7 +351,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this Contract. - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :param leverage_max: The leverage_max of this Contract. # noqa: E501 :type: str @@ -363,7 +363,7 @@ def leverage_max(self, leverage_max): def maintenance_rate(self): """Gets the maintenance_rate of this Contract. # noqa: E501 - Maintenance rate of margin. # noqa: E501 + Maintenance rate of margin # noqa: E501 :return: The maintenance_rate of this Contract. # noqa: E501 :rtype: str @@ -374,7 +374,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this Contract. - Maintenance rate of margin. # noqa: E501 + Maintenance rate of margin # noqa: E501 :param maintenance_rate: The maintenance_rate of this Contract. # noqa: E501 :type: str @@ -386,7 +386,7 @@ def maintenance_rate(self, maintenance_rate): def mark_type(self): """Gets the mark_type of this Contract. # noqa: E501 - Mark price type, internal - based on internal trading, external index price # noqa: E501 + Mark price type: internal - internal trading price, index - external index price # noqa: E501 :return: The mark_type of this Contract. # noqa: E501 :rtype: str @@ -397,7 +397,7 @@ def mark_type(self): def mark_type(self, mark_type): """Sets the mark_type of this Contract. - Mark price type, internal - based on internal trading, external index price # noqa: E501 + Mark price type: internal - internal trading price, index - external index price # noqa: E501 :param mark_type: The mark_type of this Contract. # noqa: E501 :type: str @@ -415,7 +415,7 @@ def mark_type(self, mark_type): def mark_price(self): """Gets the mark_price of this Contract. # noqa: E501 - Current mark price. # noqa: E501 + Current mark price # noqa: E501 :return: The mark_price of this Contract. # noqa: E501 :rtype: str @@ -426,7 +426,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this Contract. - Current mark price. # noqa: E501 + Current mark price # noqa: E501 :param mark_price: The mark_price of this Contract. # noqa: E501 :type: str @@ -438,7 +438,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this Contract. # noqa: E501 - Current index price. # noqa: E501 + Current index price # noqa: E501 :return: The index_price of this Contract. # noqa: E501 :rtype: str @@ -449,7 +449,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this Contract. - Current index price. # noqa: E501 + Current index price # noqa: E501 :param index_price: The index_price of this Contract. # noqa: E501 :type: str @@ -461,7 +461,7 @@ def index_price(self, index_price): def last_price(self): """Gets the last_price of this Contract. # noqa: E501 - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :return: The last_price of this Contract. # noqa: E501 :rtype: str @@ -472,7 +472,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this Contract. - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :param last_price: The last_price of this Contract. # noqa: E501 :type: str @@ -484,7 +484,7 @@ def last_price(self, last_price): def maker_fee_rate(self): """Gets the maker_fee_rate of this Contract. # noqa: E501 - Maker fee rate, where negative means rebate. # noqa: E501 + Maker fee rate, negative values indicate rebates # noqa: E501 :return: The maker_fee_rate of this Contract. # noqa: E501 :rtype: str @@ -495,7 +495,7 @@ def maker_fee_rate(self): def maker_fee_rate(self, maker_fee_rate): """Sets the maker_fee_rate of this Contract. - Maker fee rate, where negative means rebate. # noqa: E501 + Maker fee rate, negative values indicate rebates # noqa: E501 :param maker_fee_rate: The maker_fee_rate of this Contract. # noqa: E501 :type: str @@ -507,7 +507,7 @@ def maker_fee_rate(self, maker_fee_rate): def taker_fee_rate(self): """Gets the taker_fee_rate of this Contract. # noqa: E501 - Taker fee rate. # noqa: E501 + Taker fee rate # noqa: E501 :return: The taker_fee_rate of this Contract. # noqa: E501 :rtype: str @@ -518,7 +518,7 @@ def taker_fee_rate(self): def taker_fee_rate(self, taker_fee_rate): """Sets the taker_fee_rate of this Contract. - Taker fee rate. # noqa: E501 + Taker fee rate # noqa: E501 :param taker_fee_rate: The taker_fee_rate of this Contract. # noqa: E501 :type: str @@ -530,7 +530,7 @@ def taker_fee_rate(self, taker_fee_rate): def order_price_round(self): """Gets the order_price_round of this Contract. # noqa: E501 - Minimum order price increment. # noqa: E501 + Minimum order price increment # noqa: E501 :return: The order_price_round of this Contract. # noqa: E501 :rtype: str @@ -541,7 +541,7 @@ def order_price_round(self): def order_price_round(self, order_price_round): """Sets the order_price_round of this Contract. - Minimum order price increment. # noqa: E501 + Minimum order price increment # noqa: E501 :param order_price_round: The order_price_round of this Contract. # noqa: E501 :type: str @@ -553,7 +553,7 @@ def order_price_round(self, order_price_round): def mark_price_round(self): """Gets the mark_price_round of this Contract. # noqa: E501 - Minimum mark price increment. # noqa: E501 + Minimum mark price increment # noqa: E501 :return: The mark_price_round of this Contract. # noqa: E501 :rtype: str @@ -564,7 +564,7 @@ def mark_price_round(self): def mark_price_round(self, mark_price_round): """Sets the mark_price_round of this Contract. - Minimum mark price increment. # noqa: E501 + Minimum mark price increment # noqa: E501 :param mark_price_round: The mark_price_round of this Contract. # noqa: E501 :type: str @@ -576,7 +576,7 @@ def mark_price_round(self, mark_price_round): def funding_rate(self): """Gets the funding_rate of this Contract. # noqa: E501 - Current funding rate. # noqa: E501 + Current funding rate # noqa: E501 :return: The funding_rate of this Contract. # noqa: E501 :rtype: str @@ -587,7 +587,7 @@ def funding_rate(self): def funding_rate(self, funding_rate): """Sets the funding_rate of this Contract. - Current funding rate. # noqa: E501 + Current funding rate # noqa: E501 :param funding_rate: The funding_rate of this Contract. # noqa: E501 :type: str @@ -599,7 +599,7 @@ def funding_rate(self, funding_rate): def funding_interval(self): """Gets the funding_interval of this Contract. # noqa: E501 - Funding application interval, unit in seconds. # noqa: E501 + Funding application interval, unit in seconds # noqa: E501 :return: The funding_interval of this Contract. # noqa: E501 :rtype: int @@ -610,7 +610,7 @@ def funding_interval(self): def funding_interval(self, funding_interval): """Sets the funding_interval of this Contract. - Funding application interval, unit in seconds. # noqa: E501 + Funding application interval, unit in seconds # noqa: E501 :param funding_interval: The funding_interval of this Contract. # noqa: E501 :type: int @@ -622,7 +622,7 @@ def funding_interval(self, funding_interval): def funding_next_apply(self): """Gets the funding_next_apply of this Contract. # noqa: E501 - Next funding time. # noqa: E501 + Next funding time # noqa: E501 :return: The funding_next_apply of this Contract. # noqa: E501 :rtype: float @@ -633,7 +633,7 @@ def funding_next_apply(self): def funding_next_apply(self, funding_next_apply): """Sets the funding_next_apply of this Contract. - Next funding time. # noqa: E501 + Next funding time # noqa: E501 :param funding_next_apply: The funding_next_apply of this Contract. # noqa: E501 :type: float @@ -645,7 +645,7 @@ def funding_next_apply(self, funding_next_apply): def risk_limit_base(self): """Gets the risk_limit_base of this Contract. # noqa: E501 - Risk limit base,deprecated. # noqa: E501 + Base risk limit (deprecated) # noqa: E501 :return: The risk_limit_base of this Contract. # noqa: E501 :rtype: str @@ -656,7 +656,7 @@ def risk_limit_base(self): def risk_limit_base(self, risk_limit_base): """Sets the risk_limit_base of this Contract. - Risk limit base,deprecated. # noqa: E501 + Base risk limit (deprecated) # noqa: E501 :param risk_limit_base: The risk_limit_base of this Contract. # noqa: E501 :type: str @@ -668,7 +668,7 @@ def risk_limit_base(self, risk_limit_base): def risk_limit_step(self): """Gets the risk_limit_step of this Contract. # noqa: E501 - Step of adjusting risk limit,deprecated. # noqa: E501 + Risk limit adjustment step (deprecated) # noqa: E501 :return: The risk_limit_step of this Contract. # noqa: E501 :rtype: str @@ -679,7 +679,7 @@ def risk_limit_step(self): def risk_limit_step(self, risk_limit_step): """Sets the risk_limit_step of this Contract. - Step of adjusting risk limit,deprecated. # noqa: E501 + Risk limit adjustment step (deprecated) # noqa: E501 :param risk_limit_step: The risk_limit_step of this Contract. # noqa: E501 :type: str @@ -691,7 +691,7 @@ def risk_limit_step(self, risk_limit_step): def risk_limit_max(self): """Gets the risk_limit_max of this Contract. # noqa: E501 - Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. # noqa: E501 + Maximum risk limit allowed by the contract (deprecated). It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits # noqa: E501 :return: The risk_limit_max of this Contract. # noqa: E501 :rtype: str @@ -702,7 +702,7 @@ def risk_limit_max(self): def risk_limit_max(self, risk_limit_max): """Sets the risk_limit_max of this Contract. - Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. # noqa: E501 + Maximum risk limit allowed by the contract (deprecated). It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits # noqa: E501 :param risk_limit_max: The risk_limit_max of this Contract. # noqa: E501 :type: str @@ -714,7 +714,7 @@ def risk_limit_max(self, risk_limit_max): def order_size_min(self): """Gets the order_size_min of this Contract. # noqa: E501 - Minimum order size the contract allowed. # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :return: The order_size_min of this Contract. # noqa: E501 :rtype: int @@ -725,7 +725,7 @@ def order_size_min(self): def order_size_min(self, order_size_min): """Sets the order_size_min of this Contract. - Minimum order size the contract allowed. # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :param order_size_min: The order_size_min of this Contract. # noqa: E501 :type: int @@ -737,7 +737,7 @@ def order_size_min(self, order_size_min): def order_size_max(self): """Gets the order_size_max of this Contract. # noqa: E501 - Maximum order size the contract allowed. # noqa: E501 + Maximum order size allowed by the contract # noqa: E501 :return: The order_size_max of this Contract. # noqa: E501 :rtype: int @@ -748,7 +748,7 @@ def order_size_max(self): def order_size_max(self, order_size_max): """Sets the order_size_max of this Contract. - Maximum order size the contract allowed. # noqa: E501 + Maximum order size allowed by the contract # noqa: E501 :param order_size_max: The order_size_max of this Contract. # noqa: E501 :type: int @@ -760,7 +760,7 @@ def order_size_max(self, order_size_max): def order_price_deviate(self): """Gets the order_price_deviate of this Contract. # noqa: E501 - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :return: The order_price_deviate of this Contract. # noqa: E501 :rtype: str @@ -771,7 +771,7 @@ def order_price_deviate(self): def order_price_deviate(self, order_price_deviate): """Sets the order_price_deviate of this Contract. - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :param order_price_deviate: The order_price_deviate of this Contract. # noqa: E501 :type: str @@ -783,7 +783,7 @@ def order_price_deviate(self, order_price_deviate): def ref_discount_rate(self): """Gets the ref_discount_rate of this Contract. # noqa: E501 - Referral fee rate discount. # noqa: E501 + Trading fee discount for referred users # noqa: E501 :return: The ref_discount_rate of this Contract. # noqa: E501 :rtype: str @@ -794,7 +794,7 @@ def ref_discount_rate(self): def ref_discount_rate(self, ref_discount_rate): """Sets the ref_discount_rate of this Contract. - Referral fee rate discount. # noqa: E501 + Trading fee discount for referred users # noqa: E501 :param ref_discount_rate: The ref_discount_rate of this Contract. # noqa: E501 :type: str @@ -806,7 +806,7 @@ def ref_discount_rate(self, ref_discount_rate): def ref_rebate_rate(self): """Gets the ref_rebate_rate of this Contract. # noqa: E501 - Referrer commission rate. # noqa: E501 + Commission rate for referrers # noqa: E501 :return: The ref_rebate_rate of this Contract. # noqa: E501 :rtype: str @@ -817,7 +817,7 @@ def ref_rebate_rate(self): def ref_rebate_rate(self, ref_rebate_rate): """Sets the ref_rebate_rate of this Contract. - Referrer commission rate. # noqa: E501 + Commission rate for referrers # noqa: E501 :param ref_rebate_rate: The ref_rebate_rate of this Contract. # noqa: E501 :type: str @@ -829,7 +829,7 @@ def ref_rebate_rate(self, ref_rebate_rate): def orderbook_id(self): """Gets the orderbook_id of this Contract. # noqa: E501 - Current orderbook ID. # noqa: E501 + Orderbook update ID # noqa: E501 :return: The orderbook_id of this Contract. # noqa: E501 :rtype: int @@ -840,7 +840,7 @@ def orderbook_id(self): def orderbook_id(self, orderbook_id): """Sets the orderbook_id of this Contract. - Current orderbook ID. # noqa: E501 + Orderbook update ID # noqa: E501 :param orderbook_id: The orderbook_id of this Contract. # noqa: E501 :type: int @@ -852,7 +852,7 @@ def orderbook_id(self, orderbook_id): def trade_id(self): """Gets the trade_id of this Contract. # noqa: E501 - Current trade ID. # noqa: E501 + Current trade ID # noqa: E501 :return: The trade_id of this Contract. # noqa: E501 :rtype: int @@ -863,7 +863,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this Contract. - Current trade ID. # noqa: E501 + Current trade ID # noqa: E501 :param trade_id: The trade_id of this Contract. # noqa: E501 :type: int @@ -875,7 +875,7 @@ def trade_id(self, trade_id): def trade_size(self): """Gets the trade_size of this Contract. # noqa: E501 - Historical accumulated trade size. # noqa: E501 + Historical cumulative trading volume # noqa: E501 :return: The trade_size of this Contract. # noqa: E501 :rtype: int @@ -886,7 +886,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this Contract. - Historical accumulated trade size. # noqa: E501 + Historical cumulative trading volume # noqa: E501 :param trade_size: The trade_size of this Contract. # noqa: E501 :type: int @@ -898,7 +898,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this Contract. # noqa: E501 - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :return: The position_size of this Contract. # noqa: E501 :rtype: int @@ -909,7 +909,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this Contract. - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :param position_size: The position_size of this Contract. # noqa: E501 :type: int @@ -921,7 +921,7 @@ def position_size(self, position_size): def config_change_time(self): """Gets the config_change_time of this Contract. # noqa: E501 - Last changed time of configuration. # noqa: E501 + Last configuration update time # noqa: E501 :return: The config_change_time of this Contract. # noqa: E501 :rtype: float @@ -932,7 +932,7 @@ def config_change_time(self): def config_change_time(self, config_change_time): """Sets the config_change_time of this Contract. - Last changed time of configuration. # noqa: E501 + Last configuration update time # noqa: E501 :param config_change_time: The config_change_time of this Contract. # noqa: E501 :type: float @@ -944,7 +944,7 @@ def config_change_time(self, config_change_time): def in_delisting(self): """Gets the in_delisting of this Contract. # noqa: E501 - `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` contract is offline # noqa: E501 + `in_delisting=true` and position_size>0 indicates the contract is in delisting transition period `in_delisting=true` and position_size=0 indicates the contract is delisted # noqa: E501 :return: The in_delisting of this Contract. # noqa: E501 :rtype: bool @@ -955,7 +955,7 @@ def in_delisting(self): def in_delisting(self, in_delisting): """Sets the in_delisting of this Contract. - `in_delisting=true` And when position_size>0, it means the contract is in the offline transition period `in_delisting=true` contract is offline # noqa: E501 + `in_delisting=true` and position_size>0 indicates the contract is in delisting transition period `in_delisting=true` and position_size=0 indicates the contract is delisted # noqa: E501 :param in_delisting: The in_delisting of this Contract. # noqa: E501 :type: bool @@ -967,7 +967,7 @@ def in_delisting(self, in_delisting): def orders_limit(self): """Gets the orders_limit of this Contract. # noqa: E501 - Maximum number of open orders. # noqa: E501 + Maximum number of pending orders # noqa: E501 :return: The orders_limit of this Contract. # noqa: E501 :rtype: int @@ -978,7 +978,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this Contract. - Maximum number of open orders. # noqa: E501 + Maximum number of pending orders # noqa: E501 :param orders_limit: The orders_limit of this Contract. # noqa: E501 :type: int @@ -990,7 +990,7 @@ def orders_limit(self, orders_limit): def enable_bonus(self): """Gets the enable_bonus of this Contract. # noqa: E501 - Whether bouns is enabled. # noqa: E501 + Whether bonus is enabled # noqa: E501 :return: The enable_bonus of this Contract. # noqa: E501 :rtype: bool @@ -1001,7 +1001,7 @@ def enable_bonus(self): def enable_bonus(self, enable_bonus): """Sets the enable_bonus of this Contract. - Whether bouns is enabled. # noqa: E501 + Whether bonus is enabled # noqa: E501 :param enable_bonus: The enable_bonus of this Contract. # noqa: E501 :type: bool @@ -1013,7 +1013,7 @@ def enable_bonus(self, enable_bonus): def enable_credit(self): """Gets the enable_credit of this Contract. # noqa: E501 - Whether portfolio margin account is enabled. # noqa: E501 + Whether portfolio margin account is enabled # noqa: E501 :return: The enable_credit of this Contract. # noqa: E501 :rtype: bool @@ -1024,7 +1024,7 @@ def enable_credit(self): def enable_credit(self, enable_credit): """Sets the enable_credit of this Contract. - Whether portfolio margin account is enabled. # noqa: E501 + Whether portfolio margin account is enabled # noqa: E501 :param enable_credit: The enable_credit of this Contract. # noqa: E501 :type: bool @@ -1036,7 +1036,7 @@ def enable_credit(self, enable_credit): def create_time(self): """Gets the create_time of this Contract. # noqa: E501 - Created time of the contract. # noqa: E501 + Created time of the contract # noqa: E501 :return: The create_time of this Contract. # noqa: E501 :rtype: float @@ -1047,7 +1047,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this Contract. - Created time of the contract. # noqa: E501 + Created time of the contract # noqa: E501 :param create_time: The create_time of this Contract. # noqa: E501 :type: float @@ -1082,7 +1082,7 @@ def funding_cap_ratio(self, funding_cap_ratio): def status(self): """Gets the status of this Contract. # noqa: E501 - Contract Status Types include: prelaunch, trading, delisting, delisted. # noqa: E501 + Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted) # noqa: E501 :return: The status of this Contract. # noqa: E501 :rtype: str @@ -1093,7 +1093,7 @@ def status(self): def status(self, status): """Sets the status of this Contract. - Contract Status Types include: prelaunch, trading, delisting, delisted. # noqa: E501 + Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted) # noqa: E501 :param status: The status of this Contract. # noqa: E501 :type: str @@ -1105,7 +1105,7 @@ def status(self, status): def launch_time(self): """Gets the launch_time of this Contract. # noqa: E501 - Contract expiry timestamp. # noqa: E501 + Contract expiry timestamp # noqa: E501 :return: The launch_time of this Contract. # noqa: E501 :rtype: int @@ -1116,7 +1116,7 @@ def launch_time(self): def launch_time(self, launch_time): """Sets the launch_time of this Contract. - Contract expiry timestamp. # noqa: E501 + Contract expiry timestamp # noqa: E501 :param launch_time: The launch_time of this Contract. # noqa: E501 :type: int diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index a5b8dca..bcdd22e 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -117,7 +117,7 @@ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=No def time(self): """Gets the time of this ContractStat. # noqa: E501 - Stat timestamp. # noqa: E501 + Stat timestamp # noqa: E501 :return: The time of this ContractStat. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def time(self): def time(self, time): """Sets the time of this ContractStat. - Stat timestamp. # noqa: E501 + Stat timestamp # noqa: E501 :param time: The time of this ContractStat. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def time(self, time): def lsr_taker(self): """Gets the lsr_taker of this ContractStat. # noqa: E501 - Long/short account number ratio. # noqa: E501 + Long/short taker ratio # noqa: E501 :return: The lsr_taker of this ContractStat. # noqa: E501 :rtype: float @@ -151,7 +151,7 @@ def lsr_taker(self): def lsr_taker(self, lsr_taker): """Sets the lsr_taker of this ContractStat. - Long/short account number ratio. # noqa: E501 + Long/short taker ratio # noqa: E501 :param lsr_taker: The lsr_taker of this ContractStat. # noqa: E501 :type: float @@ -163,7 +163,7 @@ def lsr_taker(self, lsr_taker): def lsr_account(self): """Gets the lsr_account of this ContractStat. # noqa: E501 - Long/short taker size ratio. # noqa: E501 + Long/short position user ratio # noqa: E501 :return: The lsr_account of this ContractStat. # noqa: E501 :rtype: float @@ -174,7 +174,7 @@ def lsr_account(self): def lsr_account(self, lsr_account): """Sets the lsr_account of this ContractStat. - Long/short taker size ratio. # noqa: E501 + Long/short position user ratio # noqa: E501 :param lsr_account: The lsr_account of this ContractStat. # noqa: E501 :type: float @@ -186,7 +186,7 @@ def lsr_account(self, lsr_account): def long_liq_size(self): """Gets the long_liq_size of this ContractStat. # noqa: E501 - Long liquidation size. # noqa: E501 + Long liquidation size (contracts) # noqa: E501 :return: The long_liq_size of this ContractStat. # noqa: E501 :rtype: int @@ -197,7 +197,7 @@ def long_liq_size(self): def long_liq_size(self, long_liq_size): """Sets the long_liq_size of this ContractStat. - Long liquidation size. # noqa: E501 + Long liquidation size (contracts) # noqa: E501 :param long_liq_size: The long_liq_size of this ContractStat. # noqa: E501 :type: int @@ -209,7 +209,7 @@ def long_liq_size(self, long_liq_size): def long_liq_amount(self): """Gets the long_liq_amount of this ContractStat. # noqa: E501 - Long liquidation amount(base currency). # noqa: E501 + Long liquidation amount (base currency) # noqa: E501 :return: The long_liq_amount of this ContractStat. # noqa: E501 :rtype: float @@ -220,7 +220,7 @@ def long_liq_amount(self): def long_liq_amount(self, long_liq_amount): """Sets the long_liq_amount of this ContractStat. - Long liquidation amount(base currency). # noqa: E501 + Long liquidation amount (base currency) # noqa: E501 :param long_liq_amount: The long_liq_amount of this ContractStat. # noqa: E501 :type: float @@ -232,7 +232,7 @@ def long_liq_amount(self, long_liq_amount): def long_liq_usd(self): """Gets the long_liq_usd of this ContractStat. # noqa: E501 - Long liquidation volume(quote currency). # noqa: E501 + Long liquidation volume (quote currency) # noqa: E501 :return: The long_liq_usd of this ContractStat. # noqa: E501 :rtype: float @@ -243,7 +243,7 @@ def long_liq_usd(self): def long_liq_usd(self, long_liq_usd): """Sets the long_liq_usd of this ContractStat. - Long liquidation volume(quote currency). # noqa: E501 + Long liquidation volume (quote currency) # noqa: E501 :param long_liq_usd: The long_liq_usd of this ContractStat. # noqa: E501 :type: float @@ -255,7 +255,7 @@ def long_liq_usd(self, long_liq_usd): def short_liq_size(self): """Gets the short_liq_size of this ContractStat. # noqa: E501 - Short liquidation size. # noqa: E501 + Short liquidation size (contracts) # noqa: E501 :return: The short_liq_size of this ContractStat. # noqa: E501 :rtype: int @@ -266,7 +266,7 @@ def short_liq_size(self): def short_liq_size(self, short_liq_size): """Sets the short_liq_size of this ContractStat. - Short liquidation size. # noqa: E501 + Short liquidation size (contracts) # noqa: E501 :param short_liq_size: The short_liq_size of this ContractStat. # noqa: E501 :type: int @@ -278,7 +278,7 @@ def short_liq_size(self, short_liq_size): def short_liq_amount(self): """Gets the short_liq_amount of this ContractStat. # noqa: E501 - Short liquidation amount(base currency). # noqa: E501 + Short liquidation amount (base currency) # noqa: E501 :return: The short_liq_amount of this ContractStat. # noqa: E501 :rtype: float @@ -289,7 +289,7 @@ def short_liq_amount(self): def short_liq_amount(self, short_liq_amount): """Sets the short_liq_amount of this ContractStat. - Short liquidation amount(base currency). # noqa: E501 + Short liquidation amount (base currency) # noqa: E501 :param short_liq_amount: The short_liq_amount of this ContractStat. # noqa: E501 :type: float @@ -301,7 +301,7 @@ def short_liq_amount(self, short_liq_amount): def short_liq_usd(self): """Gets the short_liq_usd of this ContractStat. # noqa: E501 - Short liquidation volume(quote currency). # noqa: E501 + Short liquidation volume (quote currency) # noqa: E501 :return: The short_liq_usd of this ContractStat. # noqa: E501 :rtype: float @@ -312,7 +312,7 @@ def short_liq_usd(self): def short_liq_usd(self, short_liq_usd): """Sets the short_liq_usd of this ContractStat. - Short liquidation volume(quote currency). # noqa: E501 + Short liquidation volume (quote currency) # noqa: E501 :param short_liq_usd: The short_liq_usd of this ContractStat. # noqa: E501 :type: float @@ -324,7 +324,7 @@ def short_liq_usd(self, short_liq_usd): def open_interest(self): """Gets the open_interest of this ContractStat. # noqa: E501 - Open interest size. # noqa: E501 + Total open interest size (contracts) # noqa: E501 :return: The open_interest of this ContractStat. # noqa: E501 :rtype: int @@ -335,7 +335,7 @@ def open_interest(self): def open_interest(self, open_interest): """Sets the open_interest of this ContractStat. - Open interest size. # noqa: E501 + Total open interest size (contracts) # noqa: E501 :param open_interest: The open_interest of this ContractStat. # noqa: E501 :type: int @@ -347,7 +347,7 @@ def open_interest(self, open_interest): def open_interest_usd(self): """Gets the open_interest_usd of this ContractStat. # noqa: E501 - Open interest volume(quote currency). # noqa: E501 + Total open interest volume (quote currency) # noqa: E501 :return: The open_interest_usd of this ContractStat. # noqa: E501 :rtype: float @@ -358,7 +358,7 @@ def open_interest_usd(self): def open_interest_usd(self, open_interest_usd): """Sets the open_interest_usd of this ContractStat. - Open interest volume(quote currency). # noqa: E501 + Total open interest volume (quote currency) # noqa: E501 :param open_interest_usd: The open_interest_usd of this ContractStat. # noqa: E501 :type: float @@ -370,7 +370,7 @@ def open_interest_usd(self, open_interest_usd): def top_lsr_account(self): """Gets the top_lsr_account of this ContractStat. # noqa: E501 - Top trader long/short account ratio. # noqa: E501 + Top trader long/short account ratio # noqa: E501 :return: The top_lsr_account of this ContractStat. # noqa: E501 :rtype: float @@ -381,7 +381,7 @@ def top_lsr_account(self): def top_lsr_account(self, top_lsr_account): """Sets the top_lsr_account of this ContractStat. - Top trader long/short account ratio. # noqa: E501 + Top trader long/short account ratio # noqa: E501 :param top_lsr_account: The top_lsr_account of this ContractStat. # noqa: E501 :type: float @@ -393,7 +393,7 @@ def top_lsr_account(self, top_lsr_account): def top_lsr_size(self): """Gets the top_lsr_size of this ContractStat. # noqa: E501 - Top trader long/short position ratio. # noqa: E501 + Top trader long/short position ratio # noqa: E501 :return: The top_lsr_size of this ContractStat. # noqa: E501 :rtype: float @@ -404,7 +404,7 @@ def top_lsr_size(self): def top_lsr_size(self, top_lsr_size): """Sets the top_lsr_size of this ContractStat. - Top trader long/short position ratio. # noqa: E501 + Top trader long/short position ratio # noqa: E501 :param top_lsr_size: The top_lsr_size of this ContractStat. # noqa: E501 :type: float diff --git a/gate_api/models/convert_small_balance.py b/gate_api/models/convert_small_balance.py index 9cd8342..dc47f37 100644 --- a/gate_api/models/convert_small_balance.py +++ b/gate_api/models/convert_small_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, is_all=None, local_vars_configuration=None): def currency(self): """Gets the currency of this ConvertSmallBalance. # noqa: E501 - Currency. # noqa: E501 + Currency to be converted # noqa: E501 :return: The currency of this ConvertSmallBalance. # noqa: E501 :rtype: list[str] @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this ConvertSmallBalance. - Currency. # noqa: E501 + Currency to be converted # noqa: E501 :param currency: The currency of this ConvertSmallBalance. # noqa: E501 :type: list[str] @@ -85,7 +85,7 @@ def currency(self, currency): def is_all(self): """Gets the is_all of this ConvertSmallBalance. # noqa: E501 - Whether to exchange all. # noqa: E501 + Whether to convert all # noqa: E501 :return: The is_all of this ConvertSmallBalance. # noqa: E501 :rtype: bool @@ -96,7 +96,7 @@ def is_all(self): def is_all(self, is_all): """Sets the is_all of this ConvertSmallBalance. - Whether to exchange all. # noqa: E501 + Whether to convert all # noqa: E501 :param is_all: The is_all of this ConvertSmallBalance. # noqa: E501 :type: bool diff --git a/gate_api/models/countdown_cancel_all_futures_task.py b/gate_api/models/countdown_cancel_all_futures_task.py index 51f7106..c927a3a 100644 --- a/gate_api/models/countdown_cancel_all_futures_task.py +++ b/gate_api/models/countdown_cancel_all_futures_task.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -86,7 +86,7 @@ def timeout(self, timeout): def contract(self): """Gets the contract of this CountdownCancelAllFuturesTask. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 :rtype: str @@ -97,7 +97,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this CountdownCancelAllFuturesTask. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this CountdownCancelAllFuturesTask. # noqa: E501 :type: str diff --git a/gate_api/models/countdown_cancel_all_options_task.py b/gate_api/models/countdown_cancel_all_options_task.py index 44422f8..b221659 100644 --- a/gate_api/models/countdown_cancel_all_options_task.py +++ b/gate_api/models/countdown_cancel_all_options_task.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -91,7 +91,7 @@ def timeout(self, timeout): def contract(self): """Gets the contract of this CountdownCancelAllOptionsTask. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 :rtype: str @@ -102,7 +102,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this CountdownCancelAllOptionsTask. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param contract: The contract of this CountdownCancelAllOptionsTask. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def contract(self, contract): def underlying(self): """Gets the underlying of this CountdownCancelAllOptionsTask. # noqa: E501 - Underlying. # noqa: E501 + Underlying # noqa: E501 :return: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this CountdownCancelAllOptionsTask. - Underlying. # noqa: E501 + Underlying # noqa: E501 :param underlying: The underlying of this CountdownCancelAllOptionsTask. # noqa: E501 :type: str diff --git a/gate_api/models/countdown_cancel_all_spot_task.py b/gate_api/models/countdown_cancel_all_spot_task.py index 0e7af6a..2761477 100644 --- a/gate_api/models/countdown_cancel_all_spot_task.py +++ b/gate_api/models/countdown_cancel_all_spot_task.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -86,7 +86,7 @@ def timeout(self, timeout): def currency_pair(self): """Gets the currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 :rtype: str @@ -97,7 +97,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CountdownCancelAllSpotTask. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this CountdownCancelAllSpotTask. # noqa: E501 :type: str diff --git a/gate_api/models/create_collateral_order.py b/gate_api/models/create_collateral_order.py index 85a8524..f570586 100644 --- a/gate_api/models/create_collateral_order.py +++ b/gate_api/models/create_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -68,7 +68,7 @@ def __init__(self, collateral_amount=None, collateral_currency=None, borrow_amou def collateral_amount(self): """Gets the collateral_amount of this CreateCollateralOrder. # noqa: E501 - Collateral amount. # noqa: E501 + Collateral amount # noqa: E501 :return: The collateral_amount of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -79,7 +79,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this CreateCollateralOrder. - Collateral amount. # noqa: E501 + Collateral amount # noqa: E501 :param collateral_amount: The collateral_amount of this CreateCollateralOrder. # noqa: E501 :type: str @@ -93,7 +93,7 @@ def collateral_amount(self, collateral_amount): def collateral_currency(self): """Gets the collateral_currency of this CreateCollateralOrder. # noqa: E501 - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :return: The collateral_currency of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -104,7 +104,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this CreateCollateralOrder. - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :param collateral_currency: The collateral_currency of this CreateCollateralOrder. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def collateral_currency(self, collateral_currency): def borrow_amount(self): """Gets the borrow_amount of this CreateCollateralOrder. # noqa: E501 - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :return: The borrow_amount of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CreateCollateralOrder. - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :param borrow_amount: The borrow_amount of this CreateCollateralOrder. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def borrow_amount(self, borrow_amount): def borrow_currency(self): """Gets the borrow_currency of this CreateCollateralOrder. # noqa: E501 - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :return: The borrow_currency of this CreateCollateralOrder. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CreateCollateralOrder. - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :param borrow_currency: The borrow_currency of this CreateCollateralOrder. # noqa: E501 :type: str diff --git a/gate_api/models/create_multi_collateral_order.py b/gate_api/models/create_multi_collateral_order.py index 9e3c00b..b3cc035 100644 --- a/gate_api/models/create_multi_collateral_order.py +++ b/gate_api/models/create_multi_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -95,7 +95,7 @@ def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=N def order_id(self): """Gets the order_id of this CreateMultiCollateralOrder. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this CreateMultiCollateralOrder. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def order_id(self, order_id): def order_type(self): """Gets the order_type of this CreateMultiCollateralOrder. # noqa: E501 - current - current, fixed - fixed, if not specified, default to current. # noqa: E501 + current - current rate, fixed - fixed rate, defaults to current if not specified # noqa: E501 :return: The order_type of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def order_type(self): def order_type(self, order_type): """Sets the order_type of this CreateMultiCollateralOrder. - current - current, fixed - fixed, if not specified, default to current. # noqa: E501 + current - current rate, fixed - fixed rate, defaults to current if not specified # noqa: E501 :param order_type: The order_type of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def order_type(self, order_type): def fixed_type(self): """Gets the fixed_type of this CreateMultiCollateralOrder. # noqa: E501 - Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed # noqa: E501 + Fixed interest rate lending period: 7d - 7 days, 30d - 30 days. Required for fixed rate # noqa: E501 :return: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def fixed_type(self): def fixed_type(self, fixed_type): """Sets the fixed_type of this CreateMultiCollateralOrder. - Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed # noqa: E501 + Fixed interest rate lending period: 7d - 7 days, 30d - 30 days. Required for fixed rate # noqa: E501 :param fixed_type: The fixed_type of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -164,7 +164,7 @@ def fixed_type(self, fixed_type): def fixed_rate(self): """Gets the fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 - Fixed interest rate, must be specified for fixed. # noqa: E501 + Fixed interest rate, required for fixed rate # noqa: E501 :return: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -175,7 +175,7 @@ def fixed_rate(self): def fixed_rate(self, fixed_rate): """Sets the fixed_rate of this CreateMultiCollateralOrder. - Fixed interest rate, must be specified for fixed. # noqa: E501 + Fixed interest rate, required for fixed rate # noqa: E501 :param fixed_rate: The fixed_rate of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -187,7 +187,7 @@ def fixed_rate(self, fixed_rate): def auto_renew(self): """Gets the auto_renew of this CreateMultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic renewal. # noqa: E501 + Fixed interest rate, auto-renewal # noqa: E501 :return: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 :rtype: bool @@ -198,7 +198,7 @@ def auto_renew(self): def auto_renew(self, auto_renew): """Sets the auto_renew of this CreateMultiCollateralOrder. - Fixed interest rate, automatic renewal. # noqa: E501 + Fixed interest rate, auto-renewal # noqa: E501 :param auto_renew: The auto_renew of this CreateMultiCollateralOrder. # noqa: E501 :type: bool @@ -210,7 +210,7 @@ def auto_renew(self, auto_renew): def auto_repay(self): """Gets the auto_repay of this CreateMultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic repayment. # noqa: E501 + Fixed interest rate, auto-repayment # noqa: E501 :return: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 :rtype: bool @@ -221,7 +221,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this CreateMultiCollateralOrder. - Fixed interest rate, automatic repayment. # noqa: E501 + Fixed interest rate, auto-repayment # noqa: E501 :param auto_repay: The auto_repay of this CreateMultiCollateralOrder. # noqa: E501 :type: bool @@ -233,7 +233,7 @@ def auto_repay(self, auto_repay): def borrow_currency(self): """Gets the borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :return: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -244,7 +244,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this CreateMultiCollateralOrder. - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :param borrow_currency: The borrow_currency of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def borrow_currency(self, borrow_currency): def borrow_amount(self): """Gets the borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :return: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this CreateMultiCollateralOrder. - Borrowing amount. # noqa: E501 + Borrowed amount # noqa: E501 :param borrow_amount: The borrow_amount of this CreateMultiCollateralOrder. # noqa: E501 :type: str @@ -283,7 +283,7 @@ def borrow_amount(self, borrow_amount): def collateral_currencies(self): """Gets the collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 - Collateral currency and amount. # noqa: E501 + Collateral currency and amount # noqa: E501 :return: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 :rtype: list[CollateralCurrency] @@ -294,7 +294,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this CreateMultiCollateralOrder. - Collateral currency and amount. # noqa: E501 + Collateral currency and amount # noqa: E501 :param collateral_currencies: The collateral_currencies of this CreateMultiCollateralOrder. # noqa: E501 :type: list[CollateralCurrency] diff --git a/gate_api/models/create_uni_lend.py b/gate_api/models/create_uni_lend.py index a0e84e6..ea40615 100644 --- a/gate_api/models/create_uni_lend.py +++ b/gate_api/models/create_uni_lend.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -69,7 +69,7 @@ def __init__(self, currency=None, amount=None, type=None, min_rate=None, local_v def currency(self): """Gets the currency of this CreateUniLend. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this CreateUniLend. # noqa: E501 :rtype: str @@ -80,7 +80,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CreateUniLend. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this CreateUniLend. # noqa: E501 :type: str @@ -94,7 +94,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this CreateUniLend. # noqa: E501 - The amount of currency could be lent. # noqa: E501 + Amount to deposit into lending pool # noqa: E501 :return: The amount of this CreateUniLend. # noqa: E501 :rtype: str @@ -105,7 +105,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CreateUniLend. - The amount of currency could be lent. # noqa: E501 + Amount to deposit into lending pool # noqa: E501 :param amount: The amount of this CreateUniLend. # noqa: E501 :type: str @@ -119,7 +119,7 @@ def amount(self, amount): def type(self): """Gets the type of this CreateUniLend. # noqa: E501 - type: lend - lend, redeem - redeem. # noqa: E501 + Operation type: lend - Lend, redeem - Redeem # noqa: E501 :return: The type of this CreateUniLend. # noqa: E501 :rtype: str @@ -130,7 +130,7 @@ def type(self): def type(self, type): """Sets the type of this CreateUniLend. - type: lend - lend, redeem - redeem. # noqa: E501 + Operation type: lend - Lend, redeem - Redeem # noqa: E501 :param type: The type of this CreateUniLend. # noqa: E501 :type: str @@ -150,7 +150,7 @@ def type(self, type): def min_rate(self): """Gets the min_rate of this CreateUniLend. # noqa: E501 - The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501 + Minimum interest rate. If set too high, lending may fail and no interest will be earned. Required for lending operations. # noqa: E501 :return: The min_rate of this CreateUniLend. # noqa: E501 :rtype: str @@ -161,7 +161,7 @@ def min_rate(self): def min_rate(self, min_rate): """Sets the min_rate of this CreateUniLend. - The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. # noqa: E501 + Minimum interest rate. If set too high, lending may fail and no interest will be earned. Required for lending operations. # noqa: E501 :param min_rate: The min_rate of this CreateUniLend. # noqa: E501 :type: str diff --git a/gate_api/models/create_uni_loan.py b/gate_api/models/create_uni_loan.py index 8b5dd75..708db4a 100644 --- a/gate_api/models/create_uni_loan.py +++ b/gate_api/models/create_uni_loan.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -73,7 +73,7 @@ def __init__(self, currency=None, type=None, amount=None, repaid_all=None, curre def currency(self): """Gets the currency of this CreateUniLoan. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this CreateUniLoan. # noqa: E501 :rtype: str @@ -84,7 +84,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CreateUniLoan. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this CreateUniLoan. # noqa: E501 :type: str @@ -98,7 +98,7 @@ def currency(self, currency): def type(self): """Gets the type of this CreateUniLoan. # noqa: E501 - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :return: The type of this CreateUniLoan. # noqa: E501 :rtype: str @@ -109,7 +109,7 @@ def type(self): def type(self, type): """Sets the type of this CreateUniLoan. - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :param type: The type of this CreateUniLoan. # noqa: E501 :type: str @@ -129,7 +129,7 @@ def type(self, type): def amount(self): """Gets the amount of this CreateUniLoan. # noqa: E501 - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :return: The amount of this CreateUniLoan. # noqa: E501 :rtype: str @@ -140,7 +140,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CreateUniLoan. - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :param amount: The amount of this CreateUniLoan. # noqa: E501 :type: str @@ -154,7 +154,7 @@ def amount(self, amount): def repaid_all(self): """Gets the repaid_all of this CreateUniLoan. # noqa: E501 - Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and repaid in full. # noqa: E501 + Full repayment. For repayment operations only. When `true`, overrides `amount` and repays the full amount # noqa: E501 :return: The repaid_all of this CreateUniLoan. # noqa: E501 :rtype: bool @@ -165,7 +165,7 @@ def repaid_all(self): def repaid_all(self, repaid_all): """Sets the repaid_all of this CreateUniLoan. - Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and repaid in full. # noqa: E501 + Full repayment. For repayment operations only. When `true`, overrides `amount` and repays the full amount # noqa: E501 :param repaid_all: The repaid_all of this CreateUniLoan. # noqa: E501 :type: bool @@ -177,7 +177,7 @@ def repaid_all(self, repaid_all): def currency_pair(self): """Gets the currency_pair of this CreateUniLoan. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this CreateUniLoan. # noqa: E501 :rtype: str @@ -188,7 +188,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this CreateUniLoan. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this CreateUniLoan. # noqa: E501 :type: str diff --git a/gate_api/models/cross_margin_balance.py b/gate_api/models/cross_margin_balance.py index 9e28312..6b9d284 100644 --- a/gate_api/models/cross_margin_balance.py +++ b/gate_api/models/cross_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, available=None, freeze=None, borrowed=None, interest=None, lo def available(self): """Gets the available of this CrossMarginBalance. # noqa: E501 - Available amount. # noqa: E501 + Available balance # noqa: E501 :return: The available of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def available(self): def available(self, available): """Sets the available of this CrossMarginBalance. - Available amount. # noqa: E501 + Available balance # noqa: E501 :param available: The available of this CrossMarginBalance. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def available(self, available): def freeze(self): """Gets the freeze of this CrossMarginBalance. # noqa: E501 - Locked amount. # noqa: E501 + Locked balance # noqa: E501 :return: The freeze of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def freeze(self): def freeze(self, freeze): """Sets the freeze of this CrossMarginBalance. - Locked amount. # noqa: E501 + Locked balance # noqa: E501 :param freeze: The freeze of this CrossMarginBalance. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def freeze(self, freeze): def borrowed(self): """Gets the borrowed of this CrossMarginBalance. # noqa: E501 - Borrowed amount. # noqa: E501 + Borrowed balance # noqa: E501 :return: The borrowed of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this CrossMarginBalance. - Borrowed amount. # noqa: E501 + Borrowed balance # noqa: E501 :param borrowed: The borrowed of this CrossMarginBalance. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def borrowed(self, borrowed): def interest(self): """Gets the interest of this CrossMarginBalance. # noqa: E501 - Unpaid interests. # noqa: E501 + Unpaid interest # noqa: E501 :return: The interest of this CrossMarginBalance. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this CrossMarginBalance. - Unpaid interests. # noqa: E501 + Unpaid interest # noqa: E501 :param interest: The interest of this CrossMarginBalance. # noqa: E501 :type: str diff --git a/gate_api/models/cross_margin_loan.py b/gate_api/models/cross_margin_loan.py index d548e15..b085e67 100644 --- a/gate_api/models/cross_margin_loan.py +++ b/gate_api/models/cross_margin_loan.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -100,7 +100,7 @@ def __init__(self, id=None, create_time=None, update_time=None, currency=None, a def id(self): """Gets the id of this CrossMarginLoan. # noqa: E501 - Loan record ID. # noqa: E501 + Loan record ID # noqa: E501 :return: The id of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def id(self): def id(self, id): """Sets the id of this CrossMarginLoan. - Loan record ID. # noqa: E501 + Loan record ID # noqa: E501 :param id: The id of this CrossMarginLoan. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this CrossMarginLoan. # noqa: E501 - Creation timestamp, in milliseconds. # noqa: E501 + Creation timestamp, in milliseconds # noqa: E501 :return: The create_time of this CrossMarginLoan. # noqa: E501 :rtype: int @@ -134,7 +134,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this CrossMarginLoan. - Creation timestamp, in milliseconds. # noqa: E501 + Creation timestamp, in milliseconds # noqa: E501 :param create_time: The create_time of this CrossMarginLoan. # noqa: E501 :type: int @@ -146,7 +146,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this CrossMarginLoan. # noqa: E501 - Update timestamp, in milliseconds. # noqa: E501 + Update timestamp, in milliseconds # noqa: E501 :return: The update_time of this CrossMarginLoan. # noqa: E501 :rtype: int @@ -157,7 +157,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this CrossMarginLoan. - Update timestamp, in milliseconds. # noqa: E501 + Update timestamp, in milliseconds # noqa: E501 :param update_time: The update_time of this CrossMarginLoan. # noqa: E501 :type: int @@ -169,7 +169,7 @@ def update_time(self, update_time): def currency(self): """Gets the currency of this CrossMarginLoan. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CrossMarginLoan. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this CrossMarginLoan. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this CrossMarginLoan. # noqa: E501 - Borrowed amount. # noqa: E501 + Borrowed amount # noqa: E501 :return: The amount of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this CrossMarginLoan. - Borrowed amount. # noqa: E501 + Borrowed amount # noqa: E501 :param amount: The amount of this CrossMarginLoan. # noqa: E501 :type: str @@ -219,7 +219,7 @@ def amount(self, amount): def text(self): """Gets the text of this CrossMarginLoan. # noqa: E501 - User defined custom ID. # noqa: E501 + User defined custom ID # noqa: E501 :return: The text of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -230,7 +230,7 @@ def text(self): def text(self, text): """Sets the text of this CrossMarginLoan. - User defined custom ID. # noqa: E501 + User defined custom ID # noqa: E501 :param text: The text of this CrossMarginLoan. # noqa: E501 :type: str @@ -271,7 +271,7 @@ def status(self, status): def repaid(self): """Gets the repaid of this CrossMarginLoan. # noqa: E501 - Repaid amount. # noqa: E501 + Repaid amount # noqa: E501 :return: The repaid of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -282,7 +282,7 @@ def repaid(self): def repaid(self, repaid): """Sets the repaid of this CrossMarginLoan. - Repaid amount. # noqa: E501 + Repaid amount # noqa: E501 :param repaid: The repaid of this CrossMarginLoan. # noqa: E501 :type: str @@ -294,7 +294,7 @@ def repaid(self, repaid): def repaid_interest(self): """Gets the repaid_interest of this CrossMarginLoan. # noqa: E501 - Repaid interest. # noqa: E501 + Repaid interest # noqa: E501 :return: The repaid_interest of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -305,7 +305,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this CrossMarginLoan. - Repaid interest. # noqa: E501 + Repaid interest # noqa: E501 :param repaid_interest: The repaid_interest of this CrossMarginLoan. # noqa: E501 :type: str @@ -317,7 +317,7 @@ def repaid_interest(self, repaid_interest): def unpaid_interest(self): """Gets the unpaid_interest of this CrossMarginLoan. # noqa: E501 - Outstanding interest yet to be paid. # noqa: E501 + Unpaid interest # noqa: E501 :return: The unpaid_interest of this CrossMarginLoan. # noqa: E501 :rtype: str @@ -328,7 +328,7 @@ def unpaid_interest(self): def unpaid_interest(self, unpaid_interest): """Sets the unpaid_interest of this CrossMarginLoan. - Outstanding interest yet to be paid. # noqa: E501 + Unpaid interest # noqa: E501 :param unpaid_interest: The unpaid_interest of this CrossMarginLoan. # noqa: E501 :type: str diff --git a/gate_api/models/cross_margin_repayment.py b/gate_api/models/cross_margin_repayment.py index 62f977d..6e71d54 100644 --- a/gate_api/models/cross_margin_repayment.py +++ b/gate_api/models/cross_margin_repayment.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, id=None, create_time=None, loan_id=None, currency=None, princ def id(self): """Gets the id of this CrossMarginRepayment. # noqa: E501 - Loan record ID. # noqa: E501 + Loan record ID # noqa: E501 :return: The id of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def id(self): def id(self, id): """Sets the id of this CrossMarginRepayment. - Loan record ID. # noqa: E501 + Loan record ID # noqa: E501 :param id: The id of this CrossMarginRepayment. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this CrossMarginRepayment. # noqa: E501 - Repayment time. # noqa: E501 + Repayment time # noqa: E501 :return: The create_time of this CrossMarginRepayment. # noqa: E501 :rtype: int @@ -121,7 +121,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this CrossMarginRepayment. - Repayment time. # noqa: E501 + Repayment time # noqa: E501 :param create_time: The create_time of this CrossMarginRepayment. # noqa: E501 :type: int @@ -133,7 +133,7 @@ def create_time(self, create_time): def loan_id(self): """Gets the loan_id of this CrossMarginRepayment. # noqa: E501 - Loan record ID. # noqa: E501 + Loan record ID # noqa: E501 :return: The loan_id of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def loan_id(self): def loan_id(self, loan_id): """Sets the loan_id of this CrossMarginRepayment. - Loan record ID. # noqa: E501 + Loan record ID # noqa: E501 :param loan_id: The loan_id of this CrossMarginRepayment. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def loan_id(self, loan_id): def currency(self): """Gets the currency of this CrossMarginRepayment. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CrossMarginRepayment. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this CrossMarginRepayment. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def currency(self, currency): def principal(self): """Gets the principal of this CrossMarginRepayment. # noqa: E501 - Repaid principal. # noqa: E501 + Repaid principal # noqa: E501 :return: The principal of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def principal(self): def principal(self, principal): """Sets the principal of this CrossMarginRepayment. - Repaid principal. # noqa: E501 + Repaid principal # noqa: E501 :param principal: The principal of this CrossMarginRepayment. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def principal(self, principal): def interest(self): """Gets the interest of this CrossMarginRepayment. # noqa: E501 - Repaid interest. # noqa: E501 + Repaid interest # noqa: E501 :return: The interest of this CrossMarginRepayment. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this CrossMarginRepayment. - Repaid interest. # noqa: E501 + Repaid interest # noqa: E501 :param interest: The interest of this CrossMarginRepayment. # noqa: E501 :type: str diff --git a/gate_api/models/currency.py b/gate_api/models/currency.py index 546f292..14789cf 100644 --- a/gate_api/models/currency.py +++ b/gate_api/models/currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, currency=None, name=None, delisted=None, withdraw_disabled=No def currency(self): """Gets the currency of this Currency. # noqa: E501 - Currency symbol. # noqa: E501 + Currency symbol # noqa: E501 :return: The currency of this Currency. # noqa: E501 :rtype: str @@ -113,7 +113,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this Currency. - Currency symbol. # noqa: E501 + Currency symbol # noqa: E501 :param currency: The currency of this Currency. # noqa: E501 :type: str @@ -125,7 +125,7 @@ def currency(self, currency): def name(self): """Gets the name of this Currency. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The name of this Currency. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def name(self): def name(self, name): """Sets the name of this Currency. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param name: The name of this Currency. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def name(self, name): def delisted(self): """Gets the delisted of this Currency. # noqa: E501 - Whether currency is de-listed. # noqa: E501 + Whether currency is de-listed # noqa: E501 :return: The delisted of this Currency. # noqa: E501 :rtype: bool @@ -159,7 +159,7 @@ def delisted(self): def delisted(self, delisted): """Sets the delisted of this Currency. - Whether currency is de-listed. # noqa: E501 + Whether currency is de-listed # noqa: E501 :param delisted: The delisted of this Currency. # noqa: E501 :type: bool @@ -171,7 +171,7 @@ def delisted(self, delisted): def withdraw_disabled(self): """Gets the withdraw_disabled of this Currency. # noqa: E501 - Whether currency's withdrawal is disabled (deprecated). # noqa: E501 + Whether currency's withdrawal is disabled (deprecated) # noqa: E501 :return: The withdraw_disabled of this Currency. # noqa: E501 :rtype: bool @@ -182,7 +182,7 @@ def withdraw_disabled(self): def withdraw_disabled(self, withdraw_disabled): """Sets the withdraw_disabled of this Currency. - Whether currency's withdrawal is disabled (deprecated). # noqa: E501 + Whether currency's withdrawal is disabled (deprecated) # noqa: E501 :param withdraw_disabled: The withdraw_disabled of this Currency. # noqa: E501 :type: bool @@ -194,7 +194,7 @@ def withdraw_disabled(self, withdraw_disabled): def withdraw_delayed(self): """Gets the withdraw_delayed of this Currency. # noqa: E501 - Whether currency's withdrawal is delayed (deprecated). # noqa: E501 + Whether currency's withdrawal is delayed (deprecated) # noqa: E501 :return: The withdraw_delayed of this Currency. # noqa: E501 :rtype: bool @@ -205,7 +205,7 @@ def withdraw_delayed(self): def withdraw_delayed(self, withdraw_delayed): """Sets the withdraw_delayed of this Currency. - Whether currency's withdrawal is delayed (deprecated). # noqa: E501 + Whether currency's withdrawal is delayed (deprecated) # noqa: E501 :param withdraw_delayed: The withdraw_delayed of this Currency. # noqa: E501 :type: bool @@ -217,7 +217,7 @@ def withdraw_delayed(self, withdraw_delayed): def deposit_disabled(self): """Gets the deposit_disabled of this Currency. # noqa: E501 - Whether currency's deposit is disabled (deprecated). # noqa: E501 + Whether currency's deposit is disabled (deprecated) # noqa: E501 :return: The deposit_disabled of this Currency. # noqa: E501 :rtype: bool @@ -228,7 +228,7 @@ def deposit_disabled(self): def deposit_disabled(self, deposit_disabled): """Sets the deposit_disabled of this Currency. - Whether currency's deposit is disabled (deprecated). # noqa: E501 + Whether currency's deposit is disabled (deprecated) # noqa: E501 :param deposit_disabled: The deposit_disabled of this Currency. # noqa: E501 :type: bool @@ -240,7 +240,7 @@ def deposit_disabled(self, deposit_disabled): def trade_disabled(self): """Gets the trade_disabled of this Currency. # noqa: E501 - Whether currency's trading is disabled. # noqa: E501 + Whether currency's trading is disabled # noqa: E501 :return: The trade_disabled of this Currency. # noqa: E501 :rtype: bool @@ -251,7 +251,7 @@ def trade_disabled(self): def trade_disabled(self, trade_disabled): """Sets the trade_disabled of this Currency. - Whether currency's trading is disabled. # noqa: E501 + Whether currency's trading is disabled # noqa: E501 :param trade_disabled: The trade_disabled of this Currency. # noqa: E501 :type: bool @@ -286,7 +286,7 @@ def fixed_rate(self, fixed_rate): def chain(self): """Gets the chain of this Currency. # noqa: E501 - The main chain corresponding to the coin. # noqa: E501 + The main chain corresponding to the coin # noqa: E501 :return: The chain of this Currency. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this Currency. - The main chain corresponding to the coin. # noqa: E501 + The main chain corresponding to the coin # noqa: E501 :param chain: The chain of this Currency. # noqa: E501 :type: str @@ -309,7 +309,7 @@ def chain(self, chain): def chains(self): """Gets the chains of this Currency. # noqa: E501 - All links corresponding to coins. # noqa: E501 + All links corresponding to coins # noqa: E501 :return: The chains of this Currency. # noqa: E501 :rtype: list[SpotCurrencyChain] @@ -320,7 +320,7 @@ def chains(self): def chains(self, chains): """Sets the chains of this Currency. - All links corresponding to coins. # noqa: E501 + All links corresponding to coins # noqa: E501 :param chains: The chains of this Currency. # noqa: E501 :type: list[SpotCurrencyChain] diff --git a/gate_api/models/currency_chain.py b/gate_api/models/currency_chain.py index bbe35ef..5feb14f 100644 --- a/gate_api/models/currency_chain.py +++ b/gate_api/models/currency_chain.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, chain=None, name_cn=None, name_en=None, contract_address=None def chain(self): """Gets the chain of this CurrencyChain. # noqa: E501 - Chain name. # noqa: E501 + Chain name # noqa: E501 :return: The chain of this CurrencyChain. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this CurrencyChain. - Chain name. # noqa: E501 + Chain name # noqa: E501 :param chain: The chain of this CurrencyChain. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def chain(self, chain): def name_cn(self): """Gets the name_cn of this CurrencyChain. # noqa: E501 - Chain name in Chinese. # noqa: E501 + Chain name in Chinese # noqa: E501 :return: The name_cn of this CurrencyChain. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def name_cn(self): def name_cn(self, name_cn): """Sets the name_cn of this CurrencyChain. - Chain name in Chinese. # noqa: E501 + Chain name in Chinese # noqa: E501 :param name_cn: The name_cn of this CurrencyChain. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def name_cn(self, name_cn): def name_en(self): """Gets the name_en of this CurrencyChain. # noqa: E501 - Chain name in English. # noqa: E501 + Chain name in English # noqa: E501 :return: The name_en of this CurrencyChain. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def name_en(self): def name_en(self, name_en): """Sets the name_en of this CurrencyChain. - Chain name in English. # noqa: E501 + Chain name in English # noqa: E501 :param name_en: The name_en of this CurrencyChain. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def contract_address(self, contract_address): def is_disabled(self): """Gets the is_disabled of this CurrencyChain. # noqa: E501 - If it is disabled. 0 means NOT being disabled. # noqa: E501 + If it is disabled. 0 means NOT being disabled # noqa: E501 :return: The is_disabled of this CurrencyChain. # noqa: E501 :rtype: int @@ -195,7 +195,7 @@ def is_disabled(self): def is_disabled(self, is_disabled): """Sets the is_disabled of this CurrencyChain. - If it is disabled. 0 means NOT being disabled. # noqa: E501 + If it is disabled. 0 means NOT being disabled # noqa: E501 :param is_disabled: The is_disabled of this CurrencyChain. # noqa: E501 :type: int @@ -207,7 +207,7 @@ def is_disabled(self, is_disabled): def is_deposit_disabled(self): """Gets the is_deposit_disabled of this CurrencyChain. # noqa: E501 - Is deposit disabled. 0 means not. # noqa: E501 + Is deposit disabled. 0 means not disabled # noqa: E501 :return: The is_deposit_disabled of this CurrencyChain. # noqa: E501 :rtype: int @@ -218,7 +218,7 @@ def is_deposit_disabled(self): def is_deposit_disabled(self, is_deposit_disabled): """Sets the is_deposit_disabled of this CurrencyChain. - Is deposit disabled. 0 means not. # noqa: E501 + Is deposit disabled. 0 means not disabled # noqa: E501 :param is_deposit_disabled: The is_deposit_disabled of this CurrencyChain. # noqa: E501 :type: int @@ -230,7 +230,7 @@ def is_deposit_disabled(self, is_deposit_disabled): def is_withdraw_disabled(self): """Gets the is_withdraw_disabled of this CurrencyChain. # noqa: E501 - Is withdrawal disabled. 0 means not. # noqa: E501 + Is withdrawal disabled. 0 means not disabled # noqa: E501 :return: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 :rtype: int @@ -241,7 +241,7 @@ def is_withdraw_disabled(self): def is_withdraw_disabled(self, is_withdraw_disabled): """Sets the is_withdraw_disabled of this CurrencyChain. - Is withdrawal disabled. 0 means not. # noqa: E501 + Is withdrawal disabled. 0 means not disabled # noqa: E501 :param is_withdraw_disabled: The is_withdraw_disabled of this CurrencyChain. # noqa: E501 :type: int @@ -253,7 +253,7 @@ def is_withdraw_disabled(self, is_withdraw_disabled): def decimal(self): """Gets the decimal of this CurrencyChain. # noqa: E501 - Withdrawal precision. # noqa: E501 + Withdrawal precision # noqa: E501 :return: The decimal of this CurrencyChain. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def decimal(self): def decimal(self, decimal): """Sets the decimal of this CurrencyChain. - Withdrawal precision. # noqa: E501 + Withdrawal precision # noqa: E501 :param decimal: The decimal of this CurrencyChain. # noqa: E501 :type: str diff --git a/gate_api/models/currency_pair.py b/gate_api/models/currency_pair.py index a528d77..26e7959 100644 --- a/gate_api/models/currency_pair.py +++ b/gate_api/models/currency_pair.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -147,7 +147,7 @@ def __init__(self, id=None, base=None, base_name=None, quote=None, quote_name=No def id(self): """Gets the id of this CurrencyPair. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The id of this CurrencyPair. # noqa: E501 :rtype: str @@ -158,7 +158,7 @@ def id(self): def id(self, id): """Sets the id of this CurrencyPair. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param id: The id of this CurrencyPair. # noqa: E501 :type: str @@ -170,7 +170,7 @@ def id(self, id): def base(self): """Gets the base of this CurrencyPair. # noqa: E501 - Base currency. # noqa: E501 + Base currency # noqa: E501 :return: The base of this CurrencyPair. # noqa: E501 :rtype: str @@ -181,7 +181,7 @@ def base(self): def base(self, base): """Sets the base of this CurrencyPair. - Base currency. # noqa: E501 + Base currency # noqa: E501 :param base: The base of this CurrencyPair. # noqa: E501 :type: str @@ -193,7 +193,7 @@ def base(self, base): def base_name(self): """Gets the base_name of this CurrencyPair. # noqa: E501 - Transaction currency name. # noqa: E501 + Base currency name # noqa: E501 :return: The base_name of this CurrencyPair. # noqa: E501 :rtype: str @@ -204,7 +204,7 @@ def base_name(self): def base_name(self, base_name): """Sets the base_name of this CurrencyPair. - Transaction currency name. # noqa: E501 + Base currency name # noqa: E501 :param base_name: The base_name of this CurrencyPair. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def base_name(self, base_name): def quote(self): """Gets the quote of this CurrencyPair. # noqa: E501 - Quote currency. # noqa: E501 + Quote currency # noqa: E501 :return: The quote of this CurrencyPair. # noqa: E501 :rtype: str @@ -227,7 +227,7 @@ def quote(self): def quote(self, quote): """Sets the quote of this CurrencyPair. - Quote currency. # noqa: E501 + Quote currency # noqa: E501 :param quote: The quote of this CurrencyPair. # noqa: E501 :type: str @@ -239,7 +239,7 @@ def quote(self, quote): def quote_name(self): """Gets the quote_name of this CurrencyPair. # noqa: E501 - Name of the denominated currency. # noqa: E501 + Quote currency name # noqa: E501 :return: The quote_name of this CurrencyPair. # noqa: E501 :rtype: str @@ -250,7 +250,7 @@ def quote_name(self): def quote_name(self, quote_name): """Sets the quote_name of this CurrencyPair. - Name of the denominated currency. # noqa: E501 + Quote currency name # noqa: E501 :param quote_name: The quote_name of this CurrencyPair. # noqa: E501 :type: str @@ -262,7 +262,7 @@ def quote_name(self, quote_name): def fee(self): """Gets the fee of this CurrencyPair. # noqa: E501 - Trading fee. # noqa: E501 + Trading fee rate # noqa: E501 :return: The fee of this CurrencyPair. # noqa: E501 :rtype: str @@ -273,7 +273,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this CurrencyPair. - Trading fee. # noqa: E501 + Trading fee rate # noqa: E501 :param fee: The fee of this CurrencyPair. # noqa: E501 :type: str @@ -285,7 +285,7 @@ def fee(self, fee): def min_base_amount(self): """Gets the min_base_amount of this CurrencyPair. # noqa: E501 - Minimum amount of base currency to trade, `null` means no limit. # noqa: E501 + Minimum amount of base currency to trade, `null` means no limit # noqa: E501 :return: The min_base_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -296,7 +296,7 @@ def min_base_amount(self): def min_base_amount(self, min_base_amount): """Sets the min_base_amount of this CurrencyPair. - Minimum amount of base currency to trade, `null` means no limit. # noqa: E501 + Minimum amount of base currency to trade, `null` means no limit # noqa: E501 :param min_base_amount: The min_base_amount of this CurrencyPair. # noqa: E501 :type: str @@ -308,7 +308,7 @@ def min_base_amount(self, min_base_amount): def min_quote_amount(self): """Gets the min_quote_amount of this CurrencyPair. # noqa: E501 - Minimum amount of quote currency to trade, `null` means no limit. # noqa: E501 + Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 :return: The min_quote_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -319,7 +319,7 @@ def min_quote_amount(self): def min_quote_amount(self, min_quote_amount): """Sets the min_quote_amount of this CurrencyPair. - Minimum amount of quote currency to trade, `null` means no limit. # noqa: E501 + Minimum amount of quote currency to trade, `null` means no limit # noqa: E501 :param min_quote_amount: The min_quote_amount of this CurrencyPair. # noqa: E501 :type: str @@ -331,7 +331,7 @@ def min_quote_amount(self, min_quote_amount): def max_base_amount(self): """Gets the max_base_amount of this CurrencyPair. # noqa: E501 - Maximum amount of base currency to trade, `null` means no limit. # noqa: E501 + Maximum amount of base currency to trade, `null` means no limit # noqa: E501 :return: The max_base_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -342,7 +342,7 @@ def max_base_amount(self): def max_base_amount(self, max_base_amount): """Sets the max_base_amount of this CurrencyPair. - Maximum amount of base currency to trade, `null` means no limit. # noqa: E501 + Maximum amount of base currency to trade, `null` means no limit # noqa: E501 :param max_base_amount: The max_base_amount of this CurrencyPair. # noqa: E501 :type: str @@ -354,7 +354,7 @@ def max_base_amount(self, max_base_amount): def max_quote_amount(self): """Gets the max_quote_amount of this CurrencyPair. # noqa: E501 - Maximum amount of quote currency to trade, `null` means no limit. # noqa: E501 + Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 :return: The max_quote_amount of this CurrencyPair. # noqa: E501 :rtype: str @@ -365,7 +365,7 @@ def max_quote_amount(self): def max_quote_amount(self, max_quote_amount): """Sets the max_quote_amount of this CurrencyPair. - Maximum amount of quote currency to trade, `null` means no limit. # noqa: E501 + Maximum amount of quote currency to trade, `null` means no limit # noqa: E501 :param max_quote_amount: The max_quote_amount of this CurrencyPair. # noqa: E501 :type: str @@ -377,7 +377,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 + Amount scale # noqa: E501 :return: The amount_precision of this CurrencyPair. # noqa: E501 :rtype: int @@ -388,7 +388,7 @@ def amount_precision(self): def amount_precision(self, amount_precision): """Sets the amount_precision of this CurrencyPair. - Amount scale. # noqa: E501 + Amount scale # noqa: E501 :param amount_precision: The amount_precision of this CurrencyPair. # noqa: E501 :type: int @@ -400,7 +400,7 @@ def amount_precision(self, amount_precision): def precision(self): """Gets the precision of this CurrencyPair. # noqa: E501 - Price scale. # noqa: E501 + Price scale # noqa: E501 :return: The precision of this CurrencyPair. # noqa: E501 :rtype: int @@ -411,7 +411,7 @@ def precision(self): def precision(self, precision): """Sets the precision of this CurrencyPair. - Price scale. # noqa: E501 + Price scale # noqa: E501 :param precision: The precision of this CurrencyPair. # noqa: E501 :type: int @@ -423,7 +423,7 @@ def precision(self, precision): def trade_status(self): """Gets the trade_status of this CurrencyPair. # noqa: E501 - How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: sold # noqa: E501 + Trading status - untradable: cannot be traded - buyable: can be bought - sellable: can be sold - tradable: can be bought and sold # noqa: E501 :return: The trade_status of this CurrencyPair. # noqa: E501 :rtype: str @@ -434,7 +434,7 @@ def trade_status(self): def trade_status(self, trade_status): """Sets the trade_status of this CurrencyPair. - How currency pair can be traded - untradable: cannot be bought or sold - buyable: can be bought - sellable: can be sold - tradable: sold # noqa: E501 + Trading status - untradable: cannot be traded - buyable: can be bought - sellable: can be sold - tradable: can be bought and sold # noqa: E501 :param trade_status: The trade_status of this CurrencyPair. # noqa: E501 :type: str @@ -452,7 +452,7 @@ def trade_status(self, trade_status): def sell_start(self): """Gets the sell_start of this CurrencyPair. # noqa: E501 - Sell start unix timestamp in seconds. # noqa: E501 + Sell start unix timestamp in seconds # noqa: E501 :return: The sell_start of this CurrencyPair. # noqa: E501 :rtype: int @@ -463,7 +463,7 @@ def sell_start(self): def sell_start(self, sell_start): """Sets the sell_start of this CurrencyPair. - Sell start unix timestamp in seconds. # noqa: E501 + Sell start unix timestamp in seconds # noqa: E501 :param sell_start: The sell_start of this CurrencyPair. # noqa: E501 :type: int @@ -475,7 +475,7 @@ def sell_start(self, sell_start): def buy_start(self): """Gets the buy_start of this CurrencyPair. # noqa: E501 - Buy start unix timestamp in seconds. # noqa: E501 + Buy start unix timestamp in seconds # noqa: E501 :return: The buy_start of this CurrencyPair. # noqa: E501 :rtype: int @@ -486,7 +486,7 @@ def buy_start(self): def buy_start(self, buy_start): """Sets the buy_start of this CurrencyPair. - Buy start unix timestamp in seconds. # noqa: E501 + Buy start unix timestamp in seconds # noqa: E501 :param buy_start: The buy_start of this CurrencyPair. # noqa: E501 :type: int @@ -498,7 +498,7 @@ def buy_start(self, buy_start): def delisting_time(self): """Gets the delisting_time of this CurrencyPair. # noqa: E501 - Expected time to remove the shelves, Unix timestamp in seconds. # noqa: E501 + Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501 :return: The delisting_time of this CurrencyPair. # noqa: E501 :rtype: int @@ -509,7 +509,7 @@ def delisting_time(self): def delisting_time(self, delisting_time): """Sets the delisting_time of this CurrencyPair. - Expected time to remove the shelves, Unix timestamp in seconds. # noqa: E501 + Expected time to remove the shelves, Unix timestamp in seconds # noqa: E501 :param delisting_time: The delisting_time of this CurrencyPair. # noqa: E501 :type: int @@ -521,7 +521,7 @@ def delisting_time(self, delisting_time): def type(self): """Gets the type of this CurrencyPair. # noqa: E501 - Trading pair type, normal: normal, premarket: pre-market. # noqa: E501 + Trading pair type, normal: normal, premarket: pre-market # noqa: E501 :return: The type of this CurrencyPair. # noqa: E501 :rtype: str @@ -532,7 +532,7 @@ def type(self): def type(self, type): """Sets the type of this CurrencyPair. - Trading pair type, normal: normal, premarket: pre-market. # noqa: E501 + Trading pair type, normal: normal, premarket: pre-market # noqa: E501 :param type: The type of this CurrencyPair. # noqa: E501 :type: str @@ -544,7 +544,7 @@ def type(self, type): def trade_url(self): """Gets the trade_url of this CurrencyPair. # noqa: E501 - Transaction link. # noqa: E501 + Transaction link # noqa: E501 :return: The trade_url of this CurrencyPair. # noqa: E501 :rtype: str @@ -555,7 +555,7 @@ def trade_url(self): def trade_url(self, trade_url): """Sets the trade_url of this CurrencyPair. - Transaction link. # noqa: E501 + Transaction link # noqa: E501 :param trade_url: The trade_url of this CurrencyPair. # noqa: E501 :type: str @@ -567,7 +567,7 @@ def trade_url(self, trade_url): def st_tag(self): """Gets the st_tag of this CurrencyPair. # noqa: E501 - Whether the trading pair is in ST risk assessment, false - No, true - Yes. # noqa: E501 + Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501 :return: The st_tag of this CurrencyPair. # noqa: E501 :rtype: bool @@ -578,7 +578,7 @@ def st_tag(self): def st_tag(self, st_tag): """Sets the st_tag of this CurrencyPair. - Whether the trading pair is in ST risk assessment, false - No, true - Yes. # noqa: E501 + Whether the trading pair is in ST risk assessment, false - No, true - Yes # noqa: E501 :param st_tag: The st_tag of this CurrencyPair. # noqa: E501 :type: bool diff --git a/gate_api/models/currency_quota.py b/gate_api/models/currency_quota.py index 2288c09..3ebee02 100644 --- a/gate_api/models/currency_quota.py +++ b/gate_api/models/currency_quota.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, currency=None, index_price=None, min_quota=None, left_quota=N def currency(self): """Gets the currency of this CurrencyQuota. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this CurrencyQuota. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this CurrencyQuota. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this CurrencyQuota. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this CurrencyQuota. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this CurrencyQuota. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this CurrencyQuota. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this CurrencyQuota. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def index_price(self, index_price): def min_quota(self): """Gets the min_quota of this CurrencyQuota. # noqa: E501 - Minimum borrowing/collateral quota for the currency. # noqa: E501 + Minimum borrowing/collateral limit for the currency # noqa: E501 :return: The min_quota of this CurrencyQuota. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def min_quota(self): def min_quota(self, min_quota): """Sets the min_quota of this CurrencyQuota. - Minimum borrowing/collateral quota for the currency. # noqa: E501 + Minimum borrowing/collateral limit for the currency # noqa: E501 :param min_quota: The min_quota of this CurrencyQuota. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def min_quota(self, min_quota): def left_quota(self): """Gets the left_quota of this CurrencyQuota. # noqa: E501 - Remaining borrowing/collateral limit for the currency. # noqa: E501 + Remaining borrowing/collateral quota for the currency # noqa: E501 :return: The left_quota of this CurrencyQuota. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def left_quota(self): def left_quota(self, left_quota): """Sets the left_quota of this CurrencyQuota. - Remaining borrowing/collateral limit for the currency. # noqa: E501 + Remaining borrowing/collateral quota for the currency # noqa: E501 :param left_quota: The left_quota of this CurrencyQuota. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def left_quota(self, left_quota): def left_quote_usdt(self): """Gets the left_quote_usdt of this CurrencyQuota. # noqa: E501 - Remaining currency limit converted to USDT. # noqa: E501 + Remaining currency limit converted to USDT # noqa: E501 :return: The left_quote_usdt of this CurrencyQuota. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def left_quote_usdt(self): def left_quote_usdt(self, left_quote_usdt): """Sets the left_quote_usdt of this CurrencyQuota. - Remaining currency limit converted to USDT. # noqa: E501 + Remaining currency limit converted to USDT # noqa: E501 :param left_quote_usdt: The left_quote_usdt of this CurrencyQuota. # noqa: E501 :type: str diff --git a/gate_api/models/debit_fee.py b/gate_api/models/debit_fee.py index 5919508..d563fe2 100644 --- a/gate_api/models/debit_fee.py +++ b/gate_api/models/debit_fee.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -56,7 +56,7 @@ def __init__(self, enabled=None, local_vars_configuration=None): # noqa: E501 def enabled(self): """Gets the enabled of this DebitFee. # noqa: E501 - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :return: The enabled of this DebitFee. # noqa: E501 :rtype: bool @@ -67,7 +67,7 @@ def enabled(self): def enabled(self, enabled): """Sets the enabled of this DebitFee. - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :param enabled: The enabled of this DebitFee. # noqa: E501 :type: bool diff --git a/gate_api/models/delivery_candlestick.py b/gate_api/models/delivery_candlestick.py index 672129f..83355ce 100644 --- a/gate_api/models/delivery_candlestick.py +++ b/gate_api/models/delivery_candlestick.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_co def t(self): """Gets the t of this DeliveryCandlestick. # noqa: E501 - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :return: The t of this DeliveryCandlestick. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def t(self): def t(self, t): """Sets the t of this DeliveryCandlestick. - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :param t: The t of this DeliveryCandlestick. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def t(self, t): def v(self): """Gets the v of this DeliveryCandlestick. # noqa: E501 - size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 :return: The v of this DeliveryCandlestick. # noqa: E501 :rtype: int @@ -116,7 +116,7 @@ def v(self): def v(self, v): """Sets the v of this DeliveryCandlestick. - size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 :param v: The v of this DeliveryCandlestick. # noqa: E501 :type: int @@ -128,7 +128,7 @@ def v(self, v): def c(self): """Gets the c of this DeliveryCandlestick. # noqa: E501 - Close price (quote currency). # noqa: E501 + Close price (quote currency) # noqa: E501 :return: The c of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def c(self): def c(self, c): """Sets the c of this DeliveryCandlestick. - Close price (quote currency). # noqa: E501 + Close price (quote currency) # noqa: E501 :param c: The c of this DeliveryCandlestick. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def c(self, c): def h(self): """Gets the h of this DeliveryCandlestick. # noqa: E501 - Highest price (quote currency). # noqa: E501 + Highest price (quote currency) # noqa: E501 :return: The h of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def h(self): def h(self, h): """Sets the h of this DeliveryCandlestick. - Highest price (quote currency). # noqa: E501 + Highest price (quote currency) # noqa: E501 :param h: The h of this DeliveryCandlestick. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def h(self, h): def l(self): """Gets the l of this DeliveryCandlestick. # noqa: E501 - Lowest price (quote currency). # noqa: E501 + Lowest price (quote currency) # noqa: E501 :return: The l of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def l(self): def l(self, l): """Sets the l of this DeliveryCandlestick. - Lowest price (quote currency). # noqa: E501 + Lowest price (quote currency) # noqa: E501 :param l: The l of this DeliveryCandlestick. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def l(self, l): def o(self): """Gets the o of this DeliveryCandlestick. # noqa: E501 - Open price (quote currency). # noqa: E501 + Open price (quote currency) # noqa: E501 :return: The o of this DeliveryCandlestick. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def o(self): def o(self, o): """Sets the o of this DeliveryCandlestick. - Open price (quote currency). # noqa: E501 + Open price (quote currency) # noqa: E501 :param o: The o of this DeliveryCandlestick. # noqa: E501 :type: str diff --git a/gate_api/models/delivery_contract.py b/gate_api/models/delivery_contract.py index b6fa44e..57b228c 100644 --- a/gate_api/models/delivery_contract.py +++ b/gate_api/models/delivery_contract.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -242,7 +242,7 @@ def __init__(self, name=None, underlying=None, cycle=None, type=None, quanto_mul def name(self): """Gets the name of this DeliveryContract. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The name of this DeliveryContract. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def name(self): def name(self, name): """Sets the name of this DeliveryContract. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param name: The name of this DeliveryContract. # noqa: E501 :type: str @@ -265,7 +265,7 @@ def name(self, name): def underlying(self): """Gets the underlying of this DeliveryContract. # noqa: E501 - Underlying. # noqa: E501 + Underlying # noqa: E501 :return: The underlying of this DeliveryContract. # noqa: E501 :rtype: str @@ -276,7 +276,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this DeliveryContract. - Underlying. # noqa: E501 + Underlying # noqa: E501 :param underlying: The underlying of this DeliveryContract. # noqa: E501 :type: str @@ -288,7 +288,7 @@ def underlying(self, underlying): def cycle(self): """Gets the cycle of this DeliveryContract. # noqa: E501 - Cycle type, e.g. WEEKLY, QUARTERLY. # noqa: E501 + Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 :return: The cycle of this DeliveryContract. # noqa: E501 :rtype: str @@ -299,7 +299,7 @@ def cycle(self): def cycle(self, cycle): """Sets the cycle of this DeliveryContract. - Cycle type, e.g. WEEKLY, QUARTERLY. # noqa: E501 + Cycle type, e.g. WEEKLY, QUARTERLY # noqa: E501 :param cycle: The cycle of this DeliveryContract. # noqa: E501 :type: str @@ -317,7 +317,7 @@ def cycle(self, cycle): def type(self): """Gets the type of this DeliveryContract. # noqa: E501 - Futures contract type. # noqa: E501 + Contract type: inverse - inverse contract, direct - direct contract # noqa: E501 :return: The type of this DeliveryContract. # noqa: E501 :rtype: str @@ -328,7 +328,7 @@ def type(self): def type(self, type): """Sets the type of this DeliveryContract. - Futures contract type. # noqa: E501 + Contract type: inverse - inverse contract, direct - direct contract # noqa: E501 :param type: The type of this DeliveryContract. # noqa: E501 :type: str @@ -346,7 +346,7 @@ def type(self, type): def quanto_multiplier(self): """Gets the quanto_multiplier of this DeliveryContract. # noqa: E501 - Multiplier used in converting from invoicing to settlement currency. # noqa: E501 + Multiplier used in converting from invoicing to settlement currency # noqa: E501 :return: The quanto_multiplier of this DeliveryContract. # noqa: E501 :rtype: str @@ -357,7 +357,7 @@ def quanto_multiplier(self): def quanto_multiplier(self, quanto_multiplier): """Sets the quanto_multiplier of this DeliveryContract. - Multiplier used in converting from invoicing to settlement currency. # noqa: E501 + Multiplier used in converting from invoicing to settlement currency # noqa: E501 :param quanto_multiplier: The quanto_multiplier of this DeliveryContract. # noqa: E501 :type: str @@ -369,7 +369,7 @@ def quanto_multiplier(self, quanto_multiplier): def leverage_min(self): """Gets the leverage_min of this DeliveryContract. # noqa: E501 - Minimum leverage. # noqa: E501 + Minimum leverage # noqa: E501 :return: The leverage_min of this DeliveryContract. # noqa: E501 :rtype: str @@ -380,7 +380,7 @@ def leverage_min(self): def leverage_min(self, leverage_min): """Sets the leverage_min of this DeliveryContract. - Minimum leverage. # noqa: E501 + Minimum leverage # noqa: E501 :param leverage_min: The leverage_min of this DeliveryContract. # noqa: E501 :type: str @@ -392,7 +392,7 @@ def leverage_min(self, leverage_min): def leverage_max(self): """Gets the leverage_max of this DeliveryContract. # noqa: E501 - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :return: The leverage_max of this DeliveryContract. # noqa: E501 :rtype: str @@ -403,7 +403,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this DeliveryContract. - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :param leverage_max: The leverage_max of this DeliveryContract. # noqa: E501 :type: str @@ -415,7 +415,7 @@ def leverage_max(self, leverage_max): def maintenance_rate(self): """Gets the maintenance_rate of this DeliveryContract. # noqa: E501 - Maintenance rate of margin. # noqa: E501 + Maintenance rate of margin # noqa: E501 :return: The maintenance_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -426,7 +426,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this DeliveryContract. - Maintenance rate of margin. # noqa: E501 + Maintenance rate of margin # noqa: E501 :param maintenance_rate: The maintenance_rate of this DeliveryContract. # noqa: E501 :type: str @@ -438,7 +438,7 @@ def maintenance_rate(self, maintenance_rate): def mark_type(self): """Gets the mark_type of this DeliveryContract. # noqa: E501 - Mark price type, internal - based on internal trading, external index price # noqa: E501 + Mark price type: internal - internal trading price, index - external index price # noqa: E501 :return: The mark_type of this DeliveryContract. # noqa: E501 :rtype: str @@ -449,7 +449,7 @@ def mark_type(self): def mark_type(self, mark_type): """Sets the mark_type of this DeliveryContract. - Mark price type, internal - based on internal trading, external index price # noqa: E501 + Mark price type: internal - internal trading price, index - external index price # noqa: E501 :param mark_type: The mark_type of this DeliveryContract. # noqa: E501 :type: str @@ -467,7 +467,7 @@ def mark_type(self, mark_type): def mark_price(self): """Gets the mark_price of this DeliveryContract. # noqa: E501 - Current mark price. # noqa: E501 + Current mark price # noqa: E501 :return: The mark_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -478,7 +478,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this DeliveryContract. - Current mark price. # noqa: E501 + Current mark price # noqa: E501 :param mark_price: The mark_price of this DeliveryContract. # noqa: E501 :type: str @@ -490,7 +490,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this DeliveryContract. # noqa: E501 - Current index price. # noqa: E501 + Current index price # noqa: E501 :return: The index_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -501,7 +501,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this DeliveryContract. - Current index price. # noqa: E501 + Current index price # noqa: E501 :param index_price: The index_price of this DeliveryContract. # noqa: E501 :type: str @@ -513,7 +513,7 @@ def index_price(self, index_price): def last_price(self): """Gets the last_price of this DeliveryContract. # noqa: E501 - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :return: The last_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -524,7 +524,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this DeliveryContract. - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :param last_price: The last_price of this DeliveryContract. # noqa: E501 :type: str @@ -536,7 +536,7 @@ def last_price(self, last_price): def maker_fee_rate(self): """Gets the maker_fee_rate of this DeliveryContract. # noqa: E501 - Maker fee rate, where negative means rebate. # noqa: E501 + Maker fee rate, negative values indicate rebates # noqa: E501 :return: The maker_fee_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -547,7 +547,7 @@ def maker_fee_rate(self): def maker_fee_rate(self, maker_fee_rate): """Sets the maker_fee_rate of this DeliveryContract. - Maker fee rate, where negative means rebate. # noqa: E501 + Maker fee rate, negative values indicate rebates # noqa: E501 :param maker_fee_rate: The maker_fee_rate of this DeliveryContract. # noqa: E501 :type: str @@ -559,7 +559,7 @@ def maker_fee_rate(self, maker_fee_rate): def taker_fee_rate(self): """Gets the taker_fee_rate of this DeliveryContract. # noqa: E501 - Taker fee rate. # noqa: E501 + Taker fee rate # noqa: E501 :return: The taker_fee_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -570,7 +570,7 @@ def taker_fee_rate(self): def taker_fee_rate(self, taker_fee_rate): """Sets the taker_fee_rate of this DeliveryContract. - Taker fee rate. # noqa: E501 + Taker fee rate # noqa: E501 :param taker_fee_rate: The taker_fee_rate of this DeliveryContract. # noqa: E501 :type: str @@ -582,7 +582,7 @@ def taker_fee_rate(self, taker_fee_rate): def order_price_round(self): """Gets the order_price_round of this DeliveryContract. # noqa: E501 - Minimum order price increment. # noqa: E501 + Minimum order price increment # noqa: E501 :return: The order_price_round of this DeliveryContract. # noqa: E501 :rtype: str @@ -593,7 +593,7 @@ def order_price_round(self): def order_price_round(self, order_price_round): """Sets the order_price_round of this DeliveryContract. - Minimum order price increment. # noqa: E501 + Minimum order price increment # noqa: E501 :param order_price_round: The order_price_round of this DeliveryContract. # noqa: E501 :type: str @@ -605,7 +605,7 @@ def order_price_round(self, order_price_round): def mark_price_round(self): """Gets the mark_price_round of this DeliveryContract. # noqa: E501 - Minimum mark price increment. # noqa: E501 + Minimum mark price increment # noqa: E501 :return: The mark_price_round of this DeliveryContract. # noqa: E501 :rtype: str @@ -616,7 +616,7 @@ def mark_price_round(self): def mark_price_round(self, mark_price_round): """Sets the mark_price_round of this DeliveryContract. - Minimum mark price increment. # noqa: E501 + Minimum mark price increment # noqa: E501 :param mark_price_round: The mark_price_round of this DeliveryContract. # noqa: E501 :type: str @@ -628,7 +628,7 @@ def mark_price_round(self, mark_price_round): def basis_rate(self): """Gets the basis_rate of this DeliveryContract. # noqa: E501 - Fair basis rate. # noqa: E501 + Fair basis rate # noqa: E501 :return: The basis_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -639,7 +639,7 @@ def basis_rate(self): def basis_rate(self, basis_rate): """Sets the basis_rate of this DeliveryContract. - Fair basis rate. # noqa: E501 + Fair basis rate # noqa: E501 :param basis_rate: The basis_rate of this DeliveryContract. # noqa: E501 :type: str @@ -651,7 +651,7 @@ def basis_rate(self, basis_rate): def basis_value(self): """Gets the basis_value of this DeliveryContract. # noqa: E501 - Fair basis value. # noqa: E501 + Fair basis value # noqa: E501 :return: The basis_value of this DeliveryContract. # noqa: E501 :rtype: str @@ -662,7 +662,7 @@ def basis_value(self): def basis_value(self, basis_value): """Sets the basis_value of this DeliveryContract. - Fair basis value. # noqa: E501 + Fair basis value # noqa: E501 :param basis_value: The basis_value of this DeliveryContract. # noqa: E501 :type: str @@ -674,7 +674,7 @@ def basis_value(self, basis_value): def basis_impact_value(self): """Gets the basis_impact_value of this DeliveryContract. # noqa: E501 - Funding used for calculating impact bid, ask price. # noqa: E501 + Funding used for calculating impact bid, ask price # noqa: E501 :return: The basis_impact_value of this DeliveryContract. # noqa: E501 :rtype: str @@ -685,7 +685,7 @@ def basis_impact_value(self): def basis_impact_value(self, basis_impact_value): """Sets the basis_impact_value of this DeliveryContract. - Funding used for calculating impact bid, ask price. # noqa: E501 + Funding used for calculating impact bid, ask price # noqa: E501 :param basis_impact_value: The basis_impact_value of this DeliveryContract. # noqa: E501 :type: str @@ -697,7 +697,7 @@ def basis_impact_value(self, basis_impact_value): def settle_price(self): """Gets the settle_price of this DeliveryContract. # noqa: E501 - Settle price. # noqa: E501 + Settle price # noqa: E501 :return: The settle_price of this DeliveryContract. # noqa: E501 :rtype: str @@ -708,7 +708,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this DeliveryContract. - Settle price. # noqa: E501 + Settle price # noqa: E501 :param settle_price: The settle_price of this DeliveryContract. # noqa: E501 :type: str @@ -720,7 +720,7 @@ def settle_price(self, settle_price): def settle_price_interval(self): """Gets the settle_price_interval of this DeliveryContract. # noqa: E501 - Settle price update interval. # noqa: E501 + Settle price update interval # noqa: E501 :return: The settle_price_interval of this DeliveryContract. # noqa: E501 :rtype: int @@ -731,7 +731,7 @@ def settle_price_interval(self): def settle_price_interval(self, settle_price_interval): """Sets the settle_price_interval of this DeliveryContract. - Settle price update interval. # noqa: E501 + Settle price update interval # noqa: E501 :param settle_price_interval: The settle_price_interval of this DeliveryContract. # noqa: E501 :type: int @@ -743,7 +743,7 @@ def settle_price_interval(self, settle_price_interval): def settle_price_duration(self): """Gets the settle_price_duration of this DeliveryContract. # noqa: E501 - Settle price update duration in seconds. # noqa: E501 + Settle price update duration in seconds # noqa: E501 :return: The settle_price_duration of this DeliveryContract. # noqa: E501 :rtype: int @@ -754,7 +754,7 @@ def settle_price_duration(self): def settle_price_duration(self, settle_price_duration): """Sets the settle_price_duration of this DeliveryContract. - Settle price update duration in seconds. # noqa: E501 + Settle price update duration in seconds # noqa: E501 :param settle_price_duration: The settle_price_duration of this DeliveryContract. # noqa: E501 :type: int @@ -766,7 +766,7 @@ def settle_price_duration(self, settle_price_duration): def expire_time(self): """Gets the expire_time of this DeliveryContract. # noqa: E501 - Contract expiry timestamp. # noqa: E501 + Contract expiry timestamp # noqa: E501 :return: The expire_time of this DeliveryContract. # noqa: E501 :rtype: int @@ -777,7 +777,7 @@ def expire_time(self): def expire_time(self, expire_time): """Sets the expire_time of this DeliveryContract. - Contract expiry timestamp. # noqa: E501 + Contract expiry timestamp # noqa: E501 :param expire_time: The expire_time of this DeliveryContract. # noqa: E501 :type: int @@ -789,7 +789,7 @@ def expire_time(self, expire_time): def risk_limit_base(self): """Gets the risk_limit_base of this DeliveryContract. # noqa: E501 - Risk limit base. # noqa: E501 + Risk limit base # noqa: E501 :return: The risk_limit_base of this DeliveryContract. # noqa: E501 :rtype: str @@ -800,7 +800,7 @@ def risk_limit_base(self): def risk_limit_base(self, risk_limit_base): """Sets the risk_limit_base of this DeliveryContract. - Risk limit base. # noqa: E501 + Risk limit base # noqa: E501 :param risk_limit_base: The risk_limit_base of this DeliveryContract. # noqa: E501 :type: str @@ -812,7 +812,7 @@ def risk_limit_base(self, risk_limit_base): def risk_limit_step(self): """Gets the risk_limit_step of this DeliveryContract. # noqa: E501 - Step of adjusting risk limit. # noqa: E501 + Step of adjusting risk limit # noqa: E501 :return: The risk_limit_step of this DeliveryContract. # noqa: E501 :rtype: str @@ -823,7 +823,7 @@ def risk_limit_step(self): def risk_limit_step(self, risk_limit_step): """Sets the risk_limit_step of this DeliveryContract. - Step of adjusting risk limit. # noqa: E501 + Step of adjusting risk limit # noqa: E501 :param risk_limit_step: The risk_limit_step of this DeliveryContract. # noqa: E501 :type: str @@ -835,7 +835,7 @@ def risk_limit_step(self, risk_limit_step): def risk_limit_max(self): """Gets the risk_limit_max of this DeliveryContract. # noqa: E501 - Maximum risk limit the contract allowed. # noqa: E501 + Maximum risk limit the contract allowed # noqa: E501 :return: The risk_limit_max of this DeliveryContract. # noqa: E501 :rtype: str @@ -846,7 +846,7 @@ def risk_limit_max(self): def risk_limit_max(self, risk_limit_max): """Sets the risk_limit_max of this DeliveryContract. - Maximum risk limit the contract allowed. # noqa: E501 + Maximum risk limit the contract allowed # noqa: E501 :param risk_limit_max: The risk_limit_max of this DeliveryContract. # noqa: E501 :type: str @@ -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 the contract allowed. # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :return: The order_size_min of this DeliveryContract. # noqa: E501 :rtype: int @@ -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 the contract allowed. # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :param order_size_min: The order_size_min of this DeliveryContract. # noqa: E501 :type: int @@ -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 the contract allowed. # noqa: E501 + Maximum order size allowed by the contract # noqa: E501 :return: The order_size_max of this DeliveryContract. # noqa: E501 :rtype: int @@ -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 the contract allowed. # noqa: E501 + Maximum order size allowed by the contract # noqa: E501 :param order_size_max: The order_size_max of this DeliveryContract. # noqa: E501 :type: int @@ -904,7 +904,7 @@ def order_size_max(self, order_size_max): def order_price_deviate(self): """Gets the order_price_deviate of this DeliveryContract. # noqa: E501 - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :return: The order_price_deviate of this DeliveryContract. # noqa: E501 :rtype: str @@ -915,7 +915,7 @@ def order_price_deviate(self): def order_price_deviate(self, order_price_deviate): """Sets the order_price_deviate of this DeliveryContract. - deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 + Maximum allowed deviation between order price and current mark price. The order price `order_price` must satisfy the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate # noqa: E501 :param order_price_deviate: The order_price_deviate of this DeliveryContract. # noqa: E501 :type: str @@ -927,7 +927,7 @@ def order_price_deviate(self, order_price_deviate): def ref_discount_rate(self): """Gets the ref_discount_rate of this DeliveryContract. # noqa: E501 - Referral fee rate discount. # noqa: E501 + Trading fee discount for referred users # noqa: E501 :return: The ref_discount_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -938,7 +938,7 @@ def ref_discount_rate(self): def ref_discount_rate(self, ref_discount_rate): """Sets the ref_discount_rate of this DeliveryContract. - Referral fee rate discount. # noqa: E501 + Trading fee discount for referred users # noqa: E501 :param ref_discount_rate: The ref_discount_rate of this DeliveryContract. # noqa: E501 :type: str @@ -950,7 +950,7 @@ def ref_discount_rate(self, ref_discount_rate): def ref_rebate_rate(self): """Gets the ref_rebate_rate of this DeliveryContract. # noqa: E501 - Referrer commission rate. # noqa: E501 + Commission rate for referrers # noqa: E501 :return: The ref_rebate_rate of this DeliveryContract. # noqa: E501 :rtype: str @@ -961,7 +961,7 @@ def ref_rebate_rate(self): def ref_rebate_rate(self, ref_rebate_rate): """Sets the ref_rebate_rate of this DeliveryContract. - Referrer commission rate. # noqa: E501 + Commission rate for referrers # noqa: E501 :param ref_rebate_rate: The ref_rebate_rate of this DeliveryContract. # noqa: E501 :type: str @@ -973,7 +973,7 @@ def ref_rebate_rate(self, ref_rebate_rate): def orderbook_id(self): """Gets the orderbook_id of this DeliveryContract. # noqa: E501 - Current orderbook ID. # noqa: E501 + Orderbook update ID # noqa: E501 :return: The orderbook_id of this DeliveryContract. # noqa: E501 :rtype: int @@ -984,7 +984,7 @@ def orderbook_id(self): def orderbook_id(self, orderbook_id): """Sets the orderbook_id of this DeliveryContract. - Current orderbook ID. # noqa: E501 + Orderbook update ID # noqa: E501 :param orderbook_id: The orderbook_id of this DeliveryContract. # noqa: E501 :type: int @@ -996,7 +996,7 @@ def orderbook_id(self, orderbook_id): def trade_id(self): """Gets the trade_id of this DeliveryContract. # noqa: E501 - Current trade ID. # noqa: E501 + Current trade ID # noqa: E501 :return: The trade_id of this DeliveryContract. # noqa: E501 :rtype: int @@ -1007,7 +1007,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this DeliveryContract. - Current trade ID. # noqa: E501 + Current trade ID # noqa: E501 :param trade_id: The trade_id of this DeliveryContract. # noqa: E501 :type: int @@ -1019,7 +1019,7 @@ def trade_id(self, trade_id): def trade_size(self): """Gets the trade_size of this DeliveryContract. # noqa: E501 - Historical accumulated trade size. # noqa: E501 + Historical cumulative trading volume # noqa: E501 :return: The trade_size of this DeliveryContract. # noqa: E501 :rtype: int @@ -1030,7 +1030,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this DeliveryContract. - Historical accumulated trade size. # noqa: E501 + Historical cumulative trading volume # noqa: E501 :param trade_size: The trade_size of this DeliveryContract. # noqa: E501 :type: int @@ -1042,7 +1042,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this DeliveryContract. # noqa: E501 - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :return: The position_size of this DeliveryContract. # noqa: E501 :rtype: int @@ -1053,7 +1053,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this DeliveryContract. - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :param position_size: The position_size of this DeliveryContract. # noqa: E501 :type: int @@ -1065,7 +1065,7 @@ def position_size(self, position_size): def config_change_time(self): """Gets the config_change_time of this DeliveryContract. # noqa: E501 - Last changed time of configuration. # noqa: E501 + Last configuration update time # noqa: E501 :return: The config_change_time of this DeliveryContract. # noqa: E501 :rtype: float @@ -1076,7 +1076,7 @@ def config_change_time(self): def config_change_time(self, config_change_time): """Sets the config_change_time of this DeliveryContract. - Last changed time of configuration. # noqa: E501 + Last configuration update time # noqa: E501 :param config_change_time: The config_change_time of this DeliveryContract. # noqa: E501 :type: float @@ -1088,7 +1088,7 @@ def config_change_time(self, config_change_time): def in_delisting(self): """Gets the in_delisting of this DeliveryContract. # noqa: E501 - Contract is delisting. # noqa: E501 + Contract is delisting # noqa: E501 :return: The in_delisting of this DeliveryContract. # noqa: E501 :rtype: bool @@ -1099,7 +1099,7 @@ def in_delisting(self): def in_delisting(self, in_delisting): """Sets the in_delisting of this DeliveryContract. - Contract is delisting. # noqa: E501 + Contract is delisting # noqa: E501 :param in_delisting: The in_delisting of this DeliveryContract. # noqa: E501 :type: bool @@ -1111,7 +1111,7 @@ def in_delisting(self, in_delisting): def orders_limit(self): """Gets the orders_limit of this DeliveryContract. # noqa: E501 - Maximum number of open orders. # noqa: E501 + Maximum number of pending orders # noqa: E501 :return: The orders_limit of this DeliveryContract. # noqa: E501 :rtype: int @@ -1122,7 +1122,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this DeliveryContract. - Maximum number of open orders. # noqa: E501 + Maximum number of pending orders # noqa: E501 :param orders_limit: The orders_limit of this DeliveryContract. # noqa: E501 :type: int diff --git a/gate_api/models/delivery_settlement.py b/gate_api/models/delivery_settlement.py index a75acae..1985a9b 100644 --- a/gate_api/models/delivery_settlement.py +++ b/gate_api/models/delivery_settlement.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -97,7 +97,7 @@ def __init__(self, time=None, contract=None, leverage=None, size=None, margin=No def time(self): """Gets the time of this DeliverySettlement. # noqa: E501 - Liquidation time. # noqa: E501 + Liquidation time # noqa: E501 :return: The time of this DeliverySettlement. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def time(self): def time(self, time): """Sets the time of this DeliverySettlement. - Liquidation time. # noqa: E501 + Liquidation time # noqa: E501 :param time: The time of this DeliverySettlement. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def time(self, time): def contract(self): """Gets the contract of this DeliverySettlement. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this DeliverySettlement. # noqa: E501 :rtype: str @@ -131,7 +131,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this DeliverySettlement. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this DeliverySettlement. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def contract(self, contract): def leverage(self): """Gets the leverage of this DeliverySettlement. # noqa: E501 - Position leverage. # noqa: E501 + Position leverage # 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 + Position leverage # noqa: E501 :param leverage: The leverage of this DeliverySettlement. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def leverage(self, leverage): def size(self): """Gets the size of this DeliverySettlement. # noqa: E501 - Position size. # noqa: E501 + Position size # noqa: E501 :return: The size of this DeliverySettlement. # noqa: E501 :rtype: int @@ -177,7 +177,7 @@ def size(self): def size(self, size): """Sets the size of this DeliverySettlement. - Position size. # noqa: E501 + Position size # noqa: E501 :param size: The size of this DeliverySettlement. # noqa: E501 :type: int @@ -189,7 +189,7 @@ def size(self, size): def margin(self): """Gets the margin of this DeliverySettlement. # noqa: E501 - Position margin. # noqa: E501 + Position 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 + Position margin # noqa: E501 :param margin: The margin of this DeliverySettlement. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def margin(self, margin): def entry_price(self): """Gets the entry_price of this DeliverySettlement. # noqa: E501 - Average entry price. # noqa: E501 + Average entry price # noqa: E501 :return: The entry_price of this DeliverySettlement. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this DeliverySettlement. - Average entry price. # noqa: E501 + Average entry price # noqa: E501 :param entry_price: The entry_price of this DeliverySettlement. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def entry_price(self, entry_price): def settle_price(self): """Gets the settle_price of this DeliverySettlement. # noqa: E501 - Settled price. # noqa: E501 + Settled price # noqa: E501 :return: The settle_price of this DeliverySettlement. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this DeliverySettlement. - Settled price. # noqa: E501 + Settled price # noqa: E501 :param settle_price: The settle_price of this DeliverySettlement. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def settle_price(self, settle_price): def profit(self): """Gets the profit of this DeliverySettlement. # noqa: E501 - Profit. # noqa: E501 + Profit # noqa: E501 :return: The profit of this DeliverySettlement. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def profit(self): def profit(self, profit): """Sets the profit of this DeliverySettlement. - Profit. # noqa: E501 + Profit # noqa: E501 :param profit: The profit of this DeliverySettlement. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def profit(self, profit): def fee(self): """Gets the fee of this DeliverySettlement. # noqa: E501 - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :return: The fee of this DeliverySettlement. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this DeliverySettlement. - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :param fee: The fee of this DeliverySettlement. # noqa: E501 :type: str diff --git a/gate_api/models/delivery_ticker.py b/gate_api/models/delivery_ticker.py index a7692f6..9cf1203 100644 --- a/gate_api/models/delivery_ticker.py +++ b/gate_api/models/delivery_ticker.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -167,7 +167,7 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= def contract(self): """Gets the contract of this DeliveryTicker. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this DeliveryTicker. # noqa: E501 :rtype: str @@ -178,7 +178,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this DeliveryTicker. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this DeliveryTicker. # noqa: E501 :type: str @@ -190,7 +190,7 @@ def contract(self, contract): def last(self): """Gets the last of this DeliveryTicker. # noqa: E501 - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :return: The last of this DeliveryTicker. # noqa: E501 :rtype: str @@ -201,7 +201,7 @@ def last(self): def last(self, last): """Sets the last of this DeliveryTicker. - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :param last: The last of this DeliveryTicker. # noqa: E501 :type: str @@ -213,7 +213,7 @@ def last(self, last): def change_percentage(self): """Gets the change_percentage of this DeliveryTicker. # noqa: E501 - Change percentage. # noqa: E501 + Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501 :return: The change_percentage of this DeliveryTicker. # noqa: E501 :rtype: str @@ -224,7 +224,7 @@ def change_percentage(self): def change_percentage(self, change_percentage): """Sets the change_percentage of this DeliveryTicker. - Change percentage. # noqa: E501 + Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501 :param change_percentage: The change_percentage of this DeliveryTicker. # noqa: E501 :type: str @@ -236,7 +236,7 @@ def change_percentage(self, change_percentage): def total_size(self): """Gets the total_size of this DeliveryTicker. # noqa: E501 - Contract total size. # noqa: E501 + Contract total size # noqa: E501 :return: The total_size of this DeliveryTicker. # noqa: E501 :rtype: str @@ -247,7 +247,7 @@ def total_size(self): def total_size(self, total_size): """Sets the total_size of this DeliveryTicker. - Contract total size. # noqa: E501 + Contract total size # noqa: E501 :param total_size: The total_size of this DeliveryTicker. # noqa: E501 :type: str @@ -259,7 +259,7 @@ def total_size(self, total_size): def low_24h(self): """Gets the low_24h of this DeliveryTicker. # noqa: E501 - Lowest trading price in recent 24h. # noqa: E501 + 24-hour lowest price # noqa: E501 :return: The low_24h of this DeliveryTicker. # noqa: E501 :rtype: str @@ -270,7 +270,7 @@ def low_24h(self): def low_24h(self, low_24h): """Sets the low_24h of this DeliveryTicker. - Lowest trading price in recent 24h. # noqa: E501 + 24-hour lowest price # noqa: E501 :param low_24h: The low_24h of this DeliveryTicker. # noqa: E501 :type: str @@ -282,7 +282,7 @@ def low_24h(self, low_24h): def high_24h(self): """Gets the high_24h of this DeliveryTicker. # noqa: E501 - Highest trading price in recent 24h. # noqa: E501 + 24-hour highest price # noqa: E501 :return: The high_24h of this DeliveryTicker. # noqa: E501 :rtype: str @@ -293,7 +293,7 @@ def high_24h(self): def high_24h(self, high_24h): """Sets the high_24h of this DeliveryTicker. - Highest trading price in recent 24h. # noqa: E501 + 24-hour highest price # noqa: E501 :param high_24h: The high_24h of this DeliveryTicker. # noqa: E501 :type: str @@ -305,7 +305,7 @@ def high_24h(self, high_24h): def volume_24h(self): """Gets the volume_24h of this DeliveryTicker. # noqa: E501 - Trade size in recent 24h. # noqa: E501 + 24-hour trading volume # noqa: E501 :return: The volume_24h of this DeliveryTicker. # noqa: E501 :rtype: str @@ -316,7 +316,7 @@ def volume_24h(self): def volume_24h(self, volume_24h): """Sets the volume_24h of this DeliveryTicker. - Trade size in recent 24h. # noqa: E501 + 24-hour trading volume # noqa: E501 :param volume_24h: The volume_24h of this DeliveryTicker. # noqa: E501 :type: str @@ -328,7 +328,7 @@ def volume_24h(self, volume_24h): def volume_24h_btc(self): """Gets the volume_24h_btc of this DeliveryTicker. # noqa: E501 - Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :return: The volume_24h_btc of this DeliveryTicker. # noqa: E501 :rtype: str @@ -339,7 +339,7 @@ def volume_24h_btc(self): def volume_24h_btc(self, volume_24h_btc): """Sets the volume_24h_btc of this DeliveryTicker. - Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :param volume_24h_btc: The volume_24h_btc of this DeliveryTicker. # noqa: E501 :type: str @@ -351,7 +351,7 @@ def volume_24h_btc(self, volume_24h_btc): def volume_24h_usd(self): """Gets the volume_24h_usd of this DeliveryTicker. # noqa: E501 - Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :return: The volume_24h_usd of this DeliveryTicker. # noqa: E501 :rtype: str @@ -362,7 +362,7 @@ def volume_24h_usd(self): def volume_24h_usd(self, volume_24h_usd): """Sets the volume_24h_usd of this DeliveryTicker. - Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :param volume_24h_usd: The volume_24h_usd of this DeliveryTicker. # noqa: E501 :type: str @@ -374,7 +374,7 @@ def volume_24h_usd(self, volume_24h_usd): def volume_24h_base(self): """Gets the volume_24h_base of this DeliveryTicker. # noqa: E501 - Trade volume in recent 24h, in base currency. # noqa: E501 + 24-hour trading volume in base currency # noqa: E501 :return: The volume_24h_base of this DeliveryTicker. # noqa: E501 :rtype: str @@ -385,7 +385,7 @@ def volume_24h_base(self): def volume_24h_base(self, volume_24h_base): """Sets the volume_24h_base of this DeliveryTicker. - Trade volume in recent 24h, in base currency. # noqa: E501 + 24-hour trading volume in base currency # noqa: E501 :param volume_24h_base: The volume_24h_base of this DeliveryTicker. # noqa: E501 :type: str @@ -397,7 +397,7 @@ def volume_24h_base(self, volume_24h_base): def volume_24h_quote(self): """Gets the volume_24h_quote of this DeliveryTicker. # noqa: E501 - Trade volume in recent 24h, in quote currency. # noqa: E501 + 24-hour trading volume in quote currency # noqa: E501 :return: The volume_24h_quote of this DeliveryTicker. # noqa: E501 :rtype: str @@ -408,7 +408,7 @@ def volume_24h_quote(self): def volume_24h_quote(self, volume_24h_quote): """Sets the volume_24h_quote of this DeliveryTicker. - Trade volume in recent 24h, in quote currency. # noqa: E501 + 24-hour trading volume in quote currency # noqa: E501 :param volume_24h_quote: The volume_24h_quote of this DeliveryTicker. # noqa: E501 :type: str @@ -420,7 +420,7 @@ def volume_24h_quote(self, volume_24h_quote): def volume_24h_settle(self): """Gets the volume_24h_settle of this DeliveryTicker. # noqa: E501 - Trade volume in recent 24h, in settle currency. # noqa: E501 + 24-hour trading volume in settle currency # noqa: E501 :return: The volume_24h_settle of this DeliveryTicker. # noqa: E501 :rtype: str @@ -431,7 +431,7 @@ def volume_24h_settle(self): def volume_24h_settle(self, volume_24h_settle): """Sets the volume_24h_settle of this DeliveryTicker. - Trade volume in recent 24h, in settle currency. # noqa: E501 + 24-hour trading volume in settle currency # noqa: E501 :param volume_24h_settle: The volume_24h_settle of this DeliveryTicker. # noqa: E501 :type: str @@ -443,7 +443,7 @@ def volume_24h_settle(self, volume_24h_settle): def mark_price(self): """Gets the mark_price of this DeliveryTicker. # noqa: E501 - Recent mark price. # noqa: E501 + Recent mark price # noqa: E501 :return: The mark_price of this DeliveryTicker. # noqa: E501 :rtype: str @@ -454,7 +454,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this DeliveryTicker. - Recent mark price. # noqa: E501 + Recent mark price # noqa: E501 :param mark_price: The mark_price of this DeliveryTicker. # noqa: E501 :type: str @@ -466,7 +466,7 @@ def mark_price(self, mark_price): def funding_rate(self): """Gets the funding_rate of this DeliveryTicker. # noqa: E501 - Funding rate. # noqa: E501 + Funding rate # noqa: E501 :return: The funding_rate of this DeliveryTicker. # noqa: E501 :rtype: str @@ -477,7 +477,7 @@ def funding_rate(self): def funding_rate(self, funding_rate): """Sets the funding_rate of this DeliveryTicker. - Funding rate. # noqa: E501 + Funding rate # noqa: E501 :param funding_rate: The funding_rate of this DeliveryTicker. # noqa: E501 :type: str @@ -489,7 +489,7 @@ def funding_rate(self, funding_rate): def funding_rate_indicative(self): """Gets the funding_rate_indicative of this DeliveryTicker. # noqa: E501 - Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 :return: The funding_rate_indicative of this DeliveryTicker. # noqa: E501 :rtype: str @@ -500,7 +500,7 @@ def funding_rate_indicative(self): def funding_rate_indicative(self, funding_rate_indicative): """Sets the funding_rate_indicative of this DeliveryTicker. - Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 :param funding_rate_indicative: The funding_rate_indicative of this DeliveryTicker. # noqa: E501 :type: str @@ -512,7 +512,7 @@ def funding_rate_indicative(self, funding_rate_indicative): def index_price(self): """Gets the index_price of this DeliveryTicker. # noqa: E501 - Index price. # noqa: E501 + Index price # noqa: E501 :return: The index_price of this DeliveryTicker. # noqa: E501 :rtype: str @@ -523,7 +523,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this DeliveryTicker. - Index price. # noqa: E501 + Index price # noqa: E501 :param index_price: The index_price of this DeliveryTicker. # noqa: E501 :type: str @@ -558,7 +558,7 @@ def quanto_base_rate(self, quanto_base_rate): def basis_rate(self): """Gets the basis_rate of this DeliveryTicker. # noqa: E501 - Basis rate. # noqa: E501 + Basis rate # noqa: E501 :return: The basis_rate of this DeliveryTicker. # noqa: E501 :rtype: str @@ -569,7 +569,7 @@ def basis_rate(self): def basis_rate(self, basis_rate): """Sets the basis_rate of this DeliveryTicker. - Basis rate. # noqa: E501 + Basis rate # noqa: E501 :param basis_rate: The basis_rate of this DeliveryTicker. # noqa: E501 :type: str @@ -581,7 +581,7 @@ def basis_rate(self, basis_rate): def basis_value(self): """Gets the basis_value of this DeliveryTicker. # noqa: E501 - Basis value. # noqa: E501 + Basis value # noqa: E501 :return: The basis_value of this DeliveryTicker. # noqa: E501 :rtype: str @@ -592,7 +592,7 @@ def basis_value(self): def basis_value(self, basis_value): """Sets the basis_value of this DeliveryTicker. - Basis value. # noqa: E501 + Basis value # noqa: E501 :param basis_value: The basis_value of this DeliveryTicker. # noqa: E501 :type: str @@ -604,7 +604,7 @@ def basis_value(self, basis_value): def lowest_ask(self): """Gets the lowest_ask of this DeliveryTicker. # noqa: E501 - Recent lowest ask. # noqa: E501 + Recent lowest ask # noqa: E501 :return: The lowest_ask of this DeliveryTicker. # noqa: E501 :rtype: str @@ -615,7 +615,7 @@ def lowest_ask(self): def lowest_ask(self, lowest_ask): """Sets the lowest_ask of this DeliveryTicker. - Recent lowest ask. # noqa: E501 + Recent lowest ask # noqa: E501 :param lowest_ask: The lowest_ask of this DeliveryTicker. # noqa: E501 :type: str @@ -627,7 +627,7 @@ def lowest_ask(self, lowest_ask): def lowest_size(self): """Gets the lowest_size of this DeliveryTicker. # noqa: E501 - The latest seller's lowest price order quantity. # noqa: E501 + The latest seller's lowest price order quantity # noqa: E501 :return: The lowest_size of this DeliveryTicker. # noqa: E501 :rtype: str @@ -638,7 +638,7 @@ def lowest_size(self): def lowest_size(self, lowest_size): """Sets the lowest_size of this DeliveryTicker. - The latest seller's lowest price order quantity. # noqa: E501 + The latest seller's lowest price order quantity # noqa: E501 :param lowest_size: The lowest_size of this DeliveryTicker. # noqa: E501 :type: str @@ -650,7 +650,7 @@ def lowest_size(self, lowest_size): def highest_bid(self): """Gets the highest_bid of this DeliveryTicker. # noqa: E501 - Recent highest bid. # noqa: E501 + Recent highest bid # noqa: E501 :return: The highest_bid of this DeliveryTicker. # noqa: E501 :rtype: str @@ -661,7 +661,7 @@ def highest_bid(self): def highest_bid(self, highest_bid): """Sets the highest_bid of this DeliveryTicker. - Recent highest bid. # noqa: E501 + Recent highest bid # noqa: E501 :param highest_bid: The highest_bid of this DeliveryTicker. # noqa: E501 :type: str @@ -673,7 +673,7 @@ def highest_bid(self, highest_bid): def highest_size(self): """Gets the highest_size of this DeliveryTicker. # noqa: E501 - The latest buyer's highest price order volume. # noqa: E501 + The latest buyer's highest price order volume # noqa: E501 :return: The highest_size of this DeliveryTicker. # noqa: E501 :rtype: str @@ -684,7 +684,7 @@ def highest_size(self): def highest_size(self, highest_size): """Sets the highest_size of this DeliveryTicker. - The latest buyer's highest price order volume. # noqa: E501 + The latest buyer's highest price order volume # noqa: E501 :param highest_size: The highest_size of this DeliveryTicker. # noqa: E501 :type: str diff --git a/gate_api/models/deposit_address.py b/gate_api/models/deposit_address.py index e957503..01a55df 100644 --- a/gate_api/models/deposit_address.py +++ b/gate_api/models/deposit_address.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -65,7 +65,7 @@ def __init__(self, currency=None, address=None, multichain_addresses=None, local def currency(self): """Gets the currency of this DepositAddress. # noqa: E501 - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :return: The currency of this DepositAddress. # noqa: E501 :rtype: str @@ -76,7 +76,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this DepositAddress. - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :param currency: The currency of this DepositAddress. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def address(self): """Gets the address of this DepositAddress. # noqa: E501 - Deposit address. # noqa: E501 + Deposit address # noqa: E501 :return: The address of this DepositAddress. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def address(self): def address(self, address): """Sets the address of this DepositAddress. - Deposit address. # noqa: E501 + Deposit address # noqa: E501 :param address: The address of this DepositAddress. # noqa: E501 :type: str diff --git a/gate_api/models/deposit_record.py b/gate_api/models/deposit_record.py index 814e143..509aa32 100644 --- a/gate_api/models/deposit_record.py +++ b/gate_api/models/deposit_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -99,7 +99,7 @@ def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, a def id(self): """Gets the id of this DepositRecord. # noqa: E501 - Record ID. # noqa: E501 + Record ID # noqa: E501 :return: The id of this DepositRecord. # noqa: E501 :rtype: str @@ -110,7 +110,7 @@ def id(self): def id(self, id): """Sets the id of this DepositRecord. - Record ID. # noqa: E501 + Record ID # noqa: E501 :param id: The id of this DepositRecord. # noqa: E501 :type: str @@ -122,7 +122,7 @@ def id(self, id): def txid(self): """Gets the txid of this DepositRecord. # noqa: E501 - Hash record of the withdrawal. # noqa: E501 + Hash record of the withdrawal # noqa: E501 :return: The txid of this DepositRecord. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def txid(self): def txid(self, txid): """Sets the txid of this DepositRecord. - Hash record of the withdrawal. # noqa: E501 + Hash record of the withdrawal # noqa: E501 :param txid: The txid of this DepositRecord. # noqa: E501 :type: str @@ -168,7 +168,7 @@ def withdraw_order_id(self, withdraw_order_id): def timestamp(self): """Gets the timestamp of this DepositRecord. # noqa: E501 - Operation time. # noqa: E501 + Operation time # noqa: E501 :return: The timestamp of this DepositRecord. # noqa: E501 :rtype: str @@ -179,7 +179,7 @@ def timestamp(self): def timestamp(self, timestamp): """Sets the timestamp of this DepositRecord. - Operation time. # noqa: E501 + Operation time # noqa: E501 :param timestamp: The timestamp of this DepositRecord. # noqa: E501 :type: str @@ -191,7 +191,7 @@ def timestamp(self, timestamp): def amount(self): """Gets the amount of this DepositRecord. # noqa: E501 - Currency amount. # noqa: E501 + Token amount # noqa: E501 :return: The amount of this DepositRecord. # noqa: E501 :rtype: str @@ -202,7 +202,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this DepositRecord. - Currency amount. # noqa: E501 + Token amount # noqa: E501 :param amount: The amount of this DepositRecord. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def amount(self, amount): def currency(self): """Gets the currency of this DepositRecord. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this DepositRecord. # noqa: E501 :rtype: str @@ -227,7 +227,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this DepositRecord. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this DepositRecord. # noqa: E501 :type: str @@ -241,7 +241,7 @@ def currency(self, currency): def address(self): """Gets the address of this DepositRecord. # noqa: E501 - Withdrawal address. Required for withdrawals. # noqa: E501 + Withdrawal address. Required for withdrawals # noqa: E501 :return: The address of this DepositRecord. # noqa: E501 :rtype: str @@ -252,7 +252,7 @@ def address(self): def address(self, address): """Sets the address of this DepositRecord. - Withdrawal address. Required for withdrawals. # noqa: E501 + Withdrawal address. Required for withdrawals # noqa: E501 :param address: The address of this DepositRecord. # noqa: E501 :type: str @@ -264,7 +264,7 @@ def address(self, address): def memo(self): """Gets the memo of this DepositRecord. # noqa: E501 - Additional remarks with regards to the withdrawal. # noqa: E501 + Additional remarks with regards to the withdrawal # noqa: E501 :return: The memo of this DepositRecord. # noqa: E501 :rtype: str @@ -275,7 +275,7 @@ def memo(self): def memo(self, memo): """Sets the memo of this DepositRecord. - Additional remarks with regards to the withdrawal. # noqa: E501 + Additional remarks with regards to the withdrawal # noqa: E501 :param memo: The memo of this DepositRecord. # noqa: E501 :type: str @@ -310,7 +310,7 @@ def status(self, status): def chain(self): """Gets the chain of this DepositRecord. # noqa: E501 - Name of the chain used in withdrawals. # noqa: E501 + Name of the chain used in withdrawals # noqa: E501 :return: The chain of this DepositRecord. # noqa: E501 :rtype: str @@ -321,7 +321,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this DepositRecord. - Name of the chain used in withdrawals. # noqa: E501 + Name of the chain used in withdrawals # noqa: E501 :param chain: The chain of this DepositRecord. # noqa: E501 :type: str diff --git a/gate_api/models/dual_get_orders.py b/gate_api/models/dual_get_orders.py index 40312d5..3734353 100644 --- a/gate_api/models/dual_get_orders.py +++ b/gate_api/models/dual_get_orders.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -137,7 +137,7 @@ def __init__(self, id=None, plan_id=None, copies=None, invest_amount=None, settl def id(self): """Gets the id of this DualGetOrders. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this DualGetOrders. # noqa: E501 :rtype: int @@ -148,7 +148,7 @@ def id(self): def id(self, id): """Sets the id of this DualGetOrders. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this DualGetOrders. # noqa: E501 :type: int @@ -160,7 +160,7 @@ def id(self, id): def plan_id(self): """Gets the plan_id of this DualGetOrders. # noqa: E501 - Plan ID. # noqa: E501 + Product ID # noqa: E501 :return: The plan_id of this DualGetOrders. # noqa: E501 :rtype: int @@ -171,7 +171,7 @@ def plan_id(self): def plan_id(self, plan_id): """Sets the plan_id of this DualGetOrders. - Plan ID. # noqa: E501 + Product ID # noqa: E501 :param plan_id: The plan_id of this DualGetOrders. # noqa: E501 :type: int @@ -183,7 +183,7 @@ def plan_id(self, plan_id): def copies(self): """Gets the copies of this DualGetOrders. # noqa: E501 - Copies. # noqa: E501 + Units # noqa: E501 :return: The copies of this DualGetOrders. # noqa: E501 :rtype: str @@ -194,7 +194,7 @@ def copies(self): def copies(self, copies): """Sets the copies of this DualGetOrders. - Copies. # noqa: E501 + Units # noqa: E501 :param copies: The copies of this DualGetOrders. # noqa: E501 :type: str @@ -206,7 +206,7 @@ def copies(self, copies): def invest_amount(self): """Gets the invest_amount of this DualGetOrders. # noqa: E501 - Investment Amount. # noqa: E501 + Investment Quantity # noqa: E501 :return: The invest_amount of this DualGetOrders. # noqa: E501 :rtype: str @@ -217,7 +217,7 @@ def invest_amount(self): def invest_amount(self, invest_amount): """Sets the invest_amount of this DualGetOrders. - Investment Amount. # noqa: E501 + Investment Quantity # noqa: E501 :param invest_amount: The invest_amount of this DualGetOrders. # noqa: E501 :type: str @@ -229,7 +229,7 @@ def invest_amount(self, invest_amount): def settlement_amount(self): """Gets the settlement_amount of this DualGetOrders. # noqa: E501 - Settlement Amount. # noqa: E501 + Settlement Quantity # noqa: E501 :return: The settlement_amount of this DualGetOrders. # noqa: E501 :rtype: str @@ -240,7 +240,7 @@ def settlement_amount(self): def settlement_amount(self, settlement_amount): """Sets the settlement_amount of this DualGetOrders. - Settlement Amount. # noqa: E501 + Settlement Quantity # noqa: E501 :param settlement_amount: The settlement_amount of this DualGetOrders. # noqa: E501 :type: str @@ -252,7 +252,7 @@ def settlement_amount(self, settlement_amount): def create_time(self): """Gets the create_time of this DualGetOrders. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this DualGetOrders. # noqa: E501 :rtype: int @@ -263,7 +263,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this DualGetOrders. - Creation time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this DualGetOrders. # noqa: E501 :type: int @@ -275,7 +275,7 @@ def create_time(self, create_time): def complete_time(self): """Gets the complete_time of this DualGetOrders. # noqa: E501 - Completion Time. # noqa: E501 + Completed Time # noqa: E501 :return: The complete_time of this DualGetOrders. # noqa: E501 :rtype: int @@ -286,7 +286,7 @@ def complete_time(self): def complete_time(self, complete_time): """Sets the complete_time of this DualGetOrders. - Completion Time. # noqa: E501 + Completed Time # noqa: E501 :param complete_time: The complete_time of this DualGetOrders. # noqa: E501 :type: int @@ -298,7 +298,7 @@ def complete_time(self, complete_time): def status(self): """Gets the status of this DualGetOrders. # noqa: E501 - Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 + Status: `INIT`-Created `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-Settlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 :return: The status of this DualGetOrders. # noqa: E501 :rtype: str @@ -309,7 +309,7 @@ def status(self): def status(self, status): """Sets the status of this DualGetOrders. - Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 + Status: `INIT`-Created `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-Settlement Processing `CANCELED`-Canceled `FAILED`-Failed # noqa: E501 :param status: The status of this DualGetOrders. # noqa: E501 :type: str @@ -321,7 +321,7 @@ def status(self, status): def invest_currency(self): """Gets the invest_currency of this DualGetOrders. # noqa: E501 - Investment Currency. # noqa: E501 + Investment Token # noqa: E501 :return: The invest_currency of this DualGetOrders. # noqa: E501 :rtype: str @@ -332,7 +332,7 @@ def invest_currency(self): def invest_currency(self, invest_currency): """Sets the invest_currency of this DualGetOrders. - Investment Currency. # noqa: E501 + Investment Token # noqa: E501 :param invest_currency: The invest_currency of this DualGetOrders. # noqa: E501 :type: str @@ -344,7 +344,7 @@ def invest_currency(self, invest_currency): def exercise_currency(self): """Gets the exercise_currency of this DualGetOrders. # noqa: E501 - Strike Currency. # noqa: E501 + Strike Token # noqa: E501 :return: The exercise_currency of this DualGetOrders. # noqa: E501 :rtype: str @@ -355,7 +355,7 @@ def exercise_currency(self): def exercise_currency(self, exercise_currency): """Sets the exercise_currency of this DualGetOrders. - Strike Currency. # noqa: E501 + Strike Token # noqa: E501 :param exercise_currency: The exercise_currency of this DualGetOrders. # noqa: E501 :type: str @@ -367,7 +367,7 @@ def exercise_currency(self, exercise_currency): def exercise_price(self): """Gets the exercise_price of this DualGetOrders. # noqa: E501 - Strike price. # noqa: E501 + Strike price # noqa: E501 :return: The exercise_price of this DualGetOrders. # noqa: E501 :rtype: str @@ -378,7 +378,7 @@ def exercise_price(self): def exercise_price(self, exercise_price): """Sets the exercise_price of this DualGetOrders. - Strike price. # noqa: E501 + Strike price # noqa: E501 :param exercise_price: The exercise_price of this DualGetOrders. # noqa: E501 :type: str @@ -390,7 +390,7 @@ def exercise_price(self, exercise_price): def settlement_price(self): """Gets the settlement_price of this DualGetOrders. # noqa: E501 - settlement price. # noqa: E501 + Settlement price # noqa: E501 :return: The settlement_price of this DualGetOrders. # noqa: E501 :rtype: str @@ -401,7 +401,7 @@ def settlement_price(self): def settlement_price(self, settlement_price): """Sets the settlement_price of this DualGetOrders. - settlement price. # noqa: E501 + Settlement price # noqa: E501 :param settlement_price: The settlement_price of this DualGetOrders. # noqa: E501 :type: str @@ -413,7 +413,7 @@ def settlement_price(self, settlement_price): def settlement_currency(self): """Gets the settlement_currency of this DualGetOrders. # noqa: E501 - Settle currency. # noqa: E501 + Settlement currency # noqa: E501 :return: The settlement_currency of this DualGetOrders. # noqa: E501 :rtype: str @@ -424,7 +424,7 @@ def settlement_currency(self): def settlement_currency(self, settlement_currency): """Sets the settlement_currency of this DualGetOrders. - Settle currency. # noqa: E501 + Settlement currency # noqa: E501 :param settlement_currency: The settlement_currency of this DualGetOrders. # noqa: E501 :type: str @@ -436,7 +436,7 @@ def settlement_currency(self, settlement_currency): def apy_display(self): """Gets the apy_display of this DualGetOrders. # noqa: E501 - APY. # noqa: E501 + Annual Yield # noqa: E501 :return: The apy_display of this DualGetOrders. # noqa: E501 :rtype: str @@ -447,7 +447,7 @@ def apy_display(self): def apy_display(self, apy_display): """Sets the apy_display of this DualGetOrders. - APY. # noqa: E501 + Annual Yield # noqa: E501 :param apy_display: The apy_display of this DualGetOrders. # noqa: E501 :type: str @@ -459,7 +459,7 @@ def apy_display(self, apy_display): def apy_settlement(self): """Gets the apy_settlement of this DualGetOrders. # noqa: E501 - Settlement APY. # noqa: E501 + Settlement Annual Yield # noqa: E501 :return: The apy_settlement of this DualGetOrders. # noqa: E501 :rtype: str @@ -470,7 +470,7 @@ def apy_settlement(self): def apy_settlement(self, apy_settlement): """Sets the apy_settlement of this DualGetOrders. - Settlement APY. # noqa: E501 + Settlement Annual Yield # noqa: E501 :param apy_settlement: The apy_settlement of this DualGetOrders. # noqa: E501 :type: str @@ -482,7 +482,7 @@ def apy_settlement(self, apy_settlement): def delivery_time(self): """Gets the delivery_time of this DualGetOrders. # noqa: E501 - Settlement time. # noqa: E501 + Settlement time # noqa: E501 :return: The delivery_time of this DualGetOrders. # noqa: E501 :rtype: int @@ -493,7 +493,7 @@ def delivery_time(self): def delivery_time(self, delivery_time): """Sets the delivery_time of this DualGetOrders. - Settlement time. # noqa: E501 + Settlement time # noqa: E501 :param delivery_time: The delivery_time of this DualGetOrders. # noqa: E501 :type: int @@ -505,7 +505,7 @@ def delivery_time(self, delivery_time): def text(self): """Gets the text of this DualGetOrders. # noqa: E501 - Custom order information. # noqa: E501 + Custom order information # noqa: E501 :return: The text of this DualGetOrders. # noqa: E501 :rtype: str @@ -516,7 +516,7 @@ def text(self): def text(self, text): """Sets the text of this DualGetOrders. - Custom order information. # noqa: E501 + Custom order information # noqa: E501 :param text: The text of this DualGetOrders. # noqa: E501 :type: str diff --git a/gate_api/models/dual_get_plans.py b/gate_api/models/dual_get_plans.py index f3ad42b..90808a3 100644 --- a/gate_api/models/dual_get_plans.py +++ b/gate_api/models/dual_get_plans.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -117,7 +117,7 @@ def __init__(self, id=None, instrument_name=None, invest_currency=None, exercise def id(self): """Gets the id of this DualGetPlans. # noqa: E501 - Plan ID. # noqa: E501 + Product ID # noqa: E501 :return: The id of this DualGetPlans. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def id(self): def id(self, id): """Sets the id of this DualGetPlans. - Plan ID. # noqa: E501 + Product ID # noqa: E501 :param id: The id of this DualGetPlans. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def id(self, id): def instrument_name(self): """Gets the instrument_name of this DualGetPlans. # noqa: E501 - Instrument Name. # noqa: E501 + Product Name # noqa: E501 :return: The instrument_name of this DualGetPlans. # noqa: E501 :rtype: str @@ -151,7 +151,7 @@ def instrument_name(self): def instrument_name(self, instrument_name): """Sets the instrument_name of this DualGetPlans. - Instrument Name. # noqa: E501 + Product Name # noqa: E501 :param instrument_name: The instrument_name of this DualGetPlans. # noqa: E501 :type: str @@ -163,7 +163,7 @@ def instrument_name(self, instrument_name): def invest_currency(self): """Gets the invest_currency of this DualGetPlans. # noqa: E501 - Investment Currency. # noqa: E501 + Investment Token # noqa: E501 :return: The invest_currency of this DualGetPlans. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def invest_currency(self): def invest_currency(self, invest_currency): """Sets the invest_currency of this DualGetPlans. - Investment Currency. # noqa: E501 + Investment Token # noqa: E501 :param invest_currency: The invest_currency of this DualGetPlans. # noqa: E501 :type: str @@ -186,7 +186,7 @@ def invest_currency(self, invest_currency): def exercise_currency(self): """Gets the exercise_currency of this DualGetPlans. # noqa: E501 - Strike Currency. # noqa: E501 + Strike Token # noqa: E501 :return: The exercise_currency of this DualGetPlans. # noqa: E501 :rtype: str @@ -197,7 +197,7 @@ def exercise_currency(self): def exercise_currency(self, exercise_currency): """Sets the exercise_currency of this DualGetPlans. - Strike Currency. # noqa: E501 + Strike Token # noqa: E501 :param exercise_currency: The exercise_currency of this DualGetPlans. # noqa: E501 :type: str @@ -209,7 +209,7 @@ def exercise_currency(self, exercise_currency): def exercise_price(self): """Gets the exercise_price of this DualGetPlans. # noqa: E501 - Strike price. # noqa: E501 + Strike price # noqa: E501 :return: The exercise_price of this DualGetPlans. # noqa: E501 :rtype: float @@ -220,7 +220,7 @@ def exercise_price(self): def exercise_price(self, exercise_price): """Sets the exercise_price of this DualGetPlans. - Strike price. # noqa: E501 + Strike price # noqa: E501 :param exercise_price: The exercise_price of this DualGetPlans. # noqa: E501 :type: float @@ -232,7 +232,7 @@ def exercise_price(self, exercise_price): def delivery_time(self): """Gets the delivery_time of this DualGetPlans. # noqa: E501 - Settlement time. # noqa: E501 + Settlement time # noqa: E501 :return: The delivery_time of this DualGetPlans. # noqa: E501 :rtype: int @@ -243,7 +243,7 @@ def delivery_time(self): def delivery_time(self, delivery_time): """Sets the delivery_time of this DualGetPlans. - Settlement time. # noqa: E501 + Settlement time # noqa: E501 :param delivery_time: The delivery_time of this DualGetPlans. # noqa: E501 :type: int @@ -255,7 +255,7 @@ def delivery_time(self, delivery_time): def min_copies(self): """Gets the min_copies of this DualGetPlans. # noqa: E501 - Minimum Copies. # noqa: E501 + Minimum Units # noqa: E501 :return: The min_copies of this DualGetPlans. # noqa: E501 :rtype: int @@ -266,7 +266,7 @@ def min_copies(self): def min_copies(self, min_copies): """Sets the min_copies of this DualGetPlans. - Minimum Copies. # noqa: E501 + Minimum Units # noqa: E501 :param min_copies: The min_copies of this DualGetPlans. # noqa: E501 :type: int @@ -278,7 +278,7 @@ def min_copies(self, min_copies): def max_copies(self): """Gets the max_copies of this DualGetPlans. # noqa: E501 - Maximum Copies. # noqa: E501 + Maximum Units # noqa: E501 :return: The max_copies of this DualGetPlans. # noqa: E501 :rtype: int @@ -289,7 +289,7 @@ def max_copies(self): def max_copies(self, max_copies): """Sets the max_copies of this DualGetPlans. - Maximum Copies. # noqa: E501 + Maximum Units # noqa: E501 :param max_copies: The max_copies of this DualGetPlans. # noqa: E501 :type: int @@ -301,7 +301,7 @@ def max_copies(self, max_copies): def per_value(self): """Gets the per_value of this DualGetPlans. # noqa: E501 - Per Unit Value. # noqa: E501 + Value Per Unit # noqa: E501 :return: The per_value of this DualGetPlans. # noqa: E501 :rtype: str @@ -312,7 +312,7 @@ def per_value(self): def per_value(self, per_value): """Sets the per_value of this DualGetPlans. - Per Unit Value. # noqa: E501 + Value Per Unit # noqa: E501 :param per_value: The per_value of this DualGetPlans. # noqa: E501 :type: str @@ -324,7 +324,7 @@ def per_value(self, per_value): def apy_display(self): """Gets the apy_display of this DualGetPlans. # noqa: E501 - APY. # noqa: E501 + Annual Yield # noqa: E501 :return: The apy_display of this DualGetPlans. # noqa: E501 :rtype: str @@ -335,7 +335,7 @@ def apy_display(self): def apy_display(self, apy_display): """Sets the apy_display of this DualGetPlans. - APY. # noqa: E501 + Annual Yield # noqa: E501 :param apy_display: The apy_display of this DualGetPlans. # noqa: E501 :type: str @@ -347,7 +347,7 @@ def apy_display(self, apy_display): def start_time(self): """Gets the start_time of this DualGetPlans. # noqa: E501 - start time. # noqa: E501 + Start Time # noqa: E501 :return: The start_time of this DualGetPlans. # noqa: E501 :rtype: int @@ -358,7 +358,7 @@ def start_time(self): def start_time(self, start_time): """Sets the start_time of this DualGetPlans. - start time. # noqa: E501 + Start Time # noqa: E501 :param start_time: The start_time of this DualGetPlans. # noqa: E501 :type: int @@ -370,7 +370,7 @@ def start_time(self, start_time): def end_time(self): """Gets the end_time of this DualGetPlans. # noqa: E501 - Finished time. # noqa: E501 + End time # noqa: E501 :return: The end_time of this DualGetPlans. # noqa: E501 :rtype: int @@ -381,7 +381,7 @@ def end_time(self): def end_time(self, end_time): """Sets the end_time of this DualGetPlans. - Finished time. # noqa: E501 + End time # noqa: E501 :param end_time: The end_time of this DualGetPlans. # noqa: E501 :type: int @@ -393,7 +393,7 @@ def end_time(self, end_time): def status(self): """Gets the status of this DualGetPlans. # noqa: E501 - Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-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 +404,7 @@ def status(self): def status(self, status): """Sets the status of this DualGetPlans. - Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-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/eth2_rate_list.py b/gate_api/models/eth2_rate_list.py index c3d3237..c714e00 100644 --- a/gate_api/models/eth2_rate_list.py +++ b/gate_api/models/eth2_rate_list.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, date_time=None, date=None, rate=None, local_vars_configuratio def date_time(self): """Gets the date_time of this Eth2RateList. # noqa: E501 - Date and Time Stamp. # noqa: E501 + Date Timestamp # noqa: E501 :return: The date_time of this Eth2RateList. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def date_time(self): def date_time(self, date_time): """Sets the date_time of this Eth2RateList. - Date and Time Stamp. # noqa: E501 + Date Timestamp # noqa: E501 :param date_time: The date_time of this Eth2RateList. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def date_time(self, date_time): def date(self): """Gets the date of this Eth2RateList. # noqa: E501 - Date. # noqa: E501 + Date # noqa: E501 :return: The date of this Eth2RateList. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def date(self): def date(self, date): """Sets the date of this Eth2RateList. - Date. # noqa: E501 + Date # noqa: E501 :param date: The date of this Eth2RateList. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def date(self, date): def rate(self): """Gets the rate of this Eth2RateList. # noqa: E501 - percentage. # noqa: E501 + Percentage Rate # noqa: E501 :return: The rate of this Eth2RateList. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def rate(self): def rate(self, rate): """Sets the rate of this Eth2RateList. - percentage. # noqa: E501 + Percentage Rate # noqa: E501 :param rate: The rate of this Eth2RateList. # noqa: E501 :type: str diff --git a/gate_api/models/eth2_swap.py b/gate_api/models/eth2_swap.py index d2b6ddf..ac51063 100644 --- a/gate_api/models/eth2_swap.py +++ b/gate_api/models/eth2_swap.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, side=None, amount=None, local_vars_configuration=None): # no def side(self): """Gets the side of this Eth2Swap. # noqa: E501 - 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH). # noqa: E501 + 1-Forward Swap (ETH -> ETH2), 2-Reverse Swap (ETH2 -> ETH) # noqa: E501 :return: The side of this Eth2Swap. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def side(self): def side(self, side): """Sets the side of this Eth2Swap. - 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH). # noqa: E501 + 1-Forward Swap (ETH -> ETH2), 2-Reverse Swap (ETH2 -> ETH) # noqa: E501 :param side: The side of this Eth2Swap. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def side(self, side): def amount(self): """Gets the amount of this Eth2Swap. # noqa: E501 - amount. # noqa: E501 + Swap Amount # noqa: E501 :return: The amount of this Eth2Swap. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Eth2Swap. - amount. # noqa: E501 + Swap Amount # noqa: E501 :param amount: The amount of this Eth2Swap. # noqa: E501 :type: str diff --git a/gate_api/models/find_coin.py b/gate_api/models/find_coin.py index 4662668..cb94999 100644 --- a/gate_api/models/find_coin.py +++ b/gate_api/models/find_coin.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, coin=None, cointype=None, local_vars_configuration=None): # def coin(self): """Gets the coin of this FindCoin. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The coin of this FindCoin. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def coin(self): def coin(self, coin): """Sets the coin of this FindCoin. - Currency. # noqa: E501 + Currency # noqa: E501 :param coin: The coin of this FindCoin. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def coin(self, coin): def cointype(self): """Gets the cointype of this FindCoin. # noqa: E501 - Coin Type swap-Voucher lock-Locked. # noqa: E501 + Token Type: swap-Voucher, lock-Locked # noqa: E501 :return: The cointype of this FindCoin. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def cointype(self): def cointype(self, cointype): """Sets the cointype of this FindCoin. - Coin Type swap-Voucher lock-Locked. # noqa: E501 + Token Type: swap-Voucher, lock-Locked # noqa: E501 :param cointype: The cointype of this FindCoin. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_currency_pair.py b/gate_api/models/flash_swap_currency_pair.py index f2e2432..5a9ed86 100644 --- a/gate_api/models/flash_swap_currency_pair.py +++ b/gate_api/models/flash_swap_currency_pair.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, currency_pair=None, sell_currency=None, buy_currency=None, se def currency_pair(self): """Gets the currency_pair of this FlashSwapCurrencyPair. # noqa: E501 - The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501 + Currency pair, `BTC_USDT` represents selling `BTC` and buying `USDT` # noqa: E501 :return: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this FlashSwapCurrencyPair. - The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). # noqa: E501 + Currency pair, `BTC_USDT` represents selling `BTC` and buying `USDT` # noqa: E501 :param currency_pair: The currency_pair of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def currency_pair(self, currency_pair): def sell_currency(self): """Gets the sell_currency of this FlashSwapCurrencyPair. # noqa: E501 - The currency to be sold. # noqa: E501 + Currency to sell # noqa: E501 :return: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def sell_currency(self): def sell_currency(self, sell_currency): """Sets the sell_currency of this FlashSwapCurrencyPair. - The currency to be sold. # noqa: E501 + Currency to sell # noqa: E501 :param sell_currency: The sell_currency of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def sell_currency(self, sell_currency): def buy_currency(self): """Gets the buy_currency of this FlashSwapCurrencyPair. # noqa: E501 - The currency to be bought. # noqa: E501 + Currency to buy # noqa: E501 :return: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def buy_currency(self): def buy_currency(self, buy_currency): """Sets the buy_currency of this FlashSwapCurrencyPair. - The currency to be bought. # noqa: E501 + Currency to buy # noqa: E501 :param buy_currency: The buy_currency of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def buy_currency(self, buy_currency): def sell_min_amount(self): """Gets the sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - The minimum quantity required for selling. # noqa: E501 + Minimum sell quantity # noqa: E501 :return: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def sell_min_amount(self): def sell_min_amount(self, sell_min_amount): """Sets the sell_min_amount of this FlashSwapCurrencyPair. - The minimum quantity required for selling. # noqa: E501 + Minimum sell quantity # noqa: E501 :param sell_min_amount: The sell_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def sell_min_amount(self, sell_min_amount): def sell_max_amount(self): """Gets the sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - The maximum quantity allowed for selling. # noqa: E501 + Maximum sell quantity # noqa: E501 :return: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def sell_max_amount(self): def sell_max_amount(self, sell_max_amount): """Sets the sell_max_amount of this FlashSwapCurrencyPair. - The maximum quantity allowed for selling. # noqa: E501 + Maximum sell quantity # noqa: E501 :param sell_max_amount: The sell_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def sell_max_amount(self, sell_max_amount): def buy_min_amount(self): """Gets the buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 - The minimum quantity required for buying. # noqa: E501 + Minimum buy quantity # noqa: E501 :return: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def buy_min_amount(self): def buy_min_amount(self, buy_min_amount): """Sets the buy_min_amount of this FlashSwapCurrencyPair. - The minimum quantity required for buying. # noqa: E501 + Minimum buy quantity # noqa: E501 :param buy_min_amount: The buy_min_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def buy_min_amount(self, buy_min_amount): def buy_max_amount(self): """Gets the buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 - The maximum quantity allowed for buying. # noqa: E501 + Maximum buy quantity # noqa: E501 :return: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def buy_max_amount(self): def buy_max_amount(self, buy_max_amount): """Sets the buy_max_amount of this FlashSwapCurrencyPair. - The maximum quantity allowed for buying. # noqa: E501 + Maximum buy quantity # noqa: E501 :param buy_max_amount: The buy_max_amount of this FlashSwapCurrencyPair. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_order.py b/gate_api/models/flash_swap_order.py index a715330..2be7592 100644 --- a/gate_api/models/flash_swap_order.py +++ b/gate_api/models/flash_swap_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -97,7 +97,7 @@ def __init__(self, id=None, create_time=None, user_id=None, sell_currency=None, def id(self): """Gets the id of this FlashSwapOrder. # noqa: E501 - Flash swap order ID. # noqa: E501 + Flash swap order ID # noqa: E501 :return: The id of this FlashSwapOrder. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def id(self): def id(self, id): """Sets the id of this FlashSwapOrder. - Flash swap order ID. # noqa: E501 + Flash swap order ID # noqa: E501 :param id: The id of this FlashSwapOrder. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this FlashSwapOrder. # noqa: E501 - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :return: The create_time of this FlashSwapOrder. # noqa: E501 :rtype: int @@ -131,7 +131,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FlashSwapOrder. - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :param create_time: The create_time of this FlashSwapOrder. # noqa: E501 :type: int @@ -143,7 +143,7 @@ def create_time(self, create_time): def user_id(self): """Gets the user_id of this FlashSwapOrder. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this FlashSwapOrder. # noqa: E501 :rtype: int @@ -154,7 +154,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this FlashSwapOrder. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this FlashSwapOrder. # noqa: E501 :type: int @@ -166,7 +166,7 @@ def user_id(self, user_id): def sell_currency(self): """Gets the sell_currency of this FlashSwapOrder. # noqa: E501 - Currency to sell. # noqa: E501 + Currency to sell # noqa: E501 :return: The sell_currency of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def sell_currency(self): def sell_currency(self, sell_currency): """Sets the sell_currency of this FlashSwapOrder. - Currency to sell. # noqa: E501 + Currency to sell # noqa: E501 :param sell_currency: The sell_currency of this FlashSwapOrder. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def sell_currency(self, sell_currency): def sell_amount(self): """Gets the sell_amount of this FlashSwapOrder. # noqa: E501 - Amount to sell. # noqa: E501 + Amount to sell # noqa: E501 :return: The sell_amount of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def sell_amount(self): def sell_amount(self, sell_amount): """Sets the sell_amount of this FlashSwapOrder. - Amount to sell. # noqa: E501 + Amount to sell # noqa: E501 :param sell_amount: The sell_amount of this FlashSwapOrder. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def sell_amount(self, sell_amount): def buy_currency(self): """Gets the buy_currency of this FlashSwapOrder. # noqa: E501 - Currency to buy. # noqa: E501 + Currency to buy # noqa: E501 :return: The buy_currency of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def buy_currency(self): def buy_currency(self, buy_currency): """Sets the buy_currency of this FlashSwapOrder. - Currency to buy. # noqa: E501 + Currency to buy # noqa: E501 :param buy_currency: The buy_currency of this FlashSwapOrder. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def buy_currency(self, buy_currency): def buy_amount(self): """Gets the buy_amount of this FlashSwapOrder. # noqa: E501 - Amount to buy. # noqa: E501 + Amount to buy # noqa: E501 :return: The buy_amount of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def buy_amount(self): def buy_amount(self, buy_amount): """Sets the buy_amount of this FlashSwapOrder. - Amount to buy. # noqa: E501 + Amount to buy # noqa: E501 :param buy_amount: The buy_amount of this FlashSwapOrder. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def buy_amount(self, buy_amount): def price(self): """Gets the price of this FlashSwapOrder. # noqa: E501 - Price. # noqa: E501 + Price # noqa: E501 :return: The price of this FlashSwapOrder. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def price(self): def price(self, price): """Sets the price of this FlashSwapOrder. - Price. # noqa: E501 + Price # noqa: E501 :param price: The price of this FlashSwapOrder. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_order_preview.py b/gate_api/models/flash_swap_order_preview.py index ca4413a..d137d5a 100644 --- a/gate_api/models/flash_swap_order_preview.py +++ b/gate_api/models/flash_swap_order_preview.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_cu def preview_id(self): """Gets the preview_id of this FlashSwapOrderPreview. # noqa: E501 - Preview result ID. # noqa: E501 + Preview result ID # noqa: E501 :return: The preview_id of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def preview_id(self): def preview_id(self, preview_id): """Sets the preview_id of this FlashSwapOrderPreview. - Preview result ID. # noqa: E501 + Preview result ID # noqa: E501 :param preview_id: The preview_id of this FlashSwapOrderPreview. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def sell_currency(self, sell_currency): def sell_amount(self): """Gets the sell_amount of this FlashSwapOrderPreview. # noqa: E501 - Amount to sell. # noqa: E501 + Amount to sell # noqa: E501 :return: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def sell_amount(self): def sell_amount(self, sell_amount): """Sets the sell_amount of this FlashSwapOrderPreview. - Amount to sell. # noqa: E501 + Amount to sell # noqa: E501 :param sell_amount: The sell_amount of this FlashSwapOrderPreview. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def buy_currency(self, buy_currency): def buy_amount(self): """Gets the buy_amount of this FlashSwapOrderPreview. # noqa: E501 - Amount to buy. # noqa: E501 + Amount to buy # noqa: E501 :return: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def buy_amount(self): def buy_amount(self, buy_amount): """Sets the buy_amount of this FlashSwapOrderPreview. - Amount to buy. # noqa: E501 + Amount to buy # noqa: E501 :param buy_amount: The buy_amount of this FlashSwapOrderPreview. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def buy_amount(self, buy_amount): def price(self): """Gets the price of this FlashSwapOrderPreview. # noqa: E501 - Price. # noqa: E501 + Price # noqa: E501 :return: The price of this FlashSwapOrderPreview. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def price(self): def price(self, price): """Sets the price of this FlashSwapOrderPreview. - Price. # noqa: E501 + Price # noqa: E501 :param price: The price of this FlashSwapOrderPreview. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_order_request.py b/gate_api/models/flash_swap_order_request.py index 5cc1661..d89b46b 100644 --- a/gate_api/models/flash_swap_order_request.py +++ b/gate_api/models/flash_swap_order_request.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, preview_id=None, sell_currency=None, sell_amount=None, buy_cu def preview_id(self): """Gets the preview_id of this FlashSwapOrderRequest. # noqa: E501 - Preview result ID. # noqa: E501 + Preview result ID # noqa: E501 :return: The preview_id of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def preview_id(self): def preview_id(self, preview_id): """Sets the preview_id of this FlashSwapOrderRequest. - Preview result ID. # noqa: E501 + Preview result ID # noqa: E501 :param preview_id: The preview_id of this FlashSwapOrderRequest. # noqa: E501 :type: str @@ -122,7 +122,7 @@ def sell_currency(self, sell_currency): def sell_amount(self): """Gets the sell_amount of this FlashSwapOrderRequest. # noqa: E501 - Amount to sell (based on the preview result). # noqa: E501 + Amount to sell (based on the preview result) # noqa: E501 :return: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def sell_amount(self): def sell_amount(self, sell_amount): """Sets the sell_amount of this FlashSwapOrderRequest. - Amount to sell (based on the preview result). # noqa: E501 + Amount to sell (based on the preview result) # noqa: E501 :param sell_amount: The sell_amount of this FlashSwapOrderRequest. # noqa: E501 :type: str @@ -172,7 +172,7 @@ def buy_currency(self, buy_currency): def buy_amount(self): """Gets the buy_amount of this FlashSwapOrderRequest. # noqa: E501 - Amount to buy (based on the preview result). # noqa: E501 + Amount to buy (based on the preview result) # noqa: E501 :return: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 :rtype: str @@ -183,7 +183,7 @@ def buy_amount(self): def buy_amount(self, buy_amount): """Sets the buy_amount of this FlashSwapOrderRequest. - Amount to buy (based on the preview result). # noqa: E501 + Amount to buy (based on the preview result) # noqa: E501 :param buy_amount: The buy_amount of this FlashSwapOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/flash_swap_preview_request.py b/gate_api/models/flash_swap_preview_request.py index e04087b..3cfe1d1 100644 --- a/gate_api/models/flash_swap_preview_request.py +++ b/gate_api/models/flash_swap_preview_request.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -70,7 +70,7 @@ def __init__(self, sell_currency=None, sell_amount=None, buy_currency=None, buy_ def sell_currency(self): """Gets the sell_currency of this FlashSwapPreviewRequest. # noqa: E501 - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs # noqa: E501 :return: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501 :rtype: str @@ -81,7 +81,7 @@ def sell_currency(self): def sell_currency(self, sell_currency): """Sets the sell_currency of this FlashSwapPreviewRequest. - The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs. # noqa: E501 + The name of the asset being sold, as obtained from the \"GET /flash_swap/currency_pairs\" API, which retrieves a list of supported flash swap currency pairs # noqa: E501 :param sell_currency: The sell_currency of this FlashSwapPreviewRequest. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def sell_amount(self, sell_amount): def buy_currency(self): """Gets the buy_currency of this FlashSwapPreviewRequest. # noqa: E501 - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs # noqa: E501 :return: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def buy_currency(self): def buy_currency(self, buy_currency): """Sets the buy_currency of this FlashSwapPreviewRequest. - The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs. # noqa: E501 + The name of the asset being purchased, as obtained from the \"GET /flash_swap/currency_pairs\" API, which provides a list of supported flash swap currency pairs # noqa: E501 :param buy_currency: The buy_currency of this FlashSwapPreviewRequest. # noqa: E501 :type: str diff --git a/gate_api/models/funding_account.py b/gate_api/models/funding_account.py index 6b5016d..9ba5a0f 100644 --- a/gate_api/models/funding_account.py +++ b/gate_api/models/funding_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, currency=None, available=None, locked=None, lent=None, total_ def currency(self): """Gets the currency of this FundingAccount. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this FundingAccount. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this FundingAccount. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this FundingAccount. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def available(self): """Gets the available of this FundingAccount. # noqa: E501 - Available assets to lend, which is identical to spot account `available`. # noqa: E501 + Available assets to lend, which is identical to spot account `available` # noqa: E501 :return: The available of this FundingAccount. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def available(self): def available(self, available): """Sets the available of this FundingAccount. - Available assets to lend, which is identical to spot account `available`. # noqa: E501 + Available assets to lend, which is identical to spot account `available` # noqa: E501 :param available: The available of this FundingAccount. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def available(self, available): def locked(self): """Gets the locked of this FundingAccount. # noqa: E501 - Locked amount. i.e. amount in `open` loans. # noqa: E501 + Locked amount. i.e. amount in `open` loans # noqa: E501 :return: The locked of this FundingAccount. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this FundingAccount. - Locked amount. i.e. amount in `open` loans. # noqa: E501 + Locked amount. i.e. amount in `open` loans # noqa: E501 :param locked: The locked of this FundingAccount. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def locked(self, locked): def lent(self): """Gets the lent of this FundingAccount. # noqa: E501 - Outstanding loan amount yet to be repaid. # noqa: E501 + Outstanding loan amount yet to be repaid # noqa: E501 :return: The lent of this FundingAccount. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def lent(self): def lent(self, lent): """Sets the lent of this FundingAccount. - Outstanding loan amount yet to be repaid. # noqa: E501 + Outstanding loan amount yet to be repaid # noqa: E501 :param lent: The lent of this FundingAccount. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def lent(self, lent): def total_lent(self): """Gets the total_lent of this FundingAccount. # noqa: E501 - Amount used for lending. total_lent = lent + locked. # noqa: E501 + Amount used for lending. total_lent = lent + locked # noqa: E501 :return: The total_lent of this FundingAccount. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def total_lent(self): def total_lent(self, total_lent): """Sets the total_lent of this FundingAccount. - Amount used for lending. total_lent = lent + locked. # noqa: E501 + Amount used for lending. total_lent = lent + locked # noqa: E501 :param total_lent: The total_lent of this FundingAccount. # noqa: E501 :type: str diff --git a/gate_api/models/funding_rate_record.py b/gate_api/models/funding_rate_record.py index d3ea258..cf06b1c 100644 --- a/gate_api/models/funding_rate_record.py +++ b/gate_api/models/funding_rate_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, t=None, r=None, local_vars_configuration=None): # noqa: E501 def t(self): """Gets the t of this FundingRateRecord. # noqa: E501 - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :return: The t of this FundingRateRecord. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def t(self): def t(self, t): """Sets the t of this FundingRateRecord. - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :param t: The t of this FundingRateRecord. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def t(self, t): def r(self): """Gets the r of this FundingRateRecord. # noqa: E501 - Funding rate. # noqa: E501 + Funding rate # noqa: E501 :return: The r of this FundingRateRecord. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def r(self): def r(self, r): """Sets the r of this FundingRateRecord. - Funding rate. # noqa: E501 + Funding rate # noqa: E501 :param r: The r of this FundingRateRecord. # noqa: E501 :type: str diff --git a/gate_api/models/future_cancel_order_result.py b/gate_api/models/future_cancel_order_result.py index 1886a56..7f7ccd4 100644 --- a/gate_api/models/future_cancel_order_result.py +++ b/gate_api/models/future_cancel_order_result.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, id=None, user_id=None, succeeded=None, message=None, local_va def id(self): """Gets the id of this FutureCancelOrderResult. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this FutureCancelOrderResult. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def id(self): def id(self, id): """Sets the id of this FutureCancelOrderResult. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this FutureCancelOrderResult. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def id(self, id): def user_id(self): """Gets the user_id of this FutureCancelOrderResult. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this FutureCancelOrderResult. # noqa: E501 :rtype: int @@ -106,7 +106,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this FutureCancelOrderResult. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this FutureCancelOrderResult. # noqa: E501 :type: int @@ -118,7 +118,7 @@ def user_id(self, user_id): def succeeded(self): """Gets the succeeded of this FutureCancelOrderResult. # noqa: E501 - Whether cancellation succeeded. # noqa: E501 + Whether cancellation succeeded # noqa: E501 :return: The succeeded of this FutureCancelOrderResult. # noqa: E501 :rtype: bool @@ -129,7 +129,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this FutureCancelOrderResult. - Whether cancellation succeeded. # noqa: E501 + Whether cancellation succeeded # noqa: E501 :param succeeded: The succeeded of this FutureCancelOrderResult. # noqa: E501 :type: bool @@ -141,7 +141,7 @@ def succeeded(self, succeeded): def message(self): """Gets the message of this FutureCancelOrderResult. # noqa: E501 - Error message when failed to cancel the order; empty if succeeded. # noqa: E501 + Error description when cancellation fails, empty if successful # noqa: E501 :return: The message of this FutureCancelOrderResult. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def message(self): def message(self, message): """Sets the message of this FutureCancelOrderResult. - Error message when failed to cancel the order; empty if succeeded. # noqa: E501 + Error description when cancellation fails, empty if successful # noqa: E501 :param message: The message of this FutureCancelOrderResult. # noqa: E501 :type: str diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py index 029d544..62fb2fc 100644 --- a/gate_api/models/futures_account.py +++ b/gate_api/models/futures_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -205,7 +205,7 @@ def total(self, total): def unrealised_pnl(self): """Gets the unrealised_pnl of this FuturesAccount. # noqa: E501 - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :return: The unrealised_pnl of this FuturesAccount. # noqa: E501 :rtype: str @@ -216,7 +216,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this FuturesAccount. - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this FuturesAccount. # noqa: E501 :type: str @@ -228,7 +228,7 @@ def unrealised_pnl(self, unrealised_pnl): def position_margin(self): """Gets the position_margin of this FuturesAccount. # noqa: E501 - Position margin. # noqa: E501 + Position margin # noqa: E501 :return: The position_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -239,7 +239,7 @@ def position_margin(self): def position_margin(self, position_margin): """Sets the position_margin of this FuturesAccount. - Position margin. # noqa: E501 + Position margin # noqa: E501 :param position_margin: The position_margin of this FuturesAccount. # noqa: E501 :type: str @@ -251,7 +251,7 @@ def position_margin(self, position_margin): def order_margin(self): """Gets the order_margin of this FuturesAccount. # noqa: E501 - Order margin of unfinished orders. # noqa: E501 + Order margin of unfinished orders # noqa: E501 :return: The order_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -262,7 +262,7 @@ def order_margin(self): def order_margin(self, order_margin): """Sets the order_margin of this FuturesAccount. - Order margin of unfinished orders. # noqa: E501 + Order margin of unfinished orders # noqa: E501 :param order_margin: The order_margin of this FuturesAccount. # noqa: E501 :type: str @@ -274,7 +274,7 @@ def order_margin(self, order_margin): def available(self): """Gets the available of this FuturesAccount. # noqa: E501 - The available balance for transferring or trading(including bonus. Bonus can't be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 + Available balance for transferring or trading (including bonus. Bonus cannot be withdrawn, so transfer amount needs to deduct bonus) # noqa: E501 :return: The available of this FuturesAccount. # noqa: E501 :rtype: str @@ -285,7 +285,7 @@ def available(self): def available(self, available): """Sets the available of this FuturesAccount. - The available balance for transferring or trading(including bonus. Bonus can't be withdrawn. The transfer amount needs to deduct the bonus) # noqa: E501 + Available balance for transferring or trading (including bonus. Bonus cannot be withdrawn, so transfer amount needs to deduct bonus) # noqa: E501 :param available: The available of this FuturesAccount. # noqa: E501 :type: str @@ -297,7 +297,7 @@ def available(self, available): def point(self): """Gets the point of this FuturesAccount. # noqa: E501 - POINT amount. # noqa: E501 + Point card amount # noqa: E501 :return: The point of this FuturesAccount. # noqa: E501 :rtype: str @@ -308,7 +308,7 @@ def point(self): def point(self, point): """Sets the point of this FuturesAccount. - POINT amount. # noqa: E501 + Point card amount # noqa: E501 :param point: The point of this FuturesAccount. # noqa: E501 :type: str @@ -320,7 +320,7 @@ def point(self, point): def currency(self): """Gets the currency of this FuturesAccount. # noqa: E501 - Settle currency. # noqa: E501 + Settlement currency # noqa: E501 :return: The currency of this FuturesAccount. # noqa: E501 :rtype: str @@ -331,7 +331,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this FuturesAccount. - Settle currency. # noqa: E501 + Settlement currency # noqa: E501 :param currency: The currency of this FuturesAccount. # noqa: E501 :type: str @@ -343,7 +343,7 @@ def currency(self, currency): def in_dual_mode(self): """Gets the in_dual_mode of this FuturesAccount. # noqa: E501 - Whether dual mode is enabled. # noqa: E501 + Whether dual mode is enabled # noqa: E501 :return: The in_dual_mode of this FuturesAccount. # noqa: E501 :rtype: bool @@ -354,7 +354,7 @@ def in_dual_mode(self): def in_dual_mode(self, in_dual_mode): """Sets the in_dual_mode of this FuturesAccount. - Whether dual mode is enabled. # noqa: E501 + Whether dual mode is enabled # noqa: E501 :param in_dual_mode: The in_dual_mode of this FuturesAccount. # noqa: E501 :type: bool @@ -366,7 +366,7 @@ def in_dual_mode(self, in_dual_mode): def enable_credit(self): """Gets the enable_credit of this FuturesAccount. # noqa: E501 - Whether portfolio margin account mode is enabled. # noqa: E501 + Whether portfolio margin account mode is enabled # noqa: E501 :return: The enable_credit of this FuturesAccount. # noqa: E501 :rtype: bool @@ -377,7 +377,7 @@ def enable_credit(self): def enable_credit(self, enable_credit): """Sets the enable_credit of this FuturesAccount. - Whether portfolio margin account mode is enabled. # noqa: E501 + Whether portfolio margin account mode is enabled # noqa: E501 :param enable_credit: The enable_credit of this FuturesAccount. # noqa: E501 :type: bool @@ -389,7 +389,7 @@ def enable_credit(self, enable_credit): def position_initial_margin(self): """Gets the position_initial_margin of this FuturesAccount. # noqa: E501 - Initial margin position, applicable to the portfolio margin account model. # noqa: E501 + Initial margin occupied by positions, applicable to unified account mode # noqa: E501 :return: The position_initial_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -400,7 +400,7 @@ def position_initial_margin(self): def position_initial_margin(self, position_initial_margin): """Sets the position_initial_margin of this FuturesAccount. - Initial margin position, applicable to the portfolio margin account model. # noqa: E501 + Initial margin occupied by positions, applicable to unified account mode # noqa: E501 :param position_initial_margin: The position_initial_margin of this FuturesAccount. # noqa: E501 :type: str @@ -412,7 +412,7 @@ def position_initial_margin(self, position_initial_margin): def maintenance_margin(self): """Gets the maintenance_margin of this FuturesAccount. # noqa: E501 - The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model # noqa: E501 + Maintenance margin occupied by positions, applicable to new classic account margin mode and unified account mode # noqa: E501 :return: The maintenance_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -423,7 +423,7 @@ def maintenance_margin(self): def maintenance_margin(self, maintenance_margin): """Sets the maintenance_margin of this FuturesAccount. - The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model # noqa: E501 + Maintenance margin occupied by positions, applicable to new classic account margin mode and unified account mode # noqa: E501 :param maintenance_margin: The maintenance_margin of this FuturesAccount. # noqa: E501 :type: str @@ -435,7 +435,7 @@ def maintenance_margin(self, maintenance_margin): def bonus(self): """Gets the bonus of this FuturesAccount. # noqa: E501 - Perpetual Contract Bonus. # noqa: E501 + Bonus # noqa: E501 :return: The bonus of this FuturesAccount. # noqa: E501 :rtype: str @@ -446,7 +446,7 @@ def bonus(self): def bonus(self, bonus): """Sets the bonus of this FuturesAccount. - Perpetual Contract Bonus. # noqa: E501 + Bonus # noqa: E501 :param bonus: The bonus of this FuturesAccount. # noqa: E501 :type: str @@ -458,7 +458,7 @@ def bonus(self, bonus): def enable_evolved_classic(self): """Gets the enable_evolved_classic of this FuturesAccount. # noqa: E501 - Classic account margin mode, true-new mode, false-old mode. # noqa: E501 + Classic account margin mode, true-new mode, false-old mode # noqa: E501 :return: The enable_evolved_classic of this FuturesAccount. # noqa: E501 :rtype: bool @@ -469,7 +469,7 @@ def enable_evolved_classic(self): def enable_evolved_classic(self, enable_evolved_classic): """Sets the enable_evolved_classic of this FuturesAccount. - Classic account margin mode, true-new mode, false-old mode. # noqa: E501 + Classic account margin mode, true-new mode, false-old mode # noqa: E501 :param enable_evolved_classic: The enable_evolved_classic of this FuturesAccount. # noqa: E501 :type: bool @@ -481,7 +481,7 @@ def enable_evolved_classic(self, enable_evolved_classic): def cross_order_margin(self): """Gets the cross_order_margin of this FuturesAccount. # noqa: E501 - Full -warehouse hanging order deposit, suitable for the new classic account margin model # noqa: E501 + Cross margin order margin, applicable to new classic account margin mode # noqa: E501 :return: The cross_order_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -492,7 +492,7 @@ def cross_order_margin(self): def cross_order_margin(self, cross_order_margin): """Sets the cross_order_margin of this FuturesAccount. - Full -warehouse hanging order deposit, suitable for the new classic account margin model # noqa: E501 + Cross margin order margin, applicable to new classic account margin mode # noqa: E501 :param cross_order_margin: The cross_order_margin of this FuturesAccount. # noqa: E501 :type: str @@ -504,7 +504,7 @@ def cross_order_margin(self, cross_order_margin): def cross_initial_margin(self): """Gets the cross_initial_margin of this FuturesAccount. # noqa: E501 - The initial security deposit of the full warehouse is suitable for the new classic account margin model # noqa: E501 + Cross margin initial margin, applicable to new classic account margin mode # noqa: E501 :return: The cross_initial_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -515,7 +515,7 @@ def cross_initial_margin(self): def cross_initial_margin(self, cross_initial_margin): """Sets the cross_initial_margin of this FuturesAccount. - The initial security deposit of the full warehouse is suitable for the new classic account margin model # noqa: E501 + Cross margin initial margin, applicable to new classic account margin mode # noqa: E501 :param cross_initial_margin: The cross_initial_margin of this FuturesAccount. # noqa: E501 :type: str @@ -527,7 +527,7 @@ def cross_initial_margin(self, cross_initial_margin): def cross_maintenance_margin(self): """Gets the cross_maintenance_margin of this FuturesAccount. # noqa: E501 - Maintain deposit in full warehouse, suitable for new classic account margin models # noqa: E501 + Cross margin maintenance margin, applicable to new classic account margin mode # noqa: E501 :return: The cross_maintenance_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -538,7 +538,7 @@ def cross_maintenance_margin(self): def cross_maintenance_margin(self, cross_maintenance_margin): """Sets the cross_maintenance_margin of this FuturesAccount. - Maintain deposit in full warehouse, suitable for new classic account margin models # noqa: E501 + Cross margin maintenance margin, applicable to new classic account margin mode # noqa: E501 :param cross_maintenance_margin: The cross_maintenance_margin of this FuturesAccount. # noqa: E501 :type: str @@ -550,7 +550,7 @@ def cross_maintenance_margin(self, cross_maintenance_margin): def cross_unrealised_pnl(self): """Gets the cross_unrealised_pnl of this FuturesAccount. # noqa: E501 - The full warehouse does not achieve profit and loss, suitable for the new classic account margin model # noqa: E501 + Cross margin unrealized P&L, applicable to new classic account margin mode # noqa: E501 :return: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501 :rtype: str @@ -561,7 +561,7 @@ def cross_unrealised_pnl(self): def cross_unrealised_pnl(self, cross_unrealised_pnl): """Sets the cross_unrealised_pnl of this FuturesAccount. - The full warehouse does not achieve profit and loss, suitable for the new classic account margin model # noqa: E501 + Cross margin unrealized P&L, applicable to new classic account margin mode # noqa: E501 :param cross_unrealised_pnl: The cross_unrealised_pnl of this FuturesAccount. # noqa: E501 :type: str @@ -573,7 +573,7 @@ def cross_unrealised_pnl(self, cross_unrealised_pnl): def cross_available(self): """Gets the cross_available of this FuturesAccount. # noqa: E501 - Full warehouse available amount, suitable for the new classic account margin model # noqa: E501 + Cross margin available balance, applicable to new classic account margin mode # noqa: E501 :return: The cross_available of this FuturesAccount. # noqa: E501 :rtype: str @@ -584,7 +584,7 @@ def cross_available(self): def cross_available(self, cross_available): """Sets the cross_available of this FuturesAccount. - Full warehouse available amount, suitable for the new classic account margin model # noqa: E501 + Cross margin available balance, applicable to new classic account margin mode # noqa: E501 :param cross_available: The cross_available of this FuturesAccount. # noqa: E501 :type: str @@ -596,7 +596,7 @@ def cross_available(self, cross_available): def cross_margin_balance(self): """Gets the cross_margin_balance of this FuturesAccount. # noqa: E501 - Full margin balance, suitable for the new classic account margin model. # noqa: E501 + Cross margin balance, applicable to new classic account margin mode # noqa: E501 :return: The cross_margin_balance of this FuturesAccount. # noqa: E501 :rtype: str @@ -607,7 +607,7 @@ def cross_margin_balance(self): def cross_margin_balance(self, cross_margin_balance): """Sets the cross_margin_balance of this FuturesAccount. - Full margin balance, suitable for the new classic account margin model. # noqa: E501 + Cross margin balance, applicable to new classic account margin mode # noqa: E501 :param cross_margin_balance: The cross_margin_balance of this FuturesAccount. # noqa: E501 :type: str @@ -619,7 +619,7 @@ def cross_margin_balance(self, cross_margin_balance): def cross_mmr(self): """Gets the cross_mmr of this FuturesAccount. # noqa: E501 - Maintain margin ratio for the full position, suitable for the new classic account margin model # noqa: E501 + Cross margin maintenance margin rate, applicable to new classic account margin mode # noqa: E501 :return: The cross_mmr of this FuturesAccount. # noqa: E501 :rtype: str @@ -630,7 +630,7 @@ def cross_mmr(self): def cross_mmr(self, cross_mmr): """Sets the cross_mmr of this FuturesAccount. - Maintain margin ratio for the full position, suitable for the new classic account margin model # noqa: E501 + Cross margin maintenance margin rate, applicable to new classic account margin mode # noqa: E501 :param cross_mmr: The cross_mmr of this FuturesAccount. # noqa: E501 :type: str @@ -642,7 +642,7 @@ def cross_mmr(self, cross_mmr): def cross_imr(self): """Gets the cross_imr of this FuturesAccount. # noqa: E501 - The initial margin rate of the full position is suitable for the new classic account margin model # noqa: E501 + Cross margin initial margin rate, applicable to new classic account margin mode # noqa: E501 :return: The cross_imr of this FuturesAccount. # noqa: E501 :rtype: str @@ -653,7 +653,7 @@ def cross_imr(self): def cross_imr(self, cross_imr): """Sets the cross_imr of this FuturesAccount. - The initial margin rate of the full position is suitable for the new classic account margin model # noqa: E501 + Cross margin initial margin rate, applicable to new classic account margin mode # noqa: E501 :param cross_imr: The cross_imr of this FuturesAccount. # noqa: E501 :type: str @@ -665,7 +665,7 @@ def cross_imr(self, cross_imr): def isolated_position_margin(self): """Gets the isolated_position_margin of this FuturesAccount. # noqa: E501 - Ware -position margin, suitable for the new classic account margin model. # noqa: E501 + Isolated position margin, applicable to new classic account margin mode # noqa: E501 :return: The isolated_position_margin of this FuturesAccount. # noqa: E501 :rtype: str @@ -676,7 +676,7 @@ def isolated_position_margin(self): def isolated_position_margin(self, isolated_position_margin): """Sets the isolated_position_margin of this FuturesAccount. - Ware -position margin, suitable for the new classic account margin model. # noqa: E501 + Isolated position margin, applicable to new classic account margin mode # noqa: E501 :param isolated_position_margin: The isolated_position_margin of this FuturesAccount. # noqa: E501 :type: str @@ -688,7 +688,7 @@ def isolated_position_margin(self, isolated_position_margin): def enable_new_dual_mode(self): """Gets the enable_new_dual_mode of this FuturesAccount. # noqa: E501 - Whether to open a new two-way position mode. # noqa: E501 + Whether to open a new two-way position mode # noqa: E501 :return: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 :rtype: bool @@ -699,7 +699,7 @@ def enable_new_dual_mode(self): def enable_new_dual_mode(self, enable_new_dual_mode): """Sets the enable_new_dual_mode of this FuturesAccount. - Whether to open a new two-way position mode. # noqa: E501 + Whether to open a new two-way position mode # noqa: E501 :param enable_new_dual_mode: The enable_new_dual_mode of this FuturesAccount. # noqa: E501 :type: bool @@ -734,7 +734,7 @@ def margin_mode(self, margin_mode): def enable_tiered_mm(self): """Gets the enable_tiered_mm of this FuturesAccount. # noqa: E501 - Whether to enable tiered maintenance margin calculation. # noqa: E501 + Whether to enable tiered maintenance margin calculation # noqa: E501 :return: The enable_tiered_mm of this FuturesAccount. # noqa: E501 :rtype: bool @@ -745,7 +745,7 @@ def enable_tiered_mm(self): def enable_tiered_mm(self, enable_tiered_mm): """Sets the enable_tiered_mm of this FuturesAccount. - Whether to enable tiered maintenance margin calculation. # noqa: E501 + Whether to enable tiered maintenance margin calculation # noqa: E501 :param enable_tiered_mm: The enable_tiered_mm of this FuturesAccount. # noqa: E501 :type: bool diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py index c00ae26..f4dafab 100644 --- a/gate_api/models/futures_account_book.py +++ b/gate_api/models/futures_account_book.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, time=None, change=None, balance=None, type=None, text=None, c def time(self): """Gets the time of this FuturesAccountBook. # noqa: E501 - Change time. # noqa: E501 + Change time # noqa: E501 :return: The time of this FuturesAccountBook. # noqa: E501 :rtype: float @@ -103,7 +103,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesAccountBook. - Change time. # noqa: E501 + Change time # noqa: E501 :param time: The time of this FuturesAccountBook. # noqa: E501 :type: float @@ -115,7 +115,7 @@ def time(self, time): def change(self): """Gets the change of this FuturesAccountBook. # noqa: E501 - Change amount. # noqa: E501 + Change amount # noqa: E501 :return: The change of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def change(self): def change(self, change): """Sets the change of this FuturesAccountBook. - Change amount. # noqa: E501 + Change amount # noqa: E501 :param change: The change of this FuturesAccountBook. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def change(self, change): def balance(self): """Gets the balance of this FuturesAccountBook. # noqa: E501 - Balance after change. # noqa: E501 + Balance after change # noqa: E501 :return: The balance of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this FuturesAccountBook. - Balance after change. # noqa: E501 + Balance after change # noqa: E501 :param balance: The balance of this FuturesAccountBook. # noqa: E501 :type: str @@ -190,7 +190,7 @@ def type(self, type): def text(self): """Gets the text of this FuturesAccountBook. # noqa: E501 - Comment. # noqa: E501 + Comment # noqa: E501 :return: The text of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -201,7 +201,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesAccountBook. - Comment. # noqa: E501 + Comment # noqa: E501 :param text: The text of this FuturesAccountBook. # noqa: E501 :type: str @@ -213,7 +213,7 @@ def text(self, text): def contract(self): """Gets the contract of this FuturesAccountBook. # noqa: E501 - Futures contract, the field is only available for data after 2023-10-30. # noqa: E501 + Futures contract, the field is only available for data after 2023-10-30 # noqa: E501 :return: The contract of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -224,7 +224,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesAccountBook. - Futures contract, the field is only available for data after 2023-10-30. # noqa: E501 + Futures contract, the field is only available for data after 2023-10-30 # noqa: E501 :param contract: The contract of this FuturesAccountBook. # noqa: E501 :type: str @@ -236,7 +236,7 @@ def contract(self, contract): def trade_id(self): """Gets the trade_id of this FuturesAccountBook. # noqa: E501 - trade id. # noqa: E501 + trade id # noqa: E501 :return: The trade_id of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -247,7 +247,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this FuturesAccountBook. - trade id. # noqa: E501 + trade id # noqa: E501 :param trade_id: The trade_id of this FuturesAccountBook. # noqa: E501 :type: str @@ -259,7 +259,7 @@ def trade_id(self, trade_id): def id(self): """Gets the id of this FuturesAccountBook. # noqa: E501 - Account change record ID. # noqa: E501 + Account change record ID # noqa: E501 :return: The id of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -270,7 +270,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesAccountBook. - Account change record ID. # noqa: E501 + Account change record ID # noqa: E501 :param id: The id of this FuturesAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/futures_account_history.py b/gate_api/models/futures_account_history.py index 363e287..6960744 100644 --- a/gate_api/models/futures_account_history.py +++ b/gate_api/models/futures_account_history.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, dnw=None, pnl=None, fee=None, refr=None, fund=None, point_dnw def dnw(self): """Gets the dnw of this FuturesAccountHistory. # noqa: E501 - total amount of deposit and withdraw. # noqa: E501 + total amount of deposit and withdraw # noqa: E501 :return: The dnw of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -113,7 +113,7 @@ def dnw(self): def dnw(self, dnw): """Sets the dnw of this FuturesAccountHistory. - total amount of deposit and withdraw. # noqa: E501 + total amount of deposit and withdraw # noqa: E501 :param dnw: The dnw of this FuturesAccountHistory. # noqa: E501 :type: str @@ -125,7 +125,7 @@ def dnw(self, dnw): def pnl(self): """Gets the pnl of this FuturesAccountHistory. # noqa: E501 - total amount of trading profit and loss. # noqa: E501 + total amount of trading profit and loss # noqa: E501 :return: The pnl of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def pnl(self): def pnl(self, pnl): """Sets the pnl of this FuturesAccountHistory. - total amount of trading profit and loss. # noqa: E501 + total amount of trading profit and loss # noqa: E501 :param pnl: The pnl of this FuturesAccountHistory. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def pnl(self, pnl): def fee(self): """Gets the fee of this FuturesAccountHistory. # noqa: E501 - total amount of fee. # noqa: E501 + total amount of fee # noqa: E501 :return: The fee of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this FuturesAccountHistory. - total amount of fee. # noqa: E501 + total amount of fee # noqa: E501 :param fee: The fee of this FuturesAccountHistory. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def fee(self, fee): def refr(self): """Gets the refr of this FuturesAccountHistory. # noqa: E501 - total amount of referrer rebates. # noqa: E501 + total amount of referrer rebates # noqa: E501 :return: The refr of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def refr(self): def refr(self, refr): """Sets the refr of this FuturesAccountHistory. - total amount of referrer rebates. # noqa: E501 + total amount of referrer rebates # noqa: E501 :param refr: The refr of this FuturesAccountHistory. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def refr(self, refr): def fund(self): """Gets the fund of this FuturesAccountHistory. # noqa: E501 - total amount of funding costs. # noqa: E501 + total amount of funding costs # noqa: E501 :return: The fund of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def fund(self): def fund(self, fund): """Sets the fund of this FuturesAccountHistory. - total amount of funding costs. # noqa: E501 + total amount of funding costs # noqa: E501 :param fund: The fund of this FuturesAccountHistory. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def fund(self, fund): def point_dnw(self): """Gets the point_dnw of this FuturesAccountHistory. # noqa: E501 - total amount of point deposit and withdraw. # noqa: E501 + total amount of point deposit and withdraw # noqa: E501 :return: The point_dnw of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def point_dnw(self): def point_dnw(self, point_dnw): """Sets the point_dnw of this FuturesAccountHistory. - total amount of point deposit and withdraw. # noqa: E501 + total amount of point deposit and withdraw # noqa: E501 :param point_dnw: The point_dnw of this FuturesAccountHistory. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def point_dnw(self, point_dnw): def point_fee(self): """Gets the point_fee of this FuturesAccountHistory. # noqa: E501 - total amount of point fee. # noqa: E501 + total amount of point fee # noqa: E501 :return: The point_fee of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this FuturesAccountHistory. - total amount of point fee. # noqa: E501 + total amount of point fee # noqa: E501 :param point_fee: The point_fee of this FuturesAccountHistory. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def point_fee(self, point_fee): def point_refr(self): """Gets the point_refr of this FuturesAccountHistory. # noqa: E501 - total amount of referrer rebates of point fee. # noqa: E501 + total amount of referrer rebates of point fee # noqa: E501 :return: The point_refr of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def point_refr(self): def point_refr(self, point_refr): """Sets the point_refr of this FuturesAccountHistory. - total amount of referrer rebates of point fee. # noqa: E501 + total amount of referrer rebates of point fee # noqa: E501 :param point_refr: The point_refr of this FuturesAccountHistory. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def point_refr(self, point_refr): def bonus_dnw(self): """Gets the bonus_dnw of this FuturesAccountHistory. # noqa: E501 - total amount of perpetual contract bonus transfer. # noqa: E501 + total amount of perpetual contract bonus transfer # noqa: E501 :return: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def bonus_dnw(self): def bonus_dnw(self, bonus_dnw): """Sets the bonus_dnw of this FuturesAccountHistory. - total amount of perpetual contract bonus transfer. # noqa: E501 + total amount of perpetual contract bonus transfer # noqa: E501 :param bonus_dnw: The bonus_dnw of this FuturesAccountHistory. # noqa: E501 :type: str @@ -309,7 +309,7 @@ def bonus_dnw(self, bonus_dnw): def bonus_offset(self): """Gets the bonus_offset of this FuturesAccountHistory. # noqa: E501 - total amount of perpetual contract bonus deduction. # noqa: E501 + total amount of perpetual contract bonus deduction # noqa: E501 :return: The bonus_offset of this FuturesAccountHistory. # noqa: E501 :rtype: str @@ -320,7 +320,7 @@ def bonus_offset(self): def bonus_offset(self, bonus_offset): """Sets the bonus_offset of this FuturesAccountHistory. - total amount of perpetual contract bonus deduction. # noqa: E501 + total amount of perpetual contract bonus deduction # noqa: E501 :param bonus_offset: The bonus_offset of this FuturesAccountHistory. # noqa: E501 :type: str diff --git a/gate_api/models/futures_auto_deleverage.py b/gate_api/models/futures_auto_deleverage.py index b736dc7..f6064c7 100644 --- a/gate_api/models/futures_auto_deleverage.py +++ b/gate_api/models/futures_auto_deleverage.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, time=None, user=None, order_id=None, contract=None, leverage= def time(self): """Gets the time of this FuturesAutoDeleverage. # noqa: E501 - Automatic deleveraging time. # noqa: E501 + Automatic deleveraging time # noqa: E501 :return: The time of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesAutoDeleverage. - Automatic deleveraging time. # noqa: E501 + Automatic deleveraging time # noqa: E501 :param time: The time of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def time(self, time): def user(self): """Gets the user of this FuturesAutoDeleverage. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -136,7 +136,7 @@ def user(self): def user(self, user): """Sets the user of this FuturesAutoDeleverage. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -148,7 +148,7 @@ def user(self, user): def order_id(self): """Gets the order_id of this FuturesAutoDeleverage. # noqa: E501 - Order ID. Order IDs before 2023-02-20 are null. # noqa: E501 + Order ID. Order IDs before 2023-02-20 are null # noqa: E501 :return: The order_id of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -159,7 +159,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this FuturesAutoDeleverage. - Order ID. Order IDs before 2023-02-20 are null. # noqa: E501 + Order ID. Order IDs before 2023-02-20 are null # noqa: E501 :param order_id: The order_id of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -171,7 +171,7 @@ def order_id(self, order_id): def contract(self): """Gets the contract of this FuturesAutoDeleverage. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesAutoDeleverage. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def contract(self, contract): def leverage(self): """Gets the leverage of this FuturesAutoDeleverage. # noqa: E501 - Position leverage. # noqa: E501 + Position leverage # noqa: E501 :return: The leverage of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this FuturesAutoDeleverage. - Position leverage. # noqa: E501 + Position leverage # noqa: E501 :param leverage: The leverage of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def leverage(self, leverage): def cross_leverage_limit(self): """Gets the cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 - Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 + Cross margin leverage (valid only when `leverage` is 0) # noqa: E501 :return: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def cross_leverage_limit(self): def cross_leverage_limit(self, cross_leverage_limit): """Sets the cross_leverage_limit of this FuturesAutoDeleverage. - Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 + Cross margin leverage (valid only when `leverage` is 0) # noqa: E501 :param cross_leverage_limit: The cross_leverage_limit of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def cross_leverage_limit(self, cross_leverage_limit): def entry_price(self): """Gets the entry_price of this FuturesAutoDeleverage. # noqa: E501 - Average entry price. # noqa: E501 + Average entry price # noqa: E501 :return: The entry_price of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this FuturesAutoDeleverage. - Average entry price. # noqa: E501 + Average entry price # noqa: E501 :param entry_price: The entry_price of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def entry_price(self, entry_price): def fill_price(self): """Gets the fill_price of this FuturesAutoDeleverage. # noqa: E501 - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :return: The fill_price of this FuturesAutoDeleverage. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesAutoDeleverage. - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :param fill_price: The fill_price of this FuturesAutoDeleverage. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def fill_price(self, fill_price): def trade_size(self): """Gets the trade_size of this FuturesAutoDeleverage. # noqa: E501 - Trading size. # noqa: E501 + Trading size # noqa: E501 :return: The trade_size of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -297,7 +297,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this FuturesAutoDeleverage. - Trading size. # noqa: E501 + Trading size # noqa: E501 :param trade_size: The trade_size of this FuturesAutoDeleverage. # noqa: E501 :type: int @@ -309,7 +309,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this FuturesAutoDeleverage. # noqa: E501 - Positions after auto-deleveraging. # noqa: E501 + Positions after auto-deleveraging # noqa: E501 :return: The position_size of this FuturesAutoDeleverage. # noqa: E501 :rtype: int @@ -320,7 +320,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this FuturesAutoDeleverage. - Positions after auto-deleveraging. # noqa: E501 + Positions after auto-deleveraging # noqa: E501 :param position_size: The position_size of this FuturesAutoDeleverage. # noqa: E501 :type: int diff --git a/gate_api/models/futures_batch_amend_order_request.py b/gate_api/models/futures_batch_amend_order_request.py index 910ba97..c12d869 100644 --- a/gate_api/models/futures_batch_amend_order_request.py +++ b/gate_api/models/futures_batch_amend_order_request.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, order_id=None, text=None, size=None, price=None, amend_text=N def order_id(self): """Gets the order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 - Order id, order_id and text must contain at least one. # noqa: E501 + Order id, order_id and text must contain at least one # noqa: E501 :return: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: int @@ -88,7 +88,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this FuturesBatchAmendOrderRequest. - Order id, order_id and text must contain at least one. # noqa: E501 + Order id, order_id and text must contain at least one # noqa: E501 :param order_id: The order_id of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: int @@ -100,7 +100,7 @@ def order_id(self, order_id): def text(self): """Gets the text of this FuturesBatchAmendOrderRequest. # noqa: E501 - User-defined order text, at least one of order_id and text must be passed. # noqa: E501 + User-defined order text, at least one of order_id and text must be passed # noqa: E501 :return: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesBatchAmendOrderRequest. - User-defined order text, at least one of order_id and text must be passed. # noqa: E501 + User-defined order text, at least one of order_id and text must be passed # noqa: E501 :param text: The text of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def text(self, text): def size(self): """Gets the size of this FuturesBatchAmendOrderRequest. # noqa: E501 - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501 :return: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: int @@ -134,7 +134,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesBatchAmendOrderRequest. - The new order size, including the executed order size. - If it is less than or equal to the executed quantity, the order will be cancelled. - The new order direction must be consistent with the original one. - The size of the closing order cannot be modified. - For orders that only reduce positions, if the size is increased, positions may be kicked out. - If the price is not modified, reducing the size will not affect the depth of the queue, and increasing the size will place it at the end of the current price. # noqa: E501 + New order size, including filled size. - If less than or equal to the filled quantity, the order will be cancelled. - The new order side must be identical to the original one. - Close order size cannot be modified. - For reduce-only orders, increasing the size may cancel other reduce-only orders. - If the price is not modified, decreasing the size will not affect the depth queue, while increasing the size will place it at the end of the current price level. # noqa: E501 :param size: The size of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: int @@ -146,7 +146,7 @@ def size(self, size): def price(self): """Gets the price of this FuturesBatchAmendOrderRequest. # noqa: E501 - New order price. # noqa: E501 + New order price # noqa: E501 :return: The price of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesBatchAmendOrderRequest. - New order price. # noqa: E501 + New order price # noqa: E501 :param price: The price of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :return: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this FuturesBatchAmendOrderRequest. - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :param amend_text: The amend_text of this FuturesBatchAmendOrderRequest. # noqa: E501 :type: str diff --git a/gate_api/models/futures_candlestick.py b/gate_api/models/futures_candlestick.py index 3094ad9..246d19d 100644 --- a/gate_api/models/futures_candlestick.py +++ b/gate_api/models/futures_candlestick.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, sum=None, loc def t(self): """Gets the t of this FuturesCandlestick. # noqa: E501 - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :return: The t of this FuturesCandlestick. # noqa: E501 :rtype: float @@ -98,7 +98,7 @@ def t(self): def t(self, t): """Sets the t of this FuturesCandlestick. - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :param t: The t of this FuturesCandlestick. # noqa: E501 :type: float @@ -110,7 +110,7 @@ def t(self, t): def v(self): """Gets the v of this FuturesCandlestick. # noqa: E501 - size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 :return: The v of this FuturesCandlestick. # noqa: E501 :rtype: int @@ -121,7 +121,7 @@ def v(self): def v(self, v): """Sets the v of this FuturesCandlestick. - size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 :param v: The v of this FuturesCandlestick. # noqa: E501 :type: int @@ -133,7 +133,7 @@ def v(self, v): def c(self): """Gets the c of this FuturesCandlestick. # noqa: E501 - Close price (quote currency). # noqa: E501 + Close price (quote currency) # noqa: E501 :return: The c of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def c(self): def c(self, c): """Sets the c of this FuturesCandlestick. - Close price (quote currency). # noqa: E501 + Close price (quote currency) # noqa: E501 :param c: The c of this FuturesCandlestick. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def c(self, c): def h(self): """Gets the h of this FuturesCandlestick. # noqa: E501 - Highest price (quote currency). # noqa: E501 + Highest price (quote currency) # noqa: E501 :return: The h of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def h(self): def h(self, h): """Sets the h of this FuturesCandlestick. - Highest price (quote currency). # noqa: E501 + Highest price (quote currency) # noqa: E501 :param h: The h of this FuturesCandlestick. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def h(self, h): def l(self): """Gets the l of this FuturesCandlestick. # noqa: E501 - Lowest price (quote currency). # noqa: E501 + Lowest price (quote currency) # noqa: E501 :return: The l of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def l(self): def l(self, l): """Sets the l of this FuturesCandlestick. - Lowest price (quote currency). # noqa: E501 + Lowest price (quote currency) # noqa: E501 :param l: The l of this FuturesCandlestick. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def l(self, l): def o(self): """Gets the o of this FuturesCandlestick. # noqa: E501 - Open price (quote currency). # noqa: E501 + Open price (quote currency) # noqa: E501 :return: The o of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def o(self): def o(self, o): """Sets the o of this FuturesCandlestick. - Open price (quote currency). # noqa: E501 + Open price (quote currency) # noqa: E501 :param o: The o of this FuturesCandlestick. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def o(self, o): def sum(self): """Gets the sum of this FuturesCandlestick. # noqa: E501 - Trading volume (unit: Quote currency). # noqa: E501 + Trading volume (unit: Quote currency) # noqa: E501 :return: The sum of this FuturesCandlestick. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def sum(self): def sum(self, sum): """Sets the sum of this FuturesCandlestick. - Trading volume (unit: Quote currency). # noqa: E501 + Trading volume (unit: Quote currency) # noqa: E501 :param sum: The sum of this FuturesCandlestick. # noqa: E501 :type: str diff --git a/gate_api/models/futures_fee.py b/gate_api/models/futures_fee.py index 92a437e..07aa347 100644 --- a/gate_api/models/futures_fee.py +++ b/gate_api/models/futures_fee.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, taker_fee=None, maker_fee=None, local_vars_configuration=None def taker_fee(self): """Gets the taker_fee of this FuturesFee. # noqa: E501 - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :return: The taker_fee of this FuturesFee. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def taker_fee(self): def taker_fee(self, taker_fee): """Sets the taker_fee of this FuturesFee. - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :param taker_fee: The taker_fee of this FuturesFee. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def taker_fee(self, taker_fee): def maker_fee(self): """Gets the maker_fee of this FuturesFee. # noqa: E501 - maker fee. # noqa: E501 + maker fee # noqa: E501 :return: The maker_fee of this FuturesFee. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def maker_fee(self): def maker_fee(self, maker_fee): """Sets the maker_fee of this FuturesFee. - maker fee. # noqa: E501 + maker fee # noqa: E501 :param maker_fee: The maker_fee of this FuturesFee. # noqa: E501 :type: str diff --git a/gate_api/models/futures_index_constituents.py b/gate_api/models/futures_index_constituents.py index 5f6c799..12232a7 100644 --- a/gate_api/models/futures_index_constituents.py +++ b/gate_api/models/futures_index_constituents.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, index=None, constituents=None, local_vars_configuration=None) def index(self): """Gets the index of this FuturesIndexConstituents. # noqa: E501 - Index name. # noqa: E501 + Index name # noqa: E501 :return: The index of this FuturesIndexConstituents. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def index(self): def index(self, index): """Sets the index of this FuturesIndexConstituents. - Index name. # noqa: E501 + Index name # noqa: E501 :param index: The index of this FuturesIndexConstituents. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def index(self, index): def constituents(self): """Gets the constituents of this FuturesIndexConstituents. # noqa: E501 - Constituents. # noqa: E501 + Constituents # noqa: E501 :return: The constituents of this FuturesIndexConstituents. # noqa: E501 :rtype: list[IndexConstituent] @@ -96,7 +96,7 @@ def constituents(self): def constituents(self, constituents): """Sets the constituents of this FuturesIndexConstituents. - Constituents. # noqa: E501 + Constituents # noqa: E501 :param constituents: The constituents of this FuturesIndexConstituents. # noqa: E501 :type: list[IndexConstituent] diff --git a/gate_api/models/futures_initial_order.py b/gate_api/models/futures_initial_order.py index 16a22df..7f3999c 100644 --- a/gate_api/models/futures_initial_order.py +++ b/gate_api/models/futures_initial_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -100,7 +100,7 @@ def __init__(self, contract=None, size=None, price=None, close=False, tif='gtc', def contract(self): """Gets the contract of this FuturesInitialOrder. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesInitialOrder. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this FuturesInitialOrder. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def size(self, size): def price(self): """Gets the price of this FuturesInitialOrder. # noqa: E501 - Order price. Set to 0 to use market price. # noqa: E501 + Order price. Set to 0 to use market price # noqa: E501 :return: The price of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesInitialOrder. - Order price. Set to 0 to use market price. # noqa: E501 + Order price. Set to 0 to use market price # noqa: E501 :param price: The price of this FuturesInitialOrder. # noqa: E501 :type: str @@ -196,7 +196,7 @@ def close(self, close): def tif(self): """Gets the tif of this FuturesInitialOrder. # noqa: E501 - Time in force strategy, default is gtc, market order currently only supports ioc mode mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 + Time in force strategy, default is gtc, market orders currently only support ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 :return: The tif of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -207,7 +207,7 @@ def tif(self): def tif(self, tif): """Sets the tif of this FuturesInitialOrder. - Time in force strategy, default is gtc, market order currently only supports ioc mode mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 + Time in force strategy, default is gtc, market orders currently only support ioc mode - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled # noqa: E501 :param tif: The tif of this FuturesInitialOrder. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def tif(self, tif): def text(self): """Gets the text of this FuturesInitialOrder. # noqa: E501 - The source of the order, including: - web: web - api: api - app: app # noqa: E501 + The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501 :return: The text of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesInitialOrder. - The source of the order, including: - web: web - api: api - app: app # noqa: E501 + The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501 :param text: The text of this FuturesInitialOrder. # noqa: E501 :type: str @@ -271,7 +271,7 @@ def reduce_only(self, reduce_only): def auto_size(self): """Gets the auto_size of this FuturesInitialOrder. # noqa: E501 - Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size # noqa: E501 + Single position mode: auto_size is not required Dual position mode full closing (size=0): auto_size must be set, close_long for closing long positions, close_short for closing short positions Dual position mode partial closing (size≠0): auto_size is not required # noqa: E501 :return: The auto_size of this FuturesInitialOrder. # noqa: E501 :rtype: str @@ -282,7 +282,7 @@ def auto_size(self): def auto_size(self, auto_size): """Sets the auto_size of this FuturesInitialOrder. - Do not set auto_size When the dual-position mode is closed all positions (size=0), auto_size, close_long, close_short, short When the double-storey mode partially closes the position (size ≠ 0), there is no need to set auto_size # noqa: E501 + Single position mode: auto_size is not required Dual position mode full closing (size=0): auto_size must be set, close_long for closing long positions, close_short for closing short positions Dual position mode partial closing (size≠0): auto_size is not required # noqa: E501 :param auto_size: The auto_size of this FuturesInitialOrder. # noqa: E501 :type: str @@ -294,7 +294,7 @@ def auto_size(self, auto_size): def is_reduce_only(self): """Gets the is_reduce_only of this FuturesInitialOrder. # noqa: E501 - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :return: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 :rtype: bool @@ -305,7 +305,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this FuturesInitialOrder. - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :param is_reduce_only: The is_reduce_only of this FuturesInitialOrder. # noqa: E501 :type: bool @@ -317,7 +317,7 @@ def is_reduce_only(self, is_reduce_only): def is_close(self): """Gets the is_close of this FuturesInitialOrder. # noqa: E501 - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :return: The is_close of this FuturesInitialOrder. # noqa: E501 :rtype: bool @@ -328,7 +328,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this FuturesInitialOrder. - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :param is_close: The is_close of this FuturesInitialOrder. # noqa: E501 :type: bool diff --git a/gate_api/models/futures_limit_risk_tiers.py b/gate_api/models/futures_limit_risk_tiers.py index 121a550..a636a2e 100644 --- a/gate_api/models/futures_limit_risk_tiers.py +++ b/gate_api/models/futures_limit_risk_tiers.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_ra def tier(self): """Gets the tier of this FuturesLimitRiskTiers. # noqa: E501 - Tier. # noqa: E501 + Tier # noqa: E501 :return: The tier of this FuturesLimitRiskTiers. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this FuturesLimitRiskTiers. - Tier. # noqa: E501 + Tier # noqa: E501 :param tier: The tier of this FuturesLimitRiskTiers. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def tier(self, tier): def risk_limit(self): """Gets the risk_limit of this FuturesLimitRiskTiers. # noqa: E501 - Position risk limit. # noqa: E501 + Position risk limit # noqa: E501 :return: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def risk_limit(self): def risk_limit(self, risk_limit): """Sets the risk_limit of this FuturesLimitRiskTiers. - Position risk limit. # noqa: E501 + Position risk limit # noqa: E501 :param risk_limit: The risk_limit of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def risk_limit(self, risk_limit): def initial_rate(self): """Gets the initial_rate of this FuturesLimitRiskTiers. # noqa: E501 - Initial margin rate. # noqa: E501 + Initial margin rate # noqa: E501 :return: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def initial_rate(self): def initial_rate(self, initial_rate): """Sets the initial_rate of this FuturesLimitRiskTiers. - Initial margin rate. # noqa: E501 + Initial margin rate # noqa: E501 :param initial_rate: The initial_rate of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def initial_rate(self, initial_rate): def maintenance_rate(self): """Gets the maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 - Maintenance margin rate. # noqa: E501 + Maintenance margin rate # noqa: E501 :return: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this FuturesLimitRiskTiers. - Maintenance margin rate. # noqa: E501 + Maintenance margin rate # noqa: E501 :param maintenance_rate: The maintenance_rate of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def maintenance_rate(self, maintenance_rate): def leverage_max(self): """Gets the leverage_max of this FuturesLimitRiskTiers. # noqa: E501 - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :return: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this FuturesLimitRiskTiers. - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :param leverage_max: The leverage_max of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def leverage_max(self, leverage_max): def contract(self): """Gets the contract of this FuturesLimitRiskTiers. # noqa: E501 - Markets, visible only during market pagination requests. # noqa: E501 + Market, only visible when market pagination is requested # noqa: E501 :return: The contract of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesLimitRiskTiers. - Markets, visible only during market pagination requests. # noqa: E501 + Market, only visible when market pagination is requested # noqa: E501 :param contract: The contract of this FuturesLimitRiskTiers. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def contract(self, contract): def deduction(self): """Gets the deduction of this FuturesLimitRiskTiers. # noqa: E501 - Maintenance margin quick calculation deduction. # noqa: E501 + Maintenance margin quick calculation deduction amount # noqa: E501 :return: The deduction of this FuturesLimitRiskTiers. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def deduction(self): def deduction(self, deduction): """Sets the deduction of this FuturesLimitRiskTiers. - Maintenance margin quick calculation deduction. # noqa: E501 + Maintenance margin quick calculation deduction amount # noqa: E501 :param deduction: The deduction of this FuturesLimitRiskTiers. # noqa: E501 :type: str diff --git a/gate_api/models/futures_liq_order.py b/gate_api/models/futures_liq_order.py index d57b282..fabcb0a 100644 --- a/gate_api/models/futures_liq_order.py +++ b/gate_api/models/futures_liq_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, time=None, contract=None, size=None, order_size=None, order_p def time(self): """Gets the time of this FuturesLiqOrder. # noqa: E501 - Liquidation time. # noqa: E501 + Liquidation time # noqa: E501 :return: The time of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesLiqOrder. - Liquidation time. # noqa: E501 + Liquidation time # noqa: E501 :param time: The time of this FuturesLiqOrder. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def time(self, time): def contract(self): """Gets the contract of this FuturesLiqOrder. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this FuturesLiqOrder. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesLiqOrder. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this FuturesLiqOrder. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def contract(self, contract): def size(self): """Gets the size of this FuturesLiqOrder. # noqa: E501 - User position size. # noqa: E501 + User position size # noqa: E501 :return: The size of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -144,7 +144,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesLiqOrder. - User position size. # noqa: E501 + User position size # noqa: E501 :param size: The size of this FuturesLiqOrder. # noqa: E501 :type: int @@ -156,7 +156,7 @@ def size(self, size): def order_size(self): """Gets the order_size of this FuturesLiqOrder. # noqa: E501 - Number of forced liquidation orders. # noqa: E501 + Number of forced liquidation orders # noqa: E501 :return: The order_size of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -167,7 +167,7 @@ def order_size(self): def order_size(self, order_size): """Sets the order_size of this FuturesLiqOrder. - Number of forced liquidation orders. # noqa: E501 + Number of forced liquidation orders # noqa: E501 :param order_size: The order_size of this FuturesLiqOrder. # noqa: E501 :type: int @@ -179,7 +179,7 @@ def order_size(self, order_size): def order_price(self): """Gets the order_price of this FuturesLiqOrder. # noqa: E501 - Liquidation order price. # noqa: E501 + Liquidation order price # noqa: E501 :return: The order_price of this FuturesLiqOrder. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def order_price(self): def order_price(self, order_price): """Sets the order_price of this FuturesLiqOrder. - Liquidation order price. # noqa: E501 + Liquidation order price # noqa: E501 :param order_price: The order_price of this FuturesLiqOrder. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def order_price(self, order_price): def fill_price(self): """Gets the fill_price of this FuturesLiqOrder. # noqa: E501 - Liquidation order average taker price. # noqa: E501 + Liquidation order average taker price # noqa: E501 :return: The fill_price of this FuturesLiqOrder. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesLiqOrder. - Liquidation order average taker price. # noqa: E501 + Liquidation order average taker price # noqa: E501 :param fill_price: The fill_price of this FuturesLiqOrder. # noqa: E501 :type: str @@ -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 + System liquidation order maker size # noqa: E501 :return: The left of this FuturesLiqOrder. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def left(self): def left(self, left): """Sets the left of this FuturesLiqOrder. - System liquidation order maker size. # noqa: E501 + System liquidation order maker size # noqa: E501 :param left: The left of this FuturesLiqOrder. # noqa: E501 :type: int diff --git a/gate_api/models/futures_liquidate.py b/gate_api/models/futures_liquidate.py index 9e27ab5..549e71f 100644 --- a/gate_api/models/futures_liquidate.py +++ b/gate_api/models/futures_liquidate.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -112,7 +112,7 @@ def __init__(self, time=None, contract=None, leverage=None, size=None, margin=No def time(self): """Gets the time of this FuturesLiquidate. # noqa: E501 - Liquidation time. # noqa: E501 + Liquidation time # noqa: E501 :return: The time of this FuturesLiquidate. # noqa: E501 :rtype: int @@ -123,7 +123,7 @@ def time(self): def time(self, time): """Sets the time of this FuturesLiquidate. - Liquidation time. # noqa: E501 + Liquidation time # noqa: E501 :param time: The time of this FuturesLiquidate. # noqa: E501 :type: int @@ -135,7 +135,7 @@ def time(self, time): def contract(self): """Gets the contract of this FuturesLiquidate. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesLiquidate. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this FuturesLiquidate. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def contract(self, contract): def leverage(self): """Gets the leverage of this FuturesLiquidate. # noqa: E501 - Position leverage. Not returned in public endpoints. # noqa: E501 + Position leverage. Not returned in public endpoints # noqa: E501 :return: The leverage of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this FuturesLiquidate. - Position leverage. Not returned in public endpoints. # noqa: E501 + Position leverage. Not returned in public endpoints # noqa: E501 :param leverage: The leverage of this FuturesLiquidate. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def leverage(self, leverage): def size(self): """Gets the size of this FuturesLiquidate. # noqa: E501 - Position size. # noqa: E501 + Position size # noqa: E501 :return: The size of this FuturesLiquidate. # noqa: E501 :rtype: int @@ -192,7 +192,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesLiquidate. - Position size. # noqa: E501 + Position size # noqa: E501 :param size: The size of this FuturesLiquidate. # noqa: E501 :type: int @@ -204,7 +204,7 @@ def size(self, size): def margin(self): """Gets the margin of this FuturesLiquidate. # noqa: E501 - Position margin. Not returned in public endpoints. # noqa: E501 + Position margin. Not returned in public endpoints # noqa: E501 :return: The margin of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this FuturesLiquidate. - Position margin. Not returned in public endpoints. # noqa: E501 + Position margin. Not returned in public endpoints # noqa: E501 :param margin: The margin of this FuturesLiquidate. # noqa: E501 :type: str @@ -227,7 +227,7 @@ def margin(self, margin): def entry_price(self): """Gets the entry_price of this FuturesLiquidate. # noqa: E501 - Average entry price. Not returned in public endpoints. # noqa: E501 + Average entry price. Not returned in public endpoints # noqa: E501 :return: The entry_price of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -238,7 +238,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this FuturesLiquidate. - Average entry price. Not returned in public endpoints. # noqa: E501 + Average entry price. Not returned in public endpoints # noqa: E501 :param entry_price: The entry_price of this FuturesLiquidate. # noqa: E501 :type: str @@ -250,7 +250,7 @@ def entry_price(self, entry_price): def liq_price(self): """Gets the liq_price of this FuturesLiquidate. # noqa: E501 - Liquidation price. Not returned in public endpoints. # noqa: E501 + Liquidation price. Not returned in public endpoints # noqa: E501 :return: The liq_price of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -261,7 +261,7 @@ def liq_price(self): def liq_price(self, liq_price): """Sets the liq_price of this FuturesLiquidate. - Liquidation price. Not returned in public endpoints. # noqa: E501 + Liquidation price. Not returned in public endpoints # noqa: E501 :param liq_price: The liq_price of this FuturesLiquidate. # noqa: E501 :type: str @@ -273,7 +273,7 @@ def liq_price(self, liq_price): def mark_price(self): """Gets the mark_price of this FuturesLiquidate. # noqa: E501 - Mark price. Not returned in public endpoints. # noqa: E501 + Mark price. Not returned in public endpoints # noqa: E501 :return: The mark_price of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -284,7 +284,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this FuturesLiquidate. - Mark price. Not returned in public endpoints. # noqa: E501 + Mark price. Not returned in public endpoints # noqa: E501 :param mark_price: The mark_price of this FuturesLiquidate. # noqa: E501 :type: str @@ -296,7 +296,7 @@ def mark_price(self, mark_price): def order_id(self): """Gets the order_id of this FuturesLiquidate. # noqa: E501 - Liquidation order ID. Not returned in public endpoints. # noqa: E501 + Liquidation order ID. Not returned in public endpoints # noqa: E501 :return: The order_id of this FuturesLiquidate. # noqa: E501 :rtype: int @@ -307,7 +307,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this FuturesLiquidate. - Liquidation order ID. Not returned in public endpoints. # noqa: E501 + Liquidation order ID. Not returned in public endpoints # noqa: E501 :param order_id: The order_id of this FuturesLiquidate. # noqa: E501 :type: int @@ -319,7 +319,7 @@ def order_id(self, order_id): def order_price(self): """Gets the order_price of this FuturesLiquidate. # noqa: E501 - Liquidation order price. # noqa: E501 + Liquidation order price # noqa: E501 :return: The order_price of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -330,7 +330,7 @@ def order_price(self): def order_price(self, order_price): """Sets the order_price of this FuturesLiquidate. - Liquidation order price. # noqa: E501 + Liquidation order price # noqa: E501 :param order_price: The order_price of this FuturesLiquidate. # noqa: E501 :type: str @@ -342,7 +342,7 @@ def order_price(self, order_price): def fill_price(self): """Gets the fill_price of this FuturesLiquidate. # noqa: E501 - Liquidation order average taker price. # noqa: E501 + Liquidation order average taker price # noqa: E501 :return: The fill_price of this FuturesLiquidate. # noqa: E501 :rtype: str @@ -353,7 +353,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesLiquidate. - Liquidation order average taker price. # noqa: E501 + Liquidation order average taker price # noqa: E501 :param fill_price: The fill_price of this FuturesLiquidate. # noqa: E501 :type: str @@ -365,7 +365,7 @@ def fill_price(self, fill_price): def left(self): """Gets the left of this FuturesLiquidate. # noqa: E501 - Liquidation order maker size. # noqa: E501 + Liquidation order maker size # noqa: E501 :return: The left of this FuturesLiquidate. # noqa: E501 :rtype: int @@ -376,7 +376,7 @@ def left(self): def left(self, left): """Sets the left of this FuturesLiquidate. - Liquidation order maker size. # noqa: E501 + Liquidation order maker size # noqa: E501 :param left: The left of this FuturesLiquidate. # noqa: E501 :type: int diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index 9bd08b7..368dd3b 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -180,7 +180,7 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis def id(self): """Gets the id of this FuturesOrder. # noqa: E501 - Futures order ID. # noqa: E501 + Futures order ID # noqa: E501 :return: The id of this FuturesOrder. # noqa: E501 :rtype: int @@ -191,7 +191,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesOrder. - Futures order ID. # noqa: E501 + Futures order ID # noqa: E501 :param id: The id of this FuturesOrder. # noqa: E501 :type: int @@ -203,7 +203,7 @@ def id(self, id): def user(self): """Gets the user of this FuturesOrder. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this FuturesOrder. # noqa: E501 :rtype: int @@ -214,7 +214,7 @@ def user(self): def user(self, user): """Sets the user of this FuturesOrder. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this FuturesOrder. # noqa: E501 :type: int @@ -226,7 +226,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this FuturesOrder. # noqa: E501 - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :return: The create_time of this FuturesOrder. # noqa: E501 :rtype: float @@ -237,7 +237,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FuturesOrder. - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :param create_time: The create_time of this FuturesOrder. # noqa: E501 :type: float @@ -249,7 +249,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this FuturesOrder. # noqa: E501 - Order finished time. Not returned if order is open. # noqa: E501 + Order finished time. Not returned if order is open # noqa: E501 :return: The finish_time of this FuturesOrder. # noqa: E501 :rtype: float @@ -260,7 +260,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this FuturesOrder. - Order finished time. Not returned if order is open. # noqa: E501 + Order finished time. Not returned if order is open # noqa: E501 :param finish_time: The finish_time of this FuturesOrder. # noqa: E501 :type: float @@ -272,7 +272,7 @@ def finish_time(self, finish_time): def finish_as(self): """Gets the finish_as of this FuturesOrder. # noqa: E501 - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :return: The finish_as of this FuturesOrder. # noqa: E501 :rtype: str @@ -283,7 +283,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this FuturesOrder. - How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 + How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention # noqa: E501 :param finish_as: The finish_as of this FuturesOrder. # noqa: E501 :type: str @@ -301,7 +301,7 @@ def finish_as(self, finish_as): def status(self): """Gets the status of this FuturesOrder. # noqa: E501 - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + Order status - `open`: Pending - `finished`: Completed # noqa: E501 :return: The status of this FuturesOrder. # noqa: E501 :rtype: str @@ -312,7 +312,7 @@ def status(self): def status(self, status): """Sets the status of this FuturesOrder. - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + Order status - `open`: Pending - `finished`: Completed # noqa: E501 :param status: The status of this FuturesOrder. # noqa: E501 :type: str @@ -330,7 +330,7 @@ def status(self, status): def contract(self): """Gets the contract of this FuturesOrder. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this FuturesOrder. # noqa: E501 :rtype: str @@ -341,7 +341,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesOrder. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this FuturesOrder. # noqa: E501 :type: str @@ -355,7 +355,7 @@ def contract(self, contract): def size(self): """Gets the size of this FuturesOrder. # noqa: E501 - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501 :return: The size of this FuturesOrder. # noqa: E501 :rtype: int @@ -366,7 +366,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesOrder. - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501 :param size: The size of this FuturesOrder. # noqa: E501 :type: int @@ -380,7 +380,7 @@ def size(self, size): def iceberg(self): """Gets the iceberg of this FuturesOrder. # noqa: E501 - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501 :return: The iceberg of this FuturesOrder. # noqa: E501 :rtype: int @@ -391,7 +391,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this FuturesOrder. - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501 :param iceberg: The iceberg of this FuturesOrder. # noqa: E501 :type: int @@ -403,7 +403,7 @@ def iceberg(self, iceberg): def price(self): """Gets the price of this FuturesOrder. # noqa: E501 - Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 + Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501 :return: The price of this FuturesOrder. # noqa: E501 :rtype: str @@ -414,7 +414,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesOrder. - Order price. 0 for market order with `tif` set as `ioc`. # noqa: E501 + Order price. Price of 0 with `tif` set to `ioc` represents a market order. # noqa: E501 :param price: The price of this FuturesOrder. # noqa: E501 :type: str @@ -426,7 +426,7 @@ def price(self, price): def close(self): """Gets the close of this FuturesOrder. # noqa: E501 - Set as `true` to close the position, with `size` set to 0. # noqa: E501 + Set as `true` to close the position, with `size` set to 0 # noqa: E501 :return: The close of this FuturesOrder. # noqa: E501 :rtype: bool @@ -437,7 +437,7 @@ def close(self): def close(self, close): """Sets the close of this FuturesOrder. - Set as `true` to close the position, with `size` set to 0. # noqa: E501 + Set as `true` to close the position, with `size` set to 0 # noqa: E501 :param close: The close of this FuturesOrder. # noqa: E501 :type: bool @@ -449,7 +449,7 @@ def close(self, close): def is_close(self): """Gets the is_close of this FuturesOrder. # noqa: E501 - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :return: The is_close of this FuturesOrder. # noqa: E501 :rtype: bool @@ -460,7 +460,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this FuturesOrder. - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :param is_close: The is_close of this FuturesOrder. # noqa: E501 :type: bool @@ -472,7 +472,7 @@ def is_close(self, is_close): def reduce_only(self): """Gets the reduce_only of this FuturesOrder. # noqa: E501 - Set as `true` to be reduce-only order. # noqa: E501 + Set as `true` to be reduce-only order # noqa: E501 :return: The reduce_only of this FuturesOrder. # noqa: E501 :rtype: bool @@ -483,7 +483,7 @@ def reduce_only(self): def reduce_only(self, reduce_only): """Sets the reduce_only of this FuturesOrder. - Set as `true` to be reduce-only order. # noqa: E501 + Set as `true` to be reduce-only order # noqa: E501 :param reduce_only: The reduce_only of this FuturesOrder. # noqa: E501 :type: bool @@ -495,7 +495,7 @@ def reduce_only(self, reduce_only): def is_reduce_only(self): """Gets the is_reduce_only of this FuturesOrder. # noqa: E501 - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :return: The is_reduce_only of this FuturesOrder. # noqa: E501 :rtype: bool @@ -506,7 +506,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this FuturesOrder. - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :param is_reduce_only: The is_reduce_only of this FuturesOrder. # noqa: E501 :type: bool @@ -518,7 +518,7 @@ def is_reduce_only(self, is_reduce_only): def is_liq(self): """Gets the is_liq of this FuturesOrder. # noqa: E501 - Is the order for liquidation. # noqa: E501 + Is the order for liquidation # noqa: E501 :return: The is_liq of this FuturesOrder. # noqa: E501 :rtype: bool @@ -529,7 +529,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this FuturesOrder. - Is the order for liquidation. # noqa: E501 + Is the order for liquidation # noqa: E501 :param is_liq: The is_liq of this FuturesOrder. # noqa: E501 :type: bool @@ -570,7 +570,7 @@ def tif(self, tif): def left(self): """Gets the left of this FuturesOrder. # noqa: E501 - Size left to be traded. # noqa: E501 + Unfilled quantity # noqa: E501 :return: The left of this FuturesOrder. # noqa: E501 :rtype: int @@ -581,7 +581,7 @@ def left(self): def left(self, left): """Sets the left of this FuturesOrder. - Size left to be traded. # noqa: E501 + Unfilled quantity # noqa: E501 :param left: The left of this FuturesOrder. # noqa: E501 :type: int @@ -593,7 +593,7 @@ def left(self, left): def fill_price(self): """Gets the fill_price of this FuturesOrder. # noqa: E501 - Fill price of the order. # noqa: E501 + Fill price # noqa: E501 :return: The fill_price of this FuturesOrder. # noqa: E501 :rtype: str @@ -604,7 +604,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this FuturesOrder. - Fill price of the order. # noqa: E501 + Fill price # noqa: E501 :param fill_price: The fill_price of this FuturesOrder. # noqa: E501 :type: str @@ -616,7 +616,7 @@ def fill_price(self, fill_price): def text(self): """Gets the text of this FuturesOrder. # noqa: E501 - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-x: new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-x: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 + Custom order information. If not empty, must follow the rules below: 1. Prefixed with `t-` 2. No longer than 28 bytes without `t-` prefix 3. Can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) In addition to user-defined information, the following are internal reserved fields that identify the order source: - web: Web - api: API call - app: Mobile app - auto_deleveraging: Automatic deleveraging - liquidation: Forced liquidation of positions under the old classic mode - liq-xxx: a. Forced liquidation of positions under the new classic mode, including isolated margin, one-way cross margin, and non-hedged positions under two-way cross margin. b. Forced liquidation of isolated positions under the unified account single-currency margin mode - hedge-liq-xxx: Forced liquidation of hedged positions under the new classic mode two-way cross margin, i.e., simultaneously closing long and short positions - pm_liquidate: Forced liquidation under unified account multi-currency margin mode - comb_margin_liquidate: Forced liquidation under unified account portfolio margin mode - scm_liquidate: Forced liquidation of positions under unified account single-currency margin mode - insurance: Insurance # noqa: E501 :return: The text of this FuturesOrder. # noqa: E501 :rtype: str @@ -627,7 +627,7 @@ def text(self): def text(self, text): """Sets the text of this FuturesOrder. - Order custom information, users can use this field to set a custom ID, and the user-defined field must meet the following conditions: 1. Must start with `t-` 2. If `t-` is not calculated, the length cannot exceed 28 bytes 3. The input content can only contain numbers, letters, underscores (_), midscores (-) or dots (.) In addition to user-defined information, the following are internal reserved fields that identifies the source of the order: - web: web page - api: API call - app: mobile terminal - auto_deleveraging: Automatic position reduction - liquidation: Liquidation under the classic account’s old liquidation mode - liq-x: new liquidation mode (isolated, cross margin one-way mode, non-hedging part of cross margin hedge mode) b. Liquidation under isolated margin in unified account single currency margin mode - hedge-liq-x: Liquidation under the new liquidation mode of the classic account hedge mode, the cross margin hedged part undergoes liquidation, meaning both long and short positions are liquidated simultaneously. - pm_liquidate: Unified account multi-currency margin mode liquidation - comb_margin_liquidate: Unified account portfolio margin mode liquidation - scm_liquidate: Unified account single currency margin mode liquidation - insurance: insurance # noqa: E501 + Custom order information. If not empty, must follow the rules below: 1. Prefixed with `t-` 2. No longer than 28 bytes without `t-` prefix 3. Can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) In addition to user-defined information, the following are internal reserved fields that identify the order source: - web: Web - api: API call - app: Mobile app - auto_deleveraging: Automatic deleveraging - liquidation: Forced liquidation of positions under the old classic mode - liq-xxx: a. Forced liquidation of positions under the new classic mode, including isolated margin, one-way cross margin, and non-hedged positions under two-way cross margin. b. Forced liquidation of isolated positions under the unified account single-currency margin mode - hedge-liq-xxx: Forced liquidation of hedged positions under the new classic mode two-way cross margin, i.e., simultaneously closing long and short positions - pm_liquidate: Forced liquidation under unified account multi-currency margin mode - comb_margin_liquidate: Forced liquidation under unified account portfolio margin mode - scm_liquidate: Forced liquidation of positions under unified account single-currency margin mode - insurance: Insurance # noqa: E501 :param text: The text of this FuturesOrder. # noqa: E501 :type: str @@ -639,7 +639,7 @@ def text(self, text): def tkfr(self): """Gets the tkfr of this FuturesOrder. # noqa: E501 - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :return: The tkfr of this FuturesOrder. # noqa: E501 :rtype: str @@ -650,7 +650,7 @@ def tkfr(self): def tkfr(self, tkfr): """Sets the tkfr of this FuturesOrder. - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :param tkfr: The tkfr of this FuturesOrder. # noqa: E501 :type: str @@ -662,7 +662,7 @@ def tkfr(self, tkfr): def mkfr(self): """Gets the mkfr of this FuturesOrder. # noqa: E501 - Maker fee. # noqa: E501 + Maker fee # noqa: E501 :return: The mkfr of this FuturesOrder. # noqa: E501 :rtype: str @@ -673,7 +673,7 @@ def mkfr(self): def mkfr(self, mkfr): """Sets the mkfr of this FuturesOrder. - Maker fee. # noqa: E501 + Maker fee # noqa: E501 :param mkfr: The mkfr of this FuturesOrder. # noqa: E501 :type: str @@ -685,7 +685,7 @@ def mkfr(self, mkfr): def refu(self): """Gets the refu of this FuturesOrder. # noqa: E501 - Reference user ID. # noqa: E501 + Referrer user ID # noqa: E501 :return: The refu of this FuturesOrder. # noqa: E501 :rtype: int @@ -696,7 +696,7 @@ def refu(self): def refu(self, refu): """Sets the refu of this FuturesOrder. - Reference user ID. # noqa: E501 + Referrer user ID # noqa: E501 :param refu: The refu of this FuturesOrder. # noqa: E501 :type: int @@ -760,7 +760,7 @@ def stp_id(self, stp_id): def stp_act(self): """Gets the stp_act of this FuturesOrder. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this FuturesOrder. # noqa: E501 :rtype: str @@ -771,7 +771,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this FuturesOrder. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this FuturesOrder. # noqa: E501 :type: str @@ -789,7 +789,7 @@ def stp_act(self, stp_act): def amend_text(self): """Gets the amend_text of this FuturesOrder. # noqa: E501 - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :return: The amend_text of this FuturesOrder. # noqa: E501 :rtype: str @@ -800,7 +800,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this FuturesOrder. - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :param amend_text: The amend_text of this FuturesOrder. # noqa: E501 :type: str diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py index 267b361..920a9c9 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -90,7 +90,7 @@ def size(self, size): def price(self): """Gets the price of this FuturesOrderAmendment. # noqa: E501 - New order price. # noqa: E501 + New order price # noqa: E501 :return: The price of this FuturesOrderAmendment. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesOrderAmendment. - New order price. # noqa: E501 + New order price # noqa: E501 :param price: The price of this FuturesOrderAmendment. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this FuturesOrderAmendment. # noqa: E501 - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :return: The amend_text of this FuturesOrderAmendment. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this FuturesOrderAmendment. - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :param amend_text: The amend_text of this FuturesOrderAmendment. # noqa: E501 :type: str diff --git a/gate_api/models/futures_order_book.py b/gate_api/models/futures_order_book.py index 48e22d5..cc240a6 100644 --- a/gate_api/models/futures_order_book.py +++ b/gate_api/models/futures_order_book.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -98,7 +98,7 @@ def id(self, id): def current(self): """Gets the current of this FuturesOrderBook. # noqa: E501 - Response data generation timestamp. # noqa: E501 + Response data generation timestamp # noqa: E501 :return: The current of this FuturesOrderBook. # noqa: E501 :rtype: float @@ -109,7 +109,7 @@ def current(self): def current(self, current): """Sets the current of this FuturesOrderBook. - Response data generation timestamp. # noqa: E501 + Response data generation timestamp # noqa: E501 :param current: The current of this FuturesOrderBook. # noqa: E501 :type: float @@ -121,7 +121,7 @@ def current(self, current): def update(self): """Gets the update of this FuturesOrderBook. # noqa: E501 - Order book changed timestamp. # noqa: E501 + Order book changed timestamp # noqa: E501 :return: The update of this FuturesOrderBook. # noqa: E501 :rtype: float @@ -132,7 +132,7 @@ def update(self): def update(self, update): """Sets the update of this FuturesOrderBook. - Order book changed timestamp. # noqa: E501 + Order book changed timestamp # noqa: E501 :param update: The update of this FuturesOrderBook. # noqa: E501 :type: float @@ -144,7 +144,7 @@ def update(self, update): def asks(self): """Gets the asks of this FuturesOrderBook. # noqa: E501 - Asks order depth. # noqa: E501 + Ask Depth # noqa: E501 :return: The asks of this FuturesOrderBook. # noqa: E501 :rtype: list[FuturesOrderBookItem] @@ -155,7 +155,7 @@ def asks(self): def asks(self, asks): """Sets the asks of this FuturesOrderBook. - Asks order depth. # noqa: E501 + Ask Depth # noqa: E501 :param asks: The asks of this FuturesOrderBook. # noqa: E501 :type: list[FuturesOrderBookItem] @@ -169,7 +169,7 @@ def asks(self, asks): def bids(self): """Gets the bids of this FuturesOrderBook. # noqa: E501 - Bids order depth. # noqa: E501 + Bid Depth # noqa: E501 :return: The bids of this FuturesOrderBook. # noqa: E501 :rtype: list[FuturesOrderBookItem] @@ -180,7 +180,7 @@ def bids(self): def bids(self, bids): """Sets the bids of this FuturesOrderBook. - Bids order depth. # noqa: E501 + Bid Depth # noqa: E501 :param bids: The bids of this FuturesOrderBook. # noqa: E501 :type: list[FuturesOrderBookItem] diff --git a/gate_api/models/futures_order_book_item.py b/gate_api/models/futures_order_book_item.py index da75584..4ca4732 100644 --- a/gate_api/models/futures_order_book_item.py +++ b/gate_api/models/futures_order_book_item.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, p=None, s=None, local_vars_configuration=None): # noqa: E501 def p(self): """Gets the p of this FuturesOrderBookItem. # noqa: E501 - Price (quote currency). # noqa: E501 + Price (quote currency) # noqa: E501 :return: The p of this FuturesOrderBookItem. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def p(self): def p(self, p): """Sets the p of this FuturesOrderBookItem. - Price (quote currency). # noqa: E501 + Price (quote currency) # noqa: E501 :param p: The p of this FuturesOrderBookItem. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def p(self, p): def s(self): """Gets the s of this FuturesOrderBookItem. # noqa: E501 - Size. # noqa: E501 + Size # noqa: E501 :return: The s of this FuturesOrderBookItem. # noqa: E501 :rtype: int @@ -96,7 +96,7 @@ def s(self): def s(self, s): """Sets the s of this FuturesOrderBookItem. - Size. # noqa: E501 + Size # noqa: E501 :param s: The s of this FuturesOrderBookItem. # noqa: E501 :type: int diff --git a/gate_api/models/futures_position_cross_mode.py b/gate_api/models/futures_position_cross_mode.py index 1297bb6..4f4a83c 100644 --- a/gate_api/models/futures_position_cross_mode.py +++ b/gate_api/models/futures_position_cross_mode.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, mode=None, contract=None, local_vars_configuration=None): # def mode(self): """Gets the mode of this FuturesPositionCrossMode. # noqa: E501 - Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 + Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501 :return: The mode of this FuturesPositionCrossMode. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this FuturesPositionCrossMode. - Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 + Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501 :param mode: The mode of this FuturesPositionCrossMode. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def mode(self, mode): def contract(self): """Gets the contract of this FuturesPositionCrossMode. # noqa: E501 - Contract Market. # noqa: E501 + Futures market # noqa: E501 :return: The contract of this FuturesPositionCrossMode. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesPositionCrossMode. - Contract Market. # noqa: E501 + Futures market # noqa: E501 :param contract: The contract of this FuturesPositionCrossMode. # noqa: E501 :type: str diff --git a/gate_api/models/futures_premium_index.py b/gate_api/models/futures_premium_index.py index f4b3a62..f02adc1 100644 --- a/gate_api/models/futures_premium_index.py +++ b/gate_api/models/futures_premium_index.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, t=None, c=None, h=None, l=None, o=None, local_vars_configurat def t(self): """Gets the t of this FuturesPremiumIndex. # noqa: E501 - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :return: The t of this FuturesPremiumIndex. # noqa: E501 :rtype: float @@ -88,7 +88,7 @@ def t(self): def t(self, t): """Sets the t of this FuturesPremiumIndex. - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :param t: The t of this FuturesPremiumIndex. # noqa: E501 :type: float @@ -100,7 +100,7 @@ def t(self, t): def c(self): """Gets the c of this FuturesPremiumIndex. # noqa: E501 - Close price. # noqa: E501 + Close price # noqa: E501 :return: The c of this FuturesPremiumIndex. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def c(self): def c(self, c): """Sets the c of this FuturesPremiumIndex. - Close price. # noqa: E501 + Close price # noqa: E501 :param c: The c of this FuturesPremiumIndex. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def c(self, c): def h(self): """Gets the h of this FuturesPremiumIndex. # noqa: E501 - Highest price. # noqa: E501 + Highest 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 + Highest 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 + Lowest 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 + Lowest price # noqa: E501 :param l: The l of this FuturesPremiumIndex. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def l(self, l): def o(self): """Gets the o of this FuturesPremiumIndex. # noqa: E501 - Open price. # noqa: E501 + Open price # noqa: E501 :return: The o of this FuturesPremiumIndex. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def o(self): def o(self, o): """Sets the o of this FuturesPremiumIndex. - Open price. # noqa: E501 + Open price # noqa: E501 :param o: The o of this FuturesPremiumIndex. # noqa: E501 :type: str diff --git a/gate_api/models/futures_price_trigger.py b/gate_api/models/futures_price_trigger.py index 300b245..7dd48a6 100644 --- a/gate_api/models/futures_price_trigger.py +++ b/gate_api/models/futures_price_trigger.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, strategy_type=None, price_type=None, price=None, rule=None, e def strategy_type(self): """Gets the strategy_type of this FuturesPriceTrigger. # noqa: E501 - Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price # noqa: E501 + Trigger Strategy - 0: Price trigger, triggered when price meets conditions - 1: Price spread trigger, i.e. the difference between the latest price specified in `price_type` and the second-last price Currently only supports 0 (latest transaction price) # noqa: E501 :return: The strategy_type of this FuturesPriceTrigger. # noqa: E501 :rtype: int @@ -88,7 +88,7 @@ def strategy_type(self): def strategy_type(self, strategy_type): """Sets the strategy_type of this FuturesPriceTrigger. - Trigger Policy - 0: Price trigger, that is, when the price meets the conditions - 1: Price spread trigger, i.e. the last price specified in `price_type` minus the second-last price difference At present, only 0 is the latest transaction price # noqa: E501 + Trigger Strategy - 0: Price trigger, triggered when price meets conditions - 1: Price spread trigger, i.e. the difference between the latest price specified in `price_type` and the second-last price Currently only supports 0 (latest transaction price) # noqa: E501 :param strategy_type: The strategy_type of this FuturesPriceTrigger. # noqa: E501 :type: int @@ -106,7 +106,7 @@ def strategy_type(self, strategy_type): def price_type(self): """Gets the price_type of this FuturesPriceTrigger. # noqa: E501 - Price type. 0 - latest deal price, 1 - mark price, 2 - index price. # noqa: E501 + Reference price type. 0 - Latest trade price, 1 - Mark price, 2 - Index price # noqa: E501 :return: The price_type of this FuturesPriceTrigger. # noqa: E501 :rtype: int @@ -117,7 +117,7 @@ def price_type(self): def price_type(self, price_type): """Sets the price_type of this FuturesPriceTrigger. - Price type. 0 - latest deal price, 1 - mark price, 2 - index price. # noqa: E501 + Reference price type. 0 - Latest trade price, 1 - Mark price, 2 - Index price # noqa: E501 :param price_type: The price_type of this FuturesPriceTrigger. # noqa: E501 :type: int @@ -135,7 +135,7 @@ def price_type(self, price_type): def price(self): """Gets the price of this FuturesPriceTrigger. # noqa: E501 - Value of price on price triggered, or price gap on price gap triggered. # noqa: E501 + Price value for price trigger, or spread value for spread trigger # noqa: E501 :return: The price of this FuturesPriceTrigger. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesPriceTrigger. - Value of price on price triggered, or price gap on price gap triggered. # noqa: E501 + Price value for price trigger, or spread value for spread trigger # noqa: E501 :param price: The price of this FuturesPriceTrigger. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def price(self, price): def rule(self): """Gets the rule of this FuturesPriceTrigger. # noqa: E501 - Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 + Price Condition Type - 1: Trigger when the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price`, while Trigger.Price must > last_price - 2: Trigger when the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price`, and Trigger.Price must < last_price # noqa: E501 :return: The rule of this FuturesPriceTrigger. # noqa: E501 :rtype: int @@ -169,7 +169,7 @@ def rule(self): def rule(self, rule): """Sets the rule of this FuturesPriceTrigger. - Price Condition Type - 1: Indicates that the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price` Trigger, while Trigger.Price must > last_price - based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price` Trigger, and Trigger.Price must < last_price # noqa: E501 + Price Condition Type - 1: Trigger when the price calculated based on `strategy_type` and `price_type` is greater than or equal to `Trigger.Price`, while Trigger.Price must > last_price - 2: Trigger when the price calculated based on `strategy_type` and `price_type` is less than or equal to `Trigger.Price`, and Trigger.Price must < last_price # noqa: E501 :param rule: The rule of this FuturesPriceTrigger. # noqa: E501 :type: int @@ -187,7 +187,7 @@ def rule(self, rule): def expiration(self): """Gets the expiration of this FuturesPriceTrigger. # noqa: E501 - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501 :return: The expiration of this FuturesPriceTrigger. # noqa: E501 :rtype: int @@ -198,7 +198,7 @@ def expiration(self): def expiration(self, expiration): """Sets the expiration of this FuturesPriceTrigger. - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501 :param expiration: The expiration of this FuturesPriceTrigger. # noqa: E501 :type: int diff --git a/gate_api/models/futures_price_triggered_order.py b/gate_api/models/futures_price_triggered_order.py index a726c29..14e16ae 100644 --- a/gate_api/models/futures_price_triggered_order.py +++ b/gate_api/models/futures_price_triggered_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -156,7 +156,7 @@ def trigger(self, trigger): def id(self): """Gets the id of this FuturesPriceTriggeredOrder. # noqa: E501 - Auto order ID. # noqa: E501 + Auto order ID # noqa: E501 :return: The id of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -167,7 +167,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesPriceTriggeredOrder. - Auto order ID. # noqa: E501 + Auto order ID # noqa: E501 :param id: The id of this FuturesPriceTriggeredOrder. # noqa: E501 :type: int @@ -179,7 +179,7 @@ def id(self, id): def user(self): """Gets the user of this FuturesPriceTriggeredOrder. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def user(self): def user(self, user): """Sets the user of this FuturesPriceTriggeredOrder. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this FuturesPriceTriggeredOrder. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this FuturesPriceTriggeredOrder. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: float @@ -213,7 +213,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FuturesPriceTriggeredOrder. - Creation time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this FuturesPriceTriggeredOrder. # noqa: E501 :type: float @@ -225,7 +225,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 - Finished time. # noqa: E501 + End time # noqa: E501 :return: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: float @@ -236,7 +236,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this FuturesPriceTriggeredOrder. - Finished time. # noqa: E501 + End time # noqa: E501 :param finish_time: The finish_time of this FuturesPriceTriggeredOrder. # noqa: E501 :type: float @@ -248,7 +248,7 @@ def finish_time(self, finish_time): def trade_id(self): """Gets the trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 - ID of the newly created order on condition triggered. # noqa: E501 + ID of the order created after trigger # noqa: E501 :return: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -259,7 +259,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this FuturesPriceTriggeredOrder. - ID of the newly created order on condition triggered. # noqa: E501 + ID of the order created after trigger # noqa: E501 :param trade_id: The trade_id of this FuturesPriceTriggeredOrder. # noqa: E501 :type: int @@ -271,7 +271,7 @@ def trade_id(self, trade_id): def status(self): """Gets the status of this FuturesPriceTriggeredOrder. # noqa: E501 - Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is close-short-order # noqa: E501 + Order status - `open`: Active - `finished`: Finished - `inactive`: Inactive, only applies to order take-profit/stop-loss - `invalid`: Invalid, only applies to order take-profit/stop-loss # noqa: E501 :return: The status of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -282,7 +282,7 @@ def status(self): def status(self, status): """Sets the status of this FuturesPriceTriggeredOrder. - Auto order status - `open`: order is active - `finished`: order is finished - `inactive`: order is not active, only for close-long-order or close-short-order - `invalid`: order is close-short-order # noqa: E501 + Order status - `open`: Active - `finished`: Finished - `inactive`: Inactive, only applies to order take-profit/stop-loss - `invalid`: Invalid, only applies to order take-profit/stop-loss # noqa: E501 :param status: The status of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str @@ -300,7 +300,7 @@ def status(self, status): def finish_as(self): """Gets the finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 - How order is finished. # noqa: E501 + Finish status: cancelled - Cancelled; succeeded - Succeeded; failed - Failed; expired - Expired # noqa: E501 :return: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -311,7 +311,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this FuturesPriceTriggeredOrder. - How order is finished. # noqa: E501 + Finish status: cancelled - Cancelled; succeeded - Succeeded; failed - Failed; expired - Expired # noqa: E501 :param finish_as: The finish_as of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str @@ -329,7 +329,7 @@ def finish_as(self, finish_as): def reason(self): """Gets the reason of this FuturesPriceTriggeredOrder. # noqa: E501 - Additional remarks on how the order was finished. # noqa: E501 + Additional description of how the order was completed # noqa: E501 :return: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -340,7 +340,7 @@ def reason(self): def reason(self, reason): """Sets the reason of this FuturesPriceTriggeredOrder. - Additional remarks on how the order was finished. # noqa: E501 + Additional description of how the order was completed # noqa: E501 :param reason: The reason of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str @@ -352,7 +352,7 @@ def reason(self, reason): def order_type(self): """Gets the order_type of this FuturesPriceTriggeredOrder. # noqa: E501 - Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 + Types of take-profit and stop-loss orders, including: - `close-long-order`: Order take-profit/stop-loss, close long position - `close-short-order`: Order take-profit/stop-loss, close short position - `close-long-position`: Position take-profit/stop-loss, used to close all long positions - `close-short-position`: Position take-profit/stop-loss, used to close all short positions - `plan-close-long-position`: Position plan take-profit/stop-loss, used to close all or partial long positions - `plan-close-short-position`: Position plan take-profit/stop-loss, used to close all or partial short positions The two types of order take-profit/stop-loss are read-only and cannot be passed in requests # noqa: E501 :return: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -363,7 +363,7 @@ def order_type(self): def order_type(self, order_type): """Sets the order_type of this FuturesPriceTriggeredOrder. - Types of stop-profit and stop-loss, including: - `close-long-order`: Entrusting order stop profit and stop loss, flat long position - `close-short-order`: loss, short position - `close-long-position`: Position stop-profit stop loss, used to close long positions - `close-short-position`: Position stop-profit stop loss, used to close all short positions - `plan-close-long-position`: Position plan take profit and stop loss, used to close long positions in all or part of long positions - `plan-close-short-position`: Position plan stop-profit and stop loss, used to close all short positions or partially close short positions The two types of entrusted order stop-profit and stop-loss are read-only and cannot be passed in through requests # noqa: E501 + Types of take-profit and stop-loss orders, including: - `close-long-order`: Order take-profit/stop-loss, close long position - `close-short-order`: Order take-profit/stop-loss, close short position - `close-long-position`: Position take-profit/stop-loss, used to close all long positions - `close-short-position`: Position take-profit/stop-loss, used to close all short positions - `plan-close-long-position`: Position plan take-profit/stop-loss, used to close all or partial long positions - `plan-close-short-position`: Position plan take-profit/stop-loss, used to close all or partial short positions The two types of order take-profit/stop-loss are read-only and cannot be passed in requests # noqa: E501 :param order_type: The order_type of this FuturesPriceTriggeredOrder. # noqa: E501 :type: str @@ -375,7 +375,7 @@ def order_type(self, order_type): def me_order_id(self): """Gets the me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 - Corresponding order ID of order take-profit/stop-loss. # noqa: E501 + Corresponding order ID for order take-profit/stop-loss orders # noqa: E501 :return: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -386,7 +386,7 @@ def me_order_id(self): def me_order_id(self, me_order_id): """Sets the me_order_id of this FuturesPriceTriggeredOrder. - Corresponding order ID of order take-profit/stop-loss. # noqa: E501 + Corresponding order ID for order take-profit/stop-loss orders # noqa: E501 :param me_order_id: The me_order_id of this FuturesPriceTriggeredOrder. # noqa: E501 :type: int diff --git a/gate_api/models/futures_risk_limit_tier.py b/gate_api/models/futures_risk_limit_tier.py index 3946e2e..fcbc314 100644 --- a/gate_api/models/futures_risk_limit_tier.py +++ b/gate_api/models/futures_risk_limit_tier.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, tier=None, risk_limit=None, initial_rate=None, maintenance_ra def tier(self): """Gets the tier of this FuturesRiskLimitTier. # noqa: E501 - Tier. # noqa: E501 + Tier # noqa: E501 :return: The tier of this FuturesRiskLimitTier. # noqa: E501 :rtype: int @@ -93,7 +93,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this FuturesRiskLimitTier. - Tier. # noqa: E501 + Tier # noqa: E501 :param tier: The tier of this FuturesRiskLimitTier. # noqa: E501 :type: int @@ -105,7 +105,7 @@ def tier(self, tier): def risk_limit(self): """Gets the risk_limit of this FuturesRiskLimitTier. # noqa: E501 - Position risk limit. # noqa: E501 + Position risk limit # noqa: E501 :return: The risk_limit of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def risk_limit(self): def risk_limit(self, risk_limit): """Sets the risk_limit of this FuturesRiskLimitTier. - Position risk limit. # noqa: E501 + Position risk limit # noqa: E501 :param risk_limit: The risk_limit of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def risk_limit(self, risk_limit): def initial_rate(self): """Gets the initial_rate of this FuturesRiskLimitTier. # noqa: E501 - Initial margin rate. # noqa: E501 + Initial margin rate # noqa: E501 :return: The initial_rate of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def initial_rate(self): def initial_rate(self, initial_rate): """Sets the initial_rate of this FuturesRiskLimitTier. - Initial margin rate. # noqa: E501 + Initial margin rate # noqa: E501 :param initial_rate: The initial_rate of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def initial_rate(self, initial_rate): def maintenance_rate(self): """Gets the maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 - Maintenance margin rate. # noqa: E501 + Maintenance margin rate # noqa: E501 :return: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this FuturesRiskLimitTier. - Maintenance margin rate. # noqa: E501 + Maintenance margin rate # noqa: E501 :param maintenance_rate: The maintenance_rate of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def maintenance_rate(self, maintenance_rate): def leverage_max(self): """Gets the leverage_max of this FuturesRiskLimitTier. # noqa: E501 - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :return: The leverage_max of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this FuturesRiskLimitTier. - Maximum leverage. # noqa: E501 + Maximum leverage # noqa: E501 :param leverage_max: The leverage_max of this FuturesRiskLimitTier. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def leverage_max(self, leverage_max): def deduction(self): """Gets the deduction of this FuturesRiskLimitTier. # noqa: E501 - Maintenance margin quick calculation deduction. # noqa: E501 + Maintenance margin quick calculation deduction amount # noqa: E501 :return: The deduction of this FuturesRiskLimitTier. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def deduction(self): def deduction(self, deduction): """Sets the deduction of this FuturesRiskLimitTier. - Maintenance margin quick calculation deduction. # noqa: E501 + Maintenance margin quick calculation deduction amount # noqa: E501 :param deduction: The deduction of this FuturesRiskLimitTier. # noqa: E501 :type: str diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py index 6ecbc82..8035c43 100644 --- a/gate_api/models/futures_ticker.py +++ b/gate_api/models/futures_ticker.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -157,7 +157,7 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= def contract(self): """Gets the contract of this FuturesTicker. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this FuturesTicker. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesTicker. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this FuturesTicker. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def contract(self, contract): def last(self): """Gets the last of this FuturesTicker. # noqa: E501 - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :return: The last of this FuturesTicker. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def last(self): def last(self, last): """Sets the last of this FuturesTicker. - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :param last: The last of this FuturesTicker. # noqa: E501 :type: str @@ -203,7 +203,7 @@ def last(self, last): def change_percentage(self): """Gets the change_percentage of this FuturesTicker. # noqa: E501 - Change percentage. # noqa: E501 + Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501 :return: The change_percentage of this FuturesTicker. # noqa: E501 :rtype: str @@ -214,7 +214,7 @@ def change_percentage(self): def change_percentage(self, change_percentage): """Sets the change_percentage of this FuturesTicker. - Change percentage. # noqa: E501 + Price change percentage. Negative values indicate price decrease, e.g. -7.45 # noqa: E501 :param change_percentage: The change_percentage of this FuturesTicker. # noqa: E501 :type: str @@ -226,7 +226,7 @@ def change_percentage(self, change_percentage): def total_size(self): """Gets the total_size of this FuturesTicker. # noqa: E501 - Contract total size. # noqa: E501 + Contract total size # noqa: E501 :return: The total_size of this FuturesTicker. # noqa: E501 :rtype: str @@ -237,7 +237,7 @@ def total_size(self): def total_size(self, total_size): """Sets the total_size of this FuturesTicker. - Contract total size. # noqa: E501 + Contract total size # noqa: E501 :param total_size: The total_size of this FuturesTicker. # noqa: E501 :type: str @@ -249,7 +249,7 @@ def total_size(self, total_size): def low_24h(self): """Gets the low_24h of this FuturesTicker. # noqa: E501 - Lowest trading price in recent 24h. # noqa: E501 + 24-hour lowest price # noqa: E501 :return: The low_24h of this FuturesTicker. # noqa: E501 :rtype: str @@ -260,7 +260,7 @@ def low_24h(self): def low_24h(self, low_24h): """Sets the low_24h of this FuturesTicker. - Lowest trading price in recent 24h. # noqa: E501 + 24-hour lowest price # noqa: E501 :param low_24h: The low_24h of this FuturesTicker. # noqa: E501 :type: str @@ -272,7 +272,7 @@ def low_24h(self, low_24h): def high_24h(self): """Gets the high_24h of this FuturesTicker. # noqa: E501 - Highest trading price in recent 24h. # noqa: E501 + 24-hour highest price # noqa: E501 :return: The high_24h of this FuturesTicker. # noqa: E501 :rtype: str @@ -283,7 +283,7 @@ def high_24h(self): def high_24h(self, high_24h): """Sets the high_24h of this FuturesTicker. - Highest trading price in recent 24h. # noqa: E501 + 24-hour highest price # noqa: E501 :param high_24h: The high_24h of this FuturesTicker. # noqa: E501 :type: str @@ -295,7 +295,7 @@ def high_24h(self, high_24h): def volume_24h(self): """Gets the volume_24h of this FuturesTicker. # noqa: E501 - Trade size in recent 24h. # noqa: E501 + 24-hour trading volume # noqa: E501 :return: The volume_24h of this FuturesTicker. # noqa: E501 :rtype: str @@ -306,7 +306,7 @@ def volume_24h(self): def volume_24h(self, volume_24h): """Sets the volume_24h of this FuturesTicker. - Trade size in recent 24h. # noqa: E501 + 24-hour trading volume # noqa: E501 :param volume_24h: The volume_24h of this FuturesTicker. # noqa: E501 :type: str @@ -318,7 +318,7 @@ def volume_24h(self, volume_24h): def volume_24h_btc(self): """Gets the volume_24h_btc of this FuturesTicker. # noqa: E501 - Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :return: The volume_24h_btc of this FuturesTicker. # noqa: E501 :rtype: str @@ -329,7 +329,7 @@ def volume_24h_btc(self): def volume_24h_btc(self, volume_24h_btc): """Sets the volume_24h_btc of this FuturesTicker. - Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in BTC (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :param volume_24h_btc: The volume_24h_btc of this FuturesTicker. # noqa: E501 :type: str @@ -341,7 +341,7 @@ def volume_24h_btc(self, volume_24h_btc): def volume_24h_usd(self): """Gets the volume_24h_usd of this FuturesTicker. # noqa: E501 - Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :return: The volume_24h_usd of this FuturesTicker. # noqa: E501 :rtype: str @@ -352,7 +352,7 @@ def volume_24h_usd(self): def volume_24h_usd(self, volume_24h_usd): """Sets the volume_24h_usd of this FuturesTicker. - Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 + 24-hour trading volume in USD (deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) # noqa: E501 :param volume_24h_usd: The volume_24h_usd of this FuturesTicker. # noqa: E501 :type: str @@ -364,7 +364,7 @@ def volume_24h_usd(self, volume_24h_usd): def volume_24h_base(self): """Gets the volume_24h_base of this FuturesTicker. # noqa: E501 - Trade volume in recent 24h, in base currency. # noqa: E501 + 24-hour trading volume in base currency # noqa: E501 :return: The volume_24h_base of this FuturesTicker. # noqa: E501 :rtype: str @@ -375,7 +375,7 @@ def volume_24h_base(self): def volume_24h_base(self, volume_24h_base): """Sets the volume_24h_base of this FuturesTicker. - Trade volume in recent 24h, in base currency. # noqa: E501 + 24-hour trading volume in base currency # noqa: E501 :param volume_24h_base: The volume_24h_base of this FuturesTicker. # noqa: E501 :type: str @@ -387,7 +387,7 @@ def volume_24h_base(self, volume_24h_base): def volume_24h_quote(self): """Gets the volume_24h_quote of this FuturesTicker. # noqa: E501 - Trade volume in recent 24h, in quote currency. # noqa: E501 + 24-hour trading volume in quote currency # noqa: E501 :return: The volume_24h_quote of this FuturesTicker. # noqa: E501 :rtype: str @@ -398,7 +398,7 @@ def volume_24h_quote(self): def volume_24h_quote(self, volume_24h_quote): """Sets the volume_24h_quote of this FuturesTicker. - Trade volume in recent 24h, in quote currency. # noqa: E501 + 24-hour trading volume in quote currency # noqa: E501 :param volume_24h_quote: The volume_24h_quote of this FuturesTicker. # noqa: E501 :type: str @@ -410,7 +410,7 @@ def volume_24h_quote(self, volume_24h_quote): def volume_24h_settle(self): """Gets the volume_24h_settle of this FuturesTicker. # noqa: E501 - Trade volume in recent 24h, in settle currency. # noqa: E501 + 24-hour trading volume in settle currency # noqa: E501 :return: The volume_24h_settle of this FuturesTicker. # noqa: E501 :rtype: str @@ -421,7 +421,7 @@ def volume_24h_settle(self): def volume_24h_settle(self, volume_24h_settle): """Sets the volume_24h_settle of this FuturesTicker. - Trade volume in recent 24h, in settle currency. # noqa: E501 + 24-hour trading volume in settle currency # noqa: E501 :param volume_24h_settle: The volume_24h_settle of this FuturesTicker. # noqa: E501 :type: str @@ -433,7 +433,7 @@ def volume_24h_settle(self, volume_24h_settle): def mark_price(self): """Gets the mark_price of this FuturesTicker. # noqa: E501 - Recent mark price. # noqa: E501 + Recent mark price # noqa: E501 :return: The mark_price of this FuturesTicker. # noqa: E501 :rtype: str @@ -444,7 +444,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this FuturesTicker. - Recent mark price. # noqa: E501 + Recent mark price # noqa: E501 :param mark_price: The mark_price of this FuturesTicker. # noqa: E501 :type: str @@ -456,7 +456,7 @@ def mark_price(self, mark_price): def funding_rate(self): """Gets the funding_rate of this FuturesTicker. # noqa: E501 - Funding rate. # noqa: E501 + Funding rate # noqa: E501 :return: The funding_rate of this FuturesTicker. # noqa: E501 :rtype: str @@ -467,7 +467,7 @@ def funding_rate(self): def funding_rate(self, funding_rate): """Sets the funding_rate of this FuturesTicker. - Funding rate. # noqa: E501 + Funding rate # noqa: E501 :param funding_rate: The funding_rate of this FuturesTicker. # noqa: E501 :type: str @@ -479,7 +479,7 @@ def funding_rate(self, funding_rate): def funding_rate_indicative(self): """Gets the funding_rate_indicative of this FuturesTicker. # noqa: E501 - Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 :return: The funding_rate_indicative of this FuturesTicker. # noqa: E501 :rtype: str @@ -490,7 +490,7 @@ def funding_rate_indicative(self): def funding_rate_indicative(self, funding_rate_indicative): """Sets the funding_rate_indicative of this FuturesTicker. - Indicative Funding rate in next period. (deprecated. use `funding_rate`). # noqa: E501 + Indicative Funding rate in next period. (deprecated. use `funding_rate`) # noqa: E501 :param funding_rate_indicative: The funding_rate_indicative of this FuturesTicker. # noqa: E501 :type: str @@ -502,7 +502,7 @@ def funding_rate_indicative(self, funding_rate_indicative): def index_price(self): """Gets the index_price of this FuturesTicker. # noqa: E501 - Index price. # noqa: E501 + Index price # noqa: E501 :return: The index_price of this FuturesTicker. # noqa: E501 :rtype: str @@ -513,7 +513,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this FuturesTicker. - Index price. # noqa: E501 + Index price # noqa: E501 :param index_price: The index_price of this FuturesTicker. # noqa: E501 :type: str @@ -548,7 +548,7 @@ def quanto_base_rate(self, quanto_base_rate): def lowest_ask(self): """Gets the lowest_ask of this FuturesTicker. # noqa: E501 - Recent lowest ask. # noqa: E501 + Recent lowest ask # noqa: E501 :return: The lowest_ask of this FuturesTicker. # noqa: E501 :rtype: str @@ -559,7 +559,7 @@ def lowest_ask(self): def lowest_ask(self, lowest_ask): """Sets the lowest_ask of this FuturesTicker. - Recent lowest ask. # noqa: E501 + Recent lowest ask # noqa: E501 :param lowest_ask: The lowest_ask of this FuturesTicker. # noqa: E501 :type: str @@ -571,7 +571,7 @@ def lowest_ask(self, lowest_ask): def lowest_size(self): """Gets the lowest_size of this FuturesTicker. # noqa: E501 - The latest seller's lowest price order quantity. # noqa: E501 + The latest seller's lowest price order quantity # noqa: E501 :return: The lowest_size of this FuturesTicker. # noqa: E501 :rtype: str @@ -582,7 +582,7 @@ def lowest_size(self): def lowest_size(self, lowest_size): """Sets the lowest_size of this FuturesTicker. - The latest seller's lowest price order quantity. # noqa: E501 + The latest seller's lowest price order quantity # noqa: E501 :param lowest_size: The lowest_size of this FuturesTicker. # noqa: E501 :type: str @@ -594,7 +594,7 @@ def lowest_size(self, lowest_size): def highest_bid(self): """Gets the highest_bid of this FuturesTicker. # noqa: E501 - Recent highest bid. # noqa: E501 + Recent highest bid # noqa: E501 :return: The highest_bid of this FuturesTicker. # noqa: E501 :rtype: str @@ -605,7 +605,7 @@ def highest_bid(self): def highest_bid(self, highest_bid): """Sets the highest_bid of this FuturesTicker. - Recent highest bid. # noqa: E501 + Recent highest bid # noqa: E501 :param highest_bid: The highest_bid of this FuturesTicker. # noqa: E501 :type: str @@ -617,7 +617,7 @@ def highest_bid(self, highest_bid): def highest_size(self): """Gets the highest_size of this FuturesTicker. # noqa: E501 - The latest buyer's highest price order volume. # noqa: E501 + The latest buyer's highest price order volume # noqa: E501 :return: The highest_size of this FuturesTicker. # noqa: E501 :rtype: str @@ -628,7 +628,7 @@ def highest_size(self): def highest_size(self, highest_size): """Sets the highest_size of this FuturesTicker. - The latest buyer's highest price order volume. # noqa: E501 + The latest buyer's highest price order volume # noqa: E501 :param highest_size: The highest_size of this FuturesTicker. # noqa: E501 :type: str diff --git a/gate_api/models/futures_trade.py b/gate_api/models/futures_trade.py index d4cd164..66b45c0 100644 --- a/gate_api/models/futures_trade.py +++ b/gate_api/models/futures_trade.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, id=None, create_time=None, create_time_ms=None, contract=None def id(self): """Gets the id of this FuturesTrade. # noqa: E501 - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :return: The id of this FuturesTrade. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def id(self): def id(self, id): """Sets the id of this FuturesTrade. - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :param id: The id of this FuturesTrade. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this FuturesTrade. # noqa: E501 - Trading time. # noqa: E501 + Fill Time # noqa: E501 :return: The create_time of this FuturesTrade. # noqa: E501 :rtype: float @@ -121,7 +121,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this FuturesTrade. - Trading time. # noqa: E501 + Fill Time # noqa: E501 :param create_time: The create_time of this FuturesTrade. # noqa: E501 :type: float @@ -133,7 +133,7 @@ def create_time(self, create_time): def create_time_ms(self): """Gets the create_time_ms of this FuturesTrade. # noqa: E501 - Trading time, with milliseconds set to 3 decimal places. # noqa: E501 + Trade time, with millisecond precision to 3 decimal places # noqa: E501 :return: The create_time_ms of this FuturesTrade. # noqa: E501 :rtype: float @@ -144,7 +144,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this FuturesTrade. - Trading time, with milliseconds set to 3 decimal places. # noqa: E501 + Trade time, with millisecond precision to 3 decimal places # noqa: E501 :param create_time_ms: The create_time_ms of this FuturesTrade. # noqa: E501 :type: float @@ -156,7 +156,7 @@ def create_time_ms(self, create_time_ms): def contract(self): """Gets the contract of this FuturesTrade. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this FuturesTrade. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this FuturesTrade. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this FuturesTrade. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def contract(self, contract): def size(self): """Gets the size of this FuturesTrade. # noqa: E501 - Trading size. # noqa: E501 + Trading size # noqa: E501 :return: The size of this FuturesTrade. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def size(self): def size(self, size): """Sets the size of this FuturesTrade. - Trading size. # noqa: E501 + Trading size # noqa: E501 :param size: The size of this FuturesTrade. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def size(self, size): def price(self): """Gets the price of this FuturesTrade. # noqa: E501 - Trading price (quote currency). # noqa: E501 + Trade price (quote currency) # noqa: E501 :return: The price of this FuturesTrade. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def price(self): def price(self, price): """Sets the price of this FuturesTrade. - Trading price (quote currency). # noqa: E501 + Trade price (quote currency) # noqa: E501 :param price: The price of this FuturesTrade. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def price(self, price): def is_internal(self): """Gets the is_internal of this FuturesTrade. # noqa: E501 - Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. an internal trade, this field will not be returned. # noqa: E501 + Whether it is an internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the trade price may deviate from the market, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned # noqa: E501 :return: The is_internal of this FuturesTrade. # noqa: E501 :rtype: bool @@ -236,7 +236,7 @@ def is_internal(self): def is_internal(self, is_internal): """Sets the is_internal of this FuturesTrade. - Whether internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the transaction price may deviate, and it will not be recorded in the K-line. an internal trade, this field will not be returned. # noqa: E501 + Whether it is an internal trade. Internal trade refers to the takeover of liquidation orders by the insurance fund and ADL users. Since it is not a normal matching on the market depth, the trade price may deviate from the market, and it will not be recorded in the K-line. If it is not an internal trade, this field will not be returned # noqa: E501 :param is_internal: The is_internal of this FuturesTrade. # noqa: E501 :type: bool diff --git a/gate_api/models/index_constituent.py b/gate_api/models/index_constituent.py index fac1cc2..7357ff1 100644 --- a/gate_api/models/index_constituent.py +++ b/gate_api/models/index_constituent.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, exchange=None, symbols=None, local_vars_configuration=None): def exchange(self): """Gets the exchange of this IndexConstituent. # noqa: E501 - Exchange. # noqa: E501 + Exchange # noqa: E501 :return: The exchange of this IndexConstituent. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def exchange(self): def exchange(self, exchange): """Sets the exchange of this IndexConstituent. - Exchange. # noqa: E501 + Exchange # noqa: E501 :param exchange: The exchange of this IndexConstituent. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def exchange(self, exchange): def symbols(self): """Gets the symbols of this IndexConstituent. # noqa: E501 - Symbol list. # noqa: E501 + Symbol list # noqa: E501 :return: The symbols of this IndexConstituent. # noqa: E501 :rtype: list[str] @@ -96,7 +96,7 @@ def symbols(self): def symbols(self, symbols): """Sets the symbols of this IndexConstituent. - Symbol list. # noqa: E501 + Symbol list # noqa: E501 :param symbols: The symbols of this IndexConstituent. # noqa: E501 :type: list[str] diff --git a/gate_api/models/inline_object.py b/gate_api/models/inline_object.py index 8008fd8..a034500 100644 --- a/gate_api/models/inline_object.py +++ b/gate_api/models/inline_object.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, mode=None, contract=None, local_vars_configuration=None): # def mode(self): """Gets the mode of this InlineObject. # noqa: E501 - Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 + Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501 :return: The mode of this InlineObject. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this InlineObject. - Full position-by-position model, ISOLATED-by-position, CROSS-full position. # noqa: E501 + Cross margin or isolated margin mode. ISOLATED - isolated margin mode, CROSS - cross margin mode # noqa: E501 :param mode: The mode of this InlineObject. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def mode(self, mode): def contract(self): """Gets the contract of this InlineObject. # noqa: E501 - Contract Market. # noqa: E501 + Futures market # noqa: E501 :return: The contract of this InlineObject. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this InlineObject. - Contract Market. # noqa: E501 + Futures market # noqa: E501 :param contract: The contract of this InlineObject. # noqa: E501 :type: str diff --git a/gate_api/models/inline_response200.py b/gate_api/models/inline_response200.py index 3ab77b7..171fd14 100644 --- a/gate_api/models/inline_response200.py +++ b/gate_api/models/inline_response200.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/gate_api/models/inline_response2001.py b/gate_api/models/inline_response2001.py index d78ad89..e637913 100644 --- a/gate_api/models/inline_response2001.py +++ b/gate_api/models/inline_response2001.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -83,7 +83,7 @@ def currency(self, currency): def est_rate(self): """Gets the est_rate of this InlineResponse2001. # noqa: E501 - Unconverted percentage. # noqa: E501 + Unconverted percentage # noqa: E501 :return: The est_rate of this InlineResponse2001. # noqa: E501 :rtype: str @@ -94,7 +94,7 @@ def est_rate(self): def est_rate(self, est_rate): """Sets the est_rate of this InlineResponse2001. - Unconverted percentage. # noqa: E501 + Unconverted percentage # noqa: E501 :param est_rate: The est_rate of this InlineResponse2001. # noqa: E501 :type: str diff --git a/gate_api/models/insurance_record.py b/gate_api/models/insurance_record.py index 82b0aac..9ee7e93 100644 --- a/gate_api/models/insurance_record.py +++ b/gate_api/models/insurance_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, t=None, b=None, local_vars_configuration=None): # noqa: E501 def t(self): """Gets the t of this InsuranceRecord. # noqa: E501 - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :return: The t of this InsuranceRecord. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def t(self): def t(self, t): """Sets the t of this InsuranceRecord. - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :param t: The t of this InsuranceRecord. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def t(self, t): def b(self): """Gets the b of this InsuranceRecord. # noqa: E501 - Insurance balance. # noqa: E501 + Insurance balance # noqa: E501 :return: The b of this InsuranceRecord. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def b(self): def b(self, b): """Sets the b of this InsuranceRecord. - Insurance balance. # noqa: E501 + Insurance balance # noqa: E501 :param b: The b of this InsuranceRecord. # noqa: E501 :type: str diff --git a/gate_api/models/ledger_record.py b/gate_api/models/ledger_record.py index ec95174..c1cd314 100644 --- a/gate_api/models/ledger_record.py +++ b/gate_api/models/ledger_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -109,7 +109,7 @@ def __init__(self, id=None, txid=None, withdraw_order_id=None, timestamp=None, a def id(self): """Gets the id of this LedgerRecord. # noqa: E501 - Record ID. # noqa: E501 + Record ID # noqa: E501 :return: The id of this LedgerRecord. # noqa: E501 :rtype: str @@ -120,7 +120,7 @@ def id(self): def id(self, id): """Sets the id of this LedgerRecord. - Record ID. # noqa: E501 + Record ID # noqa: E501 :param id: The id of this LedgerRecord. # noqa: E501 :type: str @@ -132,7 +132,7 @@ def id(self, id): def txid(self): """Gets the txid of this LedgerRecord. # noqa: E501 - Hash record of the withdrawal. # noqa: E501 + Hash record of the withdrawal # noqa: E501 :return: The txid of this LedgerRecord. # noqa: E501 :rtype: str @@ -143,7 +143,7 @@ def txid(self): def txid(self, txid): """Sets the txid of this LedgerRecord. - Hash record of the withdrawal. # noqa: E501 + Hash record of the withdrawal # noqa: E501 :param txid: The txid of this LedgerRecord. # noqa: E501 :type: str @@ -155,7 +155,7 @@ def txid(self, txid): def withdraw_order_id(self): """Gets the withdraw_order_id of this LedgerRecord. # noqa: E501 - User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501 + User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501 :return: The withdraw_order_id of this LedgerRecord. # noqa: E501 :rtype: str @@ -166,7 +166,7 @@ def withdraw_order_id(self): def withdraw_order_id(self, withdraw_order_id): """Sets the withdraw_order_id of this LedgerRecord. - User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501 + User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried # noqa: E501 :param withdraw_order_id: The withdraw_order_id of this LedgerRecord. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def withdraw_order_id(self, withdraw_order_id): def timestamp(self): """Gets the timestamp of this LedgerRecord. # noqa: E501 - Operation time. # noqa: E501 + Operation time # noqa: E501 :return: The timestamp of this LedgerRecord. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def timestamp(self): def timestamp(self, timestamp): """Sets the timestamp of this LedgerRecord. - Operation time. # noqa: E501 + Operation time # noqa: E501 :param timestamp: The timestamp of this LedgerRecord. # noqa: E501 :type: str @@ -201,7 +201,7 @@ def timestamp(self, timestamp): def amount(self): """Gets the amount of this LedgerRecord. # noqa: E501 - Currency amount. # noqa: E501 + Token amount # noqa: E501 :return: The amount of this LedgerRecord. # noqa: E501 :rtype: str @@ -212,7 +212,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this LedgerRecord. - Currency amount. # noqa: E501 + Token amount # noqa: E501 :param amount: The amount of this LedgerRecord. # noqa: E501 :type: str @@ -226,7 +226,7 @@ def amount(self, amount): def currency(self): """Gets the currency of this LedgerRecord. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this LedgerRecord. # noqa: E501 :rtype: str @@ -237,7 +237,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this LedgerRecord. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this LedgerRecord. # noqa: E501 :type: str @@ -251,7 +251,7 @@ def currency(self, currency): def address(self): """Gets the address of this LedgerRecord. # noqa: E501 - Withdrawal address. Required for withdrawals. # noqa: E501 + Withdrawal address. Required for withdrawals # noqa: E501 :return: The address of this LedgerRecord. # noqa: E501 :rtype: str @@ -262,7 +262,7 @@ def address(self): def address(self, address): """Sets the address of this LedgerRecord. - Withdrawal address. Required for withdrawals. # noqa: E501 + Withdrawal address. Required for withdrawals # noqa: E501 :param address: The address of this LedgerRecord. # noqa: E501 :type: str @@ -274,7 +274,7 @@ def address(self, address): def memo(self): """Gets the memo of this LedgerRecord. # noqa: E501 - Additional remarks with regards to the withdrawal. # noqa: E501 + Additional remarks with regards to the withdrawal # noqa: E501 :return: The memo of this LedgerRecord. # noqa: E501 :rtype: str @@ -285,7 +285,7 @@ def memo(self): def memo(self, memo): """Sets the memo of this LedgerRecord. - Additional remarks with regards to the withdrawal. # noqa: E501 + Additional remarks with regards to the withdrawal # noqa: E501 :param memo: The memo of this LedgerRecord. # noqa: E501 :type: str @@ -297,7 +297,7 @@ def memo(self, memo): def withdraw_id(self): """Gets the withdraw_id of this LedgerRecord. # noqa: E501 - The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time # noqa: E501 + Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled # noqa: E501 :return: The withdraw_id of this LedgerRecord. # noqa: E501 :rtype: str @@ -308,7 +308,7 @@ def withdraw_id(self): def withdraw_id(self, withdraw_id): """Sets the withdraw_id of this LedgerRecord. - The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time # noqa: E501 + Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled # noqa: E501 :param withdraw_id: The withdraw_id of this LedgerRecord. # noqa: E501 :type: str @@ -320,7 +320,7 @@ def withdraw_id(self, withdraw_id): def asset_class(self): """Gets the asset_class of this LedgerRecord. # noqa: E501 - The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone # noqa: E501 + Withdrawal record currency type, empty by default. Supports users to query withdrawal records in main area and innovation area on demand. Valid values: SPOT, PILOT SPOT: Main area PILOT: Innovation area # noqa: E501 :return: The asset_class of this LedgerRecord. # noqa: E501 :rtype: str @@ -331,7 +331,7 @@ def asset_class(self): def asset_class(self, asset_class): """Sets the asset_class of this LedgerRecord. - The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone # noqa: E501 + Withdrawal record currency type, empty by default. Supports users to query withdrawal records in main area and innovation area on demand. Valid values: SPOT, PILOT SPOT: Main area PILOT: Innovation area # noqa: E501 :param asset_class: The asset_class of this LedgerRecord. # noqa: E501 :type: str @@ -343,7 +343,7 @@ def asset_class(self, asset_class): def status(self): """Gets the status of this LedgerRecord. # noqa: E501 - Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - REVIEW: Under review # noqa: E501 + Transaction status - DONE: Completed - CANCEL: Cancelled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: GateCode operation - EXTPEND: Sent, waiting for confirmation - FAIL: Failed on chain, waiting for confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: Pending manual review - REVIEW: Under review # noqa: E501 :return: The status of this LedgerRecord. # noqa: E501 :rtype: str @@ -354,7 +354,7 @@ def status(self): def status(self, status): """Sets the status of this LedgerRecord. - Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - REVIEW: Under review # noqa: E501 + Transaction status - DONE: Completed - CANCEL: Cancelled - REQUEST: Requesting - MANUAL: Pending manual review - BCODE: GateCode operation - EXTPEND: Sent, waiting for confirmation - FAIL: Failed on chain, waiting for confirmation - INVALID: Invalid order - VERIFY: Verifying - PROCES: Processing - PEND: Processing - DMOVE: Pending manual review - REVIEW: Under review # noqa: E501 :param status: The status of this LedgerRecord. # noqa: E501 :type: str @@ -366,7 +366,7 @@ def status(self, status): def chain(self): """Gets the chain of this LedgerRecord. # noqa: E501 - Name of the chain used in withdrawals. # noqa: E501 + Name of the chain used in withdrawals # noqa: E501 :return: The chain of this LedgerRecord. # noqa: E501 :rtype: str @@ -377,7 +377,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this LedgerRecord. - Name of the chain used in withdrawals. # noqa: E501 + Name of the chain used in withdrawals # noqa: E501 :param chain: The chain of this LedgerRecord. # noqa: E501 :type: str diff --git a/gate_api/models/liquidate_order.py b/gate_api/models/liquidate_order.py index e573c7d..97214b5 100644 --- a/gate_api/models/liquidate_order.py +++ b/gate_api/models/liquidate_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -74,7 +74,7 @@ def __init__(self, text=None, currency_pair=None, amount=None, price=None, actio def text(self): """Gets the text of this LiquidateOrder. # noqa: E501 - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 :return: The text of this LiquidateOrder. # noqa: E501 :rtype: str @@ -85,7 +85,7 @@ def text(self): def text(self, text): """Sets the text of this LiquidateOrder. - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 :param text: The text of this LiquidateOrder. # noqa: E501 :type: str @@ -97,7 +97,7 @@ def text(self, text): def currency_pair(self): """Gets the currency_pair of this LiquidateOrder. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this LiquidateOrder. # noqa: E501 :rtype: str @@ -108,7 +108,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this LiquidateOrder. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this LiquidateOrder. # noqa: E501 :type: str @@ -122,7 +122,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this LiquidateOrder. # noqa: E501 - Trade amount. # noqa: E501 + Trade amount # noqa: E501 :return: The amount of this LiquidateOrder. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this LiquidateOrder. - Trade amount. # noqa: E501 + Trade amount # noqa: E501 :param amount: The amount of this LiquidateOrder. # noqa: E501 :type: str @@ -147,7 +147,7 @@ def amount(self, amount): def price(self): """Gets the price of this LiquidateOrder. # noqa: E501 - Order price. # noqa: E501 + Order price # noqa: E501 :return: The price of this LiquidateOrder. # noqa: E501 :rtype: str @@ -158,7 +158,7 @@ def price(self): def price(self, price): """Sets the price of this LiquidateOrder. - Order price. # noqa: E501 + Order price # noqa: E501 :param price: The price of this LiquidateOrder. # noqa: E501 :type: str @@ -172,7 +172,7 @@ def price(self, price): def action_mode(self): """Gets the action_mode of this LiquidateOrder. # noqa: E501 - Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + Processing mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request and is not included in the response `ACK`: Asynchronous mode, only returns key order fields `RESULT`: No liquidation information `FULL`: Full mode (default) # noqa: E501 :return: The action_mode of this LiquidateOrder. # noqa: E501 :rtype: str @@ -183,7 +183,7 @@ def action_mode(self): def action_mode(self, action_mode): """Sets the action_mode of this LiquidateOrder. - Processing Mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request, and it is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default) # noqa: E501 + Processing mode: Different fields are returned when placing an order based on action_mode. This field is only valid during the request and is not included in the response `ACK`: Asynchronous mode, only returns key order fields `RESULT`: No liquidation information `FULL`: Full mode (default) # noqa: E501 :param action_mode: The action_mode of this LiquidateOrder. # noqa: E501 :type: str diff --git a/gate_api/models/margin_account.py b/gate_api/models/margin_account.py index acd3572..45561e7 100644 --- a/gate_api/models/margin_account.py +++ b/gate_api/models/margin_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, currency_pair=None, account_type=None, leverage=None, locked= def currency_pair(self): """Gets the currency_pair of this MarginAccount. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this MarginAccount. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginAccount. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this MarginAccount. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def currency_pair(self, currency_pair): def account_type(self): """Gets the account_type of this MarginAccount. # noqa: E501 - Account type, risk - risk rate account, mmr - maintenance margin market not activated # noqa: E501 + Account type: risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 :return: The account_type of this MarginAccount. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def account_type(self): def account_type(self, account_type): """Sets the account_type of this MarginAccount. - Account type, risk - risk rate account, mmr - maintenance margin market not activated # noqa: E501 + Account type: risk - risk rate account, mmr - maintenance margin rate account, inactive - market not activated # noqa: E501 :param account_type: The account_type of this MarginAccount. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def account_type(self, account_type): def leverage(self): """Gets the leverage of this MarginAccount. # noqa: E501 - User current market leverage multiple. # noqa: E501 + User's current market leverage multiplier # noqa: E501 :return: The leverage of this MarginAccount. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this MarginAccount. - User current market leverage multiple. # noqa: E501 + User's current market leverage multiplier # noqa: E501 :param leverage: The leverage of this MarginAccount. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def leverage(self, leverage): def locked(self): """Gets the locked of this MarginAccount. # noqa: E501 - Whether account is locked. # noqa: E501 + Whether the account is locked # noqa: E501 :return: The locked of this MarginAccount. # noqa: E501 :rtype: bool @@ -172,7 +172,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this MarginAccount. - Whether account is locked. # noqa: E501 + Whether the account is locked # noqa: E501 :param locked: The locked of this MarginAccount. # noqa: E501 :type: bool @@ -184,7 +184,7 @@ def locked(self, locked): def risk(self): """Gets the risk of this MarginAccount. # noqa: E501 - Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) # noqa: E501 + Current risk rate of the margin account (returned when the account is a risk rate account) # noqa: E501 :return: The risk of this MarginAccount. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def risk(self): def risk(self, risk): """Sets the risk of this MarginAccount. - Leveraged Account Current Risk Rate (Returned when the Account is a Risk Rate Account) # noqa: E501 + Current risk rate of the margin account (returned when the account is a risk rate account) # noqa: E501 :param risk: The risk of this MarginAccount. # noqa: E501 :type: str diff --git a/gate_api/models/margin_account_book.py b/gate_api/models/margin_account_book.py index 7d4839e..1ee6bbd 100644 --- a/gate_api/models/margin_account_book.py +++ b/gate_api/models/margin_account_book.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, id=None, time=None, time_ms=None, currency=None, currency_pai def id(self): """Gets the id of this MarginAccountBook. # noqa: E501 - Balance change record ID. # noqa: E501 + Balance change record ID # noqa: E501 :return: The id of this MarginAccountBook. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this MarginAccountBook. - Balance change record ID. # noqa: E501 + Balance change record ID # noqa: E501 :param id: The id of this MarginAccountBook. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def id(self, id): def time(self): """Gets the time of this MarginAccountBook. # noqa: E501 - Balance changed timestamp. # noqa: E501 + Account change timestamp # noqa: E501 :return: The time of this MarginAccountBook. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def time(self): def time(self, time): """Sets the time of this MarginAccountBook. - Balance changed timestamp. # noqa: E501 + Account change timestamp # noqa: E501 :param time: The time of this MarginAccountBook. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def time(self, time): def time_ms(self): """Gets the time_ms of this MarginAccountBook. # noqa: E501 - The timestamp of the change (in milliseconds). # noqa: E501 + The timestamp of the change (in milliseconds) # noqa: E501 :return: The time_ms of this MarginAccountBook. # noqa: E501 :rtype: int @@ -149,7 +149,7 @@ def time_ms(self): def time_ms(self, time_ms): """Sets the time_ms of this MarginAccountBook. - The timestamp of the change (in milliseconds). # noqa: E501 + The timestamp of the change (in milliseconds) # noqa: E501 :param time_ms: The time_ms of this MarginAccountBook. # noqa: E501 :type: int @@ -161,7 +161,7 @@ def time_ms(self, time_ms): def currency(self): """Gets the currency of this MarginAccountBook. # noqa: E501 - Currency changed. # noqa: E501 + Currency changed # noqa: E501 :return: The currency of this MarginAccountBook. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MarginAccountBook. - Currency changed. # noqa: E501 + Currency changed # noqa: E501 :param currency: The currency of this MarginAccountBook. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this MarginAccountBook. # noqa: E501 - Account currency pair. # noqa: E501 + Account trading pair # noqa: E501 :return: The currency_pair of this MarginAccountBook. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginAccountBook. - Account currency pair. # noqa: E501 + Account trading pair # noqa: E501 :param currency_pair: The currency_pair of this MarginAccountBook. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def currency_pair(self, currency_pair): def change(self): """Gets the change of this MarginAccountBook. # noqa: E501 - Amount changed. Positive value means transferring in, while negative out. # noqa: E501 + Amount changed. Positive value means transferring in, while negative out # noqa: E501 :return: The change of this MarginAccountBook. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def change(self): def change(self, change): """Sets the change of this MarginAccountBook. - Amount changed. Positive value means transferring in, while negative out. # noqa: E501 + Amount changed. Positive value means transferring in, while negative out # noqa: E501 :param change: The change of this MarginAccountBook. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def change(self, change): def balance(self): """Gets the balance of this MarginAccountBook. # noqa: E501 - Balance after change. # noqa: E501 + Balance after change # noqa: E501 :return: The balance of this MarginAccountBook. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this MarginAccountBook. - Balance after change. # noqa: E501 + Balance after change # noqa: E501 :param balance: The balance of this MarginAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/margin_account_currency.py b/gate_api/models/margin_account_currency.py index cc82db8..cb96b38 100644 --- a/gate_api/models/margin_account_currency.py +++ b/gate_api/models/margin_account_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, currency=None, available=None, locked=None, borrowed=None, in def currency(self): """Gets the currency of this MarginAccountCurrency. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MarginAccountCurrency. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this MarginAccountCurrency. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def available(self): """Gets the available of this MarginAccountCurrency. # noqa: E501 - Amount suitable for margin trading. # noqa: E501 + Amount available for margin trading, available = margin + borrowed # noqa: E501 :return: The available of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def available(self): def available(self, available): """Sets the available of this MarginAccountCurrency. - Amount suitable for margin trading. # noqa: E501 + Amount available for margin trading, available = margin + borrowed # noqa: E501 :param available: The available of this MarginAccountCurrency. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def available(self, available): def locked(self): """Gets the locked of this MarginAccountCurrency. # noqa: E501 - Locked amount, used in margin trading. # noqa: E501 + Frozen funds, such as amounts already placed in margin market for order trading # noqa: E501 :return: The locked of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this MarginAccountCurrency. - Locked amount, used in margin trading. # noqa: E501 + Frozen funds, such as amounts already placed in margin market for order trading # noqa: E501 :param locked: The locked of this MarginAccountCurrency. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def locked(self, locked): def borrowed(self): """Gets the borrowed of this MarginAccountCurrency. # noqa: E501 - Borrowed amount. # noqa: E501 + Borrowed funds # noqa: E501 :return: The borrowed of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this MarginAccountCurrency. - Borrowed amount. # noqa: E501 + Borrowed funds # noqa: E501 :param borrowed: The borrowed of this MarginAccountCurrency. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def borrowed(self, borrowed): def interest(self): """Gets the interest of this MarginAccountCurrency. # noqa: E501 - Unpaid interests. # noqa: E501 + Unpaid interest # noqa: E501 :return: The interest of this MarginAccountCurrency. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this MarginAccountCurrency. - Unpaid interests. # noqa: E501 + Unpaid interest # noqa: E501 :param interest: The interest of this MarginAccountCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/margin_leverage_tier.py b/gate_api/models/margin_leverage_tier.py index f0032f5..ebf2237 100644 --- a/gate_api/models/margin_leverage_tier.py +++ b/gate_api/models/margin_leverage_tier.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, upper_limit=None, mmr=None, leverage=None, local_vars_configu def upper_limit(self): """Gets the upper_limit of this MarginLeverageTier. # noqa: E501 - Maximum loan limit. # noqa: E501 + Maximum loan limit # noqa: E501 :return: The upper_limit of this MarginLeverageTier. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def upper_limit(self): def upper_limit(self, upper_limit): """Sets the upper_limit of this MarginLeverageTier. - Maximum loan limit. # noqa: E501 + Maximum loan limit # noqa: E501 :param upper_limit: The upper_limit of this MarginLeverageTier. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def upper_limit(self, upper_limit): def mmr(self): """Gets the mmr of this MarginLeverageTier. # noqa: E501 - Maintenance margin rate. # noqa: E501 + Maintenance margin rate # noqa: E501 :return: The mmr of this MarginLeverageTier. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def mmr(self): def mmr(self, mmr): """Sets the mmr of this MarginLeverageTier. - Maintenance margin rate. # noqa: E501 + Maintenance margin rate # noqa: E501 :param mmr: The mmr of this MarginLeverageTier. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def mmr(self, mmr): def leverage(self): """Gets the leverage of this MarginLeverageTier. # noqa: E501 - Maximum leverage multiple. # noqa: E501 + Maximum leverage multiple # noqa: E501 :return: The leverage of this MarginLeverageTier. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this MarginLeverageTier. - Maximum leverage multiple. # noqa: E501 + Maximum leverage multiple # noqa: E501 :param leverage: The leverage of this MarginLeverageTier. # noqa: E501 :type: str diff --git a/gate_api/models/margin_market_leverage.py b/gate_api/models/margin_market_leverage.py index 2b6197d..f024010 100644 --- a/gate_api/models/margin_market_leverage.py +++ b/gate_api/models/margin_market_leverage.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -61,7 +61,7 @@ def __init__(self, currency_pair=None, leverage=None, local_vars_configuration=N def currency_pair(self): """Gets the currency_pair of this MarginMarketLeverage. # noqa: E501 - Currency pair. # noqa: E501 + Market # noqa: E501 :return: The currency_pair of this MarginMarketLeverage. # noqa: E501 :rtype: str @@ -72,7 +72,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginMarketLeverage. - Currency pair. # noqa: E501 + Market # noqa: E501 :param currency_pair: The currency_pair of this MarginMarketLeverage. # noqa: E501 :type: str @@ -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 + Position leverage # 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 + Position leverage # 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 b2b52d5..a1bb5e7 100644 --- a/gate_api/models/margin_tiers.py +++ b/gate_api/models/margin_tiers.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, tier=None, margin_rate=None, lower_limit=None, upper_limit=No def tier(self): """Gets the tier of this MarginTiers. # noqa: E501 - Tier. # noqa: E501 + Tier # noqa: E501 :return: The tier of this MarginTiers. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this MarginTiers. - Tier. # noqa: E501 + Tier # noqa: E501 :param tier: The tier of this MarginTiers. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def tier(self, tier): def margin_rate(self): """Gets the margin_rate of this MarginTiers. # noqa: E501 - Discount. # noqa: E501 + Discount # noqa: E501 :return: The margin_rate of this MarginTiers. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def margin_rate(self): def margin_rate(self, margin_rate): """Sets the margin_rate of this MarginTiers. - Discount. # noqa: E501 + Discount # noqa: E501 :param margin_rate: The margin_rate of this MarginTiers. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def margin_rate(self, margin_rate): def lower_limit(self): """Gets the lower_limit of this MarginTiers. # noqa: E501 - Lower limit. # noqa: E501 + Lower limit # noqa: E501 :return: The lower_limit of this MarginTiers. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def lower_limit(self): def lower_limit(self, lower_limit): """Sets the lower_limit of this MarginTiers. - Lower limit. # noqa: E501 + Lower limit # noqa: E501 :param lower_limit: The lower_limit of this MarginTiers. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def lower_limit(self, lower_limit): def upper_limit(self): """Gets the upper_limit of this MarginTiers. # noqa: E501 - Upper limit, \"\" indicates greater than (the last tier). # noqa: E501 + Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 :return: The upper_limit of this MarginTiers. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def upper_limit(self): def upper_limit(self, upper_limit): """Sets the upper_limit of this MarginTiers. - Upper limit, \"\" indicates greater than (the last tier). # noqa: E501 + Upper limit, \"\" indicates greater than (the last tier) # noqa: E501 :param upper_limit: The upper_limit of this MarginTiers. # noqa: E501 :type: str @@ -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 + Position leverage # 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 + Position leverage # noqa: E501 :param leverage: The leverage of this MarginTiers. # noqa: E501 :type: str diff --git a/gate_api/models/margin_transferable.py b/gate_api/models/margin_transferable.py index cf3f320..4031c74 100644 --- a/gate_api/models/margin_transferable.py +++ b/gate_api/models/margin_transferable.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, currency=None, currency_pair=None, amount=None, local_vars_co def currency(self): """Gets the currency of this MarginTransferable. # noqa: E501 - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :return: The currency of this MarginTransferable. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MarginTransferable. - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :param currency: The currency of this MarginTransferable. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this MarginTransferable. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this MarginTransferable. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MarginTransferable. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this MarginTransferable. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this MarginTransferable. # noqa: E501 - Max transferable amount. # noqa: E501 + Max transferable amount # noqa: E501 :return: The amount of this MarginTransferable. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this MarginTransferable. - Max transferable amount. # noqa: E501 + Max transferable amount # noqa: E501 :param amount: The amount of this MarginTransferable. # noqa: E501 :type: str diff --git a/gate_api/models/max_uni_borrowable.py b/gate_api/models/max_uni_borrowable.py index c72038b..5ac2d09 100644 --- a/gate_api/models/max_uni_borrowable.py +++ b/gate_api/models/max_uni_borrowable.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -65,7 +65,7 @@ def __init__(self, currency=None, currency_pair=None, borrowable=None, local_var def currency(self): """Gets the currency of this MaxUniBorrowable. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this MaxUniBorrowable. # noqa: E501 :rtype: str @@ -76,7 +76,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MaxUniBorrowable. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this MaxUniBorrowable. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this MaxUniBorrowable. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this MaxUniBorrowable. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this MaxUniBorrowable. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this MaxUniBorrowable. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def currency_pair(self, currency_pair): def borrowable(self): """Gets the borrowable of this MaxUniBorrowable. # noqa: E501 - Maximum borrowable. # noqa: E501 + Maximum borrowable # noqa: E501 :return: The borrowable of this MaxUniBorrowable. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def borrowable(self): def borrowable(self, borrowable): """Sets the borrowable of this MaxUniBorrowable. - Maximum borrowable. # noqa: E501 + Maximum borrowable # noqa: E501 :param borrowable: The borrowable of this MaxUniBorrowable. # noqa: E501 :type: str diff --git a/gate_api/models/mock_futures_order.py b/gate_api/models/mock_futures_order.py index a9e9674..3adadb8 100644 --- a/gate_api/models/mock_futures_order.py +++ b/gate_api/models/mock_futures_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -64,7 +64,7 @@ def __init__(self, contract=None, size=None, left=None, local_vars_configuration def contract(self): """Gets the contract of this MockFuturesOrder. # noqa: E501 - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501 :return: The contract of this MockFuturesOrder. # noqa: E501 :rtype: str @@ -75,7 +75,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this MockFuturesOrder. - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501 :param contract: The contract of this MockFuturesOrder. # noqa: E501 :type: str @@ -89,7 +89,7 @@ def contract(self, contract): def size(self): """Gets the size of this MockFuturesOrder. # noqa: E501 - Futures quantity, representing the initial order quantity, not involved in actual settlement. # noqa: E501 + Contract quantity, representing the initial order quantity, not involved in actual settlement # noqa: E501 :return: The size of this MockFuturesOrder. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def size(self): def size(self, size): """Sets the size of this MockFuturesOrder. - Futures quantity, representing the initial order quantity, not involved in actual settlement. # noqa: E501 + Contract quantity, representing the initial order quantity, not involved in actual settlement # noqa: E501 :param size: The size of this MockFuturesOrder. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def size(self, size): def left(self): """Gets the left of this MockFuturesOrder. # noqa: E501 - Unfilled contract quantity, involved in actual calculation. # noqa: E501 + Unfilled contract quantity, involved in actual calculation # noqa: E501 :return: The left of this MockFuturesOrder. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def left(self): def left(self, left): """Sets the left of this MockFuturesOrder. - Unfilled contract quantity, involved in actual calculation. # noqa: E501 + Unfilled contract quantity, involved in actual calculation # noqa: E501 :param left: The left of this MockFuturesOrder. # noqa: E501 :type: str diff --git a/gate_api/models/mock_futures_position.py b/gate_api/models/mock_futures_position.py index dc054da..158c6a7 100644 --- a/gate_api/models/mock_futures_position.py +++ b/gate_api/models/mock_futures_position.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, contract=None, size=None, local_vars_configuration=None): # def contract(self): """Gets the contract of this MockFuturesPosition. # noqa: E501 - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501 :return: The contract of this MockFuturesPosition. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this MockFuturesPosition. - Futures name, currently only supports perpetual futures for BTC and ETH with USDT. # noqa: E501 + Futures name, currently only supports USDT perpetual contracts for BTC and ETH # noqa: E501 :param contract: The contract of this MockFuturesPosition. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def contract(self, contract): def size(self): """Gets the size of this MockFuturesPosition. # noqa: E501 - Position size, measured in contract units. # noqa: E501 + Position size, measured in contract quantity # noqa: E501 :return: The size of this MockFuturesPosition. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def size(self): def size(self, size): """Sets the size of this MockFuturesPosition. - Position size, measured in contract units. # noqa: E501 + Position size, measured in contract quantity # noqa: E501 :param size: The size of this MockFuturesPosition. # noqa: E501 :type: str diff --git a/gate_api/models/mock_margin_result.py b/gate_api/models/mock_margin_result.py index d323423..7181f58 100644 --- a/gate_api/models/mock_margin_result.py +++ b/gate_api/models/mock_margin_result.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, type=None, profit_loss_ranges=None, max_loss=None, mr1=None, def type(self): """Gets the type of this MockMarginResult. # noqa: E501 - Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` position # noqa: E501 + Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 :return: The type of this MockMarginResult. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def type(self): def type(self, type): """Sets the type of this MockMarginResult. - Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` position # noqa: E501 + Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position # noqa: E501 :param type: The type of this MockMarginResult. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def type(self, type): def profit_loss_ranges(self): """Gets the profit_loss_ranges of this MockMarginResult. # noqa: E501 - The results of 3 pressure scenarios for MR1. # noqa: E501 + Results of 33 stress scenarios for MR1 # noqa: E501 :return: The profit_loss_ranges of this MockMarginResult. # noqa: E501 :rtype: list[ProfitLossRange] @@ -121,7 +121,7 @@ def profit_loss_ranges(self): def profit_loss_ranges(self, profit_loss_ranges): """Sets the profit_loss_ranges of this MockMarginResult. - The results of 3 pressure scenarios for MR1. # noqa: E501 + Results of 33 stress scenarios for MR1 # noqa: E501 :param profit_loss_ranges: The profit_loss_ranges of this MockMarginResult. # noqa: E501 :type: list[ProfitLossRange] @@ -156,7 +156,7 @@ def max_loss(self, max_loss): def mr1(self): """Gets the mr1 of this MockMarginResult. # noqa: E501 - Stress testing. # noqa: E501 + Stress testing # noqa: E501 :return: The mr1 of this MockMarginResult. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def mr1(self): def mr1(self, mr1): """Sets the mr1 of this MockMarginResult. - Stress testing. # noqa: E501 + Stress testing # noqa: E501 :param mr1: The mr1 of this MockMarginResult. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def mr1(self, mr1): def mr2(self): """Gets the mr2 of this MockMarginResult. # noqa: E501 - Basis spread risk. # noqa: E501 + Basis spread risk # noqa: E501 :return: The mr2 of this MockMarginResult. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def mr2(self): def mr2(self, mr2): """Sets the mr2 of this MockMarginResult. - Basis spread risk. # noqa: E501 + Basis spread risk # noqa: E501 :param mr2: The mr2 of this MockMarginResult. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def mr2(self, mr2): def mr3(self): """Gets the mr3 of this MockMarginResult. # noqa: E501 - Volatility spread risk. # noqa: E501 + Volatility spread risk # noqa: E501 :return: The mr3 of this MockMarginResult. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def mr3(self): def mr3(self, mr3): """Sets the mr3 of this MockMarginResult. - Volatility spread risk. # noqa: E501 + Volatility spread risk # noqa: E501 :param mr3: The mr3 of this MockMarginResult. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def mr3(self, mr3): def mr4(self): """Gets the mr4 of this MockMarginResult. # noqa: E501 - Option short risk. # noqa: E501 + Option short risk # noqa: E501 :return: The mr4 of this MockMarginResult. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def mr4(self): def mr4(self, mr4): """Sets the mr4 of this MockMarginResult. - Option short risk. # noqa: E501 + Option short risk # noqa: E501 :param mr4: The mr4 of this MockMarginResult. # noqa: E501 :type: str diff --git a/gate_api/models/mock_options_order.py b/gate_api/models/mock_options_order.py index ea77569..7a5193c 100644 --- a/gate_api/models/mock_options_order.py +++ b/gate_api/models/mock_options_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -64,7 +64,7 @@ def __init__(self, options_name=None, size=None, left=None, local_vars_configura def options_name(self): """Gets the options_name of this MockOptionsOrder. # noqa: E501 - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + Option name, currently only supports USDT options for BTC and ETH # noqa: E501 :return: The options_name of this MockOptionsOrder. # noqa: E501 :rtype: str @@ -75,7 +75,7 @@ def options_name(self): def options_name(self, options_name): """Sets the options_name of this MockOptionsOrder. - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + Option name, currently only supports USDT options for BTC and ETH # noqa: E501 :param options_name: The options_name of this MockOptionsOrder. # noqa: E501 :type: str @@ -89,7 +89,7 @@ def options_name(self, options_name): def size(self): """Gets the size of this MockOptionsOrder. # noqa: E501 - Initial order quantity, not involved in actual calculation. # noqa: E501 + Initial order quantity, not involved in actual calculation # noqa: E501 :return: The size of this MockOptionsOrder. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def size(self): def size(self, size): """Sets the size of this MockOptionsOrder. - Initial order quantity, not involved in actual calculation. # noqa: E501 + Initial order quantity, not involved in actual calculation # noqa: E501 :param size: The size of this MockOptionsOrder. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def size(self, size): def left(self): """Gets the left of this MockOptionsOrder. # noqa: E501 - Unfilled contract quantity, involved in actual calculation. # noqa: E501 + Unfilled contract quantity, involved in actual calculation # noqa: E501 :return: The left of this MockOptionsOrder. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def left(self): def left(self, left): """Sets the left of this MockOptionsOrder. - Unfilled contract quantity, involved in actual calculation. # noqa: E501 + Unfilled contract quantity, involved in actual calculation # noqa: E501 :param left: The left of this MockOptionsOrder. # noqa: E501 :type: str diff --git a/gate_api/models/mock_options_position.py b/gate_api/models/mock_options_position.py index ebe07f1..3d27436 100644 --- a/gate_api/models/mock_options_position.py +++ b/gate_api/models/mock_options_position.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, options_name=None, size=None, local_vars_configuration=None): def options_name(self): """Gets the options_name of this MockOptionsPosition. # noqa: E501 - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + Option name, currently only supports USDT options for BTC and ETH # noqa: E501 :return: The options_name of this MockOptionsPosition. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def options_name(self): def options_name(self, options_name): """Sets the options_name of this MockOptionsPosition. - Option name, currently only supports options for BTC and ETH with USDT. # noqa: E501 + Option name, currently only supports USDT options for BTC and ETH # noqa: E501 :param options_name: The options_name of this MockOptionsPosition. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def options_name(self, options_name): def size(self): """Gets the size of this MockOptionsPosition. # noqa: E501 - Position size, measured in contract units. # noqa: E501 + Position size, measured in contract quantity # noqa: E501 :return: The size of this MockOptionsPosition. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def size(self): def size(self, size): """Sets the size of this MockOptionsPosition. - Position size, measured in contract units. # noqa: E501 + Position size, measured in contract quantity # noqa: E501 :param size: The size of this MockOptionsPosition. # noqa: E501 :type: str diff --git a/gate_api/models/mock_risk_unit.py b/gate_api/models/mock_risk_unit.py index cf5b251..7ae22d4 100644 --- a/gate_api/models/mock_risk_unit.py +++ b/gate_api/models/mock_risk_unit.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -97,7 +97,7 @@ def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_ def symbol(self): """Gets the symbol of this MockRiskUnit. # noqa: E501 - Risk unit name. # noqa: E501 + Risk unit name # noqa: E501 :return: The symbol of this MockRiskUnit. # noqa: E501 :rtype: str @@ -108,7 +108,7 @@ def symbol(self): def symbol(self, symbol): """Sets the symbol of this MockRiskUnit. - Risk unit name. # noqa: E501 + Risk unit name # noqa: E501 :param symbol: The symbol of this MockRiskUnit. # noqa: E501 :type: str @@ -120,7 +120,7 @@ def symbol(self, symbol): def spot_in_use(self): """Gets the spot_in_use of this MockRiskUnit. # noqa: E501 - Spot usage. # noqa: E501 + Spot hedge usage # noqa: E501 :return: The spot_in_use of this MockRiskUnit. # noqa: E501 :rtype: str @@ -131,7 +131,7 @@ def spot_in_use(self): def spot_in_use(self, spot_in_use): """Sets the spot_in_use of this MockRiskUnit. - Spot usage. # noqa: E501 + Spot hedge usage # noqa: E501 :param spot_in_use: The spot_in_use of this MockRiskUnit. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def spot_in_use(self, spot_in_use): def maintain_margin(self): """Gets the maintain_margin of this MockRiskUnit. # noqa: E501 - Maintenance margin. # noqa: E501 + Maintenance margin # noqa: E501 :return: The maintain_margin of this MockRiskUnit. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def maintain_margin(self): def maintain_margin(self, maintain_margin): """Sets the maintain_margin of this MockRiskUnit. - Maintenance margin. # noqa: E501 + Maintenance margin # noqa: E501 :param maintain_margin: The maintain_margin of this MockRiskUnit. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def maintain_margin(self, maintain_margin): def initial_margin(self): """Gets the initial_margin of this MockRiskUnit. # noqa: E501 - Initial margin. # noqa: E501 + Initial margin # noqa: E501 :return: The initial_margin of this MockRiskUnit. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def initial_margin(self): def initial_margin(self, initial_margin): """Sets the initial_margin of this MockRiskUnit. - Initial margin. # noqa: E501 + Initial margin # noqa: E501 :param initial_margin: The initial_margin of this MockRiskUnit. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def initial_margin(self, initial_margin): def margin_result(self): """Gets the margin_result of this MockRiskUnit. # noqa: E501 - Margin result. # noqa: E501 + Margin result # noqa: E501 :return: The margin_result of this MockRiskUnit. # noqa: E501 :rtype: list[MockMarginResult] @@ -200,7 +200,7 @@ def margin_result(self): def margin_result(self, margin_result): """Sets the margin_result of this MockRiskUnit. - Margin result. # noqa: E501 + Margin result # noqa: E501 :param margin_result: The margin_result of this MockRiskUnit. # noqa: E501 :type: list[MockMarginResult] @@ -212,7 +212,7 @@ def margin_result(self, margin_result): def delta(self): """Gets the delta of this MockRiskUnit. # noqa: E501 - Total Delta of risk unit. # noqa: E501 + Total Delta of risk unit # noqa: E501 :return: The delta of this MockRiskUnit. # noqa: E501 :rtype: str @@ -223,7 +223,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this MockRiskUnit. - Total Delta of risk unit. # noqa: E501 + Total Delta of risk unit # noqa: E501 :param delta: The delta of this MockRiskUnit. # noqa: E501 :type: str @@ -235,7 +235,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this MockRiskUnit. # noqa: E501 - Total Gamma of risk unit. # noqa: E501 + Total Gamma of risk unit # noqa: E501 :return: The gamma of this MockRiskUnit. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this MockRiskUnit. - Total Gamma of risk unit. # noqa: E501 + Total Gamma of risk unit # noqa: E501 :param gamma: The gamma of this MockRiskUnit. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def gamma(self, gamma): def theta(self): """Gets the theta of this MockRiskUnit. # noqa: E501 - Total Theta of risk unit. # noqa: E501 + Total Theta of risk unit # noqa: E501 :return: The theta of this MockRiskUnit. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this MockRiskUnit. - Total Theta of risk unit. # noqa: E501 + Total Theta of risk unit # noqa: E501 :param theta: The theta of this MockRiskUnit. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def theta(self, theta): def vega(self): """Gets the vega of this MockRiskUnit. # noqa: E501 - Total Vega of risk unit. # noqa: E501 + Total Vega of risk unit # noqa: E501 :return: The vega of this MockRiskUnit. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this MockRiskUnit. - Total Vega of risk unit. # noqa: E501 + Total Vega of risk unit # noqa: E501 :param vega: The vega of this MockRiskUnit. # noqa: E501 :type: str diff --git a/gate_api/models/mock_spot_balance.py b/gate_api/models/mock_spot_balance.py index 3631ab7..721cf0b 100644 --- a/gate_api/models/mock_spot_balance.py +++ b/gate_api/models/mock_spot_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, currency=None, equity=None, local_vars_configuration=None): def currency(self): """Gets the currency of this MockSpotBalance. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this MockSpotBalance. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MockSpotBalance. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this MockSpotBalance. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def equity(self): """Gets the equity of this MockSpotBalance. # noqa: E501 - Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. # noqa: E501 + Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports BTC and ETH # noqa: E501 :return: The equity of this MockSpotBalance. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def equity(self): def equity(self, equity): """Sets the equity of this MockSpotBalance. - Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports three currencies: BTC, ETH. # noqa: E501 + Currency equity, where equity = balance - borrowed, represents the net delta exposure of your spot positions, which can be negative. Currently only supports BTC and ETH # noqa: E501 :param equity: The equity of this MockSpotBalance. # noqa: E501 :type: str diff --git a/gate_api/models/mock_spot_order.py b/gate_api/models/mock_spot_order.py index a6fd363..d8f70cb 100644 --- a/gate_api/models/mock_spot_order.py +++ b/gate_api/models/mock_spot_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -73,7 +73,7 @@ def __init__(self, currency_pairs=None, order_price=None, count=None, left=None, def currency_pairs(self): """Gets the currency_pairs of this MockSpotOrder. # noqa: E501 - Currency pair. # noqa: E501 + Market # noqa: E501 :return: The currency_pairs of this MockSpotOrder. # noqa: E501 :rtype: str @@ -84,7 +84,7 @@ def currency_pairs(self): def currency_pairs(self, currency_pairs): """Sets the currency_pairs of this MockSpotOrder. - Currency pair. # noqa: E501 + Market # noqa: E501 :param currency_pairs: The currency_pairs of this MockSpotOrder. # noqa: E501 :type: str @@ -98,7 +98,7 @@ def currency_pairs(self, currency_pairs): def order_price(self): """Gets the order_price of this MockSpotOrder. # noqa: E501 - Price. # noqa: E501 + Price # noqa: E501 :return: The order_price of this MockSpotOrder. # noqa: E501 :rtype: str @@ -109,7 +109,7 @@ def order_price(self): def order_price(self, order_price): """Sets the order_price of this MockSpotOrder. - Price. # noqa: E501 + Price # noqa: E501 :param order_price: The order_price of this MockSpotOrder. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def order_price(self, order_price): def count(self): """Gets the count of this MockSpotOrder. # noqa: E501 - Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. # noqa: E501 + Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports BTC and ETH Currently only supports three currencies: BTC, ETH # noqa: E501 :return: The count of this MockSpotOrder. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def count(self): def count(self, count): """Sets the count of this MockSpotOrder. - Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. # noqa: E501 + Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports BTC and ETH Currently only supports three currencies: BTC, ETH # noqa: E501 :param count: The count of this MockSpotOrder. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def count(self, count): def left(self): """Gets the left of this MockSpotOrder. # noqa: E501 - Unfilled quantity, involved in actual calculation. # noqa: E501 + Unfilled quantity, involved in actual calculation # noqa: E501 :return: The left of this MockSpotOrder. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def left(self): def left(self, left): """Sets the left of this MockSpotOrder. - Unfilled quantity, involved in actual calculation. # noqa: E501 + Unfilled quantity, involved in actual calculation # noqa: E501 :param left: The left of this MockSpotOrder. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def left(self, left): def type(self): """Gets the type of this MockSpotOrder. # noqa: E501 - Order type, sell - sell order, buy - buy order. # noqa: E501 + Order type, sell - sell order, buy - buy order # noqa: E501 :return: The type of this MockSpotOrder. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def type(self): def type(self, type): """Sets the type of this MockSpotOrder. - Order type, sell - sell order, buy - buy order. # noqa: E501 + Order type, sell - sell order, buy - buy order # noqa: E501 :param type: The type of this MockSpotOrder. # noqa: E501 :type: str diff --git a/gate_api/models/multi_chain_address_item.py b/gate_api/models/multi_chain_address_item.py index f96d2fa..a18243c 100644 --- a/gate_api/models/multi_chain_address_item.py +++ b/gate_api/models/multi_chain_address_item.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, chain=None, address=None, payment_id=None, payment_name=None, def chain(self): """Gets the chain of this MultiChainAddressItem. # noqa: E501 - Name of the chain. # noqa: E501 + Name of the chain # noqa: E501 :return: The chain of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this MultiChainAddressItem. - Name of the chain. # noqa: E501 + Name of the chain # noqa: E501 :param chain: The chain of this MultiChainAddressItem. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def chain(self, chain): def address(self): """Gets the address of this MultiChainAddressItem. # noqa: E501 - Deposit address. # noqa: E501 + Deposit address # noqa: E501 :return: The address of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def address(self): def address(self, address): """Sets the address of this MultiChainAddressItem. - Deposit address. # noqa: E501 + Deposit address # noqa: E501 :param address: The address of this MultiChainAddressItem. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def address(self, address): def payment_id(self): """Gets the payment_id of this MultiChainAddressItem. # noqa: E501 - Notes that some currencies required(e.g., Tag, Memo) when depositing. # noqa: E501 + Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 :return: The payment_id of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def payment_id(self): def payment_id(self, payment_id): """Sets the payment_id of this MultiChainAddressItem. - Notes that some currencies required(e.g., Tag, Memo) when depositing. # noqa: E501 + Notes that some currencies required(e.g., Tag, Memo) when depositing # noqa: E501 :param payment_id: The payment_id of this MultiChainAddressItem. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def payment_id(self, payment_id): def payment_name(self): """Gets the payment_name of this MultiChainAddressItem. # noqa: E501 - Note type, `Tag` or `Memo`. # noqa: E501 + Note type, `Tag` or `Memo` # noqa: E501 :return: The payment_name of this MultiChainAddressItem. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def payment_name(self): def payment_name(self, payment_name): """Sets the payment_name of this MultiChainAddressItem. - Note type, `Tag` or `Memo`. # noqa: E501 + Note type, `Tag` or `Memo` # noqa: E501 :param payment_name: The payment_name of this MultiChainAddressItem. # noqa: E501 :type: str diff --git a/gate_api/models/multi_collateral_currency.py b/gate_api/models/multi_collateral_currency.py index e427bc1..95e5482 100644 --- a/gate_api/models/multi_collateral_currency.py +++ b/gate_api/models/multi_collateral_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, loan_currencies=None, collateral_currencies=None, local_vars_ def loan_currencies(self): """Gets the loan_currencies of this MultiCollateralCurrency. # noqa: E501 - List of supported borrowing currencies. # noqa: E501 + List of supported borrowing currencies # noqa: E501 :return: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 :rtype: list[MultiLoanItem] @@ -73,7 +73,7 @@ def loan_currencies(self): def loan_currencies(self, loan_currencies): """Sets the loan_currencies of this MultiCollateralCurrency. - List of supported borrowing currencies. # noqa: E501 + List of supported borrowing currencies # noqa: E501 :param loan_currencies: The loan_currencies of this MultiCollateralCurrency. # noqa: E501 :type: list[MultiLoanItem] @@ -85,7 +85,7 @@ def loan_currencies(self, loan_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiCollateralCurrency. # noqa: E501 - List of supported collateral currencies. # noqa: E501 + List of supported collateral currencies # noqa: E501 :return: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 :rtype: list[MultiCollateralItem] @@ -96,7 +96,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiCollateralCurrency. - List of supported collateral currencies. # noqa: E501 + List of supported collateral currencies # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiCollateralCurrency. # noqa: E501 :type: list[MultiCollateralItem] diff --git a/gate_api/models/multi_collateral_item.py b/gate_api/models/multi_collateral_item.py index 6061d1a..82cd1e4 100644 --- a/gate_api/models/multi_collateral_item.py +++ b/gate_api/models/multi_collateral_item.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, currency=None, index_price=None, discount=None, local_vars_co def currency(self): """Gets the currency of this MultiCollateralItem. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this MultiCollateralItem. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiCollateralItem. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this MultiCollateralItem. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this MultiCollateralItem. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this MultiCollateralItem. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this MultiCollateralItem. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this MultiCollateralItem. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def index_price(self, index_price): def discount(self): """Gets the discount of this MultiCollateralItem. # noqa: E501 - Discount. # noqa: E501 + Discount # noqa: E501 :return: The discount of this MultiCollateralItem. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def discount(self): def discount(self, discount): """Sets the discount of this MultiCollateralItem. - Discount. # noqa: E501 + Discount # noqa: E501 :param discount: The discount of this MultiCollateralItem. # noqa: E501 :type: str diff --git a/gate_api/models/multi_collateral_order.py b/gate_api/models/multi_collateral_order.py index 7102914..24365fa 100644 --- a/gate_api/models/multi_collateral_order.py +++ b/gate_api/models/multi_collateral_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -122,7 +122,7 @@ def __init__(self, order_id=None, order_type=None, fixed_type=None, fixed_rate=N def order_id(self): """Gets the order_id of this MultiCollateralOrder. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiCollateralOrder. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this MultiCollateralOrder. # noqa: E501 :type: str @@ -145,7 +145,7 @@ def order_id(self, order_id): def order_type(self): """Gets the order_type of this MultiCollateralOrder. # noqa: E501 - current - current, fixed - fixed. # noqa: E501 + current - current, fixed - fixed # noqa: E501 :return: The order_type of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -156,7 +156,7 @@ def order_type(self): def order_type(self, order_type): """Sets the order_type of this MultiCollateralOrder. - current - current, fixed - fixed. # noqa: E501 + current - current, fixed - fixed # noqa: E501 :param order_type: The order_type of this MultiCollateralOrder. # noqa: E501 :type: str @@ -168,7 +168,7 @@ def order_type(self, order_type): def fixed_type(self): """Gets the fixed_type of this MultiCollateralOrder. # noqa: E501 - Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. # noqa: E501 + Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days # noqa: E501 :return: The fixed_type of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -179,7 +179,7 @@ def fixed_type(self): def fixed_type(self, fixed_type): """Sets the fixed_type of this MultiCollateralOrder. - Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. # noqa: E501 + Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days # noqa: E501 :param fixed_type: The fixed_type of this MultiCollateralOrder. # noqa: E501 :type: str @@ -191,7 +191,7 @@ def fixed_type(self, fixed_type): def fixed_rate(self): """Gets the fixed_rate of this MultiCollateralOrder. # noqa: E501 - Fixed interest rate. # noqa: E501 + Fixed interest rate # noqa: E501 :return: The fixed_rate of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -202,7 +202,7 @@ def fixed_rate(self): def fixed_rate(self, fixed_rate): """Sets the fixed_rate of this MultiCollateralOrder. - Fixed interest rate. # noqa: E501 + Fixed interest rate # noqa: E501 :param fixed_rate: The fixed_rate of this MultiCollateralOrder. # noqa: E501 :type: str @@ -214,7 +214,7 @@ def fixed_rate(self, fixed_rate): def expire_time(self): """Gets the expire_time of this MultiCollateralOrder. # noqa: E501 - Expiration time, timestamp, unit in seconds. # noqa: E501 + Expiration time, timestamp, unit in seconds # noqa: E501 :return: The expire_time of this MultiCollateralOrder. # noqa: E501 :rtype: int @@ -225,7 +225,7 @@ def expire_time(self): def expire_time(self, expire_time): """Sets the expire_time of this MultiCollateralOrder. - Expiration time, timestamp, unit in seconds. # noqa: E501 + Expiration time, timestamp, unit in seconds # noqa: E501 :param expire_time: The expire_time of this MultiCollateralOrder. # noqa: E501 :type: int @@ -237,7 +237,7 @@ def expire_time(self, expire_time): def auto_renew(self): """Gets the auto_renew of this MultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic renewal. # noqa: E501 + Fixed interest rate, auto-renewal # noqa: E501 :return: The auto_renew of this MultiCollateralOrder. # noqa: E501 :rtype: bool @@ -248,7 +248,7 @@ def auto_renew(self): def auto_renew(self, auto_renew): """Sets the auto_renew of this MultiCollateralOrder. - Fixed interest rate, automatic renewal. # noqa: E501 + Fixed interest rate, auto-renewal # noqa: E501 :param auto_renew: The auto_renew of this MultiCollateralOrder. # noqa: E501 :type: bool @@ -260,7 +260,7 @@ def auto_renew(self, auto_renew): def auto_repay(self): """Gets the auto_repay of this MultiCollateralOrder. # noqa: E501 - Fixed interest rate, automatic repayment. # noqa: E501 + Fixed interest rate, auto-repayment # noqa: E501 :return: The auto_repay of this MultiCollateralOrder. # noqa: E501 :rtype: bool @@ -271,7 +271,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this MultiCollateralOrder. - Fixed interest rate, automatic repayment. # noqa: E501 + Fixed interest rate, auto-repayment # noqa: E501 :param auto_repay: The auto_repay of this MultiCollateralOrder. # noqa: E501 :type: bool @@ -283,7 +283,7 @@ def auto_repay(self, auto_repay): def current_ltv(self): """Gets the current_ltv of this MultiCollateralOrder. # noqa: E501 - The current collateralization rate. # noqa: E501 + Current collateralization rate # noqa: E501 :return: The current_ltv of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -294,7 +294,7 @@ def current_ltv(self): def current_ltv(self, current_ltv): """Sets the current_ltv of this MultiCollateralOrder. - The current collateralization rate. # noqa: E501 + Current collateralization rate # noqa: E501 :param current_ltv: The current_ltv of this MultiCollateralOrder. # noqa: E501 :type: str @@ -329,7 +329,7 @@ def status(self, status): def borrow_time(self): """Gets the borrow_time of this MultiCollateralOrder. # noqa: E501 - Borrowing time, timestamp in seconds. # noqa: E501 + Borrowing time, timestamp in seconds # noqa: E501 :return: The borrow_time of this MultiCollateralOrder. # noqa: E501 :rtype: int @@ -340,7 +340,7 @@ def borrow_time(self): def borrow_time(self, borrow_time): """Sets the borrow_time of this MultiCollateralOrder. - Borrowing time, timestamp in seconds. # noqa: E501 + Borrowing time, timestamp in seconds # noqa: E501 :param borrow_time: The borrow_time of this MultiCollateralOrder. # noqa: E501 :type: int @@ -352,7 +352,7 @@ def borrow_time(self, borrow_time): def total_left_repay_usdt(self): """Gets the total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 - Value of Left repay amount converted in USDT. # noqa: E501 + Total outstanding value converted to USDT # noqa: E501 :return: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -363,7 +363,7 @@ def total_left_repay_usdt(self): def total_left_repay_usdt(self, total_left_repay_usdt): """Sets the total_left_repay_usdt of this MultiCollateralOrder. - Value of Left repay amount converted in USDT. # noqa: E501 + Total outstanding value converted to USDT # noqa: E501 :param total_left_repay_usdt: The total_left_repay_usdt of this MultiCollateralOrder. # noqa: E501 :type: str @@ -375,7 +375,7 @@ def total_left_repay_usdt(self, total_left_repay_usdt): def total_left_collateral_usdt(self): """Gets the total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 - Value of Collateral amount in USDT. # noqa: E501 + Total collateral value converted to USDT # noqa: E501 :return: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 :rtype: str @@ -386,7 +386,7 @@ def total_left_collateral_usdt(self): def total_left_collateral_usdt(self, total_left_collateral_usdt): """Sets the total_left_collateral_usdt of this MultiCollateralOrder. - Value of Collateral amount in USDT. # noqa: E501 + Total collateral value converted to USDT # noqa: E501 :param total_left_collateral_usdt: The total_left_collateral_usdt of this MultiCollateralOrder. # noqa: E501 :type: str @@ -398,7 +398,7 @@ def total_left_collateral_usdt(self, total_left_collateral_usdt): def borrow_currencies(self): """Gets the borrow_currencies of this MultiCollateralOrder. # noqa: E501 - Borrowing Currency List. # noqa: E501 + Borrowing Currency List # noqa: E501 :return: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 :rtype: list[BorrowCurrencyInfo] @@ -409,7 +409,7 @@ def borrow_currencies(self): def borrow_currencies(self, borrow_currencies): """Sets the borrow_currencies of this MultiCollateralOrder. - Borrowing Currency List. # noqa: E501 + Borrowing Currency List # noqa: E501 :param borrow_currencies: The borrow_currencies of this MultiCollateralOrder. # noqa: E501 :type: list[BorrowCurrencyInfo] @@ -421,7 +421,7 @@ def borrow_currencies(self, borrow_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiCollateralOrder. # noqa: E501 - Collateral Currency List. # noqa: E501 + Collateral Currency List # noqa: E501 :return: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 :rtype: list[CollateralCurrencyInfo] @@ -432,7 +432,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiCollateralOrder. - Collateral Currency List. # noqa: E501 + Collateral Currency List # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiCollateralOrder. # noqa: E501 :type: list[CollateralCurrencyInfo] diff --git a/gate_api/models/multi_collateral_record.py b/gate_api/models/multi_collateral_record.py index 934366a..a4bb4a3 100644 --- a/gate_api/models/multi_collateral_record.py +++ b/gate_api/models/multi_collateral_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, order_id=None, record_id=None, before_ltv=None, after_ltv=Non def order_id(self): """Gets the order_id of this MultiCollateralRecord. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this MultiCollateralRecord. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiCollateralRecord. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this MultiCollateralRecord. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this MultiCollateralRecord. # noqa: E501 - Collateral record ID. # noqa: E501 + Collateral record ID # noqa: E501 :return: The record_id of this MultiCollateralRecord. # noqa: E501 :rtype: int @@ -121,7 +121,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this MultiCollateralRecord. - Collateral record ID. # noqa: E501 + Collateral record ID # noqa: E501 :param record_id: The record_id of this MultiCollateralRecord. # noqa: E501 :type: int @@ -133,7 +133,7 @@ def record_id(self, record_id): def before_ltv(self): """Gets the before_ltv of this MultiCollateralRecord. # noqa: E501 - The collateral ratio before adjustment. # noqa: E501 + Collateral ratio before adjustment # noqa: E501 :return: The before_ltv of this MultiCollateralRecord. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def before_ltv(self): def before_ltv(self, before_ltv): """Sets the before_ltv of this MultiCollateralRecord. - The collateral ratio before adjustment. # noqa: E501 + Collateral ratio before adjustment # noqa: E501 :param before_ltv: The before_ltv of this MultiCollateralRecord. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def before_ltv(self, before_ltv): def after_ltv(self): """Gets the after_ltv of this MultiCollateralRecord. # noqa: E501 - The collateral ratio before adjustment. # noqa: E501 + Collateral ratio before adjustment # noqa: E501 :return: The after_ltv of this MultiCollateralRecord. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def after_ltv(self): def after_ltv(self, after_ltv): """Sets the after_ltv of this MultiCollateralRecord. - The collateral ratio before adjustment. # noqa: E501 + Collateral ratio before adjustment # noqa: E501 :param after_ltv: The after_ltv of this MultiCollateralRecord. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def after_ltv(self, after_ltv): def operate_time(self): """Gets the operate_time of this MultiCollateralRecord. # noqa: E501 - Operation time, timestamp in seconds. # noqa: E501 + Operation time, timestamp in seconds # noqa: E501 :return: The operate_time of this MultiCollateralRecord. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def operate_time(self): def operate_time(self, operate_time): """Sets the operate_time of this MultiCollateralRecord. - Operation time, timestamp in seconds. # noqa: E501 + Operation time, timestamp in seconds # noqa: E501 :param operate_time: The operate_time of this MultiCollateralRecord. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def operate_time(self, operate_time): def borrow_currencies(self): """Gets the borrow_currencies of this MultiCollateralRecord. # noqa: E501 - Borrowing Currency List. # noqa: E501 + Borrowing Currency List # noqa: E501 :return: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 :rtype: list[MultiCollateralRecordCurrency] @@ -213,7 +213,7 @@ def borrow_currencies(self): def borrow_currencies(self, borrow_currencies): """Sets the borrow_currencies of this MultiCollateralRecord. - Borrowing Currency List. # noqa: E501 + Borrowing Currency List # noqa: E501 :param borrow_currencies: The borrow_currencies of this MultiCollateralRecord. # noqa: E501 :type: list[MultiCollateralRecordCurrency] @@ -225,7 +225,7 @@ def borrow_currencies(self, borrow_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiCollateralRecord. # noqa: E501 - Collateral Currency List. # noqa: E501 + Collateral Currency List # noqa: E501 :return: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 :rtype: list[MultiCollateralRecordCurrency] @@ -236,7 +236,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiCollateralRecord. - Collateral Currency List. # noqa: E501 + Collateral Currency List # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiCollateralRecord. # noqa: E501 :type: list[MultiCollateralRecordCurrency] diff --git a/gate_api/models/multi_collateral_record_currency.py b/gate_api/models/multi_collateral_record_currency.py index f8228fd..c585d49 100644 --- a/gate_api/models/multi_collateral_record_currency.py +++ b/gate_api/models/multi_collateral_record_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, before_amount=None, before_a def currency(self): """Gets the currency of this MultiCollateralRecordCurrency. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiCollateralRecordCurrency. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this MultiCollateralRecordCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this MultiCollateralRecordCurrency. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this MultiCollateralRecordCurrency. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this MultiCollateralRecordCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def before_amount(self): """Gets the before_amount of this MultiCollateralRecordCurrency. # noqa: E501 - Amount before the operation. # noqa: E501 + Amount before the operation # noqa: E501 :return: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def before_amount(self): def before_amount(self, before_amount): """Sets the before_amount of this MultiCollateralRecordCurrency. - Amount before the operation. # noqa: E501 + Amount before the operation # noqa: E501 :param before_amount: The before_amount of this MultiCollateralRecordCurrency. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def before_amount(self, before_amount): def before_amount_usdt(self): """Gets the before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - USDT Amount before the operation. # noqa: E501 + USDT Amount before the operation # noqa: E501 :return: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def before_amount_usdt(self): def before_amount_usdt(self, before_amount_usdt): """Sets the before_amount_usdt of this MultiCollateralRecordCurrency. - USDT Amount before the operation. # noqa: E501 + USDT Amount before the operation # noqa: E501 :param before_amount_usdt: The before_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def before_amount_usdt(self, before_amount_usdt): def after_amount(self): """Gets the after_amount of this MultiCollateralRecordCurrency. # noqa: E501 - Amount after the operation. # noqa: E501 + Amount after the operation # noqa: E501 :return: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def after_amount(self): def after_amount(self, after_amount): """Sets the after_amount of this MultiCollateralRecordCurrency. - Amount after the operation. # noqa: E501 + Amount after the operation # noqa: E501 :param after_amount: The after_amount of this MultiCollateralRecordCurrency. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def after_amount(self, after_amount): def after_amount_usdt(self): """Gets the after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 - USDT Amount after the operation. # noqa: E501 + USDT Amount after the operation # noqa: E501 :return: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def after_amount_usdt(self): def after_amount_usdt(self, after_amount_usdt): """Sets the after_amount_usdt of this MultiCollateralRecordCurrency. - USDT Amount after the operation. # noqa: E501 + USDT Amount after the operation # noqa: E501 :param after_amount_usdt: The after_amount_usdt of this MultiCollateralRecordCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/multi_loan_item.py b/gate_api/models/multi_loan_item.py index 4fa410c..02c2dd5 100644 --- a/gate_api/models/multi_loan_item.py +++ b/gate_api/models/multi_loan_item.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, price=None, local_vars_configuration=None): # def currency(self): """Gets the currency of this MultiLoanItem. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this MultiLoanItem. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiLoanItem. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this MultiLoanItem. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def price(self): """Gets the price of this MultiLoanItem. # noqa: E501 - Latest price of the currency. # noqa: E501 + Latest price of the currency # noqa: E501 :return: The price of this MultiLoanItem. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def price(self): def price(self, price): """Sets the price of this MultiLoanItem. - Latest price of the currency. # noqa: E501 + Latest price of the currency # noqa: E501 :param price: The price of this MultiLoanItem. # noqa: E501 :type: str diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py index d95fb06..8ca2267 100644 --- a/gate_api/models/multi_loan_repay_item.py +++ b/gate_api/models/multi_loan_repay_item.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, currency=None, amount=None, repaid_all=None, local_vars_confi def currency(self): """Gets the currency of this MultiLoanRepayItem. # noqa: E501 - Repayment currency. # noqa: E501 + Repayment currency # noqa: E501 :return: The currency of this MultiLoanRepayItem. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this MultiLoanRepayItem. - Repayment currency. # noqa: E501 + Repayment currency # noqa: E501 :param currency: The currency of this MultiLoanRepayItem. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this MultiLoanRepayItem. # noqa: E501 - Size. # noqa: E501 + Size # noqa: E501 :return: The amount of this MultiLoanRepayItem. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this MultiLoanRepayItem. - Size. # noqa: E501 + Size # noqa: E501 :param amount: The amount of this MultiLoanRepayItem. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def amount(self, amount): def repaid_all(self): """Gets the repaid_all of this MultiLoanRepayItem. # noqa: E501 - Repayment method, set to true for full repayment, false for partial repayment. # noqa: E501 + Repayment method, set to true for full repayment, false for partial repayment # noqa: E501 :return: The repaid_all of this MultiLoanRepayItem. # noqa: E501 :rtype: bool @@ -124,7 +124,7 @@ def repaid_all(self): def repaid_all(self, repaid_all): """Sets the repaid_all of this MultiLoanRepayItem. - Repayment method, set to true for full repayment, false for partial repayment. # noqa: E501 + Repayment method, set to true for full repayment, false for partial repayment # noqa: E501 :param repaid_all: The repaid_all of this MultiLoanRepayItem. # noqa: E501 :type: bool diff --git a/gate_api/models/multi_repay_record.py b/gate_api/models/multi_repay_record.py index e648539..82e18fc 100644 --- a/gate_api/models/multi_repay_record.py +++ b/gate_api/models/multi_repay_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -112,7 +112,7 @@ def __init__(self, order_id=None, record_id=None, init_ltv=None, before_ltv=None def order_id(self): """Gets the order_id of this MultiRepayRecord. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this MultiRepayRecord. # noqa: E501 :rtype: int @@ -123,7 +123,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiRepayRecord. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this MultiRepayRecord. # noqa: E501 :type: int @@ -135,7 +135,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this MultiRepayRecord. # noqa: E501 - Repayment record ID. # noqa: E501 + Repayment record ID # noqa: E501 :return: The record_id of this MultiRepayRecord. # noqa: E501 :rtype: int @@ -146,7 +146,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this MultiRepayRecord. - Repayment record ID. # noqa: E501 + Repayment record ID # noqa: E501 :param record_id: The record_id of this MultiRepayRecord. # noqa: E501 :type: int @@ -158,7 +158,7 @@ def record_id(self, record_id): def init_ltv(self): """Gets the init_ltv of this MultiRepayRecord. # noqa: E501 - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :return: The init_ltv of this MultiRepayRecord. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this MultiRepayRecord. - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :param init_ltv: The init_ltv of this MultiRepayRecord. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def init_ltv(self, init_ltv): def before_ltv(self): """Gets the before_ltv of this MultiRepayRecord. # noqa: E501 - Ltv before the operation. # noqa: E501 + Ltv before the operation # noqa: E501 :return: The before_ltv of this MultiRepayRecord. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def before_ltv(self): def before_ltv(self, before_ltv): """Sets the before_ltv of this MultiRepayRecord. - Ltv before the operation. # noqa: E501 + Ltv before the operation # noqa: E501 :param before_ltv: The before_ltv of this MultiRepayRecord. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def before_ltv(self, before_ltv): def after_ltv(self): """Gets the after_ltv of this MultiRepayRecord. # noqa: E501 - Ltv after the operation. # noqa: E501 + Ltv after the operation # noqa: E501 :return: The after_ltv of this MultiRepayRecord. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def after_ltv(self): def after_ltv(self, after_ltv): """Sets the after_ltv of this MultiRepayRecord. - Ltv after the operation. # noqa: E501 + Ltv after the operation # noqa: E501 :param after_ltv: The after_ltv of this MultiRepayRecord. # noqa: E501 :type: str @@ -227,7 +227,7 @@ def after_ltv(self, after_ltv): def borrow_time(self): """Gets the borrow_time of this MultiRepayRecord. # noqa: E501 - Borrowing time, timestamp in seconds. # noqa: E501 + Borrowing time, timestamp in seconds # noqa: E501 :return: The borrow_time of this MultiRepayRecord. # noqa: E501 :rtype: int @@ -238,7 +238,7 @@ def borrow_time(self): def borrow_time(self, borrow_time): """Sets the borrow_time of this MultiRepayRecord. - Borrowing time, timestamp in seconds. # noqa: E501 + Borrowing time, timestamp in seconds # noqa: E501 :param borrow_time: The borrow_time of this MultiRepayRecord. # noqa: E501 :type: int @@ -250,7 +250,7 @@ def borrow_time(self, borrow_time): def repay_time(self): """Gets the repay_time of this MultiRepayRecord. # noqa: E501 - Repayment time, timestamp in seconds. # noqa: E501 + Repayment time, timestamp in seconds # noqa: E501 :return: The repay_time of this MultiRepayRecord. # noqa: E501 :rtype: int @@ -261,7 +261,7 @@ def repay_time(self): def repay_time(self, repay_time): """Sets the repay_time of this MultiRepayRecord. - Repayment time, timestamp in seconds. # noqa: E501 + Repayment time, timestamp in seconds # noqa: E501 :param repay_time: The repay_time of this MultiRepayRecord. # noqa: E501 :type: int @@ -273,7 +273,7 @@ def repay_time(self, repay_time): def borrow_currencies(self): """Gets the borrow_currencies of this MultiRepayRecord. # noqa: E501 - List of borrowing information. # noqa: E501 + List of borrowing information # noqa: E501 :return: The borrow_currencies of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordCurrency] @@ -284,7 +284,7 @@ def borrow_currencies(self): def borrow_currencies(self, borrow_currencies): """Sets the borrow_currencies of this MultiRepayRecord. - List of borrowing information. # noqa: E501 + List of borrowing information # noqa: E501 :param borrow_currencies: The borrow_currencies of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordCurrency] @@ -296,7 +296,7 @@ def borrow_currencies(self, borrow_currencies): def collateral_currencies(self): """Gets the collateral_currencies of this MultiRepayRecord. # noqa: E501 - List of collateral information. # noqa: E501 + List of collateral information # noqa: E501 :return: The collateral_currencies of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordCurrency] @@ -307,7 +307,7 @@ def collateral_currencies(self): def collateral_currencies(self, collateral_currencies): """Sets the collateral_currencies of this MultiRepayRecord. - List of collateral information. # noqa: E501 + List of collateral information # noqa: E501 :param collateral_currencies: The collateral_currencies of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordCurrency] @@ -319,7 +319,7 @@ def collateral_currencies(self, collateral_currencies): def repaid_currencies(self): """Gets the repaid_currencies of this MultiRepayRecord. # noqa: E501 - Repay Currency List. # noqa: E501 + Repay Currency List # noqa: E501 :return: The repaid_currencies of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordRepaidCurrency] @@ -330,7 +330,7 @@ def repaid_currencies(self): def repaid_currencies(self, repaid_currencies): """Sets the repaid_currencies of this MultiRepayRecord. - Repay Currency List. # noqa: E501 + Repay Currency List # noqa: E501 :param repaid_currencies: The repaid_currencies of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordRepaidCurrency] @@ -342,7 +342,7 @@ def repaid_currencies(self, repaid_currencies): def total_interest_list(self): """Gets the total_interest_list of this MultiRepayRecord. # noqa: E501 - Total Interest List. # noqa: E501 + Total Interest List # noqa: E501 :return: The total_interest_list of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordTotalInterest] @@ -353,7 +353,7 @@ def total_interest_list(self): def total_interest_list(self, total_interest_list): """Sets the total_interest_list of this MultiRepayRecord. - Total Interest List. # noqa: E501 + Total Interest List # noqa: E501 :param total_interest_list: The total_interest_list of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordTotalInterest] @@ -365,7 +365,7 @@ def total_interest_list(self, total_interest_list): def left_repay_interest_list(self): """Gets the left_repay_interest_list of this MultiRepayRecord. # noqa: E501 - List of left repay interest. # noqa: E501 + List of remaining interest to be repaid # noqa: E501 :return: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 :rtype: list[RepayRecordLeftInterest] @@ -376,7 +376,7 @@ def left_repay_interest_list(self): def left_repay_interest_list(self, left_repay_interest_list): """Sets the left_repay_interest_list of this MultiRepayRecord. - List of left repay interest. # noqa: E501 + List of remaining interest to be repaid # noqa: E501 :param left_repay_interest_list: The left_repay_interest_list of this MultiRepayRecord. # noqa: E501 :type: list[RepayRecordLeftInterest] diff --git a/gate_api/models/multi_repay_resp.py b/gate_api/models/multi_repay_resp.py index ec33cf0..bb2f880 100644 --- a/gate_api/models/multi_repay_resp.py +++ b/gate_api/models/multi_repay_resp.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, order_id=None, repaid_currencies=None, local_vars_configurati def order_id(self): """Gets the order_id of this MultiRepayResp. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this MultiRepayResp. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MultiRepayResp. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this MultiRepayResp. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def order_id(self, order_id): def repaid_currencies(self): """Gets the repaid_currencies of this MultiRepayResp. # noqa: E501 - Repay Currency List. # noqa: E501 + Repay Currency List # noqa: E501 :return: The repaid_currencies of this MultiRepayResp. # noqa: E501 :rtype: list[RepayCurrencyRes] @@ -96,7 +96,7 @@ def repaid_currencies(self): def repaid_currencies(self, repaid_currencies): """Sets the repaid_currencies of this MultiRepayResp. - Repay Currency List. # noqa: E501 + Repay Currency List # noqa: E501 :param repaid_currencies: The repaid_currencies of this MultiRepayResp. # noqa: E501 :type: list[RepayCurrencyRes] diff --git a/gate_api/models/my_futures_trade.py b/gate_api/models/my_futures_trade.py index 59af70c..4066f32 100644 --- a/gate_api/models/my_futures_trade.py +++ b/gate_api/models/my_futures_trade.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -107,7 +107,7 @@ def __init__(self, id=None, create_time=None, contract=None, order_id=None, size def id(self): """Gets the id of this MyFuturesTrade. # noqa: E501 - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :return: The id of this MyFuturesTrade. # noqa: E501 :rtype: int @@ -118,7 +118,7 @@ def id(self): def id(self, id): """Sets the id of this MyFuturesTrade. - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :param id: The id of this MyFuturesTrade. # noqa: E501 :type: int @@ -130,7 +130,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this MyFuturesTrade. # noqa: E501 - Trading time. # noqa: E501 + Fill Time # noqa: E501 :return: The create_time of this MyFuturesTrade. # noqa: E501 :rtype: float @@ -141,7 +141,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this MyFuturesTrade. - Trading time. # noqa: E501 + Fill Time # noqa: E501 :param create_time: The create_time of this MyFuturesTrade. # noqa: E501 :type: float @@ -153,7 +153,7 @@ def create_time(self, create_time): def contract(self): """Gets the contract of this MyFuturesTrade. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -164,7 +164,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this MyFuturesTrade. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this MyFuturesTrade. # noqa: E501 :type: str @@ -176,7 +176,7 @@ def contract(self, contract): def order_id(self): """Gets the order_id of this MyFuturesTrade. # noqa: E501 - Order ID related. # noqa: E501 + Related order ID # noqa: E501 :return: The order_id of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -187,7 +187,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MyFuturesTrade. - Order ID related. # noqa: E501 + Related order ID # noqa: E501 :param order_id: The order_id of this MyFuturesTrade. # noqa: E501 :type: str @@ -199,7 +199,7 @@ def order_id(self, order_id): def size(self): """Gets the size of this MyFuturesTrade. # noqa: E501 - Trading size. # noqa: E501 + Trading size # noqa: E501 :return: The size of this MyFuturesTrade. # noqa: E501 :rtype: int @@ -210,7 +210,7 @@ def size(self): def size(self, size): """Sets the size of this MyFuturesTrade. - Trading size. # noqa: E501 + Trading size # noqa: E501 :param size: The size of this MyFuturesTrade. # noqa: E501 :type: int @@ -222,7 +222,7 @@ def size(self, size): def close_size(self): """Gets the close_size of this MyFuturesTrade. # noqa: E501 - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :return: The close_size of this MyFuturesTrade. # noqa: E501 :rtype: int @@ -233,7 +233,7 @@ def close_size(self): def close_size(self, close_size): """Sets the close_size of this MyFuturesTrade. - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :param close_size: The close_size of this MyFuturesTrade. # noqa: E501 :type: int @@ -245,7 +245,7 @@ def close_size(self, close_size): def price(self): """Gets the price of this MyFuturesTrade. # noqa: E501 - Trading price. # noqa: E501 + Fill Price # noqa: E501 :return: The price of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -256,7 +256,7 @@ def price(self): def price(self, price): """Sets the price of this MyFuturesTrade. - Trading price. # noqa: E501 + Fill Price # noqa: E501 :param price: The price of this MyFuturesTrade. # noqa: E501 :type: str @@ -268,7 +268,7 @@ def price(self, price): def role(self): """Gets the role of this MyFuturesTrade. # noqa: E501 - Trade role. Available values are `taker` and `maker`. # noqa: E501 + Trade role. taker - taker, maker - maker # noqa: E501 :return: The role of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -279,7 +279,7 @@ def role(self): def role(self, role): """Sets the role of this MyFuturesTrade. - Trade role. Available values are `taker` and `maker`. # noqa: E501 + Trade role. taker - taker, maker - maker # noqa: E501 :param role: The role of this MyFuturesTrade. # noqa: E501 :type: str @@ -297,7 +297,7 @@ def role(self, role): def text(self): """Gets the text of this MyFuturesTrade. # noqa: E501 - User defined information. # noqa: E501 + Order custom information # noqa: E501 :return: The text of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -308,7 +308,7 @@ def text(self): def text(self, text): """Sets the text of this MyFuturesTrade. - User defined information. # noqa: E501 + Order custom information # noqa: E501 :param text: The text of this MyFuturesTrade. # noqa: E501 :type: str @@ -320,7 +320,7 @@ def text(self, text): def fee(self): """Gets the fee of this MyFuturesTrade. # noqa: E501 - Fee deducted. # noqa: E501 + Trade fee # noqa: E501 :return: The fee of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -331,7 +331,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this MyFuturesTrade. - Fee deducted. # noqa: E501 + Trade fee # noqa: E501 :param fee: The fee of this MyFuturesTrade. # noqa: E501 :type: str @@ -343,7 +343,7 @@ def fee(self, fee): def point_fee(self): """Gets the point_fee of this MyFuturesTrade. # noqa: E501 - Points used to deduct fee. # noqa: E501 + Points used to deduct trade fee # noqa: E501 :return: The point_fee of this MyFuturesTrade. # noqa: E501 :rtype: str @@ -354,7 +354,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this MyFuturesTrade. - Points used to deduct fee. # noqa: E501 + Points used to deduct trade fee # noqa: E501 :param point_fee: The point_fee of this MyFuturesTrade. # noqa: E501 :type: str diff --git a/gate_api/models/my_futures_trade_time_range.py b/gate_api/models/my_futures_trade_time_range.py index a6589ca..81e915b 100644 --- a/gate_api/models/my_futures_trade_time_range.py +++ b/gate_api/models/my_futures_trade_time_range.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -107,7 +107,7 @@ def __init__(self, trade_id=None, create_time=None, contract=None, order_id=None def trade_id(self): """Gets the trade_id of this MyFuturesTradeTimeRange. # noqa: E501 - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :return: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -118,7 +118,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this MyFuturesTradeTimeRange. - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :param trade_id: The trade_id of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -130,7 +130,7 @@ def trade_id(self, trade_id): def create_time(self): """Gets the create_time of this MyFuturesTradeTimeRange. # noqa: E501 - Trading time. # noqa: E501 + Fill Time # noqa: E501 :return: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: float @@ -141,7 +141,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this MyFuturesTradeTimeRange. - Trading time. # noqa: E501 + Fill Time # noqa: E501 :param create_time: The create_time of this MyFuturesTradeTimeRange. # noqa: E501 :type: float @@ -153,7 +153,7 @@ def create_time(self, create_time): def contract(self): """Gets the contract of this MyFuturesTradeTimeRange. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -164,7 +164,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this MyFuturesTradeTimeRange. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -176,7 +176,7 @@ def contract(self, contract): def order_id(self): """Gets the order_id of this MyFuturesTradeTimeRange. # noqa: E501 - Order ID related. # noqa: E501 + Related order ID # noqa: E501 :return: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -187,7 +187,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this MyFuturesTradeTimeRange. - Order ID related. # noqa: E501 + Related order ID # noqa: E501 :param order_id: The order_id of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -199,7 +199,7 @@ def order_id(self, order_id): def size(self): """Gets the size of this MyFuturesTradeTimeRange. # noqa: E501 - Trading size. # noqa: E501 + Trading size # noqa: E501 :return: The size of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: int @@ -210,7 +210,7 @@ def size(self): def size(self, size): """Sets the size of this MyFuturesTradeTimeRange. - Trading size. # noqa: E501 + Trading size # noqa: E501 :param size: The size of this MyFuturesTradeTimeRange. # noqa: E501 :type: int @@ -222,7 +222,7 @@ def size(self, size): def close_size(self): """Gets the close_size of this MyFuturesTradeTimeRange. # noqa: E501 - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :return: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: int @@ -233,7 +233,7 @@ def close_size(self): def close_size(self, close_size): """Sets the close_size of this MyFuturesTradeTimeRange. - Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long postion close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 + Number of closed positions: close_size=0 && size>0 Open long position close_size=0 && size<0 Open short position close_size>0 && size>0 && size <= close_size Close short position close_size>0 && size>0 && size > close_size Close short position and open long position close_size<0 && size<0 && size >= close_size Close long position close_size<0 && size<0 && size < close_size Close long position and open short position # noqa: E501 :param close_size: The close_size of this MyFuturesTradeTimeRange. # noqa: E501 :type: int @@ -245,7 +245,7 @@ def close_size(self, close_size): def price(self): """Gets the price of this MyFuturesTradeTimeRange. # noqa: E501 - Trading price. # noqa: E501 + Fill Price # noqa: E501 :return: The price of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -256,7 +256,7 @@ def price(self): def price(self, price): """Sets the price of this MyFuturesTradeTimeRange. - Trading price. # noqa: E501 + Fill Price # noqa: E501 :param price: The price of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -268,7 +268,7 @@ def price(self, price): def role(self): """Gets the role of this MyFuturesTradeTimeRange. # noqa: E501 - Trade role. Available values are `taker` and `maker`. # noqa: E501 + Trade role. taker - taker, maker - maker # noqa: E501 :return: The role of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -279,7 +279,7 @@ def role(self): def role(self, role): """Sets the role of this MyFuturesTradeTimeRange. - Trade role. Available values are `taker` and `maker`. # noqa: E501 + Trade role. taker - taker, maker - maker # noqa: E501 :param role: The role of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -297,7 +297,7 @@ def role(self, role): def text(self): """Gets the text of this MyFuturesTradeTimeRange. # noqa: E501 - User defined information. # noqa: E501 + Order custom information # noqa: E501 :return: The text of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -308,7 +308,7 @@ def text(self): def text(self, text): """Sets the text of this MyFuturesTradeTimeRange. - User defined information. # noqa: E501 + Order custom information # noqa: E501 :param text: The text of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -320,7 +320,7 @@ def text(self, text): def fee(self): """Gets the fee of this MyFuturesTradeTimeRange. # noqa: E501 - Fee deducted. # noqa: E501 + Trade fee # noqa: E501 :return: The fee of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -331,7 +331,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this MyFuturesTradeTimeRange. - Fee deducted. # noqa: E501 + Trade fee # noqa: E501 :param fee: The fee of this MyFuturesTradeTimeRange. # noqa: E501 :type: str @@ -343,7 +343,7 @@ def fee(self, fee): def point_fee(self): """Gets the point_fee of this MyFuturesTradeTimeRange. # noqa: E501 - Points used to deduct fee. # noqa: E501 + Points used to deduct trade fee # noqa: E501 :return: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 :rtype: str @@ -354,7 +354,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this MyFuturesTradeTimeRange. - Points used to deduct fee. # noqa: E501 + Points used to deduct trade fee # noqa: E501 :param point_fee: The point_fee of this MyFuturesTradeTimeRange. # noqa: E501 :type: str diff --git a/gate_api/models/open_orders.py b/gate_api/models/open_orders.py index 46f20a4..4d856f3 100644 --- a/gate_api/models/open_orders.py +++ b/gate_api/models/open_orders.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, currency_pair=None, total=None, orders=None, local_vars_confi def currency_pair(self): """Gets the currency_pair of this OpenOrders. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this OpenOrders. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this OpenOrders. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this OpenOrders. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency_pair(self, currency_pair): def total(self): """Gets the total of this OpenOrders. # noqa: E501 - The total number of pending orders for this trading pair on the current page # noqa: E501 + Total number of open orders for this trading pair on the current page # noqa: E501 :return: The total of this OpenOrders. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def total(self): def total(self, total): """Sets the total of this OpenOrders. - The total number of pending orders for this trading pair on the current page # noqa: E501 + Total number of open orders for this trading pair on the current page # noqa: E501 :param total: The total of this OpenOrders. # noqa: E501 :type: int diff --git a/gate_api/models/options_account.py b/gate_api/models/options_account.py index 051f2bb..e05a45c 100644 --- a/gate_api/models/options_account.py +++ b/gate_api/models/options_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -147,7 +147,7 @@ def __init__(self, user=None, total=None, position_value=None, equity=None, shor def user(self): """Gets the user of this OptionsAccount. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this OptionsAccount. # noqa: E501 :rtype: int @@ -158,7 +158,7 @@ def user(self): def user(self, user): """Sets the user of this OptionsAccount. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this OptionsAccount. # noqa: E501 :type: int @@ -170,7 +170,7 @@ def user(self, user): def total(self): """Gets the total of this OptionsAccount. # noqa: E501 - Account balance. # noqa: E501 + Account Balance # noqa: E501 :return: The total of this OptionsAccount. # noqa: E501 :rtype: str @@ -181,7 +181,7 @@ def total(self): def total(self, total): """Sets the total of this OptionsAccount. - Account balance. # noqa: E501 + Account Balance # noqa: E501 :param total: The total of this OptionsAccount. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def position_value(self, position_value): def equity(self): """Gets the equity of this OptionsAccount. # noqa: E501 - Account equity, the sum of account balance and position value. # noqa: E501 + Account equity, the sum of account balance and position value # noqa: E501 :return: The equity of this OptionsAccount. # noqa: E501 :rtype: str @@ -227,7 +227,7 @@ def equity(self): def equity(self, equity): """Sets the equity of this OptionsAccount. - Account equity, the sum of account balance and position value. # noqa: E501 + Account equity, the sum of account balance and position value # noqa: E501 :param equity: The equity of this OptionsAccount. # noqa: E501 :type: str @@ -239,7 +239,7 @@ def equity(self, equity): def short_enabled(self): """Gets the short_enabled of this OptionsAccount. # noqa: E501 - If the account is allowed to short. # noqa: E501 + If the account is allowed to short # noqa: E501 :return: The short_enabled of this OptionsAccount. # noqa: E501 :rtype: bool @@ -250,7 +250,7 @@ def short_enabled(self): def short_enabled(self, short_enabled): """Sets the short_enabled of this OptionsAccount. - If the account is allowed to short. # noqa: E501 + If the account is allowed to short # noqa: E501 :param short_enabled: The short_enabled of this OptionsAccount. # noqa: E501 :type: bool @@ -262,7 +262,7 @@ def short_enabled(self, short_enabled): def mmp_enabled(self): """Gets the mmp_enabled of this OptionsAccount. # noqa: E501 - Whether to enable MMP. # noqa: E501 + Whether to enable MMP # noqa: E501 :return: The mmp_enabled of this OptionsAccount. # noqa: E501 :rtype: bool @@ -273,7 +273,7 @@ def mmp_enabled(self): def mmp_enabled(self, mmp_enabled): """Sets the mmp_enabled of this OptionsAccount. - Whether to enable MMP. # noqa: E501 + Whether to enable MMP # noqa: E501 :param mmp_enabled: The mmp_enabled of this OptionsAccount. # noqa: E501 :type: bool @@ -285,7 +285,7 @@ def mmp_enabled(self, mmp_enabled): def liq_triggered(self): """Gets the liq_triggered of this OptionsAccount. # noqa: E501 - Whether to trigger position liquidation. # noqa: E501 + Whether to trigger position liquidation # noqa: E501 :return: The liq_triggered of this OptionsAccount. # noqa: E501 :rtype: bool @@ -296,7 +296,7 @@ def liq_triggered(self): def liq_triggered(self, liq_triggered): """Sets the liq_triggered of this OptionsAccount. - Whether to trigger position liquidation. # noqa: E501 + Whether to trigger position liquidation # noqa: E501 :param liq_triggered: The liq_triggered of this OptionsAccount. # noqa: E501 :type: bool @@ -337,7 +337,7 @@ def margin_mode(self, margin_mode): def unrealised_pnl(self): """Gets the unrealised_pnl of this OptionsAccount. # noqa: E501 - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :return: The unrealised_pnl of this OptionsAccount. # noqa: E501 :rtype: str @@ -348,7 +348,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this OptionsAccount. - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this OptionsAccount. # noqa: E501 :type: str @@ -360,7 +360,7 @@ def unrealised_pnl(self, unrealised_pnl): def init_margin(self): """Gets the init_margin of this OptionsAccount. # noqa: E501 - Initial position margin. # noqa: E501 + Initial position margin # noqa: E501 :return: The init_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -371,7 +371,7 @@ def init_margin(self): def init_margin(self, init_margin): """Sets the init_margin of this OptionsAccount. - Initial position margin. # noqa: E501 + Initial position margin # noqa: E501 :param init_margin: The init_margin of this OptionsAccount. # noqa: E501 :type: str @@ -383,7 +383,7 @@ def init_margin(self, init_margin): def maint_margin(self): """Gets the maint_margin of this OptionsAccount. # noqa: E501 - Position maintenance margin. # noqa: E501 + Position maintenance margin # noqa: E501 :return: The maint_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -394,7 +394,7 @@ def maint_margin(self): def maint_margin(self, maint_margin): """Sets the maint_margin of this OptionsAccount. - Position maintenance margin. # noqa: E501 + Position maintenance margin # noqa: E501 :param maint_margin: The maint_margin of this OptionsAccount. # noqa: E501 :type: str @@ -406,7 +406,7 @@ def maint_margin(self, maint_margin): def order_margin(self): """Gets the order_margin of this OptionsAccount. # noqa: E501 - Order margin of unfinished orders. # noqa: E501 + Order margin of unfinished orders # noqa: E501 :return: The order_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -417,7 +417,7 @@ def order_margin(self): def order_margin(self, order_margin): """Sets the order_margin of this OptionsAccount. - Order margin of unfinished orders. # noqa: E501 + Order margin of unfinished orders # noqa: E501 :param order_margin: The order_margin of this OptionsAccount. # noqa: E501 :type: str @@ -429,7 +429,7 @@ def order_margin(self, order_margin): def ask_order_margin(self): """Gets the ask_order_margin of this OptionsAccount. # noqa: E501 - Margin for outstanding sell orders. # noqa: E501 + Margin for outstanding sell orders # noqa: E501 :return: The ask_order_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -440,7 +440,7 @@ def ask_order_margin(self): def ask_order_margin(self, ask_order_margin): """Sets the ask_order_margin of this OptionsAccount. - Margin for outstanding sell orders. # noqa: E501 + Margin for outstanding sell orders # noqa: E501 :param ask_order_margin: The ask_order_margin of this OptionsAccount. # noqa: E501 :type: str @@ -452,7 +452,7 @@ def ask_order_margin(self, ask_order_margin): def bid_order_margin(self): """Gets the bid_order_margin of this OptionsAccount. # noqa: E501 - Margin for outstanding buy orders. # noqa: E501 + Margin for outstanding buy orders # noqa: E501 :return: The bid_order_margin of this OptionsAccount. # noqa: E501 :rtype: str @@ -463,7 +463,7 @@ def bid_order_margin(self): def bid_order_margin(self, bid_order_margin): """Sets the bid_order_margin of this OptionsAccount. - Margin for outstanding buy orders. # noqa: E501 + Margin for outstanding buy orders # noqa: E501 :param bid_order_margin: The bid_order_margin of this OptionsAccount. # noqa: E501 :type: str @@ -475,7 +475,7 @@ def bid_order_margin(self, bid_order_margin): def available(self): """Gets the available of this OptionsAccount. # noqa: E501 - Available balance to transfer out or trade. # noqa: E501 + Available balance to transfer out or trade # noqa: E501 :return: The available of this OptionsAccount. # noqa: E501 :rtype: str @@ -486,7 +486,7 @@ def available(self): def available(self, available): """Sets the available of this OptionsAccount. - Available balance to transfer out or trade. # noqa: E501 + Available balance to transfer out or trade # noqa: E501 :param available: The available of this OptionsAccount. # noqa: E501 :type: str @@ -498,7 +498,7 @@ def available(self, available): def point(self): """Gets the point of this OptionsAccount. # noqa: E501 - POINT amount. # noqa: E501 + Point card amount # noqa: E501 :return: The point of this OptionsAccount. # noqa: E501 :rtype: str @@ -509,7 +509,7 @@ def point(self): def point(self, point): """Sets the point of this OptionsAccount. - POINT amount. # noqa: E501 + Point card amount # noqa: E501 :param point: The point of this OptionsAccount. # noqa: E501 :type: str @@ -521,7 +521,7 @@ def point(self, point): def currency(self): """Gets the currency of this OptionsAccount. # noqa: E501 - Settle currency. # noqa: E501 + Settlement currency # noqa: E501 :return: The currency of this OptionsAccount. # noqa: E501 :rtype: str @@ -532,7 +532,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this OptionsAccount. - Settle currency. # noqa: E501 + Settlement currency # noqa: E501 :param currency: The currency of this OptionsAccount. # noqa: E501 :type: str @@ -544,7 +544,7 @@ def currency(self, currency): def orders_limit(self): """Gets the orders_limit of this OptionsAccount. # noqa: E501 - Maximum number of outstanding orders. # noqa: E501 + Maximum number of outstanding orders # noqa: E501 :return: The orders_limit of this OptionsAccount. # noqa: E501 :rtype: int @@ -555,7 +555,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this OptionsAccount. - Maximum number of outstanding orders. # noqa: E501 + Maximum number of outstanding orders # noqa: E501 :param orders_limit: The orders_limit of this OptionsAccount. # noqa: E501 :type: int diff --git a/gate_api/models/options_account_book.py b/gate_api/models/options_account_book.py index e2947b8..e2809e2 100644 --- a/gate_api/models/options_account_book.py +++ b/gate_api/models/options_account_book.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, time=None, change=None, balance=None, type=None, text=None, l def time(self): """Gets the time of this OptionsAccountBook. # noqa: E501 - Change time. # noqa: E501 + Change time # noqa: E501 :return: The time of this OptionsAccountBook. # noqa: E501 :rtype: float @@ -88,7 +88,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsAccountBook. - Change time. # noqa: E501 + Change time # noqa: E501 :param time: The time of this OptionsAccountBook. # noqa: E501 :type: float @@ -100,7 +100,7 @@ def time(self, time): def change(self): """Gets the change of this OptionsAccountBook. # noqa: E501 - Amount changed (USDT). # noqa: E501 + Amount changed (USDT) # noqa: E501 :return: The change of this OptionsAccountBook. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def change(self): def change(self, change): """Sets the change of this OptionsAccountBook. - Amount changed (USDT). # noqa: E501 + Amount changed (USDT) # noqa: E501 :param change: The change of this OptionsAccountBook. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def change(self, change): def balance(self): """Gets the balance of this OptionsAccountBook. # noqa: E501 - Account total balance after change (USDT). # noqa: E501 + Account total balance after change (USDT) # noqa: E501 :return: The balance of this OptionsAccountBook. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this OptionsAccountBook. - Account total balance after change (USDT). # noqa: E501 + Account total balance after change (USDT) # noqa: E501 :param balance: The balance of this OptionsAccountBook. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def type(self, type): def text(self): """Gets the text of this OptionsAccountBook. # noqa: E501 - custom text. # noqa: E501 + Remark # noqa: E501 :return: The text of this OptionsAccountBook. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def text(self): def text(self, text): """Sets the text of this OptionsAccountBook. - custom text. # noqa: E501 + Remark # noqa: E501 :param text: The text of this OptionsAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/options_candlestick.py b/gate_api/models/options_candlestick.py index 8dae262..a41ffe9 100644 --- a/gate_api/models/options_candlestick.py +++ b/gate_api/models/options_candlestick.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, t=None, v=None, c=None, h=None, l=None, o=None, local_vars_co def t(self): """Gets the t of this OptionsCandlestick. # noqa: E501 - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :return: The t of this OptionsCandlestick. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def t(self): def t(self, t): """Sets the t of this OptionsCandlestick. - Unix timestamp in seconds. # noqa: E501 + Unix timestamp in seconds # noqa: E501 :param t: The t of this OptionsCandlestick. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def t(self, t): def v(self): """Gets the v of this OptionsCandlestick. # noqa: E501 - size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 :return: The v of this OptionsCandlestick. # noqa: E501 :rtype: int @@ -116,7 +116,7 @@ def v(self): def v(self, v): """Sets the v of this OptionsCandlestick. - size volume (contract size). Only returned if `contract` is not prefixed. # noqa: E501 + size volume (contract size). Only returned if `contract` is not prefixed # noqa: E501 :param v: The v of this OptionsCandlestick. # noqa: E501 :type: int @@ -128,7 +128,7 @@ def v(self, v): def c(self): """Gets the c of this OptionsCandlestick. # noqa: E501 - Close price (quote currency, unit: underlying corresponding option price). # noqa: E501 + Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 :return: The c of this OptionsCandlestick. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def c(self): def c(self, c): """Sets the c of this OptionsCandlestick. - Close price (quote currency, unit: underlying corresponding option price). # noqa: E501 + Close price (quote currency, unit: underlying corresponding option price) # noqa: E501 :param c: The c of this OptionsCandlestick. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def h(self, h): def l(self): """Gets the l of this OptionsCandlestick. # noqa: E501 - Lowest price (quote currency, unit: underlying corresponding option price). # noqa: E501 + Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 :return: The l of this OptionsCandlestick. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def l(self): def l(self, l): """Sets the l of this OptionsCandlestick. - Lowest price (quote currency, unit: underlying corresponding option price). # noqa: E501 + Lowest price (quote currency, unit: underlying corresponding option price) # noqa: E501 :param l: The l of this OptionsCandlestick. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def l(self, l): def o(self): """Gets the o of this OptionsCandlestick. # noqa: E501 - Open price (quote currency, unit: underlying corresponding option price). # noqa: E501 + Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 :return: The o of this OptionsCandlestick. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def o(self): def o(self, o): """Sets the o of this OptionsCandlestick. - Open price (quote currency, unit: underlying corresponding option price). # noqa: E501 + Open price (quote currency, unit: underlying corresponding option price) # noqa: E501 :param o: The o of this OptionsCandlestick. # noqa: E501 :type: str diff --git a/gate_api/models/options_contract.py b/gate_api/models/options_contract.py index 52c7883..2aec77e 100644 --- a/gate_api/models/options_contract.py +++ b/gate_api/models/options_contract.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -177,7 +177,7 @@ def __init__(self, name=None, tag=None, create_time=None, expiration_time=None, def name(self): """Gets the name of this OptionsContract. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The name of this OptionsContract. # noqa: E501 :rtype: str @@ -188,7 +188,7 @@ def name(self): def name(self, name): """Sets the name of this OptionsContract. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param name: The name of this OptionsContract. # noqa: E501 :type: str @@ -200,7 +200,7 @@ def name(self, name): def tag(self): """Gets the tag of this OptionsContract. # noqa: E501 - tag. # noqa: E501 + Tag # noqa: E501 :return: The tag of this OptionsContract. # noqa: E501 :rtype: str @@ -211,7 +211,7 @@ def tag(self): def tag(self, tag): """Sets the tag of this OptionsContract. - tag. # noqa: E501 + Tag # noqa: E501 :param tag: The tag of this OptionsContract. # noqa: E501 :type: str @@ -223,7 +223,7 @@ def tag(self, tag): def create_time(self): """Gets the create_time of this OptionsContract. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this OptionsContract. # noqa: E501 :rtype: float @@ -234,7 +234,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OptionsContract. - Creation time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this OptionsContract. # noqa: E501 :type: float @@ -246,7 +246,7 @@ def create_time(self, create_time): def expiration_time(self): """Gets the expiration_time of this OptionsContract. # noqa: E501 - Expiration time. # noqa: E501 + Expiration time # noqa: E501 :return: The expiration_time of this OptionsContract. # noqa: E501 :rtype: float @@ -257,7 +257,7 @@ def expiration_time(self): def expiration_time(self, expiration_time): """Sets the expiration_time of this OptionsContract. - Expiration time. # noqa: E501 + Expiration time # noqa: E501 :param expiration_time: The expiration_time of this OptionsContract. # noqa: E501 :type: float @@ -269,7 +269,7 @@ def expiration_time(self, expiration_time): def is_call(self): """Gets the is_call of this OptionsContract. # noqa: E501 - `true` means call options, while `false` is put options. # noqa: E501 + `true` means call options, `false` means put options # noqa: E501 :return: The is_call of this OptionsContract. # noqa: E501 :rtype: bool @@ -280,7 +280,7 @@ def is_call(self): def is_call(self, is_call): """Sets the is_call of this OptionsContract. - `true` means call options, while `false` is put options. # noqa: E501 + `true` means call options, `false` means put options # noqa: E501 :param is_call: The is_call of this OptionsContract. # noqa: E501 :type: bool @@ -292,7 +292,7 @@ def is_call(self, is_call): def multiplier(self): """Gets the multiplier of this OptionsContract. # noqa: E501 - Multiplier used in converting from invoicing to settlement currency. # noqa: E501 + Multiplier used in converting from invoicing to settlement currency # noqa: E501 :return: The multiplier of this OptionsContract. # noqa: E501 :rtype: str @@ -303,7 +303,7 @@ def multiplier(self): def multiplier(self, multiplier): """Sets the multiplier of this OptionsContract. - Multiplier used in converting from invoicing to settlement currency. # noqa: E501 + Multiplier used in converting from invoicing to settlement currency # noqa: E501 :param multiplier: The multiplier of this OptionsContract. # noqa: E501 :type: str @@ -315,7 +315,7 @@ def multiplier(self, multiplier): def underlying(self): """Gets the underlying of this OptionsContract. # noqa: E501 - Underlying. # noqa: E501 + Underlying # noqa: E501 :return: The underlying of this OptionsContract. # noqa: E501 :rtype: str @@ -326,7 +326,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsContract. - Underlying. # noqa: E501 + Underlying # noqa: E501 :param underlying: The underlying of this OptionsContract. # noqa: E501 :type: str @@ -338,7 +338,7 @@ def underlying(self, underlying): def underlying_price(self): """Gets the underlying_price of this OptionsContract. # noqa: E501 - Underlying price (quote currency). # noqa: E501 + Underlying price (quote currency) # noqa: E501 :return: The underlying_price of this OptionsContract. # noqa: E501 :rtype: str @@ -349,7 +349,7 @@ def underlying_price(self): def underlying_price(self, underlying_price): """Sets the underlying_price of this OptionsContract. - Underlying price (quote currency). # noqa: E501 + Underlying price (quote currency) # noqa: E501 :param underlying_price: The underlying_price of this OptionsContract. # noqa: E501 :type: str @@ -361,7 +361,7 @@ def underlying_price(self, underlying_price): def last_price(self): """Gets the last_price of this OptionsContract. # noqa: E501 - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :return: The last_price of this OptionsContract. # noqa: E501 :rtype: str @@ -372,7 +372,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this OptionsContract. - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :param last_price: The last_price of this OptionsContract. # noqa: E501 :type: str @@ -384,7 +384,7 @@ def last_price(self, last_price): def mark_price(self): """Gets the mark_price of this OptionsContract. # noqa: E501 - Current mark price (quote currency). # noqa: E501 + Current mark price (quote currency) # noqa: E501 :return: The mark_price of this OptionsContract. # noqa: E501 :rtype: str @@ -395,7 +395,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this OptionsContract. - Current mark price (quote currency). # noqa: E501 + Current mark price (quote currency) # noqa: E501 :param mark_price: The mark_price of this OptionsContract. # noqa: E501 :type: str @@ -407,7 +407,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this OptionsContract. # noqa: E501 - Current index price (quote currency). # noqa: E501 + Current index price (quote currency) # noqa: E501 :return: The index_price of this OptionsContract. # noqa: E501 :rtype: str @@ -418,7 +418,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsContract. - Current index price (quote currency). # noqa: E501 + Current index price (quote currency) # noqa: E501 :param index_price: The index_price of this OptionsContract. # noqa: E501 :type: str @@ -430,7 +430,7 @@ def index_price(self, index_price): def maker_fee_rate(self): """Gets the maker_fee_rate of this OptionsContract. # noqa: E501 - Maker fee rate, where negative means rebate. # noqa: E501 + Maker fee rate, negative values indicate rebates # noqa: E501 :return: The maker_fee_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -441,7 +441,7 @@ def maker_fee_rate(self): def maker_fee_rate(self, maker_fee_rate): """Sets the maker_fee_rate of this OptionsContract. - Maker fee rate, where negative means rebate. # noqa: E501 + Maker fee rate, negative values indicate rebates # noqa: E501 :param maker_fee_rate: The maker_fee_rate of this OptionsContract. # noqa: E501 :type: str @@ -453,7 +453,7 @@ def maker_fee_rate(self, maker_fee_rate): def taker_fee_rate(self): """Gets the taker_fee_rate of this OptionsContract. # noqa: E501 - Taker fee rate. # noqa: E501 + Taker fee rate # noqa: E501 :return: The taker_fee_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -464,7 +464,7 @@ def taker_fee_rate(self): def taker_fee_rate(self, taker_fee_rate): """Sets the taker_fee_rate of this OptionsContract. - Taker fee rate. # noqa: E501 + Taker fee rate # noqa: E501 :param taker_fee_rate: The taker_fee_rate of this OptionsContract. # noqa: E501 :type: str @@ -476,7 +476,7 @@ def taker_fee_rate(self, taker_fee_rate): def order_price_round(self): """Gets the order_price_round of this OptionsContract. # noqa: E501 - Minimum order price increment. # noqa: E501 + Minimum order price increment # noqa: E501 :return: The order_price_round of this OptionsContract. # noqa: E501 :rtype: str @@ -487,7 +487,7 @@ def order_price_round(self): def order_price_round(self, order_price_round): """Sets the order_price_round of this OptionsContract. - Minimum order price increment. # noqa: E501 + Minimum order price increment # noqa: E501 :param order_price_round: The order_price_round of this OptionsContract. # noqa: E501 :type: str @@ -499,7 +499,7 @@ def order_price_round(self, order_price_round): def mark_price_round(self): """Gets the mark_price_round of this OptionsContract. # noqa: E501 - Minimum mark price increment. # noqa: E501 + Minimum mark price increment # noqa: E501 :return: The mark_price_round of this OptionsContract. # noqa: E501 :rtype: str @@ -510,7 +510,7 @@ def mark_price_round(self): def mark_price_round(self, mark_price_round): """Sets the mark_price_round of this OptionsContract. - Minimum mark price increment. # noqa: E501 + Minimum mark price increment # noqa: E501 :param mark_price_round: The mark_price_round of this OptionsContract. # noqa: E501 :type: str @@ -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 the contract allowed. # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :return: The order_size_min of this OptionsContract. # noqa: E501 :rtype: int @@ -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 the contract allowed. # noqa: E501 + Minimum order size allowed by the contract # noqa: E501 :param order_size_min: The order_size_min of this OptionsContract. # noqa: E501 :type: int @@ -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 the contract allowed. # noqa: E501 + Maximum order size allowed by the contract # noqa: E501 :return: The order_size_max of this OptionsContract. # noqa: E501 :rtype: int @@ -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 the contract allowed. # noqa: E501 + Maximum order size allowed by the contract # noqa: E501 :param order_size_max: The order_size_max of this OptionsContract. # noqa: E501 :type: int @@ -568,7 +568,7 @@ def order_size_max(self, order_size_max): def order_price_deviate(self): """Gets the order_price_deviate of this OptionsContract. # noqa: E501 - The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 + The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 :return: The order_price_deviate of this OptionsContract. # noqa: E501 :rtype: str @@ -579,7 +579,7 @@ def order_price_deviate(self): def order_price_deviate(self, order_price_deviate): """Sets the order_price_deviate of this OptionsContract. - The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 + The positive and negative offset allowed between the order price and the current mark price, that `order_price` must meet the following conditions: order_price is within the range of mark_price +/- order_price_deviate * underlying_price and does not distinguish between buy and sell orders # noqa: E501 :param order_price_deviate: The order_price_deviate of this OptionsContract. # noqa: E501 :type: str @@ -591,7 +591,7 @@ def order_price_deviate(self, order_price_deviate): def ref_discount_rate(self): """Gets the ref_discount_rate of this OptionsContract. # noqa: E501 - Referral fee rate discount. # noqa: E501 + Trading fee discount for referred users # noqa: E501 :return: The ref_discount_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -602,7 +602,7 @@ def ref_discount_rate(self): def ref_discount_rate(self, ref_discount_rate): """Sets the ref_discount_rate of this OptionsContract. - Referral fee rate discount. # noqa: E501 + Trading fee discount for referred users # noqa: E501 :param ref_discount_rate: The ref_discount_rate of this OptionsContract. # noqa: E501 :type: str @@ -614,7 +614,7 @@ def ref_discount_rate(self, ref_discount_rate): def ref_rebate_rate(self): """Gets the ref_rebate_rate of this OptionsContract. # noqa: E501 - Referrer commission rate. # noqa: E501 + Commission rate for referrers # noqa: E501 :return: The ref_rebate_rate of this OptionsContract. # noqa: E501 :rtype: str @@ -625,7 +625,7 @@ def ref_rebate_rate(self): def ref_rebate_rate(self, ref_rebate_rate): """Sets the ref_rebate_rate of this OptionsContract. - Referrer commission rate. # noqa: E501 + Commission rate for referrers # noqa: E501 :param ref_rebate_rate: The ref_rebate_rate of this OptionsContract. # noqa: E501 :type: str @@ -637,7 +637,7 @@ def ref_rebate_rate(self, ref_rebate_rate): def orderbook_id(self): """Gets the orderbook_id of this OptionsContract. # noqa: E501 - Current orderbook ID. # noqa: E501 + Orderbook update ID # noqa: E501 :return: The orderbook_id of this OptionsContract. # noqa: E501 :rtype: int @@ -648,7 +648,7 @@ def orderbook_id(self): def orderbook_id(self, orderbook_id): """Sets the orderbook_id of this OptionsContract. - Current orderbook ID. # noqa: E501 + Orderbook update ID # noqa: E501 :param orderbook_id: The orderbook_id of this OptionsContract. # noqa: E501 :type: int @@ -660,7 +660,7 @@ def orderbook_id(self, orderbook_id): def trade_id(self): """Gets the trade_id of this OptionsContract. # noqa: E501 - Current trade ID. # noqa: E501 + Current trade ID # noqa: E501 :return: The trade_id of this OptionsContract. # noqa: E501 :rtype: int @@ -671,7 +671,7 @@ def trade_id(self): def trade_id(self, trade_id): """Sets the trade_id of this OptionsContract. - Current trade ID. # noqa: E501 + Current trade ID # noqa: E501 :param trade_id: The trade_id of this OptionsContract. # noqa: E501 :type: int @@ -683,7 +683,7 @@ def trade_id(self, trade_id): def trade_size(self): """Gets the trade_size of this OptionsContract. # noqa: E501 - Historical accumulated trade size. # noqa: E501 + Historical cumulative trading volume # noqa: E501 :return: The trade_size of this OptionsContract. # noqa: E501 :rtype: int @@ -694,7 +694,7 @@ def trade_size(self): def trade_size(self, trade_size): """Sets the trade_size of this OptionsContract. - Historical accumulated trade size. # noqa: E501 + Historical cumulative trading volume # noqa: E501 :param trade_size: The trade_size of this OptionsContract. # noqa: E501 :type: int @@ -706,7 +706,7 @@ def trade_size(self, trade_size): def position_size(self): """Gets the position_size of this OptionsContract. # noqa: E501 - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :return: The position_size of this OptionsContract. # noqa: E501 :rtype: int @@ -717,7 +717,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this OptionsContract. - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :param position_size: The position_size of this OptionsContract. # noqa: E501 :type: int @@ -729,7 +729,7 @@ def position_size(self, position_size): def orders_limit(self): """Gets the orders_limit of this OptionsContract. # noqa: E501 - Maximum number of open orders. # noqa: E501 + Maximum number of pending orders # noqa: E501 :return: The orders_limit of this OptionsContract. # noqa: E501 :rtype: int @@ -740,7 +740,7 @@ def orders_limit(self): def orders_limit(self, orders_limit): """Sets the orders_limit of this OptionsContract. - Maximum number of open orders. # noqa: E501 + Maximum number of pending orders # noqa: E501 :param orders_limit: The orders_limit of this OptionsContract. # noqa: E501 :type: int diff --git a/gate_api/models/options_mmp.py b/gate_api/models/options_mmp.py index 44c0790..5594392 100644 --- a/gate_api/models/options_mmp.py +++ b/gate_api/models/options_mmp.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=N def underlying(self): """Gets the underlying of this OptionsMMP. # noqa: E501 - Underlying. # noqa: E501 + Underlying # noqa: E501 :return: The underlying of this OptionsMMP. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsMMP. - Underlying. # noqa: E501 + Underlying # noqa: E501 :param underlying: The underlying of this OptionsMMP. # noqa: E501 :type: str @@ -107,7 +107,7 @@ def underlying(self, underlying): def window(self): """Gets the window of this OptionsMMP. # noqa: E501 - Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501 :return: The window of this OptionsMMP. # noqa: E501 :rtype: int @@ -118,7 +118,7 @@ def window(self): def window(self, window): """Sets the window of this OptionsMMP. - Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501 :param window: The window of this OptionsMMP. # noqa: E501 :type: int @@ -157,7 +157,7 @@ def frozen_period(self, frozen_period): def qty_limit(self): """Gets the qty_limit of this OptionsMMP. # noqa: E501 - Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 :return: The qty_limit of this OptionsMMP. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def qty_limit(self): def qty_limit(self, qty_limit): """Sets the qty_limit of this OptionsMMP. - Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 :param qty_limit: The qty_limit of this OptionsMMP. # noqa: E501 :type: str @@ -182,7 +182,7 @@ def qty_limit(self, qty_limit): def delta_limit(self): """Gets the delta_limit of this OptionsMMP. # noqa: E501 - Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 :return: The delta_limit of this OptionsMMP. # noqa: E501 :rtype: str @@ -193,7 +193,7 @@ def delta_limit(self): def delta_limit(self, delta_limit): """Sets the delta_limit of this OptionsMMP. - Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 :param delta_limit: The delta_limit of this OptionsMMP. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def delta_limit(self, delta_limit): def trigger_time_ms(self): """Gets the trigger_time_ms of this OptionsMMP. # noqa: E501 - Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 :return: The trigger_time_ms of this OptionsMMP. # noqa: E501 :rtype: int @@ -218,7 +218,7 @@ def trigger_time_ms(self): def trigger_time_ms(self, trigger_time_ms): """Sets the trigger_time_ms of this OptionsMMP. - Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 :param trigger_time_ms: The trigger_time_ms of this OptionsMMP. # noqa: E501 :type: int @@ -230,7 +230,7 @@ def trigger_time_ms(self, trigger_time_ms): def frozen_until_ms(self): """Gets the frozen_until_ms of this OptionsMMP. # noqa: E501 - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501 :return: The frozen_until_ms of this OptionsMMP. # noqa: E501 :rtype: int @@ -241,7 +241,7 @@ def frozen_until_ms(self): def frozen_until_ms(self, frozen_until_ms): """Sets the frozen_until_ms of this OptionsMMP. - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501 :param frozen_until_ms: The frozen_until_ms of this OptionsMMP. # noqa: E501 :type: int diff --git a/gate_api/models/options_mmp_reset.py b/gate_api/models/options_mmp_reset.py index 31678d9..78658ba 100644 --- a/gate_api/models/options_mmp_reset.py +++ b/gate_api/models/options_mmp_reset.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -86,7 +86,7 @@ def __init__(self, underlying=None, window=None, frozen_period=None, qty_limit=N def underlying(self): """Gets the underlying of this OptionsMMPReset. # noqa: E501 - Underlying. # noqa: E501 + Underlying # noqa: E501 :return: The underlying of this OptionsMMPReset. # noqa: E501 :rtype: str @@ -97,7 +97,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsMMPReset. - Underlying. # noqa: E501 + Underlying # noqa: E501 :param underlying: The underlying of this OptionsMMPReset. # noqa: E501 :type: str @@ -111,7 +111,7 @@ def underlying(self, underlying): def window(self): """Gets the window of this OptionsMMPReset. # noqa: E501 - Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501 :return: The window of this OptionsMMPReset. # noqa: E501 :rtype: int @@ -122,7 +122,7 @@ def window(self): def window(self, window): """Sets the window of this OptionsMMPReset. - Time window (milliseconds), between 1-5000, 0 means disabling MMP. # noqa: E501 + Time window (milliseconds), between 1-5000, 0 means disable MMP # noqa: E501 :param window: The window of this OptionsMMPReset. # noqa: E501 :type: int @@ -157,7 +157,7 @@ def frozen_period(self, frozen_period): def qty_limit(self): """Gets the qty_limit of this OptionsMMPReset. # noqa: E501 - Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 :return: The qty_limit of this OptionsMMPReset. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def qty_limit(self): def qty_limit(self, qty_limit): """Sets the qty_limit of this OptionsMMPReset. - Trading volume upper limit (positive number, up to 2 decimal places). # noqa: E501 + Trading volume upper limit (positive number, up to 2 decimal places) # noqa: E501 :param qty_limit: The qty_limit of this OptionsMMPReset. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def qty_limit(self, qty_limit): def delta_limit(self): """Gets the delta_limit of this OptionsMMPReset. # noqa: E501 - Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 :return: The delta_limit of this OptionsMMPReset. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def delta_limit(self): def delta_limit(self, delta_limit): """Sets the delta_limit of this OptionsMMPReset. - Upper limit of net delta value (positive number, up to 2 decimal places). # noqa: E501 + Upper limit of net delta value (positive number, up to 2 decimal places) # noqa: E501 :param delta_limit: The delta_limit of this OptionsMMPReset. # noqa: E501 :type: str @@ -203,7 +203,7 @@ def delta_limit(self, delta_limit): def trigger_time_ms(self): """Gets the trigger_time_ms of this OptionsMMPReset. # noqa: E501 - Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 :return: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 :rtype: int @@ -214,7 +214,7 @@ def trigger_time_ms(self): def trigger_time_ms(self, trigger_time_ms): """Sets the trigger_time_ms of this OptionsMMPReset. - Trigger freeze time (milliseconds), 0 means no freeze is triggered. # noqa: E501 + Trigger freeze time (milliseconds), 0 means no freeze is triggered # noqa: E501 :param trigger_time_ms: The trigger_time_ms of this OptionsMMPReset. # noqa: E501 :type: int @@ -226,7 +226,7 @@ def trigger_time_ms(self, trigger_time_ms): def frozen_until_ms(self): """Gets the frozen_until_ms of this OptionsMMPReset. # noqa: E501 - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501 :return: The frozen_until_ms of this OptionsMMPReset. # noqa: E501 :rtype: int @@ -237,7 +237,7 @@ def frozen_until_ms(self): def frozen_until_ms(self, frozen_until_ms): """Sets the frozen_until_ms of this OptionsMMPReset. - Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. # noqa: E501 + Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered # noqa: E501 :param frozen_until_ms: The frozen_until_ms of this OptionsMMPReset. # noqa: E501 :type: int diff --git a/gate_api/models/options_my_settlements.py b/gate_api/models/options_my_settlements.py index c02472e..24db92e 100644 --- a/gate_api/models/options_my_settlements.py +++ b/gate_api/models/options_my_settlements.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -97,7 +97,7 @@ def __init__(self, time=None, underlying=None, contract=None, strike_price=None, def time(self): """Gets the time of this OptionsMySettlements. # noqa: E501 - Settlement time. # noqa: E501 + Settlement time # noqa: E501 :return: The time of this OptionsMySettlements. # noqa: E501 :rtype: float @@ -108,7 +108,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsMySettlements. - Settlement time. # noqa: E501 + Settlement time # noqa: E501 :param time: The time of this OptionsMySettlements. # noqa: E501 :type: float @@ -120,7 +120,7 @@ def time(self, time): def underlying(self): """Gets the underlying of this OptionsMySettlements. # noqa: E501 - Underlying. # noqa: E501 + Underlying # noqa: E501 :return: The underlying of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -131,7 +131,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsMySettlements. - Underlying. # noqa: E501 + Underlying # noqa: E501 :param underlying: The underlying of this OptionsMySettlements. # noqa: E501 :type: str @@ -143,7 +143,7 @@ def underlying(self, underlying): def contract(self): """Gets the contract of this OptionsMySettlements. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The contract of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -154,7 +154,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsMySettlements. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param contract: The contract of this OptionsMySettlements. # noqa: E501 :type: str @@ -166,7 +166,7 @@ def contract(self, contract): def strike_price(self): """Gets the strike_price of this OptionsMySettlements. # noqa: E501 - Strike price (quote currency). # noqa: E501 + Strike price (quote currency) # noqa: E501 :return: The strike_price of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def strike_price(self): def strike_price(self, strike_price): """Sets the strike_price of this OptionsMySettlements. - Strike price (quote currency). # noqa: E501 + Strike price (quote currency) # noqa: E501 :param strike_price: The strike_price of this OptionsMySettlements. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def strike_price(self, strike_price): def settle_price(self): """Gets the settle_price of this OptionsMySettlements. # noqa: E501 - Settlement price (quote currency). # noqa: E501 + Settlement price (quote currency) # noqa: E501 :return: The settle_price of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this OptionsMySettlements. - Settlement price (quote currency). # noqa: E501 + Settlement price (quote currency) # noqa: E501 :param settle_price: The settle_price of this OptionsMySettlements. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def settle_price(self, settle_price): def size(self): """Gets the size of this OptionsMySettlements. # noqa: E501 - Size. # noqa: E501 + Settlement size # noqa: E501 :return: The size of this OptionsMySettlements. # noqa: E501 :rtype: int @@ -223,7 +223,7 @@ def size(self): def size(self, size): """Sets the size of this OptionsMySettlements. - Size. # noqa: E501 + Settlement size # noqa: E501 :param size: The size of this OptionsMySettlements. # noqa: E501 :type: int @@ -235,7 +235,7 @@ def size(self, size): def settle_profit(self): """Gets the settle_profit of this OptionsMySettlements. # noqa: E501 - Settlement profit (quote currency). # noqa: E501 + Settlement profit (quote currency) # noqa: E501 :return: The settle_profit of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def settle_profit(self): def settle_profit(self, settle_profit): """Sets the settle_profit of this OptionsMySettlements. - Settlement profit (quote currency). # noqa: E501 + Settlement profit (quote currency) # noqa: E501 :param settle_profit: The settle_profit of this OptionsMySettlements. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def settle_profit(self, settle_profit): def fee(self): """Gets the fee of this OptionsMySettlements. # noqa: E501 - Fee (quote currency). # noqa: E501 + Settlement fee (quote currency) # noqa: E501 :return: The fee of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this OptionsMySettlements. - Fee (quote currency). # noqa: E501 + Settlement fee (quote currency) # noqa: E501 :param fee: The fee of this OptionsMySettlements. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def fee(self, fee): def realised_pnl(self): """Gets the realised_pnl of this OptionsMySettlements. # noqa: E501 - The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501 + Accumulated profit and loss from opening positions, including premium, fees, settlement profit, etc. (quote currency) # noqa: E501 :return: The realised_pnl of this OptionsMySettlements. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def realised_pnl(self): def realised_pnl(self, realised_pnl): """Sets the realised_pnl of this OptionsMySettlements. - The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) # noqa: E501 + Accumulated profit and loss from opening positions, including premium, fees, settlement profit, etc. (quote currency) # noqa: E501 :param realised_pnl: The realised_pnl of this OptionsMySettlements. # noqa: E501 :type: str diff --git a/gate_api/models/options_my_trade.py b/gate_api/models/options_my_trade.py index 0b0769f..55435f0 100644 --- a/gate_api/models/options_my_trade.py +++ b/gate_api/models/options_my_trade.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, id=None, create_time=None, contract=None, order_id=None, size def id(self): """Gets the id of this OptionsMyTrade. # noqa: E501 - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :return: The id of this OptionsMyTrade. # noqa: E501 :rtype: int @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this OptionsMyTrade. - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :param id: The id of this OptionsMyTrade. # noqa: E501 :type: int @@ -115,7 +115,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this OptionsMyTrade. # noqa: E501 - Trading time. # noqa: E501 + Fill Time # noqa: E501 :return: The create_time of this OptionsMyTrade. # noqa: E501 :rtype: float @@ -126,7 +126,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OptionsMyTrade. - Trading time. # noqa: E501 + Fill Time # noqa: E501 :param create_time: The create_time of this OptionsMyTrade. # noqa: E501 :type: float @@ -138,7 +138,7 @@ def create_time(self, create_time): def contract(self): """Gets the contract of this OptionsMyTrade. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The contract of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsMyTrade. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param contract: The contract of this OptionsMyTrade. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def contract(self, contract): def order_id(self): """Gets the order_id of this OptionsMyTrade. # noqa: E501 - Order ID related. # noqa: E501 + Related order ID # noqa: E501 :return: The order_id of this OptionsMyTrade. # noqa: E501 :rtype: int @@ -172,7 +172,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this OptionsMyTrade. - Order ID related. # noqa: E501 + Related order ID # noqa: E501 :param order_id: The order_id of this OptionsMyTrade. # noqa: E501 :type: int @@ -184,7 +184,7 @@ def order_id(self, order_id): def size(self): """Gets the size of this OptionsMyTrade. # noqa: E501 - Trading size. # noqa: E501 + Trading size # noqa: E501 :return: The size of this OptionsMyTrade. # noqa: E501 :rtype: int @@ -195,7 +195,7 @@ def size(self): def size(self, size): """Sets the size of this OptionsMyTrade. - Trading size. # noqa: E501 + Trading size # noqa: E501 :param size: The size of this OptionsMyTrade. # noqa: E501 :type: int @@ -207,7 +207,7 @@ def size(self, size): def price(self): """Gets the price of this OptionsMyTrade. # noqa: E501 - Trading price (quote currency). # noqa: E501 + Trade price (quote currency) # noqa: E501 :return: The price of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def price(self): def price(self, price): """Sets the price of this OptionsMyTrade. - Trading price (quote currency). # noqa: E501 + Trade price (quote currency) # noqa: E501 :param price: The price of this OptionsMyTrade. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def price(self, price): def underlying_price(self): """Gets the underlying_price of this OptionsMyTrade. # noqa: E501 - Underlying price (quote currency). # noqa: E501 + Underlying price (quote currency) # noqa: E501 :return: The underlying_price of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def underlying_price(self): def underlying_price(self, underlying_price): """Sets the underlying_price of this OptionsMyTrade. - Underlying price (quote currency). # noqa: E501 + Underlying price (quote currency) # noqa: E501 :param underlying_price: The underlying_price of this OptionsMyTrade. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def underlying_price(self, underlying_price): def role(self): """Gets the role of this OptionsMyTrade. # noqa: E501 - Trade role. Available values are `taker` and `maker`. # noqa: E501 + Trade role. taker - taker, maker - maker # noqa: E501 :return: The role of this OptionsMyTrade. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def role(self): def role(self, role): """Sets the role of this OptionsMyTrade. - Trade role. Available values are `taker` and `maker`. # noqa: E501 + Trade role. taker - taker, maker - maker # noqa: E501 :param role: The role of this OptionsMyTrade. # noqa: E501 :type: str diff --git a/gate_api/models/options_order.py b/gate_api/models/options_order.py index 4f8dbbb..1f28133 100644 --- a/gate_api/models/options_order.py +++ b/gate_api/models/options_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -175,7 +175,7 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis def id(self): """Gets the id of this OptionsOrder. # noqa: E501 - Options order ID. # noqa: E501 + Options order ID # noqa: E501 :return: The id of this OptionsOrder. # noqa: E501 :rtype: int @@ -186,7 +186,7 @@ def id(self): def id(self, id): """Sets the id of this OptionsOrder. - Options order ID. # noqa: E501 + Options order ID # noqa: E501 :param id: The id of this OptionsOrder. # noqa: E501 :type: int @@ -198,7 +198,7 @@ def id(self, id): def user(self): """Gets the user of this OptionsOrder. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this OptionsOrder. # noqa: E501 :rtype: int @@ -209,7 +209,7 @@ def user(self): def user(self, user): """Sets the user of this OptionsOrder. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this OptionsOrder. # noqa: E501 :type: int @@ -221,7 +221,7 @@ def user(self, user): def create_time(self): """Gets the create_time of this OptionsOrder. # noqa: E501 - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :return: The create_time of this OptionsOrder. # noqa: E501 :rtype: float @@ -232,7 +232,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OptionsOrder. - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :param create_time: The create_time of this OptionsOrder. # noqa: E501 :type: float @@ -244,7 +244,7 @@ def create_time(self, create_time): def finish_time(self): """Gets the finish_time of this OptionsOrder. # noqa: E501 - Order finished time. Not returned if order is open. # noqa: E501 + Order finished time. Not returned if order is open # noqa: E501 :return: The finish_time of this OptionsOrder. # noqa: E501 :rtype: float @@ -255,7 +255,7 @@ def finish_time(self): def finish_time(self, finish_time): """Sets the finish_time of this OptionsOrder. - Order finished time. Not returned if order is open. # noqa: E501 + Order finished time. Not returned if order is open # noqa: E501 :param finish_time: The finish_time of this OptionsOrder. # noqa: E501 :type: float @@ -267,7 +267,7 @@ def finish_time(self, finish_time): def finish_as(self): """Gets the finish_as of this OptionsOrder. # noqa: E501 - Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 + Order finish reason: - filled: Fully filled - cancelled: User cancelled - liquidated: Cancelled due to liquidation - ioc: Not immediately fully filled due to IOC time-in-force setting - auto_deleveraged: Cancelled due to auto-deleveraging - reduce_only: Cancelled due to position increase while reduce-only is set - position_closed: Cancelled because the position was closed - reduce_out: Only reduce positions by excluding hard-to-fill orders - mmp_cancelled: Cancelled by MMP # noqa: E501 :return: The finish_as of this OptionsOrder. # noqa: E501 :rtype: str @@ -278,7 +278,7 @@ def finish_as(self): def finish_as(self, finish_as): """Sets the finish_as of this OptionsOrder. - Ending method, including: - filled: fully completed - canceled: user canceled - liquidated: forced liquidation cancellation - ioc: Not fully filled immediately because tif is set to ioc - auto_deleveraged: automatic deleveraging cancel - reduce_only: Increased position is cancelled, or the position is closed - position_closed: Because the position was closed, the pending order was canceled - reduce_out: Only reduce the excluded pending orders that are not easy to be filled - mmp_cancelled: MMP canceled # noqa: E501 + Order finish reason: - filled: Fully filled - cancelled: User cancelled - liquidated: Cancelled due to liquidation - ioc: Not immediately fully filled due to IOC time-in-force setting - auto_deleveraged: Cancelled due to auto-deleveraging - reduce_only: Cancelled due to position increase while reduce-only is set - position_closed: Cancelled because the position was closed - reduce_out: Only reduce positions by excluding hard-to-fill orders - mmp_cancelled: Cancelled by MMP # noqa: E501 :param finish_as: The finish_as of this OptionsOrder. # noqa: E501 :type: str @@ -296,7 +296,7 @@ def finish_as(self, finish_as): def status(self): """Gets the status of this OptionsOrder. # noqa: E501 - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + Order status - `open`: Pending - `finished`: Completed # noqa: E501 :return: The status of this OptionsOrder. # noqa: E501 :rtype: str @@ -307,7 +307,7 @@ def status(self): def status(self, status): """Sets the status of this OptionsOrder. - Order status - `open`: waiting to be traded - `finished`: finished # noqa: E501 + Order status - `open`: Pending - `finished`: Completed # noqa: E501 :param status: The status of this OptionsOrder. # noqa: E501 :type: str @@ -325,7 +325,7 @@ def status(self, status): def contract(self): """Gets the contract of this OptionsOrder. # noqa: E501 - Contract name. # noqa: E501 + Options identifier # noqa: E501 :return: The contract of this OptionsOrder. # noqa: E501 :rtype: str @@ -336,7 +336,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsOrder. - Contract name. # noqa: E501 + Options identifier # noqa: E501 :param contract: The contract of this OptionsOrder. # noqa: E501 :type: str @@ -350,7 +350,7 @@ def contract(self, contract): def size(self): """Gets the size of this OptionsOrder. # noqa: E501 - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501 :return: The size of this OptionsOrder. # noqa: E501 :rtype: int @@ -361,7 +361,7 @@ def size(self): def size(self, size): """Sets the size of this OptionsOrder. - Order size. Specify positive number to make a bid, and negative number to ask # noqa: E501 + Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders. # noqa: E501 :param size: The size of this OptionsOrder. # noqa: E501 :type: int @@ -375,7 +375,7 @@ def size(self, size): def iceberg(self): """Gets the iceberg of this OptionsOrder. # noqa: E501 - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501 :return: The iceberg of this OptionsOrder. # noqa: E501 :rtype: int @@ -386,7 +386,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this OptionsOrder. - Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size # noqa: E501 + Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees. # noqa: E501 :param iceberg: The iceberg of this OptionsOrder. # noqa: E501 :type: int @@ -398,7 +398,7 @@ def iceberg(self, iceberg): def price(self): """Gets the price of this OptionsOrder. # noqa: E501 - Order price. 0 for market order with `tif` set as `ioc` (USDT). # noqa: E501 + Order price. Price of 0 with `tif` set as `ioc` represents market order (quote currency) # noqa: E501 :return: The price of this OptionsOrder. # noqa: E501 :rtype: str @@ -409,7 +409,7 @@ def price(self): def price(self, price): """Sets the price of this OptionsOrder. - Order price. 0 for market order with `tif` set as `ioc` (USDT). # noqa: E501 + Order price. Price of 0 with `tif` set as `ioc` represents market order (quote currency) # noqa: E501 :param price: The price of this OptionsOrder. # noqa: E501 :type: str @@ -421,7 +421,7 @@ def price(self, price): def close(self): """Gets the close of this OptionsOrder. # noqa: E501 - Set as `true` to close the position, with `size` set to 0. # noqa: E501 + Set as `true` to close the position, with `size` set to 0 # noqa: E501 :return: The close of this OptionsOrder. # noqa: E501 :rtype: bool @@ -432,7 +432,7 @@ def close(self): def close(self, close): """Sets the close of this OptionsOrder. - Set as `true` to close the position, with `size` set to 0. # noqa: E501 + Set as `true` to close the position, with `size` set to 0 # noqa: E501 :param close: The close of this OptionsOrder. # noqa: E501 :type: bool @@ -444,7 +444,7 @@ def close(self, close): def is_close(self): """Gets the is_close of this OptionsOrder. # noqa: E501 - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :return: The is_close of this OptionsOrder. # noqa: E501 :rtype: bool @@ -455,7 +455,7 @@ def is_close(self): def is_close(self, is_close): """Sets the is_close of this OptionsOrder. - Is the order to close position. # noqa: E501 + Is the order to close position # noqa: E501 :param is_close: The is_close of this OptionsOrder. # noqa: E501 :type: bool @@ -467,7 +467,7 @@ def is_close(self, is_close): def reduce_only(self): """Gets the reduce_only of this OptionsOrder. # noqa: E501 - Set as `true` to be reduce-only order. # noqa: E501 + Set as `true` to be reduce-only order # noqa: E501 :return: The reduce_only of this OptionsOrder. # noqa: E501 :rtype: bool @@ -478,7 +478,7 @@ def reduce_only(self): def reduce_only(self, reduce_only): """Sets the reduce_only of this OptionsOrder. - Set as `true` to be reduce-only order. # noqa: E501 + Set as `true` to be reduce-only order # noqa: E501 :param reduce_only: The reduce_only of this OptionsOrder. # noqa: E501 :type: bool @@ -490,7 +490,7 @@ def reduce_only(self, reduce_only): def is_reduce_only(self): """Gets the is_reduce_only of this OptionsOrder. # noqa: E501 - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :return: The is_reduce_only of this OptionsOrder. # noqa: E501 :rtype: bool @@ -501,7 +501,7 @@ def is_reduce_only(self): def is_reduce_only(self, is_reduce_only): """Sets the is_reduce_only of this OptionsOrder. - Is the order reduce-only. # noqa: E501 + Is the order reduce-only # noqa: E501 :param is_reduce_only: The is_reduce_only of this OptionsOrder. # noqa: E501 :type: bool @@ -513,7 +513,7 @@ def is_reduce_only(self, is_reduce_only): def is_liq(self): """Gets the is_liq of this OptionsOrder. # noqa: E501 - Is the order for liquidation. # noqa: E501 + Is the order for liquidation # noqa: E501 :return: The is_liq of this OptionsOrder. # noqa: E501 :rtype: bool @@ -524,7 +524,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this OptionsOrder. - Is the order for liquidation. # noqa: E501 + Is the order for liquidation # noqa: E501 :param is_liq: The is_liq of this OptionsOrder. # noqa: E501 :type: bool @@ -536,7 +536,7 @@ def is_liq(self, is_liq): def mmp(self): """Gets the mmp of this OptionsOrder. # noqa: E501 - When set to true, delegate to MMP. # noqa: E501 + When set to true, it is an MMP order # noqa: E501 :return: The mmp of this OptionsOrder. # noqa: E501 :rtype: bool @@ -547,7 +547,7 @@ def mmp(self): def mmp(self, mmp): """Sets the mmp of this OptionsOrder. - When set to true, delegate to MMP. # noqa: E501 + When set to true, it is an MMP order # noqa: E501 :param mmp: The mmp of this OptionsOrder. # noqa: E501 :type: bool @@ -559,7 +559,7 @@ def mmp(self, mmp): def is_mmp(self): """Gets the is_mmp of this OptionsOrder. # noqa: E501 - Whether it is MMP delegation. Corresponds to `mmp` in the request. # noqa: E501 + Whether it is an MMP order. Corresponds to `mmp` in the request # noqa: E501 :return: The is_mmp of this OptionsOrder. # noqa: E501 :rtype: bool @@ -570,7 +570,7 @@ def is_mmp(self): def is_mmp(self, is_mmp): """Sets the is_mmp of this OptionsOrder. - Whether it is MMP delegation. Corresponds to `mmp` in the request. # noqa: E501 + Whether it is an MMP order. Corresponds to `mmp` in the request # noqa: E501 :param is_mmp: The is_mmp of this OptionsOrder. # noqa: E501 :type: bool @@ -582,7 +582,7 @@ def is_mmp(self, is_mmp): def tif(self): """Gets the tif of this OptionsOrder. # noqa: E501 - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501 + Time in force strategy. Market orders currently only support IOC mode - gtc: Good Till Cancelled - ioc: Immediate Or Cancelled, execute immediately or cancel, taker only - poc: Pending Or Cancelled, passive order, maker only # noqa: E501 :return: The tif of this OptionsOrder. # noqa: E501 :rtype: str @@ -593,7 +593,7 @@ def tif(self): def tif(self, tif): """Sets the tif of this OptionsOrder. - Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee # noqa: E501 + Time in force strategy. Market orders currently only support IOC mode - gtc: Good Till Cancelled - ioc: Immediate Or Cancelled, execute immediately or cancel, taker only - poc: Pending Or Cancelled, passive order, maker only # noqa: E501 :param tif: The tif of this OptionsOrder. # noqa: E501 :type: str @@ -611,7 +611,7 @@ def tif(self, tif): def left(self): """Gets the left of this OptionsOrder. # noqa: E501 - Size left to be traded. # noqa: E501 + Unfilled quantity # noqa: E501 :return: The left of this OptionsOrder. # noqa: E501 :rtype: int @@ -622,7 +622,7 @@ def left(self): def left(self, left): """Sets the left of this OptionsOrder. - Size left to be traded. # noqa: E501 + Unfilled quantity # noqa: E501 :param left: The left of this OptionsOrder. # noqa: E501 :type: int @@ -634,7 +634,7 @@ def left(self, left): def fill_price(self): """Gets the fill_price of this OptionsOrder. # noqa: E501 - Fill price of the order. # noqa: E501 + Fill price # noqa: E501 :return: The fill_price of this OptionsOrder. # noqa: E501 :rtype: str @@ -645,7 +645,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this OptionsOrder. - Fill price of the order. # noqa: E501 + Fill price # noqa: E501 :param fill_price: The fill_price of this OptionsOrder. # noqa: E501 :type: str @@ -680,7 +680,7 @@ def text(self, text): def tkfr(self): """Gets the tkfr of this OptionsOrder. # noqa: E501 - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :return: The tkfr of this OptionsOrder. # noqa: E501 :rtype: str @@ -691,7 +691,7 @@ def tkfr(self): def tkfr(self, tkfr): """Sets the tkfr of this OptionsOrder. - Taker fee. # noqa: E501 + Taker fee # noqa: E501 :param tkfr: The tkfr of this OptionsOrder. # noqa: E501 :type: str @@ -703,7 +703,7 @@ def tkfr(self, tkfr): def mkfr(self): """Gets the mkfr of this OptionsOrder. # noqa: E501 - Maker fee. # noqa: E501 + Maker fee # noqa: E501 :return: The mkfr of this OptionsOrder. # noqa: E501 :rtype: str @@ -714,7 +714,7 @@ def mkfr(self): def mkfr(self, mkfr): """Sets the mkfr of this OptionsOrder. - Maker fee. # noqa: E501 + Maker fee # noqa: E501 :param mkfr: The mkfr of this OptionsOrder. # noqa: E501 :type: str @@ -726,7 +726,7 @@ def mkfr(self, mkfr): def refu(self): """Gets the refu of this OptionsOrder. # noqa: E501 - Reference user ID. # noqa: E501 + Referrer user ID # noqa: E501 :return: The refu of this OptionsOrder. # noqa: E501 :rtype: int @@ -737,7 +737,7 @@ def refu(self): def refu(self, refu): """Sets the refu of this OptionsOrder. - Reference user ID. # noqa: E501 + Referrer user ID # noqa: E501 :param refu: The refu of this OptionsOrder. # noqa: E501 :type: int @@ -749,7 +749,7 @@ def refu(self, refu): def refr(self): """Gets the refr of this OptionsOrder. # noqa: E501 - Referrer rebate. # noqa: E501 + Referrer rebate # noqa: E501 :return: The refr of this OptionsOrder. # noqa: E501 :rtype: str @@ -760,7 +760,7 @@ def refr(self): def refr(self, refr): """Sets the refr of this OptionsOrder. - Referrer rebate. # noqa: E501 + Referrer rebate # noqa: E501 :param refr: The refr of this OptionsOrder. # noqa: E501 :type: str diff --git a/gate_api/models/options_position.py b/gate_api/models/options_position.py index 999715a..b20a575 100644 --- a/gate_api/models/options_position.py +++ b/gate_api/models/options_position.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -131,7 +131,7 @@ def __init__(self, user=None, underlying=None, underlying_price=None, contract=N def user(self): """Gets the user of this OptionsPosition. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this OptionsPosition. # noqa: E501 :rtype: int @@ -142,7 +142,7 @@ def user(self): def user(self, user): """Sets the user of this OptionsPosition. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this OptionsPosition. # noqa: E501 :type: int @@ -154,7 +154,7 @@ def user(self, user): def underlying(self): """Gets the underlying of this OptionsPosition. # noqa: E501 - Underlying. # noqa: E501 + Underlying # noqa: E501 :return: The underlying of this OptionsPosition. # noqa: E501 :rtype: str @@ -165,7 +165,7 @@ def underlying(self): def underlying(self, underlying): """Sets the underlying of this OptionsPosition. - Underlying. # noqa: E501 + Underlying # noqa: E501 :param underlying: The underlying of this OptionsPosition. # noqa: E501 :type: str @@ -177,7 +177,7 @@ def underlying(self, underlying): def underlying_price(self): """Gets the underlying_price of this OptionsPosition. # noqa: E501 - Underlying price (quote currency). # noqa: E501 + Underlying price (quote currency) # noqa: E501 :return: The underlying_price of this OptionsPosition. # noqa: E501 :rtype: str @@ -188,7 +188,7 @@ def underlying_price(self): def underlying_price(self, underlying_price): """Sets the underlying_price of this OptionsPosition. - Underlying price (quote currency). # noqa: E501 + Underlying price (quote currency) # noqa: E501 :param underlying_price: The underlying_price of this OptionsPosition. # noqa: E501 :type: str @@ -200,7 +200,7 @@ def underlying_price(self, underlying_price): def contract(self): """Gets the contract of this OptionsPosition. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The contract of this OptionsPosition. # noqa: E501 :rtype: str @@ -211,7 +211,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsPosition. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param contract: The contract of this OptionsPosition. # noqa: E501 :type: str @@ -223,7 +223,7 @@ def contract(self, contract): def size(self): """Gets the size of this OptionsPosition. # noqa: E501 - Position size (contract size). # noqa: E501 + Position size (contract quantity) # noqa: E501 :return: The size of this OptionsPosition. # noqa: E501 :rtype: int @@ -234,7 +234,7 @@ def size(self): def size(self, size): """Sets the size of this OptionsPosition. - Position size (contract size). # noqa: E501 + Position size (contract quantity) # noqa: E501 :param size: The size of this OptionsPosition. # noqa: E501 :type: int @@ -246,7 +246,7 @@ def size(self, size): def entry_price(self): """Gets the entry_price of this OptionsPosition. # noqa: E501 - Entry size (quote currency). # noqa: E501 + Entry size (quote currency) # noqa: E501 :return: The entry_price of this OptionsPosition. # noqa: E501 :rtype: str @@ -257,7 +257,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this OptionsPosition. - Entry size (quote currency). # noqa: E501 + Entry size (quote currency) # noqa: E501 :param entry_price: The entry_price of this OptionsPosition. # noqa: E501 :type: str @@ -269,7 +269,7 @@ def entry_price(self, entry_price): def mark_price(self): """Gets the mark_price of this OptionsPosition. # noqa: E501 - Current mark price (quote currency). # noqa: E501 + Current mark price (quote currency) # noqa: E501 :return: The mark_price of this OptionsPosition. # noqa: E501 :rtype: str @@ -280,7 +280,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this OptionsPosition. - Current mark price (quote currency). # noqa: E501 + Current mark price (quote currency) # noqa: E501 :param mark_price: The mark_price of this OptionsPosition. # noqa: E501 :type: str @@ -292,7 +292,7 @@ def mark_price(self, mark_price): def mark_iv(self): """Gets the mark_iv of this OptionsPosition. # noqa: E501 - Implied volatility. # noqa: E501 + Implied volatility # noqa: E501 :return: The mark_iv of this OptionsPosition. # noqa: E501 :rtype: str @@ -303,7 +303,7 @@ def mark_iv(self): def mark_iv(self, mark_iv): """Sets the mark_iv of this OptionsPosition. - Implied volatility. # noqa: E501 + Implied volatility # noqa: E501 :param mark_iv: The mark_iv of this OptionsPosition. # noqa: E501 :type: str @@ -315,7 +315,7 @@ def mark_iv(self, mark_iv): def realised_pnl(self): """Gets the realised_pnl of this OptionsPosition. # noqa: E501 - Realized PNL. # noqa: E501 + Realized PnL # noqa: E501 :return: The realised_pnl of this OptionsPosition. # noqa: E501 :rtype: str @@ -326,7 +326,7 @@ def realised_pnl(self): def realised_pnl(self, realised_pnl): """Sets the realised_pnl of this OptionsPosition. - Realized PNL. # noqa: E501 + Realized PnL # noqa: E501 :param realised_pnl: The realised_pnl of this OptionsPosition. # noqa: E501 :type: str @@ -338,7 +338,7 @@ def realised_pnl(self, realised_pnl): def unrealised_pnl(self): """Gets the unrealised_pnl of this OptionsPosition. # noqa: E501 - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :return: The unrealised_pnl of this OptionsPosition. # noqa: E501 :rtype: str @@ -349,7 +349,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this OptionsPosition. - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this OptionsPosition. # noqa: E501 :type: str @@ -361,7 +361,7 @@ def unrealised_pnl(self, unrealised_pnl): def pending_orders(self): """Gets the pending_orders of this OptionsPosition. # noqa: E501 - Current open orders. # noqa: E501 + Current pending order quantity # noqa: E501 :return: The pending_orders of this OptionsPosition. # noqa: E501 :rtype: int @@ -372,7 +372,7 @@ def pending_orders(self): def pending_orders(self, pending_orders): """Sets the pending_orders of this OptionsPosition. - Current open orders. # noqa: E501 + Current pending order quantity # noqa: E501 :param pending_orders: The pending_orders of this OptionsPosition. # noqa: E501 :type: int @@ -405,7 +405,7 @@ def close_order(self, close_order): def delta(self): """Gets the delta of this OptionsPosition. # noqa: E501 - Delta. # noqa: E501 + Greek letter delta # noqa: E501 :return: The delta of this OptionsPosition. # noqa: E501 :rtype: str @@ -416,7 +416,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this OptionsPosition. - Delta. # noqa: E501 + Greek letter delta # noqa: E501 :param delta: The delta of this OptionsPosition. # noqa: E501 :type: str @@ -428,7 +428,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this OptionsPosition. # noqa: E501 - Gamma. # noqa: E501 + Greek letter gamma # noqa: E501 :return: The gamma of this OptionsPosition. # noqa: E501 :rtype: str @@ -439,7 +439,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this OptionsPosition. - Gamma. # noqa: E501 + Greek letter gamma # noqa: E501 :param gamma: The gamma of this OptionsPosition. # noqa: E501 :type: str @@ -451,7 +451,7 @@ def gamma(self, gamma): def vega(self): """Gets the vega of this OptionsPosition. # noqa: E501 - Vega. # noqa: E501 + Greek letter vega # noqa: E501 :return: The vega of this OptionsPosition. # noqa: E501 :rtype: str @@ -462,7 +462,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this OptionsPosition. - Vega. # noqa: E501 + Greek letter vega # noqa: E501 :param vega: The vega of this OptionsPosition. # noqa: E501 :type: str @@ -474,7 +474,7 @@ def vega(self, vega): def theta(self): """Gets the theta of this OptionsPosition. # noqa: E501 - Theta. # noqa: E501 + Greek letter theta # noqa: E501 :return: The theta of this OptionsPosition. # noqa: E501 :rtype: str @@ -485,7 +485,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this OptionsPosition. - Theta. # noqa: E501 + Greek letter theta # noqa: E501 :param theta: The theta of this OptionsPosition. # noqa: E501 :type: str diff --git a/gate_api/models/options_position_close.py b/gate_api/models/options_position_close.py index 616c81b..2cc0fbb 100644 --- a/gate_api/models/options_position_close.py +++ b/gate_api/models/options_position_close.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, time=None, contract=None, side=None, pnl=None, text=None, set def time(self): """Gets the time of this OptionsPositionClose. # noqa: E501 - Position close time. # noqa: E501 + Position close time # noqa: E501 :return: The time of this OptionsPositionClose. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsPositionClose. - Position close time. # noqa: E501 + Position close time # noqa: E501 :param time: The time of this OptionsPositionClose. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def time(self, time): def contract(self): """Gets the contract of this OptionsPositionClose. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The contract of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsPositionClose. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param contract: The contract of this OptionsPositionClose. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def contract(self, contract): def side(self): """Gets the side of this OptionsPositionClose. # noqa: E501 - Position side, long or short. # noqa: E501 + Position side - `long`: Long position - `short`: Short position # noqa: E501 :return: The side of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def side(self): def side(self, side): """Sets the side of this OptionsPositionClose. - Position side, long or short. # noqa: E501 + Position side - `long`: Long position - `short`: Short position # noqa: E501 :param side: The side of this OptionsPositionClose. # noqa: E501 :type: str @@ -157,7 +157,7 @@ def side(self, side): def pnl(self): """Gets the pnl of this OptionsPositionClose. # noqa: E501 - PNL. # noqa: E501 + PnL # noqa: E501 :return: The pnl of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def pnl(self): def pnl(self, pnl): """Sets the pnl of this OptionsPositionClose. - PNL. # noqa: E501 + PnL # noqa: E501 :param pnl: The pnl of this OptionsPositionClose. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def pnl(self, pnl): def text(self): """Gets the text of this OptionsPositionClose. # noqa: E501 - Text of close order. # noqa: E501 + Source of close order. See `order.text` field for specific values # noqa: E501 :return: The text of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def text(self): def text(self, text): """Sets the text of this OptionsPositionClose. - Text of close order. # noqa: E501 + Source of close order. See `order.text` field for specific values # noqa: E501 :param text: The text of this OptionsPositionClose. # noqa: E501 :type: str @@ -203,7 +203,7 @@ def text(self, text): def settle_size(self): """Gets the settle_size of this OptionsPositionClose. # noqa: E501 - settlement size. # noqa: E501 + Settlement size # noqa: E501 :return: The settle_size of this OptionsPositionClose. # noqa: E501 :rtype: str @@ -214,7 +214,7 @@ def settle_size(self): def settle_size(self, settle_size): """Sets the settle_size of this OptionsPositionClose. - settlement size. # noqa: E501 + Settlement size # noqa: E501 :param settle_size: The settle_size of this OptionsPositionClose. # noqa: E501 :type: str diff --git a/gate_api/models/options_position_close_order.py b/gate_api/models/options_position_close_order.py index 94bd440..31449b1 100644 --- a/gate_api/models/options_position_close_order.py +++ b/gate_api/models/options_position_close_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=No def id(self): """Gets the id of this OptionsPositionCloseOrder. # noqa: E501 - Close order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this OptionsPositionCloseOrder. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def id(self): def id(self, id): """Sets the id of this OptionsPositionCloseOrder. - Close order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this OptionsPositionCloseOrder. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def id(self, id): def price(self): """Gets the price of this OptionsPositionCloseOrder. # noqa: E501 - Close order price (quote currency). # noqa: E501 + Order price (quote currency) # noqa: E501 :return: The price of this OptionsPositionCloseOrder. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def price(self): def price(self, price): """Sets the price of this OptionsPositionCloseOrder. - Close order price (quote currency). # noqa: E501 + Order price (quote currency) # noqa: E501 :param price: The price of this OptionsPositionCloseOrder. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def price(self, price): def is_liq(self): """Gets the is_liq of this OptionsPositionCloseOrder. # noqa: E501 - Is the close order from liquidation. # noqa: E501 + Whether the close order is from liquidation # noqa: E501 :return: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 :rtype: bool @@ -124,7 +124,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this OptionsPositionCloseOrder. - Is the close order from liquidation. # noqa: E501 + Whether the close order is from liquidation # noqa: E501 :param is_liq: The is_liq of this OptionsPositionCloseOrder. # noqa: E501 :type: bool diff --git a/gate_api/models/options_settlement.py b/gate_api/models/options_settlement.py index 4ecc7c0..d199ae4 100644 --- a/gate_api/models/options_settlement.py +++ b/gate_api/models/options_settlement.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, time=None, contract=None, profit=None, fee=None, strike_price def time(self): """Gets the time of this OptionsSettlement. # noqa: E501 - Last changed time of configuration. # noqa: E501 + Last configuration update time # noqa: E501 :return: The time of this OptionsSettlement. # noqa: E501 :rtype: float @@ -93,7 +93,7 @@ def time(self): def time(self, time): """Sets the time of this OptionsSettlement. - Last changed time of configuration. # noqa: E501 + Last configuration update time # noqa: E501 :param time: The time of this OptionsSettlement. # noqa: E501 :type: float @@ -105,7 +105,7 @@ def time(self, time): def contract(self): """Gets the contract of this OptionsSettlement. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The contract of this OptionsSettlement. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this OptionsSettlement. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param contract: The contract of this OptionsSettlement. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def contract(self, contract): def profit(self): """Gets the profit of this OptionsSettlement. # noqa: E501 - Settlement profit per size (quote currency). # noqa: E501 + Settlement profit per contract (quote currency) # noqa: E501 :return: The profit of this OptionsSettlement. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def profit(self): def profit(self, profit): """Sets the profit of this OptionsSettlement. - Settlement profit per size (quote currency). # noqa: E501 + Settlement profit per contract (quote currency) # noqa: E501 :param profit: The profit of this OptionsSettlement. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def profit(self, profit): def fee(self): """Gets the fee of this OptionsSettlement. # noqa: E501 - Settlement fee per size (quote currency). # noqa: E501 + Settlement fee per contract (quote currency) # noqa: E501 :return: The fee of this OptionsSettlement. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this OptionsSettlement. - Settlement fee per size (quote currency). # noqa: E501 + Settlement fee per contract (quote currency) # noqa: E501 :param fee: The fee of this OptionsSettlement. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def fee(self, fee): def strike_price(self): """Gets the strike_price of this OptionsSettlement. # noqa: E501 - Strike price (quote currency). # noqa: E501 + Strike price (quote currency) # noqa: E501 :return: The strike_price of this OptionsSettlement. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def strike_price(self): def strike_price(self, strike_price): """Sets the strike_price of this OptionsSettlement. - Strike price (quote currency). # noqa: E501 + Strike price (quote currency) # noqa: E501 :param strike_price: The strike_price of this OptionsSettlement. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def strike_price(self, strike_price): def settle_price(self): """Gets the settle_price of this OptionsSettlement. # noqa: E501 - Settlement price (quote currency). # noqa: E501 + Settlement price (quote currency) # noqa: E501 :return: The settle_price of this OptionsSettlement. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def settle_price(self): def settle_price(self, settle_price): """Sets the settle_price of this OptionsSettlement. - Settlement price (quote currency). # noqa: E501 + Settlement price (quote currency) # noqa: E501 :param settle_price: The settle_price of this OptionsSettlement. # noqa: E501 :type: str diff --git a/gate_api/models/options_ticker.py b/gate_api/models/options_ticker.py index d71ba0f..8a645f8 100644 --- a/gate_api/models/options_ticker.py +++ b/gate_api/models/options_ticker.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -142,7 +142,7 @@ def __init__(self, name=None, last_price=None, mark_price=None, index_price=None def name(self): """Gets the name of this OptionsTicker. # noqa: E501 - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :return: The name of this OptionsTicker. # noqa: E501 :rtype: str @@ -153,7 +153,7 @@ def name(self): def name(self, name): """Sets the name of this OptionsTicker. - Options contract name. # noqa: E501 + Options contract name # noqa: E501 :param name: The name of this OptionsTicker. # noqa: E501 :type: str @@ -165,7 +165,7 @@ def name(self, name): def last_price(self): """Gets the last_price of this OptionsTicker. # noqa: E501 - Last trading price (quote currency). # noqa: E501 + Last trade price (quote currency) # noqa: E501 :return: The last_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -176,7 +176,7 @@ def last_price(self): def last_price(self, last_price): """Sets the last_price of this OptionsTicker. - Last trading price (quote currency). # noqa: E501 + Last trade price (quote currency) # noqa: E501 :param last_price: The last_price of this OptionsTicker. # noqa: E501 :type: str @@ -188,7 +188,7 @@ def last_price(self, last_price): def mark_price(self): """Gets the mark_price of this OptionsTicker. # noqa: E501 - Current mark price (quote currency). # noqa: E501 + Current mark price (quote currency) # noqa: E501 :return: The mark_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -199,7 +199,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this OptionsTicker. - Current mark price (quote currency). # noqa: E501 + Current mark price (quote currency) # noqa: E501 :param mark_price: The mark_price of this OptionsTicker. # noqa: E501 :type: str @@ -211,7 +211,7 @@ def mark_price(self, mark_price): def index_price(self): """Gets the index_price of this OptionsTicker. # noqa: E501 - Current index price (quote currency). # noqa: E501 + Current index price (quote currency) # noqa: E501 :return: The index_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -222,7 +222,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsTicker. - Current index price (quote currency). # noqa: E501 + Current index price (quote currency) # noqa: E501 :param index_price: The index_price of this OptionsTicker. # noqa: E501 :type: str @@ -234,7 +234,7 @@ def index_price(self, index_price): def ask1_size(self): """Gets the ask1_size of this OptionsTicker. # noqa: E501 - Best ask size. # noqa: E501 + Best ask size # noqa: E501 :return: The ask1_size of this OptionsTicker. # noqa: E501 :rtype: int @@ -245,7 +245,7 @@ def ask1_size(self): def ask1_size(self, ask1_size): """Sets the ask1_size of this OptionsTicker. - Best ask size. # noqa: E501 + Best ask size # noqa: E501 :param ask1_size: The ask1_size of this OptionsTicker. # noqa: E501 :type: int @@ -257,7 +257,7 @@ def ask1_size(self, ask1_size): def ask1_price(self): """Gets the ask1_price of this OptionsTicker. # noqa: E501 - Best ask price. # noqa: E501 + Best ask price # noqa: E501 :return: The ask1_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -268,7 +268,7 @@ def ask1_price(self): def ask1_price(self, ask1_price): """Sets the ask1_price of this OptionsTicker. - Best ask price. # noqa: E501 + Best ask price # noqa: E501 :param ask1_price: The ask1_price of this OptionsTicker. # noqa: E501 :type: str @@ -280,7 +280,7 @@ def ask1_price(self, ask1_price): def bid1_size(self): """Gets the bid1_size of this OptionsTicker. # noqa: E501 - Best bid size. # noqa: E501 + Best bid size # noqa: E501 :return: The bid1_size of this OptionsTicker. # noqa: E501 :rtype: int @@ -291,7 +291,7 @@ def bid1_size(self): def bid1_size(self, bid1_size): """Sets the bid1_size of this OptionsTicker. - Best bid size. # noqa: E501 + Best bid size # noqa: E501 :param bid1_size: The bid1_size of this OptionsTicker. # noqa: E501 :type: int @@ -303,7 +303,7 @@ def bid1_size(self, bid1_size): def bid1_price(self): """Gets the bid1_price of this OptionsTicker. # noqa: E501 - Best bid price. # noqa: E501 + Best bid price # noqa: E501 :return: The bid1_price of this OptionsTicker. # noqa: E501 :rtype: str @@ -314,7 +314,7 @@ def bid1_price(self): def bid1_price(self, bid1_price): """Sets the bid1_price of this OptionsTicker. - Best bid price. # noqa: E501 + Best bid price # noqa: E501 :param bid1_price: The bid1_price of this OptionsTicker. # noqa: E501 :type: str @@ -326,7 +326,7 @@ def bid1_price(self, bid1_price): def position_size(self): """Gets the position_size of this OptionsTicker. # noqa: E501 - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :return: The position_size of this OptionsTicker. # noqa: E501 :rtype: int @@ -337,7 +337,7 @@ def position_size(self): def position_size(self, position_size): """Sets the position_size of this OptionsTicker. - Current total long position size. # noqa: E501 + Current total long position size # noqa: E501 :param position_size: The position_size of this OptionsTicker. # noqa: E501 :type: int @@ -349,7 +349,7 @@ def position_size(self, position_size): def mark_iv(self): """Gets the mark_iv of this OptionsTicker. # noqa: E501 - Implied volatility. # noqa: E501 + Implied volatility # noqa: E501 :return: The mark_iv of this OptionsTicker. # noqa: E501 :rtype: str @@ -360,7 +360,7 @@ def mark_iv(self): def mark_iv(self, mark_iv): """Sets the mark_iv of this OptionsTicker. - Implied volatility. # noqa: E501 + Implied volatility # noqa: E501 :param mark_iv: The mark_iv of this OptionsTicker. # noqa: E501 :type: str @@ -372,7 +372,7 @@ def mark_iv(self, mark_iv): def bid_iv(self): """Gets the bid_iv of this OptionsTicker. # noqa: E501 - Bid side implied volatility. # noqa: E501 + Bid side implied volatility # noqa: E501 :return: The bid_iv of this OptionsTicker. # noqa: E501 :rtype: str @@ -383,7 +383,7 @@ def bid_iv(self): def bid_iv(self, bid_iv): """Sets the bid_iv of this OptionsTicker. - Bid side implied volatility. # noqa: E501 + Bid side implied volatility # noqa: E501 :param bid_iv: The bid_iv of this OptionsTicker. # noqa: E501 :type: str @@ -395,7 +395,7 @@ def bid_iv(self, bid_iv): def ask_iv(self): """Gets the ask_iv of this OptionsTicker. # noqa: E501 - Ask side implied volatility. # noqa: E501 + Ask side implied volatility # noqa: E501 :return: The ask_iv of this OptionsTicker. # noqa: E501 :rtype: str @@ -406,7 +406,7 @@ def ask_iv(self): def ask_iv(self, ask_iv): """Sets the ask_iv of this OptionsTicker. - Ask side implied volatility. # noqa: E501 + Ask side implied volatility # noqa: E501 :param ask_iv: The ask_iv of this OptionsTicker. # noqa: E501 :type: str @@ -418,7 +418,7 @@ def ask_iv(self, ask_iv): def leverage(self): """Gets the leverage of this OptionsTicker. # noqa: E501 - Current leverage. Formula: underlying_price / mark_price * delta. # noqa: E501 + Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 :return: The leverage of this OptionsTicker. # noqa: E501 :rtype: str @@ -429,7 +429,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this OptionsTicker. - Current leverage. Formula: underlying_price / mark_price * delta. # noqa: E501 + Current leverage. Formula: underlying_price / mark_price * delta # noqa: E501 :param leverage: The leverage of this OptionsTicker. # noqa: E501 :type: str @@ -441,7 +441,7 @@ def leverage(self, leverage): def delta(self): """Gets the delta of this OptionsTicker. # noqa: E501 - Delta. # noqa: E501 + Greek letter delta # noqa: E501 :return: The delta of this OptionsTicker. # noqa: E501 :rtype: str @@ -452,7 +452,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this OptionsTicker. - Delta. # noqa: E501 + Greek letter delta # noqa: E501 :param delta: The delta of this OptionsTicker. # noqa: E501 :type: str @@ -464,7 +464,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this OptionsTicker. # noqa: E501 - Gamma. # noqa: E501 + Greek letter gamma # noqa: E501 :return: The gamma of this OptionsTicker. # noqa: E501 :rtype: str @@ -475,7 +475,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this OptionsTicker. - Gamma. # noqa: E501 + Greek letter gamma # noqa: E501 :param gamma: The gamma of this OptionsTicker. # noqa: E501 :type: str @@ -487,7 +487,7 @@ def gamma(self, gamma): def vega(self): """Gets the vega of this OptionsTicker. # noqa: E501 - Vega. # noqa: E501 + Greek letter vega # noqa: E501 :return: The vega of this OptionsTicker. # noqa: E501 :rtype: str @@ -498,7 +498,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this OptionsTicker. - Vega. # noqa: E501 + Greek letter vega # noqa: E501 :param vega: The vega of this OptionsTicker. # noqa: E501 :type: str @@ -510,7 +510,7 @@ def vega(self, vega): def theta(self): """Gets the theta of this OptionsTicker. # noqa: E501 - Theta. # noqa: E501 + Greek letter theta # noqa: E501 :return: The theta of this OptionsTicker. # noqa: E501 :rtype: str @@ -521,7 +521,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this OptionsTicker. - Theta. # noqa: E501 + Greek letter theta # noqa: E501 :param theta: The theta of this OptionsTicker. # noqa: E501 :type: str @@ -533,7 +533,7 @@ def theta(self, theta): def rho(self): """Gets the rho of this OptionsTicker. # noqa: E501 - Rho. # noqa: E501 + Rho # noqa: E501 :return: The rho of this OptionsTicker. # noqa: E501 :rtype: str @@ -544,7 +544,7 @@ def rho(self): def rho(self, rho): """Sets the rho of this OptionsTicker. - Rho. # noqa: E501 + Rho # noqa: E501 :param rho: The rho of this OptionsTicker. # noqa: E501 :type: str diff --git a/gate_api/models/options_underlying.py b/gate_api/models/options_underlying.py index 45d86f5..89abb3f 100644 --- a/gate_api/models/options_underlying.py +++ b/gate_api/models/options_underlying.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, name=None, index_price=None, local_vars_configuration=None): def name(self): """Gets the name of this OptionsUnderlying. # noqa: E501 - Underlying name. # noqa: E501 + Underlying name # noqa: E501 :return: The name of this OptionsUnderlying. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def name(self): def name(self, name): """Sets the name of this OptionsUnderlying. - Underlying name. # noqa: E501 + Underlying name # noqa: E501 :param name: The name of this OptionsUnderlying. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def name(self, name): def index_price(self): """Gets the index_price of this OptionsUnderlying. # noqa: E501 - Spot index price (quote currency). # noqa: E501 + Spot index price (quote currency) # noqa: E501 :return: The index_price of this OptionsUnderlying. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsUnderlying. - Spot index price (quote currency). # noqa: E501 + Spot index price (quote currency) # noqa: E501 :param index_price: The index_price of this OptionsUnderlying. # noqa: E501 :type: str diff --git a/gate_api/models/options_underlying_ticker.py b/gate_api/models/options_underlying_ticker.py index 0a4683a..8ce402e 100644 --- a/gate_api/models/options_underlying_ticker.py +++ b/gate_api/models/options_underlying_ticker.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, trade_put=None, trade_call=None, index_price=None, local_vars def trade_put(self): """Gets the trade_put of this OptionsUnderlyingTicker. # noqa: E501 - Total put options trades amount in last 24h. # noqa: E501 + Total put options trades amount in last 24h # noqa: E501 :return: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def trade_put(self): def trade_put(self, trade_put): """Sets the trade_put of this OptionsUnderlyingTicker. - Total put options trades amount in last 24h. # noqa: E501 + Total put options trades amount in last 24h # noqa: E501 :param trade_put: The trade_put of this OptionsUnderlyingTicker. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def trade_put(self, trade_put): def trade_call(self): """Gets the trade_call of this OptionsUnderlyingTicker. # noqa: E501 - Total call options trades amount in last 24h. # noqa: E501 + Total call options trades amount in last 24h # noqa: E501 :return: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def trade_call(self): def trade_call(self, trade_call): """Sets the trade_call of this OptionsUnderlyingTicker. - Total call options trades amount in last 24h. # noqa: E501 + Total call options trades amount in last 24h # noqa: E501 :param trade_call: The trade_call of this OptionsUnderlyingTicker. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def trade_call(self, trade_call): def index_price(self): """Gets the index_price of this OptionsUnderlyingTicker. # noqa: E501 - Index price (quote currency). # noqa: E501 + Index price (quote currency) # noqa: E501 :return: The index_price of this OptionsUnderlyingTicker. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this OptionsUnderlyingTicker. - Index price (quote currency). # noqa: E501 + Index price (quote currency) # noqa: E501 :param index_price: The index_price of this OptionsUnderlyingTicker. # noqa: E501 :type: str diff --git a/gate_api/models/order.py b/gate_api/models/order.py index a4aabea..7555321 100644 --- a/gate_api/models/order.py +++ b/gate_api/models/order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -229,7 +229,7 @@ def __init__(self, id=None, text=None, amend_text=None, create_time=None, update def id(self): """Gets the id of this Order. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this Order. # noqa: E501 :rtype: str @@ -240,7 +240,7 @@ def id(self): def id(self, id): """Sets the id of this Order. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this Order. # noqa: E501 :type: str @@ -275,7 +275,7 @@ def text(self, text): def amend_text(self): """Gets the amend_text of this Order. # noqa: E501 - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :return: The amend_text of this Order. # noqa: E501 :rtype: str @@ -286,7 +286,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this Order. - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :param amend_text: The amend_text of this Order. # noqa: E501 :type: str @@ -298,7 +298,7 @@ def amend_text(self, amend_text): def create_time(self): """Gets the create_time of this Order. # noqa: E501 - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :return: The create_time of this Order. # noqa: E501 :rtype: str @@ -309,7 +309,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this Order. - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :param create_time: The create_time of this Order. # noqa: E501 :type: str @@ -321,7 +321,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this Order. # noqa: E501 - Last modification time of order. # noqa: E501 + Last modification time of order # noqa: E501 :return: The update_time of this Order. # noqa: E501 :rtype: str @@ -332,7 +332,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this Order. - Last modification time of order. # noqa: E501 + Last modification time of order # noqa: E501 :param update_time: The update_time of this Order. # noqa: E501 :type: str @@ -344,7 +344,7 @@ def update_time(self, update_time): def create_time_ms(self): """Gets the create_time_ms of this Order. # noqa: E501 - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :return: The create_time_ms of this Order. # noqa: E501 :rtype: int @@ -355,7 +355,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this Order. - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :param create_time_ms: The create_time_ms of this Order. # noqa: E501 :type: int @@ -367,7 +367,7 @@ def create_time_ms(self, create_time_ms): def update_time_ms(self): """Gets the update_time_ms of this Order. # noqa: E501 - Last modification time of order (in milliseconds). # noqa: E501 + Last modification time of order (in milliseconds) # noqa: E501 :return: The update_time_ms of this Order. # noqa: E501 :rtype: int @@ -378,7 +378,7 @@ def update_time_ms(self): def update_time_ms(self, update_time_ms): """Sets the update_time_ms of this Order. - Last modification time of order (in milliseconds). # noqa: E501 + Last modification time of order (in milliseconds) # noqa: E501 :param update_time_ms: The update_time_ms of this Order. # noqa: E501 :type: int @@ -419,7 +419,7 @@ def status(self, status): def currency_pair(self): """Gets the currency_pair of this Order. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this Order. # noqa: E501 :rtype: str @@ -430,7 +430,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Order. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this Order. # noqa: E501 :type: str @@ -496,7 +496,7 @@ def account(self, account): def side(self): """Gets the side of this Order. # noqa: E501 - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this Order. # noqa: E501 :rtype: str @@ -507,7 +507,7 @@ def side(self): def side(self, side): """Sets the side of this Order. - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this Order. # noqa: E501 :type: str @@ -527,7 +527,7 @@ def side(self, side): def amount(self): """Gets the amount of this Order. # noqa: E501 - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501 :return: The amount of this Order. # noqa: E501 :rtype: str @@ -538,7 +538,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Order. - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501 :param amount: The amount of this Order. # noqa: E501 :type: str @@ -552,7 +552,7 @@ def amount(self, amount): def price(self): """Gets the price of this Order. # noqa: E501 - Price can't be empty when `type`= `limit`. # noqa: E501 + Trading price, required when `type`=`limit` # noqa: E501 :return: The price of this Order. # noqa: E501 :rtype: str @@ -563,7 +563,7 @@ def price(self): def price(self, price): """Sets the price of this Order. - Price can't be empty when `type`= `limit`. # noqa: E501 + Trading price, required when `type`=`limit` # noqa: E501 :param price: The price of this Order. # noqa: E501 :type: str @@ -604,7 +604,7 @@ def time_in_force(self, time_in_force): def iceberg(self): """Gets the iceberg of this Order. # noqa: E501 - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501 :return: The iceberg of this Order. # noqa: E501 :rtype: str @@ -615,7 +615,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this Order. - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501 :param iceberg: The iceberg of this Order. # noqa: E501 :type: str @@ -627,7 +627,7 @@ def iceberg(self, iceberg): def auto_borrow(self): """Gets the auto_borrow of this Order. # noqa: E501 - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501 :return: The auto_borrow of this Order. # noqa: E501 :rtype: bool @@ -638,7 +638,7 @@ def auto_borrow(self): def auto_borrow(self, auto_borrow): """Sets the auto_borrow of this Order. - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501 :param auto_borrow: The auto_borrow of this Order. # noqa: E501 :type: bool @@ -650,7 +650,7 @@ def auto_borrow(self, auto_borrow): def auto_repay(self): """Gets the auto_repay of this Order. # noqa: E501 - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order # noqa: E501 :return: The auto_repay of this Order. # noqa: E501 :rtype: bool @@ -661,7 +661,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this Order. - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order # noqa: E501 :param auto_repay: The auto_repay of this Order. # noqa: E501 :type: bool @@ -673,7 +673,7 @@ def auto_repay(self, auto_repay): def left(self): """Gets the left of this Order. # noqa: E501 - Amount left to fill. # noqa: E501 + Amount left to fill # noqa: E501 :return: The left of this Order. # noqa: E501 :rtype: str @@ -684,7 +684,7 @@ def left(self): def left(self, left): """Sets the left of this Order. - Amount left to fill. # noqa: E501 + Amount left to fill # noqa: E501 :param left: The left of this Order. # noqa: E501 :type: str @@ -696,7 +696,7 @@ def left(self, left): def filled_amount(self): """Gets the filled_amount of this Order. # noqa: E501 - Amount traded to fill. # noqa: E501 + Amount filled # noqa: E501 :return: The filled_amount of this Order. # noqa: E501 :rtype: str @@ -707,7 +707,7 @@ def filled_amount(self): def filled_amount(self, filled_amount): """Sets the filled_amount of this Order. - Amount traded to fill. # noqa: E501 + Amount filled # noqa: E501 :param filled_amount: The filled_amount of this Order. # noqa: E501 :type: str @@ -719,7 +719,7 @@ def filled_amount(self, filled_amount): def fill_price(self): """Gets the fill_price of this Order. # noqa: E501 - Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 :return: The fill_price of this Order. # noqa: E501 :rtype: str @@ -730,7 +730,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this Order. - Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 :param fill_price: The fill_price of this Order. # noqa: E501 :type: str @@ -742,7 +742,7 @@ def fill_price(self, fill_price): def filled_total(self): """Gets the filled_total of this Order. # noqa: E501 - Total filled in quote currency. # noqa: E501 + Total filled in quote currency # noqa: E501 :return: The filled_total of this Order. # noqa: E501 :rtype: str @@ -753,7 +753,7 @@ def filled_total(self): def filled_total(self, filled_total): """Sets the filled_total of this Order. - Total filled in quote currency. # noqa: E501 + Total filled in quote currency # noqa: E501 :param filled_total: The filled_total of this Order. # noqa: E501 :type: str @@ -765,7 +765,7 @@ def filled_total(self, filled_total): def avg_deal_price(self): """Gets the avg_deal_price of this Order. # noqa: E501 - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :return: The avg_deal_price of this Order. # noqa: E501 :rtype: str @@ -776,7 +776,7 @@ def avg_deal_price(self): def avg_deal_price(self, avg_deal_price): """Sets the avg_deal_price of this Order. - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :param avg_deal_price: The avg_deal_price of this Order. # noqa: E501 :type: str @@ -788,7 +788,7 @@ def avg_deal_price(self, avg_deal_price): def fee(self): """Gets the fee of this Order. # noqa: E501 - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :return: The fee of this Order. # noqa: E501 :rtype: str @@ -799,7 +799,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this Order. - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :param fee: The fee of this Order. # noqa: E501 :type: str @@ -811,7 +811,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this Order. # noqa: E501 - Fee currency unit. # noqa: E501 + Fee currency unit # noqa: E501 :return: The fee_currency of this Order. # noqa: E501 :rtype: str @@ -822,7 +822,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this Order. - Fee currency unit. # noqa: E501 + Fee currency unit # noqa: E501 :param fee_currency: The fee_currency of this Order. # noqa: E501 :type: str @@ -834,7 +834,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this Order. # noqa: E501 - Points used to deduct fee. # noqa: E501 + Points used to deduct fee # noqa: E501 :return: The point_fee of this Order. # noqa: E501 :rtype: str @@ -845,7 +845,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this Order. - Points used to deduct fee. # noqa: E501 + Points used to deduct fee # noqa: E501 :param point_fee: The point_fee of this Order. # noqa: E501 :type: str @@ -857,7 +857,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this Order. # noqa: E501 - GT used to deduct fee. # noqa: E501 + GT used to deduct fee # noqa: E501 :return: The gt_fee of this Order. # noqa: E501 :rtype: str @@ -868,7 +868,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this Order. - GT used to deduct fee. # noqa: E501 + GT used to deduct fee # noqa: E501 :param gt_fee: The gt_fee of this Order. # noqa: E501 :type: str @@ -880,7 +880,7 @@ def gt_fee(self, gt_fee): def gt_maker_fee(self): """Gets the gt_maker_fee of this Order. # noqa: E501 - GT used to deduct maker fee. # noqa: E501 + GT amount used to deduct maker fee # noqa: E501 :return: The gt_maker_fee of this Order. # noqa: E501 :rtype: str @@ -891,7 +891,7 @@ def gt_maker_fee(self): def gt_maker_fee(self, gt_maker_fee): """Sets the gt_maker_fee of this Order. - GT used to deduct maker fee. # noqa: E501 + GT amount used to deduct maker fee # noqa: E501 :param gt_maker_fee: The gt_maker_fee of this Order. # noqa: E501 :type: str @@ -903,7 +903,7 @@ def gt_maker_fee(self, gt_maker_fee): def gt_taker_fee(self): """Gets the gt_taker_fee of this Order. # noqa: E501 - GT used to deduct taker fee. # noqa: E501 + GT amount used to deduct taker fee # noqa: E501 :return: The gt_taker_fee of this Order. # noqa: E501 :rtype: str @@ -914,7 +914,7 @@ def gt_taker_fee(self): def gt_taker_fee(self, gt_taker_fee): """Sets the gt_taker_fee of this Order. - GT used to deduct taker fee. # noqa: E501 + GT amount used to deduct taker fee # noqa: E501 :param gt_taker_fee: The gt_taker_fee of this Order. # noqa: E501 :type: str @@ -926,7 +926,7 @@ def gt_taker_fee(self, gt_taker_fee): def gt_discount(self): """Gets the gt_discount of this Order. # noqa: E501 - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :return: The gt_discount of this Order. # noqa: E501 :rtype: bool @@ -937,7 +937,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this Order. - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :param gt_discount: The gt_discount of this Order. # noqa: E501 :type: bool @@ -949,7 +949,7 @@ def gt_discount(self, gt_discount): def rebated_fee(self): """Gets the rebated_fee of this Order. # noqa: E501 - Rebated fee. # noqa: E501 + Rebated fee # noqa: E501 :return: The rebated_fee of this Order. # noqa: E501 :rtype: str @@ -960,7 +960,7 @@ def rebated_fee(self): def rebated_fee(self, rebated_fee): """Sets the rebated_fee of this Order. - Rebated fee. # noqa: E501 + Rebated fee # noqa: E501 :param rebated_fee: The rebated_fee of this Order. # noqa: E501 :type: str @@ -972,7 +972,7 @@ def rebated_fee(self, rebated_fee): def rebated_fee_currency(self): """Gets the rebated_fee_currency of this Order. # noqa: E501 - Rebated fee currency unit. # noqa: E501 + Rebated fee currency unit # noqa: E501 :return: The rebated_fee_currency of this Order. # noqa: E501 :rtype: str @@ -983,7 +983,7 @@ def rebated_fee_currency(self): def rebated_fee_currency(self, rebated_fee_currency): """Sets the rebated_fee_currency of this Order. - Rebated fee currency unit. # noqa: E501 + Rebated fee currency unit # noqa: E501 :param rebated_fee_currency: The rebated_fee_currency of this Order. # noqa: E501 :type: str @@ -1018,7 +1018,7 @@ def stp_id(self, stp_id): def stp_act(self): """Gets the stp_act of this Order. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this Order. # noqa: E501 :rtype: str @@ -1029,7 +1029,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this Order. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this Order. # noqa: E501 :type: str diff --git a/gate_api/models/order_book.py b/gate_api/models/order_book.py index 946e68e..a469fe7 100644 --- a/gate_api/models/order_book.py +++ b/gate_api/models/order_book.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -98,7 +98,7 @@ def id(self, id): def current(self): """Gets the current of this OrderBook. # noqa: E501 - The timestamp of the response data being generated (in milliseconds). # noqa: E501 + The timestamp of the response data being generated (in milliseconds) # noqa: E501 :return: The current of this OrderBook. # noqa: E501 :rtype: int @@ -109,7 +109,7 @@ def current(self): def current(self, current): """Sets the current of this OrderBook. - The timestamp of the response data being generated (in milliseconds). # noqa: E501 + The timestamp of the response data being generated (in milliseconds) # noqa: E501 :param current: The current of this OrderBook. # noqa: E501 :type: int @@ -121,7 +121,7 @@ def current(self, current): def update(self): """Gets the update of this OrderBook. # noqa: E501 - The timestamp of when the orderbook last changed (in milliseconds). # noqa: E501 + The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 :return: The update of this OrderBook. # noqa: E501 :rtype: int @@ -132,7 +132,7 @@ def update(self): def update(self, update): """Sets the update of this OrderBook. - The timestamp of when the orderbook last changed (in milliseconds). # noqa: E501 + The timestamp of when the orderbook last changed (in milliseconds) # noqa: E501 :param update: The update of this OrderBook. # noqa: E501 :type: int @@ -144,7 +144,7 @@ def update(self, update): def asks(self): """Gets the asks of this OrderBook. # noqa: E501 - Asks order depth. # noqa: E501 + Ask Depth # noqa: E501 :return: The asks of this OrderBook. # noqa: E501 :rtype: list[list[str]] @@ -155,7 +155,7 @@ def asks(self): def asks(self, asks): """Sets the asks of this OrderBook. - Asks order depth. # noqa: E501 + Ask Depth # noqa: E501 :param asks: The asks of this OrderBook. # noqa: E501 :type: list[list[str]] @@ -169,7 +169,7 @@ def asks(self, asks): def bids(self): """Gets the bids of this OrderBook. # noqa: E501 - Bids order depth. # noqa: E501 + Bid Depth # noqa: E501 :return: The bids of this OrderBook. # noqa: E501 :rtype: list[list[str]] @@ -180,7 +180,7 @@ def bids(self): def bids(self, bids): """Sets the bids of this OrderBook. - Bids order depth. # noqa: E501 + Bid Depth # noqa: E501 :param bids: The bids of this OrderBook. # noqa: E501 :type: list[list[str]] diff --git a/gate_api/models/order_cancel.py b/gate_api/models/order_cancel.py index 9f3bd10..ba1457e 100644 --- a/gate_api/models/order_cancel.py +++ b/gate_api/models/order_cancel.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -244,7 +244,7 @@ def __init__(self, id=None, text=None, amend_text=None, succeeded=None, label=No def id(self): """Gets the id of this OrderCancel. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this OrderCancel. # noqa: E501 :rtype: str @@ -255,7 +255,7 @@ def id(self): def id(self, id): """Sets the id of this OrderCancel. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this OrderCancel. # noqa: E501 :type: str @@ -290,7 +290,7 @@ def text(self, text): def amend_text(self): """Gets the amend_text of this OrderCancel. # noqa: E501 - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :return: The amend_text of this OrderCancel. # noqa: E501 :rtype: str @@ -301,7 +301,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this OrderCancel. - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :param amend_text: The amend_text of this OrderCancel. # noqa: E501 :type: str @@ -313,7 +313,7 @@ def amend_text(self, amend_text): def succeeded(self): """Gets the succeeded of this OrderCancel. # noqa: E501 - Whether the batch of orders succeeded. # noqa: E501 + Request execution result # noqa: E501 :return: The succeeded of this OrderCancel. # noqa: E501 :rtype: bool @@ -324,7 +324,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this OrderCancel. - Whether the batch of orders succeeded. # noqa: E501 + Request execution result # noqa: E501 :param succeeded: The succeeded of this OrderCancel. # noqa: E501 :type: bool @@ -336,7 +336,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this OrderCancel. # noqa: E501 - Error label, if any, otherwise an empty string. # noqa: E501 + Error label, if any, otherwise an empty string # noqa: E501 :return: The label of this OrderCancel. # noqa: E501 :rtype: str @@ -347,7 +347,7 @@ def label(self): def label(self, label): """Sets the label of this OrderCancel. - Error label, if any, otherwise an empty string. # noqa: E501 + Error label, if any, otherwise an empty string # noqa: E501 :param label: The label of this OrderCancel. # noqa: E501 :type: str @@ -359,7 +359,7 @@ def label(self, label): def message(self): """Gets the message of this OrderCancel. # noqa: E501 - Detailed error message, if any, otherwise an empty string. # noqa: E501 + Detailed error message, if any, otherwise an empty string # noqa: E501 :return: The message of this OrderCancel. # noqa: E501 :rtype: str @@ -370,7 +370,7 @@ def message(self): def message(self, message): """Sets the message of this OrderCancel. - Detailed error message, if any, otherwise an empty string. # noqa: E501 + Detailed error message, if any, otherwise an empty string # noqa: E501 :param message: The message of this OrderCancel. # noqa: E501 :type: str @@ -382,7 +382,7 @@ def message(self, message): def create_time(self): """Gets the create_time of this OrderCancel. # noqa: E501 - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :return: The create_time of this OrderCancel. # noqa: E501 :rtype: str @@ -393,7 +393,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this OrderCancel. - Creation time of order. # noqa: E501 + Creation time of order # noqa: E501 :param create_time: The create_time of this OrderCancel. # noqa: E501 :type: str @@ -405,7 +405,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this OrderCancel. # noqa: E501 - Last modification time of order. # noqa: E501 + Last modification time of order # noqa: E501 :return: The update_time of this OrderCancel. # noqa: E501 :rtype: str @@ -416,7 +416,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this OrderCancel. - Last modification time of order. # noqa: E501 + Last modification time of order # noqa: E501 :param update_time: The update_time of this OrderCancel. # noqa: E501 :type: str @@ -428,7 +428,7 @@ def update_time(self, update_time): def create_time_ms(self): """Gets the create_time_ms of this OrderCancel. # noqa: E501 - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :return: The create_time_ms of this OrderCancel. # noqa: E501 :rtype: int @@ -439,7 +439,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this OrderCancel. - Creation time of order (in milliseconds). # noqa: E501 + Creation time of order (in milliseconds) # noqa: E501 :param create_time_ms: The create_time_ms of this OrderCancel. # noqa: E501 :type: int @@ -451,7 +451,7 @@ def create_time_ms(self, create_time_ms): def update_time_ms(self): """Gets the update_time_ms of this OrderCancel. # noqa: E501 - Last modification time of order (in milliseconds). # noqa: E501 + Last modification time of order (in milliseconds) # noqa: E501 :return: The update_time_ms of this OrderCancel. # noqa: E501 :rtype: int @@ -462,7 +462,7 @@ def update_time_ms(self): def update_time_ms(self, update_time_ms): """Sets the update_time_ms of this OrderCancel. - Last modification time of order (in milliseconds). # noqa: E501 + Last modification time of order (in milliseconds) # noqa: E501 :param update_time_ms: The update_time_ms of this OrderCancel. # noqa: E501 :type: int @@ -503,7 +503,7 @@ def status(self, status): def currency_pair(self): """Gets the currency_pair of this OrderCancel. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this OrderCancel. # noqa: E501 :rtype: str @@ -514,7 +514,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this OrderCancel. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this OrderCancel. # noqa: E501 :type: str @@ -580,7 +580,7 @@ def account(self, account): def side(self): """Gets the side of this OrderCancel. # noqa: E501 - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this OrderCancel. # noqa: E501 :rtype: str @@ -591,7 +591,7 @@ def side(self): def side(self, side): """Sets the side of this OrderCancel. - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this OrderCancel. # noqa: E501 :type: str @@ -611,7 +611,7 @@ def side(self, side): def amount(self): """Gets the amount of this OrderCancel. # noqa: E501 - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501 :return: The amount of this OrderCancel. # noqa: E501 :rtype: str @@ -622,7 +622,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this OrderCancel. - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501 :param amount: The amount of this OrderCancel. # noqa: E501 :type: str @@ -636,7 +636,7 @@ def amount(self, amount): def price(self): """Gets the price of this OrderCancel. # noqa: E501 - Price can't be empty when `type`= `limit`. # noqa: E501 + Trading price, required when `type`=`limit` # noqa: E501 :return: The price of this OrderCancel. # noqa: E501 :rtype: str @@ -647,7 +647,7 @@ def price(self): def price(self, price): """Sets the price of this OrderCancel. - Price can't be empty when `type`= `limit`. # noqa: E501 + Trading price, required when `type`=`limit` # noqa: E501 :param price: The price of this OrderCancel. # noqa: E501 :type: str @@ -688,7 +688,7 @@ def time_in_force(self, time_in_force): def iceberg(self): """Gets the iceberg of this OrderCancel. # noqa: E501 - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501 :return: The iceberg of this OrderCancel. # noqa: E501 :rtype: str @@ -699,7 +699,7 @@ def iceberg(self): def iceberg(self, iceberg): """Sets the iceberg of this OrderCancel. - Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. # noqa: E501 + Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported # noqa: E501 :param iceberg: The iceberg of this OrderCancel. # noqa: E501 :type: str @@ -711,7 +711,7 @@ def iceberg(self, iceberg): def auto_borrow(self): """Gets the auto_borrow of this OrderCancel. # noqa: E501 - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501 :return: The auto_borrow of this OrderCancel. # noqa: E501 :rtype: bool @@ -722,7 +722,7 @@ def auto_borrow(self): def auto_borrow(self, auto_borrow): """Sets the auto_borrow of this OrderCancel. - Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. # noqa: E501 + Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough # noqa: E501 :param auto_borrow: The auto_borrow of this OrderCancel. # noqa: E501 :type: bool @@ -734,7 +734,7 @@ def auto_borrow(self, auto_borrow): def auto_repay(self): """Gets the auto_repay of this OrderCancel. # noqa: E501 - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order # noqa: E501 :return: The auto_repay of this OrderCancel. # noqa: E501 :rtype: bool @@ -745,7 +745,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this OrderCancel. - Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order. # noqa: E501 + Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order # noqa: E501 :param auto_repay: The auto_repay of this OrderCancel. # noqa: E501 :type: bool @@ -757,7 +757,7 @@ def auto_repay(self, auto_repay): def left(self): """Gets the left of this OrderCancel. # noqa: E501 - Amount left to fill. # noqa: E501 + Amount left to fill # noqa: E501 :return: The left of this OrderCancel. # noqa: E501 :rtype: str @@ -768,7 +768,7 @@ def left(self): def left(self, left): """Sets the left of this OrderCancel. - Amount left to fill. # noqa: E501 + Amount left to fill # noqa: E501 :param left: The left of this OrderCancel. # noqa: E501 :type: str @@ -780,7 +780,7 @@ def left(self, left): def filled_amount(self): """Gets the filled_amount of this OrderCancel. # noqa: E501 - Amount traded to fill. # noqa: E501 + Amount filled # noqa: E501 :return: The filled_amount of this OrderCancel. # noqa: E501 :rtype: str @@ -791,7 +791,7 @@ def filled_amount(self): def filled_amount(self, filled_amount): """Sets the filled_amount of this OrderCancel. - Amount traded to fill. # noqa: E501 + Amount filled # noqa: E501 :param filled_amount: The filled_amount of this OrderCancel. # noqa: E501 :type: str @@ -803,7 +803,7 @@ def filled_amount(self, filled_amount): def fill_price(self): """Gets the fill_price of this OrderCancel. # noqa: E501 - Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 :return: The fill_price of this OrderCancel. # noqa: E501 :rtype: str @@ -814,7 +814,7 @@ def fill_price(self): def fill_price(self, fill_price): """Sets the fill_price of this OrderCancel. - Total filled in quote currency. Deprecated in favor of `filled_total`. # noqa: E501 + Total filled in quote currency. Deprecated in favor of `filled_total` # noqa: E501 :param fill_price: The fill_price of this OrderCancel. # noqa: E501 :type: str @@ -826,7 +826,7 @@ def fill_price(self, fill_price): def filled_total(self): """Gets the filled_total of this OrderCancel. # noqa: E501 - Total filled in quote currency. # noqa: E501 + Total filled in quote currency # noqa: E501 :return: The filled_total of this OrderCancel. # noqa: E501 :rtype: str @@ -837,7 +837,7 @@ def filled_total(self): def filled_total(self, filled_total): """Sets the filled_total of this OrderCancel. - Total filled in quote currency. # noqa: E501 + Total filled in quote currency # noqa: E501 :param filled_total: The filled_total of this OrderCancel. # noqa: E501 :type: str @@ -849,7 +849,7 @@ def filled_total(self, filled_total): def avg_deal_price(self): """Gets the avg_deal_price of this OrderCancel. # noqa: E501 - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :return: The avg_deal_price of this OrderCancel. # noqa: E501 :rtype: str @@ -860,7 +860,7 @@ def avg_deal_price(self): def avg_deal_price(self, avg_deal_price): """Sets the avg_deal_price of this OrderCancel. - Average fill price. # noqa: E501 + Average fill price # noqa: E501 :param avg_deal_price: The avg_deal_price of this OrderCancel. # noqa: E501 :type: str @@ -872,7 +872,7 @@ def avg_deal_price(self, avg_deal_price): def fee(self): """Gets the fee of this OrderCancel. # noqa: E501 - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :return: The fee of this OrderCancel. # noqa: E501 :rtype: str @@ -883,7 +883,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this OrderCancel. - Fee deducted. # noqa: E501 + Fee deducted # noqa: E501 :param fee: The fee of this OrderCancel. # noqa: E501 :type: str @@ -895,7 +895,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this OrderCancel. # noqa: E501 - Fee currency unit. # noqa: E501 + Fee currency unit # noqa: E501 :return: The fee_currency of this OrderCancel. # noqa: E501 :rtype: str @@ -906,7 +906,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this OrderCancel. - Fee currency unit. # noqa: E501 + Fee currency unit # noqa: E501 :param fee_currency: The fee_currency of this OrderCancel. # noqa: E501 :type: str @@ -918,7 +918,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this OrderCancel. # noqa: E501 - Points used to deduct fee. # noqa: E501 + Points used to deduct fee # noqa: E501 :return: The point_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -929,7 +929,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this OrderCancel. - Points used to deduct fee. # noqa: E501 + Points used to deduct fee # noqa: E501 :param point_fee: The point_fee of this OrderCancel. # noqa: E501 :type: str @@ -941,7 +941,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this OrderCancel. # noqa: E501 - GT used to deduct fee. # noqa: E501 + GT used to deduct fee # noqa: E501 :return: The gt_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -952,7 +952,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this OrderCancel. - GT used to deduct fee. # noqa: E501 + GT used to deduct fee # noqa: E501 :param gt_fee: The gt_fee of this OrderCancel. # noqa: E501 :type: str @@ -964,7 +964,7 @@ def gt_fee(self, gt_fee): def gt_maker_fee(self): """Gets the gt_maker_fee of this OrderCancel. # noqa: E501 - GT used to deduct maker fee. # noqa: E501 + GT amount used to deduct maker fee # noqa: E501 :return: The gt_maker_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -975,7 +975,7 @@ def gt_maker_fee(self): def gt_maker_fee(self, gt_maker_fee): """Sets the gt_maker_fee of this OrderCancel. - GT used to deduct maker fee. # noqa: E501 + GT amount used to deduct maker fee # noqa: E501 :param gt_maker_fee: The gt_maker_fee of this OrderCancel. # noqa: E501 :type: str @@ -987,7 +987,7 @@ def gt_maker_fee(self, gt_maker_fee): def gt_taker_fee(self): """Gets the gt_taker_fee of this OrderCancel. # noqa: E501 - GT used to deduct taker fee. # noqa: E501 + GT amount used to deduct taker fee # noqa: E501 :return: The gt_taker_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -998,7 +998,7 @@ def gt_taker_fee(self): def gt_taker_fee(self, gt_taker_fee): """Sets the gt_taker_fee of this OrderCancel. - GT used to deduct taker fee. # noqa: E501 + GT amount used to deduct taker fee # noqa: E501 :param gt_taker_fee: The gt_taker_fee of this OrderCancel. # noqa: E501 :type: str @@ -1010,7 +1010,7 @@ def gt_taker_fee(self, gt_taker_fee): def gt_discount(self): """Gets the gt_discount of this OrderCancel. # noqa: E501 - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :return: The gt_discount of this OrderCancel. # noqa: E501 :rtype: bool @@ -1021,7 +1021,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this OrderCancel. - Whether GT fee discount is used. # noqa: E501 + Whether GT fee deduction is enabled # noqa: E501 :param gt_discount: The gt_discount of this OrderCancel. # noqa: E501 :type: bool @@ -1033,7 +1033,7 @@ def gt_discount(self, gt_discount): def rebated_fee(self): """Gets the rebated_fee of this OrderCancel. # noqa: E501 - Rebated fee. # noqa: E501 + Rebated fee # noqa: E501 :return: The rebated_fee of this OrderCancel. # noqa: E501 :rtype: str @@ -1044,7 +1044,7 @@ def rebated_fee(self): def rebated_fee(self, rebated_fee): """Sets the rebated_fee of this OrderCancel. - Rebated fee. # noqa: E501 + Rebated fee # noqa: E501 :param rebated_fee: The rebated_fee of this OrderCancel. # noqa: E501 :type: str @@ -1056,7 +1056,7 @@ def rebated_fee(self, rebated_fee): def rebated_fee_currency(self): """Gets the rebated_fee_currency of this OrderCancel. # noqa: E501 - Rebated fee currency unit. # noqa: E501 + Rebated fee currency unit # noqa: E501 :return: The rebated_fee_currency of this OrderCancel. # noqa: E501 :rtype: str @@ -1067,7 +1067,7 @@ def rebated_fee_currency(self): def rebated_fee_currency(self, rebated_fee_currency): """Sets the rebated_fee_currency of this OrderCancel. - Rebated fee currency unit. # noqa: E501 + Rebated fee currency unit # noqa: E501 :param rebated_fee_currency: The rebated_fee_currency of this OrderCancel. # noqa: E501 :type: str @@ -1102,7 +1102,7 @@ def stp_id(self, stp_id): def stp_act(self): """Gets the stp_act of this OrderCancel. # noqa: E501 - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :return: The stp_act of this OrderCancel. # noqa: E501 :rtype: str @@ -1113,7 +1113,7 @@ def stp_act(self): def stp_act(self, stp_act): """Sets the stp_act of this OrderCancel. - Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, new ones - cb: Cancel both, Both old and new orders will be cancelled # noqa: E501 + Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled # noqa: E501 :param stp_act: The stp_act of this OrderCancel. # noqa: E501 :type: str diff --git a/gate_api/models/order_patch.py b/gate_api/models/order_patch.py index fcba399..8e59035 100644 --- a/gate_api/models/order_patch.py +++ b/gate_api/models/order_patch.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, currency_pair=None, account=None, amount=None, price=None, am def currency_pair(self): """Gets the currency_pair of this OrderPatch. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this OrderPatch. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this OrderPatch. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this OrderPatch. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency_pair(self, currency_pair): def account(self): """Gets the account of this OrderPatch. # noqa: E501 - Specify query account. # noqa: E501 + Specify query account # noqa: E501 :return: The account of this OrderPatch. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def account(self): def account(self, account): """Sets the account of this OrderPatch. - Specify query account. # noqa: E501 + Specify query account # noqa: E501 :param account: The account of this OrderPatch. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def account(self, account): def amount(self): """Gets the amount of this OrderPatch. # noqa: E501 - Trading Quantity. Either amountor pricemust be specified. # noqa: E501 + Trading quantity. Either `amount` or `price` must be specified # noqa: E501 :return: The amount of this OrderPatch. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this OrderPatch. - Trading Quantity. Either amountor pricemust be specified. # noqa: E501 + Trading quantity. Either `amount` or `price` must be specified # noqa: E501 :param amount: The amount of this OrderPatch. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def amount(self, amount): def price(self): """Gets the price of this OrderPatch. # noqa: E501 - Trading Price. Either amountor pricemust be specified. # noqa: E501 + Trading price. Either `amount` or `price` must be specified # noqa: E501 :return: The price of this OrderPatch. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def price(self): def price(self, price): """Sets the price of this OrderPatch. - Trading Price. Either amountor pricemust be specified. # noqa: E501 + Trading price. Either `amount` or `price` must be specified # noqa: E501 :param price: The price of this OrderPatch. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def price(self, price): def amend_text(self): """Gets the amend_text of this OrderPatch. # noqa: E501 - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :return: The amend_text of this OrderPatch. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this OrderPatch. - Custom info during amending order. # noqa: E501 + Custom info during order amendment # noqa: E501 :param amend_text: The amend_text of this OrderPatch. # noqa: E501 :type: str diff --git a/gate_api/models/order_resp.py b/gate_api/models/order_resp.py index 74219a0..c95612a 100644 --- a/gate_api/models/order_resp.py +++ b/gate_api/models/order_resp.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 def order_id(self): """Gets the order_id of this OrderResp. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this OrderResp. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this OrderResp. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this OrderResp. # noqa: E501 :type: int diff --git a/gate_api/models/partner_commission_history.py b/gate_api/models/partner_commission_history.py index 87e129a..77c0d2f 100644 --- a/gate_api/models/partner_commission_history.py +++ b/gate_api/models/partner_commission_history.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this PartnerCommissionHistory. # noqa: E501 - Total. # noqa: E501 + Total # noqa: E501 :return: The total of this PartnerCommissionHistory. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this PartnerCommissionHistory. - Total. # noqa: E501 + Total # noqa: E501 :param total: The total of this PartnerCommissionHistory. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this PartnerCommissionHistory. # noqa: E501 - List of comission history. # noqa: E501 + List of commission history # noqa: E501 :return: The list of this PartnerCommissionHistory. # noqa: E501 :rtype: list[AgencyCommission] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this PartnerCommissionHistory. - List of comission history. # noqa: E501 + List of commission history # noqa: E501 :param list: The list of this PartnerCommissionHistory. # noqa: E501 :type: list[AgencyCommission] diff --git a/gate_api/models/partner_sub.py b/gate_api/models/partner_sub.py index e2ef8fd..c82d656 100644 --- a/gate_api/models/partner_sub.py +++ b/gate_api/models/partner_sub.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, user_id=None, user_join_time=None, type=None, local_vars_conf def user_id(self): """Gets the user_id of this PartnerSub. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this PartnerSub. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this PartnerSub. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this PartnerSub. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def user_id(self, user_id): def user_join_time(self): """Gets the user_join_time of this PartnerSub. # noqa: E501 - The time when the user joined the system, in seconds Unix timestamp. # noqa: E501 + Time when user joined the system, Unix timestamp in seconds # noqa: E501 :return: The user_join_time of this PartnerSub. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def user_join_time(self): def user_join_time(self, user_join_time): """Sets the user_join_time of this PartnerSub. - The time when the user joined the system, in seconds Unix timestamp. # noqa: E501 + Time when user joined the system, Unix timestamp in seconds # noqa: E501 :param user_join_time: The user_join_time of this PartnerSub. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def user_join_time(self, user_join_time): def type(self): """Gets the type of this PartnerSub. # noqa: E501 - Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer). # noqa: E501 + Type (1-Sub-agent 2-Indirect direct customer 3-Direct direct customer) # noqa: E501 :return: The type of this PartnerSub. # noqa: E501 :rtype: int @@ -124,7 +124,7 @@ def type(self): def type(self, type): """Sets the type of this PartnerSub. - Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer). # noqa: E501 + Type (1-Sub-agent 2-Indirect direct customer 3-Direct direct customer) # noqa: E501 :param type: The type of this PartnerSub. # noqa: E501 :type: int diff --git a/gate_api/models/partner_sub_list.py b/gate_api/models/partner_sub_list.py index ef5fe38..9dec1e4 100644 --- a/gate_api/models/partner_sub_list.py +++ b/gate_api/models/partner_sub_list.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this PartnerSubList. # noqa: E501 - Total. # noqa: E501 + Total # noqa: E501 :return: The total of this PartnerSubList. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this PartnerSubList. - Total. # noqa: E501 + Total # noqa: E501 :param total: The total of this PartnerSubList. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this PartnerSubList. # noqa: E501 - Subordinate list. # noqa: E501 + Subordinate list # noqa: E501 :return: The list of this PartnerSubList. # noqa: E501 :rtype: list[PartnerSub] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this PartnerSubList. - Subordinate list. # noqa: E501 + Subordinate list # noqa: E501 :param list: The list of this PartnerSubList. # noqa: E501 :type: list[PartnerSub] diff --git a/gate_api/models/partner_transaction_history.py b/gate_api/models/partner_transaction_history.py index b21c729..3939e41 100644 --- a/gate_api/models/partner_transaction_history.py +++ b/gate_api/models/partner_transaction_history.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, total=None, list=None, local_vars_configuration=None): # noq def total(self): """Gets the total of this PartnerTransactionHistory. # noqa: E501 - Total. # noqa: E501 + Total # noqa: E501 :return: The total of this PartnerTransactionHistory. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def total(self): def total(self, total): """Sets the total of this PartnerTransactionHistory. - Total. # noqa: E501 + Total # noqa: E501 :param total: The total of this PartnerTransactionHistory. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def total(self, total): def list(self): """Gets the list of this PartnerTransactionHistory. # noqa: E501 - List of transaction history. # noqa: E501 + List of transaction history # noqa: E501 :return: The list of this PartnerTransactionHistory. # noqa: E501 :rtype: list[AgencyTransaction] @@ -96,7 +96,7 @@ def list(self): def list(self, list): """Sets the list of this PartnerTransactionHistory. - List of transaction history. # noqa: E501 + List of transaction history # noqa: E501 :param list: The list of this PartnerTransactionHistory. # noqa: E501 :type: list[AgencyTransaction] diff --git a/gate_api/models/patch_uni_lend.py b/gate_api/models/patch_uni_lend.py index c076441..82e3a19 100644 --- a/gate_api/models/patch_uni_lend.py +++ b/gate_api/models/patch_uni_lend.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, min_rate=None, local_vars_configuration=None): def currency(self): """Gets the currency of this PatchUniLend. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this PatchUniLend. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this PatchUniLend. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this PatchUniLend. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def min_rate(self): """Gets the min_rate of this PatchUniLend. # noqa: E501 - Minimum interest rate. # noqa: E501 + Minimum interest rate # noqa: E501 :return: The min_rate of this PatchUniLend. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def min_rate(self): def min_rate(self, min_rate): """Sets the min_rate of this PatchUniLend. - Minimum interest rate. # noqa: E501 + Minimum interest rate # noqa: E501 :param min_rate: The min_rate of this PatchUniLend. # 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 701708f..46346c1 100644 --- a/gate_api/models/place_dual_investment_order.py +++ b/gate_api/models/place_dual_investment_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -65,7 +65,7 @@ def __init__(self, plan_id=None, amount=None, text=None, local_vars_configuratio def plan_id(self): """Gets the plan_id of this PlaceDualInvestmentOrder. # noqa: E501 - Plan ID. # noqa: E501 + Product ID # noqa: E501 :return: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 :rtype: str @@ -76,7 +76,7 @@ def plan_id(self): def plan_id(self, plan_id): """Sets the plan_id of this PlaceDualInvestmentOrder. - Plan ID. # noqa: E501 + Product ID # noqa: E501 :param plan_id: The plan_id of this PlaceDualInvestmentOrder. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def plan_id(self, plan_id): def amount(self): """Gets the amount of this PlaceDualInvestmentOrder. # noqa: E501 - Subscription amount, mutually exclusive with the copies field. # noqa: E501 + Subscription amount, mutually exclusive with copies field # noqa: E501 :return: The amount of this PlaceDualInvestmentOrder. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this PlaceDualInvestmentOrder. - Subscription amount, mutually exclusive with the copies field. # noqa: E501 + Subscription amount, mutually exclusive with copies field # noqa: E501 :param amount: The amount of this PlaceDualInvestmentOrder. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def amount(self, amount): def text(self): """Gets the text of this PlaceDualInvestmentOrder. # noqa: E501 - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 :return: The text of this PlaceDualInvestmentOrder. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def text(self): def text(self, text): """Sets the text of this PlaceDualInvestmentOrder. - User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) # noqa: E501 + Order custom information. Users can set custom ID with this field. Custom fields must meet the following conditions: 1. Must start with `t-` 2. Excluding `t-`, length cannot exceed 28 bytes 3. Can only contain numbers, letters, underscore(_), hyphen(-) or dot(.) # noqa: E501 :param text: The text of this PlaceDualInvestmentOrder. # noqa: E501 :type: str diff --git a/gate_api/models/position.py b/gate_api/models/position.py index 9195ee8..e14210a 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -216,7 +216,7 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi def user(self): """Gets the user of this Position. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this Position. # noqa: E501 :rtype: int @@ -227,7 +227,7 @@ def user(self): def user(self, user): """Sets the user of this Position. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this Position. # noqa: E501 :type: int @@ -239,7 +239,7 @@ def user(self, user): def contract(self): """Gets the contract of this Position. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this Position. # noqa: E501 :rtype: str @@ -250,7 +250,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this Position. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this Position. # noqa: E501 :type: str @@ -262,7 +262,7 @@ def contract(self, contract): def size(self): """Gets the size of this Position. # noqa: E501 - Position size. # noqa: E501 + Position size # noqa: E501 :return: The size of this Position. # noqa: E501 :rtype: int @@ -273,7 +273,7 @@ def size(self): def size(self, size): """Sets the size of this Position. - Position size. # noqa: E501 + Position size # noqa: E501 :param size: The size of this Position. # noqa: E501 :type: int @@ -308,7 +308,7 @@ def leverage(self, leverage): def risk_limit(self): """Gets the risk_limit of this Position. # noqa: E501 - Position risk limit. # noqa: E501 + Position risk limit # noqa: E501 :return: The risk_limit of this Position. # noqa: E501 :rtype: str @@ -319,7 +319,7 @@ def risk_limit(self): def risk_limit(self, risk_limit): """Sets the risk_limit of this Position. - Position risk limit. # noqa: E501 + Position risk limit # noqa: E501 :param risk_limit: The risk_limit of this Position. # noqa: E501 :type: str @@ -331,7 +331,7 @@ def risk_limit(self, risk_limit): def leverage_max(self): """Gets the leverage_max of this Position. # noqa: E501 - Maximum leverage under current risk limit. # noqa: E501 + Maximum leverage under current risk limit # noqa: E501 :return: The leverage_max of this Position. # noqa: E501 :rtype: str @@ -342,7 +342,7 @@ def leverage_max(self): def leverage_max(self, leverage_max): """Sets the leverage_max of this Position. - Maximum leverage under current risk limit. # noqa: E501 + Maximum leverage under current risk limit # noqa: E501 :param leverage_max: The leverage_max of this Position. # noqa: E501 :type: str @@ -354,7 +354,7 @@ def leverage_max(self, leverage_max): def maintenance_rate(self): """Gets the maintenance_rate of this Position. # noqa: E501 - Maintenance rate under current risk limit. # noqa: E501 + Maintenance rate under current risk limit # noqa: E501 :return: The maintenance_rate of this Position. # noqa: E501 :rtype: str @@ -365,7 +365,7 @@ def maintenance_rate(self): def maintenance_rate(self, maintenance_rate): """Sets the maintenance_rate of this Position. - Maintenance rate under current risk limit. # noqa: E501 + Maintenance rate under current risk limit # noqa: E501 :param maintenance_rate: The maintenance_rate of this Position. # noqa: E501 :type: str @@ -377,7 +377,7 @@ def maintenance_rate(self, maintenance_rate): def value(self): """Gets the value of this Position. # noqa: E501 - Position value calculated in settlement currency. # noqa: E501 + Position value calculated in settlement currency # noqa: E501 :return: The value of this Position. # noqa: E501 :rtype: str @@ -388,7 +388,7 @@ def value(self): def value(self, value): """Sets the value of this Position. - Position value calculated in settlement currency. # noqa: E501 + Position value calculated in settlement currency # noqa: E501 :param value: The value of this Position. # noqa: E501 :type: str @@ -400,7 +400,7 @@ def value(self, value): def margin(self): """Gets the margin of this Position. # noqa: E501 - Position margin. # noqa: E501 + Position margin # noqa: E501 :return: The margin of this Position. # noqa: E501 :rtype: str @@ -411,7 +411,7 @@ def margin(self): def margin(self, margin): """Sets the margin of this Position. - Position margin. # noqa: E501 + Position margin # noqa: E501 :param margin: The margin of this Position. # noqa: E501 :type: str @@ -423,7 +423,7 @@ def margin(self, margin): def entry_price(self): """Gets the entry_price of this Position. # noqa: E501 - Entry price. # noqa: E501 + Entry price # noqa: E501 :return: The entry_price of this Position. # noqa: E501 :rtype: str @@ -434,7 +434,7 @@ def entry_price(self): def entry_price(self, entry_price): """Sets the entry_price of this Position. - Entry price. # noqa: E501 + Entry price # noqa: E501 :param entry_price: The entry_price of this Position. # noqa: E501 :type: str @@ -446,7 +446,7 @@ def entry_price(self, entry_price): def liq_price(self): """Gets the liq_price of this Position. # noqa: E501 - Liquidation price. # noqa: E501 + Liquidation price # noqa: E501 :return: The liq_price of this Position. # noqa: E501 :rtype: str @@ -457,7 +457,7 @@ def liq_price(self): def liq_price(self, liq_price): """Sets the liq_price of this Position. - Liquidation price. # noqa: E501 + Liquidation price # noqa: E501 :param liq_price: The liq_price of this Position. # noqa: E501 :type: str @@ -469,7 +469,7 @@ def liq_price(self, liq_price): def mark_price(self): """Gets the mark_price of this Position. # noqa: E501 - Current mark price. # noqa: E501 + Current mark price # noqa: E501 :return: The mark_price of this Position. # noqa: E501 :rtype: str @@ -480,7 +480,7 @@ def mark_price(self): def mark_price(self, mark_price): """Sets the mark_price of this Position. - Current mark price. # noqa: E501 + Current mark price # noqa: E501 :param mark_price: The mark_price of this Position. # noqa: E501 :type: str @@ -538,7 +538,7 @@ def maintenance_margin(self, maintenance_margin): def unrealised_pnl(self): """Gets the unrealised_pnl of this Position. # noqa: E501 - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :return: The unrealised_pnl of this Position. # noqa: E501 :rtype: str @@ -549,7 +549,7 @@ def unrealised_pnl(self): def unrealised_pnl(self, unrealised_pnl): """Sets the unrealised_pnl of this Position. - Unrealized PNL. # noqa: E501 + Unrealized PNL # noqa: E501 :param unrealised_pnl: The unrealised_pnl of this Position. # noqa: E501 :type: str @@ -561,7 +561,7 @@ def unrealised_pnl(self, unrealised_pnl): def realised_pnl(self): """Gets the realised_pnl of this Position. # noqa: E501 - Realized PNL. # noqa: E501 + Realized PnL # noqa: E501 :return: The realised_pnl of this Position. # noqa: E501 :rtype: str @@ -572,7 +572,7 @@ def realised_pnl(self): def realised_pnl(self, realised_pnl): """Sets the realised_pnl of this Position. - Realized PNL. # noqa: E501 + Realized PnL # noqa: E501 :param realised_pnl: The realised_pnl of this Position. # noqa: E501 :type: str @@ -584,7 +584,7 @@ def realised_pnl(self, realised_pnl): def pnl_pnl(self): """Gets the pnl_pnl of this Position. # noqa: E501 - Realized PNL - Position P/L. # noqa: E501 + Realized PNL - Position P/L # noqa: E501 :return: The pnl_pnl of this Position. # noqa: E501 :rtype: str @@ -595,7 +595,7 @@ def pnl_pnl(self): def pnl_pnl(self, pnl_pnl): """Sets the pnl_pnl of this Position. - Realized PNL - Position P/L. # noqa: E501 + Realized PNL - Position P/L # noqa: E501 :param pnl_pnl: The pnl_pnl of this Position. # noqa: E501 :type: str @@ -607,7 +607,7 @@ def pnl_pnl(self, pnl_pnl): def pnl_fund(self): """Gets the pnl_fund of this Position. # noqa: E501 - Realized PNL - Funding Fees. # noqa: E501 + Realized PNL - Funding Fees # noqa: E501 :return: The pnl_fund of this Position. # noqa: E501 :rtype: str @@ -618,7 +618,7 @@ def pnl_fund(self): def pnl_fund(self, pnl_fund): """Sets the pnl_fund of this Position. - Realized PNL - Funding Fees. # noqa: E501 + Realized PNL - Funding Fees # noqa: E501 :param pnl_fund: The pnl_fund of this Position. # noqa: E501 :type: str @@ -630,7 +630,7 @@ def pnl_fund(self, pnl_fund): def pnl_fee(self): """Gets the pnl_fee of this Position. # noqa: E501 - Realized PNL - Transaction Fees. # noqa: E501 + Realized PNL - Transaction Fees # noqa: E501 :return: The pnl_fee of this Position. # noqa: E501 :rtype: str @@ -641,7 +641,7 @@ def pnl_fee(self): def pnl_fee(self, pnl_fee): """Sets the pnl_fee of this Position. - Realized PNL - Transaction Fees. # noqa: E501 + Realized PNL - Transaction Fees # noqa: E501 :param pnl_fee: The pnl_fee of this Position. # noqa: E501 :type: str @@ -653,7 +653,7 @@ def pnl_fee(self, pnl_fee): def history_pnl(self): """Gets the history_pnl of this Position. # noqa: E501 - History realized PNL. # noqa: E501 + Total realized PnL from closed positions # noqa: E501 :return: The history_pnl of this Position. # noqa: E501 :rtype: str @@ -664,7 +664,7 @@ def history_pnl(self): def history_pnl(self, history_pnl): """Sets the history_pnl of this Position. - History realized PNL. # noqa: E501 + Total realized PnL from closed positions # noqa: E501 :param history_pnl: The history_pnl of this Position. # noqa: E501 :type: str @@ -676,7 +676,7 @@ def history_pnl(self, history_pnl): def last_close_pnl(self): """Gets the last_close_pnl of this Position. # noqa: E501 - PNL of last position close. # noqa: E501 + PNL of last position close # noqa: E501 :return: The last_close_pnl of this Position. # noqa: E501 :rtype: str @@ -687,7 +687,7 @@ def last_close_pnl(self): def last_close_pnl(self, last_close_pnl): """Sets the last_close_pnl of this Position. - PNL of last position close. # noqa: E501 + PNL of last position close # noqa: E501 :param last_close_pnl: The last_close_pnl of this Position. # noqa: E501 :type: str @@ -699,7 +699,7 @@ def last_close_pnl(self, last_close_pnl): def realised_point(self): """Gets the realised_point of this Position. # noqa: E501 - Realized POINT PNL. # noqa: E501 + Realized POINT PNL # noqa: E501 :return: The realised_point of this Position. # noqa: E501 :rtype: str @@ -710,7 +710,7 @@ def realised_point(self): def realised_point(self, realised_point): """Sets the realised_point of this Position. - Realized POINT PNL. # noqa: E501 + Realized POINT PNL # noqa: E501 :param realised_point: The realised_point of this Position. # noqa: E501 :type: str @@ -722,7 +722,7 @@ def realised_point(self, realised_point): def history_point(self): """Gets the history_point of this Position. # noqa: E501 - History realized POINT PNL. # noqa: E501 + History realized POINT PNL # noqa: E501 :return: The history_point of this Position. # noqa: E501 :rtype: str @@ -733,7 +733,7 @@ def history_point(self): def history_point(self, history_point): """Sets the history_point of this Position. - History realized POINT PNL. # noqa: E501 + History realized POINT PNL # noqa: E501 :param history_point: The history_point of this Position. # noqa: E501 :type: str @@ -768,7 +768,7 @@ def adl_ranking(self, adl_ranking): def pending_orders(self): """Gets the pending_orders of this Position. # noqa: E501 - Current open orders. # noqa: E501 + Current pending order quantity # noqa: E501 :return: The pending_orders of this Position. # noqa: E501 :rtype: int @@ -779,7 +779,7 @@ def pending_orders(self): def pending_orders(self, pending_orders): """Sets the pending_orders of this Position. - Current open orders. # noqa: E501 + Current pending order quantity # noqa: E501 :param pending_orders: The pending_orders of this Position. # noqa: E501 :type: int @@ -812,7 +812,7 @@ def close_order(self, close_order): def mode(self): """Gets the mode of this Position. # noqa: E501 - Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: mode # noqa: E501 + Position mode, including: - `single`: Single position mode - `dual_long`: Long position in dual position mode - `dual_short`: Short position in dual position mode # noqa: E501 :return: The mode of this Position. # noqa: E501 :rtype: str @@ -823,7 +823,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this Position. - Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: mode # noqa: E501 + Position mode, including: - `single`: Single position mode - `dual_long`: Long position in dual position mode - `dual_short`: Short position in dual position mode # noqa: E501 :param mode: The mode of this Position. # noqa: E501 :type: str @@ -841,7 +841,7 @@ def mode(self, mode): def cross_leverage_limit(self): """Gets the cross_leverage_limit of this Position. # noqa: E501 - Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 + Cross margin leverage (valid only when `leverage` is 0) # noqa: E501 :return: The cross_leverage_limit of this Position. # noqa: E501 :rtype: str @@ -852,7 +852,7 @@ def cross_leverage_limit(self): def cross_leverage_limit(self, cross_leverage_limit): """Sets the cross_leverage_limit of this Position. - Cross margin leverage(valid only when `leverage` is 0). # noqa: E501 + Cross margin leverage (valid only when `leverage` is 0) # noqa: E501 :param cross_leverage_limit: The cross_leverage_limit of this Position. # noqa: E501 :type: str @@ -864,7 +864,7 @@ def cross_leverage_limit(self, cross_leverage_limit): def update_time(self): """Gets the update_time of this Position. # noqa: E501 - Last update time. # noqa: E501 + Last update time # noqa: E501 :return: The update_time of this Position. # noqa: E501 :rtype: int @@ -875,7 +875,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this Position. - Last update time. # noqa: E501 + Last update time # noqa: E501 :param update_time: The update_time of this Position. # noqa: E501 :type: int @@ -887,7 +887,7 @@ def update_time(self, update_time): def update_id(self): """Gets the update_id of this Position. # noqa: E501 - Update id. Each time the position is updated, the value will be +1. # noqa: E501 + Update ID. The value increments by 1 each time the position is updated # noqa: E501 :return: The update_id of this Position. # noqa: E501 :rtype: int @@ -898,7 +898,7 @@ def update_id(self): def update_id(self, update_id): """Sets the update_id of this Position. - Update id. Each time the position is updated, the value will be +1. # noqa: E501 + Update ID. The value increments by 1 each time the position is updated # noqa: E501 :param update_id: The update_id of this Position. # noqa: E501 :type: int @@ -910,7 +910,7 @@ def update_id(self, update_id): def open_time(self): """Gets the open_time of this Position. # noqa: E501 - First Open Time. # noqa: E501 + First Open Time # noqa: E501 :return: The open_time of this Position. # noqa: E501 :rtype: int @@ -921,7 +921,7 @@ def open_time(self): def open_time(self, open_time): """Sets the open_time of this Position. - First Open Time. # noqa: E501 + First Open Time # noqa: E501 :param open_time: The open_time of this Position. # noqa: E501 :type: int @@ -933,7 +933,7 @@ def open_time(self, open_time): def risk_limit_table(self): """Gets the risk_limit_table of this Position. # noqa: E501 - Risk limit table ID. # noqa: E501 + Risk limit table ID # noqa: E501 :return: The risk_limit_table of this Position. # noqa: E501 :rtype: str @@ -944,7 +944,7 @@ def risk_limit_table(self): def risk_limit_table(self, risk_limit_table): """Sets the risk_limit_table of this Position. - Risk limit table ID. # noqa: E501 + Risk limit table ID # noqa: E501 :param risk_limit_table: The risk_limit_table of this Position. # noqa: E501 :type: str @@ -956,7 +956,7 @@ def risk_limit_table(self, risk_limit_table): def average_maintenance_rate(self): """Gets the average_maintenance_rate of this Position. # noqa: E501 - Average maintenance margin rate. # noqa: E501 + Average maintenance margin rate # noqa: E501 :return: The average_maintenance_rate of this Position. # noqa: E501 :rtype: str @@ -967,7 +967,7 @@ def average_maintenance_rate(self): def average_maintenance_rate(self, average_maintenance_rate): """Sets the average_maintenance_rate of this Position. - Average maintenance margin rate. # noqa: E501 + Average maintenance margin rate # noqa: E501 :param average_maintenance_rate: The average_maintenance_rate of this Position. # noqa: E501 :type: str diff --git a/gate_api/models/position_close.py b/gate_api/models/position_close.py index 95c4614..3ab116d 100644 --- a/gate_api/models/position_close.py +++ b/gate_api/models/position_close.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -117,7 +117,7 @@ def __init__(self, time=None, contract=None, side=None, pnl=None, pnl_pnl=None, def time(self): """Gets the time of this PositionClose. # noqa: E501 - Position close time. # noqa: E501 + Position close time # noqa: E501 :return: The time of this PositionClose. # noqa: E501 :rtype: float @@ -128,7 +128,7 @@ def time(self): def time(self, time): """Sets the time of this PositionClose. - Position close time. # noqa: E501 + Position close time # noqa: E501 :param time: The time of this PositionClose. # noqa: E501 :type: float @@ -140,7 +140,7 @@ def time(self, time): def contract(self): """Gets the contract of this PositionClose. # noqa: E501 - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :return: The contract of this PositionClose. # noqa: E501 :rtype: str @@ -151,7 +151,7 @@ def contract(self): def contract(self, contract): """Sets the contract of this PositionClose. - Futures contract. # noqa: E501 + Futures contract # noqa: E501 :param contract: The contract of this PositionClose. # noqa: E501 :type: str @@ -163,7 +163,7 @@ def contract(self, contract): def side(self): """Gets the side of this PositionClose. # noqa: E501 - Position side, long or short. # noqa: E501 + Position side - `long`: Long position - `short`: Short position # noqa: E501 :return: The side of this PositionClose. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def side(self): def side(self, side): """Sets the side of this PositionClose. - Position side, long or short. # noqa: E501 + Position side - `long`: Long position - `short`: Short position # noqa: E501 :param side: The side of this PositionClose. # noqa: E501 :type: str @@ -192,7 +192,7 @@ def side(self, side): def pnl(self): """Gets the pnl of this PositionClose. # noqa: E501 - PNL. # noqa: E501 + PnL # noqa: E501 :return: The pnl of this PositionClose. # noqa: E501 :rtype: str @@ -203,7 +203,7 @@ def pnl(self): def pnl(self, pnl): """Sets the pnl of this PositionClose. - PNL. # noqa: E501 + PnL # noqa: E501 :param pnl: The pnl of this PositionClose. # noqa: E501 :type: str @@ -215,7 +215,7 @@ def pnl(self, pnl): def pnl_pnl(self): """Gets the pnl_pnl of this PositionClose. # noqa: E501 - PNL - Position P/L. # noqa: E501 + PNL - Position P/L # noqa: E501 :return: The pnl_pnl of this PositionClose. # noqa: E501 :rtype: str @@ -226,7 +226,7 @@ def pnl_pnl(self): def pnl_pnl(self, pnl_pnl): """Sets the pnl_pnl of this PositionClose. - PNL - Position P/L. # noqa: E501 + PNL - Position P/L # noqa: E501 :param pnl_pnl: The pnl_pnl of this PositionClose. # noqa: E501 :type: str @@ -238,7 +238,7 @@ def pnl_pnl(self, pnl_pnl): def pnl_fund(self): """Gets the pnl_fund of this PositionClose. # noqa: E501 - PNL - Funding Fees. # noqa: E501 + PNL - Funding Fees # noqa: E501 :return: The pnl_fund of this PositionClose. # noqa: E501 :rtype: str @@ -249,7 +249,7 @@ def pnl_fund(self): def pnl_fund(self, pnl_fund): """Sets the pnl_fund of this PositionClose. - PNL - Funding Fees. # noqa: E501 + PNL - Funding Fees # noqa: E501 :param pnl_fund: The pnl_fund of this PositionClose. # noqa: E501 :type: str @@ -261,7 +261,7 @@ def pnl_fund(self, pnl_fund): def pnl_fee(self): """Gets the pnl_fee of this PositionClose. # noqa: E501 - PNL - Transaction Fees. # noqa: E501 + PNL - Transaction Fees # noqa: E501 :return: The pnl_fee of this PositionClose. # noqa: E501 :rtype: str @@ -272,7 +272,7 @@ def pnl_fee(self): def pnl_fee(self, pnl_fee): """Sets the pnl_fee of this PositionClose. - PNL - Transaction Fees. # noqa: E501 + PNL - Transaction Fees # noqa: E501 :param pnl_fee: The pnl_fee of this PositionClose. # noqa: E501 :type: str @@ -284,7 +284,7 @@ def pnl_fee(self, pnl_fee): def text(self): """Gets the text of this PositionClose. # noqa: E501 - Text of close order. # noqa: E501 + Source of close order. See `order.text` field for specific values # noqa: E501 :return: The text of this PositionClose. # noqa: E501 :rtype: str @@ -295,7 +295,7 @@ def text(self): def text(self, text): """Sets the text of this PositionClose. - Text of close order. # noqa: E501 + Source of close order. See `order.text` field for specific values # noqa: E501 :param text: The text of this PositionClose. # noqa: E501 :type: str @@ -307,7 +307,7 @@ def text(self, text): def max_size(self): """Gets the max_size of this PositionClose. # noqa: E501 - Max Trade Size. # noqa: E501 + Max Trade Size # noqa: E501 :return: The max_size of this PositionClose. # noqa: E501 :rtype: str @@ -318,7 +318,7 @@ def max_size(self): def max_size(self, max_size): """Sets the max_size of this PositionClose. - Max Trade Size. # noqa: E501 + Max Trade Size # noqa: E501 :param max_size: The max_size of this PositionClose. # noqa: E501 :type: str @@ -330,7 +330,7 @@ def max_size(self, max_size): def accum_size(self): """Gets the accum_size of this PositionClose. # noqa: E501 - Cumulative closed position volume. # noqa: E501 + Cumulative closed position volume # noqa: E501 :return: The accum_size of this PositionClose. # noqa: E501 :rtype: str @@ -341,7 +341,7 @@ def accum_size(self): def accum_size(self, accum_size): """Sets the accum_size of this PositionClose. - Cumulative closed position volume. # noqa: E501 + Cumulative closed position volume # noqa: E501 :param accum_size: The accum_size of this PositionClose. # noqa: E501 :type: str @@ -353,7 +353,7 @@ def accum_size(self, accum_size): def first_open_time(self): """Gets the first_open_time of this PositionClose. # noqa: E501 - First Open Time. # noqa: E501 + First Open Time # noqa: E501 :return: The first_open_time of this PositionClose. # noqa: E501 :rtype: int @@ -364,7 +364,7 @@ def first_open_time(self): def first_open_time(self, first_open_time): """Sets the first_open_time of this PositionClose. - First Open Time. # noqa: E501 + First Open Time # noqa: E501 :param first_open_time: The first_open_time of this PositionClose. # noqa: E501 :type: int @@ -376,7 +376,7 @@ def first_open_time(self, first_open_time): def long_price(self): """Gets the long_price of this PositionClose. # noqa: E501 - When 'side' is 'long,' it indicates the opening average price; when closing average price. # noqa: E501 + When side is 'long', it indicates the opening average price; when side is 'short', it indicates the closing average price # noqa: E501 :return: The long_price of this PositionClose. # noqa: E501 :rtype: str @@ -387,7 +387,7 @@ def long_price(self): def long_price(self, long_price): """Sets the long_price of this PositionClose. - When 'side' is 'long,' it indicates the opening average price; when closing average price. # noqa: E501 + When side is 'long', it indicates the opening average price; when side is 'short', it indicates the closing average price # noqa: E501 :param long_price: The long_price of this PositionClose. # noqa: E501 :type: str @@ -399,7 +399,7 @@ def long_price(self, long_price): def short_price(self): """Gets the short_price of this PositionClose. # noqa: E501 - When 'side' is 'long,' it indicates the opening average price; when closing average price # noqa: E501 + When side is 'long', it indicates the closing average price; when side is 'short', it indicates the opening average price # noqa: E501 :return: The short_price of this PositionClose. # noqa: E501 :rtype: str @@ -410,7 +410,7 @@ def short_price(self): def short_price(self, short_price): """Sets the short_price of this PositionClose. - When 'side' is 'long,' it indicates the opening average price; when closing average price # noqa: E501 + When side is 'long', it indicates the closing average price; when side is 'short', it indicates the opening average price # noqa: E501 :param short_price: The short_price of this PositionClose. # noqa: E501 :type: str diff --git a/gate_api/models/position_close_order.py b/gate_api/models/position_close_order.py index cc975f5..575f3cd 100644 --- a/gate_api/models/position_close_order.py +++ b/gate_api/models/position_close_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, id=None, price=None, is_liq=None, local_vars_configuration=No def id(self): """Gets the id of this PositionCloseOrder. # noqa: E501 - Close order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this PositionCloseOrder. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def id(self): def id(self, id): """Sets the id of this PositionCloseOrder. - Close order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this PositionCloseOrder. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def id(self, id): def price(self): """Gets the price of this PositionCloseOrder. # noqa: E501 - Close order price. # noqa: E501 + Order price # noqa: E501 :return: The price of this PositionCloseOrder. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def price(self): def price(self, price): """Sets the price of this PositionCloseOrder. - Close order price. # noqa: E501 + Order price # noqa: E501 :param price: The price of this PositionCloseOrder. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def price(self, price): def is_liq(self): """Gets the is_liq of this PositionCloseOrder. # noqa: E501 - Is the close order from liquidation. # noqa: E501 + Whether the close order is from liquidation # noqa: E501 :return: The is_liq of this PositionCloseOrder. # noqa: E501 :rtype: bool @@ -124,7 +124,7 @@ def is_liq(self): def is_liq(self, is_liq): """Sets the is_liq of this PositionCloseOrder. - Is the close order from liquidation. # noqa: E501 + Whether the close order is from liquidation # noqa: E501 :param is_liq: The is_liq of this PositionCloseOrder. # noqa: E501 :type: bool diff --git a/gate_api/models/profit_loss_range.py b/gate_api/models/profit_loss_range.py index b5566c3..9f6b1e0 100644 --- a/gate_api/models/profit_loss_range.py +++ b/gate_api/models/profit_loss_range.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, price_percentage=None, implied_volatility_percentage=None, pr def price_percentage(self): """Gets the price_percentage of this ProfitLossRange. # noqa: E501 - Percentage change in price. # noqa: E501 + Percentage change in price # noqa: E501 :return: The price_percentage of this ProfitLossRange. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def price_percentage(self): def price_percentage(self, price_percentage): """Sets the price_percentage of this ProfitLossRange. - Percentage change in price. # noqa: E501 + Percentage change in price # noqa: E501 :param price_percentage: The price_percentage of this ProfitLossRange. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def price_percentage(self, price_percentage): def implied_volatility_percentage(self): """Gets the implied_volatility_percentage of this ProfitLossRange. # noqa: E501 - Percentage change in implied volatility. # noqa: E501 + Percentage change in implied volatility # noqa: E501 :return: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def implied_volatility_percentage(self): def implied_volatility_percentage(self, implied_volatility_percentage): """Sets the implied_volatility_percentage of this ProfitLossRange. - Percentage change in implied volatility. # noqa: E501 + Percentage change in implied volatility # noqa: E501 :param implied_volatility_percentage: The implied_volatility_percentage of this ProfitLossRange. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def implied_volatility_percentage(self, implied_volatility_percentage): def profit_loss(self): """Gets the profit_loss of this ProfitLossRange. # noqa: E501 - PNL. # noqa: E501 + PnL # noqa: E501 :return: The profit_loss of this ProfitLossRange. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def profit_loss(self): def profit_loss(self, profit_loss): """Sets the profit_loss of this ProfitLossRange. - PNL. # noqa: E501 + PnL # noqa: E501 :param profit_loss: The profit_loss of this ProfitLossRange. # noqa: E501 :type: str diff --git a/gate_api/models/rebate_user_info.py b/gate_api/models/rebate_user_info.py index a9ed683..c93d182 100644 --- a/gate_api/models/rebate_user_info.py +++ b/gate_api/models/rebate_user_info.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, invite_uid=None, local_vars_configuration=None): # noqa: E50 def invite_uid(self): """Gets the invite_uid of this RebateUserInfo. # noqa: E501 - My inviter's UID. # noqa: E501 + My inviter's UID # noqa: E501 :return: The invite_uid of this RebateUserInfo. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def invite_uid(self): def invite_uid(self, invite_uid): """Sets the invite_uid of this RebateUserInfo. - My inviter's UID. # noqa: E501 + My inviter's UID # noqa: E501 :param invite_uid: The invite_uid of this RebateUserInfo. # noqa: E501 :type: int diff --git a/gate_api/models/repay_currency_res.py b/gate_api/models/repay_currency_res.py index 1137fa0..f818b19 100644 --- a/gate_api/models/repay_currency_res.py +++ b/gate_api/models/repay_currency_res.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, succeeded=None, label=None, message=None, currency=None, repa def succeeded(self): """Gets the succeeded of this RepayCurrencyRes. # noqa: E501 - Has the repayment been successful. # noqa: E501 + Whether the repayment was successful # noqa: E501 :return: The succeeded of this RepayCurrencyRes. # noqa: E501 :rtype: bool @@ -93,7 +93,7 @@ def succeeded(self): def succeeded(self, succeeded): """Sets the succeeded of this RepayCurrencyRes. - Has the repayment been successful. # noqa: E501 + Whether the repayment was successful # noqa: E501 :param succeeded: The succeeded of this RepayCurrencyRes. # noqa: E501 :type: bool @@ -105,7 +105,7 @@ def succeeded(self, succeeded): def label(self): """Gets the label of this RepayCurrencyRes. # noqa: E501 - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + Error identifier for failed operations; empty when successful # noqa: E501 :return: The label of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def label(self): def label(self, label): """Sets the label of this RepayCurrencyRes. - Error identifier for unsuccessful operations; empty for successful. # noqa: E501 + Error identifier for failed operations; empty when successful # noqa: E501 :param label: The label of this RepayCurrencyRes. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def label(self, label): def message(self): """Gets the message of this RepayCurrencyRes. # noqa: E501 - Error description in case of operation failure; empty when successful. # noqa: E501 + Error description for failed operations; empty when successful # noqa: E501 :return: The message of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def message(self): def message(self, message): """Sets the message of this RepayCurrencyRes. - Error description in case of operation failure; empty when successful. # noqa: E501 + Error description for failed operations; empty when successful # noqa: E501 :param message: The message of this RepayCurrencyRes. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def message(self, message): def currency(self): """Gets the currency of this RepayCurrencyRes. # noqa: E501 - Repayment currency. # noqa: E501 + Repayment currency # noqa: E501 :return: The currency of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayCurrencyRes. - Repayment currency. # noqa: E501 + Repayment currency # noqa: E501 :param currency: The currency of this RepayCurrencyRes. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def currency(self, currency): def repaid_principal(self): """Gets the repaid_principal of this RepayCurrencyRes. # noqa: E501 - Principal. # noqa: E501 + Principal # noqa: E501 :return: The repaid_principal of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this RepayCurrencyRes. - Principal. # noqa: E501 + Principal # noqa: E501 :param repaid_principal: The repaid_principal of this RepayCurrencyRes. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this RepayCurrencyRes. # noqa: E501 - Principal. # noqa: E501 + Principal # noqa: E501 :return: The repaid_interest of this RepayCurrencyRes. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this RepayCurrencyRes. - Principal. # noqa: E501 + Principal # noqa: E501 :param repaid_interest: The repaid_interest of this RepayCurrencyRes. # noqa: E501 :type: str diff --git a/gate_api/models/repay_loan.py b/gate_api/models/repay_loan.py index c683b0a..f8d97d6 100644 --- a/gate_api/models/repay_loan.py +++ b/gate_api/models/repay_loan.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -64,7 +64,7 @@ def __init__(self, order_id=None, repay_amount=None, repaid_all=None, local_vars def order_id(self): """Gets the order_id of this RepayLoan. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this RepayLoan. # noqa: E501 :rtype: int @@ -75,7 +75,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this RepayLoan. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this RepayLoan. # noqa: E501 :type: int @@ -89,7 +89,7 @@ def order_id(self, order_id): def repay_amount(self): """Gets the repay_amount of this RepayLoan. # noqa: E501 - Repayment amount, it is mandatory when making partial repayments. # noqa: E501 + Repayment amount, it is mandatory when making partial repayments # noqa: E501 :return: The repay_amount of this RepayLoan. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def repay_amount(self): def repay_amount(self, repay_amount): """Sets the repay_amount of this RepayLoan. - Repayment amount, it is mandatory when making partial repayments. # noqa: E501 + Repayment amount, it is mandatory when making partial repayments # noqa: E501 :param repay_amount: The repay_amount of this RepayLoan. # noqa: E501 :type: str diff --git a/gate_api/models/repay_multi_loan.py b/gate_api/models/repay_multi_loan.py index 9052f77..20c2385 100644 --- a/gate_api/models/repay_multi_loan.py +++ b/gate_api/models/repay_multi_loan.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, order_id=None, repay_items=None, local_vars_configuration=Non def order_id(self): """Gets the order_id of this RepayMultiLoan. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this RepayMultiLoan. # noqa: E501 :rtype: int @@ -71,7 +71,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this RepayMultiLoan. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this RepayMultiLoan. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def order_id(self, order_id): def repay_items(self): """Gets the repay_items of this RepayMultiLoan. # noqa: E501 - Repay Currency Item. # noqa: E501 + Repay Currency Item # noqa: E501 :return: The repay_items of this RepayMultiLoan. # noqa: E501 :rtype: list[MultiLoanRepayItem] @@ -96,7 +96,7 @@ def repay_items(self): def repay_items(self, repay_items): """Sets the repay_items of this RepayMultiLoan. - Repay Currency Item. # noqa: E501 + Repay Currency Item # noqa: E501 :param repay_items: The repay_items of this RepayMultiLoan. # noqa: E501 :type: list[MultiLoanRepayItem] diff --git a/gate_api/models/repay_record.py b/gate_api/models/repay_record.py index 37e3b9c..faef08c 100644 --- a/gate_api/models/repay_record.py +++ b/gate_api/models/repay_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -117,7 +117,7 @@ def __init__(self, order_id=None, record_id=None, repaid_amount=None, borrow_cur def order_id(self): """Gets the order_id of this RepayRecord. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The order_id of this RepayRecord. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this RepayRecord. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param order_id: The order_id of this RepayRecord. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def order_id(self, order_id): def record_id(self): """Gets the record_id of this RepayRecord. # noqa: E501 - Repayment record ID. # noqa: E501 + Repayment record ID # noqa: E501 :return: The record_id of this RepayRecord. # noqa: E501 :rtype: int @@ -151,7 +151,7 @@ def record_id(self): def record_id(self, record_id): """Sets the record_id of this RepayRecord. - Repayment record ID. # noqa: E501 + Repayment record ID # noqa: E501 :param record_id: The record_id of this RepayRecord. # noqa: E501 :type: int @@ -163,7 +163,7 @@ def record_id(self, record_id): def repaid_amount(self): """Gets the repaid_amount of this RepayRecord. # noqa: E501 - Repayment amount. # noqa: E501 + Repayment amount # noqa: E501 :return: The repaid_amount of this RepayRecord. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def repaid_amount(self): def repaid_amount(self, repaid_amount): """Sets the repaid_amount of this RepayRecord. - Repayment amount. # noqa: E501 + Repayment amount # noqa: E501 :param repaid_amount: The repaid_amount of this RepayRecord. # noqa: E501 :type: str @@ -186,7 +186,7 @@ def repaid_amount(self, repaid_amount): def borrow_currency(self): """Gets the borrow_currency of this RepayRecord. # noqa: E501 - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :return: The borrow_currency of this RepayRecord. # noqa: E501 :rtype: str @@ -197,7 +197,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this RepayRecord. - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :param borrow_currency: The borrow_currency of this RepayRecord. # noqa: E501 :type: str @@ -209,7 +209,7 @@ def borrow_currency(self, borrow_currency): def collateral_currency(self): """Gets the collateral_currency of this RepayRecord. # noqa: E501 - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :return: The collateral_currency of this RepayRecord. # noqa: E501 :rtype: str @@ -220,7 +220,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this RepayRecord. - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :param collateral_currency: The collateral_currency of this RepayRecord. # noqa: E501 :type: str @@ -232,7 +232,7 @@ def collateral_currency(self, collateral_currency): def init_ltv(self): """Gets the init_ltv of this RepayRecord. # noqa: E501 - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :return: The init_ltv of this RepayRecord. # noqa: E501 :rtype: str @@ -243,7 +243,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this RepayRecord. - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :param init_ltv: The init_ltv of this RepayRecord. # noqa: E501 :type: str @@ -255,7 +255,7 @@ def init_ltv(self, init_ltv): def borrow_time(self): """Gets the borrow_time of this RepayRecord. # noqa: E501 - Borrowing time, timestamp. # noqa: E501 + Borrowing time, timestamp # noqa: E501 :return: The borrow_time of this RepayRecord. # noqa: E501 :rtype: int @@ -266,7 +266,7 @@ def borrow_time(self): def borrow_time(self, borrow_time): """Sets the borrow_time of this RepayRecord. - Borrowing time, timestamp. # noqa: E501 + Borrowing time, timestamp # noqa: E501 :param borrow_time: The borrow_time of this RepayRecord. # noqa: E501 :type: int @@ -278,7 +278,7 @@ def borrow_time(self, borrow_time): def repay_time(self): """Gets the repay_time of this RepayRecord. # noqa: E501 - Repayment time, timestamp. # noqa: E501 + Repayment time, timestamp # noqa: E501 :return: The repay_time of this RepayRecord. # noqa: E501 :rtype: int @@ -289,7 +289,7 @@ def repay_time(self): def repay_time(self, repay_time): """Sets the repay_time of this RepayRecord. - Repayment time, timestamp. # noqa: E501 + Repayment time, timestamp # noqa: E501 :param repay_time: The repay_time of this RepayRecord. # noqa: E501 :type: int @@ -301,7 +301,7 @@ def repay_time(self, repay_time): def total_interest(self): """Gets the total_interest of this RepayRecord. # noqa: E501 - Total interest. # noqa: E501 + Total interest # noqa: E501 :return: The total_interest of this RepayRecord. # noqa: E501 :rtype: str @@ -312,7 +312,7 @@ def total_interest(self): def total_interest(self, total_interest): """Sets the total_interest of this RepayRecord. - Total interest. # noqa: E501 + Total interest # noqa: E501 :param total_interest: The total_interest of this RepayRecord. # noqa: E501 :type: str @@ -324,7 +324,7 @@ def total_interest(self, total_interest): def before_left_principal(self): """Gets the before_left_principal of this RepayRecord. # noqa: E501 - Principal to be repaid before repayment. # noqa: E501 + Principal to be repaid before repayment # noqa: E501 :return: The before_left_principal of this RepayRecord. # noqa: E501 :rtype: str @@ -335,7 +335,7 @@ def before_left_principal(self): def before_left_principal(self, before_left_principal): """Sets the before_left_principal of this RepayRecord. - Principal to be repaid before repayment. # noqa: E501 + Principal to be repaid before repayment # noqa: E501 :param before_left_principal: The before_left_principal of this RepayRecord. # noqa: E501 :type: str @@ -347,7 +347,7 @@ def before_left_principal(self, before_left_principal): def after_left_principal(self): """Gets the after_left_principal of this RepayRecord. # noqa: E501 - Principal to be repaid after repayment. # noqa: E501 + Principal to be repaid after repayment # noqa: E501 :return: The after_left_principal of this RepayRecord. # noqa: E501 :rtype: str @@ -358,7 +358,7 @@ def after_left_principal(self): def after_left_principal(self, after_left_principal): """Sets the after_left_principal of this RepayRecord. - Principal to be repaid after repayment. # noqa: E501 + Principal to be repaid after repayment # noqa: E501 :param after_left_principal: The after_left_principal of this RepayRecord. # noqa: E501 :type: str @@ -370,7 +370,7 @@ def after_left_principal(self, after_left_principal): def before_left_collateral(self): """Gets the before_left_collateral of this RepayRecord. # noqa: E501 - Collateral quantity before repayment. # noqa: E501 + Collateral amount before repayment # noqa: E501 :return: The before_left_collateral of this RepayRecord. # noqa: E501 :rtype: str @@ -381,7 +381,7 @@ def before_left_collateral(self): def before_left_collateral(self, before_left_collateral): """Sets the before_left_collateral of this RepayRecord. - Collateral quantity before repayment. # noqa: E501 + Collateral amount before repayment # noqa: E501 :param before_left_collateral: The before_left_collateral of this RepayRecord. # noqa: E501 :type: str @@ -393,7 +393,7 @@ def before_left_collateral(self, before_left_collateral): def after_left_collateral(self): """Gets the after_left_collateral of this RepayRecord. # noqa: E501 - Collateral quantity after repayment. # noqa: E501 + Collateral amount after repayment # noqa: E501 :return: The after_left_collateral of this RepayRecord. # noqa: E501 :rtype: str @@ -404,7 +404,7 @@ def after_left_collateral(self): def after_left_collateral(self, after_left_collateral): """Sets the after_left_collateral of this RepayRecord. - Collateral quantity after repayment. # noqa: E501 + Collateral amount after repayment # noqa: E501 :param after_left_collateral: The after_left_collateral of this RepayRecord. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_currency.py b/gate_api/models/repay_record_currency.py index 2200f99..1f175bc 100644 --- a/gate_api/models/repay_record_currency.py +++ b/gate_api/models/repay_record_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, before_amount=None, before_a def currency(self): """Gets the currency of this RepayRecordCurrency. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordCurrency. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this RepayRecordCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordCurrency. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordCurrency. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this RepayRecordCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def before_amount(self): """Gets the before_amount of this RepayRecordCurrency. # noqa: E501 - Amount before the operation. # noqa: E501 + Amount before the operation # noqa: E501 :return: The before_amount of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def before_amount(self): def before_amount(self, before_amount): """Sets the before_amount of this RepayRecordCurrency. - Amount before the operation. # noqa: E501 + Amount before the operation # noqa: E501 :param before_amount: The before_amount of this RepayRecordCurrency. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def before_amount(self, before_amount): def before_amount_usdt(self): """Gets the before_amount_usdt of this RepayRecordCurrency. # noqa: E501 - USDT Amount before the operation. # noqa: E501 + USDT Amount before the operation # noqa: E501 :return: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def before_amount_usdt(self): def before_amount_usdt(self, before_amount_usdt): """Sets the before_amount_usdt of this RepayRecordCurrency. - USDT Amount before the operation. # noqa: E501 + USDT Amount before the operation # noqa: E501 :param before_amount_usdt: The before_amount_usdt of this RepayRecordCurrency. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def before_amount_usdt(self, before_amount_usdt): def after_amount(self): """Gets the after_amount of this RepayRecordCurrency. # noqa: E501 - Amount after the operation. # noqa: E501 + Amount after the operation # noqa: E501 :return: The after_amount of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def after_amount(self): def after_amount(self, after_amount): """Sets the after_amount of this RepayRecordCurrency. - Amount after the operation. # noqa: E501 + Amount after the operation # noqa: E501 :param after_amount: The after_amount of this RepayRecordCurrency. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def after_amount(self, after_amount): def after_amount_usdt(self): """Gets the after_amount_usdt of this RepayRecordCurrency. # noqa: E501 - USDT Amount after the operation. # noqa: E501 + USDT Amount after the operation # noqa: E501 :return: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def after_amount_usdt(self): def after_amount_usdt(self, after_amount_usdt): """Sets the after_amount_usdt of this RepayRecordCurrency. - USDT Amount after the operation. # noqa: E501 + USDT Amount after the operation # noqa: E501 :param after_amount_usdt: The after_amount_usdt of this RepayRecordCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_left_interest.py b/gate_api/models/repay_record_left_interest.py index 05a50b7..604dd12 100644 --- a/gate_api/models/repay_record_left_interest.py +++ b/gate_api/models/repay_record_left_interest.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, before_amount=None, before_a def currency(self): """Gets the currency of this RepayRecordLeftInterest. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordLeftInterest. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordLeftInterest. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordLeftInterest. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def before_amount(self): """Gets the before_amount of this RepayRecordLeftInterest. # noqa: E501 - Interest amount before repayment. # noqa: E501 + Interest amount before repayment # noqa: E501 :return: The before_amount of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def before_amount(self): def before_amount(self, before_amount): """Sets the before_amount of this RepayRecordLeftInterest. - Interest amount before repayment. # noqa: E501 + Interest amount before repayment # noqa: E501 :param before_amount: The before_amount of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def before_amount(self, before_amount): def before_amount_usdt(self): """Gets the before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - Converted value of interest before repayment in USDT. # noqa: E501 + Converted value of interest before repayment in USDT # noqa: E501 :return: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def before_amount_usdt(self): def before_amount_usdt(self, before_amount_usdt): """Sets the before_amount_usdt of this RepayRecordLeftInterest. - Converted value of interest before repayment in USDT. # noqa: E501 + Converted value of interest before repayment in USDT # noqa: E501 :param before_amount_usdt: The before_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def before_amount_usdt(self, before_amount_usdt): def after_amount(self): """Gets the after_amount of this RepayRecordLeftInterest. # noqa: E501 - Interest amount after repayment. # noqa: E501 + Interest amount after repayment # noqa: E501 :return: The after_amount of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def after_amount(self): def after_amount(self, after_amount): """Sets the after_amount of this RepayRecordLeftInterest. - Interest amount after repayment. # noqa: E501 + Interest amount after repayment # noqa: E501 :param after_amount: The after_amount of this RepayRecordLeftInterest. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def after_amount(self, after_amount): def after_amount_usdt(self): """Gets the after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 - Converted value of interest after repayment in USDT. # noqa: E501 + Converted value of interest after repayment in USDT # noqa: E501 :return: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def after_amount_usdt(self): def after_amount_usdt(self, after_amount_usdt): """Sets the after_amount_usdt of this RepayRecordLeftInterest. - Converted value of interest after repayment in USDT. # noqa: E501 + Converted value of interest after repayment in USDT # noqa: E501 :param after_amount_usdt: The after_amount_usdt of this RepayRecordLeftInterest. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_repaid_currency.py b/gate_api/models/repay_record_repaid_currency.py index b681dd7..5aa54fd 100644 --- a/gate_api/models/repay_record_repaid_currency.py +++ b/gate_api/models/repay_record_repaid_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, currency=None, index_price=None, repaid_amount=None, repaid_p def currency(self): """Gets the currency of this RepayRecordRepaidCurrency. # noqa: E501 - Repayment currency. # noqa: E501 + Repayment currency # noqa: E501 :return: The currency of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordRepaidCurrency. - Repayment currency. # noqa: E501 + Repayment currency # noqa: E501 :param currency: The currency of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordRepaidCurrency. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordRepaidCurrency. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def index_price(self, index_price): def repaid_amount(self): """Gets the repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 - Repayment amount. # noqa: E501 + Repayment amount # noqa: E501 :return: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def repaid_amount(self): def repaid_amount(self, repaid_amount): """Sets the repaid_amount of this RepayRecordRepaidCurrency. - Repayment amount. # noqa: E501 + Repayment amount # noqa: E501 :param repaid_amount: The repaid_amount of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def repaid_amount(self, repaid_amount): def repaid_principal(self): """Gets the repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 - Principal. # noqa: E501 + Principal # noqa: E501 :return: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this RepayRecordRepaidCurrency. - Principal. # noqa: E501 + Principal # noqa: E501 :param repaid_principal: The repaid_principal of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 - Interest. # noqa: E501 + Interest # noqa: E501 :return: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this RepayRecordRepaidCurrency. - Interest. # noqa: E501 + Interest # noqa: E501 :param repaid_interest: The repaid_interest of this RepayRecordRepaidCurrency. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def repaid_interest(self, repaid_interest): def repaid_amount_usdt(self): """Gets the repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 - Value of the repayment amount in USDT. # noqa: E501 + Repayment amount converted to USDT # noqa: E501 :return: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def repaid_amount_usdt(self): def repaid_amount_usdt(self, repaid_amount_usdt): """Sets the repaid_amount_usdt of this RepayRecordRepaidCurrency. - Value of the repayment amount in USDT. # noqa: E501 + Repayment amount converted to USDT # noqa: E501 :param repaid_amount_usdt: The repaid_amount_usdt of this RepayRecordRepaidCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/repay_record_total_interest.py b/gate_api/models/repay_record_total_interest.py index 0d8a839..11e31c4 100644 --- a/gate_api/models/repay_record_total_interest.py +++ b/gate_api/models/repay_record_total_interest.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, currency=None, index_price=None, amount=None, amount_usdt=Non def currency(self): """Gets the currency of this RepayRecordTotalInterest. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this RepayRecordTotalInterest. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this RepayRecordTotalInterest. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def index_price(self): """Gets the index_price of this RepayRecordTotalInterest. # noqa: E501 - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :return: The index_price of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def index_price(self): def index_price(self, index_price): """Sets the index_price of this RepayRecordTotalInterest. - Currency Index Price. # noqa: E501 + Currency Index Price # noqa: E501 :param index_price: The index_price of this RepayRecordTotalInterest. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def index_price(self, index_price): def amount(self): """Gets the amount of this RepayRecordTotalInterest. # noqa: E501 - Interest Amount. # noqa: E501 + Interest Amount # noqa: E501 :return: The amount of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this RepayRecordTotalInterest. - Interest Amount. # noqa: E501 + Interest Amount # noqa: E501 :param amount: The amount of this RepayRecordTotalInterest. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def amount(self, amount): def amount_usdt(self): """Gets the amount_usdt of this RepayRecordTotalInterest. # noqa: E501 - Interest amount converted to USDT. # noqa: E501 + Interest amount converted to USDT # noqa: E501 :return: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def amount_usdt(self): def amount_usdt(self, amount_usdt): """Sets the amount_usdt of this RepayRecordTotalInterest. - Interest amount converted to USDT. # noqa: E501 + Interest amount converted to USDT # noqa: E501 :param amount_usdt: The amount_usdt of this RepayRecordTotalInterest. # noqa: E501 :type: str diff --git a/gate_api/models/repay_resp.py b/gate_api/models/repay_resp.py index 2446ead..f35f6bc 100644 --- a/gate_api/models/repay_resp.py +++ b/gate_api/models/repay_resp.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, repaid_principal=None, repaid_interest=None, local_vars_confi def repaid_principal(self): """Gets the repaid_principal of this RepayResp. # noqa: E501 - Principal. # noqa: E501 + Principal # noqa: E501 :return: The repaid_principal of this RepayResp. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def repaid_principal(self): def repaid_principal(self, repaid_principal): """Sets the repaid_principal of this RepayResp. - Principal. # noqa: E501 + Principal # noqa: E501 :param repaid_principal: The repaid_principal of this RepayResp. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def repaid_principal(self, repaid_principal): def repaid_interest(self): """Gets the repaid_interest of this RepayResp. # noqa: E501 - Interest. # noqa: E501 + Interest # noqa: E501 :return: The repaid_interest of this RepayResp. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def repaid_interest(self): def repaid_interest(self, repaid_interest): """Sets the repaid_interest of this RepayResp. - Interest. # noqa: E501 + Interest # noqa: E501 :param repaid_interest: The repaid_interest of this RepayResp. # noqa: E501 :type: str diff --git a/gate_api/models/risk_units.py b/gate_api/models/risk_units.py index 69c1549..9ab5a17 100644 --- a/gate_api/models/risk_units.py +++ b/gate_api/models/risk_units.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, symbol=None, spot_in_use=None, maintain_margin=None, initial_ def symbol(self): """Gets the symbol of this RiskUnits. # noqa: E501 - Risk unit flag. # noqa: E501 + Risk unit flag # noqa: E501 :return: The symbol of this RiskUnits. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def symbol(self): def symbol(self, symbol): """Sets the symbol of this RiskUnits. - Risk unit flag. # noqa: E501 + Risk unit flag # noqa: E501 :param symbol: The symbol of this RiskUnits. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def symbol(self, symbol): def spot_in_use(self): """Gets the spot_in_use of this RiskUnits. # noqa: E501 - Spot hedging utilization. # noqa: E501 + Spot hedging occupied amount # noqa: E501 :return: The spot_in_use of this RiskUnits. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def spot_in_use(self): def spot_in_use(self, spot_in_use): """Sets the spot_in_use of this RiskUnits. - Spot hedging utilization. # noqa: E501 + Spot hedging occupied amount # noqa: E501 :param spot_in_use: The spot_in_use of this RiskUnits. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def spot_in_use(self, spot_in_use): def maintain_margin(self): """Gets the maintain_margin of this RiskUnits. # noqa: E501 - Maintenance margin for risk unit. # noqa: E501 + Maintenance margin for risk unit # noqa: E501 :return: The maintain_margin of this RiskUnits. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def maintain_margin(self): def maintain_margin(self, maintain_margin): """Sets the maintain_margin of this RiskUnits. - Maintenance margin for risk unit. # noqa: E501 + Maintenance margin for risk unit # noqa: E501 :param maintain_margin: The maintain_margin of this RiskUnits. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def maintain_margin(self, maintain_margin): def initial_margin(self): """Gets the initial_margin of this RiskUnits. # noqa: E501 - Initial margin for risk unit. # noqa: E501 + Initial margin for risk unit # noqa: E501 :return: The initial_margin of this RiskUnits. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def initial_margin(self): def initial_margin(self, initial_margin): """Sets the initial_margin of this RiskUnits. - Initial margin for risk unit. # noqa: E501 + Initial margin for risk unit # noqa: E501 :param initial_margin: The initial_margin of this RiskUnits. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def initial_margin(self, initial_margin): def delta(self): """Gets the delta of this RiskUnits. # noqa: E501 - Total Delta of risk unit. # noqa: E501 + Total Delta of risk unit # noqa: E501 :return: The delta of this RiskUnits. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def delta(self): def delta(self, delta): """Sets the delta of this RiskUnits. - Total Delta of risk unit. # noqa: E501 + Total Delta of risk unit # noqa: E501 :param delta: The delta of this RiskUnits. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def delta(self, delta): def gamma(self): """Gets the gamma of this RiskUnits. # noqa: E501 - Total Gamma of risk unit. # noqa: E501 + Total Gamma of risk unit # noqa: E501 :return: The gamma of this RiskUnits. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def gamma(self): def gamma(self, gamma): """Sets the gamma of this RiskUnits. - Total Gamma of risk unit. # noqa: E501 + Total Gamma of risk unit # noqa: E501 :param gamma: The gamma of this RiskUnits. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def gamma(self, gamma): def theta(self): """Gets the theta of this RiskUnits. # noqa: E501 - Total Theta of risk unit. # noqa: E501 + Total Theta of risk unit # noqa: E501 :return: The theta of this RiskUnits. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def theta(self): def theta(self, theta): """Sets the theta of this RiskUnits. - Total Theta of risk unit. # noqa: E501 + Total Theta of risk unit # noqa: E501 :param theta: The theta of this RiskUnits. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def theta(self, theta): def vega(self): """Gets the vega of this RiskUnits. # noqa: E501 - Total Vega of risk unit. # noqa: E501 + Total Vega of risk unit # noqa: E501 :return: The vega of this RiskUnits. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def vega(self): def vega(self, vega): """Sets the vega of this RiskUnits. - Total Vega of risk unit. # noqa: E501 + Total Vega of risk unit # noqa: E501 :param vega: The vega of this RiskUnits. # noqa: E501 :type: str diff --git a/gate_api/models/saved_address.py b/gate_api/models/saved_address.py index 180f0ca..d82f14d 100644 --- a/gate_api/models/saved_address.py +++ b/gate_api/models/saved_address.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, currency=None, chain=None, address=None, name=None, tag=None, def currency(self): """Gets the currency of this SavedAddress. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this SavedAddress. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SavedAddress. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this SavedAddress. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def chain(self): """Gets the chain of this SavedAddress. # noqa: E501 - Chain name. # noqa: E501 + Chain name # noqa: E501 :return: The chain of this SavedAddress. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this SavedAddress. - Chain name. # noqa: E501 + Chain name # noqa: E501 :param chain: The chain of this SavedAddress. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def chain(self, chain): def address(self): """Gets the address of this SavedAddress. # noqa: E501 - Address. # noqa: E501 + Address # noqa: E501 :return: The address of this SavedAddress. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def address(self): def address(self, address): """Sets the address of this SavedAddress. - Address. # noqa: E501 + Address # noqa: E501 :param address: The address of this SavedAddress. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def address(self, address): def name(self): """Gets the name of this SavedAddress. # noqa: E501 - Name. # noqa: E501 + Name # noqa: E501 :return: The name of this SavedAddress. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def name(self): def name(self, name): """Sets the name of this SavedAddress. - Name. # noqa: E501 + Name # noqa: E501 :param name: The name of this SavedAddress. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def name(self, name): def tag(self): """Gets the tag of this SavedAddress. # noqa: E501 - Tag. # noqa: E501 + Tag # noqa: E501 :return: The tag of this SavedAddress. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def tag(self): def tag(self, tag): """Sets the tag of this SavedAddress. - Tag. # noqa: E501 + Tag # noqa: E501 :param tag: The tag of this SavedAddress. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def tag(self, tag): def verified(self): """Gets the verified of this SavedAddress. # noqa: E501 - Whether to pass the verification 0-unverified, 1-verified. # noqa: E501 + Whether to pass the verification 0-unverified, 1-verified # noqa: E501 :return: The verified of this SavedAddress. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def verified(self): def verified(self, verified): """Sets the verified of this SavedAddress. - Whether to pass the verification 0-unverified, 1-verified. # noqa: E501 + Whether to pass the verification 0-unverified, 1-verified # noqa: E501 :param verified: The verified of this SavedAddress. # noqa: E501 :type: str diff --git a/gate_api/models/small_balance.py b/gate_api/models/small_balance.py index bb5ff42..a31cd14 100644 --- a/gate_api/models/small_balance.py +++ b/gate_api/models/small_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, currency=None, available_balance=None, estimated_as_btc=None, def currency(self): """Gets the currency of this SmallBalance. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this SmallBalance. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SmallBalance. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this SmallBalance. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def available_balance(self): """Gets the available_balance of this SmallBalance. # noqa: E501 - Available balance. # noqa: E501 + Available balance # noqa: E501 :return: The available_balance of this SmallBalance. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def available_balance(self): def available_balance(self, available_balance): """Sets the available_balance of this SmallBalance. - Available balance. # noqa: E501 + Available balance # noqa: E501 :param available_balance: The available_balance of this SmallBalance. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def available_balance(self, available_balance): def estimated_as_btc(self): """Gets the estimated_as_btc of this SmallBalance. # noqa: E501 - Estimated as BTC. # noqa: E501 + Estimated as BTC # noqa: E501 :return: The estimated_as_btc of this SmallBalance. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def estimated_as_btc(self): def estimated_as_btc(self, estimated_as_btc): """Sets the estimated_as_btc of this SmallBalance. - Estimated as BTC. # noqa: E501 + Estimated as BTC # noqa: E501 :param estimated_as_btc: The estimated_as_btc of this SmallBalance. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def estimated_as_btc(self, estimated_as_btc): def convertible_to_gt(self): """Gets the convertible_to_gt of this SmallBalance. # noqa: E501 - Estimated conversion to GT. # noqa: E501 + Estimated conversion to GT # noqa: E501 :return: The convertible_to_gt of this SmallBalance. # noqa: E501 :rtype: str @@ -152,7 +152,7 @@ def convertible_to_gt(self): def convertible_to_gt(self, convertible_to_gt): """Sets the convertible_to_gt of this SmallBalance. - Estimated conversion to GT. # noqa: E501 + Estimated conversion to GT # noqa: E501 :param convertible_to_gt: The convertible_to_gt of this SmallBalance. # noqa: E501 :type: str diff --git a/gate_api/models/small_balance_history.py b/gate_api/models/small_balance_history.py index b7a420a..da3a1d3 100644 --- a/gate_api/models/small_balance_history.py +++ b/gate_api/models/small_balance_history.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, id=None, currency=None, amount=None, gt_amount=None, create_t def id(self): """Gets the id of this SmallBalanceHistory. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def id(self): def id(self, id): """Sets the id of this SmallBalanceHistory. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this SmallBalanceHistory. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def id(self, id): def currency(self): """Gets the currency of this SmallBalanceHistory. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SmallBalanceHistory. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this SmallBalanceHistory. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this SmallBalanceHistory. # noqa: E501 - amount. # noqa: E501 + Swap Amount # noqa: E501 :return: The amount of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SmallBalanceHistory. - amount. # noqa: E501 + Swap Amount # noqa: E501 :param amount: The amount of this SmallBalanceHistory. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def amount(self, amount): def gt_amount(self): """Gets the gt_amount of this SmallBalanceHistory. # noqa: E501 - GT amount. # noqa: E501 + GT amount # noqa: E501 :return: The gt_amount of this SmallBalanceHistory. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def gt_amount(self): def gt_amount(self, gt_amount): """Sets the gt_amount of this SmallBalanceHistory. - GT amount. # noqa: E501 + GT amount # noqa: E501 :param gt_amount: The gt_amount of this SmallBalanceHistory. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def gt_amount(self, gt_amount): def create_time(self): """Gets the create_time of this SmallBalanceHistory. # noqa: E501 - Exchange time (in seconds). # noqa: E501 + Exchange time (in seconds) # noqa: E501 :return: The create_time of this SmallBalanceHistory. # noqa: E501 :rtype: int @@ -180,7 +180,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this SmallBalanceHistory. - Exchange time (in seconds). # noqa: E501 + Exchange time (in seconds) # noqa: E501 :param create_time: The create_time of this SmallBalanceHistory. # noqa: E501 :type: int diff --git a/gate_api/models/spot_account.py b/gate_api/models/spot_account.py index 79f3eb8..e4f1aba 100644 --- a/gate_api/models/spot_account.py +++ b/gate_api/models/spot_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, currency=None, available=None, locked=None, update_id=None, l def currency(self): """Gets the currency of this SpotAccount. # noqa: E501 - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :return: The currency of this SpotAccount. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SpotAccount. - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :param currency: The currency of this SpotAccount. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def available(self): """Gets the available of this SpotAccount. # noqa: E501 - Available amount. # noqa: E501 + Available amount # noqa: E501 :return: The available of this SpotAccount. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def available(self): def available(self, available): """Sets the available of this SpotAccount. - Available amount. # noqa: E501 + Available amount # noqa: E501 :param available: The available of this SpotAccount. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def available(self, available): def locked(self): """Gets the locked of this SpotAccount. # noqa: E501 - Locked amount, used in trading. # noqa: E501 + Locked amount, used in trading # noqa: E501 :return: The locked of this SpotAccount. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this SpotAccount. - Locked amount, used in trading. # noqa: E501 + Locked amount, used in trading # noqa: E501 :param locked: The locked of this SpotAccount. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def locked(self, locked): def update_id(self): """Gets the update_id of this SpotAccount. # noqa: E501 - Version number. # noqa: E501 + Version number # noqa: E501 :return: The update_id of this SpotAccount. # noqa: E501 :rtype: int @@ -152,7 +152,7 @@ def update_id(self): def update_id(self, update_id): """Sets the update_id of this SpotAccount. - Version number. # noqa: E501 + Version number # noqa: E501 :param update_id: The update_id of this SpotAccount. # noqa: E501 :type: int diff --git a/gate_api/models/spot_account_book.py b/gate_api/models/spot_account_book.py index 7f3d6f6..081b281 100644 --- a/gate_api/models/spot_account_book.py +++ b/gate_api/models/spot_account_book.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, id=None, time=None, currency=None, change=None, balance=None, def id(self): """Gets the id of this SpotAccountBook. # noqa: E501 - Balance change record ID. # noqa: E501 + Balance change record ID # noqa: E501 :return: The id of this SpotAccountBook. # noqa: E501 :rtype: str @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this SpotAccountBook. - Balance change record ID. # noqa: E501 + Balance change record ID # noqa: E501 :param id: The id of this SpotAccountBook. # noqa: E501 :type: str @@ -115,7 +115,7 @@ def id(self, id): def time(self): """Gets the time of this SpotAccountBook. # noqa: E501 - The timestamp of the change (in milliseconds). # noqa: E501 + The timestamp of the change (in milliseconds) # noqa: E501 :return: The time of this SpotAccountBook. # noqa: E501 :rtype: int @@ -126,7 +126,7 @@ def time(self): def time(self, time): """Sets the time of this SpotAccountBook. - The timestamp of the change (in milliseconds). # noqa: E501 + The timestamp of the change (in milliseconds) # noqa: E501 :param time: The time of this SpotAccountBook. # noqa: E501 :type: int @@ -138,7 +138,7 @@ def time(self, time): def currency(self): """Gets the currency of this SpotAccountBook. # noqa: E501 - Currency changed. # noqa: E501 + Currency changed # noqa: E501 :return: The currency of this SpotAccountBook. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SpotAccountBook. - Currency changed. # noqa: E501 + Currency changed # noqa: E501 :param currency: The currency of this SpotAccountBook. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def currency(self, currency): def change(self): """Gets the change of this SpotAccountBook. # noqa: E501 - Amount changed. Positive value means transferring in, while negative out. # noqa: E501 + Amount changed. Positive value means transferring in, while negative out # noqa: E501 :return: The change of this SpotAccountBook. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def change(self): def change(self, change): """Sets the change of this SpotAccountBook. - Amount changed. Positive value means transferring in, while negative out. # noqa: E501 + Amount changed. Positive value means transferring in, while negative out # noqa: E501 :param change: The change of this SpotAccountBook. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def change(self, change): def balance(self): """Gets the balance of this SpotAccountBook. # noqa: E501 - Balance after change. # noqa: E501 + Balance after change # noqa: E501 :return: The balance of this SpotAccountBook. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this SpotAccountBook. - Balance after change. # noqa: E501 + Balance after change # noqa: E501 :param balance: The balance of this SpotAccountBook. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def type(self, type): def code(self): """Gets the code of this SpotAccountBook. # noqa: E501 - Account change code, see [Asset Record Code] (Asset Record Code). # noqa: E501 + Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 :return: The code of this SpotAccountBook. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def code(self): def code(self, code): """Sets the code of this SpotAccountBook. - Account change code, see [Asset Record Code] (Asset Record Code). # noqa: E501 + Account change code, see [Asset Record Code] (Asset Record Code) # noqa: E501 :param code: The code of this SpotAccountBook. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def code(self, code): def text(self): """Gets the text of this SpotAccountBook. # noqa: E501 - Additional information. # noqa: E501 + Additional information # noqa: E501 :return: The text of this SpotAccountBook. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def text(self): def text(self, text): """Sets the text of this SpotAccountBook. - Additional information. # noqa: E501 + Additional information # noqa: E501 :param text: The text of this SpotAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/spot_currency_chain.py b/gate_api/models/spot_currency_chain.py index 418cd6f..7dc9a48 100644 --- a/gate_api/models/spot_currency_chain.py +++ b/gate_api/models/spot_currency_chain.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, name=None, addr=None, withdraw_disabled=None, withdraw_delaye def name(self): """Gets the name of this SpotCurrencyChain. # noqa: E501 - Chain name. # noqa: E501 + Blockchain name # noqa: E501 :return: The name of this SpotCurrencyChain. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def name(self): def name(self, name): """Sets the name of this SpotCurrencyChain. - Chain name. # noqa: E501 + Blockchain name # noqa: E501 :param name: The name of this SpotCurrencyChain. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def name(self, name): def addr(self): """Gets the addr of this SpotCurrencyChain. # noqa: E501 - token address. # noqa: E501 + token address # noqa: E501 :return: The addr of this SpotCurrencyChain. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def addr(self): def addr(self, addr): """Sets the addr of this SpotCurrencyChain. - token address. # noqa: E501 + token address # noqa: E501 :param addr: The addr of this SpotCurrencyChain. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def addr(self, addr): def withdraw_disabled(self): """Gets the withdraw_disabled of this SpotCurrencyChain. # noqa: E501 - Whether currency's withdrawal is disabled. # noqa: E501 + Whether currency's withdrawal is disabled # noqa: E501 :return: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 :rtype: bool @@ -134,7 +134,7 @@ def withdraw_disabled(self): def withdraw_disabled(self, withdraw_disabled): """Sets the withdraw_disabled of this SpotCurrencyChain. - Whether currency's withdrawal is disabled. # noqa: E501 + Whether currency's withdrawal is disabled # noqa: E501 :param withdraw_disabled: The withdraw_disabled of this SpotCurrencyChain. # noqa: E501 :type: bool @@ -146,7 +146,7 @@ def withdraw_disabled(self, withdraw_disabled): def withdraw_delayed(self): """Gets the withdraw_delayed of this SpotCurrencyChain. # noqa: E501 - Whether currency's withdrawal is delayed. # noqa: E501 + Whether currency's withdrawal is delayed # noqa: E501 :return: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 :rtype: bool @@ -157,7 +157,7 @@ def withdraw_delayed(self): def withdraw_delayed(self, withdraw_delayed): """Sets the withdraw_delayed of this SpotCurrencyChain. - Whether currency's withdrawal is delayed. # noqa: E501 + Whether currency's withdrawal is delayed # noqa: E501 :param withdraw_delayed: The withdraw_delayed of this SpotCurrencyChain. # noqa: E501 :type: bool @@ -169,7 +169,7 @@ def withdraw_delayed(self, withdraw_delayed): def deposit_disabled(self): """Gets the deposit_disabled of this SpotCurrencyChain. # noqa: E501 - Whether currency's deposit is disabled. # noqa: E501 + Whether currency's deposit is disabled # noqa: E501 :return: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 :rtype: bool @@ -180,7 +180,7 @@ def deposit_disabled(self): def deposit_disabled(self, deposit_disabled): """Sets the deposit_disabled of this SpotCurrencyChain. - Whether currency's deposit is disabled. # noqa: E501 + Whether currency's deposit is disabled # noqa: E501 :param deposit_disabled: The deposit_disabled of this SpotCurrencyChain. # noqa: E501 :type: bool diff --git a/gate_api/models/spot_fee.py b/gate_api/models/spot_fee.py index c9c322f..0d5327c 100644 --- a/gate_api/models/spot_fee.py +++ b/gate_api/models/spot_fee.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=Non def user_id(self): """Gets the user_id of this SpotFee. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this SpotFee. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SpotFee. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this SpotFee. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def user_id(self, user_id): def taker_fee(self): """Gets the taker_fee of this SpotFee. # noqa: E501 - taker fee rate. # noqa: E501 + taker fee rate # noqa: E501 :return: The taker_fee of this SpotFee. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def taker_fee(self): def taker_fee(self, taker_fee): """Sets the taker_fee of this SpotFee. - taker fee rate. # noqa: E501 + taker fee rate # noqa: E501 :param taker_fee: The taker_fee of this SpotFee. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def taker_fee(self, taker_fee): def maker_fee(self): """Gets the maker_fee of this SpotFee. # noqa: E501 - maker fee rate. # noqa: E501 + maker fee rate # noqa: E501 :return: The maker_fee of this SpotFee. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def maker_fee(self): def maker_fee(self, maker_fee): """Sets the maker_fee of this SpotFee. - maker fee rate. # noqa: E501 + maker fee rate # noqa: E501 :param maker_fee: The maker_fee of this SpotFee. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def maker_fee(self, maker_fee): def gt_discount(self): """Gets the gt_discount of this SpotFee. # noqa: E501 - If GT deduction is enabled. # noqa: E501 + Whether GT deduction discount is enabled # noqa: E501 :return: The gt_discount of this SpotFee. # noqa: E501 :rtype: bool @@ -182,7 +182,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this SpotFee. - If GT deduction is enabled. # noqa: E501 + Whether GT deduction discount is enabled # noqa: E501 :param gt_discount: The gt_discount of this SpotFee. # noqa: E501 :type: bool @@ -217,7 +217,7 @@ def gt_taker_fee(self, gt_taker_fee): def gt_maker_fee(self): """Gets the gt_maker_fee of this SpotFee. # noqa: E501 - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501 :return: The gt_maker_fee of this SpotFee. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def gt_maker_fee(self): def gt_maker_fee(self, gt_maker_fee): """Sets the gt_maker_fee of this SpotFee. - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501 :param gt_maker_fee: The gt_maker_fee of this SpotFee. # noqa: E501 :type: str @@ -240,7 +240,7 @@ def gt_maker_fee(self, gt_maker_fee): def loan_fee(self): """Gets the loan_fee of this SpotFee. # noqa: E501 - Loan fee rate of margin lending. # noqa: E501 + Loan fee rate of margin lending # noqa: E501 :return: The loan_fee of this SpotFee. # noqa: E501 :rtype: str @@ -251,7 +251,7 @@ def loan_fee(self): def loan_fee(self, loan_fee): """Sets the loan_fee of this SpotFee. - Loan fee rate of margin lending. # noqa: E501 + Loan fee rate of margin lending # noqa: E501 :param loan_fee: The loan_fee of this SpotFee. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def loan_fee(self, loan_fee): def point_type(self): """Gets the point_type of this SpotFee. # noqa: E501 - Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 + Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501 :return: The point_type of this SpotFee. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def point_type(self): def point_type(self, point_type): """Sets the point_type of this SpotFee. - Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 + Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501 :param point_type: The point_type of this SpotFee. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def point_type(self, point_type): def currency_pair(self): """Gets the currency_pair of this SpotFee. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this SpotFee. # noqa: E501 :rtype: str @@ -297,7 +297,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this SpotFee. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this SpotFee. # noqa: E501 :type: str diff --git a/gate_api/models/spot_insurance_history.py b/gate_api/models/spot_insurance_history.py index 3c8df1b..249bc6d 100644 --- a/gate_api/models/spot_insurance_history.py +++ b/gate_api/models/spot_insurance_history.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, currency=None, balance=None, time=None, local_vars_configurat def currency(self): """Gets the currency of this SpotInsuranceHistory. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this SpotInsuranceHistory. # noqa: E501 :rtype: str @@ -78,7 +78,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SpotInsuranceHistory. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this SpotInsuranceHistory. # noqa: E501 :type: str @@ -90,7 +90,7 @@ def currency(self, currency): def balance(self): """Gets the balance of this SpotInsuranceHistory. # noqa: E501 - balance. # noqa: E501 + Balance # noqa: E501 :return: The balance of this SpotInsuranceHistory. # noqa: E501 :rtype: str @@ -101,7 +101,7 @@ def balance(self): def balance(self, balance): """Sets the balance of this SpotInsuranceHistory. - balance. # noqa: E501 + Balance # noqa: E501 :param balance: The balance of this SpotInsuranceHistory. # noqa: E501 :type: str @@ -113,7 +113,7 @@ def balance(self, balance): def time(self): """Gets the time of this SpotInsuranceHistory. # noqa: E501 - Creation time, timestamp, milliseconds. # noqa: E501 + Creation time, timestamp, milliseconds # noqa: E501 :return: The time of this SpotInsuranceHistory. # noqa: E501 :rtype: int @@ -124,7 +124,7 @@ def time(self): def time(self, time): """Sets the time of this SpotInsuranceHistory. - Creation time, timestamp, milliseconds. # noqa: E501 + Creation time, timestamp, milliseconds # noqa: E501 :param time: The time of this SpotInsuranceHistory. # noqa: E501 :type: int diff --git a/gate_api/models/spot_price_put_order.py b/gate_api/models/spot_price_put_order.py index 3059392..72cfa78 100644 --- a/gate_api/models/spot_price_put_order.py +++ b/gate_api/models/spot_price_put_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -153,7 +153,7 @@ def side(self, side): def price(self): """Gets the price of this SpotPricePutOrder. # noqa: E501 - Order price. # noqa: E501 + Order price # noqa: E501 :return: The price of this SpotPricePutOrder. # noqa: E501 :rtype: str @@ -164,7 +164,7 @@ def price(self): def price(self, price): """Sets the price of this SpotPricePutOrder. - Order price. # noqa: E501 + Order price # noqa: E501 :param price: The price of this SpotPricePutOrder. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def price(self, price): def amount(self): """Gets the amount of this SpotPricePutOrder. # noqa: E501 - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501 :return: The amount of this SpotPricePutOrder. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SpotPricePutOrder. - When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` # noqa: E501 + Trading quantity When `type` is `limit`, it refers to the base currency (the currency being traded), such as `BTC` in `BTC_USDT` When `type` is `market`, it refers to different currencies based on the side: - `side`: `buy` refers to quote currency, `BTC_USDT` means `USDT` - `side`: `sell` refers to base currency, `BTC_USDT` means `BTC` # noqa: E501 :param amount: The amount of this SpotPricePutOrder. # noqa: E501 :type: str @@ -203,7 +203,7 @@ def amount(self, amount): def account(self): """Gets the account of this SpotPricePutOrder. # noqa: E501 - Trading account type. Portfolio margin account must set to `unified` -normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 + Trading account type. Unified account must be set to `unified` - normal: spot trading - margin: margin trading - unified: unified account # noqa: E501 :return: The account of this SpotPricePutOrder. # noqa: E501 :rtype: str @@ -214,7 +214,7 @@ def account(self): def account(self, account): """Sets the account of this SpotPricePutOrder. - Trading account type. Portfolio margin account must set to `unified` -normal: spot trading - margin: margin trading - unified: unified trading # noqa: E501 + Trading account type. Unified account must be set to `unified` - normal: spot trading - margin: margin trading - unified: unified account # noqa: E501 :param account: The account of this SpotPricePutOrder. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def time_in_force(self, time_in_force): def auto_borrow(self): """Gets the auto_borrow of this SpotPricePutOrder. # noqa: E501 - Whether to borrow coins automatically. # noqa: E501 + Whether to borrow coins automatically # noqa: E501 :return: The auto_borrow of this SpotPricePutOrder. # noqa: E501 :rtype: bool @@ -274,7 +274,7 @@ def auto_borrow(self): def auto_borrow(self, auto_borrow): """Sets the auto_borrow of this SpotPricePutOrder. - Whether to borrow coins automatically. # noqa: E501 + Whether to borrow coins automatically # noqa: E501 :param auto_borrow: The auto_borrow of this SpotPricePutOrder. # noqa: E501 :type: bool @@ -286,7 +286,7 @@ def auto_borrow(self, auto_borrow): def auto_repay(self): """Gets the auto_repay of this SpotPricePutOrder. # noqa: E501 - Whether to repay the loan automatically. # noqa: E501 + Whether to repay the loan automatically # noqa: E501 :return: The auto_repay of this SpotPricePutOrder. # noqa: E501 :rtype: bool @@ -297,7 +297,7 @@ def auto_repay(self): def auto_repay(self, auto_repay): """Sets the auto_repay of this SpotPricePutOrder. - Whether to repay the loan automatically. # noqa: E501 + Whether to repay the loan automatically # noqa: E501 :param auto_repay: The auto_repay of this SpotPricePutOrder. # noqa: E501 :type: bool @@ -309,7 +309,7 @@ def auto_repay(self, auto_repay): def text(self): """Gets the text of this SpotPricePutOrder. # noqa: E501 - The source of the order, including: - web: web - api: api - app: app # noqa: E501 + The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501 :return: The text of this SpotPricePutOrder. # noqa: E501 :rtype: str @@ -320,7 +320,7 @@ def text(self): def text(self, text): """Sets the text of this SpotPricePutOrder. - The source of the order, including: - web: web - api: api - app: app # noqa: E501 + The source of the order, including: - web: Web - api: API call - app: Mobile app # noqa: E501 :param text: The text of this SpotPricePutOrder. # noqa: E501 :type: str diff --git a/gate_api/models/spot_price_trigger.py b/gate_api/models/spot_price_trigger.py index 3eba96a..5e49da6 100644 --- a/gate_api/models/spot_price_trigger.py +++ b/gate_api/models/spot_price_trigger.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -64,7 +64,7 @@ def __init__(self, price=None, rule=None, expiration=None, local_vars_configurat def price(self): """Gets the price of this SpotPriceTrigger. # noqa: E501 - Trigger price. # noqa: E501 + Trigger price # noqa: E501 :return: The price of this SpotPriceTrigger. # noqa: E501 :rtype: str @@ -75,7 +75,7 @@ def price(self): def price(self, price): """Sets the price of this SpotPriceTrigger. - Trigger price. # noqa: E501 + Trigger price # noqa: E501 :param price: The price of this SpotPriceTrigger. # noqa: E501 :type: str @@ -89,7 +89,7 @@ def price(self, price): def rule(self): """Gets the rule of this SpotPriceTrigger. # noqa: E501 - Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: or equal to `price` field # noqa: E501 + Price trigger condition - `>=`: triggered when market price is greater than or equal to `price` - `<=`: triggered when market price is less than or equal to `price` # noqa: E501 :return: The rule of this SpotPriceTrigger. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def rule(self): def rule(self, rule): """Sets the rule of this SpotPriceTrigger. - Price trigger condition - `>=`: triggered when market price larger than or equal to `price` field - `<=`: or equal to `price` field # noqa: E501 + Price trigger condition - `>=`: triggered when market price is greater than or equal to `price` - `<=`: triggered when market price is less than or equal to `price` # noqa: E501 :param rule: The rule of this SpotPriceTrigger. # noqa: E501 :type: str @@ -120,7 +120,7 @@ def rule(self, rule): def expiration(self): """Gets the expiration of this SpotPriceTrigger. # noqa: E501 - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501 :return: The expiration of this SpotPriceTrigger. # noqa: E501 :rtype: int @@ -131,7 +131,7 @@ def expiration(self): def expiration(self, expiration): """Sets the expiration of this SpotPriceTrigger. - How long (in seconds) to wait for the condition to be triggered before cancelling the order. # noqa: E501 + Maximum wait time for trigger condition (in seconds). Order will be cancelled if timeout # noqa: E501 :param expiration: The expiration of this SpotPriceTrigger. # noqa: E501 :type: int diff --git a/gate_api/models/spot_price_triggered_order.py b/gate_api/models/spot_price_triggered_order.py index 0fc0e29..69e14df 100644 --- a/gate_api/models/spot_price_triggered_order.py +++ b/gate_api/models/spot_price_triggered_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -145,7 +145,7 @@ def put(self, put): def id(self): """Gets the id of this SpotPriceTriggeredOrder. # noqa: E501 - Auto order ID. # noqa: E501 + Auto order ID # noqa: E501 :return: The id of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -156,7 +156,7 @@ def id(self): def id(self, id): """Sets the id of this SpotPriceTriggeredOrder. - Auto order ID. # noqa: E501 + Auto order ID # noqa: E501 :param id: The id of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -168,7 +168,7 @@ def id(self, id): def user(self): """Gets the user of this SpotPriceTriggeredOrder. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -179,7 +179,7 @@ def user(self): def user(self, user): """Sets the user of this SpotPriceTriggeredOrder. - User ID. # noqa: E501 + User ID # noqa: E501 :param user: The user of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -191,7 +191,7 @@ def user(self, user): def market(self): """Gets the market of this SpotPriceTriggeredOrder. # noqa: E501 - Currency pair. # noqa: E501 + Market # noqa: E501 :return: The market of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -202,7 +202,7 @@ def market(self): def market(self, market): """Sets the market of this SpotPriceTriggeredOrder. - Currency pair. # noqa: E501 + Market # noqa: E501 :param market: The market of this SpotPriceTriggeredOrder. # noqa: E501 :type: str @@ -216,7 +216,7 @@ def market(self, market): def ctime(self): """Gets the ctime of this SpotPriceTriggeredOrder. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -227,7 +227,7 @@ def ctime(self): def ctime(self, ctime): """Sets the ctime of this SpotPriceTriggeredOrder. - Creation time. # noqa: E501 + Created time # noqa: E501 :param ctime: The ctime of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -239,7 +239,7 @@ def ctime(self, ctime): def ftime(self): """Gets the ftime of this SpotPriceTriggeredOrder. # noqa: E501 - Finished time. # noqa: E501 + End time # noqa: E501 :return: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -250,7 +250,7 @@ def ftime(self): def ftime(self, ftime): """Sets the ftime of this SpotPriceTriggeredOrder. - Finished time. # noqa: E501 + End time # noqa: E501 :param ftime: The ftime of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -262,7 +262,7 @@ def ftime(self, ftime): def fired_order_id(self): """Gets the fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 - ID of the newly created order on condition triggered. # noqa: E501 + ID of the order created after trigger # noqa: E501 :return: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: int @@ -273,7 +273,7 @@ def fired_order_id(self): def fired_order_id(self, fired_order_id): """Sets the fired_order_id of this SpotPriceTriggeredOrder. - ID of the newly created order on condition triggered. # noqa: E501 + ID of the order created after trigger # noqa: E501 :param fired_order_id: The fired_order_id of this SpotPriceTriggeredOrder. # noqa: E501 :type: int @@ -285,7 +285,7 @@ def fired_order_id(self, fired_order_id): def status(self): """Gets the status of this SpotPriceTriggeredOrder. # noqa: E501 - Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501 + Status - open: Running - cancelled: Manually cancelled - finish: Successfully completed - failed: Failed to execute - expired: Expired # noqa: E501 :return: The status of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -296,7 +296,7 @@ def status(self): def status(self, status): """Sets the status of this SpotPriceTriggeredOrder. - Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired # noqa: E501 + Status - open: Running - cancelled: Manually cancelled - finish: Successfully completed - failed: Failed to execute - expired: Expired # noqa: E501 :param status: The status of this SpotPriceTriggeredOrder. # noqa: E501 :type: str @@ -308,7 +308,7 @@ def status(self, status): def reason(self): """Gets the reason of this SpotPriceTriggeredOrder. # noqa: E501 - Additional remarks on how the order was finished. # noqa: E501 + Additional description of how the order was completed # noqa: E501 :return: The reason of this SpotPriceTriggeredOrder. # noqa: E501 :rtype: str @@ -319,7 +319,7 @@ def reason(self): def reason(self, reason): """Sets the reason of this SpotPriceTriggeredOrder. - Additional remarks on how the order was finished. # noqa: E501 + Additional description of how the order was completed # noqa: E501 :param reason: The reason of this SpotPriceTriggeredOrder. # noqa: E501 :type: str diff --git a/gate_api/models/stp_group.py b/gate_api/models/stp_group.py index 5e73856..52ba304 100644 --- a/gate_api/models/stp_group.py +++ b/gate_api/models/stp_group.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -71,7 +71,7 @@ def __init__(self, id=None, name=None, creator_id=None, create_time=None, local_ def id(self): """Gets the id of this StpGroup. # noqa: E501 - STP Group ID. # noqa: E501 + STP Group ID # noqa: E501 :return: The id of this StpGroup. # noqa: E501 :rtype: int @@ -82,7 +82,7 @@ def id(self): def id(self, id): """Sets the id of this StpGroup. - STP Group ID. # noqa: E501 + STP Group ID # noqa: E501 :param id: The id of this StpGroup. # noqa: E501 :type: int @@ -94,7 +94,7 @@ def id(self, id): def name(self): """Gets the name of this StpGroup. # noqa: E501 - STP Group name. # noqa: E501 + STP Group name # noqa: E501 :return: The name of this StpGroup. # noqa: E501 :rtype: str @@ -105,7 +105,7 @@ def name(self): def name(self, name): """Sets the name of this StpGroup. - STP Group name. # noqa: E501 + STP Group name # noqa: E501 :param name: The name of this StpGroup. # noqa: E501 :type: str @@ -119,7 +119,7 @@ def name(self, name): def creator_id(self): """Gets the creator_id of this StpGroup. # noqa: E501 - Creator ID. # noqa: E501 + Creator ID # noqa: E501 :return: The creator_id of this StpGroup. # noqa: E501 :rtype: int @@ -130,7 +130,7 @@ def creator_id(self): def creator_id(self, creator_id): """Sets the creator_id of this StpGroup. - Creator ID. # noqa: E501 + Creator ID # noqa: E501 :param creator_id: The creator_id of this StpGroup. # noqa: E501 :type: int @@ -142,7 +142,7 @@ def creator_id(self, creator_id): def create_time(self): """Gets the create_time of this StpGroup. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this StpGroup. # noqa: E501 :rtype: int @@ -153,7 +153,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this StpGroup. - Creation time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this StpGroup. # noqa: E501 :type: int diff --git a/gate_api/models/stp_group_user.py b/gate_api/models/stp_group_user.py index cac81e2..e6584f3 100644 --- a/gate_api/models/stp_group_user.py +++ b/gate_api/models/stp_group_user.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, user_id=None, stp_id=None, create_time=None, local_vars_confi def user_id(self): """Gets the user_id of this StpGroupUser. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this StpGroupUser. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this StpGroupUser. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this StpGroupUser. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def user_id(self, user_id): def stp_id(self): """Gets the stp_id of this StpGroupUser. # noqa: E501 - STP Group ID. # noqa: E501 + STP Group ID # noqa: E501 :return: The stp_id of this StpGroupUser. # noqa: E501 :rtype: int @@ -101,7 +101,7 @@ def stp_id(self): def stp_id(self, stp_id): """Sets the stp_id of this StpGroupUser. - STP Group ID. # noqa: E501 + STP Group ID # noqa: E501 :param stp_id: The stp_id of this StpGroupUser. # noqa: E501 :type: int @@ -113,7 +113,7 @@ def stp_id(self, stp_id): def create_time(self): """Gets the create_time of this StpGroupUser. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this StpGroupUser. # noqa: E501 :rtype: int @@ -124,7 +124,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this StpGroupUser. - Creation time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this StpGroupUser. # noqa: E501 :type: int diff --git a/gate_api/models/structured_buy.py b/gate_api/models/structured_buy.py index e0d8727..285adf7 100644 --- a/gate_api/models/structured_buy.py +++ b/gate_api/models/structured_buy.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, pid=None, amount=None, local_vars_configuration=None): # noq def pid(self): """Gets the pid of this StructuredBuy. # noqa: E501 - Plan ID. # noqa: E501 + Product ID # noqa: E501 :return: The pid of this StructuredBuy. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def pid(self): def pid(self, pid): """Sets the pid of this StructuredBuy. - Plan ID. # noqa: E501 + Product ID # noqa: E501 :param pid: The pid of this StructuredBuy. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def pid(self, pid): def amount(self): """Gets the amount of this StructuredBuy. # noqa: E501 - Purchase Amount. # noqa: E501 + Buy Quantity # noqa: E501 :return: The amount of this StructuredBuy. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this StructuredBuy. - Purchase Amount. # noqa: E501 + Buy Quantity # noqa: E501 :param amount: The amount of this StructuredBuy. # noqa: E501 :type: str diff --git a/gate_api/models/structured_get_project_list.py b/gate_api/models/structured_get_project_list.py index 2d469a5..664a021 100644 --- a/gate_api/models/structured_get_project_list.py +++ b/gate_api/models/structured_get_project_list.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -112,7 +112,7 @@ def __init__(self, id=None, type=None, name_en=None, investment_coin=None, inves def id(self): """Gets the id of this StructuredGetProjectList. # noqa: E501 - Plan ID. # noqa: E501 + Product ID # noqa: E501 :return: The id of this StructuredGetProjectList. # noqa: E501 :rtype: int @@ -123,7 +123,7 @@ def id(self): def id(self, id): """Sets the id of this StructuredGetProjectList. - Plan ID. # noqa: E501 + Product ID # noqa: E501 :param id: The id of this StructuredGetProjectList. # noqa: E501 :type: int @@ -135,7 +135,7 @@ def id(self, id): def type(self): """Gets the type of this StructuredGetProjectList. # noqa: E501 - product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 + Product Type: `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 :return: The type of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def type(self): def type(self, type): """Sets the type of this StructuredGetProjectList. - product type: `SharkFin2.0`-Shark Fin2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 + Product Type: `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-Range Accrual `SnowBall`-Snow Ball # noqa: E501 :param type: The type of this StructuredGetProjectList. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def type(self, type): def name_en(self): """Gets the name_en of this StructuredGetProjectList. # noqa: E501 - name. # noqa: E501 + Product Name # noqa: E501 :return: The name_en of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def name_en(self): def name_en(self, name_en): """Sets the name_en of this StructuredGetProjectList. - name. # noqa: E501 + Product Name # noqa: E501 :param name_en: The name_en of this StructuredGetProjectList. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def name_en(self, name_en): def investment_coin(self): """Gets the investment_coin of this StructuredGetProjectList. # noqa: E501 - Investment Currency. # noqa: E501 + Investment Token # noqa: E501 :return: The investment_coin of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def investment_coin(self): def investment_coin(self, investment_coin): """Sets the investment_coin of this StructuredGetProjectList. - Investment Currency. # noqa: E501 + Investment Token # noqa: E501 :param investment_coin: The investment_coin of this StructuredGetProjectList. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def investment_coin(self, investment_coin): def investment_period(self): """Gets the investment_period of this StructuredGetProjectList. # noqa: E501 - Investment term. # noqa: E501 + Investment Period # noqa: E501 :return: The investment_period of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def investment_period(self): def investment_period(self, investment_period): """Sets the investment_period of this StructuredGetProjectList. - Investment term. # noqa: E501 + Investment Period # noqa: E501 :param investment_period: The investment_period of this StructuredGetProjectList. # noqa: E501 :type: str @@ -227,7 +227,7 @@ def investment_period(self, investment_period): def min_annual_rate(self): """Gets the min_annual_rate of this StructuredGetProjectList. # noqa: E501 - Minimum annual rate. # noqa: E501 + Minimum Annual Rate # noqa: E501 :return: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -238,7 +238,7 @@ def min_annual_rate(self): def min_annual_rate(self, min_annual_rate): """Sets the min_annual_rate of this StructuredGetProjectList. - Minimum annual rate. # noqa: E501 + Minimum Annual Rate # noqa: E501 :param min_annual_rate: The min_annual_rate of this StructuredGetProjectList. # noqa: E501 :type: str @@ -250,7 +250,7 @@ def min_annual_rate(self, min_annual_rate): def mid_annual_rate(self): """Gets the mid_annual_rate of this StructuredGetProjectList. # noqa: E501 - Intermediate annual rate. # noqa: E501 + Intermediate Annual Rate # noqa: E501 :return: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -261,7 +261,7 @@ def mid_annual_rate(self): def mid_annual_rate(self, mid_annual_rate): """Sets the mid_annual_rate of this StructuredGetProjectList. - Intermediate annual rate. # noqa: E501 + Intermediate Annual Rate # noqa: E501 :param mid_annual_rate: The mid_annual_rate of this StructuredGetProjectList. # noqa: E501 :type: str @@ -273,7 +273,7 @@ def mid_annual_rate(self, mid_annual_rate): def max_annual_rate(self): """Gets the max_annual_rate of this StructuredGetProjectList. # noqa: E501 - Maximum annual rate. # noqa: E501 + Maximum Annual Rate # noqa: E501 :return: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -284,7 +284,7 @@ def max_annual_rate(self): def max_annual_rate(self, max_annual_rate): """Sets the max_annual_rate of this StructuredGetProjectList. - Maximum annual rate. # noqa: E501 + Maximum Annual Rate # noqa: E501 :param max_annual_rate: The max_annual_rate of this StructuredGetProjectList. # noqa: E501 :type: str @@ -296,7 +296,7 @@ def max_annual_rate(self, max_annual_rate): def watch_market(self): """Gets the watch_market of this StructuredGetProjectList. # noqa: E501 - Watch market. # noqa: E501 + Underlying Market # noqa: E501 :return: The watch_market of this StructuredGetProjectList. # noqa: E501 :rtype: str @@ -307,7 +307,7 @@ def watch_market(self): def watch_market(self, watch_market): """Sets the watch_market of this StructuredGetProjectList. - Watch market. # noqa: E501 + Underlying Market # noqa: E501 :param watch_market: The watch_market of this StructuredGetProjectList. # noqa: E501 :type: str @@ -319,7 +319,7 @@ def watch_market(self, watch_market): def start_time(self): """Gets the start_time of this StructuredGetProjectList. # noqa: E501 - start time. # noqa: E501 + Start Time # noqa: E501 :return: The start_time of this StructuredGetProjectList. # noqa: E501 :rtype: int @@ -330,7 +330,7 @@ def start_time(self): def start_time(self, start_time): """Sets the start_time of this StructuredGetProjectList. - start time. # noqa: E501 + Start Time # noqa: E501 :param start_time: The start_time of this StructuredGetProjectList. # noqa: E501 :type: int @@ -342,7 +342,7 @@ def start_time(self, start_time): def end_time(self): """Gets the end_time of this StructuredGetProjectList. # noqa: E501 - Finished time. # noqa: E501 + End time # noqa: E501 :return: The end_time of this StructuredGetProjectList. # noqa: E501 :rtype: int @@ -353,7 +353,7 @@ def end_time(self): def end_time(self, end_time): """Sets the end_time of this StructuredGetProjectList. - Finished time. # noqa: E501 + End time # noqa: E501 :param end_time: The end_time of this StructuredGetProjectList. # noqa: E501 :type: int diff --git a/gate_api/models/structured_order_list.py b/gate_api/models/structured_order_list.py index 6c7caba..4f75222 100644 --- a/gate_api/models/structured_order_list.py +++ b/gate_api/models/structured_order_list.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, id=None, pid=None, lock_coin=None, amount=None, status=None, def id(self): """Gets the id of this StructuredOrderList. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this StructuredOrderList. # noqa: E501 :rtype: int @@ -98,7 +98,7 @@ def id(self): def id(self, id): """Sets the id of this StructuredOrderList. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this StructuredOrderList. # noqa: E501 :type: int @@ -110,7 +110,7 @@ def id(self, id): def pid(self): """Gets the pid of this StructuredOrderList. # noqa: E501 - Plan ID. # noqa: E501 + Product ID # noqa: E501 :return: The pid of this StructuredOrderList. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def pid(self): def pid(self, pid): """Sets the pid of this StructuredOrderList. - Plan ID. # noqa: E501 + Product ID # noqa: E501 :param pid: The pid of this StructuredOrderList. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def pid(self, pid): def lock_coin(self): """Gets the lock_coin of this StructuredOrderList. # noqa: E501 - Locked coin. # noqa: E501 + Locked coin # noqa: E501 :return: The lock_coin of this StructuredOrderList. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def lock_coin(self): def lock_coin(self, lock_coin): """Sets the lock_coin of this StructuredOrderList. - Locked coin. # noqa: E501 + Locked coin # noqa: E501 :param lock_coin: The lock_coin of this StructuredOrderList. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def lock_coin(self, lock_coin): def amount(self): """Gets the amount of this StructuredOrderList. # noqa: E501 - Locked amount. # noqa: E501 + Locked amount # noqa: E501 :return: The amount of this StructuredOrderList. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this StructuredOrderList. - Locked amount. # noqa: E501 + Locked amount # noqa: E501 :param amount: The amount of this StructuredOrderList. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def status(self, status): def income(self): """Gets the income of this StructuredOrderList. # noqa: E501 - Income. # noqa: E501 + Income # noqa: E501 :return: The income of this StructuredOrderList. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def income(self): def income(self, income): """Sets the income of this StructuredOrderList. - Income. # noqa: E501 + Income # noqa: E501 :param income: The income of this StructuredOrderList. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def income(self, income): def create_time(self): """Gets the create_time of this StructuredOrderList. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this StructuredOrderList. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this StructuredOrderList. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this StructuredOrderList. # noqa: E501 :type: int diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py index bac5c96..cd60537 100644 --- a/gate_api/models/sub_account.py +++ b/gate_api/models/sub_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -91,7 +91,7 @@ def __init__(self, remark=None, login_name=None, password=None, email=None, stat def remark(self): """Gets the remark of this SubAccount. # noqa: E501 - custom text. # noqa: E501 + Remark # noqa: E501 :return: The remark of this SubAccount. # noqa: E501 :rtype: str @@ -102,7 +102,7 @@ def remark(self): def remark(self, remark): """Sets the remark of this SubAccount. - custom text. # noqa: E501 + Remark # noqa: E501 :param remark: The remark of this SubAccount. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def remark(self, remark): def login_name(self): """Gets the login_name of this SubAccount. # noqa: E501 - Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501 + 子账户登陆名:仅支持字母、数字、下划线,不可包含其他非法字符。 # noqa: E501 :return: The login_name of this SubAccount. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def login_name(self): def login_name(self, login_name): """Sets the login_name of this SubAccount. - Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501 + 子账户登陆名:仅支持字母、数字、下划线,不可包含其他非法字符。 # noqa: E501 :param login_name: The login_name of this SubAccount. # noqa: E501 :type: str @@ -139,7 +139,7 @@ def login_name(self, login_name): def password(self): """Gets the password of this SubAccount. # noqa: E501 - The sub-account's password. (Default: the same as main account's password). # noqa: E501 + The sub-account's password. (Default: the same as main account's password) # noqa: E501 :return: The password of this SubAccount. # noqa: E501 :rtype: str @@ -150,7 +150,7 @@ def password(self): def password(self, password): """Sets the password of this SubAccount. - The sub-account's password. (Default: the same as main account's password). # noqa: E501 + The sub-account's password. (Default: the same as main account's password) # noqa: E501 :param password: The password of this SubAccount. # noqa: E501 :type: str @@ -185,7 +185,7 @@ def email(self, email): def state(self): """Gets the state of this SubAccount. # noqa: E501 - State: 1-normal, 2-locked\". # noqa: E501 + Sub-account status: 1-normal, 2-locked # noqa: E501 :return: The state of this SubAccount. # noqa: E501 :rtype: int @@ -196,7 +196,7 @@ def state(self): def state(self, state): """Sets the state of this SubAccount. - State: 1-normal, 2-locked\". # noqa: E501 + Sub-account status: 1-normal, 2-locked # noqa: E501 :param state: The state of this SubAccount. # noqa: E501 :type: int @@ -208,7 +208,7 @@ def state(self, state): def type(self): """Gets the type of this SubAccount. # noqa: E501 - \"Sub-account type: 1 - sub-account, 3 - cross margin account. # noqa: E501 + Sub-account type: 1-Regular sub-account, 3-Cross margin sub-account # noqa: E501 :return: The type of this SubAccount. # noqa: E501 :rtype: int @@ -219,7 +219,7 @@ def type(self): def type(self, type): """Sets the type of this SubAccount. - \"Sub-account type: 1 - sub-account, 3 - cross margin account. # noqa: E501 + Sub-account type: 1-Regular sub-account, 3-Cross margin sub-account # noqa: E501 :param type: The type of this SubAccount. # noqa: E501 :type: int @@ -231,7 +231,7 @@ def type(self, type): def user_id(self): """Gets the user_id of this SubAccount. # noqa: E501 - The user id of the sub-account. # noqa: E501 + Sub-account user ID # noqa: E501 :return: The user_id of this SubAccount. # noqa: E501 :rtype: int @@ -242,7 +242,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SubAccount. - The user id of the sub-account. # noqa: E501 + Sub-account user ID # noqa: E501 :param user_id: The user_id of this SubAccount. # noqa: E501 :type: int @@ -254,7 +254,7 @@ def user_id(self, user_id): def create_time(self): """Gets the create_time of this SubAccount. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this SubAccount. # noqa: E501 :rtype: int @@ -265,7 +265,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this SubAccount. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this SubAccount. # noqa: E501 :type: int diff --git a/gate_api/models/sub_account_balance.py b/gate_api/models/sub_account_balance.py index fa82fa7..7af2fb8 100644 --- a/gate_api/models/sub_account_balance.py +++ b/gate_api/models/sub_account_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountBalance. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The uid of this SubAccountBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountBalance. - User ID. # noqa: E501 + User ID # noqa: E501 :param uid: The uid of this SubAccountBalance. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def uid(self, uid): def available(self): """Gets the available of this SubAccountBalance. # noqa: E501 - Available balances of currencies. # noqa: E501 + Available balances of currencies # noqa: E501 :return: The available of this SubAccountBalance. # noqa: E501 :rtype: dict(str, str) @@ -96,7 +96,7 @@ def available(self): def available(self, available): """Sets the available of this SubAccountBalance. - Available balances of currencies. # noqa: E501 + Available balances of currencies # noqa: E501 :param available: The available of this SubAccountBalance. # noqa: E501 :type: dict(str, str) diff --git a/gate_api/models/sub_account_cross_margin_balance.py b/gate_api/models/sub_account_cross_margin_balance.py index 69d1352..524294f 100644 --- a/gate_api/models/sub_account_cross_margin_balance.py +++ b/gate_api/models/sub_account_cross_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountCrossMarginBalance. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The uid of this SubAccountCrossMarginBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountCrossMarginBalance. - User ID. # noqa: E501 + User ID # noqa: E501 :param uid: The uid of this SubAccountCrossMarginBalance. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_futures_balance.py b/gate_api/models/sub_account_futures_balance.py index b783058..c499b88 100644 --- a/gate_api/models/sub_account_futures_balance.py +++ b/gate_api/models/sub_account_futures_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountFuturesBalance. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The uid of this SubAccountFuturesBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountFuturesBalance. - User ID. # noqa: E501 + User ID # noqa: E501 :param uid: The uid of this SubAccountFuturesBalance. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def uid(self, uid): def available(self): """Gets the available of this SubAccountFuturesBalance. # noqa: E501 - Futures account balances. # noqa: E501 + Futures account balances # noqa: E501 :return: The available of this SubAccountFuturesBalance. # noqa: E501 :rtype: dict(str, FuturesAccount) @@ -96,7 +96,7 @@ def available(self): def available(self, available): """Sets the available of this SubAccountFuturesBalance. - Futures account balances. # noqa: E501 + Futures account balances # noqa: E501 :param available: The available of this SubAccountFuturesBalance. # noqa: E501 :type: dict(str, FuturesAccount) diff --git a/gate_api/models/sub_account_key.py b/gate_api/models/sub_account_key.py index 139a0fe..c644eb6 100644 --- a/gate_api/models/sub_account_key.py +++ b/gate_api/models/sub_account_key.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, user_id=None, mode=None, name=None, perms=None, ip_whitelist= def user_id(self): """Gets the user_id of this SubAccountKey. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this SubAccountKey. # noqa: E501 :rtype: int @@ -113,7 +113,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SubAccountKey. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this SubAccountKey. # noqa: E501 :type: int @@ -125,7 +125,7 @@ def user_id(self, user_id): def mode(self): """Gets the mode of this SubAccountKey. # noqa: E501 - Mode: 1 - classic 2 - portfolio account. # noqa: E501 + Mode: 1 - classic 2 - portfolio account # noqa: E501 :return: The mode of this SubAccountKey. # noqa: E501 :rtype: int @@ -136,7 +136,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this SubAccountKey. - Mode: 1 - classic 2 - portfolio account. # noqa: E501 + Mode: 1 - classic 2 - portfolio account # noqa: E501 :param mode: The mode of this SubAccountKey. # noqa: E501 :type: int @@ -148,7 +148,7 @@ def mode(self, mode): def name(self): """Gets the name of this SubAccountKey. # noqa: E501 - API key name. # noqa: E501 + API Key Name # noqa: E501 :return: The name of this SubAccountKey. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def name(self): def name(self, name): """Sets the name of this SubAccountKey. - API key name. # noqa: E501 + API Key Name # noqa: E501 :param name: The name of this SubAccountKey. # noqa: E501 :type: str @@ -192,7 +192,7 @@ def perms(self, perms): def ip_whitelist(self): """Gets the ip_whitelist of this SubAccountKey. # noqa: E501 - ip white list (list will be removed if no value is passed). # noqa: E501 + IP whitelist (list will be cleared if no value is passed) # noqa: E501 :return: The ip_whitelist of this SubAccountKey. # noqa: E501 :rtype: list[str] @@ -203,7 +203,7 @@ def ip_whitelist(self): def ip_whitelist(self, ip_whitelist): """Sets the ip_whitelist of this SubAccountKey. - ip white list (list will be removed if no value is passed). # noqa: E501 + IP whitelist (list will be cleared if no value is passed) # noqa: E501 :param ip_whitelist: The ip_whitelist of this SubAccountKey. # noqa: E501 :type: list[str] @@ -215,7 +215,7 @@ def ip_whitelist(self, ip_whitelist): def key(self): """Gets the key of this SubAccountKey. # noqa: E501 - API Key. # noqa: E501 + API Key # noqa: E501 :return: The key of this SubAccountKey. # noqa: E501 :rtype: str @@ -226,7 +226,7 @@ def key(self): def key(self, key): """Sets the key of this SubAccountKey. - API Key. # noqa: E501 + API Key # noqa: E501 :param key: The key of this SubAccountKey. # noqa: E501 :type: str @@ -238,7 +238,7 @@ def key(self, key): def state(self): """Gets the state of this SubAccountKey. # noqa: E501 - State 1 - normal 2 - locked 3 - frozen. # noqa: E501 + Status: 1-Normal 2-Frozen 3-Locked # noqa: E501 :return: The state of this SubAccountKey. # noqa: E501 :rtype: int @@ -249,7 +249,7 @@ def state(self): def state(self, state): """Sets the state of this SubAccountKey. - State 1 - normal 2 - locked 3 - frozen. # noqa: E501 + Status: 1-Normal 2-Frozen 3-Locked # noqa: E501 :param state: The state of this SubAccountKey. # noqa: E501 :type: int @@ -261,7 +261,7 @@ def state(self, state): def created_at(self): """Gets the created_at of this SubAccountKey. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The created_at of this SubAccountKey. # noqa: E501 :rtype: int @@ -272,7 +272,7 @@ def created_at(self): def created_at(self, created_at): """Sets the created_at of this SubAccountKey. - Creation time. # noqa: E501 + Created time # noqa: E501 :param created_at: The created_at of this SubAccountKey. # noqa: E501 :type: int @@ -284,7 +284,7 @@ def created_at(self, created_at): def updated_at(self): """Gets the updated_at of this SubAccountKey. # noqa: E501 - Last update time. # noqa: E501 + Last Update Time # noqa: E501 :return: The updated_at of this SubAccountKey. # noqa: E501 :rtype: int @@ -295,7 +295,7 @@ def updated_at(self): def updated_at(self, updated_at): """Sets the updated_at of this SubAccountKey. - Last update time. # noqa: E501 + Last Update Time # noqa: E501 :param updated_at: The updated_at of this SubAccountKey. # noqa: E501 :type: int @@ -307,7 +307,7 @@ def updated_at(self, updated_at): def last_access(self): """Gets the last_access of this SubAccountKey. # noqa: E501 - Last access time. # noqa: E501 + Last Access Time # noqa: E501 :return: The last_access of this SubAccountKey. # noqa: E501 :rtype: int @@ -318,7 +318,7 @@ def last_access(self): def last_access(self, last_access): """Sets the last_access of this SubAccountKey. - Last access time. # noqa: E501 + Last Access Time # noqa: E501 :param last_access: The last_access of this SubAccountKey. # noqa: E501 :type: int diff --git a/gate_api/models/sub_account_key_perms.py b/gate_api/models/sub_account_key_perms.py index f0a9f32..fa9a9f3 100644 --- a/gate_api/models/sub_account_key_perms.py +++ b/gate_api/models/sub_account_key_perms.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, name=None, read_only=None, local_vars_configuration=None): # def name(self): """Gets the name of this SubAccountKeyPerms. # noqa: E501 - Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy # noqa: E501 + Permission function name (no value will be cleared) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery contract - earn: earn - custody: custody - options: options - account: account information - loan: lending - margin: margin - unified: unified account - copy: copy trading # noqa: E501 :return: The name of this SubAccountKeyPerms. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def name(self): def name(self, name): """Sets the name of this SubAccountKeyPerms. - Permission function name (no value will be cleared) - wallet: wallet - spot: spot/leverage - futures: perpetual contract - delivery: delivery contract - earn: financial management - custody: custody - options: options - account: account information - loan: loan - margin: leverage - unified: unified account - copy: copy # noqa: E501 + Permission function name (no value will be cleared) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery contract - earn: earn - custody: custody - options: options - account: account information - loan: lending - margin: margin - unified: unified account - copy: copy trading # noqa: E501 :param name: The name of this SubAccountKeyPerms. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def name(self, name): def read_only(self): """Gets the read_only of this SubAccountKeyPerms. # noqa: E501 - read only. # noqa: E501 + Read Only # noqa: E501 :return: The read_only of this SubAccountKeyPerms. # noqa: E501 :rtype: bool @@ -96,7 +96,7 @@ def read_only(self): def read_only(self, read_only): """Sets the read_only of this SubAccountKeyPerms. - read only. # noqa: E501 + Read Only # noqa: E501 :param read_only: The read_only of this SubAccountKeyPerms. # noqa: E501 :type: bool diff --git a/gate_api/models/sub_account_margin_balance.py b/gate_api/models/sub_account_margin_balance.py index ed03b66..22d8025 100644 --- a/gate_api/models/sub_account_margin_balance.py +++ b/gate_api/models/sub_account_margin_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, uid=None, available=None, local_vars_configuration=None): # def uid(self): """Gets the uid of this SubAccountMarginBalance. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The uid of this SubAccountMarginBalance. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountMarginBalance. - User ID. # noqa: E501 + User ID # noqa: E501 :param uid: The uid of this SubAccountMarginBalance. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def uid(self, uid): def available(self): """Gets the available of this SubAccountMarginBalance. # noqa: E501 - Margin account balances. # noqa: E501 + Margin account balances # noqa: E501 :return: The available of this SubAccountMarginBalance. # noqa: E501 :rtype: list[MarginAccount] @@ -96,7 +96,7 @@ def available(self): def available(self, available): """Sets the available of this SubAccountMarginBalance. - Margin account balances. # noqa: E501 + Margin account balances # noqa: E501 :param available: The available of this SubAccountMarginBalance. # noqa: E501 :type: list[MarginAccount] diff --git a/gate_api/models/sub_account_to_sub_account.py b/gate_api/models/sub_account_to_sub_account.py index ff353ad..c082521 100644 --- a/gate_api/models/sub_account_to_sub_account.py +++ b/gate_api/models/sub_account_to_sub_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -81,7 +81,7 @@ def __init__(self, currency=None, sub_account_type=None, sub_account_from=None, def currency(self): """Gets the currency of this SubAccountToSubAccount. # noqa: E501 - Transfer currency name. # noqa: E501 + Transfer currency name # noqa: E501 :return: The currency of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -92,7 +92,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SubAccountToSubAccount. - Transfer currency name. # noqa: E501 + Transfer currency name # noqa: E501 :param currency: The currency of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -106,7 +106,7 @@ def currency(self, currency): def sub_account_type(self): """Gets the sub_account_type of this SubAccountToSubAccount. # noqa: E501 - Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 + Transfer from account (deprecated, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 :return: The sub_account_type of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -117,7 +117,7 @@ def sub_account_type(self): def sub_account_type(self, sub_account_type): """Sets the sub_account_type of this SubAccountToSubAccount. - Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 + Transfer from account (deprecated, use `sub_account_from_type` and `sub_account_to_type` instead) # noqa: E501 :param sub_account_type: The sub_account_type of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -129,7 +129,7 @@ def sub_account_type(self, sub_account_type): def sub_account_from(self): """Gets the sub_account_from of this SubAccountToSubAccount. # noqa: E501 - Transfer from the user id of the sub-account. # noqa: E501 + Transfer from the user id of the sub-account # noqa: E501 :return: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -140,7 +140,7 @@ def sub_account_from(self): def sub_account_from(self, sub_account_from): """Sets the sub_account_from of this SubAccountToSubAccount. - Transfer from the user id of the sub-account. # noqa: E501 + Transfer from the user id of the sub-account # noqa: E501 :param sub_account_from: The sub_account_from of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -154,7 +154,7 @@ def sub_account_from(self, sub_account_from): def sub_account_from_type(self): """Gets the sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 - The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. # noqa: E501 + Source sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 :return: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -165,7 +165,7 @@ def sub_account_from_type(self): def sub_account_from_type(self, sub_account_from_type): """Sets the sub_account_from_type of this SubAccountToSubAccount. - The sub-account's outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. # noqa: E501 + Source sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 :param sub_account_from_type: The sub_account_from_type of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def sub_account_from_type(self, sub_account_from_type): def sub_account_to(self): """Gets the sub_account_to of this SubAccountToSubAccount. # noqa: E501 - Transfer to the user id of the sub-account. # noqa: E501 + Transfer to the user id of the sub-account # noqa: E501 :return: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def sub_account_to(self): def sub_account_to(self, sub_account_to): """Sets the sub_account_to of this SubAccountToSubAccount. - Transfer to the user id of the sub-account. # noqa: E501 + Transfer to the user id of the sub-account # noqa: E501 :param sub_account_to: The sub_account_to of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def sub_account_to(self, sub_account_to): def sub_account_to_type(self): """Gets the sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 - Transferred sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 + Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 :return: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def sub_account_to_type(self): def sub_account_to_type(self, sub_account_to_type): """Sets the sub_account_to_type of this SubAccountToSubAccount. - Transferred sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 + Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account # noqa: E501 :param sub_account_to_type: The sub_account_to_type of this SubAccountToSubAccount. # noqa: E501 :type: str @@ -229,7 +229,7 @@ def sub_account_to_type(self, sub_account_to_type): def amount(self): """Gets the amount of this SubAccountToSubAccount. # noqa: E501 - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :return: The amount of this SubAccountToSubAccount. # noqa: E501 :rtype: str @@ -240,7 +240,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SubAccountToSubAccount. - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :param amount: The amount of this SubAccountToSubAccount. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_transfer.py b/gate_api/models/sub_account_transfer.py index 09ff172..9ab7c79 100644 --- a/gate_api/models/sub_account_transfer.py +++ b/gate_api/models/sub_account_transfer.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -78,7 +78,7 @@ def __init__(self, sub_account=None, sub_account_type='spot', currency=None, amo def sub_account(self): """Gets the sub_account of this SubAccountTransfer. # noqa: E501 - Sub account user ID. # noqa: E501 + Sub account user ID # noqa: E501 :return: The sub_account of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -89,7 +89,7 @@ def sub_account(self): def sub_account(self, sub_account): """Sets the sub_account of this SubAccountTransfer. - Sub account user ID. # noqa: E501 + Sub account user ID # noqa: E501 :param sub_account: The sub_account of this SubAccountTransfer. # noqa: E501 :type: str @@ -103,7 +103,7 @@ def sub_account(self, sub_account): def sub_account_type(self): """Gets the sub_account_type of this SubAccountTransfer. # noqa: E501 - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501 :return: The sub_account_type of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -114,7 +114,7 @@ def sub_account_type(self): def sub_account_type(self, sub_account_type): """Sets the sub_account_type of this SubAccountTransfer. - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501 :param sub_account_type: The sub_account_type of this SubAccountTransfer. # noqa: E501 :type: str @@ -126,7 +126,7 @@ def sub_account_type(self, sub_account_type): def currency(self): """Gets the currency of this SubAccountTransfer. # noqa: E501 - Transfer currency name. # noqa: E501 + Transfer currency name # noqa: E501 :return: The currency of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -137,7 +137,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SubAccountTransfer. - Transfer currency name. # noqa: E501 + Transfer currency name # noqa: E501 :param currency: The currency of this SubAccountTransfer. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this SubAccountTransfer. # noqa: E501 - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :return: The amount of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SubAccountTransfer. - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :param amount: The amount of this SubAccountTransfer. # noqa: E501 :type: str @@ -176,7 +176,7 @@ def amount(self, amount): def direction(self): """Gets the direction of this SubAccountTransfer. # noqa: E501 - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501 :return: The direction of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -187,7 +187,7 @@ def direction(self): def direction(self, direction): """Sets the direction of this SubAccountTransfer. - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501 :param direction: The direction of this SubAccountTransfer. # noqa: E501 :type: str @@ -201,7 +201,7 @@ def direction(self, direction): def client_order_id(self): """Gets the client_order_id of this SubAccountTransfer. # noqa: E501 - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501 :return: The client_order_id of this SubAccountTransfer. # noqa: E501 :rtype: str @@ -212,7 +212,7 @@ def client_order_id(self): def client_order_id(self, client_order_id): """Sets the client_order_id of this SubAccountTransfer. - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501 :param client_order_id: The client_order_id of this SubAccountTransfer. # noqa: E501 :type: str diff --git a/gate_api/models/sub_account_transfer_record_item.py b/gate_api/models/sub_account_transfer_record_item.py index ed02651..650a595 100644 --- a/gate_api/models/sub_account_transfer_record_item.py +++ b/gate_api/models/sub_account_transfer_record_item.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -98,7 +98,7 @@ def __init__(self, timest=None, uid=None, sub_account=None, sub_account_type='sp def timest(self): """Gets the timest of this SubAccountTransferRecordItem. # noqa: E501 - Transfer timestamp. # noqa: E501 + Transfer timestamp # noqa: E501 :return: The timest of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -109,7 +109,7 @@ def timest(self): def timest(self, timest): """Sets the timest of this SubAccountTransferRecordItem. - Transfer timestamp. # noqa: E501 + Transfer timestamp # noqa: E501 :param timest: The timest of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -121,7 +121,7 @@ def timest(self, timest): def uid(self): """Gets the uid of this SubAccountTransferRecordItem. # noqa: E501 - Main account user ID. # noqa: E501 + Main account user ID # noqa: E501 :return: The uid of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -132,7 +132,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SubAccountTransferRecordItem. - Main account user ID. # noqa: E501 + Main account user ID # noqa: E501 :param uid: The uid of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -144,7 +144,7 @@ def uid(self, uid): def sub_account(self): """Gets the sub_account of this SubAccountTransferRecordItem. # noqa: E501 - Sub account user ID. # noqa: E501 + Sub account user ID # noqa: E501 :return: The sub_account of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -155,7 +155,7 @@ def sub_account(self): def sub_account(self, sub_account): """Sets the sub_account of this SubAccountTransferRecordItem. - Sub account user ID. # noqa: E501 + Sub account user ID # noqa: E501 :param sub_account: The sub_account of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def sub_account(self, sub_account): def sub_account_type(self): """Gets the sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501 :return: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def sub_account_type(self): def sub_account_type(self, sub_account_type): """Sets the sub_account_type of this SubAccountTransferRecordItem. - Target sub user's account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account # noqa: E501 + Target sub-account trading account: spot - spot account, futures - perpetual contract account, delivery - delivery contract account, options - options account # noqa: E501 :param sub_account_type: The sub_account_type of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -192,7 +192,7 @@ def sub_account_type(self, sub_account_type): def currency(self): """Gets the currency of this SubAccountTransferRecordItem. # noqa: E501 - Transfer currency name. # noqa: E501 + Transfer currency name # noqa: E501 :return: The currency of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -203,7 +203,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this SubAccountTransferRecordItem. - Transfer currency name. # noqa: E501 + Transfer currency name # noqa: E501 :param currency: The currency of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this SubAccountTransferRecordItem. # noqa: E501 - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :return: The amount of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SubAccountTransferRecordItem. - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :param amount: The amount of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -242,7 +242,7 @@ def amount(self, amount): def direction(self): """Gets the direction of this SubAccountTransferRecordItem. # noqa: E501 - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501 :return: The direction of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def direction(self): def direction(self, direction): """Sets the direction of this SubAccountTransferRecordItem. - Transfer direction. to - transfer into sub account; from - transfer out from sub account # noqa: E501 + Transfer direction: to - transfer into sub-account, from - transfer out from sub-account # noqa: E501 :param direction: The direction of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -267,7 +267,7 @@ def direction(self, direction): def source(self): """Gets the source of this SubAccountTransferRecordItem. # noqa: E501 - Where the operation is initiated from. # noqa: E501 + Source of the transfer operation # noqa: E501 :return: The source of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -278,7 +278,7 @@ def source(self): def source(self, source): """Sets the source of this SubAccountTransferRecordItem. - Where the operation is initiated from. # noqa: E501 + Source of the transfer operation # noqa: E501 :param source: The source of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -290,7 +290,7 @@ def source(self, source): def client_order_id(self): """Gets the client_order_id of this SubAccountTransferRecordItem. # noqa: E501 - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501 :return: The client_order_id of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -301,7 +301,7 @@ def client_order_id(self): def client_order_id(self, client_order_id): """Sets the client_order_id of this SubAccountTransferRecordItem. - The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_', with a length ranging from 1 to 64 characters. # noqa: E501 + Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters # noqa: E501 :param client_order_id: The client_order_id of this SubAccountTransferRecordItem. # noqa: E501 :type: str @@ -313,7 +313,7 @@ def client_order_id(self, client_order_id): def status(self): """Gets the status of this SubAccountTransferRecordItem. # noqa: E501 - Sub-account transfer record status, currently only success. # noqa: E501 + Sub-account transfer record status, currently only 'success' # noqa: E501 :return: The status of this SubAccountTransferRecordItem. # noqa: E501 :rtype: str @@ -324,7 +324,7 @@ def status(self): def status(self, status): """Sets the status of this SubAccountTransferRecordItem. - Sub-account transfer record status, currently only success. # noqa: E501 + Sub-account transfer record status, currently only 'success' # noqa: E501 :param status: The status of this SubAccountTransferRecordItem. # noqa: E501 :type: str diff --git a/gate_api/models/sub_cross_margin_account.py b/gate_api/models/sub_cross_margin_account.py index 3f877de..0e43bca 100644 --- a/gate_api/models/sub_cross_margin_account.py +++ b/gate_api/models/sub_cross_margin_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -132,7 +132,7 @@ def __init__(self, user_id=None, locked=None, balances=None, total=None, borrowe def user_id(self): """Gets the user_id of this SubCrossMarginAccount. # noqa: E501 - User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501 + Cross margin account user ID. 0 means this sub-account has not yet opened a cross margin account # noqa: E501 :return: The user_id of this SubCrossMarginAccount. # noqa: E501 :rtype: int @@ -143,7 +143,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SubCrossMarginAccount. - User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account # noqa: E501 + Cross margin account user ID. 0 means this sub-account has not yet opened a cross margin account # noqa: E501 :param user_id: The user_id of this SubCrossMarginAccount. # noqa: E501 :type: int @@ -155,7 +155,7 @@ def user_id(self, user_id): def locked(self): """Gets the locked of this SubCrossMarginAccount. # noqa: E501 - Whether account is locked. # noqa: E501 + Whether the account is locked # noqa: E501 :return: The locked of this SubCrossMarginAccount. # noqa: E501 :rtype: bool @@ -166,7 +166,7 @@ def locked(self): def locked(self, locked): """Sets the locked of this SubCrossMarginAccount. - Whether account is locked. # noqa: E501 + Whether the account is locked # noqa: E501 :param locked: The locked of this SubCrossMarginAccount. # noqa: E501 :type: bool @@ -245,7 +245,7 @@ def borrowed(self, borrowed): def borrowed_net(self): """Gets the borrowed_net of this SubCrossMarginAccount. # noqa: E501 - Total borrowed value in USDT * borrowed factor. # noqa: E501 + Total borrowed value in USDT * leverage factor # noqa: E501 :return: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -256,7 +256,7 @@ def borrowed_net(self): def borrowed_net(self, borrowed_net): """Sets the borrowed_net of this SubCrossMarginAccount. - Total borrowed value in USDT * borrowed factor. # noqa: E501 + Total borrowed value in USDT * leverage factor # noqa: E501 :param borrowed_net: The borrowed_net of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -268,7 +268,7 @@ def borrowed_net(self, borrowed_net): def net(self): """Gets the net of this SubCrossMarginAccount. # noqa: E501 - Total net assets in USDT. # noqa: E501 + Total net assets in USDT # noqa: E501 :return: The net of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -279,7 +279,7 @@ def net(self): def net(self, net): """Sets the net of this SubCrossMarginAccount. - Total net assets in USDT. # noqa: E501 + Total net assets in USDT # noqa: E501 :param net: The net of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -291,7 +291,7 @@ def net(self, net): def leverage(self): """Gets the leverage of this SubCrossMarginAccount. # noqa: E501 - Position leverage. # noqa: E501 + Position leverage # 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 + Position leverage # noqa: E501 :param leverage: The leverage of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -314,7 +314,7 @@ def leverage(self, leverage): def interest(self): """Gets the interest of this SubCrossMarginAccount. # noqa: E501 - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 + Total unpaid interest in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 :return: The interest of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -325,7 +325,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this SubCrossMarginAccount. - Total unpaid interests in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 + Total unpaid interest in USDT, i.e., the sum of all currencies' `interest*price*discount` # noqa: E501 :param interest: The interest of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -337,7 +337,7 @@ def interest(self, interest): def risk(self): """Gets the risk of this SubCrossMarginAccount. # noqa: E501 - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 + Risk rate. When it falls below 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 :return: The risk of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -348,7 +348,7 @@ def risk(self): def risk(self, risk): """Sets the risk of this SubCrossMarginAccount. - Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 + Risk rate. When it falls below 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` # noqa: E501 :param risk: The risk of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -360,7 +360,7 @@ def risk(self, risk): def total_initial_margin(self): """Gets the total_initial_margin of this SubCrossMarginAccount. # noqa: E501 - Total initial margin. # noqa: E501 + Total initial margin # noqa: E501 :return: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -371,7 +371,7 @@ def total_initial_margin(self): def total_initial_margin(self, total_initial_margin): """Sets the total_initial_margin of this SubCrossMarginAccount. - Total initial margin. # noqa: E501 + Total initial margin # noqa: E501 :param total_initial_margin: The total_initial_margin of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -383,7 +383,7 @@ def total_initial_margin(self, total_initial_margin): def total_margin_balance(self): """Gets the total_margin_balance of this SubCrossMarginAccount. # noqa: E501 - Total margin balance. # noqa: E501 + Total margin balance # noqa: E501 :return: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -394,7 +394,7 @@ def total_margin_balance(self): def total_margin_balance(self, total_margin_balance): """Sets the total_margin_balance of this SubCrossMarginAccount. - Total margin balance. # noqa: E501 + Total margin balance # noqa: E501 :param total_margin_balance: The total_margin_balance of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -406,7 +406,7 @@ def total_margin_balance(self, total_margin_balance): def total_maintenance_margin(self): """Gets the total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 - Total maintenance margin. # noqa: E501 + Total maintenance margin # noqa: E501 :return: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -417,7 +417,7 @@ def total_maintenance_margin(self): def total_maintenance_margin(self, total_maintenance_margin): """Sets the total_maintenance_margin of this SubCrossMarginAccount. - Total maintenance margin. # noqa: E501 + Total maintenance margin # noqa: E501 :param total_maintenance_margin: The total_maintenance_margin of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -429,7 +429,7 @@ def total_maintenance_margin(self, total_maintenance_margin): def total_initial_margin_rate(self): """Gets the total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 - Total initial margin rate. # noqa: E501 + Total initial margin rate # noqa: E501 :return: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -440,7 +440,7 @@ def total_initial_margin_rate(self): def total_initial_margin_rate(self, total_initial_margin_rate): """Sets the total_initial_margin_rate of this SubCrossMarginAccount. - Total initial margin rate. # noqa: E501 + Total initial margin rate # noqa: E501 :param total_initial_margin_rate: The total_initial_margin_rate of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -452,7 +452,7 @@ def total_initial_margin_rate(self, total_initial_margin_rate): def total_maintenance_margin_rate(self): """Gets the total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 - Total maintenance margin rate. # noqa: E501 + Total maintenance margin rate # noqa: E501 :return: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -463,7 +463,7 @@ def total_maintenance_margin_rate(self): def total_maintenance_margin_rate(self, total_maintenance_margin_rate): """Sets the total_maintenance_margin_rate of this SubCrossMarginAccount. - Total maintenance margin rate. # noqa: E501 + Total maintenance margin rate # noqa: E501 :param total_maintenance_margin_rate: The total_maintenance_margin_rate of this SubCrossMarginAccount. # noqa: E501 :type: str @@ -475,7 +475,7 @@ def total_maintenance_margin_rate(self, total_maintenance_margin_rate): def total_available_margin(self): """Gets the total_available_margin of this SubCrossMarginAccount. # noqa: E501 - Total available margin. # noqa: E501 + Total available margin # noqa: E501 :return: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 :rtype: str @@ -486,7 +486,7 @@ def total_available_margin(self): def total_available_margin(self, total_available_margin): """Sets the total_available_margin of this SubCrossMarginAccount. - Total available margin. # noqa: E501 + Total available margin # noqa: E501 :param total_available_margin: The total_available_margin of this SubCrossMarginAccount. # noqa: E501 :type: str diff --git a/gate_api/models/sub_user_mode.py b/gate_api/models/sub_user_mode.py index e9ba6cf..2c73505 100644 --- a/gate_api/models/sub_user_mode.py +++ b/gate_api/models/sub_user_mode.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, user_id=None, is_unified=None, mode=None, local_vars_configur def user_id(self): """Gets the user_id of this SubUserMode. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this SubUserMode. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this SubUserMode. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this SubUserMode. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def user_id(self, user_id): def is_unified(self): """Gets the is_unified of this SubUserMode. # noqa: E501 - Is it a unified account?. # noqa: E501 + Whether it is a unified account # noqa: E501 :return: The is_unified of this SubUserMode. # noqa: E501 :rtype: bool @@ -101,7 +101,7 @@ def is_unified(self): def is_unified(self, is_unified): """Sets the is_unified of this SubUserMode. - Is it a unified account?. # noqa: E501 + Whether it is a unified account # noqa: E501 :param is_unified: The is_unified of this SubUserMode. # noqa: E501 :type: bool @@ -113,7 +113,7 @@ def is_unified(self, is_unified): def mode(self): """Gets the mode of this SubUserMode. # noqa: E501 - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 :return: The mode of this SubUserMode. # noqa: E501 :rtype: str @@ -124,7 +124,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this SubUserMode. - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode # noqa: E501 :param mode: The mode of this SubUserMode. # noqa: E501 :type: str diff --git a/gate_api/models/swap_coin.py b/gate_api/models/swap_coin.py index c32db80..14d56e4 100644 --- a/gate_api/models/swap_coin.py +++ b/gate_api/models/swap_coin.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -69,7 +69,7 @@ def __init__(self, coin=None, side=None, amount=None, pid=None, local_vars_confi def coin(self): """Gets the coin of this SwapCoin. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The coin of this SwapCoin. # noqa: E501 :rtype: str @@ -80,7 +80,7 @@ def coin(self): def coin(self, coin): """Sets the coin of this SwapCoin. - Currency. # noqa: E501 + Currency # noqa: E501 :param coin: The coin of this SwapCoin. # noqa: E501 :type: str @@ -94,7 +94,7 @@ def coin(self, coin): def side(self): """Gets the side of this SwapCoin. # noqa: E501 - 0 - Stake 1 - Redeem. # noqa: E501 + 0 - Stake 1 - Redeem # noqa: E501 :return: The side of this SwapCoin. # noqa: E501 :rtype: str @@ -105,7 +105,7 @@ def side(self): def side(self, side): """Sets the side of this SwapCoin. - 0 - Stake 1 - Redeem. # noqa: E501 + 0 - Stake 1 - Redeem # noqa: E501 :param side: The side of this SwapCoin. # noqa: E501 :type: str @@ -119,7 +119,7 @@ def side(self, side): def amount(self): """Gets the amount of this SwapCoin. # noqa: E501 - Size. # noqa: E501 + Size # noqa: E501 :return: The amount of this SwapCoin. # noqa: E501 :rtype: str @@ -130,7 +130,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SwapCoin. - Size. # noqa: E501 + Size # noqa: E501 :param amount: The amount of this SwapCoin. # noqa: E501 :type: str @@ -144,7 +144,7 @@ def amount(self, amount): def pid(self): """Gets the pid of this SwapCoin. # noqa: E501 - DeFi-type Mining Protocol Identifier. # noqa: E501 + DeFi-type Mining Protocol Identifier # noqa: E501 :return: The pid of this SwapCoin. # noqa: E501 :rtype: int @@ -155,7 +155,7 @@ def pid(self): def pid(self, pid): """Sets the pid of this SwapCoin. - DeFi-type Mining Protocol Identifier. # noqa: E501 + DeFi-type Mining Protocol Identifier # noqa: E501 :param pid: The pid of this SwapCoin. # noqa: E501 :type: int diff --git a/gate_api/models/swap_coin_struct.py b/gate_api/models/swap_coin_struct.py index a1d13f6..39631ff 100644 --- a/gate_api/models/swap_coin_struct.py +++ b/gate_api/models/swap_coin_struct.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -127,7 +127,7 @@ def __init__(self, id=None, pid=None, uid=None, coin=None, type=None, subtype=No def id(self): """Gets the id of this SwapCoinStruct. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -138,7 +138,7 @@ def id(self): def id(self, id): """Sets the id of this SwapCoinStruct. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this SwapCoinStruct. # noqa: E501 :type: int @@ -150,7 +150,7 @@ def id(self, id): def pid(self): """Gets the pid of this SwapCoinStruct. # noqa: E501 - Plan ID. # noqa: E501 + Product ID # noqa: E501 :return: The pid of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -161,7 +161,7 @@ def pid(self): def pid(self, pid): """Sets the pid of this SwapCoinStruct. - Plan ID. # noqa: E501 + Product ID # noqa: E501 :param pid: The pid of this SwapCoinStruct. # noqa: E501 :type: int @@ -173,7 +173,7 @@ def pid(self, pid): def uid(self): """Gets the uid of this SwapCoinStruct. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The uid of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -184,7 +184,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this SwapCoinStruct. - User ID. # noqa: E501 + User ID # noqa: E501 :param uid: The uid of this SwapCoinStruct. # noqa: E501 :type: int @@ -196,7 +196,7 @@ def uid(self, uid): def coin(self): """Gets the coin of this SwapCoinStruct. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The coin of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -207,7 +207,7 @@ def coin(self): def coin(self, coin): """Sets the coin of this SwapCoinStruct. - Currency. # noqa: E501 + Currency # noqa: E501 :param coin: The coin of this SwapCoinStruct. # noqa: E501 :type: str @@ -219,7 +219,7 @@ def coin(self, coin): def type(self): """Gets the type of this SwapCoinStruct. # noqa: E501 - 类型 0-质押 1-赎回 # noqa: E501 + Type 0-Staking 1-Redemption # noqa: E501 :return: The type of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -230,7 +230,7 @@ def type(self): def type(self, type): """Sets the type of this SwapCoinStruct. - 类型 0-质押 1-赎回 # noqa: E501 + Type 0-Staking 1-Redemption # noqa: E501 :param type: The type of this SwapCoinStruct. # noqa: E501 :type: int @@ -265,7 +265,7 @@ def subtype(self, subtype): def amount(self): """Gets the amount of this SwapCoinStruct. # noqa: E501 - Amount. # noqa: E501 + Amount # noqa: E501 :return: The amount of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -276,7 +276,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this SwapCoinStruct. - Amount. # noqa: E501 + Amount # noqa: E501 :param amount: The amount of this SwapCoinStruct. # noqa: E501 :type: str @@ -288,7 +288,7 @@ def amount(self, amount): def exchange_rate(self): """Gets the exchange_rate of this SwapCoinStruct. # noqa: E501 - Exchange Ratio. # noqa: E501 + Exchange ratio # noqa: E501 :return: The exchange_rate of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -299,7 +299,7 @@ def exchange_rate(self): def exchange_rate(self, exchange_rate): """Sets the exchange_rate of this SwapCoinStruct. - Exchange Ratio. # noqa: E501 + Exchange ratio # noqa: E501 :param exchange_rate: The exchange_rate of this SwapCoinStruct. # noqa: E501 :type: str @@ -311,7 +311,7 @@ def exchange_rate(self, exchange_rate): def exchange_amount(self): """Gets the exchange_amount of this SwapCoinStruct. # noqa: E501 - 兑换金额 # noqa: E501 + Redemption Amount # noqa: E501 :return: The exchange_amount of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -322,7 +322,7 @@ def exchange_amount(self): def exchange_amount(self, exchange_amount): """Sets the exchange_amount of this SwapCoinStruct. - 兑换金额 # noqa: E501 + Redemption Amount # noqa: E501 :param exchange_amount: The exchange_amount of this SwapCoinStruct. # noqa: E501 :type: str @@ -357,7 +357,7 @@ def update_stamp(self, update_stamp): def create_stamp(self): """Gets the create_stamp of this SwapCoinStruct. # noqa: E501 - Transaction timestamp. # noqa: E501 + Transaction timestamp # noqa: E501 :return: The create_stamp of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -368,7 +368,7 @@ def create_stamp(self): def create_stamp(self, create_stamp): """Sets the create_stamp of this SwapCoinStruct. - Transaction timestamp. # noqa: E501 + Transaction timestamp # noqa: E501 :param create_stamp: The create_stamp of this SwapCoinStruct. # noqa: E501 :type: int @@ -380,7 +380,7 @@ def create_stamp(self, create_stamp): def status(self): """Gets the status of this SwapCoinStruct. # noqa: E501 - status 1-success. # noqa: E501 + status 1-success # noqa: E501 :return: The status of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -391,7 +391,7 @@ def status(self): def status(self, status): """Sets the status of this SwapCoinStruct. - status 1-success. # noqa: E501 + status 1-success # noqa: E501 :param status: The status of this SwapCoinStruct. # noqa: E501 :type: int @@ -403,7 +403,7 @@ def status(self, status): def protocol_type(self): """Gets the protocol_type of this SwapCoinStruct. # noqa: E501 - DEFI协议类型 # noqa: E501 + DEFI Protocol Type # noqa: E501 :return: The protocol_type of this SwapCoinStruct. # noqa: E501 :rtype: int @@ -414,7 +414,7 @@ def protocol_type(self): def protocol_type(self, protocol_type): """Sets the protocol_type of this SwapCoinStruct. - DEFI协议类型 # noqa: E501 + DEFI Protocol Type # noqa: E501 :param protocol_type: The protocol_type of this SwapCoinStruct. # noqa: E501 :type: int @@ -426,7 +426,7 @@ def protocol_type(self, protocol_type): def client_order_id(self): """Gets the client_order_id of this SwapCoinStruct. # noqa: E501 - 参考ID # noqa: E501 + Reference ID # noqa: E501 :return: The client_order_id of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -437,7 +437,7 @@ def client_order_id(self): def client_order_id(self, client_order_id): """Sets the client_order_id of this SwapCoinStruct. - 参考ID # noqa: E501 + Reference ID # noqa: E501 :param client_order_id: The client_order_id of this SwapCoinStruct. # noqa: E501 :type: str @@ -449,7 +449,7 @@ def client_order_id(self, client_order_id): def source(self): """Gets the source of this SwapCoinStruct. # noqa: E501 - Order source. # noqa: E501 + Order Origin # noqa: E501 :return: The source of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -460,7 +460,7 @@ def source(self): def source(self, source): """Sets the source of this SwapCoinStruct. - Order source. # noqa: E501 + Order Origin # noqa: E501 :param source: The source of this SwapCoinStruct. # noqa: E501 :type: str diff --git a/gate_api/models/system_time.py b/gate_api/models/system_time.py index df6d7cb..285a0e7 100644 --- a/gate_api/models/system_time.py +++ b/gate_api/models/system_time.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, server_time=None, local_vars_configuration=None): # noqa: E5 def server_time(self): """Gets the server_time of this SystemTime. # noqa: E501 - Server current time(ms). # noqa: E501 + Server current time(ms) # noqa: E501 :return: The server_time of this SystemTime. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def server_time(self): def server_time(self, server_time): """Sets the server_time of this SystemTime. - Server current time(ms). # noqa: E501 + Server current time(ms) # noqa: E501 :param server_time: The server_time of this SystemTime. # noqa: E501 :type: int diff --git a/gate_api/models/ticker.py b/gate_api/models/ticker.py index 64172b5..289c557 100644 --- a/gate_api/models/ticker.py +++ b/gate_api/models/ticker.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -134,7 +134,7 @@ def __init__(self, currency_pair=None, last=None, lowest_ask=None, lowest_size=N def currency_pair(self): """Gets the currency_pair of this Ticker. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this Ticker. # noqa: E501 :rtype: str @@ -145,7 +145,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Ticker. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this Ticker. # noqa: E501 :type: str @@ -157,7 +157,7 @@ def currency_pair(self, currency_pair): def last(self): """Gets the last of this Ticker. # noqa: E501 - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :return: The last of this Ticker. # noqa: E501 :rtype: str @@ -168,7 +168,7 @@ def last(self): def last(self, last): """Sets the last of this Ticker. - Last trading price. # noqa: E501 + Last trading price # noqa: E501 :param last: The last of this Ticker. # noqa: E501 :type: str @@ -180,7 +180,7 @@ def last(self, last): def lowest_ask(self): """Gets the lowest_ask of this Ticker. # noqa: E501 - Recent lowest ask. # noqa: E501 + Recent lowest ask # noqa: E501 :return: The lowest_ask of this Ticker. # noqa: E501 :rtype: str @@ -191,7 +191,7 @@ def lowest_ask(self): def lowest_ask(self, lowest_ask): """Sets the lowest_ask of this Ticker. - Recent lowest ask. # noqa: E501 + Recent lowest ask # noqa: E501 :param lowest_ask: The lowest_ask of this Ticker. # noqa: E501 :type: str @@ -203,7 +203,7 @@ def lowest_ask(self, lowest_ask): def lowest_size(self): """Gets the lowest_size of this Ticker. # noqa: E501 - The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + Latest seller's lowest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501 :return: The lowest_size of this Ticker. # noqa: E501 :rtype: str @@ -214,7 +214,7 @@ def lowest_size(self): def lowest_size(self, lowest_size): """Sets the lowest_size of this Ticker. - The latest seller's lowest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + Latest seller's lowest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501 :param lowest_size: The lowest_size of this Ticker. # noqa: E501 :type: str @@ -226,7 +226,7 @@ def lowest_size(self, lowest_size): def highest_bid(self): """Gets the highest_bid of this Ticker. # noqa: E501 - Recent highest bid. # noqa: E501 + Recent highest bid # noqa: E501 :return: The highest_bid of this Ticker. # noqa: E501 :rtype: str @@ -237,7 +237,7 @@ def highest_bid(self): def highest_bid(self, highest_bid): """Sets the highest_bid of this Ticker. - Recent highest bid. # noqa: E501 + Recent highest bid # noqa: E501 :param highest_bid: The highest_bid of this Ticker. # noqa: E501 :type: str @@ -249,7 +249,7 @@ def highest_bid(self, highest_bid): def highest_size(self): """Gets the highest_size of this Ticker. # noqa: E501 - The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + Latest buyer's highest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501 :return: The highest_size of this Ticker. # noqa: E501 :rtype: str @@ -260,7 +260,7 @@ def highest_size(self): def highest_size(self, highest_size): """Sets the highest_size of this Ticker. - The latest buyer's highest price quantity; does not exist for batch query; exists for single query, and is empty if there is no data # noqa: E501 + Latest buyer's highest price quantity; not available for batch queries; available for single queries, empty if no data # noqa: E501 :param highest_size: The highest_size of this Ticker. # noqa: E501 :type: str @@ -272,7 +272,7 @@ def highest_size(self, highest_size): def change_percentage(self): """Gets the change_percentage of this Ticker. # noqa: E501 - Change percentage in the last 24h. # noqa: E501 + 24h price change percentage (negative for decrease, e.g., -7.45) # noqa: E501 :return: The change_percentage of this Ticker. # noqa: E501 :rtype: str @@ -283,7 +283,7 @@ def change_percentage(self): def change_percentage(self, change_percentage): """Sets the change_percentage of this Ticker. - Change percentage in the last 24h. # noqa: E501 + 24h price change percentage (negative for decrease, e.g., -7.45) # noqa: E501 :param change_percentage: The change_percentage of this Ticker. # noqa: E501 :type: str @@ -295,7 +295,7 @@ def change_percentage(self, change_percentage): def change_utc0(self): """Gets the change_utc0 of this Ticker. # noqa: E501 - utc0 timezone, the percentage change in the last 24 hours. # noqa: E501 + UTC+0 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501 :return: The change_utc0 of this Ticker. # noqa: E501 :rtype: str @@ -306,7 +306,7 @@ def change_utc0(self): def change_utc0(self, change_utc0): """Sets the change_utc0 of this Ticker. - utc0 timezone, the percentage change in the last 24 hours. # noqa: E501 + UTC+0 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501 :param change_utc0: The change_utc0 of this Ticker. # noqa: E501 :type: str @@ -318,7 +318,7 @@ def change_utc0(self, change_utc0): def change_utc8(self): """Gets the change_utc8 of this Ticker. # noqa: E501 - utc8 timezone, the percentage change in the last 24 hours. # noqa: E501 + UTC+8 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501 :return: The change_utc8 of this Ticker. # noqa: E501 :rtype: str @@ -329,7 +329,7 @@ def change_utc8(self): def change_utc8(self, change_utc8): """Sets the change_utc8 of this Ticker. - utc8 timezone, the percentage change in the last 24 hours. # noqa: E501 + UTC+8 timezone, 24h price change percentage, negative for decline (e.g., -7.45) # noqa: E501 :param change_utc8: The change_utc8 of this Ticker. # noqa: E501 :type: str @@ -341,7 +341,7 @@ def change_utc8(self, change_utc8): def base_volume(self): """Gets the base_volume of this Ticker. # noqa: E501 - Base currency trade volume in the last 24h. # noqa: E501 + Base currency trading volume in the last 24h # noqa: E501 :return: The base_volume of this Ticker. # noqa: E501 :rtype: str @@ -352,7 +352,7 @@ def base_volume(self): def base_volume(self, base_volume): """Sets the base_volume of this Ticker. - Base currency trade volume in the last 24h. # noqa: E501 + Base currency trading volume in the last 24h # noqa: E501 :param base_volume: The base_volume of this Ticker. # noqa: E501 :type: str @@ -364,7 +364,7 @@ def base_volume(self, base_volume): def quote_volume(self): """Gets the quote_volume of this Ticker. # noqa: E501 - Quote currency trade volume in the last 24h. # noqa: E501 + Quote currency trading volume in the last 24h # noqa: E501 :return: The quote_volume of this Ticker. # noqa: E501 :rtype: str @@ -375,7 +375,7 @@ def quote_volume(self): def quote_volume(self, quote_volume): """Sets the quote_volume of this Ticker. - Quote currency trade volume in the last 24h. # noqa: E501 + Quote currency trading volume in the last 24h # noqa: E501 :param quote_volume: The quote_volume of this Ticker. # noqa: E501 :type: str @@ -387,7 +387,7 @@ def quote_volume(self, quote_volume): def high_24h(self): """Gets the high_24h of this Ticker. # noqa: E501 - Highest price in 24h. # noqa: E501 + 24h High # noqa: E501 :return: The high_24h of this Ticker. # noqa: E501 :rtype: str @@ -398,7 +398,7 @@ def high_24h(self): def high_24h(self, high_24h): """Sets the high_24h of this Ticker. - Highest price in 24h. # noqa: E501 + 24h High # noqa: E501 :param high_24h: The high_24h of this Ticker. # noqa: E501 :type: str @@ -410,7 +410,7 @@ def high_24h(self, high_24h): def low_24h(self): """Gets the low_24h of this Ticker. # noqa: E501 - Lowest price in 24h. # noqa: E501 + 24h Low # noqa: E501 :return: The low_24h of this Ticker. # noqa: E501 :rtype: str @@ -421,7 +421,7 @@ def low_24h(self): def low_24h(self, low_24h): """Sets the low_24h of this Ticker. - Lowest price in 24h. # noqa: E501 + 24h Low # noqa: E501 :param low_24h: The low_24h of this Ticker. # noqa: E501 :type: str @@ -433,7 +433,7 @@ def low_24h(self, low_24h): def etf_net_value(self): """Gets the etf_net_value of this Ticker. # noqa: E501 - ETF net value. # noqa: E501 + ETF net value # noqa: E501 :return: The etf_net_value of this Ticker. # noqa: E501 :rtype: str @@ -444,7 +444,7 @@ def etf_net_value(self): def etf_net_value(self, etf_net_value): """Sets the etf_net_value of this Ticker. - ETF net value. # noqa: E501 + ETF net value # noqa: E501 :param etf_net_value: The etf_net_value of this Ticker. # noqa: E501 :type: str @@ -456,7 +456,7 @@ def etf_net_value(self, etf_net_value): def etf_pre_net_value(self): """Gets the etf_pre_net_value of this Ticker. # noqa: E501 - ETF previous net value at re-balancing time. # noqa: E501 + ETF net value at previous rebalancing point # noqa: E501 :return: The etf_pre_net_value of this Ticker. # noqa: E501 :rtype: str @@ -467,7 +467,7 @@ def etf_pre_net_value(self): def etf_pre_net_value(self, etf_pre_net_value): """Sets the etf_pre_net_value of this Ticker. - ETF previous net value at re-balancing time. # noqa: E501 + ETF net value at previous rebalancing point # noqa: E501 :param etf_pre_net_value: The etf_pre_net_value of this Ticker. # noqa: E501 :type: str @@ -479,7 +479,7 @@ def etf_pre_net_value(self, etf_pre_net_value): def etf_pre_timestamp(self): """Gets the etf_pre_timestamp of this Ticker. # noqa: E501 - ETF previous re-balancing time. # noqa: E501 + ETF previous rebalancing time # noqa: E501 :return: The etf_pre_timestamp of this Ticker. # noqa: E501 :rtype: int @@ -490,7 +490,7 @@ def etf_pre_timestamp(self): def etf_pre_timestamp(self, etf_pre_timestamp): """Sets the etf_pre_timestamp of this Ticker. - ETF previous re-balancing time. # noqa: E501 + ETF previous rebalancing time # noqa: E501 :param etf_pre_timestamp: The etf_pre_timestamp of this Ticker. # noqa: E501 :type: int @@ -502,7 +502,7 @@ def etf_pre_timestamp(self, etf_pre_timestamp): def etf_leverage(self): """Gets the etf_leverage of this Ticker. # noqa: E501 - ETF current leverage. # noqa: E501 + ETF current leverage # noqa: E501 :return: The etf_leverage of this Ticker. # noqa: E501 :rtype: str @@ -513,7 +513,7 @@ def etf_leverage(self): def etf_leverage(self, etf_leverage): """Sets the etf_leverage of this Ticker. - ETF current leverage. # noqa: E501 + ETF current leverage # noqa: E501 :param etf_leverage: The etf_leverage of this Ticker. # noqa: E501 :type: str diff --git a/gate_api/models/total_balance.py b/gate_api/models/total_balance.py index 5fb5d87..9dd8b78 100644 --- a/gate_api/models/total_balance.py +++ b/gate_api/models/total_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -83,7 +83,7 @@ def total(self, total): def details(self): """Gets the details of this TotalBalance. # noqa: E501 - Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501 + Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: perpetual contract account - delivery: delivery contract account - warrant: warrant account - cbbc: CBBC account # noqa: E501 :return: The details of this TotalBalance. # noqa: E501 :rtype: dict(str, AccountBalance) @@ -94,7 +94,7 @@ def details(self): def details(self, details): """Sets the details of this TotalBalance. - Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501 + Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: perpetual contract account - delivery: delivery contract account - warrant: warrant account - cbbc: CBBC account # noqa: E501 :param details: The details of this TotalBalance. # noqa: E501 :type: dict(str, AccountBalance) diff --git a/gate_api/models/trade.py b/gate_api/models/trade.py index 481440f..7fbeff8 100644 --- a/gate_api/models/trade.py +++ b/gate_api/models/trade.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -132,7 +132,7 @@ def __init__(self, id=None, create_time=None, create_time_ms=None, currency_pair def id(self): """Gets the id of this Trade. # noqa: E501 - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :return: The id of this Trade. # noqa: E501 :rtype: str @@ -143,7 +143,7 @@ def id(self): def id(self, id): """Sets the id of this Trade. - Trade ID. # noqa: E501 + Fill ID # noqa: E501 :param id: The id of this Trade. # noqa: E501 :type: str @@ -155,7 +155,7 @@ def id(self, id): def create_time(self): """Gets the create_time of this Trade. # noqa: E501 - Trading time. # noqa: E501 + Fill Time # noqa: E501 :return: The create_time of this Trade. # noqa: E501 :rtype: str @@ -166,7 +166,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this Trade. - Trading time. # noqa: E501 + Fill Time # noqa: E501 :param create_time: The create_time of this Trade. # noqa: E501 :type: str @@ -178,7 +178,7 @@ def create_time(self, create_time): def create_time_ms(self): """Gets the create_time_ms of this Trade. # noqa: E501 - Trading time, with millisecond precision. # noqa: E501 + Trading time, with millisecond precision # noqa: E501 :return: The create_time_ms of this Trade. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def create_time_ms(self): def create_time_ms(self, create_time_ms): """Sets the create_time_ms of this Trade. - Trading time, with millisecond precision. # noqa: E501 + Trading time, with millisecond precision # noqa: E501 :param create_time_ms: The create_time_ms of this Trade. # noqa: E501 :type: str @@ -201,7 +201,7 @@ def create_time_ms(self, create_time_ms): def currency_pair(self): """Gets the currency_pair of this Trade. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this Trade. # noqa: E501 :rtype: str @@ -212,7 +212,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Trade. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this Trade. # noqa: E501 :type: str @@ -224,7 +224,7 @@ def currency_pair(self, currency_pair): def side(self): """Gets the side of this Trade. # noqa: E501 - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :return: The side of this Trade. # noqa: E501 :rtype: str @@ -235,7 +235,7 @@ def side(self): def side(self, side): """Sets the side of this Trade. - Buy or sell order. # noqa: E501 + Buy or sell order # noqa: E501 :param side: The side of this Trade. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def side(self, side): def role(self): """Gets the role of this Trade. # noqa: E501 - Trade role. No value in public endpoints. # noqa: E501 + Trade role, not returned in public endpoints # noqa: E501 :return: The role of this Trade. # noqa: E501 :rtype: str @@ -264,7 +264,7 @@ def role(self): def role(self, role): """Sets the role of this Trade. - Trade role. No value in public endpoints. # noqa: E501 + Trade role, not returned in public endpoints # noqa: E501 :param role: The role of this Trade. # noqa: E501 :type: str @@ -282,7 +282,7 @@ def role(self, role): def amount(self): """Gets the amount of this Trade. # noqa: E501 - Trade amount. # noqa: E501 + Trade amount # noqa: E501 :return: The amount of this Trade. # noqa: E501 :rtype: str @@ -293,7 +293,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Trade. - Trade amount. # noqa: E501 + Trade amount # noqa: E501 :param amount: The amount of this Trade. # noqa: E501 :type: str @@ -305,7 +305,7 @@ def amount(self, amount): def price(self): """Gets the price of this Trade. # noqa: E501 - Order price. # noqa: E501 + Order price # noqa: E501 :return: The price of this Trade. # noqa: E501 :rtype: str @@ -316,7 +316,7 @@ def price(self): def price(self, price): """Sets the price of this Trade. - Order price. # noqa: E501 + Order price # noqa: E501 :param price: The price of this Trade. # noqa: E501 :type: str @@ -328,7 +328,7 @@ def price(self, price): def order_id(self): """Gets the order_id of this Trade. # noqa: E501 - Related order ID. No value in public endpoints. # noqa: E501 + Related order ID, not returned in public endpoints # noqa: E501 :return: The order_id of this Trade. # noqa: E501 :rtype: str @@ -339,7 +339,7 @@ def order_id(self): def order_id(self, order_id): """Sets the order_id of this Trade. - Related order ID. No value in public endpoints. # noqa: E501 + Related order ID, not returned in public endpoints # noqa: E501 :param order_id: The order_id of this Trade. # noqa: E501 :type: str @@ -351,7 +351,7 @@ def order_id(self, order_id): def fee(self): """Gets the fee of this Trade. # noqa: E501 - Fee deducted. No value in public endpoints. # noqa: E501 + Fee deducted, not returned in public endpoints # noqa: E501 :return: The fee of this Trade. # noqa: E501 :rtype: str @@ -362,7 +362,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this Trade. - Fee deducted. No value in public endpoints. # noqa: E501 + Fee deducted, not returned in public endpoints # noqa: E501 :param fee: The fee of this Trade. # noqa: E501 :type: str @@ -374,7 +374,7 @@ def fee(self, fee): def fee_currency(self): """Gets the fee_currency of this Trade. # noqa: E501 - Fee currency unit. No value in public endpoints. # noqa: E501 + Fee currency unit, not returned in public endpoints # noqa: E501 :return: The fee_currency of this Trade. # noqa: E501 :rtype: str @@ -385,7 +385,7 @@ def fee_currency(self): def fee_currency(self, fee_currency): """Sets the fee_currency of this Trade. - Fee currency unit. No value in public endpoints. # noqa: E501 + Fee currency unit, not returned in public endpoints # noqa: E501 :param fee_currency: The fee_currency of this Trade. # noqa: E501 :type: str @@ -397,7 +397,7 @@ def fee_currency(self, fee_currency): def point_fee(self): """Gets the point_fee of this Trade. # noqa: E501 - Points used to deduct fee. No value in public endpoints. # noqa: E501 + Points used to deduct fee, not returned in public endpoints # noqa: E501 :return: The point_fee of this Trade. # noqa: E501 :rtype: str @@ -408,7 +408,7 @@ def point_fee(self): def point_fee(self, point_fee): """Sets the point_fee of this Trade. - Points used to deduct fee. No value in public endpoints. # noqa: E501 + Points used to deduct fee, not returned in public endpoints # noqa: E501 :param point_fee: The point_fee of this Trade. # noqa: E501 :type: str @@ -420,7 +420,7 @@ def point_fee(self, point_fee): def gt_fee(self): """Gets the gt_fee of this Trade. # noqa: E501 - GT used to deduct fee. No value in public endpoints. # noqa: E501 + GT used to deduct fee, not returned in public endpoints # noqa: E501 :return: The gt_fee of this Trade. # noqa: E501 :rtype: str @@ -431,7 +431,7 @@ def gt_fee(self): def gt_fee(self, gt_fee): """Sets the gt_fee of this Trade. - GT used to deduct fee. No value in public endpoints. # noqa: E501 + GT used to deduct fee, not returned in public endpoints # noqa: E501 :param gt_fee: The gt_fee of this Trade. # noqa: E501 :type: str @@ -443,7 +443,7 @@ def gt_fee(self, gt_fee): def amend_text(self): """Gets the amend_text of this Trade. # noqa: E501 - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :return: The amend_text of this Trade. # noqa: E501 :rtype: str @@ -454,7 +454,7 @@ def amend_text(self): def amend_text(self, amend_text): """Sets the amend_text of this Trade. - The custom data that the user remarked when amending the order. # noqa: E501 + The custom data that the user remarked when amending the order # noqa: E501 :param amend_text: The amend_text of this Trade. # noqa: E501 :type: str @@ -466,7 +466,7 @@ def amend_text(self, amend_text): def sequence_id(self): """Gets the sequence_id of this Trade. # noqa: E501 - Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market # noqa: E501 + Consecutive trade ID within a single market. Used to track and identify trades in the specific market # noqa: E501 :return: The sequence_id of this Trade. # noqa: E501 :rtype: str @@ -477,7 +477,7 @@ def sequence_id(self): def sequence_id(self, sequence_id): """Sets the sequence_id of this Trade. - Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market # noqa: E501 + Consecutive trade ID within a single market. Used to track and identify trades in the specific market # noqa: E501 :param sequence_id: The sequence_id of this Trade. # noqa: E501 :type: str @@ -489,7 +489,7 @@ def sequence_id(self, sequence_id): def text(self): """Gets the text of this Trade. # noqa: E501 - User defined information. No value in public endpoints. # noqa: E501 + User-defined information, not returned in public endpoints # noqa: E501 :return: The text of this Trade. # noqa: E501 :rtype: str @@ -500,7 +500,7 @@ def text(self): def text(self, text): """Sets the text of this Trade. - User defined information. No value in public endpoints. # noqa: E501 + User-defined information, not returned in public endpoints # noqa: E501 :param text: The text of this Trade. # noqa: E501 :type: str diff --git a/gate_api/models/trade_fee.py b/gate_api/models/trade_fee.py index 6edf8a6..7b3fd5a 100644 --- a/gate_api/models/trade_fee.py +++ b/gate_api/models/trade_fee.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -117,7 +117,7 @@ def __init__(self, user_id=None, taker_fee=None, maker_fee=None, gt_discount=Non def user_id(self): """Gets the user_id of this TradeFee. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this TradeFee. # noqa: E501 :rtype: int @@ -128,7 +128,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this TradeFee. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this TradeFee. # noqa: E501 :type: int @@ -140,7 +140,7 @@ def user_id(self, user_id): def taker_fee(self): """Gets the taker_fee of this TradeFee. # noqa: E501 - taker fee rate. # noqa: E501 + taker fee rate # noqa: E501 :return: The taker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -151,7 +151,7 @@ def taker_fee(self): def taker_fee(self, taker_fee): """Sets the taker_fee of this TradeFee. - taker fee rate. # noqa: E501 + taker fee rate # noqa: E501 :param taker_fee: The taker_fee of this TradeFee. # noqa: E501 :type: str @@ -163,7 +163,7 @@ def taker_fee(self, taker_fee): def maker_fee(self): """Gets the maker_fee of this TradeFee. # noqa: E501 - maker fee rate. # noqa: E501 + maker fee rate # noqa: E501 :return: The maker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -174,7 +174,7 @@ def maker_fee(self): def maker_fee(self, maker_fee): """Sets the maker_fee of this TradeFee. - maker fee rate. # noqa: E501 + maker fee rate # noqa: E501 :param maker_fee: The maker_fee of this TradeFee. # noqa: E501 :type: str @@ -186,7 +186,7 @@ def maker_fee(self, maker_fee): def gt_discount(self): """Gets the gt_discount of this TradeFee. # noqa: E501 - If GT deduction is enabled. # noqa: E501 + Whether GT deduction discount is enabled # noqa: E501 :return: The gt_discount of this TradeFee. # noqa: E501 :rtype: bool @@ -197,7 +197,7 @@ def gt_discount(self): def gt_discount(self, gt_discount): """Sets the gt_discount of this TradeFee. - If GT deduction is enabled. # noqa: E501 + Whether GT deduction discount is enabled # noqa: E501 :param gt_discount: The gt_discount of this TradeFee. # noqa: E501 :type: bool @@ -232,7 +232,7 @@ def gt_taker_fee(self, gt_taker_fee): def gt_maker_fee(self): """Gets the gt_maker_fee of this TradeFee. # noqa: E501 - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501 :return: The gt_maker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -243,7 +243,7 @@ def gt_maker_fee(self): def gt_maker_fee(self, gt_maker_fee): """Sets the gt_maker_fee of this TradeFee. - Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled # noqa: E501 + Maker fee rate with GT deduction. Returns 0 if GT deduction is disabled # noqa: E501 :param gt_maker_fee: The gt_maker_fee of this TradeFee. # noqa: E501 :type: str @@ -255,7 +255,7 @@ def gt_maker_fee(self, gt_maker_fee): def loan_fee(self): """Gets the loan_fee of this TradeFee. # noqa: E501 - Loan fee rate of margin lending. # noqa: E501 + Loan fee rate of margin lending # noqa: E501 :return: The loan_fee of this TradeFee. # noqa: E501 :rtype: str @@ -266,7 +266,7 @@ def loan_fee(self): def loan_fee(self, loan_fee): """Sets the loan_fee of this TradeFee. - Loan fee rate of margin lending. # noqa: E501 + Loan fee rate of margin lending # noqa: E501 :param loan_fee: The loan_fee of this TradeFee. # noqa: E501 :type: str @@ -278,7 +278,7 @@ def loan_fee(self, loan_fee): def point_type(self): """Gets the point_type of this TradeFee. # noqa: E501 - Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 + Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501 :return: The point_type of this TradeFee. # noqa: E501 :rtype: str @@ -289,7 +289,7 @@ def point_type(self): def point_type(self, point_type): """Sets the point_type of this TradeFee. - Point type. 0 - Initial version. 1 - new version since 202009. # noqa: E501 + Point card type: 0 - Original version, 1 - New version since 202009 # noqa: E501 :param point_type: The point_type of this TradeFee. # noqa: E501 :type: str @@ -301,7 +301,7 @@ def point_type(self, point_type): def futures_taker_fee(self): """Gets the futures_taker_fee of this TradeFee. # noqa: E501 - Futures trading taker fee. # noqa: E501 + Perpetual contract taker fee rate # noqa: E501 :return: The futures_taker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -312,7 +312,7 @@ def futures_taker_fee(self): def futures_taker_fee(self, futures_taker_fee): """Sets the futures_taker_fee of this TradeFee. - Futures trading taker fee. # noqa: E501 + Perpetual contract taker fee rate # noqa: E501 :param futures_taker_fee: The futures_taker_fee of this TradeFee. # noqa: E501 :type: str @@ -324,7 +324,7 @@ def futures_taker_fee(self, futures_taker_fee): def futures_maker_fee(self): """Gets the futures_maker_fee of this TradeFee. # noqa: E501 - Future trading maker fee. # noqa: E501 + Perpetual contract maker fee rate # noqa: E501 :return: The futures_maker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -335,7 +335,7 @@ def futures_maker_fee(self): def futures_maker_fee(self, futures_maker_fee): """Sets the futures_maker_fee of this TradeFee. - Future trading maker fee. # noqa: E501 + Perpetual contract maker fee rate # noqa: E501 :param futures_maker_fee: The futures_maker_fee of this TradeFee. # noqa: E501 :type: str @@ -347,7 +347,7 @@ def futures_maker_fee(self, futures_maker_fee): def delivery_taker_fee(self): """Gets the delivery_taker_fee of this TradeFee. # noqa: E501 - Delivery trading taker fee. # noqa: E501 + Delivery contract taker fee rate # noqa: E501 :return: The delivery_taker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -358,7 +358,7 @@ def delivery_taker_fee(self): def delivery_taker_fee(self, delivery_taker_fee): """Sets the delivery_taker_fee of this TradeFee. - Delivery trading taker fee. # noqa: E501 + Delivery contract taker fee rate # noqa: E501 :param delivery_taker_fee: The delivery_taker_fee of this TradeFee. # noqa: E501 :type: str @@ -370,7 +370,7 @@ def delivery_taker_fee(self, delivery_taker_fee): def delivery_maker_fee(self): """Gets the delivery_maker_fee of this TradeFee. # noqa: E501 - Delivery trading maker fee. # noqa: E501 + Delivery contract maker fee rate # noqa: E501 :return: The delivery_maker_fee of this TradeFee. # noqa: E501 :rtype: str @@ -381,7 +381,7 @@ def delivery_maker_fee(self): def delivery_maker_fee(self, delivery_maker_fee): """Sets the delivery_maker_fee of this TradeFee. - Delivery trading maker fee. # noqa: E501 + Delivery contract maker fee rate # noqa: E501 :param delivery_maker_fee: The delivery_maker_fee of this TradeFee. # noqa: E501 :type: str diff --git a/gate_api/models/transaction_id.py b/gate_api/models/transaction_id.py index 9c0e435..d902340 100644 --- a/gate_api/models/transaction_id.py +++ b/gate_api/models/transaction_id.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, tx_id=None, local_vars_configuration=None): # noqa: E501 def tx_id(self): """Gets the tx_id of this TransactionID. # noqa: E501 - Order id. # noqa: E501 + Order ID # noqa: E501 :return: The tx_id of this TransactionID. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def tx_id(self): def tx_id(self, tx_id): """Sets the tx_id of this TransactionID. - Order id. # noqa: E501 + Order ID # noqa: E501 :param tx_id: The tx_id of this TransactionID. # noqa: E501 :type: int diff --git a/gate_api/models/transfer.py b/gate_api/models/transfer.py index 1cd1b15..aaf2469 100644 --- a/gate_api/models/transfer.py +++ b/gate_api/models/transfer.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -78,7 +78,7 @@ def __init__(self, currency=None, _from=None, to=None, amount=None, currency_pai def currency(self): """Gets the currency of this Transfer. # noqa: E501 - Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501 + Transfer currency name. For contract accounts, `currency` can be set to `POINT` (points) or supported settlement currencies (e.g., `BTC`, `USDT`) # noqa: E501 :return: The currency of this Transfer. # noqa: E501 :rtype: str @@ -89,7 +89,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this Transfer. - Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency # noqa: E501 + Transfer currency name. For contract accounts, `currency` can be set to `POINT` (points) or supported settlement currencies (e.g., `BTC`, `USDT`) # noqa: E501 :param currency: The currency of this Transfer. # noqa: E501 :type: str @@ -103,7 +103,7 @@ def currency(self, currency): def _from(self): """Gets the _from of this Transfer. # noqa: E501 - Account to transfer from. # noqa: E501 + Account to transfer from # noqa: E501 :return: The _from of this Transfer. # noqa: E501 :rtype: str @@ -114,7 +114,7 @@ def _from(self): def _from(self, _from): """Sets the _from of this Transfer. - Account to transfer from. # noqa: E501 + Account to transfer from # noqa: E501 :param _from: The _from of this Transfer. # noqa: E501 :type: str @@ -134,7 +134,7 @@ def _from(self, _from): def to(self): """Gets the to of this Transfer. # noqa: E501 - Account to transfer to. # noqa: E501 + Account to transfer to # noqa: E501 :return: The to of this Transfer. # noqa: E501 :rtype: str @@ -145,7 +145,7 @@ def to(self): def to(self, to): """Sets the to of this Transfer. - Account to transfer to. # noqa: E501 + Account to transfer to # noqa: E501 :param to: The to of this Transfer. # noqa: E501 :type: str @@ -165,7 +165,7 @@ def to(self, to): def amount(self): """Gets the amount of this Transfer. # noqa: E501 - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :return: The amount of this Transfer. # noqa: E501 :rtype: str @@ -176,7 +176,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this Transfer. - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :param amount: The amount of this Transfer. # noqa: E501 :type: str @@ -190,7 +190,7 @@ def amount(self, amount): def currency_pair(self): """Gets the currency_pair of this Transfer. # noqa: E501 - Margin currency pair. Required if transfer from or to margin account. # noqa: E501 + Margin trading pair. Required when transferring to or from margin account # noqa: E501 :return: The currency_pair of this Transfer. # noqa: E501 :rtype: str @@ -201,7 +201,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this Transfer. - Margin currency pair. Required if transfer from or to margin account. # noqa: E501 + Margin trading pair. Required when transferring to or from margin account # noqa: E501 :param currency_pair: The currency_pair of this Transfer. # noqa: E501 :type: str @@ -213,7 +213,7 @@ def currency_pair(self, currency_pair): def settle(self): """Gets the settle of this Transfer. # noqa: E501 - Futures settle currency. Required if transferring from or to futures account # noqa: E501 + Contract settlement currency. Required when transferring to or from contract account # noqa: E501 :return: The settle of this Transfer. # noqa: E501 :rtype: str @@ -224,7 +224,7 @@ def settle(self): def settle(self, settle): """Sets the settle of this Transfer. - Futures settle currency. Required if transferring from or to futures account # noqa: E501 + Contract settlement currency. Required when transferring to or from contract account # noqa: E501 :param settle: The settle of this Transfer. # noqa: E501 :type: str diff --git a/gate_api/models/transfer_order_status.py b/gate_api/models/transfer_order_status.py index a9ffd50..527b77a 100644 --- a/gate_api/models/transfer_order_status.py +++ b/gate_api/models/transfer_order_status.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, tx_id=None, status=None, local_vars_configuration=None): # n def tx_id(self): """Gets the tx_id of this TransferOrderStatus. # noqa: E501 - Order id. # noqa: E501 + Order ID # noqa: E501 :return: The tx_id of this TransferOrderStatus. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def tx_id(self): def tx_id(self, tx_id): """Sets the tx_id of this TransferOrderStatus. - Order id. # noqa: E501 + Order ID # noqa: E501 :param tx_id: The tx_id of this TransferOrderStatus. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def tx_id(self, tx_id): def status(self): """Gets the status of this TransferOrderStatus. # noqa: E501 - Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) # noqa: E501 + Transfer status: PENDING - Processing, SUCCESS - Transfer successful, FAIL - Transfer failed, PARTIAL_SUCCESS - Partially successful (this status appears when transferring between sub-accounts) # noqa: E501 :return: The status of this TransferOrderStatus. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def status(self): def status(self, status): """Sets the status of this TransferOrderStatus. - Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) # noqa: E501 + Transfer status: PENDING - Processing, SUCCESS - Transfer successful, FAIL - Transfer failed, PARTIAL_SUCCESS - Partially successful (this status appears when transferring between sub-accounts) # noqa: E501 :param status: The status of this TransferOrderStatus. # noqa: E501 :type: str diff --git a/gate_api/models/transferables_result.py b/gate_api/models/transferables_result.py index 897dda6..a2659ba 100644 --- a/gate_api/models/transferables_result.py +++ b/gate_api/models/transferables_result.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this TransferablesResult. # noqa: E501 - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :return: The currency of this TransferablesResult. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this TransferablesResult. - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :param currency: The currency of this TransferablesResult. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this TransferablesResult. # noqa: E501 - The maximum amount that can be transferred out. # noqa: E501 + Maximum transferable amount # noqa: E501 :return: The amount of this TransferablesResult. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this TransferablesResult. - The maximum amount that can be transferred out. # noqa: E501 + Maximum transferable amount # noqa: E501 :param amount: The amount of this TransferablesResult. # noqa: E501 :type: str diff --git a/gate_api/models/trigger_order_response.py b/gate_api/models/trigger_order_response.py index 1d7bf67..2e0b560 100644 --- a/gate_api/models/trigger_order_response.py +++ b/gate_api/models/trigger_order_response.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 def id(self): """Gets the id of this TriggerOrderResponse. # noqa: E501 - Auto order ID. # noqa: E501 + Auto order ID # noqa: E501 :return: The id of this TriggerOrderResponse. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def id(self): def id(self, id): """Sets the id of this TriggerOrderResponse. - Auto order ID. # noqa: E501 + Auto order ID # noqa: E501 :param id: The id of this TriggerOrderResponse. # noqa: E501 :type: int diff --git a/gate_api/models/trigger_time.py b/gate_api/models/trigger_time.py index 481dbdc..6b7c80d 100644 --- a/gate_api/models/trigger_time.py +++ b/gate_api/models/trigger_time.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, trigger_time=None, local_vars_configuration=None): # noqa: E def trigger_time(self): """Gets the trigger_time of this TriggerTime. # noqa: E501 - Timestamp of the end of the countdown, in milliseconds. # noqa: E501 + Timestamp when countdown ends, in milliseconds # noqa: E501 :return: The trigger_time of this TriggerTime. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def trigger_time(self): def trigger_time(self, trigger_time): """Sets the trigger_time of this TriggerTime. - Timestamp of the end of the countdown, in milliseconds. # noqa: E501 + Timestamp when countdown ends, in milliseconds # noqa: E501 :param trigger_time: The trigger_time of this TriggerTime. # noqa: E501 :type: int diff --git a/gate_api/models/uid_push_order.py b/gate_api/models/uid_push_order.py index d84d7a2..eb36625 100644 --- a/gate_api/models/uid_push_order.py +++ b/gate_api/models/uid_push_order.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -97,7 +97,7 @@ def __init__(self, id=None, push_uid=None, receive_uid=None, currency=None, amou def id(self): """Gets the id of this UidPushOrder. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this UidPushOrder. # noqa: E501 :rtype: int @@ -108,7 +108,7 @@ def id(self): def id(self, id): """Sets the id of this UidPushOrder. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this UidPushOrder. # noqa: E501 :type: int @@ -120,7 +120,7 @@ def id(self, id): def push_uid(self): """Gets the push_uid of this UidPushOrder. # noqa: E501 - Initiator User ID. # noqa: E501 + Initiator User ID # noqa: E501 :return: The push_uid of this UidPushOrder. # noqa: E501 :rtype: int @@ -131,7 +131,7 @@ def push_uid(self): def push_uid(self, push_uid): """Sets the push_uid of this UidPushOrder. - Initiator User ID. # noqa: E501 + Initiator User ID # noqa: E501 :param push_uid: The push_uid of this UidPushOrder. # noqa: E501 :type: int @@ -143,7 +143,7 @@ def push_uid(self, push_uid): def receive_uid(self): """Gets the receive_uid of this UidPushOrder. # noqa: E501 - Recipient User ID. # noqa: E501 + Recipient User ID # noqa: E501 :return: The receive_uid of this UidPushOrder. # noqa: E501 :rtype: int @@ -154,7 +154,7 @@ def receive_uid(self): def receive_uid(self, receive_uid): """Sets the receive_uid of this UidPushOrder. - Recipient User ID. # noqa: E501 + Recipient User ID # noqa: E501 :param receive_uid: The receive_uid of this UidPushOrder. # noqa: E501 :type: int @@ -166,7 +166,7 @@ def receive_uid(self, receive_uid): def currency(self): """Gets the currency of this UidPushOrder. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UidPushOrder. # noqa: E501 :rtype: str @@ -177,7 +177,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UidPushOrder. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UidPushOrder. # noqa: E501 :type: str @@ -189,7 +189,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UidPushOrder. # noqa: E501 - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :return: The amount of this UidPushOrder. # noqa: E501 :rtype: str @@ -200,7 +200,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UidPushOrder. - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :param amount: The amount of this UidPushOrder. # noqa: E501 :type: str @@ -212,7 +212,7 @@ def amount(self, amount): def create_time(self): """Gets the create_time of this UidPushOrder. # noqa: E501 - Creation time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this UidPushOrder. # noqa: E501 :rtype: int @@ -223,7 +223,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UidPushOrder. - Creation time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this UidPushOrder. # noqa: E501 :type: int @@ -235,7 +235,7 @@ def create_time(self, create_time): def status(self): """Gets the status of this UidPushOrder. # noqa: E501 - Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 + Withdrawal status: - CREATING: Creating - PENDING: Waiting for recipient (Please contact the recipient to accept the transfer on Gate official website) - CANCELLING: Cancelling - CANCELLED: Cancelled - REFUSING: Refusing - REFUSED: Refused - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 :return: The status of this UidPushOrder. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def status(self): def status(self, status): """Sets the status of this UidPushOrder. - Withdrawal Status - CREATING: Creating - PENDING: Waiting for receiving(Please contact the other party to accept the transfer on the Gate official website) - CANCELLING: Cancelling - CANCELLED: Revoked - REFUSING: Rejection - REFUSED: Rejected - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 + Withdrawal status: - CREATING: Creating - PENDING: Waiting for recipient (Please contact the recipient to accept the transfer on Gate official website) - CANCELLING: Cancelling - CANCELLED: Cancelled - REFUSING: Refusing - REFUSED: Refused - RECEIVING: Receiving - RECEIVED: Success # noqa: E501 :param status: The status of this UidPushOrder. # noqa: E501 :type: str @@ -258,7 +258,7 @@ def status(self, status): def message(self): """Gets the message of this UidPushOrder. # noqa: E501 - PENDING Reason Tips. # noqa: E501 + PENDING reason tips # noqa: E501 :return: The message of this UidPushOrder. # noqa: E501 :rtype: str @@ -269,7 +269,7 @@ def message(self): def message(self, message): """Sets the message of this UidPushOrder. - PENDING Reason Tips. # noqa: E501 + PENDING reason tips # noqa: E501 :param message: The message of this UidPushOrder. # noqa: E501 :type: str @@ -281,7 +281,7 @@ def message(self, message): def transaction_type(self): """Gets the transaction_type of this UidPushOrder. # noqa: E501 - Order Type. # noqa: E501 + Order Type # noqa: E501 :return: The transaction_type of this UidPushOrder. # noqa: E501 :rtype: str @@ -292,7 +292,7 @@ def transaction_type(self): def transaction_type(self, transaction_type): """Sets the transaction_type of this UidPushOrder. - Order Type. # noqa: E501 + Order Type # noqa: E501 :param transaction_type: The transaction_type of this UidPushOrder. # noqa: E501 :type: str diff --git a/gate_api/models/uid_push_withdrawal.py b/gate_api/models/uid_push_withdrawal.py index 023be07..da15f5c 100644 --- a/gate_api/models/uid_push_withdrawal.py +++ b/gate_api/models/uid_push_withdrawal.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -64,7 +64,7 @@ def __init__(self, receive_uid=None, currency=None, amount=None, local_vars_conf def receive_uid(self): """Gets the receive_uid of this UidPushWithdrawal. # noqa: E501 - Recipient UID. # noqa: E501 + Recipient UID # noqa: E501 :return: The receive_uid of this UidPushWithdrawal. # noqa: E501 :rtype: int @@ -75,7 +75,7 @@ def receive_uid(self): def receive_uid(self, receive_uid): """Sets the receive_uid of this UidPushWithdrawal. - Recipient UID. # noqa: E501 + Recipient UID # noqa: E501 :param receive_uid: The receive_uid of this UidPushWithdrawal. # noqa: E501 :type: int @@ -89,7 +89,7 @@ def receive_uid(self, receive_uid): def currency(self): """Gets the currency of this UidPushWithdrawal. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UidPushWithdrawal. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UidPushWithdrawal. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UidPushWithdrawal. # noqa: E501 :type: str @@ -114,7 +114,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UidPushWithdrawal. # noqa: E501 - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :return: The amount of this UidPushWithdrawal. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UidPushWithdrawal. - Transfer amount. # noqa: E501 + Transfer amount # noqa: E501 :param amount: The amount of this UidPushWithdrawal. # noqa: E501 :type: str diff --git a/gate_api/models/uid_push_withdrawal_resp.py b/gate_api/models/uid_push_withdrawal_resp.py index 464885e..7afe6eb 100644 --- a/gate_api/models/uid_push_withdrawal_resp.py +++ b/gate_api/models/uid_push_withdrawal_resp.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 def id(self): """Gets the id of this UidPushWithdrawalResp. # noqa: E501 - Order ID. # noqa: E501 + Order ID # noqa: E501 :return: The id of this UidPushWithdrawalResp. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def id(self): def id(self, id): """Sets the id of this UidPushWithdrawalResp. - Order ID. # noqa: E501 + Order ID # noqa: E501 :param id: The id of this UidPushWithdrawalResp. # noqa: E501 :type: int diff --git a/gate_api/models/uni_currency.py b/gate_api/models/uni_currency.py index 5f9accf..eee7b2c 100644 --- a/gate_api/models/uni_currency.py +++ b/gate_api/models/uni_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, currency=None, min_lend_amount=None, max_lend_amount=None, ma def currency(self): """Gets the currency of this UniCurrency. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UniCurrency. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniCurrency. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UniCurrency. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def currency(self, currency): def min_lend_amount(self): """Gets the min_lend_amount of this UniCurrency. # noqa: E501 - The minimum lending amount, in the unit of the currency. # noqa: E501 + The minimum lending amount, in the unit of the currency # noqa: E501 :return: The min_lend_amount of this UniCurrency. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def min_lend_amount(self): def min_lend_amount(self, min_lend_amount): """Sets the min_lend_amount of this UniCurrency. - The minimum lending amount, in the unit of the currency. # noqa: E501 + The minimum lending amount, in the unit of the currency # noqa: E501 :param min_lend_amount: The min_lend_amount of this UniCurrency. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def min_lend_amount(self, min_lend_amount): def max_lend_amount(self): """Gets the max_lend_amount of this UniCurrency. # noqa: E501 - The total maximum lending amount, in USDT. # noqa: E501 + The total maximum lending amount, in USDT # noqa: E501 :return: The max_lend_amount of this UniCurrency. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def max_lend_amount(self): def max_lend_amount(self, max_lend_amount): """Sets the max_lend_amount of this UniCurrency. - The total maximum lending amount, in USDT. # noqa: E501 + The total maximum lending amount, in USDT # noqa: E501 :param max_lend_amount: The max_lend_amount of this UniCurrency. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def max_lend_amount(self, max_lend_amount): def max_rate(self): """Gets the max_rate of this UniCurrency. # noqa: E501 - Maximum rate (Hourly). # noqa: E501 + Maximum rate (Hourly) # noqa: E501 :return: The max_rate of this UniCurrency. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def max_rate(self): def max_rate(self, max_rate): """Sets the max_rate of this UniCurrency. - Maximum rate (Hourly). # noqa: E501 + Maximum rate (Hourly) # noqa: E501 :param max_rate: The max_rate of this UniCurrency. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def max_rate(self, max_rate): def min_rate(self): """Gets the min_rate of this UniCurrency. # noqa: E501 - Minimum rate (Hourly). # noqa: E501 + Minimum rate (Hourly) # noqa: E501 :return: The min_rate of this UniCurrency. # noqa: E501 :rtype: str @@ -180,7 +180,7 @@ def min_rate(self): def min_rate(self, min_rate): """Sets the min_rate of this UniCurrency. - Minimum rate (Hourly). # noqa: E501 + Minimum rate (Hourly) # noqa: E501 :param min_rate: The min_rate of this UniCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/uni_currency_interest.py b/gate_api/models/uni_currency_interest.py index 9511bf7..525ec59 100644 --- a/gate_api/models/uni_currency_interest.py +++ b/gate_api/models/uni_currency_interest.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, interest_status=None, local_vars_configuration def currency(self): """Gets the currency of this UniCurrencyInterest. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UniCurrencyInterest. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniCurrencyInterest. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UniCurrencyInterest. # noqa: E501 :type: str diff --git a/gate_api/models/uni_currency_pair.py b/gate_api/models/uni_currency_pair.py index 3e39ad9..362d6b1 100644 --- a/gate_api/models/uni_currency_pair.py +++ b/gate_api/models/uni_currency_pair.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, currency_pair=None, base_min_borrow_amount=None, quote_min_bo def currency_pair(self): """Gets the currency_pair of this UniCurrencyPair. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this UniCurrencyPair. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniCurrencyPair. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this UniCurrencyPair. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency_pair(self, currency_pair): def base_min_borrow_amount(self): """Gets the base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - Minimum borrow amount of base currency. # noqa: E501 + Minimum borrow amount of base currency # noqa: E501 :return: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def base_min_borrow_amount(self): def base_min_borrow_amount(self, base_min_borrow_amount): """Sets the base_min_borrow_amount of this UniCurrencyPair. - Minimum borrow amount of base currency. # noqa: E501 + Minimum borrow amount of base currency # noqa: E501 :param base_min_borrow_amount: The base_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def base_min_borrow_amount(self, base_min_borrow_amount): def quote_min_borrow_amount(self): """Gets the quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 - Minimum borrow amount of quote currency. # noqa: E501 + Minimum borrow amount of quote currency # noqa: E501 :return: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def quote_min_borrow_amount(self): def quote_min_borrow_amount(self, quote_min_borrow_amount): """Sets the quote_min_borrow_amount of this UniCurrencyPair. - Minimum borrow amount of quote currency. # noqa: E501 + Minimum borrow amount of quote currency # noqa: E501 :param quote_min_borrow_amount: The quote_min_borrow_amount of this UniCurrencyPair. # noqa: E501 :type: str @@ -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 + Position leverage # 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 + Position leverage # noqa: E501 :param leverage: The leverage of this UniCurrencyPair. # noqa: E501 :type: str diff --git a/gate_api/models/uni_interest_record.py b/gate_api/models/uni_interest_record.py index 0be8bec..f06d5fd 100644 --- a/gate_api/models/uni_interest_record.py +++ b/gate_api/models/uni_interest_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, status=None, currency=None, actual_rate=None, interest=None, def status(self): """Gets the status of this UniInterestRecord. # noqa: E501 - Status: 0 - fail, 1 - success. # noqa: E501 + Status: 0 - fail, 1 - success # noqa: E501 :return: The status of this UniInterestRecord. # noqa: E501 :rtype: int @@ -93,7 +93,7 @@ def status(self): def status(self, status): """Sets the status of this UniInterestRecord. - Status: 0 - fail, 1 - success. # noqa: E501 + Status: 0 - fail, 1 - success # noqa: E501 :param status: The status of this UniInterestRecord. # noqa: E501 :type: int @@ -105,7 +105,7 @@ def status(self, status): def currency(self): """Gets the currency of this UniInterestRecord. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UniInterestRecord. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniInterestRecord. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UniInterestRecord. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def currency(self, currency): def actual_rate(self): """Gets the actual_rate of this UniInterestRecord. # noqa: E501 - Actual Rate. # noqa: E501 + Actual Rate # noqa: E501 :return: The actual_rate of this UniInterestRecord. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def actual_rate(self): def actual_rate(self, actual_rate): """Sets the actual_rate of this UniInterestRecord. - Actual Rate. # noqa: E501 + Actual Rate # noqa: E501 :param actual_rate: The actual_rate of this UniInterestRecord. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def actual_rate(self, actual_rate): def interest(self): """Gets the interest of this UniInterestRecord. # noqa: E501 - Interest. # noqa: E501 + Interest # noqa: E501 :return: The interest of this UniInterestRecord. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this UniInterestRecord. - Interest. # noqa: E501 + Interest # noqa: E501 :param interest: The interest of this UniInterestRecord. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def interest_status(self, interest_status): def create_time(self): """Gets the create_time of this UniInterestRecord. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this UniInterestRecord. # noqa: E501 :rtype: int @@ -208,7 +208,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniInterestRecord. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this UniInterestRecord. # noqa: E501 :type: int diff --git a/gate_api/models/uni_lend.py b/gate_api/models/uni_lend.py index 16bd0ae..8c00a50 100644 --- a/gate_api/models/uni_lend.py +++ b/gate_api/models/uni_lend.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -102,7 +102,7 @@ def __init__(self, currency=None, current_amount=None, amount=None, lent_amount= def currency(self): """Gets the currency of this UniLend. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UniLend. # noqa: E501 :rtype: str @@ -113,7 +113,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLend. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UniLend. # noqa: E501 :type: str @@ -125,7 +125,7 @@ def currency(self, currency): def current_amount(self): """Gets the current_amount of this UniLend. # noqa: E501 - Current amount. # noqa: E501 + Current amount # noqa: E501 :return: The current_amount of this UniLend. # noqa: E501 :rtype: str @@ -136,7 +136,7 @@ def current_amount(self): def current_amount(self, current_amount): """Sets the current_amount of this UniLend. - Current amount. # noqa: E501 + Current amount # noqa: E501 :param current_amount: The current_amount of this UniLend. # noqa: E501 :type: str @@ -148,7 +148,7 @@ def current_amount(self, current_amount): def amount(self): """Gets the amount of this UniLend. # noqa: E501 - Total amount. # noqa: E501 + Total Lending Amount # noqa: E501 :return: The amount of this UniLend. # noqa: E501 :rtype: str @@ -159,7 +159,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLend. - Total amount. # noqa: E501 + Total Lending Amount # noqa: E501 :param amount: The amount of this UniLend. # noqa: E501 :type: str @@ -171,7 +171,7 @@ def amount(self, amount): def lent_amount(self): """Gets the lent_amount of this UniLend. # noqa: E501 - Lent amount. # noqa: E501 + Lent Amount # noqa: E501 :return: The lent_amount of this UniLend. # noqa: E501 :rtype: str @@ -182,7 +182,7 @@ def lent_amount(self): def lent_amount(self, lent_amount): """Sets the lent_amount of this UniLend. - Lent amount. # noqa: E501 + Lent Amount # noqa: E501 :param lent_amount: The lent_amount of this UniLend. # noqa: E501 :type: str @@ -194,7 +194,7 @@ def lent_amount(self, lent_amount): def frozen_amount(self): """Gets the frozen_amount of this UniLend. # noqa: E501 - Frozen amount. # noqa: E501 + Pending Redemption Amount # noqa: E501 :return: The frozen_amount of this UniLend. # noqa: E501 :rtype: str @@ -205,7 +205,7 @@ def frozen_amount(self): def frozen_amount(self, frozen_amount): """Sets the frozen_amount of this UniLend. - Frozen amount. # noqa: E501 + Pending Redemption Amount # noqa: E501 :param frozen_amount: The frozen_amount of this UniLend. # noqa: E501 :type: str @@ -217,7 +217,7 @@ def frozen_amount(self, frozen_amount): def min_rate(self): """Gets the min_rate of this UniLend. # noqa: E501 - Minimum interest rate. # noqa: E501 + Minimum interest rate # noqa: E501 :return: The min_rate of this UniLend. # noqa: E501 :rtype: str @@ -228,7 +228,7 @@ def min_rate(self): def min_rate(self, min_rate): """Sets the min_rate of this UniLend. - Minimum interest rate. # noqa: E501 + Minimum interest rate # noqa: E501 :param min_rate: The min_rate of this UniLend. # noqa: E501 :type: str @@ -263,7 +263,7 @@ def interest_status(self, interest_status): def reinvest_left_amount(self): """Gets the reinvest_left_amount of this UniLend. # noqa: E501 - Amount not reinvested. # noqa: E501 + Non-reinvested Amount # noqa: E501 :return: The reinvest_left_amount of this UniLend. # noqa: E501 :rtype: str @@ -274,7 +274,7 @@ def reinvest_left_amount(self): def reinvest_left_amount(self, reinvest_left_amount): """Sets the reinvest_left_amount of this UniLend. - Amount not reinvested. # noqa: E501 + Non-reinvested Amount # noqa: E501 :param reinvest_left_amount: The reinvest_left_amount of this UniLend. # noqa: E501 :type: str @@ -286,7 +286,7 @@ def reinvest_left_amount(self, reinvest_left_amount): def create_time(self): """Gets the create_time of this UniLend. # noqa: E501 - Created time of the lending order. # noqa: E501 + Lending Order Creation Time # noqa: E501 :return: The create_time of this UniLend. # noqa: E501 :rtype: int @@ -297,7 +297,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLend. - Created time of the lending order. # noqa: E501 + Lending Order Creation Time # noqa: E501 :param create_time: The create_time of this UniLend. # noqa: E501 :type: int @@ -309,7 +309,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this UniLend. # noqa: E501 - Upated time of the lending order. # noqa: E501 + Lending Order Last Update Time # noqa: E501 :return: The update_time of this UniLend. # noqa: E501 :rtype: int @@ -320,7 +320,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this UniLend. - Upated time of the lending order. # noqa: E501 + Lending Order Last Update Time # noqa: E501 :param update_time: The update_time of this UniLend. # noqa: E501 :type: int diff --git a/gate_api/models/uni_lend_interest.py b/gate_api/models/uni_lend_interest.py index f6375ee..80f3a0a 100644 --- a/gate_api/models/uni_lend_interest.py +++ b/gate_api/models/uni_lend_interest.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, interest=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UniLendInterest. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UniLendInterest. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLendInterest. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UniLendInterest. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def interest(self): """Gets the interest of this UniLendInterest. # noqa: E501 - Interest. # noqa: E501 + Interest income # noqa: E501 :return: The interest of this UniLendInterest. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this UniLendInterest. - Interest. # noqa: E501 + Interest income # noqa: E501 :param interest: The interest of this UniLendInterest. # noqa: E501 :type: str diff --git a/gate_api/models/uni_lend_record.py b/gate_api/models/uni_lend_record.py index bf2d677..a435111 100644 --- a/gate_api/models/uni_lend_record.py +++ b/gate_api/models/uni_lend_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, currency=None, amount=None, last_wallet_amount=None, last_len def currency(self): """Gets the currency of this UniLendRecord. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UniLendRecord. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLendRecord. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UniLendRecord. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UniLendRecord. # noqa: E501 - current amount. # noqa: E501 + Current Amount # noqa: E501 :return: The amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLendRecord. - current amount. # noqa: E501 + Current Amount # noqa: E501 :param amount: The amount of this UniLendRecord. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def amount(self, amount): def last_wallet_amount(self): """Gets the last_wallet_amount of this UniLendRecord. # noqa: E501 - Last wallet amount. # noqa: E501 + Previous Available Amount # noqa: E501 :return: The last_wallet_amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def last_wallet_amount(self): def last_wallet_amount(self, last_wallet_amount): """Sets the last_wallet_amount of this UniLendRecord. - Last wallet amount. # noqa: E501 + Previous Available Amount # noqa: E501 :param last_wallet_amount: The last_wallet_amount of this UniLendRecord. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def last_wallet_amount(self, last_wallet_amount): def last_lent_amount(self): """Gets the last_lent_amount of this UniLendRecord. # noqa: E501 - Last lent amount. # noqa: E501 + Previous Lent Amount # noqa: E501 :return: The last_lent_amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def last_lent_amount(self): def last_lent_amount(self, last_lent_amount): """Sets the last_lent_amount of this UniLendRecord. - Last lent amount. # noqa: E501 + Previous Lent Amount # noqa: E501 :param last_lent_amount: The last_lent_amount of this UniLendRecord. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def last_lent_amount(self, last_lent_amount): def last_frozen_amount(self): """Gets the last_frozen_amount of this UniLendRecord. # noqa: E501 - Last frozen amount. # noqa: E501 + Previous Frozen Amount # noqa: E501 :return: The last_frozen_amount of this UniLendRecord. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def last_frozen_amount(self): def last_frozen_amount(self, last_frozen_amount): """Sets the last_frozen_amount of this UniLendRecord. - Last frozen amount. # noqa: E501 + Previous Frozen Amount # noqa: E501 :param last_frozen_amount: The last_frozen_amount of this UniLendRecord. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def last_frozen_amount(self, last_frozen_amount): def type(self): """Gets the type of this UniLendRecord. # noqa: E501 - Record type: lend - lend, redeem - redeem. # noqa: E501 + Record Type: lend - Lend, redeem - Redeem # noqa: E501 :return: The type of this UniLendRecord. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def type(self): def type(self, type): """Sets the type of this UniLendRecord. - Record type: lend - lend, redeem - redeem. # noqa: E501 + Record Type: lend - Lend, redeem - Redeem # noqa: E501 :param type: The type of this UniLendRecord. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def type(self, type): def create_time(self): """Gets the create_time of this UniLendRecord. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this UniLendRecord. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLendRecord. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this UniLendRecord. # noqa: E501 :type: int diff --git a/gate_api/models/uni_loan.py b/gate_api/models/uni_loan.py index c132dfe..0010ef5 100644 --- a/gate_api/models/uni_loan.py +++ b/gate_api/models/uni_loan.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, currency=None, currency_pair=None, amount=None, type=None, cr def currency(self): """Gets the currency of this UniLoan. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UniLoan. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLoan. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UniLoan. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this UniLoan. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this UniLoan. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniLoan. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this UniLoan. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def currency_pair(self, currency_pair): def amount(self): """Gets the amount of this UniLoan. # noqa: E501 - amount. # noqa: E501 + Amount to Repay # noqa: E501 :return: The amount of this UniLoan. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLoan. - amount. # noqa: E501 + Amount to Repay # noqa: E501 :param amount: The amount of this UniLoan. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def amount(self, amount): def type(self): """Gets the type of this UniLoan. # noqa: E501 - Loan type, platform - platform, margin - margin. # noqa: E501 + Loan type: platform borrowing - platform, margin borrowing - margin # noqa: E501 :return: The type of this UniLoan. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def type(self): def type(self, type): """Sets the type of this UniLoan. - Loan type, platform - platform, margin - margin. # noqa: E501 + Loan type: platform borrowing - platform, margin borrowing - margin # noqa: E501 :param type: The type of this UniLoan. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def type(self, type): def create_time(self): """Gets the create_time of this UniLoan. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this UniLoan. # noqa: E501 :rtype: int @@ -185,7 +185,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLoan. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this UniLoan. # noqa: E501 :type: int @@ -197,7 +197,7 @@ def create_time(self, create_time): def update_time(self): """Gets the update_time of this UniLoan. # noqa: E501 - Updated time. # noqa: E501 + Last Update Time # noqa: E501 :return: The update_time of this UniLoan. # noqa: E501 :rtype: int @@ -208,7 +208,7 @@ def update_time(self): def update_time(self, update_time): """Sets the update_time of this UniLoan. - Updated time. # noqa: E501 + Last Update Time # noqa: E501 :param update_time: The update_time of this UniLoan. # noqa: E501 :type: int diff --git a/gate_api/models/uni_loan_interest_record.py b/gate_api/models/uni_loan_interest_record.py index 4a28393..537866f 100644 --- a/gate_api/models/uni_loan_interest_record.py +++ b/gate_api/models/uni_loan_interest_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, currency=None, currency_pair=None, actual_rate=None, interest def currency(self): """Gets the currency of this UniLoanInterestRecord. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLoanInterestRecord. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def currency(self, currency): def currency_pair(self): """Gets the currency_pair of this UniLoanInterestRecord. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniLoanInterestRecord. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def currency_pair(self, currency_pair): def actual_rate(self): """Gets the actual_rate of this UniLoanInterestRecord. # noqa: E501 - Actual rate. # noqa: E501 + Actual Rate # noqa: E501 :return: The actual_rate of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def actual_rate(self): def actual_rate(self, actual_rate): """Sets the actual_rate of this UniLoanInterestRecord. - Actual rate. # noqa: E501 + Actual Rate # noqa: E501 :param actual_rate: The actual_rate of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def actual_rate(self, actual_rate): def interest(self): """Gets the interest of this UniLoanInterestRecord. # noqa: E501 - Interest. # noqa: E501 + Interest # noqa: E501 :return: The interest of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def interest(self): def interest(self, interest): """Sets the interest of this UniLoanInterestRecord. - Interest. # noqa: E501 + Interest # noqa: E501 :param interest: The interest of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def interest(self, interest): def status(self): """Gets the status of this UniLoanInterestRecord. # noqa: E501 - Status: 0 - fail, 1 - success. # noqa: E501 + Status: 0 - fail, 1 - success # noqa: E501 :return: The status of this UniLoanInterestRecord. # noqa: E501 :rtype: int @@ -190,7 +190,7 @@ def status(self): def status(self, status): """Sets the status of this UniLoanInterestRecord. - Status: 0 - fail, 1 - success. # noqa: E501 + Status: 0 - fail, 1 - success # noqa: E501 :param status: The status of this UniLoanInterestRecord. # noqa: E501 :type: int @@ -202,7 +202,7 @@ def status(self, status): def type(self): """Gets the type of this UniLoanInterestRecord. # noqa: E501 - Type, platform - platform,margin - margin. # noqa: E501 + Type: platform - Platform borrowing, margin - Margin borrowing # noqa: E501 :return: The type of this UniLoanInterestRecord. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def type(self): def type(self, type): """Sets the type of this UniLoanInterestRecord. - Type, platform - platform,margin - margin. # noqa: E501 + Type: platform - Platform borrowing, margin - Margin borrowing # noqa: E501 :param type: The type of this UniLoanInterestRecord. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def type(self, type): def create_time(self): """Gets the create_time of this UniLoanInterestRecord. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this UniLoanInterestRecord. # noqa: E501 :rtype: int @@ -236,7 +236,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLoanInterestRecord. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this UniLoanInterestRecord. # noqa: E501 :type: int diff --git a/gate_api/models/uni_loan_record.py b/gate_api/models/uni_loan_record.py index 4aa5d73..460120b 100644 --- a/gate_api/models/uni_loan_record.py +++ b/gate_api/models/uni_loan_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, type=None, currency_pair=None, currency=None, amount=None, cr def type(self): """Gets the type of this UniLoanRecord. # noqa: E501 - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :return: The type of this UniLoanRecord. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def type(self): def type(self, type): """Sets the type of this UniLoanRecord. - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :param type: The type of this UniLoanRecord. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def type(self, type): def currency_pair(self): """Gets the currency_pair of this UniLoanRecord. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this UniLoanRecord. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UniLoanRecord. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this UniLoanRecord. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def currency_pair(self, currency_pair): def currency(self): """Gets the currency of this UniLoanRecord. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UniLoanRecord. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UniLoanRecord. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UniLoanRecord. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UniLoanRecord. # noqa: E501 - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :return: The amount of this UniLoanRecord. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UniLoanRecord. - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :param amount: The amount of this UniLoanRecord. # noqa: E501 :type: str @@ -169,7 +169,7 @@ def amount(self, amount): def create_time(self): """Gets the create_time of this UniLoanRecord. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this UniLoanRecord. # noqa: E501 :rtype: int @@ -180,7 +180,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UniLoanRecord. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this UniLoanRecord. # noqa: E501 :type: int diff --git a/gate_api/models/unified_account.py b/gate_api/models/unified_account.py index 7c2dfe7..7c3f5e4 100644 --- a/gate_api/models/unified_account.py +++ b/gate_api/models/unified_account.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -152,7 +152,7 @@ def __init__(self, user_id=None, refresh_time=None, locked=None, balances=None, def user_id(self): """Gets the user_id of this UnifiedAccount. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this UnifiedAccount. # noqa: E501 :rtype: int @@ -163,7 +163,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this UnifiedAccount. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this UnifiedAccount. # noqa: E501 :type: int @@ -175,7 +175,7 @@ def user_id(self, user_id): def refresh_time(self): """Gets the refresh_time of this UnifiedAccount. # noqa: E501 - Time of the most recent refresh. # noqa: E501 + Last refresh time # noqa: E501 :return: The refresh_time of this UnifiedAccount. # noqa: E501 :rtype: int @@ -186,7 +186,7 @@ def refresh_time(self): def refresh_time(self, refresh_time): """Sets the refresh_time of this UnifiedAccount. - Time of the most recent refresh. # noqa: E501 + Last refresh time # noqa: E501 :param refresh_time: The refresh_time of this UnifiedAccount. # noqa: E501 :type: int @@ -242,7 +242,7 @@ def balances(self, balances): def total(self): """Gets the total of this UnifiedAccount. # noqa: E501 - Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 + Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be removed, replaced by unified_account_total) # noqa: E501 :return: The total of this UnifiedAccount. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def total(self): def total(self, total): """Sets the total of this UnifiedAccount. - Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be deprecated, replaced by unified_account_total) # noqa: E501 + Total account assets converted to USD, i.e. the sum of `(available + freeze) * price` in all currencies (deprecated, to be removed, replaced by unified_account_total) # noqa: E501 :param total: The total of this UnifiedAccount. # noqa: E501 :type: str @@ -265,7 +265,7 @@ def total(self, total): def borrowed(self): """Gets the borrowed of this UnifiedAccount. # noqa: E501 - The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. # noqa: E501 + Total borrowed amount converted to USD, i.e. the sum of `borrowed * price` of all currencies (excluding point cards), valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :return: The borrowed of this UnifiedAccount. # noqa: E501 :rtype: str @@ -276,7 +276,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this UnifiedAccount. - The total borrowed amount of the account converted into USD, i.e. the sum of `borrowed * price` of all currencies (excluding Point Cards). It is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode. # noqa: E501 + Total borrowed amount converted to USD, i.e. the sum of `borrowed * price` of all currencies (excluding point cards), valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :param borrowed: The borrowed of this UnifiedAccount. # noqa: E501 :type: str @@ -426,7 +426,7 @@ def total_available_margin(self, total_available_margin): def unified_account_total(self): """Gets the unified_account_total of this UnifiedAccount. # noqa: E501 - Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + Total unified account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 :return: The unified_account_total of this UnifiedAccount. # noqa: E501 :rtype: str @@ -437,7 +437,7 @@ def unified_account_total(self): def unified_account_total(self, unified_account_total): """Sets the unified_account_total of this UnifiedAccount. - Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + Total unified account assets, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 :param unified_account_total: The unified_account_total of this UnifiedAccount. # noqa: E501 :type: str @@ -449,7 +449,7 @@ def unified_account_total(self, unified_account_total): def unified_account_total_liab(self): """Gets the unified_account_total_liab of this UnifiedAccount. # noqa: E501 - Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode # noqa: E501 + Total unified account borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :return: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 :rtype: str @@ -460,7 +460,7 @@ def unified_account_total_liab(self): def unified_account_total_liab(self, unified_account_total_liab): """Sets the unified_account_total_liab of this UnifiedAccount. - Unify the total loan of the account, valid in the cross-currency margin/combined margin mode, and 0 in other modes such as single-currency margin mode # noqa: E501 + Total unified account borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :param unified_account_total_liab: The unified_account_total_liab of this UnifiedAccount. # noqa: E501 :type: str @@ -472,7 +472,7 @@ def unified_account_total_liab(self, unified_account_total_liab): def unified_account_total_equity(self): """Gets the unified_account_total_equity of this UnifiedAccount. # noqa: E501 - Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + Total unified account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 :return: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 :rtype: str @@ -483,7 +483,7 @@ def unified_account_total_equity(self): def unified_account_total_equity(self, unified_account_total_equity): """Sets the unified_account_total_equity of this UnifiedAccount. - Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + Total unified account equity, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 :param unified_account_total_equity: The unified_account_total_equity of this UnifiedAccount. # noqa: E501 :type: str @@ -495,7 +495,7 @@ def unified_account_total_equity(self, unified_account_total_equity): def leverage(self): """Gets the leverage of this UnifiedAccount. # noqa: E501 - Actual leverage, valid in cross-currency margin/combined margin mode. # noqa: E501 + Actual leverage ratio, valid in cross-currency margin/combined margin mode # noqa: E501 :return: The leverage of this UnifiedAccount. # noqa: E501 :rtype: str @@ -506,7 +506,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this UnifiedAccount. - Actual leverage, valid in cross-currency margin/combined margin mode. # noqa: E501 + Actual leverage ratio, valid in cross-currency margin/combined margin mode # noqa: E501 :param leverage: The leverage of this UnifiedAccount. # noqa: E501 :type: str @@ -541,7 +541,7 @@ def spot_order_loss(self, spot_order_loss): def spot_hedge(self): """Gets the spot_hedge of this UnifiedAccount. # noqa: E501 - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + Spot hedging status: true - enabled, false - disabled # noqa: E501 :return: The spot_hedge of this UnifiedAccount. # noqa: E501 :rtype: bool @@ -552,7 +552,7 @@ def spot_hedge(self): def spot_hedge(self, spot_hedge): """Sets the spot_hedge of this UnifiedAccount. - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + Spot hedging status: true - enabled, false - disabled # noqa: E501 :param spot_hedge: The spot_hedge of this UnifiedAccount. # noqa: E501 :type: bool @@ -564,7 +564,7 @@ def spot_hedge(self, spot_hedge): def use_funding(self): """Gets the use_funding of this UnifiedAccount. # noqa: E501 - Whether to use funds as margin. # noqa: E501 + Whether to use Earn funds as margin # noqa: E501 :return: The use_funding of this UnifiedAccount. # noqa: E501 :rtype: bool @@ -575,7 +575,7 @@ def use_funding(self): def use_funding(self, use_funding): """Sets the use_funding of this UnifiedAccount. - Whether to use funds as margin. # noqa: E501 + Whether to use Earn funds as margin # noqa: E501 :param use_funding: The use_funding of this UnifiedAccount. # noqa: E501 :type: bool @@ -587,7 +587,7 @@ def use_funding(self, use_funding): def is_all_collateral(self): """Gets the is_all_collateral of this UnifiedAccount. # noqa: E501 - Whether all currencies are used as margin, true - false - No # noqa: E501 + Whether all currencies are used as margin: true - all currencies as margin, false - no # noqa: E501 :return: The is_all_collateral of this UnifiedAccount. # noqa: E501 :rtype: bool @@ -598,7 +598,7 @@ def is_all_collateral(self): def is_all_collateral(self, is_all_collateral): """Sets the is_all_collateral of this UnifiedAccount. - Whether all currencies are used as margin, true - false - No # noqa: E501 + Whether all currencies are used as margin: true - all currencies as margin, false - no # noqa: E501 :param is_all_collateral: The is_all_collateral of this UnifiedAccount. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_balance.py b/gate_api/models/unified_balance.py index cd39662..1d7171a 100644 --- a/gate_api/models/unified_balance.py +++ b/gate_api/models/unified_balance.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -152,7 +152,7 @@ def __init__(self, available=None, freeze=None, borrowed=None, negative_liab=Non def available(self): """Gets the available of this UnifiedBalance. # noqa: E501 - Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes # noqa: E501 + Available balance, valid in single currency margin/cross-currency margin/combined margin mode, calculation varies by mode # noqa: E501 :return: The available of this UnifiedBalance. # noqa: E501 :rtype: str @@ -163,7 +163,7 @@ def available(self): def available(self, available): """Sets the available of this UnifiedBalance. - Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes # noqa: E501 + Available balance, valid in single currency margin/cross-currency margin/combined margin mode, calculation varies by mode # noqa: E501 :param available: The available of this UnifiedBalance. # noqa: E501 :type: str @@ -175,7 +175,7 @@ def available(self, available): def freeze(self): """Gets the freeze of this UnifiedBalance. # noqa: E501 - The locked amount is valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + Locked balance, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 :return: The freeze of this UnifiedBalance. # noqa: E501 :rtype: str @@ -186,7 +186,7 @@ def freeze(self): def freeze(self, freeze): """Sets the freeze of this UnifiedBalance. - The locked amount is valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 + Locked balance, valid in single currency margin/cross-currency margin/combined margin mode # noqa: E501 :param freeze: The freeze of this UnifiedBalance. # noqa: E501 :type: str @@ -198,7 +198,7 @@ def freeze(self, freeze): def borrowed(self): """Gets the borrowed of this UnifiedBalance. # noqa: E501 - Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + Borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :return: The borrowed of this UnifiedBalance. # noqa: E501 :rtype: str @@ -209,7 +209,7 @@ def borrowed(self): def borrowed(self, borrowed): """Sets the borrowed of this UnifiedBalance. - Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + Borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :param borrowed: The borrowed of this UnifiedBalance. # noqa: E501 :type: str @@ -221,7 +221,7 @@ def borrowed(self, borrowed): def negative_liab(self): """Gets the negative_liab of this UnifiedBalance. # noqa: E501 - Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 + Negative balance borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :return: The negative_liab of this UnifiedBalance. # noqa: E501 :rtype: str @@ -232,7 +232,7 @@ def negative_liab(self): def negative_liab(self, negative_liab): """Sets the negative_liab of this UnifiedBalance. - Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode # noqa: E501 + Negative balance borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :param negative_liab: The negative_liab of this UnifiedBalance. # noqa: E501 :type: str @@ -290,7 +290,7 @@ def equity(self, equity): def total_freeze(self): """Gets the total_freeze of this UnifiedBalance. # noqa: E501 - Total occupancy (discarded, to be offline field). # noqa: E501 + Total frozen (deprecated, to be removed) # noqa: E501 :return: The total_freeze of this UnifiedBalance. # noqa: E501 :rtype: str @@ -301,7 +301,7 @@ def total_freeze(self): def total_freeze(self, total_freeze): """Sets the total_freeze of this UnifiedBalance. - Total occupancy (discarded, to be offline field). # noqa: E501 + Total frozen (deprecated, to be removed) # noqa: E501 :param total_freeze: The total_freeze of this UnifiedBalance. # noqa: E501 :type: str @@ -313,7 +313,7 @@ def total_freeze(self, total_freeze): def total_liab(self): """Gets the total_liab of this UnifiedBalance. # noqa: E501 - Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + Total borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :return: The total_liab of this UnifiedBalance. # noqa: E501 :rtype: str @@ -324,7 +324,7 @@ def total_liab(self): def total_liab(self, total_liab): """Sets the total_liab of this UnifiedBalance. - Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 + Total borrowed amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode # noqa: E501 :param total_liab: The total_liab of this UnifiedBalance. # noqa: E501 :type: str @@ -382,7 +382,7 @@ def funding(self, funding): def funding_version(self): """Gets the funding_version of this UnifiedBalance. # noqa: E501 - Funding version. # noqa: E501 + Funding version # noqa: E501 :return: The funding_version of this UnifiedBalance. # noqa: E501 :rtype: str @@ -393,7 +393,7 @@ def funding_version(self): def funding_version(self, funding_version): """Sets the funding_version of this UnifiedBalance. - Funding version. # noqa: E501 + Funding version # noqa: E501 :param funding_version: The funding_version of this UnifiedBalance. # noqa: E501 :type: str @@ -474,7 +474,7 @@ def im(self, im): def mm(self): """Gets the mm of this UnifiedBalance. # noqa: E501 - The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. # noqa: E501 + Cross margin maintenance margin, valid in single-currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 :return: The mm of this UnifiedBalance. # noqa: E501 :rtype: str @@ -485,7 +485,7 @@ def mm(self): def mm(self, mm): """Sets the mm of this UnifiedBalance. - The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. # noqa: E501 + Cross margin maintenance margin, valid in single-currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 :param mm: The mm of this UnifiedBalance. # noqa: E501 :type: str @@ -566,7 +566,7 @@ def margin_balance(self, margin_balance): def available_margin(self): """Gets the available_margin of this UnifiedBalance. # noqa: E501 - Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + Cross margin available balance, valid in single currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 :return: The available_margin of this UnifiedBalance. # noqa: E501 :rtype: str @@ -577,7 +577,7 @@ def available_margin(self): def available_margin(self, available_margin): """Sets the available_margin of this UnifiedBalance. - Full margin available for full position is valid in single currency margin mode, and is 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 + Cross margin available balance, valid in single currency margin mode, 0 in other modes such as cross-currency margin/combined margin mode # noqa: E501 :param available_margin: The available_margin of this UnifiedBalance. # noqa: E501 :type: str @@ -589,7 +589,7 @@ def available_margin(self, available_margin): def enabled_collateral(self): """Gets the enabled_collateral of this UnifiedBalance. # noqa: E501 - Currency enabled as margin: true - Enabled, false - Disabled. # noqa: E501 + Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501 :return: The enabled_collateral of this UnifiedBalance. # noqa: E501 :rtype: bool @@ -600,7 +600,7 @@ def enabled_collateral(self): def enabled_collateral(self, enabled_collateral): """Sets the enabled_collateral of this UnifiedBalance. - Currency enabled as margin: true - Enabled, false - Disabled. # noqa: E501 + Currency enabled as margin: true - Enabled, false - Disabled # noqa: E501 :param enabled_collateral: The enabled_collateral of this UnifiedBalance. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_borrowable.py b/gate_api/models/unified_borrowable.py index 51ac569..7201c76 100644 --- a/gate_api/models/unified_borrowable.py +++ b/gate_api/models/unified_borrowable.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedBorrowable. # noqa: E501 - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :return: The currency of this UnifiedBorrowable. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedBorrowable. - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :param currency: The currency of this UnifiedBorrowable. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedBorrowable. # noqa: E501 - Max borrowable amount. # noqa: E501 + Max borrowable amount # noqa: E501 :return: The amount of this UnifiedBorrowable. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedBorrowable. - Max borrowable amount. # noqa: E501 + Max borrowable amount # noqa: E501 :param amount: The amount of this UnifiedBorrowable. # noqa: E501 :type: str diff --git a/gate_api/models/unified_borrowable1.py b/gate_api/models/unified_borrowable1.py index 88aea59..626d1af 100644 --- a/gate_api/models/unified_borrowable1.py +++ b/gate_api/models/unified_borrowable1.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedBorrowable1. # noqa: E501 - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :return: The currency of this UnifiedBorrowable1. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedBorrowable1. - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :param currency: The currency of this UnifiedBorrowable1. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedBorrowable1. # noqa: E501 - The maximum amount to borrow. # noqa: E501 + Maximum borrowable amount # noqa: E501 :return: The amount of this UnifiedBorrowable1. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedBorrowable1. - The maximum amount to borrow. # noqa: E501 + Maximum borrowable amount # noqa: E501 :param amount: The amount of this UnifiedBorrowable1. # noqa: E501 :type: str diff --git a/gate_api/models/unified_collateral_req.py b/gate_api/models/unified_collateral_req.py index 16b276b..6e4c9c2 100644 --- a/gate_api/models/unified_collateral_req.py +++ b/gate_api/models/unified_collateral_req.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, collateral_type=None, enable_list=None, disable_list=None, lo def collateral_type(self): """Gets the collateral_type of this UnifiedCollateralReq. # noqa: E501 - User-set collateral mode0(all)-All currencies used as collateral, collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 + User-set collateral mode: 0(all)-All currencies as collateral, 1(custom)-Custom currencies as collateral. When collateral_type is 0(all), enable_list and disable_list parameters are invalid # noqa: E501 :return: The collateral_type of this UnifiedCollateralReq. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def collateral_type(self): def collateral_type(self, collateral_type): """Sets the collateral_type of this UnifiedCollateralReq. - User-set collateral mode0(all)-All currencies used as collateral, collateral; when collateral_type is 0(all), the enable_list and disable_list parameters are invalid # noqa: E501 + User-set collateral mode: 0(all)-All currencies as collateral, 1(custom)-Custom currencies as collateral. When collateral_type is 0(all), enable_list and disable_list parameters are invalid # noqa: E501 :param collateral_type: The collateral_type of this UnifiedCollateralReq. # noqa: E501 :type: int @@ -96,7 +96,7 @@ def collateral_type(self, collateral_type): def enable_list(self): """Gets the enable_list of this UnifiedCollateralReq. # noqa: E501 - Currency list, where collateral_type=1(custom) indicates the logic of addition # noqa: E501 + Currency list, where collateral_type=1(custom) indicates the addition logic # noqa: E501 :return: The enable_list of this UnifiedCollateralReq. # noqa: E501 :rtype: list[str] @@ -107,7 +107,7 @@ def enable_list(self): def enable_list(self, enable_list): """Sets the enable_list of this UnifiedCollateralReq. - Currency list, where collateral_type=1(custom) indicates the logic of addition # noqa: E501 + Currency list, where collateral_type=1(custom) indicates the addition logic # noqa: E501 :param enable_list: The enable_list of this UnifiedCollateralReq. # noqa: E501 :type: list[str] @@ -119,7 +119,7 @@ def enable_list(self, enable_list): def disable_list(self): """Gets the disable_list of this UnifiedCollateralReq. # noqa: E501 - Cancellation list, indicating the logic of cancellation. # noqa: E501 + Disable list, indicating the disable logic # noqa: E501 :return: The disable_list of this UnifiedCollateralReq. # noqa: E501 :rtype: list[str] @@ -130,7 +130,7 @@ def disable_list(self): def disable_list(self, disable_list): """Sets the disable_list of this UnifiedCollateralReq. - Cancellation list, indicating the logic of cancellation. # noqa: E501 + Disable list, indicating the disable logic # noqa: E501 :param disable_list: The disable_list of this UnifiedCollateralReq. # noqa: E501 :type: list[str] diff --git a/gate_api/models/unified_collateral_res.py b/gate_api/models/unified_collateral_res.py index 39aca87..a1cd842 100644 --- a/gate_api/models/unified_collateral_res.py +++ b/gate_api/models/unified_collateral_res.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, is_success=None, local_vars_configuration=None): # noqa: E50 def is_success(self): """Gets the is_success of this UnifiedCollateralRes. # noqa: E501 - Whether the setting was successful. # noqa: E501 + Whether the setting was successful # noqa: E501 :return: The is_success of this UnifiedCollateralRes. # noqa: E501 :rtype: bool @@ -68,7 +68,7 @@ def is_success(self): def is_success(self, is_success): """Sets the is_success of this UnifiedCollateralRes. - Whether the setting was successful. # noqa: E501 + Whether the setting was successful # noqa: E501 :param is_success: The is_success of this UnifiedCollateralRes. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_currency.py b/gate_api/models/unified_currency.py index 38ee3db..1039e91 100644 --- a/gate_api/models/unified_currency.py +++ b/gate_api/models/unified_currency.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -82,7 +82,7 @@ def __init__(self, name=None, prec=None, min_borrow_amount=None, user_max_borrow def name(self): """Gets the name of this UnifiedCurrency. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The name of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -93,7 +93,7 @@ def name(self): def name(self, name): """Sets the name of this UnifiedCurrency. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param name: The name of this UnifiedCurrency. # noqa: E501 :type: str @@ -105,7 +105,7 @@ def name(self, name): def prec(self): """Gets the prec of this UnifiedCurrency. # noqa: E501 - Currency precision. # noqa: E501 + Currency precision # noqa: E501 :return: The prec of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -116,7 +116,7 @@ def prec(self): def prec(self, prec): """Sets the prec of this UnifiedCurrency. - Currency precision. # noqa: E501 + Currency precision # noqa: E501 :param prec: The prec of this UnifiedCurrency. # noqa: E501 :type: str @@ -128,7 +128,7 @@ def prec(self, prec): def min_borrow_amount(self): """Gets the min_borrow_amount of this UnifiedCurrency. # noqa: E501 - The minimum debit limit is the unit of currency. # noqa: E501 + Minimum borrowable limit, in currency units # noqa: E501 :return: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -139,7 +139,7 @@ def min_borrow_amount(self): def min_borrow_amount(self, min_borrow_amount): """Sets the min_borrow_amount of this UnifiedCurrency. - The minimum debit limit is the unit of currency. # noqa: E501 + Minimum borrowable limit, in currency units # noqa: E501 :param min_borrow_amount: The min_borrow_amount of this UnifiedCurrency. # noqa: E501 :type: str @@ -151,7 +151,7 @@ def min_borrow_amount(self, min_borrow_amount): def user_max_borrow_amount(self): """Gets the user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - The minimum debit limit is the unit of currency. # noqa: E501 + User's maximum borrowable limit, in USDT # noqa: E501 :return: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -162,7 +162,7 @@ def user_max_borrow_amount(self): def user_max_borrow_amount(self, user_max_borrow_amount): """Sets the user_max_borrow_amount of this UnifiedCurrency. - The minimum debit limit is the unit of currency. # noqa: E501 + User's maximum borrowable limit, in USDT # noqa: E501 :param user_max_borrow_amount: The user_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :type: str @@ -174,7 +174,7 @@ def user_max_borrow_amount(self, user_max_borrow_amount): def total_max_borrow_amount(self): """Gets the total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 - The maximum debit limit for the platform is USDT. # noqa: E501 + Platform's maximum borrowable limit, in USDT # noqa: E501 :return: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -185,7 +185,7 @@ def total_max_borrow_amount(self): def total_max_borrow_amount(self, total_max_borrow_amount): """Sets the total_max_borrow_amount of this UnifiedCurrency. - The maximum debit limit for the platform is USDT. # noqa: E501 + Platform's maximum borrowable limit, in USDT # noqa: E501 :param total_max_borrow_amount: The total_max_borrow_amount of this UnifiedCurrency. # noqa: E501 :type: str @@ -197,7 +197,7 @@ def total_max_borrow_amount(self, total_max_borrow_amount): def loan_status(self): """Gets the loan_status of this UnifiedCurrency. # noqa: E501 - Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending # noqa: E501 + Lending status - `disable` : Lending prohibited - `enable` : Lending supported # noqa: E501 :return: The loan_status of this UnifiedCurrency. # noqa: E501 :rtype: str @@ -208,7 +208,7 @@ def loan_status(self): def loan_status(self, loan_status): """Sets the loan_status of this UnifiedCurrency. - Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending # noqa: E501 + Lending status - `disable` : Lending prohibited - `enable` : Lending supported # noqa: E501 :param loan_status: The loan_status of this UnifiedCurrency. # noqa: E501 :type: str diff --git a/gate_api/models/unified_discount.py b/gate_api/models/unified_discount.py index 77cb853..27cad2c 100644 --- a/gate_api/models/unified_discount.py +++ b/gate_api/models/unified_discount.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, discount_tiers=None, local_vars_configuration= def currency(self): """Gets the currency of this UnifiedDiscount. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UnifiedDiscount. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedDiscount. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UnifiedDiscount. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def discount_tiers(self): """Gets the discount_tiers of this UnifiedDiscount. # noqa: E501 - Tiered discount. # noqa: E501 + Tiered discount # noqa: E501 :return: The discount_tiers of this UnifiedDiscount. # noqa: E501 :rtype: list[UnifiedDiscountTiers] @@ -96,7 +96,7 @@ def discount_tiers(self): def discount_tiers(self, discount_tiers): """Sets the discount_tiers of this UnifiedDiscount. - Tiered discount. # noqa: E501 + Tiered discount # noqa: E501 :param discount_tiers: The discount_tiers of this UnifiedDiscount. # noqa: E501 :type: list[UnifiedDiscountTiers] diff --git a/gate_api/models/unified_discount_tiers.py b/gate_api/models/unified_discount_tiers.py index 7834158..1487ce8 100644 --- a/gate_api/models/unified_discount_tiers.py +++ b/gate_api/models/unified_discount_tiers.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -77,7 +77,7 @@ def __init__(self, tier=None, discount=None, lower_limit=None, upper_limit=None, def tier(self): """Gets the tier of this UnifiedDiscountTiers. # noqa: E501 - Tier. # noqa: E501 + Tier # noqa: E501 :return: The tier of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -88,7 +88,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this UnifiedDiscountTiers. - Tier. # noqa: E501 + Tier # noqa: E501 :param tier: The tier of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -100,7 +100,7 @@ def tier(self, tier): def discount(self): """Gets the discount of this UnifiedDiscountTiers. # noqa: E501 - Discount. # noqa: E501 + Discount # noqa: E501 :return: The discount of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def discount(self): def discount(self, discount): """Sets the discount of this UnifiedDiscountTiers. - Discount. # noqa: E501 + Discount # noqa: E501 :param discount: The discount of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -123,7 +123,7 @@ def discount(self, discount): def lower_limit(self): """Gets the lower_limit of this UnifiedDiscountTiers. # noqa: E501 - Lower limit. # noqa: E501 + Lower limit # noqa: E501 :return: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -134,7 +134,7 @@ def lower_limit(self): def lower_limit(self, lower_limit): """Sets the lower_limit of this UnifiedDiscountTiers. - Lower limit. # noqa: E501 + Lower limit # noqa: E501 :param lower_limit: The lower_limit of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -146,7 +146,7 @@ def lower_limit(self, lower_limit): def upper_limit(self): """Gets the upper_limit of this UnifiedDiscountTiers. # noqa: E501 - Upper limit,+ indicates positive infinity. # noqa: E501 + Upper limit, + indicates positive infinity # noqa: E501 :return: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 :rtype: str @@ -157,7 +157,7 @@ def upper_limit(self): def upper_limit(self, upper_limit): """Sets the upper_limit of this UnifiedDiscountTiers. - Upper limit,+ indicates positive infinity. # noqa: E501 + Upper limit, + indicates positive infinity # noqa: E501 :param upper_limit: The upper_limit of this UnifiedDiscountTiers. # noqa: E501 :type: str @@ -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 + Position leverage # 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 + Position leverage # noqa: E501 :param leverage: The leverage of this UnifiedDiscountTiers. # noqa: E501 :type: str diff --git a/gate_api/models/unified_history_loan_rate.py b/gate_api/models/unified_history_loan_rate.py index 2dddf84..dd3edd2 100644 --- a/gate_api/models/unified_history_loan_rate.py +++ b/gate_api/models/unified_history_loan_rate.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, currency=None, tier=None, tier_up_rate=None, rates=None, loca def currency(self): """Gets the currency of this UnifiedHistoryLoanRate. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UnifiedHistoryLoanRate. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedHistoryLoanRate. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UnifiedHistoryLoanRate. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def currency(self, currency): def tier(self): """Gets the tier of this UnifiedHistoryLoanRate. # noqa: E501 - The VIP level of the floating rate required. # noqa: E501 + VIP level for the floating rate to be retrieved # noqa: E501 :return: The tier of this UnifiedHistoryLoanRate. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def tier(self): def tier(self, tier): """Sets the tier of this UnifiedHistoryLoanRate. - The VIP level of the floating rate required. # noqa: E501 + VIP level for the floating rate to be retrieved # noqa: E501 :param tier: The tier of this UnifiedHistoryLoanRate. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def tier(self, tier): def tier_up_rate(self): """Gets the tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 - VIP level corresponding floating rate. # noqa: E501 + Floating rate corresponding to VIP level # noqa: E501 :return: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 :rtype: str @@ -129,7 +129,7 @@ def tier_up_rate(self): def tier_up_rate(self, tier_up_rate): """Sets the tier_up_rate of this UnifiedHistoryLoanRate. - VIP level corresponding floating rate. # noqa: E501 + Floating rate corresponding to VIP level # noqa: E501 :param tier_up_rate: The tier_up_rate of this UnifiedHistoryLoanRate. # noqa: E501 :type: str @@ -141,7 +141,7 @@ def tier_up_rate(self, tier_up_rate): def rates(self): """Gets the rates of this UnifiedHistoryLoanRate. # noqa: E501 - Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in time # noqa: E501 + Historical interest rate information, one data point per hour, array size determined by page and limit parameters from the API request, sorted by time from recent to distant # noqa: E501 :return: The rates of this UnifiedHistoryLoanRate. # noqa: E501 :rtype: list[UnifiedHistoryLoanRateRates] @@ -152,7 +152,7 @@ def rates(self): def rates(self, rates): """Sets the rates of this UnifiedHistoryLoanRate. - Historical interest rate information, one data per hour, the array size is determined by the page and limit parameters provided by the interface request parameters, sorted from recent to far in time # noqa: E501 + Historical interest rate information, one data point per hour, array size determined by page and limit parameters from the API request, sorted by time from recent to distant # noqa: E501 :param rates: The rates of this UnifiedHistoryLoanRate. # noqa: E501 :type: list[UnifiedHistoryLoanRateRates] diff --git a/gate_api/models/unified_history_loan_rate_rates.py b/gate_api/models/unified_history_loan_rate_rates.py index e468266..100221f 100644 --- a/gate_api/models/unified_history_loan_rate_rates.py +++ b/gate_api/models/unified_history_loan_rate_rates.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, time=None, rate=None, local_vars_configuration=None): # noqa def time(self): """Gets the time of this UnifiedHistoryLoanRateRates. # noqa: E501 - The hourly timestamp corresponding to the interest rate, in milliseconds. # noqa: E501 + Hourly timestamp corresponding to this interest rate, in milliseconds # noqa: E501 :return: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 :rtype: int @@ -73,7 +73,7 @@ def time(self): def time(self, time): """Sets the time of this UnifiedHistoryLoanRateRates. - The hourly timestamp corresponding to the interest rate, in milliseconds. # noqa: E501 + Hourly timestamp corresponding to this interest rate, in milliseconds # noqa: E501 :param time: The time of this UnifiedHistoryLoanRateRates. # noqa: E501 :type: int @@ -85,7 +85,7 @@ def time(self, time): def rate(self): """Gets the rate of this UnifiedHistoryLoanRateRates. # noqa: E501 - Historical interest rates for this hour. # noqa: E501 + Historical interest rate for this hour # noqa: E501 :return: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def rate(self): def rate(self, rate): """Sets the rate of this UnifiedHistoryLoanRateRates. - Historical interest rates for this hour. # noqa: E501 + Historical interest rate for this hour # noqa: E501 :param rate: The rate of this UnifiedHistoryLoanRateRates. # noqa: E501 :type: str diff --git a/gate_api/models/unified_leverage_config.py b/gate_api/models/unified_leverage_config.py index 0def7ee..1e4bf22 100644 --- a/gate_api/models/unified_leverage_config.py +++ b/gate_api/models/unified_leverage_config.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, current_leverage=None, min_leverage=None, max_leverage=None, def current_leverage(self): """Gets the current_leverage of this UnifiedLeverageConfig. # noqa: E501 - Current leverage ratio. # noqa: E501 + Current leverage ratio # noqa: E501 :return: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def current_leverage(self): def current_leverage(self, current_leverage): """Sets the current_leverage of this UnifiedLeverageConfig. - Current leverage ratio. # noqa: E501 + Current leverage ratio # noqa: E501 :param current_leverage: The current_leverage of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def current_leverage(self, current_leverage): def min_leverage(self): """Gets the min_leverage of this UnifiedLeverageConfig. # noqa: E501 - Minimum adjustable leverage ratio. # noqa: E501 + Minimum adjustable leverage ratio # noqa: E501 :return: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def min_leverage(self): def min_leverage(self, min_leverage): """Sets the min_leverage of this UnifiedLeverageConfig. - Minimum adjustable leverage ratio. # noqa: E501 + Minimum adjustable leverage ratio # noqa: E501 :param min_leverage: The min_leverage of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def min_leverage(self, min_leverage): def max_leverage(self): """Gets the max_leverage of this UnifiedLeverageConfig. # noqa: E501 - Maximum adjustable leverage ratio. # noqa: E501 + Maximum adjustable leverage ratio # noqa: E501 :return: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def max_leverage(self): def max_leverage(self, max_leverage): """Sets the max_leverage of this UnifiedLeverageConfig. - Maximum adjustable leverage ratio. # noqa: E501 + Maximum adjustable leverage ratio # noqa: E501 :param max_leverage: The max_leverage of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def max_leverage(self, max_leverage): def debit(self): """Gets the debit of this UnifiedLeverageConfig. # noqa: E501 - Current liabilities. # noqa: E501 + Current liabilities # noqa: E501 :return: The debit of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def debit(self): def debit(self, debit): """Sets the debit of this UnifiedLeverageConfig. - Current liabilities. # noqa: E501 + Current liabilities # noqa: E501 :param debit: The debit of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def debit(self, debit): def available_margin(self): """Gets the available_margin of this UnifiedLeverageConfig. # noqa: E501 - Available Margin. # noqa: E501 + Available Margin # noqa: E501 :return: The available_margin of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def available_margin(self): def available_margin(self, available_margin): """Sets the available_margin of this UnifiedLeverageConfig. - Available Margin. # noqa: E501 + Available Margin # noqa: E501 :param available_margin: The available_margin of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def available_margin(self, available_margin): def borrowable(self): """Gets the borrowable of this UnifiedLeverageConfig. # noqa: E501 - The current leverage you can choose is. # noqa: E501 + Maximum borrowable amount at current leverage # noqa: E501 :return: The borrowable of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def borrowable(self): def borrowable(self, borrowable): """Sets the borrowable of this UnifiedLeverageConfig. - The current leverage you can choose is. # noqa: E501 + Maximum borrowable amount at current leverage # noqa: E501 :param borrowable: The borrowable of this UnifiedLeverageConfig. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def borrowable(self, borrowable): def except_leverage_borrowable(self): """Gets the except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 - The maximum amount of margin that can be borrowed and the be borrowed, whichever is smaller # noqa: E501 + Maximum borrowable from margin and maximum borrowable from Earn, whichever is smaller # noqa: E501 :return: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def except_leverage_borrowable(self): def except_leverage_borrowable(self, except_leverage_borrowable): """Sets the except_leverage_borrowable of this UnifiedLeverageConfig. - The maximum amount of margin that can be borrowed and the be borrowed, whichever is smaller # noqa: E501 + Maximum borrowable from margin and maximum borrowable from Earn, whichever is smaller # noqa: E501 :param except_leverage_borrowable: The except_leverage_borrowable of this UnifiedLeverageConfig. # noqa: E501 :type: str diff --git a/gate_api/models/unified_leverage_setting.py b/gate_api/models/unified_leverage_setting.py index a2acf90..4ac92bb 100644 --- a/gate_api/models/unified_leverage_setting.py +++ b/gate_api/models/unified_leverage_setting.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -60,7 +60,7 @@ def __init__(self, currency=None, leverage=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedLeverageSetting. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UnifiedLeverageSetting. # noqa: E501 :rtype: str @@ -71,7 +71,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedLeverageSetting. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UnifiedLeverageSetting. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def leverage(self): """Gets the leverage of this UnifiedLeverageSetting. # noqa: E501 - multiple. # noqa: E501 + Multiplier # noqa: E501 :return: The leverage of this UnifiedLeverageSetting. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def leverage(self): def leverage(self, leverage): """Sets the leverage of this UnifiedLeverageSetting. - multiple. # noqa: E501 + Multiplier # noqa: E501 :param leverage: The leverage of this UnifiedLeverageSetting. # noqa: E501 :type: str diff --git a/gate_api/models/unified_loan.py b/gate_api/models/unified_loan.py index a404fd0..d8d000c 100644 --- a/gate_api/models/unified_loan.py +++ b/gate_api/models/unified_loan.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -74,7 +74,7 @@ def __init__(self, currency=None, type=None, amount=None, repaid_all=None, text= def currency(self): """Gets the currency of this UnifiedLoan. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UnifiedLoan. # noqa: E501 :rtype: str @@ -85,7 +85,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedLoan. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UnifiedLoan. # noqa: E501 :type: str @@ -99,7 +99,7 @@ def currency(self, currency): def type(self): """Gets the type of this UnifiedLoan. # noqa: E501 - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :return: The type of this UnifiedLoan. # noqa: E501 :rtype: str @@ -110,7 +110,7 @@ def type(self): def type(self, type): """Sets the type of this UnifiedLoan. - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :param type: The type of this UnifiedLoan. # noqa: E501 :type: str @@ -130,7 +130,7 @@ def type(self, type): def amount(self): """Gets the amount of this UnifiedLoan. # noqa: E501 - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :return: The amount of this UnifiedLoan. # noqa: E501 :rtype: str @@ -141,7 +141,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedLoan. - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :param amount: The amount of this UnifiedLoan. # noqa: E501 :type: str @@ -155,7 +155,7 @@ def amount(self, amount): def repaid_all(self): """Gets the repaid_all of this UnifiedLoan. # noqa: E501 - Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. # noqa: E501 + Full repayment, only used for repayment operations. When set to `true`, overrides `amount` and directly repays the full amount # noqa: E501 :return: The repaid_all of this UnifiedLoan. # noqa: E501 :rtype: bool @@ -166,7 +166,7 @@ def repaid_all(self): def repaid_all(self, repaid_all): """Sets the repaid_all of this UnifiedLoan. - Full repayment is solely for repayment operations. When set to 'true,' it overrides the 'amount,' allowing for direct full repayment. # noqa: E501 + Full repayment, only used for repayment operations. When set to `true`, overrides `amount` and directly repays the full amount # noqa: E501 :param repaid_all: The repaid_all of this UnifiedLoan. # noqa: E501 :type: bool @@ -178,7 +178,7 @@ def repaid_all(self, repaid_all): def text(self): """Gets the text of this UnifiedLoan. # noqa: E501 - User defined custom ID. # noqa: E501 + User defined custom ID # noqa: E501 :return: The text of this UnifiedLoan. # noqa: E501 :rtype: str @@ -189,7 +189,7 @@ def text(self): def text(self, text): """Sets the text of this UnifiedLoan. - User defined custom ID. # noqa: E501 + User defined custom ID # noqa: E501 :param text: The text of this UnifiedLoan. # noqa: E501 :type: str diff --git a/gate_api/models/unified_loan_record.py b/gate_api/models/unified_loan_record.py index fb868f1..4cce938 100644 --- a/gate_api/models/unified_loan_record.py +++ b/gate_api/models/unified_loan_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -92,7 +92,7 @@ def __init__(self, id=None, type=None, repayment_type=None, borrow_type=None, cu def id(self): """Gets the id of this UnifiedLoanRecord. # noqa: E501 - ID. # noqa: E501 + ID # noqa: E501 :return: The id of this UnifiedLoanRecord. # noqa: E501 :rtype: int @@ -103,7 +103,7 @@ def id(self): def id(self, id): """Sets the id of this UnifiedLoanRecord. - ID. # noqa: E501 + ID # noqa: E501 :param id: The id of this UnifiedLoanRecord. # noqa: E501 :type: int @@ -115,7 +115,7 @@ def id(self, id): def type(self): """Gets the type of this UnifiedLoanRecord. # noqa: E501 - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :return: The type of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -126,7 +126,7 @@ def type(self): def type(self, type): """Sets the type of this UnifiedLoanRecord. - type: borrow - borrow, repay - repay. # noqa: E501 + Type: `borrow` - borrow, `repay` - repay # noqa: E501 :param type: The type of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -138,7 +138,7 @@ def type(self, type): def repayment_type(self): """Gets the repayment_type of this UnifiedLoanRecord. # noqa: E501 - Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 + Repayment type: none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after order cancellation, different_currencies_repayment - Cross-currency repayment # noqa: E501 :return: The repayment_type of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -149,7 +149,7 @@ def repayment_type(self): def repayment_type(self, repayment_type): """Sets the repayment_type of this UnifiedLoanRecord. - Repayment type, none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment after withdrawal, different_currencies_repayment - Different currency repayment # noqa: E501 + Repayment type: none - No repayment type, manual_repay - Manual repayment, auto_repay - Automatic repayment, cancel_auto_repay - Automatic repayment after order cancellation, different_currencies_repayment - Cross-currency repayment # noqa: E501 :param repayment_type: The repayment_type of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -161,7 +161,7 @@ def repayment_type(self, repayment_type): def borrow_type(self): """Gets the borrow_type of this UnifiedLoanRecord. # noqa: E501 - Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment # noqa: E501 + Borrowing type, returned when querying loan records: manual_borrow - Manual borrowing, auto_borrow - Automatic borrowing # noqa: E501 :return: The borrow_type of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def borrow_type(self): def borrow_type(self, borrow_type): """Sets the borrow_type of this UnifiedLoanRecord. - Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment # noqa: E501 + Borrowing type, returned when querying loan records: manual_borrow - Manual borrowing, auto_borrow - Automatic borrowing # noqa: E501 :param borrow_type: The borrow_type of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -184,7 +184,7 @@ def borrow_type(self, borrow_type): def currency_pair(self): """Gets the currency_pair of this UnifiedLoanRecord. # noqa: E501 - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :return: The currency_pair of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -195,7 +195,7 @@ def currency_pair(self): def currency_pair(self, currency_pair): """Sets the currency_pair of this UnifiedLoanRecord. - Currency pair. # noqa: E501 + Currency pair # noqa: E501 :param currency_pair: The currency_pair of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -207,7 +207,7 @@ def currency_pair(self, currency_pair): def currency(self): """Gets the currency of this UnifiedLoanRecord. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -218,7 +218,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedLoanRecord. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -230,7 +230,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedLoanRecord. # noqa: E501 - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :return: The amount of this UnifiedLoanRecord. # noqa: E501 :rtype: str @@ -241,7 +241,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedLoanRecord. - The amount of lending or repaying. # noqa: E501 + Borrow or repayment amount # noqa: E501 :param amount: The amount of this UnifiedLoanRecord. # noqa: E501 :type: str @@ -253,7 +253,7 @@ def amount(self, amount): def create_time(self): """Gets the create_time of this UnifiedLoanRecord. # noqa: E501 - Created time. # noqa: E501 + Created time # noqa: E501 :return: The create_time of this UnifiedLoanRecord. # noqa: E501 :rtype: int @@ -264,7 +264,7 @@ def create_time(self): def create_time(self, create_time): """Sets the create_time of this UnifiedLoanRecord. - Created time. # noqa: E501 + Created time # noqa: E501 :param create_time: The create_time of this UnifiedLoanRecord. # noqa: E501 :type: int diff --git a/gate_api/models/unified_loan_result.py b/gate_api/models/unified_loan_result.py index cac2485..58dced5 100644 --- a/gate_api/models/unified_loan_result.py +++ b/gate_api/models/unified_loan_result.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, tran_id=None, local_vars_configuration=None): # noqa: E501 def tran_id(self): """Gets the tran_id of this UnifiedLoanResult. # noqa: E501 - Transaction id. # noqa: E501 + Transaction ID # noqa: E501 :return: The tran_id of this UnifiedLoanResult. # noqa: E501 :rtype: int @@ -68,7 +68,7 @@ def tran_id(self): def tran_id(self, tran_id): """Sets the tran_id of this UnifiedLoanResult. - Transaction id. # noqa: E501 + Transaction ID # noqa: E501 :param tran_id: The tran_id of this UnifiedLoanResult. # noqa: E501 :type: int diff --git a/gate_api/models/unified_margin_tiers.py b/gate_api/models/unified_margin_tiers.py index d516c89..8e61cbe 100644 --- a/gate_api/models/unified_margin_tiers.py +++ b/gate_api/models/unified_margin_tiers.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, margin_tiers=None, local_vars_configuration=No def currency(self): """Gets the currency of this UnifiedMarginTiers. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this UnifiedMarginTiers. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedMarginTiers. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this UnifiedMarginTiers. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def margin_tiers(self): """Gets the margin_tiers of this UnifiedMarginTiers. # noqa: E501 - Margin tiers. # noqa: E501 + Tiered margin # noqa: E501 :return: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 :rtype: list[MarginTiers] @@ -96,7 +96,7 @@ def margin_tiers(self): def margin_tiers(self, margin_tiers): """Sets the margin_tiers of this UnifiedMarginTiers. - Margin tiers. # noqa: E501 + Tiered margin # noqa: E501 :param margin_tiers: The margin_tiers of this UnifiedMarginTiers. # noqa: E501 :type: list[MarginTiers] diff --git a/gate_api/models/unified_mode_set.py b/gate_api/models/unified_mode_set.py index e30c760..8fe6a71 100644 --- a/gate_api/models/unified_mode_set.py +++ b/gate_api/models/unified_mode_set.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -61,7 +61,7 @@ def __init__(self, mode=None, settings=None, local_vars_configuration=None): # def mode(self): """Gets the mode of this UnifiedModeSet. # noqa: E501 - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model # noqa: E501 + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 :return: The mode of this UnifiedModeSet. # noqa: E501 :rtype: str @@ -72,7 +72,7 @@ def mode(self): def mode(self, mode): """Sets the mode of this UnifiedModeSet. - Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model # noqa: E501 + Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode # noqa: E501 :param mode: The mode of this UnifiedModeSet. # noqa: E501 :type: str diff --git a/gate_api/models/unified_portfolio_input.py b/gate_api/models/unified_portfolio_input.py index 4c22e43..57ca957 100644 --- a/gate_api/models/unified_portfolio_input.py +++ b/gate_api/models/unified_portfolio_input.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, spot_balances=None, spot_orders=None, futures_positions=None, def spot_balances(self): """Gets the spot_balances of this UnifiedPortfolioInput. # noqa: E501 - Spot. # noqa: E501 + Spot # noqa: E501 :return: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockSpotBalance] @@ -98,7 +98,7 @@ def spot_balances(self): def spot_balances(self, spot_balances): """Sets the spot_balances of this UnifiedPortfolioInput. - Spot. # noqa: E501 + Spot # noqa: E501 :param spot_balances: The spot_balances of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockSpotBalance] @@ -110,7 +110,7 @@ def spot_balances(self, spot_balances): def spot_orders(self): """Gets the spot_orders of this UnifiedPortfolioInput. # noqa: E501 - Spot orders. # noqa: E501 + Spot orders # noqa: E501 :return: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockSpotOrder] @@ -121,7 +121,7 @@ def spot_orders(self): def spot_orders(self, spot_orders): """Sets the spot_orders of this UnifiedPortfolioInput. - Spot orders. # noqa: E501 + Spot orders # noqa: E501 :param spot_orders: The spot_orders of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockSpotOrder] @@ -133,7 +133,7 @@ def spot_orders(self, spot_orders): def futures_positions(self): """Gets the futures_positions of this UnifiedPortfolioInput. # noqa: E501 - Futures positions. # noqa: E501 + Futures positions # noqa: E501 :return: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockFuturesPosition] @@ -144,7 +144,7 @@ def futures_positions(self): def futures_positions(self, futures_positions): """Sets the futures_positions of this UnifiedPortfolioInput. - Futures positions. # noqa: E501 + Futures positions # noqa: E501 :param futures_positions: The futures_positions of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockFuturesPosition] @@ -156,7 +156,7 @@ def futures_positions(self, futures_positions): def futures_orders(self): """Gets the futures_orders of this UnifiedPortfolioInput. # noqa: E501 - Futures order. # noqa: E501 + Futures order # noqa: E501 :return: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockFuturesOrder] @@ -167,7 +167,7 @@ def futures_orders(self): def futures_orders(self, futures_orders): """Sets the futures_orders of this UnifiedPortfolioInput. - Futures order. # noqa: E501 + Futures order # noqa: E501 :param futures_orders: The futures_orders of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockFuturesOrder] @@ -179,7 +179,7 @@ def futures_orders(self, futures_orders): def options_positions(self): """Gets the options_positions of this UnifiedPortfolioInput. # noqa: E501 - Options positions. # noqa: E501 + Options positions # noqa: E501 :return: The options_positions of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockOptionsPosition] @@ -190,7 +190,7 @@ def options_positions(self): def options_positions(self, options_positions): """Sets the options_positions of this UnifiedPortfolioInput. - Options positions. # noqa: E501 + Options positions # noqa: E501 :param options_positions: The options_positions of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockOptionsPosition] @@ -202,7 +202,7 @@ def options_positions(self, options_positions): def options_orders(self): """Gets the options_orders of this UnifiedPortfolioInput. # noqa: E501 - Option orders. # noqa: E501 + Option orders # noqa: E501 :return: The options_orders of this UnifiedPortfolioInput. # noqa: E501 :rtype: list[MockOptionsOrder] @@ -213,7 +213,7 @@ def options_orders(self): def options_orders(self, options_orders): """Sets the options_orders of this UnifiedPortfolioInput. - Option orders. # noqa: E501 + Option orders # noqa: E501 :param options_orders: The options_orders of this UnifiedPortfolioInput. # noqa: E501 :type: list[MockOptionsOrder] @@ -225,7 +225,7 @@ def options_orders(self, options_orders): def spot_hedge(self): """Gets the spot_hedge of this UnifiedPortfolioInput. # noqa: E501 - Whether to enable spot hedging. # noqa: E501 + Whether to enable spot hedging # noqa: E501 :return: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501 :rtype: bool @@ -236,7 +236,7 @@ def spot_hedge(self): def spot_hedge(self, spot_hedge): """Sets the spot_hedge of this UnifiedPortfolioInput. - Whether to enable spot hedging. # noqa: E501 + Whether to enable spot hedging # noqa: E501 :param spot_hedge: The spot_hedge of this UnifiedPortfolioInput. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_portfolio_output.py b/gate_api/models/unified_portfolio_output.py index 2bb0605..ed08278 100644 --- a/gate_api/models/unified_portfolio_output.py +++ b/gate_api/models/unified_portfolio_output.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, maintain_margin_total=None, initial_margin_total=None, calcul def maintain_margin_total(self): """Gets the maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. # noqa: E501 + Total maintenance margin, including only portfolio margin calculation results for positions in risk units, excluding borrowing margin. If borrowing exists, conventional borrowing margin requirements will still apply # noqa: E501 :return: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 :rtype: str @@ -83,7 +83,7 @@ def maintain_margin_total(self): def maintain_margin_total(self, maintain_margin_total): """Sets the maintain_margin_total of this UnifiedPortfolioOutput. - Total maintenance margin, including only the portfolio margin calculation results for positions in the risk unit, excluding borrowed margin. If borrowing exists, conventional borrowing margin requirements will still apply. # noqa: E501 + Total maintenance margin, including only portfolio margin calculation results for positions in risk units, excluding borrowing margin. If borrowing exists, conventional borrowing margin requirements will still apply # noqa: E501 :param maintain_margin_total: The maintain_margin_total of this UnifiedPortfolioOutput. # noqa: E501 :type: str @@ -95,7 +95,7 @@ def maintain_margin_total(self, maintain_margin_total): def initial_margin_total(self): """Gets the initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 - Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, orders. # noqa: E501 + Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders # noqa: E501 :return: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def initial_margin_total(self): def initial_margin_total(self, initial_margin_total): """Sets the initial_margin_total of this UnifiedPortfolioOutput. - Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, orders. # noqa: E501 + Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders # noqa: E501 :param initial_margin_total: The initial_margin_total of this UnifiedPortfolioOutput. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def initial_margin_total(self, initial_margin_total): def calculate_time(self): """Gets the calculate_time of this UnifiedPortfolioOutput. # noqa: E501 - Calculate time. # noqa: E501 + Calculation time # noqa: E501 :return: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 :rtype: int @@ -129,7 +129,7 @@ def calculate_time(self): def calculate_time(self, calculate_time): """Sets the calculate_time of this UnifiedPortfolioOutput. - Calculate time. # noqa: E501 + Calculation time # noqa: E501 :param calculate_time: The calculate_time of this UnifiedPortfolioOutput. # noqa: E501 :type: int @@ -141,7 +141,7 @@ def calculate_time(self, calculate_time): def risk_unit(self): """Gets the risk_unit of this UnifiedPortfolioOutput. # noqa: E501 - Risk unit. # noqa: E501 + Risk unit # noqa: E501 :return: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 :rtype: list[MockRiskUnit] @@ -152,7 +152,7 @@ def risk_unit(self): def risk_unit(self, risk_unit): """Sets the risk_unit of this UnifiedPortfolioOutput. - Risk unit. # noqa: E501 + Risk unit # noqa: E501 :param risk_unit: The risk_unit of this UnifiedPortfolioOutput. # noqa: E501 :type: list[MockRiskUnit] diff --git a/gate_api/models/unified_risk_units.py b/gate_api/models/unified_risk_units.py index 32eebfa..7197a7e 100644 --- a/gate_api/models/unified_risk_units.py +++ b/gate_api/models/unified_risk_units.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -67,7 +67,7 @@ def __init__(self, user_id=None, spot_hedge=None, risk_units=None, local_vars_co def user_id(self): """Gets the user_id of this UnifiedRiskUnits. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The user_id of this UnifiedRiskUnits. # noqa: E501 :rtype: int @@ -78,7 +78,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this UnifiedRiskUnits. - User ID. # noqa: E501 + User ID # noqa: E501 :param user_id: The user_id of this UnifiedRiskUnits. # noqa: E501 :type: int @@ -90,7 +90,7 @@ def user_id(self, user_id): def spot_hedge(self): """Gets the spot_hedge of this UnifiedRiskUnits. # noqa: E501 - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + Spot hedging status: true - enabled, false - disabled # noqa: E501 :return: The spot_hedge of this UnifiedRiskUnits. # noqa: E501 :rtype: bool @@ -101,7 +101,7 @@ def spot_hedge(self): def spot_hedge(self, spot_hedge): """Sets the spot_hedge of this UnifiedRiskUnits. - Spot hedging status, true - enabled, false - not enabled. # noqa: E501 + Spot hedging status: true - enabled, false - disabled # noqa: E501 :param spot_hedge: The spot_hedge of this UnifiedRiskUnits. # noqa: E501 :type: bool @@ -113,7 +113,7 @@ def spot_hedge(self, spot_hedge): def risk_units(self): """Gets the risk_units of this UnifiedRiskUnits. # noqa: E501 - Risk unit. # noqa: E501 + Risk unit # noqa: E501 :return: The risk_units of this UnifiedRiskUnits. # noqa: E501 :rtype: list[RiskUnits] @@ -124,7 +124,7 @@ def risk_units(self): def risk_units(self, risk_units): """Sets the risk_units of this UnifiedRiskUnits. - Risk unit. # noqa: E501 + Risk unit # noqa: E501 :param risk_units: The risk_units of this UnifiedRiskUnits. # noqa: E501 :type: list[RiskUnits] diff --git a/gate_api/models/unified_settings.py b/gate_api/models/unified_settings.py index abddea0..7ab84b4 100644 --- a/gate_api/models/unified_settings.py +++ b/gate_api/models/unified_settings.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, usdt_futures=None, spot_hedge=None, use_funding=None, options def usdt_futures(self): """Gets the usdt_futures of this UnifiedSettings. # noqa: E501 - USDT contract switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + USDT futures switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501 :return: The usdt_futures of this UnifiedSettings. # noqa: E501 :rtype: bool @@ -83,7 +83,7 @@ def usdt_futures(self): def usdt_futures(self, usdt_futures): """Sets the usdt_futures of this UnifiedSettings. - USDT contract switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + USDT futures switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501 :param usdt_futures: The usdt_futures of this UnifiedSettings. # noqa: E501 :type: bool @@ -95,7 +95,7 @@ def usdt_futures(self, usdt_futures): def spot_hedge(self): """Gets the spot_hedge of this UnifiedSettings. # noqa: E501 - Spot hedging switch. # noqa: E501 + Spot hedging switch # noqa: E501 :return: The spot_hedge of this UnifiedSettings. # noqa: E501 :rtype: bool @@ -106,7 +106,7 @@ def spot_hedge(self): def spot_hedge(self, spot_hedge): """Sets the spot_hedge of this UnifiedSettings. - Spot hedging switch. # noqa: E501 + Spot hedging switch # noqa: E501 :param spot_hedge: The spot_hedge of this UnifiedSettings. # noqa: E501 :type: bool @@ -118,7 +118,7 @@ def spot_hedge(self, spot_hedge): def use_funding(self): """Gets the use_funding of this UnifiedSettings. # noqa: E501 - switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin # noqa: E501 + Earn switch, when mode is cross-currency margin mode, whether to use Earn funds as margin # noqa: E501 :return: The use_funding of this UnifiedSettings. # noqa: E501 :rtype: bool @@ -129,7 +129,7 @@ def use_funding(self): def use_funding(self, use_funding): """Sets the use_funding of this UnifiedSettings. - switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin # noqa: E501 + Earn switch, when mode is cross-currency margin mode, whether to use Earn funds as margin # noqa: E501 :param use_funding: The use_funding of this UnifiedSettings. # noqa: E501 :type: bool @@ -141,7 +141,7 @@ def use_funding(self, use_funding): def options(self): """Gets the options of this UnifiedSettings. # noqa: E501 - Option switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + Options switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501 :return: The options of this UnifiedSettings. # noqa: E501 :rtype: bool @@ -152,7 +152,7 @@ def options(self): def options(self, options): """Sets the options of this UnifiedSettings. - Option switch. In cross-currency margin mode, it can only be turned on and not off # noqa: E501 + Options switch. In cross-currency margin mode, can only be enabled and cannot be disabled # noqa: E501 :param options: The options of this UnifiedSettings. # noqa: E501 :type: bool diff --git a/gate_api/models/unified_transferable.py b/gate_api/models/unified_transferable.py index a9ec826..e4b5311 100644 --- a/gate_api/models/unified_transferable.py +++ b/gate_api/models/unified_transferable.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, currency=None, amount=None, local_vars_configuration=None): def currency(self): """Gets the currency of this UnifiedTransferable. # noqa: E501 - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :return: The currency of this UnifiedTransferable. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this UnifiedTransferable. - Currency detail. # noqa: E501 + Currency detail # noqa: E501 :param currency: The currency of this UnifiedTransferable. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def currency(self, currency): def amount(self): """Gets the amount of this UnifiedTransferable. # noqa: E501 - The maximum amount that can be transferred out. # noqa: E501 + Maximum transferable amount # noqa: E501 :return: The amount of this UnifiedTransferable. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this UnifiedTransferable. - The maximum amount that can be transferred out. # noqa: E501 + Maximum transferable amount # noqa: E501 :param amount: The amount of this UnifiedTransferable. # noqa: E501 :type: str diff --git a/gate_api/models/user_ltv_info.py b/gate_api/models/user_ltv_info.py index e8341c0..e56f15a 100644 --- a/gate_api/models/user_ltv_info.py +++ b/gate_api/models/user_ltv_info.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -87,7 +87,7 @@ def __init__(self, collateral_currency=None, borrow_currency=None, init_ltv=None def collateral_currency(self): """Gets the collateral_currency of this UserLtvInfo. # noqa: E501 - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :return: The collateral_currency of this UserLtvInfo. # noqa: E501 :rtype: str @@ -98,7 +98,7 @@ def collateral_currency(self): def collateral_currency(self, collateral_currency): """Sets the collateral_currency of this UserLtvInfo. - Collateral. # noqa: E501 + Collateral currency # noqa: E501 :param collateral_currency: The collateral_currency of this UserLtvInfo. # noqa: E501 :type: str @@ -110,7 +110,7 @@ def collateral_currency(self, collateral_currency): def borrow_currency(self): """Gets the borrow_currency of this UserLtvInfo. # noqa: E501 - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :return: The borrow_currency of this UserLtvInfo. # noqa: E501 :rtype: str @@ -121,7 +121,7 @@ def borrow_currency(self): def borrow_currency(self, borrow_currency): """Sets the borrow_currency of this UserLtvInfo. - Borrowed currency. # noqa: E501 + Borrowed currency # noqa: E501 :param borrow_currency: The borrow_currency of this UserLtvInfo. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def borrow_currency(self, borrow_currency): def init_ltv(self): """Gets the init_ltv of this UserLtvInfo. # noqa: E501 - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :return: The init_ltv of this UserLtvInfo. # noqa: E501 :rtype: str @@ -144,7 +144,7 @@ def init_ltv(self): def init_ltv(self, init_ltv): """Sets the init_ltv of this UserLtvInfo. - The initial collateralization rate. # noqa: E501 + Initial collateralization rate # noqa: E501 :param init_ltv: The init_ltv of this UserLtvInfo. # noqa: E501 :type: str @@ -156,7 +156,7 @@ def init_ltv(self, init_ltv): def alert_ltv(self): """Gets the alert_ltv of this UserLtvInfo. # noqa: E501 - Warning collateralization ratio. # noqa: E501 + Warning collateralization rate # noqa: E501 :return: The alert_ltv of this UserLtvInfo. # noqa: E501 :rtype: str @@ -167,7 +167,7 @@ def alert_ltv(self): def alert_ltv(self, alert_ltv): """Sets the alert_ltv of this UserLtvInfo. - Warning collateralization ratio. # noqa: E501 + Warning collateralization rate # noqa: E501 :param alert_ltv: The alert_ltv of this UserLtvInfo. # noqa: E501 :type: str @@ -179,7 +179,7 @@ def alert_ltv(self, alert_ltv): def liquidate_ltv(self): """Gets the liquidate_ltv of this UserLtvInfo. # noqa: E501 - The liquidation collateralization rate. # noqa: E501 + Liquidation collateralization rate # noqa: E501 :return: The liquidate_ltv of this UserLtvInfo. # noqa: E501 :rtype: str @@ -190,7 +190,7 @@ def liquidate_ltv(self): def liquidate_ltv(self, liquidate_ltv): """Sets the liquidate_ltv of this UserLtvInfo. - The liquidation collateralization rate. # noqa: E501 + Liquidation collateralization rate # noqa: E501 :param liquidate_ltv: The liquidate_ltv of this UserLtvInfo. # noqa: E501 :type: str @@ -202,7 +202,7 @@ def liquidate_ltv(self, liquidate_ltv): def min_borrow_amount(self): """Gets the min_borrow_amount of this UserLtvInfo. # noqa: E501 - Minimum borrowable amount for the loan currency. # noqa: E501 + Minimum borrowable amount for the loan currency # noqa: E501 :return: The min_borrow_amount of this UserLtvInfo. # noqa: E501 :rtype: str @@ -213,7 +213,7 @@ def min_borrow_amount(self): def min_borrow_amount(self, min_borrow_amount): """Sets the min_borrow_amount of this UserLtvInfo. - Minimum borrowable amount for the loan currency. # noqa: E501 + Minimum borrowable amount for the loan currency # noqa: E501 :param min_borrow_amount: The min_borrow_amount of this UserLtvInfo. # noqa: E501 :type: str @@ -225,7 +225,7 @@ def min_borrow_amount(self, min_borrow_amount): def left_borrowable_amount(self): """Gets the left_borrowable_amount of this UserLtvInfo. # noqa: E501 - Remaining borrowable amount for the loan currency. # noqa: E501 + Remaining borrowable amount for the loan currency # noqa: E501 :return: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 :rtype: str @@ -236,7 +236,7 @@ def left_borrowable_amount(self): def left_borrowable_amount(self, left_borrowable_amount): """Sets the left_borrowable_amount of this UserLtvInfo. - Remaining borrowable amount for the loan currency. # noqa: E501 + Remaining borrowable amount for the loan currency # noqa: E501 :param left_borrowable_amount: The left_borrowable_amount of this UserLtvInfo. # noqa: E501 :type: str diff --git a/gate_api/models/user_sub.py b/gate_api/models/user_sub.py index b43ed57..d3728b1 100644 --- a/gate_api/models/user_sub.py +++ b/gate_api/models/user_sub.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -72,7 +72,7 @@ def __init__(self, uid=None, belong=None, type=None, ref_uid=None, local_vars_co def uid(self): """Gets the uid of this UserSub. # noqa: E501 - User ID. # noqa: E501 + User ID # noqa: E501 :return: The uid of this UserSub. # noqa: E501 :rtype: int @@ -83,7 +83,7 @@ def uid(self): def uid(self, uid): """Sets the uid of this UserSub. - User ID. # noqa: E501 + User ID # noqa: E501 :param uid: The uid of this UserSub. # noqa: E501 :type: int @@ -95,7 +95,7 @@ def uid(self, uid): def belong(self): """Gets the belong of this UserSub. # noqa: E501 - The system to which the user belongs (partner referral). If empty, it means not belonging to any system. # noqa: E501 + User's system affiliation (partner/referral). Empty means not belonging to any system # noqa: E501 :return: The belong of this UserSub. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def belong(self): def belong(self, belong): """Sets the belong of this UserSub. - The system to which the user belongs (partner referral). If empty, it means not belonging to any system. # noqa: E501 + User's system affiliation (partner/referral). Empty means not belonging to any system # noqa: E501 :param belong: The belong of this UserSub. # noqa: E501 :type: str @@ -118,7 +118,7 @@ def belong(self, belong): def type(self): """Gets the type of this UserSub. # noqa: E501 - Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 + Type (0-Not in system 1-Direct subordinate agent 2-Indirect subordinate agent 3-Direct direct customer 4-Indirect direct customer 5-Regular user) # noqa: E501 :return: The type of this UserSub. # noqa: E501 :rtype: int @@ -129,7 +129,7 @@ def type(self): def type(self, type): """Sets the type of this UserSub. - Type (0-not in the system 1-direct subordinate agent 2-indirect subordinate agent 3-direct customer 4-indirect direct customer 5-ordinary user) # noqa: E501 + Type (0-Not in system 1-Direct subordinate agent 2-Indirect subordinate agent 3-Direct direct customer 4-Indirect direct customer 5-Regular user) # noqa: E501 :param type: The type of this UserSub. # noqa: E501 :type: int @@ -141,7 +141,7 @@ def type(self, type): def ref_uid(self): """Gets the ref_uid of this UserSub. # noqa: E501 - Inviter user ID. # noqa: E501 + Inviter user ID # noqa: E501 :return: The ref_uid of this UserSub. # noqa: E501 :rtype: int @@ -152,7 +152,7 @@ def ref_uid(self): def ref_uid(self, ref_uid): """Sets the ref_uid of this UserSub. - Inviter user ID. # noqa: E501 + Inviter user ID # noqa: E501 :param ref_uid: The ref_uid of this UserSub. # noqa: E501 :type: int diff --git a/gate_api/models/user_sub_relation.py b/gate_api/models/user_sub_relation.py index c233960..533e250 100644 --- a/gate_api/models/user_sub_relation.py +++ b/gate_api/models/user_sub_relation.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -57,7 +57,7 @@ def __init__(self, list=None, local_vars_configuration=None): # noqa: E501 def list(self): """Gets the list of this UserSubRelation. # noqa: E501 - Subordinate relationship list. # noqa: E501 + Subordinate relationship list # noqa: E501 :return: The list of this UserSubRelation. # noqa: E501 :rtype: list[UserSub] @@ -68,7 +68,7 @@ def list(self): def list(self, list): """Sets the list of this UserSubRelation. - Subordinate relationship list. # noqa: E501 + Subordinate relationship list # noqa: E501 :param list: The list of this UserSubRelation. # noqa: E501 :type: list[UserSub] diff --git a/gate_api/models/user_total_amount.py b/gate_api/models/user_total_amount.py index eff80a1..759f31e 100644 --- a/gate_api/models/user_total_amount.py +++ b/gate_api/models/user_total_amount.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -62,7 +62,7 @@ def __init__(self, borrow_amount=None, collateral_amount=None, local_vars_config def borrow_amount(self): """Gets the borrow_amount of this UserTotalAmount. # noqa: E501 - Total borrowing amount, calculated in USDT. # noqa: E501 + Total borrowing amount in USDT # noqa: E501 :return: The borrow_amount of this UserTotalAmount. # noqa: E501 :rtype: str @@ -73,7 +73,7 @@ def borrow_amount(self): def borrow_amount(self, borrow_amount): """Sets the borrow_amount of this UserTotalAmount. - Total borrowing amount, calculated in USDT. # noqa: E501 + Total borrowing amount in USDT # noqa: E501 :param borrow_amount: The borrow_amount of this UserTotalAmount. # noqa: E501 :type: str @@ -85,7 +85,7 @@ def borrow_amount(self, borrow_amount): def collateral_amount(self): """Gets the collateral_amount of this UserTotalAmount. # noqa: E501 - Total collateral amount, calculated in USDT. # noqa: E501 + Total collateral amount in USDT # noqa: E501 :return: The collateral_amount of this UserTotalAmount. # noqa: E501 :rtype: str @@ -96,7 +96,7 @@ def collateral_amount(self): def collateral_amount(self, collateral_amount): """Sets the collateral_amount of this UserTotalAmount. - Total collateral amount, calculated in USDT. # noqa: E501 + Total collateral amount in USDT # noqa: E501 :param collateral_amount: The collateral_amount of this UserTotalAmount. # noqa: E501 :type: str diff --git a/gate_api/models/withdraw_status.py b/gate_api/models/withdraw_status.py index f47c4cb..8803fc9 100644 --- a/gate_api/models/withdraw_status.py +++ b/gate_api/models/withdraw_status.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -112,7 +112,7 @@ def __init__(self, currency=None, name=None, name_cn=None, deposit=None, withdra def currency(self): """Gets the currency of this WithdrawStatus. # noqa: E501 - Currency. # noqa: E501 + Currency # noqa: E501 :return: The currency of this WithdrawStatus. # noqa: E501 :rtype: str @@ -123,7 +123,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this WithdrawStatus. - Currency. # noqa: E501 + Currency # noqa: E501 :param currency: The currency of this WithdrawStatus. # noqa: E501 :type: str @@ -135,7 +135,7 @@ def currency(self, currency): def name(self): """Gets the name of this WithdrawStatus. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The name of this WithdrawStatus. # noqa: E501 :rtype: str @@ -146,7 +146,7 @@ def name(self): def name(self, name): """Sets the name of this WithdrawStatus. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param name: The name of this WithdrawStatus. # noqa: E501 :type: str @@ -158,7 +158,7 @@ def name(self, name): def name_cn(self): """Gets the name_cn of this WithdrawStatus. # noqa: E501 - Currency Chinese name. # noqa: E501 + Currency Chinese name # noqa: E501 :return: The name_cn of this WithdrawStatus. # noqa: E501 :rtype: str @@ -169,7 +169,7 @@ def name_cn(self): def name_cn(self, name_cn): """Sets the name_cn of this WithdrawStatus. - Currency Chinese name. # noqa: E501 + Currency Chinese name # noqa: E501 :param name_cn: The name_cn of this WithdrawStatus. # noqa: E501 :type: str @@ -181,7 +181,7 @@ def name_cn(self, name_cn): def deposit(self): """Gets the deposit of this WithdrawStatus. # noqa: E501 - Deposits fee. # noqa: E501 + Deposit fee # noqa: E501 :return: The deposit of this WithdrawStatus. # noqa: E501 :rtype: str @@ -192,7 +192,7 @@ def deposit(self): def deposit(self, deposit): """Sets the deposit of this WithdrawStatus. - Deposits fee. # noqa: E501 + Deposit fee # noqa: E501 :param deposit: The deposit of this WithdrawStatus. # noqa: E501 :type: str @@ -204,7 +204,7 @@ def deposit(self, deposit): def withdraw_percent(self): """Gets the withdraw_percent of this WithdrawStatus. # noqa: E501 - Withdrawal fee rate percentage. # noqa: E501 + Withdrawal fee rate percentage # noqa: E501 :return: The withdraw_percent of this WithdrawStatus. # noqa: E501 :rtype: str @@ -215,7 +215,7 @@ def withdraw_percent(self): def withdraw_percent(self, withdraw_percent): """Sets the withdraw_percent of this WithdrawStatus. - Withdrawal fee rate percentage. # noqa: E501 + Withdrawal fee rate percentage # noqa: E501 :param withdraw_percent: The withdraw_percent of this WithdrawStatus. # noqa: E501 :type: str @@ -227,7 +227,7 @@ def withdraw_percent(self, withdraw_percent): def withdraw_fix(self): """Gets the withdraw_fix of this WithdrawStatus. # noqa: E501 - Fixed withdrawal fee. # noqa: E501 + Fixed withdrawal fee # noqa: E501 :return: The withdraw_fix of this WithdrawStatus. # noqa: E501 :rtype: str @@ -238,7 +238,7 @@ def withdraw_fix(self): def withdraw_fix(self, withdraw_fix): """Sets the withdraw_fix of this WithdrawStatus. - Fixed withdrawal fee. # noqa: E501 + Fixed withdrawal fee # noqa: E501 :param withdraw_fix: The withdraw_fix of this WithdrawStatus. # noqa: E501 :type: str @@ -250,7 +250,7 @@ def withdraw_fix(self, withdraw_fix): def withdraw_day_limit(self): """Gets the withdraw_day_limit of this WithdrawStatus. # noqa: E501 - Daily allowed withdrawal amount. # noqa: E501 + Daily allowed withdrawal amount # noqa: E501 :return: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 :rtype: str @@ -261,7 +261,7 @@ def withdraw_day_limit(self): def withdraw_day_limit(self, withdraw_day_limit): """Sets the withdraw_day_limit of this WithdrawStatus. - Daily allowed withdrawal amount. # noqa: E501 + Daily allowed withdrawal amount # noqa: E501 :param withdraw_day_limit: The withdraw_day_limit of this WithdrawStatus. # noqa: E501 :type: str @@ -273,7 +273,7 @@ def withdraw_day_limit(self, withdraw_day_limit): def withdraw_amount_mini(self): """Gets the withdraw_amount_mini of this WithdrawStatus. # noqa: E501 - Minimum withdrawal amount. # noqa: E501 + Minimum withdrawal amount # noqa: E501 :return: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 :rtype: str @@ -284,7 +284,7 @@ def withdraw_amount_mini(self): def withdraw_amount_mini(self, withdraw_amount_mini): """Sets the withdraw_amount_mini of this WithdrawStatus. - Minimum withdrawal amount. # noqa: E501 + Minimum withdrawal amount # noqa: E501 :param withdraw_amount_mini: The withdraw_amount_mini of this WithdrawStatus. # noqa: E501 :type: str @@ -296,7 +296,7 @@ def withdraw_amount_mini(self, withdraw_amount_mini): def withdraw_day_limit_remain(self): """Gets the withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 - Daily withdrawal amount left. # noqa: E501 + Daily withdrawal amount left # noqa: E501 :return: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 :rtype: str @@ -307,7 +307,7 @@ def withdraw_day_limit_remain(self): def withdraw_day_limit_remain(self, withdraw_day_limit_remain): """Sets the withdraw_day_limit_remain of this WithdrawStatus. - Daily withdrawal amount left. # noqa: E501 + Daily withdrawal amount left # noqa: E501 :param withdraw_day_limit_remain: The withdraw_day_limit_remain of this WithdrawStatus. # noqa: E501 :type: str @@ -319,7 +319,7 @@ def withdraw_day_limit_remain(self, withdraw_day_limit_remain): def withdraw_eachtime_limit(self): """Gets the withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 - Maximum amount for each withdrawal. # noqa: E501 + Maximum amount for each withdrawal # noqa: E501 :return: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 :rtype: str @@ -330,7 +330,7 @@ def withdraw_eachtime_limit(self): def withdraw_eachtime_limit(self, withdraw_eachtime_limit): """Sets the withdraw_eachtime_limit of this WithdrawStatus. - Maximum amount for each withdrawal. # noqa: E501 + Maximum amount for each withdrawal # noqa: E501 :param withdraw_eachtime_limit: The withdraw_eachtime_limit of this WithdrawStatus. # noqa: E501 :type: str @@ -342,7 +342,7 @@ def withdraw_eachtime_limit(self, withdraw_eachtime_limit): def withdraw_fix_on_chains(self): """Gets the withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 - Fixed withdrawal fee on multiple chains. # noqa: E501 + Fixed withdrawal fee on multiple chains # noqa: E501 :return: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 :rtype: dict(str, str) @@ -353,7 +353,7 @@ def withdraw_fix_on_chains(self): def withdraw_fix_on_chains(self, withdraw_fix_on_chains): """Sets the withdraw_fix_on_chains of this WithdrawStatus. - Fixed withdrawal fee on multiple chains. # noqa: E501 + Fixed withdrawal fee on multiple chains # noqa: E501 :param withdraw_fix_on_chains: The withdraw_fix_on_chains of this WithdrawStatus. # noqa: E501 :type: dict(str, str) @@ -365,7 +365,7 @@ def withdraw_fix_on_chains(self, withdraw_fix_on_chains): def withdraw_percent_on_chains(self): """Gets the withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 - Percentage withdrawal fee on multiple chains. # noqa: E501 + Percentage withdrawal fee on multiple chains # noqa: E501 :return: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 :rtype: dict(str, str) @@ -376,7 +376,7 @@ def withdraw_percent_on_chains(self): def withdraw_percent_on_chains(self, withdraw_percent_on_chains): """Sets the withdraw_percent_on_chains of this WithdrawStatus. - Percentage withdrawal fee on multiple chains. # noqa: E501 + Percentage withdrawal fee on multiple chains # noqa: E501 :param withdraw_percent_on_chains: The withdraw_percent_on_chains of this WithdrawStatus. # noqa: E501 :type: dict(str, str) diff --git a/gate_api/models/withdrawal_record.py b/gate_api/models/withdrawal_record.py index 680a75b..ee0cf4c 100644 --- a/gate_api/models/withdrawal_record.py +++ b/gate_api/models/withdrawal_record.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -119,7 +119,7 @@ def __init__(self, id=None, txid=None, block_number=None, withdraw_order_id=None def id(self): """Gets the id of this WithdrawalRecord. # noqa: E501 - Record ID. # noqa: E501 + Record ID # noqa: E501 :return: The id of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -130,7 +130,7 @@ def id(self): def id(self, id): """Sets the id of this WithdrawalRecord. - Record ID. # noqa: E501 + Record ID # noqa: E501 :param id: The id of this WithdrawalRecord. # noqa: E501 :type: str @@ -142,7 +142,7 @@ def id(self, id): def txid(self): """Gets the txid of this WithdrawalRecord. # noqa: E501 - Hash record of the withdrawal. # noqa: E501 + Hash record of the withdrawal # noqa: E501 :return: The txid of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -153,7 +153,7 @@ def txid(self): def txid(self, txid): """Sets the txid of this WithdrawalRecord. - Hash record of the withdrawal. # noqa: E501 + Hash record of the withdrawal # noqa: E501 :param txid: The txid of this WithdrawalRecord. # noqa: E501 :type: str @@ -165,7 +165,7 @@ def txid(self, txid): def block_number(self): """Gets the block_number of this WithdrawalRecord. # noqa: E501 - Block Number. # noqa: E501 + Block Number # noqa: E501 :return: The block_number of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -176,7 +176,7 @@ def block_number(self): def block_number(self, block_number): """Sets the block_number of this WithdrawalRecord. - Block Number. # noqa: E501 + Block Number # noqa: E501 :param block_number: The block_number of this WithdrawalRecord. # noqa: E501 :type: str @@ -211,7 +211,7 @@ def withdraw_order_id(self, withdraw_order_id): def timestamp(self): """Gets the timestamp of this WithdrawalRecord. # noqa: E501 - Operation time. # noqa: E501 + Operation time # noqa: E501 :return: The timestamp of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -222,7 +222,7 @@ def timestamp(self): def timestamp(self, timestamp): """Sets the timestamp of this WithdrawalRecord. - Operation time. # noqa: E501 + Operation time # noqa: E501 :param timestamp: The timestamp of this WithdrawalRecord. # noqa: E501 :type: str @@ -234,7 +234,7 @@ def timestamp(self, timestamp): def amount(self): """Gets the amount of this WithdrawalRecord. # noqa: E501 - Currency amount. # noqa: E501 + Token amount # noqa: E501 :return: The amount of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -245,7 +245,7 @@ def amount(self): def amount(self, amount): """Sets the amount of this WithdrawalRecord. - Currency amount. # noqa: E501 + Token amount # noqa: E501 :param amount: The amount of this WithdrawalRecord. # noqa: E501 :type: str @@ -259,7 +259,7 @@ def amount(self, amount): def fee(self): """Gets the fee of this WithdrawalRecord. # noqa: E501 - fee. # noqa: E501 + fee # noqa: E501 :return: The fee of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -270,7 +270,7 @@ def fee(self): def fee(self, fee): """Sets the fee of this WithdrawalRecord. - fee. # noqa: E501 + fee # noqa: E501 :param fee: The fee of this WithdrawalRecord. # noqa: E501 :type: str @@ -282,7 +282,7 @@ def fee(self, fee): def currency(self): """Gets the currency of this WithdrawalRecord. # noqa: E501 - Currency name. # noqa: E501 + Currency name # noqa: E501 :return: The currency of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -293,7 +293,7 @@ def currency(self): def currency(self, currency): """Sets the currency of this WithdrawalRecord. - Currency name. # noqa: E501 + Currency name # noqa: E501 :param currency: The currency of this WithdrawalRecord. # noqa: E501 :type: str @@ -307,7 +307,7 @@ def currency(self, currency): def address(self): """Gets the address of this WithdrawalRecord. # noqa: E501 - Withdrawal address. # noqa: E501 + Withdrawal address # noqa: E501 :return: The address of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -318,7 +318,7 @@ def address(self): def address(self, address): """Sets the address of this WithdrawalRecord. - Withdrawal address. # noqa: E501 + Withdrawal address # noqa: E501 :param address: The address of this WithdrawalRecord. # noqa: E501 :type: str @@ -330,7 +330,7 @@ def address(self, address): def fail_reason(self): """Gets the fail_reason of this WithdrawalRecord. # noqa: E501 - The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty # noqa: E501 + Reason for withdrawal failure. Has a value when status = CANCEL, empty for all other statuses # noqa: E501 :return: The fail_reason of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -341,7 +341,7 @@ def fail_reason(self): def fail_reason(self, fail_reason): """Sets the fail_reason of this WithdrawalRecord. - The reason for withdrawal failure is that there is a value when status = CANCEL, and the rest of the state is empty # noqa: E501 + Reason for withdrawal failure. Has a value when status = CANCEL, empty for all other statuses # noqa: E501 :param fail_reason: The fail_reason of this WithdrawalRecord. # noqa: E501 :type: str @@ -353,7 +353,7 @@ def fail_reason(self, fail_reason): def timestamp2(self): """Gets the timestamp2 of this WithdrawalRecord. # noqa: E501 - The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the # noqa: E501 + Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE and block_number > 0, it is the withdrawal success time # noqa: E501 :return: The timestamp2 of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -364,7 +364,7 @@ def timestamp2(self): def timestamp2(self, timestamp2): """Sets the timestamp2 of this WithdrawalRecord. - The withdrawal end time, i.e.: withdrawal cancel time or withdrawal success time When status = CANCEL, the corresponding cancel time When status = DONE and block_number > 0, it is the # noqa: E501 + Withdrawal final time, i.e.: withdrawal cancellation time or withdrawal success time When status = CANCEL, corresponds to cancellation time When status = DONE and block_number > 0, it is the withdrawal success time # noqa: E501 :param timestamp2: The timestamp2 of this WithdrawalRecord. # noqa: E501 :type: str @@ -376,7 +376,7 @@ def timestamp2(self, timestamp2): def memo(self): """Gets the memo of this WithdrawalRecord. # noqa: E501 - Additional remarks with regards to the withdrawal. # noqa: E501 + Additional remarks with regards to the withdrawal # noqa: E501 :return: The memo of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -387,7 +387,7 @@ def memo(self): def memo(self, memo): """Sets the memo of this WithdrawalRecord. - Additional remarks with regards to the withdrawal. # noqa: E501 + Additional remarks with regards to the withdrawal # noqa: E501 :param memo: The memo of this WithdrawalRecord. # noqa: E501 :type: str @@ -422,7 +422,7 @@ def status(self, status): def chain(self): """Gets the chain of this WithdrawalRecord. # noqa: E501 - Name of the chain used in withdrawals. # noqa: E501 + Name of the chain used in withdrawals # noqa: E501 :return: The chain of this WithdrawalRecord. # noqa: E501 :rtype: str @@ -433,7 +433,7 @@ def chain(self): def chain(self, chain): """Sets the chain of this WithdrawalRecord. - Name of the chain used in withdrawals. # noqa: E501 + Name of the chain used in withdrawals # noqa: E501 :param chain: The chain of this WithdrawalRecord. # noqa: E501 :type: str diff --git a/gate_api/rest.py b/gate_api/rest.py index 755fbe1..8781e1b 100644 --- a/gate_api/rest.py +++ b/gate_api/rest.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech diff --git a/setup.py b/setup.py index 15047ec..a3e56cb 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ """ Gate API - Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 + Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading. # noqa: E501 Contact: support@mail.gate.com Generated by: https://openapi-generator.tech @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.103.0" +VERSION = "6.104.3" # To install the library, run the following # # python setup.py install From 81d6944006805487b1e983692498482ecaef0233 Mon Sep 17 00:00:00 2001 From: gateio Date: Thu, 11 Sep 2025 06:23:59 +0000 Subject: [PATCH 19/20] update to v7.1.7 --- README.md | 6 +- docs/Contract.md | 4 +- docs/ContractStat.md | 1 + docs/DeliveryApi.md | 22 +-- docs/EarnApi.md | 4 +- docs/FindCoin.md | 3 +- docs/FuturesAccount.md | 1 + docs/FuturesAccountBook.md | 2 +- docs/FuturesApi.md | 36 +++-- docs/FuturesOrder.md | 3 + docs/FuturesOrderAmendment.md | 1 + docs/FuturesTicker.md | 5 + docs/MultiCollateralLoanApi.md | 4 +- docs/MultiLoanRepayItem.md | 2 +- docs/Position.md | 1 + docs/RebateApi.md | 6 +- docs/SpotApi.md | 4 +- docs/SubAccount.md | 2 +- docs/SwapCoinStruct.md | 4 +- docs/UnifiedApi.md | 6 +- gate_api/__init__.py | 2 +- gate_api/api/delivery_api.py | 24 ++-- gate_api/api/earn_api.py | 6 +- gate_api/api/futures_api.py | 46 +++++-- gate_api/api/multi_collateral_loan_api.py | 4 +- gate_api/api/rebate_api.py | 5 + gate_api/api/spot_api.py | 4 +- gate_api/api/unified_api.py | 4 +- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 +- gate_api/models/contract.py | 68 +++++++++- gate_api/models/contract_stat.py | 36 ++++- gate_api/models/find_coin.py | 36 +---- gate_api/models/futures_account.py | 32 ++++- gate_api/models/futures_account_book.py | 4 +- gate_api/models/futures_order.py | 92 ++++++++++++- gate_api/models/futures_order_amendment.py | 36 ++++- gate_api/models/futures_ticker.py | 148 ++++++++++++++++++++- gate_api/models/multi_loan_repay_item.py | 5 +- gate_api/models/position.py | 36 ++++- gate_api/models/sub_account.py | 4 +- gate_api/models/swap_coin_struct.py | 8 +- setup.py | 2 +- 43 files changed, 569 insertions(+), 156 deletions(-) diff --git a/README.md b/README.md index b276beb..d185462 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.104.3 -- Package version: 6.104.3 +- API version: v4.105.7 +- Package version: 7.1.7 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) @@ -148,7 +148,7 @@ Class | Method | HTTP request | Description *UnifiedApi* | [**get_unified_mode**](docs/UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account *UnifiedApi* | [**set_unified_mode**](docs/UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set unified account mode *UnifiedApi* | [**get_unified_estimate_rate**](docs/UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Query unified account estimated interest rate -*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered discount +*UnifiedApi* | [**list_currency_discount_tiers**](docs/UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered *UnifiedApi* | [**list_loan_margin_tiers**](docs/UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin *UnifiedApi* | [**calculate_portfolio_margin**](docs/UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator *UnifiedApi* | [**get_user_leverage_currency_config**](docs/UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set diff --git a/docs/Contract.md b/docs/Contract.md index 55d18e6..d7adc71 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -40,8 +40,10 @@ Name | Type | Description | Notes **enable_credit** | **bool** | Whether portfolio margin account is enabled | [optional] **create_time** | **float** | Created time of the contract | [optional] **funding_cap_ratio** | **str** | The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio | [optional] -**status** | **str** | Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted) | [optional] +**status** | **str** | Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted), circuit_breaker (circuit breaker) | [optional] **launch_time** | **int** | Contract expiry timestamp | [optional] +**delisting_time** | **int** | Timestamp when contract enters reduce-only state | [optional] +**delisted_time** | **int** | Contract delisting time | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContractStat.md b/docs/ContractStat.md index 162ca4f..f20a520 100644 --- a/docs/ContractStat.md +++ b/docs/ContractStat.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **open_interest_usd** | **float** | Total open interest volume (quote currency) | [optional] **top_lsr_account** | **float** | Top trader long/short account ratio | [optional] **top_lsr_size** | **float** | Top trader long/short position ratio | [optional] +**mark_price** | **float** | Mark price | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md index 5c4e4c5..88ac2c5 100644 --- a/docs/DeliveryApi.md +++ b/docs/DeliveryApi.md @@ -244,7 +244,7 @@ api_instance = gate_api.DeliveryApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT_20200814' # str | Futures contract limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) -last_id = '12345' # str | 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 (optional) +last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang (optional) _from = 1546905600 # int | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional) to = 1546935600 # int | Specify end time in Unix seconds, default to current time. (optional) @@ -265,7 +265,7 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] - **last_id** | **str**| 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 | [optional] + **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang | [optional] **_from** | **int**| Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] **to** | **int**| Specify end time in Unix seconds, default to current time. | [optional] @@ -316,7 +316,7 @@ contract = 'BTC_USDT_20200814' # str | Futures contract _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional) to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional) limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) -interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time (optional) (default to '5m') +interval = '5m' # str | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time (optional) (default to '5m') try: # Futures market K-line chart @@ -337,7 +337,7 @@ Name | Type | Description | Notes **_from** | **int**| Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional] **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] - **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time | [optional] [default to '5m'] + **interval** | **str**| Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time | [optional] [default to '5m'] ### Return type @@ -579,7 +579,7 @@ settle = 'usdt' # str | Settle currency limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional) +type = 'dnw' # str | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates (optional) try: # Query futures account change history @@ -599,7 +599,7 @@ Name | Type | Description | Notes **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] + **type** | **str**| Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates | [optional] ### Return type @@ -1006,7 +1006,7 @@ status = 'open' # str | Query order list based on status contract = 'BTC_USDT_20200814' # str | Futures contract (optional) limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) +last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional) count_total = 0 # int | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0) try: @@ -1028,7 +1028,7 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract | [optional] **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] + **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional] **count_total** | **int**| Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0] ### Return type @@ -1369,7 +1369,7 @@ contract = 'BTC_USDT_20200814' # str | Futures contract (optional) order = 12345 # int | Futures order ID, return related data only if specified (optional) limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) +last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional) count_total = 0 # int | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0) try: @@ -1391,7 +1391,7 @@ Name | Type | Description | Notes **order** | **int**| Futures order ID, return related data only if specified | [optional] **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] + **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional] **count_total** | **int**| Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0] ### Return type @@ -1636,7 +1636,7 @@ Name | Type | Description | Notes Query risk limit tiers -When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. +When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. ### Example diff --git a/docs/EarnApi.md b/docs/EarnApi.md index 66e0d67..a2b83b8 100644 --- a/docs/EarnApi.md +++ b/docs/EarnApi.md @@ -548,7 +548,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **find_coin** -> list[str] find_coin(find_coin) +> object find_coin(find_coin) Staking coins @@ -596,7 +596,7 @@ Name | Type | Description | Notes ### Return type -**list[str]** +**object** ### Authorization diff --git a/docs/FindCoin.md b/docs/FindCoin.md index 6895a4d..784880a 100644 --- a/docs/FindCoin.md +++ b/docs/FindCoin.md @@ -3,8 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**coin** | **str** | Currency | [optional] -**cointype** | **str** | Token Type: swap-Voucher, lock-Locked | [optional] +**cointype** | **str** | Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md index c99c403..590e0c8 100644 --- a/docs/FuturesAccount.md +++ b/docs/FuturesAccount.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **point** | **str** | Point card amount | [optional] **currency** | **str** | Settlement currency | [optional] **in_dual_mode** | **bool** | Whether dual mode is enabled | [optional] +**position_mode** | **str** | Position mode: single - one-way, dual - dual-side, split - sub-positions (in_dual_mode is deprecated) | [optional] **enable_credit** | **bool** | Whether portfolio margin account mode is enabled | [optional] **position_initial_margin** | **str** | Initial margin occupied by positions, applicable to unified account mode | [optional] **maintenance_margin** | **str** | Maintenance margin occupied by positions, applicable to new classic account margin mode and unified account mode | [optional] diff --git a/docs/FuturesAccountBook.md b/docs/FuturesAccountBook.md index 1c1f738..0056f17 100644 --- a/docs/FuturesAccountBook.md +++ b/docs/FuturesAccountBook.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **time** | **float** | Change time | [optional] **change** | **str** | Change amount | [optional] **balance** | **str** | Balance after change | [optional] -**type** | **str** | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] +**type** | **str** | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction | [optional] **text** | **str** | Comment | [optional] **contract** | **str** | Futures contract, the field is only available for data after 2023-10-30 | [optional] **trade_id** | **str** | trade id | [optional] diff --git a/docs/FuturesApi.md b/docs/FuturesApi.md index 5756618..75ce6fe 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -317,7 +317,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_futures_candlesticks** -> list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) +> list[FuturesCandlestick] list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval, timezone=timezone) Futures market K-line chart @@ -344,10 +344,11 @@ _from = 1546905600 # int | Start time of candlesticks, formatted in Unix timesta to = 1546935600 # int | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional) limit = 100 # int | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100) interval = '5m' # str | Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days (optional) (default to '5m') +timezone = 'utc0' # str | Time zone: all/utc0/utc8, default utc0 (optional) (default to 'utc0') try: # Futures market K-line chart - api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval) + api_response = api_instance.list_futures_candlesticks(settle, contract, _from=_from, to=to, limit=limit, interval=interval, timezone=timezone) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -365,6 +366,7 @@ Name | Type | Description | Notes **to** | **int**| Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional] **limit** | **int**| Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] **interval** | **str**| Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days | [optional] [default to '5m'] + **timezone** | **str**| Time zone: all/utc0/utc8, default utc0 | [optional] [default to 'utc0'] ### Return type @@ -773,7 +775,7 @@ No authorization required Query liquidation order history -The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for detailsThe time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details +The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for details ### Example @@ -841,7 +843,7 @@ No authorization required Query risk limit tiers -When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. +When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. ### Example @@ -1006,7 +1008,7 @@ limit = 100 # int | Maximum number of records returned in a single list (optiona offset = 0 # int | List offset, starting from 0 (optional) (default to 0) _from = 1547706332 # int | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional) to = 1547706332 # int | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional) -type = 'dnw' # str | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction (optional) +type = 'dnw' # str | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction (optional) try: # Query futures account change history @@ -1028,7 +1030,7 @@ Name | Type | Description | Notes **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] **_from** | **int**| Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] **to** | **int**| Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] - **type** | **str**| Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction | [optional] + **type** | **str**| Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction | [optional] ### Return type @@ -1264,7 +1266,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_position_leverage** -> Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) +> Position update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit, pid=pid) Update position leverage @@ -1296,10 +1298,11 @@ settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract leverage = '10' # str | New position leverage cross_leverage_limit = '10' # str | Cross margin leverage (valid only when `leverage` is 0) (optional) +pid = 1 # int | Product ID (optional) try: # Update position leverage - api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit) + api_response = api_instance.update_position_leverage(settle, contract, leverage, cross_leverage_limit=cross_leverage_limit, pid=pid) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -1315,6 +1318,7 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract | **leverage** | **str**| New position leverage | **cross_leverage_limit** | **str**| Cross margin leverage (valid only when `leverage` is 0) | [optional] + **pid** | **int**| Product ID | [optional] ### Return type @@ -1938,7 +1942,7 @@ status = 'open' # str | Query order list based on status contract = 'BTC_USDT' # str | Futures contract, return related data only if specified (optional) limit = 100 # int | Maximum number of records returned in a single list (optional) (default to 100) offset = 0 # int | List offset, starting from 0 (optional) (default to 0) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) +last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional) try: # Query futures order list @@ -1959,7 +1963,7 @@ Name | Type | Description | Notes **contract** | **str**| Futures contract, return related data only if specified | [optional] **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 100] **offset** | **int**| List offset, starting from 0 | [optional] [default to 0] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] + **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional] ### Return type @@ -2055,7 +2059,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, contract, x_gate_exptime=x_gate_exptime, side=side) +> list[FuturesOrder] cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side, exclude_reduce_only=exclude_reduce_only, text=text) Cancel all orders with 'open' status @@ -2088,11 +2092,13 @@ api_instance = gate_api.FuturesApi(api_client) settle = 'usdt' # str | Settle currency contract = 'BTC_USDT' # str | Futures contract x_gate_exptime = '1689560679123' # str | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected (optional) -side = 'ask' # str | Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders (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, contract, x_gate_exptime=x_gate_exptime, side=side) + api_response = api_instance.cancel_futures_orders(settle, contract, x_gate_exptime=x_gate_exptime, side=side, exclude_reduce_only=exclude_reduce_only, text=text) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -2107,7 +2113,9 @@ Name | Type | Description | Notes **settle** | **str**| Settle currency | **contract** | **str**| Futures contract | **x_gate_exptime** | **str**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] - **side** | **str**| Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders | [optional] + **side** | **str**| Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders | [optional] + **exclude_reduce_only** | **bool**| Whether to exclude reduce-only orders | [optional] [default to False] + **text** | **str**| Remark for order cancellation | [optional] ### Return type diff --git a/docs/FuturesOrder.md b/docs/FuturesOrder.md index 89c6a9d..1d0de6a 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **id** | **int** | Futures order ID | [optional] [readonly] **user** | **int** | User ID | [optional] [readonly] **create_time** | **float** | Creation time of order | [optional] [readonly] +**update_time** | **float** | OrderUpdateTime | [optional] [readonly] **finish_time** | **float** | Order finished time. Not returned if order is open | [optional] [readonly] **finish_as** | **str** | How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention | [optional] [readonly] **status** | **str** | Order status - `open`: Pending - `finished`: Completed | [optional] [readonly] @@ -30,6 +31,8 @@ Name | Type | Description | Notes **stp_id** | **int** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] **stp_act** | **str** | Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled | [optional] **amend_text** | **str** | The custom data that the user remarked when amending the order | [optional] [readonly] +**limit_vip** | **int** | Counterparty user's VIP level for limit order fills. Current order will only match with orders whose VIP level is less than or equal to the specified level. Only 11~16 are supported; default is 0 | [optional] +**pid** | **int** | Position ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md index 0cc8dd7..4e3bce2 100644 --- a/docs/FuturesOrderAmendment.md +++ b/docs/FuturesOrderAmendment.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **size** | **int** | New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. | [optional] **price** | **str** | New order price | [optional] **amend_text** | **str** | Custom info during order amendment | [optional] +**text** | **str** | Internal users can modify information in the text field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuturesTicker.md b/docs/FuturesTicker.md index 2c9ba71..d0f8511 100644 --- a/docs/FuturesTicker.md +++ b/docs/FuturesTicker.md @@ -24,6 +24,11 @@ Name | Type | Description | Notes **lowest_size** | **str** | The latest seller's lowest price order quantity | [optional] **highest_bid** | **str** | Recent highest bid | [optional] **highest_size** | **str** | The latest buyer's highest price order volume | [optional] +**change_utc0** | **str** | Percentage change at utc0. Negative values indicate a drop, e.g., -7.45% | [optional] +**change_utc8** | **str** | Percentage change at utc8. Negative values indicate a drop, e.g., -7.45% | [optional] +**change_price** | **str** | 24h change amount. Negative values indicate a drop, e.g., -7.45 | [optional] +**change_utc0_price** | **str** | Change amount at utc0. Negative values indicate a drop, e.g., -7.45 | [optional] +**change_utc8_price** | **str** | Change amount at utc8. Negative values indicate a drop, e.g., -7.45 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md index 8cc3516..ab66f2a 100644 --- a/docs/MultiCollateralLoanApi.md +++ b/docs/MultiCollateralLoanApi.md @@ -50,7 +50,7 @@ api_instance = gate_api.MultiCollateralLoanApi(api_client) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Maximum number of records returned in a single list (optional) (default to 10) sort = 'ltv_asc' # str | Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. (optional) -order_type = 'current' # str | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified (optional) +order_type = 'current' # str | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified (optional) try: # Query multi-currency collateral order list @@ -69,7 +69,7 @@ Name | Type | Description | Notes **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Maximum number of records returned in a single list | [optional] [default to 10] **sort** | **str**| Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. | [optional] - **order_type** | **str**| Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional] + **order_type** | **str**| Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional] ### Return type diff --git a/docs/MultiLoanRepayItem.md b/docs/MultiLoanRepayItem.md index d8ab1d1..f381f48 100644 --- a/docs/MultiLoanRepayItem.md +++ b/docs/MultiLoanRepayItem.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **str** | Repayment currency | [optional] **amount** | **str** | Size | [optional] -**repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial repayment | [optional] +**repaid_all** | **bool** | Repayment method, set to true for full repayment, false for partial repayment | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Position.md b/docs/Position.md index 642582b..5c4065b 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -37,6 +37,7 @@ Name | Type | Description | Notes **open_time** | **int** | First Open Time | [optional] **risk_limit_table** | **str** | Risk limit table ID | [optional] [readonly] **average_maintenance_rate** | **str** | Average maintenance margin rate | [optional] [readonly] +**pid** | **int** | Sub-account position ID | [optional] [readonly] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RebateApi.md b/docs/RebateApi.md index 45593ba..f7e8f50 100644 --- a/docs/RebateApi.md +++ b/docs/RebateApi.md @@ -95,7 +95,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) # **agency_commissions_history** -> list[AgencyCommissionHistory] agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) +> list[AgencyCommissionHistory] agency_commissions_history(currency=currency, commission_type=commission_type, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) Broker obtains rebate history of recommended users @@ -126,6 +126,7 @@ api_client = gate_api.ApiClient(configuration) # Create an instance of the API class api_instance = gate_api.RebateApi(api_client) currency = 'BTC' # str | Specify the currency. If not specified, returns all currencies (optional) +commission_type = 1 # int | Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate (optional) user_id = 10003 # int | User ID. If not specified, all user records will be returned (optional) _from = 1602120000 # int | Start time for querying records, defaults to 7 days before current time if not specified (optional) to = 1602123600 # int | End timestamp for the query, defaults to current time if not specified (optional) @@ -134,7 +135,7 @@ offset = 0 # int | List offset, starting from 0 (optional) (default to 0) try: # Broker obtains rebate history of recommended users - api_response = api_instance.agency_commissions_history(currency=currency, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) + api_response = api_instance.agency_commissions_history(currency=currency, commission_type=commission_type, user_id=user_id, _from=_from, to=to, limit=limit, offset=offset) print(api_response) except GateApiException as ex: print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message)) @@ -147,6 +148,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency** | **str**| Specify the currency. If not specified, returns all currencies | [optional] + **commission_type** | **int**| Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate | [optional] **user_id** | **int**| User ID. If not specified, all user records will be returned | [optional] **_from** | **int**| Start time for querying records, defaults to 7 days before current time if not specified | [optional] **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] diff --git a/docs/SpotApi.md b/docs/SpotApi.md index b9dad8b..9b2c765 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -416,7 +416,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.SpotApi(api_client) currency_pair = 'BTC_USDT' # str | Currency pair limit = 100 # int | Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 (optional) (default to 100) -last_id = '12345' # str | Specify the currency name to query in batches, and support up to 100 pass parameters at a time (optional) +last_id = '12345' # str | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional) reverse = False # bool | Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. (optional) (default to False) _from = 1627706330 # int | Start timestamp for the query (optional) to = 1635329650 # int | End timestamp for the query, defaults to current time if not specified (optional) @@ -438,7 +438,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency_pair** | **str**| Currency pair | **limit** | **int**| Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 | [optional] [default to 100] - **last_id** | **str**| Specify the currency name to query in batches, and support up to 100 pass parameters at a time | [optional] + **last_id** | **str**| Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional] **reverse** | **bool**| Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. | [optional] [default to False] **_from** | **int**| Start timestamp for the query | [optional] **to** | **int**| End timestamp for the query, defaults to current time if not specified | [optional] diff --git a/docs/SubAccount.md b/docs/SubAccount.md index 5a26c92..4778a33 100644 --- a/docs/SubAccount.md +++ b/docs/SubAccount.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **remark** | **str** | Remark | [optional] -**login_name** | **str** | 子账户登陆名:仅支持字母、数字、下划线,不可包含其他非法字符。 | +**login_name** | **str** | Sub-account login name: Only letters, numbers and underscores are supported, cannot contain other invalid characters | **password** | **str** | The sub-account's password. (Default: the same as main account's password) | [optional] **email** | **str** | The sub-account's email address. (Default: the same as main account's email address) | [optional] **state** | **int** | Sub-account status: 1-normal, 2-locked | [optional] [readonly] diff --git a/docs/SwapCoinStruct.md b/docs/SwapCoinStruct.md index 00ba132..15735e1 100644 --- a/docs/SwapCoinStruct.md +++ b/docs/SwapCoinStruct.md @@ -8,11 +8,11 @@ Name | Type | Description | Notes **uid** | **int** | User ID | [optional] **coin** | **str** | Currency | [optional] **type** | **int** | Type 0-Staking 1-Redemption | [optional] -**subtype** | **str** | 子类型 | [optional] +**subtype** | **str** | SubType | [optional] **amount** | **str** | Amount | [optional] **exchange_rate** | **str** | Exchange ratio | [optional] **exchange_amount** | **str** | Redemption Amount | [optional] -**update_stamp** | **int** | 更新时间戳 | [optional] +**update_stamp** | **int** | UpdateTimestamp | [optional] **create_stamp** | **int** | Transaction timestamp | [optional] **status** | **int** | status 1-success | [optional] **protocol_type** | **int** | DEFI Protocol Type | [optional] diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md index 1c46f6a..5c23e08 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description [**get_unified_mode**](UnifiedApi.md#get_unified_mode) | **GET** /unified/unified_mode | Query mode of the unified account [**set_unified_mode**](UnifiedApi.md#set_unified_mode) | **PUT** /unified/unified_mode | Set unified account mode [**get_unified_estimate_rate**](UnifiedApi.md#get_unified_estimate_rate) | **GET** /unified/estimate_rate | Query unified account estimated interest rate -[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered discount +[**list_currency_discount_tiers**](UnifiedApi.md#list_currency_discount_tiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered [**list_loan_margin_tiers**](UnifiedApi.md#list_loan_margin_tiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin [**calculate_portfolio_margin**](UnifiedApi.md#calculate_portfolio_margin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator [**get_user_leverage_currency_config**](UnifiedApi.md#get_user_leverage_currency_config) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set @@ -929,7 +929,7 @@ Name | Type | Description | Notes # **list_currency_discount_tiers** > list[UnifiedDiscount] list_currency_discount_tiers() -Query unified account tiered discount +Query unified account tiered ### Example @@ -948,7 +948,7 @@ api_client = gate_api.ApiClient(configuration) api_instance = gate_api.UnifiedApi(api_client) try: - # Query unified account tiered discount + # Query unified account tiered api_response = api_instance.list_currency_discount_tiers() print(api_response) except GateApiException as ex: diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 74a5f6b..327ad77 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "6.104.3" +__version__ = "7.1.7" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi diff --git a/gate_api/api/delivery_api.py b/gate_api/api/delivery_api.py index 744e9e4..4979aa5 100644 --- a/gate_api/api/delivery_api.py +++ b/gate_api/api/delivery_api.py @@ -423,7 +423,7 @@ def list_delivery_trades(self, settle, contract, **kwargs): # noqa: E501 :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int limit: Maximum number of records returned in a single list - :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time. :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -452,7 +452,7 @@ def list_delivery_trades_with_http_info(self, settle, contract, **kwargs): # no :param str settle: Settle currency (required) :param str contract: Futures contract (required) :param int limit: Maximum number of records returned in a single list - :param str last_id: 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围 + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang :param int _from: Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. :param int to: Specify end time in Unix seconds, default to current time. :param _return_http_data_only: response data without head status code @@ -571,7 +571,7 @@ def list_delivery_candlesticks(self, settle, contract, **kwargs): # noqa: E501 :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -601,7 +601,7 @@ def list_delivery_candlesticks_with_http_info(self, settle, contract, **kwargs): :param int _from: Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. - :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time + :param str interval: Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1064,7 +1064,7 @@ def list_delivery_account_book(self, settle, **kwargs): # noqa: E501 :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate + :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1092,7 +1092,7 @@ def list_delivery_account_book_with_http_info(self, settle, **kwargs): # noqa: :param int limit: Maximum number of records returned in a single list :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate + :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1825,7 +1825,7 @@ def list_delivery_orders(self, settle, status, **kwargs): # noqa: E501 :param str contract: Futures contract :param int limit: Maximum number of records returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -1856,7 +1856,7 @@ def list_delivery_orders_with_http_info(self, settle, status, **kwargs): # noqa :param str contract: Futures contract :param int limit: Maximum number of records returned in a single list :param int offset: List offset, starting from 0 - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _return_http_data_only: response data without head status code and headers @@ -2477,7 +2477,7 @@ def get_my_delivery_trades(self, settle, **kwargs): # noqa: E501 :param int order: Futures order ID, 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 str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response @@ -2507,7 +2507,7 @@ def get_my_delivery_trades_with_http_info(self, settle, **kwargs): # noqa: E501 :param int order: Futures order ID, 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 str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param int count_total: Whether to return total number matched, defaults to 0 (no return) :param _return_http_data_only: response data without head status code and headers @@ -3002,7 +3002,7 @@ def list_delivery_settlements_with_http_info(self, settle, **kwargs): # noqa: E def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 """Query risk limit tiers # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_risk_limit_tiers(settle, async_req=True) @@ -3030,7 +3030,7 @@ def list_delivery_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 def list_delivery_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 """Query risk limit tiers # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_delivery_risk_limit_tiers_with_http_info(settle, async_req=True) diff --git a/gate_api/api/earn_api.py b/gate_api/api/earn_api.py index 8f7b083..2076555 100644 --- a/gate_api/api/earn_api.py +++ b/gate_api/api/earn_api.py @@ -993,7 +993,7 @@ def find_coin(self, find_coin, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: list[str] + :rtype: object :return: If the method is called asynchronously, returns the request thread. """ @@ -1019,7 +1019,7 @@ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) :return: If the method is called asynchronously, returns the request thread. """ @@ -1084,7 +1084,7 @@ def find_coin_with_http_info(self, find_coin, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[str]', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/gate_api/api/futures_api.py b/gate_api/api/futures_api.py index 94301a7..5d20be4 100644 --- a/gate_api/api/futures_api.py +++ b/gate_api/api/futures_api.py @@ -595,6 +595,7 @@ def list_futures_candlesticks(self, settle, contract, **kwargs): # noqa: E501 :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param str interval: Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days + :param str timezone: Time zone: all/utc0/utc8, default utc0 :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -625,6 +626,7 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): :param int to: Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision :param int limit: Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. :param str interval: Interval time between data points. Note that `1w` means natural week(Mon-Sun), while `7d` means every 7d since unix 0. 30d represents a natural month, not 30 days + :param str timezone: Time zone: all/utc0/utc8, default utc0 :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -647,7 +649,8 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): '_from', 'to', 'limit', - 'interval' + 'interval', + 'timezone' ] all_params.extend( [ @@ -694,6 +697,8 @@ def list_futures_candlesticks_with_http_info(self, settle, contract, **kwargs): query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'interval' in local_var_params and local_var_params['interval'] is not None: # noqa: E501 query_params.append(('interval', local_var_params['interval'])) # noqa: E501 + if 'timezone' in local_var_params and local_var_params['timezone'] is not None: # noqa: E501 + query_params.append(('timezone', local_var_params['timezone'])) # noqa: E501 header_params = {} @@ -1511,7 +1516,7 @@ def get_index_constituents_with_http_info(self, settle, index, **kwargs): # noq def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 """Query liquidation order history # noqa: E501 - The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for detailsThe time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 + The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders(settle, async_req=True) @@ -1540,7 +1545,7 @@ def list_liquidated_orders(self, settle, **kwargs): # noqa: E501 def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 """Query liquidation order history # noqa: E501 - The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for detailsThe time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details # noqa: E501 + The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_liquidated_orders_with_http_info(settle, async_req=True) @@ -1649,7 +1654,7 @@ def list_liquidated_orders_with_http_info(self, settle, **kwargs): # noqa: E501 def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 """Query risk limit tiers # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_risk_limit_tiers(settle, async_req=True) @@ -1677,7 +1682,7 @@ def list_futures_risk_limit_tiers(self, settle, **kwargs): # noqa: E501 def list_futures_risk_limit_tiers_with_http_info(self, settle, **kwargs): # noqa: E501 """Query risk limit tiers # noqa: E501 - When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets.'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty. # noqa: E501 + When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_futures_risk_limit_tiers_with_http_info(settle, async_req=True) @@ -1909,7 +1914,7 @@ def list_futures_account_book(self, settle, **kwargs): # noqa: E501 :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction + :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1940,7 +1945,7 @@ def list_futures_account_book_with_http_info(self, settle, **kwargs): # noqa: E :param int offset: List offset, starting from 0 :param int _from: Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) :param int to: Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp - :param str type: Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction + :param str type: Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2440,6 +2445,7 @@ def update_position_leverage(self, settle, contract, leverage, **kwargs): # noq :param str contract: Futures contract (required) :param str leverage: New position leverage (required) :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0) + :param int pid: Product ID :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2467,6 +2473,7 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** :param str contract: Futures contract (required) :param str leverage: New position leverage (required) :param str cross_leverage_limit: Cross margin leverage (valid only when `leverage` is 0) + :param int pid: Product ID :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2487,7 +2494,8 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** 'settle', 'contract', 'leverage', - 'cross_leverage_limit' + 'cross_leverage_limit', + 'pid' ] all_params.extend( [ @@ -2532,6 +2540,8 @@ def update_position_leverage_with_http_info(self, settle, contract, leverage, ** query_params.append(('leverage', local_var_params['leverage'])) # noqa: E501 if 'cross_leverage_limit' in local_var_params and local_var_params['cross_leverage_limit'] is not None: # noqa: E501 query_params.append(('cross_leverage_limit', local_var_params['cross_leverage_limit'])) # noqa: E501 + if 'pid' in local_var_params and local_var_params['pid'] is not None: # noqa: E501 + query_params.append(('pid', local_var_params['pid'])) # noqa: E501 header_params = {} @@ -3605,7 +3615,7 @@ def list_futures_orders(self, settle, status, **kwargs): # noqa: E501 :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 str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3635,7 +3645,7 @@ def list_futures_orders_with_http_info(self, settle, status, **kwargs): # noqa: :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 str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3884,7 +3894,9 @@ def cancel_futures_orders(self, settle, contract, **kwargs): # noqa: E501 :param str settle: Settle currency (required) :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders + :param str side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders + :param bool exclude_reduce_only: Whether to exclude reduce-only orders + :param str text: Remark for order cancellation :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3912,7 +3924,9 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n :param str settle: Settle currency (required) :param str contract: Futures contract (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 side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders + :param str side: Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders + :param bool exclude_reduce_only: Whether to exclude reduce-only orders + :param str text: Remark for order cancellation :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3933,7 +3947,9 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n 'settle', 'contract', 'x_gate_exptime', - 'side' + 'side', + 'exclude_reduce_only', + 'text' ] all_params.extend( [ @@ -3972,6 +3988,10 @@ def cancel_futures_orders_with_http_info(self, settle, contract, **kwargs): # n query_params.append(('contract', local_var_params['contract'])) # noqa: E501 if 'side' in local_var_params and local_var_params['side'] is not None: # noqa: E501 query_params.append(('side', local_var_params['side'])) # noqa: E501 + if 'exclude_reduce_only' in local_var_params and local_var_params['exclude_reduce_only'] is not None: # noqa: E501 + query_params.append(('exclude_reduce_only', local_var_params['exclude_reduce_only'])) # noqa: E501 + if 'text' in local_var_params and local_var_params['text'] is not None: # noqa: E501 + query_params.append(('text', local_var_params['text'])) # noqa: E501 header_params = {} if 'x_gate_exptime' in local_var_params: diff --git a/gate_api/api/multi_collateral_loan_api.py b/gate_api/api/multi_collateral_loan_api.py index 75a6582..4578f3f 100644 --- a/gate_api/api/multi_collateral_loan_api.py +++ b/gate_api/api/multi_collateral_loan_api.py @@ -48,7 +48,7 @@ def list_multi_collateral_orders(self, **kwargs): # noqa: E501 :param int page: Page number :param int limit: Maximum number of records returned in a single list :param str sort: Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. - :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified + :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -75,7 +75,7 @@ def list_multi_collateral_orders_with_http_info(self, **kwargs): # noqa: E501 :param int page: Page number :param int limit: Maximum number of records returned in a single list :param str sort: Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. - :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified + :param str order_type: Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/gate_api/api/rebate_api.py b/gate_api/api/rebate_api.py index fda77e3..f04f15e 100644 --- a/gate_api/api/rebate_api.py +++ b/gate_api/api/rebate_api.py @@ -188,6 +188,7 @@ def agency_commissions_history(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency: Specify the currency. If not specified, returns all currencies + :param int commission_type: Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate :param int user_id: User ID. If not specified, all user records will be returned :param int _from: Start time for querying records, defaults to 7 days before current time if not specified :param int to: End timestamp for the query, defaults to current time if not specified @@ -218,6 +219,7 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency: Specify the currency. If not specified, returns all currencies + :param int commission_type: Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate :param int user_id: User ID. If not specified, all user records will be returned :param int _from: Start time for querying records, defaults to 7 days before current time if not specified :param int to: End timestamp for the query, defaults to current time if not specified @@ -241,6 +243,7 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 all_params = [ 'currency', + 'commission_type', 'user_id', '_from', 'to', @@ -278,6 +281,8 @@ def agency_commissions_history_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'currency' in local_var_params and local_var_params['currency'] is not None: # noqa: E501 query_params.append(('currency', local_var_params['currency'])) # noqa: E501 + if 'commission_type' in local_var_params and local_var_params['commission_type'] is not None: # noqa: E501 + query_params.append(('commission_type', local_var_params['commission_type'])) # noqa: E501 if 'user_id' in local_var_params and local_var_params['user_id'] is not None: # noqa: E501 query_params.append(('user_id', local_var_params['user_id'])) # noqa: E501 if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 diff --git a/gate_api/api/spot_api.py b/gate_api/api/spot_api.py index eb9e8ef..1894742 100644 --- a/gate_api/api/spot_api.py +++ b/gate_api/api/spot_api.py @@ -726,7 +726,7 @@ def list_trades(self, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency_pair: Currency pair (required) :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param bool reverse: Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. :param int _from: Start timestamp for the query :param int to: End timestamp for the query, defaults to current time if not specified @@ -757,7 +757,7 @@ def list_trades_with_http_info(self, currency_pair, **kwargs): # noqa: E501 :param bool async_req: execute request asynchronously :param str currency_pair: Currency pair (required) :param int limit: Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000 - :param str last_id: Specify the currency name to query in batches, and support up to 100 pass parameters at a time + :param str last_id: Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used :param bool reverse: Whether to retrieve data less than `last_id`. Default returns records greater than `last_id`. Set to `true` to trace back market trade records, `false` to get latest trades. No effect when `last_id` is not set. :param int _from: Start timestamp for the query :param int to: End timestamp for the query, defaults to current time if not specified diff --git a/gate_api/api/unified_api.py b/gate_api/api/unified_api.py index dee5225..a6deb68 100644 --- a/gate_api/api/unified_api.py +++ b/gate_api/api/unified_api.py @@ -1567,7 +1567,7 @@ def get_unified_estimate_rate_with_http_info(self, currencies, **kwargs): # noq collection_formats=collection_formats) def list_currency_discount_tiers(self, **kwargs): # noqa: E501 - """Query unified account tiered discount # noqa: E501 + """Query unified account tiered # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1590,7 +1590,7 @@ def list_currency_discount_tiers(self, **kwargs): # noqa: E501 return self.list_currency_discount_tiers_with_http_info(**kwargs) # noqa: E501 def list_currency_discount_tiers_with_http_info(self, **kwargs): # noqa: E501 - """Query unified account tiered discount # noqa: E501 + """Query unified account tiered # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/gate_api/api_client.py b/gate_api/api_client.py index a285388..896c0ca 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/6.104.3/python' + self.user_agent = 'OpenAPI-Generator/7.1.7/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 02d9420..0d66245 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.104.3\n"\ - "SDK Package Version: 6.104.3".\ + "Version of the API: v4.105.7\n"\ + "SDK Package Version: 7.1.7".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/gate_api/models/contract.py b/gate_api/models/contract.py index a69cde8..557f6ce 100644 --- a/gate_api/models/contract.py +++ b/gate_api/models/contract.py @@ -70,7 +70,9 @@ class Contract(object): 'create_time': 'float', 'funding_cap_ratio': 'str', 'status': 'str', - 'launch_time': 'int' + 'launch_time': 'int', + 'delisting_time': 'int', + 'delisted_time': 'int' } attribute_map = { @@ -111,11 +113,13 @@ class Contract(object): 'create_time': 'create_time', 'funding_cap_ratio': 'funding_cap_ratio', 'status': 'status', - 'launch_time': 'launch_time' + 'launch_time': 'launch_time', + 'delisting_time': 'delisting_time', + 'delisted_time': 'delisted_time' } - def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, funding_rate=None, funding_interval=None, funding_next_apply=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, enable_bonus=None, enable_credit=None, create_time=None, funding_cap_ratio=None, status=None, launch_time=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, str, str, int, Configuration) -> None + def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=None, leverage_max=None, maintenance_rate=None, mark_type=None, mark_price=None, index_price=None, last_price=None, maker_fee_rate=None, taker_fee_rate=None, order_price_round=None, mark_price_round=None, funding_rate=None, funding_interval=None, funding_next_apply=None, risk_limit_base=None, risk_limit_step=None, risk_limit_max=None, order_size_min=None, order_size_max=None, order_price_deviate=None, ref_discount_rate=None, ref_rebate_rate=None, orderbook_id=None, trade_id=None, trade_size=None, position_size=None, config_change_time=None, in_delisting=None, orders_limit=None, enable_bonus=None, enable_credit=None, create_time=None, funding_cap_ratio=None, status=None, launch_time=None, delisting_time=None, delisted_time=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, float, str, str, str, int, int, str, str, str, int, int, int, int, float, bool, int, bool, bool, float, str, str, int, int, int, Configuration) -> None """Contract - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -159,6 +163,8 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self._funding_cap_ratio = None self._status = None self._launch_time = None + self._delisting_time = None + self._delisted_time = None self.discriminator = None if name is not None: @@ -237,6 +243,10 @@ def __init__(self, name=None, type=None, quanto_multiplier=None, leverage_min=No self.status = status if launch_time is not None: self.launch_time = launch_time + if delisting_time is not None: + self.delisting_time = delisting_time + if delisted_time is not None: + self.delisted_time = delisted_time @property def name(self): @@ -1082,7 +1092,7 @@ def funding_cap_ratio(self, funding_cap_ratio): def status(self): """Gets the status of this Contract. # noqa: E501 - Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted) # noqa: E501 + Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted), circuit_breaker (circuit breaker) # noqa: E501 :return: The status of this Contract. # noqa: E501 :rtype: str @@ -1093,7 +1103,7 @@ def status(self): def status(self, status): """Sets the status of this Contract. - Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted) # noqa: E501 + Contract status types include: prelaunch (pre-launch), trading (active), delisting (delisting), delisted (delisted), circuit_breaker (circuit breaker) # noqa: E501 :param status: The status of this Contract. # noqa: E501 :type: str @@ -1124,6 +1134,52 @@ def launch_time(self, launch_time): self._launch_time = launch_time + @property + def delisting_time(self): + """Gets the delisting_time of this Contract. # noqa: E501 + + Timestamp when contract enters reduce-only state # noqa: E501 + + :return: The delisting_time of this Contract. # noqa: E501 + :rtype: int + """ + return self._delisting_time + + @delisting_time.setter + def delisting_time(self, delisting_time): + """Sets the delisting_time of this Contract. + + Timestamp when contract enters reduce-only state # noqa: E501 + + :param delisting_time: The delisting_time of this Contract. # noqa: E501 + :type: int + """ + + self._delisting_time = delisting_time + + @property + def delisted_time(self): + """Gets the delisted_time of this Contract. # noqa: E501 + + Contract delisting time # noqa: E501 + + :return: The delisted_time of this Contract. # noqa: E501 + :rtype: int + """ + return self._delisted_time + + @delisted_time.setter + def delisted_time(self, delisted_time): + """Sets the delisted_time of this Contract. + + Contract delisting time # noqa: E501 + + :param delisted_time: The delisted_time of this Contract. # noqa: E501 + :type: int + """ + + self._delisted_time = delisted_time + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/contract_stat.py b/gate_api/models/contract_stat.py index bcdd22e..cac370c 100644 --- a/gate_api/models/contract_stat.py +++ b/gate_api/models/contract_stat.py @@ -45,7 +45,8 @@ class ContractStat(object): 'open_interest': 'int', 'open_interest_usd': 'float', 'top_lsr_account': 'float', - 'top_lsr_size': 'float' + 'top_lsr_size': 'float', + 'mark_price': 'float' } attribute_map = { @@ -61,11 +62,12 @@ class ContractStat(object): 'open_interest': 'open_interest', 'open_interest_usd': 'open_interest_usd', 'top_lsr_account': 'top_lsr_account', - 'top_lsr_size': 'top_lsr_size' + 'top_lsr_size': 'top_lsr_size', + 'mark_price': 'mark_price' } - def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=None, long_liq_amount=None, long_liq_usd=None, short_liq_size=None, short_liq_amount=None, short_liq_usd=None, open_interest=None, open_interest_usd=None, top_lsr_account=None, top_lsr_size=None, local_vars_configuration=None): # noqa: E501 - # type: (int, float, float, int, float, float, int, float, float, int, float, float, float, Configuration) -> None + def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=None, long_liq_amount=None, long_liq_usd=None, short_liq_size=None, short_liq_amount=None, short_liq_usd=None, open_interest=None, open_interest_usd=None, top_lsr_account=None, top_lsr_size=None, mark_price=None, local_vars_configuration=None): # noqa: E501 + # type: (int, float, float, int, float, float, int, float, float, int, float, float, float, float, Configuration) -> None """ContractStat - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -84,6 +86,7 @@ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=No self._open_interest_usd = None self._top_lsr_account = None self._top_lsr_size = None + self._mark_price = None self.discriminator = None if time is not None: @@ -112,6 +115,8 @@ def __init__(self, time=None, lsr_taker=None, lsr_account=None, long_liq_size=No self.top_lsr_account = top_lsr_account if top_lsr_size is not None: self.top_lsr_size = top_lsr_size + if mark_price is not None: + self.mark_price = mark_price @property def time(self): @@ -412,6 +417,29 @@ def top_lsr_size(self, top_lsr_size): self._top_lsr_size = top_lsr_size + @property + def mark_price(self): + """Gets the mark_price of this ContractStat. # noqa: E501 + + Mark price # noqa: E501 + + :return: The mark_price of this ContractStat. # noqa: E501 + :rtype: float + """ + return self._mark_price + + @mark_price.setter + def mark_price(self, mark_price): + """Sets the mark_price of this ContractStat. + + Mark price # noqa: E501 + + :param mark_price: The mark_price of this ContractStat. # noqa: E501 + :type: float + """ + + self._mark_price = mark_price + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/find_coin.py b/gate_api/models/find_coin.py index cb94999..a73037a 100644 --- a/gate_api/models/find_coin.py +++ b/gate_api/models/find_coin.py @@ -33,59 +33,31 @@ class FindCoin(object): and the value is json key in definition. """ openapi_types = { - 'coin': 'str', 'cointype': 'str' } attribute_map = { - 'coin': 'coin', 'cointype': 'cointype' } - def __init__(self, coin=None, cointype=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, Configuration) -> None + def __init__(self, cointype=None, local_vars_configuration=None): # noqa: E501 + # type: (str, Configuration) -> None """FindCoin - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration - self._coin = None self._cointype = None self.discriminator = None - if coin is not None: - self.coin = coin if cointype is not None: self.cointype = cointype - @property - def coin(self): - """Gets the coin of this FindCoin. # noqa: E501 - - Currency # noqa: E501 - - :return: The coin of this FindCoin. # noqa: E501 - :rtype: str - """ - return self._coin - - @coin.setter - def coin(self, coin): - """Sets the coin of this FindCoin. - - Currency # noqa: E501 - - :param coin: The coin of this FindCoin. # noqa: E501 - :type: str - """ - - self._coin = coin - @property def cointype(self): """Gets the cointype of this FindCoin. # noqa: E501 - Token Type: swap-Voucher, lock-Locked # noqa: E501 + Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. # noqa: E501 :return: The cointype of this FindCoin. # noqa: E501 :rtype: str @@ -96,7 +68,7 @@ def cointype(self): def cointype(self, cointype): """Sets the cointype of this FindCoin. - Token Type: swap-Voucher, lock-Locked # noqa: E501 + Currency type: swap - voucher; lock - locked position; debt - US Treasury bond. # noqa: E501 :param cointype: The cointype of this FindCoin. # noqa: E501 :type: str diff --git a/gate_api/models/futures_account.py b/gate_api/models/futures_account.py index 62fb2fc..6855e9f 100644 --- a/gate_api/models/futures_account.py +++ b/gate_api/models/futures_account.py @@ -41,6 +41,7 @@ class FuturesAccount(object): 'point': 'str', 'currency': 'str', 'in_dual_mode': 'bool', + 'position_mode': 'str', 'enable_credit': 'bool', 'position_initial_margin': 'str', 'maintenance_margin': 'str', @@ -70,6 +71,7 @@ class FuturesAccount(object): 'point': 'point', 'currency': 'currency', 'in_dual_mode': 'in_dual_mode', + 'position_mode': 'position_mode', 'enable_credit': 'enable_credit', 'position_initial_margin': 'position_initial_margin', 'maintenance_margin': 'maintenance_margin', @@ -90,8 +92,8 @@ class FuturesAccount(object): 'history': 'history' } - def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_margin=None, available=None, point=None, currency=None, in_dual_mode=None, enable_credit=None, position_initial_margin=None, maintenance_margin=None, bonus=None, enable_evolved_classic=None, cross_order_margin=None, cross_initial_margin=None, cross_maintenance_margin=None, cross_unrealised_pnl=None, cross_available=None, cross_margin_balance=None, cross_mmr=None, cross_imr=None, isolated_position_margin=None, enable_new_dual_mode=None, margin_mode=None, enable_tiered_mm=None, history=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, bool, bool, str, str, str, bool, str, str, str, str, str, str, str, str, str, bool, int, bool, FuturesAccountHistory, Configuration) -> None + def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_margin=None, available=None, point=None, currency=None, in_dual_mode=None, position_mode=None, enable_credit=None, position_initial_margin=None, maintenance_margin=None, bonus=None, enable_evolved_classic=None, cross_order_margin=None, cross_initial_margin=None, cross_maintenance_margin=None, cross_unrealised_pnl=None, cross_available=None, cross_margin_balance=None, cross_mmr=None, cross_imr=None, isolated_position_margin=None, enable_new_dual_mode=None, margin_mode=None, enable_tiered_mm=None, history=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, bool, str, bool, str, str, str, bool, str, str, str, str, str, str, str, str, str, bool, int, bool, FuturesAccountHistory, Configuration) -> None """FuturesAccount - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -105,6 +107,7 @@ def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_ self._point = None self._currency = None self._in_dual_mode = None + self._position_mode = None self._enable_credit = None self._position_initial_margin = None self._maintenance_margin = None @@ -141,6 +144,8 @@ def __init__(self, total=None, unrealised_pnl=None, position_margin=None, order_ self.currency = currency if in_dual_mode is not None: self.in_dual_mode = in_dual_mode + if position_mode is not None: + self.position_mode = position_mode if enable_credit is not None: self.enable_credit = enable_credit if position_initial_margin is not None: @@ -362,6 +367,29 @@ def in_dual_mode(self, in_dual_mode): self._in_dual_mode = in_dual_mode + @property + def position_mode(self): + """Gets the position_mode of this FuturesAccount. # noqa: E501 + + Position mode: single - one-way, dual - dual-side, split - sub-positions (in_dual_mode is deprecated) # noqa: E501 + + :return: The position_mode of this FuturesAccount. # noqa: E501 + :rtype: str + """ + return self._position_mode + + @position_mode.setter + def position_mode(self, position_mode): + """Sets the position_mode of this FuturesAccount. + + Position mode: single - one-way, dual - dual-side, split - sub-positions (in_dual_mode is deprecated) # noqa: E501 + + :param position_mode: The position_mode of this FuturesAccount. # noqa: E501 + :type: str + """ + + self._position_mode = position_mode + @property def enable_credit(self): """Gets the enable_credit of this FuturesAccount. # noqa: E501 diff --git a/gate_api/models/futures_account_book.py b/gate_api/models/futures_account_book.py index f4dafab..ff4e125 100644 --- a/gate_api/models/futures_account_book.py +++ b/gate_api/models/futures_account_book.py @@ -161,7 +161,7 @@ def balance(self, balance): def type(self): """Gets the type of this FuturesAccountBook. # noqa: E501 - Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 + Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction # noqa: E501 :return: The type of this FuturesAccountBook. # noqa: E501 :rtype: str @@ -172,7 +172,7 @@ def type(self): def type(self, type): """Sets the type of this FuturesAccountBook. - Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction # noqa: E501 + Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction # noqa: E501 :param type: The type of this FuturesAccountBook. # noqa: E501 :type: str diff --git a/gate_api/models/futures_order.py b/gate_api/models/futures_order.py index 368dd3b..0f60281 100644 --- a/gate_api/models/futures_order.py +++ b/gate_api/models/futures_order.py @@ -36,6 +36,7 @@ class FuturesOrder(object): 'id': 'int', 'user': 'int', 'create_time': 'float', + 'update_time': 'float', 'finish_time': 'float', 'finish_as': 'str', 'status': 'str', @@ -58,13 +59,16 @@ class FuturesOrder(object): 'auto_size': 'str', 'stp_id': 'int', 'stp_act': 'str', - 'amend_text': 'str' + 'amend_text': 'str', + 'limit_vip': 'int', + 'pid': 'int' } attribute_map = { 'id': 'id', 'user': 'user', 'create_time': 'create_time', + 'update_time': 'update_time', 'finish_time': 'finish_time', 'finish_as': 'finish_as', 'status': 'status', @@ -87,11 +91,13 @@ class FuturesOrder(object): 'auto_size': 'auto_size', 'stp_id': 'stp_id', 'stp_act': 'stp_act', - 'amend_text': 'amend_text' + 'amend_text': 'amend_text', + 'limit_vip': 'limit_vip', + 'pid': 'pid' } - def __init__(self, id=None, user=None, create_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_id=None, stp_act=None, amend_text=None, local_vars_configuration=None): # noqa: E501 - # type: (int, int, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, Configuration) -> None + def __init__(self, id=None, user=None, create_time=None, update_time=None, finish_time=None, finish_as=None, status=None, contract=None, size=None, iceberg=None, price=None, close=False, is_close=None, reduce_only=False, is_reduce_only=None, is_liq=None, tif='gtc', left=None, fill_price=None, text=None, tkfr=None, mkfr=None, refu=None, auto_size=None, stp_id=None, stp_act=None, amend_text=None, limit_vip=None, pid=None, local_vars_configuration=None): # noqa: E501 + # type: (int, int, float, float, float, str, str, str, int, int, str, bool, bool, bool, bool, bool, str, int, str, str, str, str, int, str, int, str, str, int, int, Configuration) -> None """FuturesOrder - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -100,6 +106,7 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis self._id = None self._user = None self._create_time = None + self._update_time = None self._finish_time = None self._finish_as = None self._status = None @@ -123,6 +130,8 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis self._stp_id = None self._stp_act = None self._amend_text = None + self._limit_vip = None + self._pid = None self.discriminator = None if id is not None: @@ -131,6 +140,8 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis self.user = user if create_time is not None: self.create_time = create_time + if update_time is not None: + self.update_time = update_time if finish_time is not None: self.finish_time = finish_time if finish_as is not None: @@ -175,6 +186,10 @@ def __init__(self, id=None, user=None, create_time=None, finish_time=None, finis self.stp_act = stp_act if amend_text is not None: self.amend_text = amend_text + if limit_vip is not None: + self.limit_vip = limit_vip + if pid is not None: + self.pid = pid @property def id(self): @@ -245,6 +260,29 @@ def create_time(self, create_time): self._create_time = create_time + @property + def update_time(self): + """Gets the update_time of this FuturesOrder. # noqa: E501 + + OrderUpdateTime # noqa: E501 + + :return: The update_time of this FuturesOrder. # noqa: E501 + :rtype: float + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this FuturesOrder. + + OrderUpdateTime # noqa: E501 + + :param update_time: The update_time of this FuturesOrder. # noqa: E501 + :type: float + """ + + self._update_time = update_time + @property def finish_time(self): """Gets the finish_time of this FuturesOrder. # noqa: E501 @@ -808,6 +846,52 @@ def amend_text(self, amend_text): self._amend_text = amend_text + @property + def limit_vip(self): + """Gets the limit_vip of this FuturesOrder. # noqa: E501 + + Counterparty user's VIP level for limit order fills. Current order will only match with orders whose VIP level is less than or equal to the specified level. Only 11~16 are supported; default is 0 # noqa: E501 + + :return: The limit_vip of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._limit_vip + + @limit_vip.setter + def limit_vip(self, limit_vip): + """Sets the limit_vip of this FuturesOrder. + + Counterparty user's VIP level for limit order fills. Current order will only match with orders whose VIP level is less than or equal to the specified level. Only 11~16 are supported; default is 0 # noqa: E501 + + :param limit_vip: The limit_vip of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._limit_vip = limit_vip + + @property + def pid(self): + """Gets the pid of this FuturesOrder. # noqa: E501 + + Position ID # noqa: E501 + + :return: The pid of this FuturesOrder. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this FuturesOrder. + + Position ID # noqa: E501 + + :param pid: The pid of this FuturesOrder. # noqa: E501 + :type: int + """ + + self._pid = pid + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/futures_order_amendment.py b/gate_api/models/futures_order_amendment.py index 920a9c9..1232631 100644 --- a/gate_api/models/futures_order_amendment.py +++ b/gate_api/models/futures_order_amendment.py @@ -35,17 +35,19 @@ class FuturesOrderAmendment(object): openapi_types = { 'size': 'int', 'price': 'str', - 'amend_text': 'str' + 'amend_text': 'str', + 'text': 'str' } attribute_map = { 'size': 'size', 'price': 'price', - 'amend_text': 'amend_text' + 'amend_text': 'amend_text', + 'text': 'text' } - def __init__(self, size=None, price=None, amend_text=None, local_vars_configuration=None): # noqa: E501 - # type: (int, str, str, Configuration) -> None + def __init__(self, size=None, price=None, amend_text=None, text=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, str, str, Configuration) -> None """FuturesOrderAmendment - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -54,6 +56,7 @@ def __init__(self, size=None, price=None, amend_text=None, local_vars_configurat self._size = None self._price = None self._amend_text = None + self._text = None self.discriminator = None if size is not None: @@ -62,6 +65,8 @@ def __init__(self, size=None, price=None, amend_text=None, local_vars_configurat self.price = price if amend_text is not None: self.amend_text = amend_text + if text is not None: + self.text = text @property def size(self): @@ -132,6 +137,29 @@ def amend_text(self, amend_text): self._amend_text = amend_text + @property + def text(self): + """Gets the text of this FuturesOrderAmendment. # noqa: E501 + + Internal users can modify information in the text field. # noqa: E501 + + :return: The text of this FuturesOrderAmendment. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this FuturesOrderAmendment. + + Internal users can modify information in the text field. # noqa: E501 + + :param text: The text of this FuturesOrderAmendment. # noqa: E501 + :type: str + """ + + self._text = text + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/futures_ticker.py b/gate_api/models/futures_ticker.py index 8035c43..37acc8e 100644 --- a/gate_api/models/futures_ticker.py +++ b/gate_api/models/futures_ticker.py @@ -53,7 +53,12 @@ class FuturesTicker(object): 'lowest_ask': 'str', 'lowest_size': 'str', 'highest_bid': 'str', - 'highest_size': 'str' + 'highest_size': 'str', + 'change_utc0': 'str', + 'change_utc8': 'str', + 'change_price': 'str', + 'change_utc0_price': 'str', + 'change_utc8_price': 'str' } attribute_map = { @@ -77,11 +82,16 @@ class FuturesTicker(object): 'lowest_ask': 'lowest_ask', 'lowest_size': 'lowest_size', 'highest_bid': 'highest_bid', - 'highest_size': 'highest_size' + 'highest_size': 'highest_size', + 'change_utc0': 'change_utc0', + 'change_utc8': 'change_utc8', + 'change_price': 'change_price', + 'change_utc0_price': 'change_utc0_price', + 'change_utc8_price': 'change_utc8_price' } - def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, local_vars_configuration=None): # noqa: E501 - # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None + def __init__(self, contract=None, last=None, change_percentage=None, total_size=None, low_24h=None, high_24h=None, volume_24h=None, volume_24h_btc=None, volume_24h_usd=None, volume_24h_base=None, volume_24h_quote=None, volume_24h_settle=None, mark_price=None, funding_rate=None, funding_rate_indicative=None, index_price=None, quanto_base_rate=None, lowest_ask=None, lowest_size=None, highest_bid=None, highest_size=None, change_utc0=None, change_utc8=None, change_price=None, change_utc0_price=None, change_utc8_price=None, local_vars_configuration=None): # noqa: E501 + # type: (str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, Configuration) -> None """FuturesTicker - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -108,6 +118,11 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= self._lowest_size = None self._highest_bid = None self._highest_size = None + self._change_utc0 = None + self._change_utc8 = None + self._change_price = None + self._change_utc0_price = None + self._change_utc8_price = None self.discriminator = None if contract is not None: @@ -152,6 +167,16 @@ def __init__(self, contract=None, last=None, change_percentage=None, total_size= self.highest_bid = highest_bid if highest_size is not None: self.highest_size = highest_size + if change_utc0 is not None: + self.change_utc0 = change_utc0 + if change_utc8 is not None: + self.change_utc8 = change_utc8 + if change_price is not None: + self.change_price = change_price + if change_utc0_price is not None: + self.change_utc0_price = change_utc0_price + if change_utc8_price is not None: + self.change_utc8_price = change_utc8_price @property def contract(self): @@ -636,6 +661,121 @@ def highest_size(self, highest_size): self._highest_size = highest_size + @property + def change_utc0(self): + """Gets the change_utc0 of this FuturesTicker. # noqa: E501 + + Percentage change at utc0. Negative values indicate a drop, e.g., -7.45% # noqa: E501 + + :return: The change_utc0 of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._change_utc0 + + @change_utc0.setter + def change_utc0(self, change_utc0): + """Sets the change_utc0 of this FuturesTicker. + + Percentage change at utc0. Negative values indicate a drop, e.g., -7.45% # noqa: E501 + + :param change_utc0: The change_utc0 of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._change_utc0 = change_utc0 + + @property + def change_utc8(self): + """Gets the change_utc8 of this FuturesTicker. # noqa: E501 + + Percentage change at utc8. Negative values indicate a drop, e.g., -7.45% # noqa: E501 + + :return: The change_utc8 of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._change_utc8 + + @change_utc8.setter + def change_utc8(self, change_utc8): + """Sets the change_utc8 of this FuturesTicker. + + Percentage change at utc8. Negative values indicate a drop, e.g., -7.45% # noqa: E501 + + :param change_utc8: The change_utc8 of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._change_utc8 = change_utc8 + + @property + def change_price(self): + """Gets the change_price of this FuturesTicker. # noqa: E501 + + 24h change amount. Negative values indicate a drop, e.g., -7.45 # noqa: E501 + + :return: The change_price of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._change_price + + @change_price.setter + def change_price(self, change_price): + """Sets the change_price of this FuturesTicker. + + 24h change amount. Negative values indicate a drop, e.g., -7.45 # noqa: E501 + + :param change_price: The change_price of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._change_price = change_price + + @property + def change_utc0_price(self): + """Gets the change_utc0_price of this FuturesTicker. # noqa: E501 + + Change amount at utc0. Negative values indicate a drop, e.g., -7.45 # noqa: E501 + + :return: The change_utc0_price of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._change_utc0_price + + @change_utc0_price.setter + def change_utc0_price(self, change_utc0_price): + """Sets the change_utc0_price of this FuturesTicker. + + Change amount at utc0. Negative values indicate a drop, e.g., -7.45 # noqa: E501 + + :param change_utc0_price: The change_utc0_price of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._change_utc0_price = change_utc0_price + + @property + def change_utc8_price(self): + """Gets the change_utc8_price of this FuturesTicker. # noqa: E501 + + Change amount at utc8. Negative values indicate a drop, e.g., -7.45 # noqa: E501 + + :return: The change_utc8_price of this FuturesTicker. # noqa: E501 + :rtype: str + """ + return self._change_utc8_price + + @change_utc8_price.setter + def change_utc8_price(self, change_utc8_price): + """Sets the change_utc8_price of this FuturesTicker. + + Change amount at utc8. Negative values indicate a drop, e.g., -7.45 # noqa: E501 + + :param change_utc8_price: The change_utc8_price of this FuturesTicker. # noqa: E501 + :type: str + """ + + self._change_utc8_price = change_utc8_price + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/multi_loan_repay_item.py b/gate_api/models/multi_loan_repay_item.py index 8ca2267..40d09f8 100644 --- a/gate_api/models/multi_loan_repay_item.py +++ b/gate_api/models/multi_loan_repay_item.py @@ -60,8 +60,7 @@ def __init__(self, currency=None, amount=None, repaid_all=None, local_vars_confi self.currency = currency if amount is not None: self.amount = amount - if repaid_all is not None: - self.repaid_all = repaid_all + self.repaid_all = repaid_all @property def currency(self): @@ -129,6 +128,8 @@ def repaid_all(self, repaid_all): :param repaid_all: The repaid_all of this MultiLoanRepayItem. # noqa: E501 :type: bool """ + if self.local_vars_configuration.client_side_validation and repaid_all is None: # noqa: E501 + raise ValueError("Invalid value for `repaid_all`, must not be `None`") # noqa: E501 self._repaid_all = repaid_all diff --git a/gate_api/models/position.py b/gate_api/models/position.py index e14210a..2951397 100644 --- a/gate_api/models/position.py +++ b/gate_api/models/position.py @@ -65,7 +65,8 @@ class Position(object): 'update_id': 'int', 'open_time': 'int', 'risk_limit_table': 'str', - 'average_maintenance_rate': 'str' + 'average_maintenance_rate': 'str', + 'pid': 'int' } attribute_map = { @@ -101,11 +102,12 @@ class Position(object): 'update_id': 'update_id', 'open_time': 'open_time', 'risk_limit_table': 'risk_limit_table', - 'average_maintenance_rate': 'average_maintenance_rate' + 'average_maintenance_rate': 'average_maintenance_rate', + 'pid': 'pid' } - def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limit=None, leverage_max=None, maintenance_rate=None, value=None, margin=None, entry_price=None, liq_price=None, mark_price=None, initial_margin=None, maintenance_margin=None, unrealised_pnl=None, realised_pnl=None, 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, local_vars_configuration=None): # noqa: E501 - # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, int, int, str, str, Configuration) -> None + def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limit=None, leverage_max=None, maintenance_rate=None, value=None, margin=None, entry_price=None, liq_price=None, mark_price=None, initial_margin=None, maintenance_margin=None, unrealised_pnl=None, realised_pnl=None, pnl_pnl=None, pnl_fund=None, pnl_fee=None, history_pnl=None, last_close_pnl=None, realised_point=None, history_point=None, adl_ranking=None, pending_orders=None, close_order=None, mode=None, cross_leverage_limit=None, update_time=None, update_id=None, open_time=None, risk_limit_table=None, average_maintenance_rate=None, pid=None, local_vars_configuration=None): # noqa: E501 + # type: (int, str, int, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, int, int, PositionCloseOrder, str, str, int, int, int, str, str, int, Configuration) -> None """Position - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -144,6 +146,7 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi self._open_time = None self._risk_limit_table = None self._average_maintenance_rate = None + self._pid = None self.discriminator = None if user is not None: @@ -211,6 +214,8 @@ def __init__(self, user=None, contract=None, size=None, leverage=None, risk_limi self.risk_limit_table = risk_limit_table if average_maintenance_rate is not None: self.average_maintenance_rate = average_maintenance_rate + if pid is not None: + self.pid = pid @property def user(self): @@ -975,6 +980,29 @@ def average_maintenance_rate(self, average_maintenance_rate): self._average_maintenance_rate = average_maintenance_rate + @property + def pid(self): + """Gets the pid of this Position. # noqa: E501 + + Sub-account position ID # noqa: E501 + + :return: The pid of this Position. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this Position. + + Sub-account position ID # noqa: E501 + + :param pid: The pid of this Position. # noqa: E501 + :type: int + """ + + self._pid = pid + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/gate_api/models/sub_account.py b/gate_api/models/sub_account.py index cd60537..ad8b79e 100644 --- a/gate_api/models/sub_account.py +++ b/gate_api/models/sub_account.py @@ -114,7 +114,7 @@ def remark(self, remark): def login_name(self): """Gets the login_name of this SubAccount. # noqa: E501 - 子账户登陆名:仅支持字母、数字、下划线,不可包含其他非法字符。 # noqa: E501 + Sub-account login name: Only letters, numbers and underscores are supported, cannot contain other invalid characters # noqa: E501 :return: The login_name of this SubAccount. # noqa: E501 :rtype: str @@ -125,7 +125,7 @@ def login_name(self): def login_name(self, login_name): """Sets the login_name of this SubAccount. - 子账户登陆名:仅支持字母、数字、下划线,不可包含其他非法字符。 # noqa: E501 + Sub-account login name: Only letters, numbers and underscores are supported, cannot contain other invalid characters # noqa: E501 :param login_name: The login_name of this SubAccount. # noqa: E501 :type: str diff --git a/gate_api/models/swap_coin_struct.py b/gate_api/models/swap_coin_struct.py index 39631ff..8a7ae01 100644 --- a/gate_api/models/swap_coin_struct.py +++ b/gate_api/models/swap_coin_struct.py @@ -242,7 +242,7 @@ def type(self, type): def subtype(self): """Gets the subtype of this SwapCoinStruct. # noqa: E501 - 子类型 # noqa: E501 + SubType # noqa: E501 :return: The subtype of this SwapCoinStruct. # noqa: E501 :rtype: str @@ -253,7 +253,7 @@ def subtype(self): def subtype(self, subtype): """Sets the subtype of this SwapCoinStruct. - 子类型 # noqa: E501 + SubType # noqa: E501 :param subtype: The subtype of this SwapCoinStruct. # noqa: E501 :type: str @@ -334,7 +334,7 @@ def exchange_amount(self, exchange_amount): def update_stamp(self): """Gets the update_stamp of this SwapCoinStruct. # noqa: E501 - 更新时间戳 # noqa: E501 + UpdateTimestamp # 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. - 更新时间戳 # noqa: E501 + UpdateTimestamp # noqa: E501 :param update_stamp: The update_stamp of this SwapCoinStruct. # noqa: E501 :type: int diff --git a/setup.py b/setup.py index a3e56cb..f3c71f5 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "6.104.3" +VERSION = "7.1.7" # To install the library, run the following # # python setup.py install From 8f8096dee105ef98cebf44f47535e5f2184cca17 Mon Sep 17 00:00:00 2001 From: gateio Date: Thu, 11 Sep 2025 06:47:33 +0000 Subject: [PATCH 20/20] update to v7.1.8 --- README.md | 4 ++-- gate_api/__init__.py | 2 +- gate_api/api_client.py | 2 +- gate_api/configuration.py | 4 ++-- setup.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d185462..802396f 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.105.7 -- Package version: 7.1.7 +- API version: v4.105.8 +- Package version: 7.1.8 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts) diff --git a/gate_api/__init__.py b/gate_api/__init__.py index 327ad77..060b069 100644 --- a/gate_api/__init__.py +++ b/gate_api/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "7.1.7" +__version__ = "7.1.8" # import apis into sdk package from gate_api.api.earn_uni_api import EarnUniApi diff --git a/gate_api/api_client.py b/gate_api/api_client.py index 896c0ca..5d90c48 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.1.7/python' + self.user_agent = 'OpenAPI-Generator/7.1.8/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/gate_api/configuration.py b/gate_api/configuration.py index 0d66245..e1a45a1 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.105.7\n"\ - "SDK Package Version: 7.1.7".\ + "Version of the API: v4.105.8\n"\ + "SDK Package Version: 7.1.8".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/setup.py b/setup.py index f3c71f5..d0fc88e 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "gate-api" -VERSION = "7.1.7" +VERSION = "7.1.8" # To install the library, run the following # # python setup.py install